]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Correct a typo in the documentation for the disassembler.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
404f2902
FCE
12019-08-06 Frank Ch. Eigler <fche@redhat.com>
2
3 PR build/24886
4 * configure.ac: Drop enable-libmcheck support.
5 * configure, config.in: Rebuild.
6 * acinclude.m4: Don't include it.
7
4c5aa8e0
AH
82019-07-19 Alan Hayward <alan.hayward@arm.com>
9
10 * configure.srv: Remove Arm xml files.
11
7cc17433
AH
122019-07-19 Alan Hayward <alan.hayward@arm.com>
13
14 * configure.srv: Add new files. Remove xml generated files.
15 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
16 registers.
17 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
18 * linux-aarch32-tdesc.c: New file.
19 * linux-aarch32-tdesc.h: New file.
20 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
21 * linux-arm-low.c (init_registers_arm, tdesc_arm)
22 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
23 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
24 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
25 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
26 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
27 (arm_read_description): Call arm_linux_read_description.
28 (initialize_low_arch): Don't init registers.
29 * linux-arm-tdesc.c: New file.
30 * linux-arm-tdesc.h: New file.
31
166a82be
AH
322019-07-10 Alan Hayward <alan.hayward@arm.com>
33
34 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
35 Move counter inside for.
36 (arm_read_description): Check ptrace earlier.
37 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
38
268a13a5
TT
392019-07-09 Tom Tromey <tom@tromey.com>
40
41 * configure: Rebuild.
42 * configure.ac: Change common to gdbsupport.
43 * acinclude.m4: Change common to gdbsupport.
44 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
45 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
46 common to gdbsupport.
47 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
48 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
49 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
50 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
51 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
52 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
53 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
54 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
55 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
56 common to gdbsupport.
57
350fab54
AH
582019-07-04 Alan Hayward <alan.hayward@arm.com>
59
60 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
61 defines.
62 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
63
2b40fda7
AH
642019-07-04 Alan Hayward <alan.hayward@arm.com>
65
66 * configure.srv: Remove legacy xml.
67 * linux-aarch64-low.c (initialize_low_arch): Remove
68 initialize_low_tdesc call.
69 * linux-aarch64-tdesc-selftest.c: Remove file.
70 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
71 * linux-x86-low.c (initialize_low_arch): Remove
72 initialize_low_tdesc call.
73 * linux-x86-tdesc-selftest.c: Remove file.
74 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
75
7d10623d
TV
762019-06-20 Tom de Vries <tdevries@suse.de>
77
78 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
79 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
80
8d6a48df
TV
812019-06-19 Tom de Vries <tdevries@suse.de>
82
83 * debug.h (debug_write): Change return type to ssize_t.
84 * debug.c (debug_write): Same.
85
73cc7272
TT
862019-06-14 Tom Tromey <tom@tromey.com>
87
88 * configure.ac: Use new path to gnulib.
89 * configure: Rebuild.
90 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
91 to gnulib.
92
08f10e02
TT
932019-06-11 Tom Tromey <tom@tromey.com>
94
95 * Makefile.in (SFILES): Add alloc.c.
96 (OBS): Add alloc.o.
97 (IPA_OBJS): Add alloc-ipa.o.
98 (alloc-ipa.o): New target.
99 (%.o: ../%.c): New pattern rule.
100
422186a9
TT
1012019-06-10 Tom Tromey <tromey@adacore.com>
102
103 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
104 end warning with a newline.
105 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
106 newline.
107 * thread-db.c (attach_thread): Don't end warning with a newline.
108 (thread_db_notice_clone): Likewise.
109 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
110 newline.
111 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
112 end warning with a newline.
113
b02f78f9
PA
1142019-06-04 Pedro Alves <palves@redhat.com>
115
116 * server.c (captured_main): Use make_unique_xstrdup.
117
88ed7edb
TT
1182019-06-02 Tom Tromey <tom@tromey.com>
119
120 * gdbreplay.c (fromhex): Remove.
121 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
122
33a6bc35
TT
1232019-05-29 Tom Tromey <tromey@adacore.com>
124
125 * configure: Rebuild.
126
e90a813d
KB
1272019-05-06 Kevin Buettner <kevinb@redhat.com>
128
129 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
130 sign extension code on 32-bit builds.
131
353ea2d1
EZ
1322019-05-03 Eli Zaretskii <eliz@gnu.org>
133
134 * remote-utils.c:
135 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
136
b494cdff
TT
1372019-04-19 Tom Tromey <tom@tromey.com>
138
139 * server.c (struct vstop_notif): Derive from notif_event.
140 <base>: Remove.
141 (queue_stop_reply): Update.
142 (remove_all_on_match_ptid): Change type. Rewrite.
143 (discard_queued_stop_replies): Rewrite.
144 (in_queued_stop_replies_ptid): Change type.
145 (in_queued_stop_replies): Rewrite.
146 (notif_stop): Update.
147 (queue_stop_reply_callback): Update.
148 (captured_main): Don't call initialize_notif.
149 (push_stop_notification): Update.
150 * notif.c (notif_write_event, handle_notif_ack)
151 (notif_event_enque, notif_push): Update.
152 (notif_event_xfree, initialize_notif): Remove.
153 * notif.h (struct notif_event): Include <list>, not
154 "common/queue.h".
155 (struct notif_server) <queue>: Now a std::list.
156 (notif_event_p): Remove typedef.
157 (initialize_notif): Don't declare.
158 (struct notif_event): Add virtual destructor.
159
a7e559cc
AH
1602019-04-17 Alan Hayward <alan.hayward@arm.com>
161
162 * ax.c (ax_vdebug): Call debug_printf.
163 * debug.c (debug_write): New function.
164 * debug.h (debug_write): New declaration.
165 * linux-low.c (sigchld_handler): Call debug_write.
166
aeb2e706
AH
1672019-04-17 Alan Hayward <alan.hayward@arm.com>
168
169 * debug.c (debug_set_output): New function.
170 (debug_vprintf): Send output to debug_file.
171 (debug_flush): Likewise.
172 * debug.h (debug_set_output): New declaration.
173 * server.c (handle_monitor_command): Add debug-file option.
174 (captured_main): Likewise.
175
c1bc0935
AH
1762019-04-17 Alan Hayward <alan.hayward@arm.com>
177
178 * debug.c (remote_debug): Add definition.
179 * debug.h (remote_debug): Add declaration.
180 * hostio.c (remote_debug): Remove declaration.
181 * remote-utils.c (struct ui_file): Likewise.
182 (remote_debug): Likewise.
183 * remote-utils.h (remote_debug): Likewise,
184 * server.c (remote_debug): Remove definition.
185
3f52fdbc
KB
1862019-04-10 Kevin Buettner <kevinb@redhat.com>
187
188 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
189 when using a 64-bit gdbserver.
190
b0319eaa
TT
1912019-04-09 Tom Tromey <tromey@adacore.com>
192
193 * linux-low.c (select_event_lwp): Use find_thread_in_random.
194
eedc3f4f
TT
1952019-04-08 Tom Tromey <tom@tromey.com>
196
197 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
198 throw.
199 (linux_resume_one_lwp): Likewise.
200
230d2906
TT
2012019-04-08 Tom Tromey <tom@tromey.com>
202
203 * gdbreplay.c: Update.
204 * linux-low.c: Update.
205 * server.c: Update.
206
a70b8144
TT
2072019-04-08 Tom Tromey <tom@tromey.com>
208
209 * server.c: Use C++ exception handling.
210 * linux-low.c: Use C++ exception handling.
211 * gdbreplay.c: Use C++ exception handling.
212
3d6e9d23
TT
2132019-04-08 Tom Tromey <tom@tromey.com>
214
215 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
216 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
217 (captured_main, main): Update.
218 * gdbreplay.c (main): Update.
219
0570503d
PFC
2202019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
221
222 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
223 value in argument pointer, return 1 if the entry is found and 0
224 otherwise. Move comment.
225 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
226 * linux-low.h (linux_get_auxv): Declare.
227 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
228
227a9e65
TT
2292019-04-05 Tom Tromey <tromey@adacore.com>
230
231 * server.c (gdbserver_usage): Use upper-case for metasyntactic
232 variables.
233
69f4c9cc
AH
2342019-03-28 Alan Hayward <alan.hayward@arm.com>
235
236 * linux-low.c (AT_HWCAP2): Add define if not already included.
237
974c89e0
AH
2382019-03-26 Alan Hayward <alan.hayward@arm.com>
239
240 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
241 (aarch64_arch_setup): Call linux_get_hwcap.
242 * linux-arm-low.c (arm_get_hwcap): Remove function.
243 (arm_read_description): Call linux_get_hwcap.
244 * linux-low.c (linux_get_auxv): New function.
245 (linux_get_hwcap): Likewise.
246 (linux_get_hwcap2): Likewise.
247 * linux-low.h (linux_get_hwcap): New declaration.
248 (linux_get_hwcap2): Likewise.
249 * linux-ppc-low.c (ppc_get_auxv): Remove function.
250 (ppc_arch_setup): Call linux_get_hwcap.
251 * linux-s390-low.c (s390_get_hwcap): Remove function.
252 (s390_arch_setup): Call linux_get_hwcap.
253
1ef53e6b
AH
2542019-03-22 Alan Hayward <alan.hayward@arm.com>
255 Jiong Wang <jiong.wang@arm.com>
256
257 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
258 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
259 to fail.
260 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
261
ee4fbcfa
AH
2622019-03-22 Alan Hayward <alan.hayward@arm.com>
263 Jiong Wang <jiong.wang@arm.com>
264
265 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
266 (aarch64_get_hwcap): New function.
267 (aarch64_arch_setup): Read APIA hwcap.
268
6dc0ebde
AH
2692019-03-22 Alan Hayward <alan.hayward@arm.com>
270 Jiong Wang <jiong.wang@arm.com>
271
272 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
273 (initialize_low_tracepoint): Likewise.
274 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
275 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
276 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
277 (aarch64_linux_read_description): Likewise.
278 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
279
1163a4b7
JB
2802019-03-12 John Baldwin <jhb@FreeBSD.org>
281
282 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
283 i386_create_target_description for 'segments' parameter.
284 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
285 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
286 * win32-i386-low.c (i386_arch_setup): Likewise.
287
d3a70e03
TT
2882019-03-12 Tom Tromey <tromey@adacore.com>
289
290 * linux-low.c (iterate_over_lwps): Update.
291
37991b4f
TT
2922019-03-06 Tom Tromey <tom@tromey.com>
293
294 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
295 (captured_main): Use SCOPE_EXIT.
296
45950eb6
SDJ
2972019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
298
299 * configure.srv: Use '$enable_unittest' instead of '$development'
300 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
301 case.
302
43ac54fc
TT
3032019-02-27 Tom Tromey <tromey@adacore.com>
304
305 * gdbreplay.c (logchar): Handle \r\n.
306
df0da8a2
AH
3072019-02-07 Alan Hayward <alan.hayward@arm.com>
308
309 * linux-low.c (linux_attach): Add process before lwp.
310 * server.c (attach_inferior): Check if already attached.
311
1a5c2598
TT
3122019-02-07 Tom Tromey <tom@tromey.com>
313
314 * x86-tdesc.h: Rename include guard.
315 * x86-low.h: Add include guard.
316 * wincecompat.h: Rename include guard.
317 * win32-low.h: Add include guard.
318 * utils.h: Rename include guard.
319 * tracepoint.h: Rename include guard.
320 * tdesc.h: Rename include guard.
321 * target.h: Rename include guard.
322 * server.h: Rename include guard.
323 * remote-utils.h: Rename include guard.
324 * regcache.h: Rename include guard.
325 * nto-low.h: Rename include guard.
326 * notif.h: Add include guard.
327 * mem-break.h: Rename include guard.
328 * lynx-low.h: Add include guard.
329 * linux-x86-tdesc.h: Add include guard.
330 * linux-s390-tdesc.h: Add include guard.
331 * linux-ppc-tdesc-init.h: Add include guard.
332 * linux-low.h: Add include guard.
333 * linux-aarch64-tdesc.h: Add include guard.
334 * linux-aarch32-low.h: Add include guard.
335 * inferiors.h: Rename include guard.
336 * i387-fp.h: Rename include guard.
337 * hostio.h: Rename include guard.
338 * gdbthread.h: Rename include guard.
339 * gdb_proc_service.h: Rename include guard.
340 * event-loop.h: Rename include guard.
341 * dll.h: Rename include guard.
342 * debug.h: Rename include guard.
343 * ax.h: Rename include guard.
344
956cc47c
SN
3452018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
346
347 PR gdb/23985
348 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
349 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
350
a0707f3c
TT
3512019-01-25 Tom Tromey <tom@tromey.com>
352
353 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
354
0747795c
TT
3552019-01-25 Tom Tromey <tom@tromey.com>
356
357 * win32-low.c: Fix common/ includes.
358 * win32-i386-low.c: Fix common/ includes.
359 * tracepoint.c: Fix common/ includes.
360 * thread-db.c: Fix common/ includes.
361 * target.h: Fix common/ includes.
362 * symbol.c: Fix common/ includes.
363 * spu-low.c: Fix common/ includes.
364 * server.h: Fix common/ includes.
365 * server.c: Fix common/ includes.
366 * remote-utils.c: Fix common/ includes.
367 * regcache.h: Fix common/ includes.
368 * regcache.c: Fix common/ includes.
369 * nto-x86-low.c: Fix common/ includes.
370 * notif.h: Fix common/ includes.
371 * mem-break.h: Fix common/ includes.
372 * lynx-low.c: Fix common/ includes.
373 * lynx-i386-low.c: Fix common/ includes.
374 * linux-x86-tdesc-selftest.c: Fix common/ includes.
375 * linux-x86-low.c: Fix common/ includes.
376 * linux-low.c: Fix common/ includes.
377 * inferiors.h: Fix common/ includes.
378 * i387-fp.c: Fix common/ includes.
379 * hostio.c: Fix common/ includes.
380 * hostio-errno.c: Fix common/ includes.
381 * gdbthread.h: Fix common/ includes.
382 * gdbreplay.c: Fix common/ includes.
383 * fork-child.c: Fix common/ includes.
384 * event-loop.c: Fix common/ includes.
385 * ax.c:
386 (enum gdb_agent_op): Fix common/ includes.
387
be6d4f74
TT
3882019-01-21 Tom Tromey <tom@tromey.com>
389
390 * tracepoint.c: Fix includes.
391 * remote-utils.c: Fix includes.
392 * linux-x86-low.c: Fix includes.
393
66d91b39
JB
3942019-01-01 Joel Brobecker <brobecker@adacore.com>
395
396 * gdbreplay.c (gdbreplay_version): Update copyright year in
397 version message.
398 * server.c (gdbserver_version): Likewise.
399
754e3168
AH
4002018-12-05 Alan Hayward <alan.hayward@arm.com>
401
402 * linux-low.c (add_lwp): Switch ordering.
403
d105de22
TT
4042018-11-29 Tom Tromey <tom@tromey.com>
405
406 * win32-low.c (win32_join): Take pid, not process.
407 * target.h (struct target_ops) <join>: Change argument type.
408 (join_inferior): Change argument name.
409 * spu-low.c (spu_join): Take pid, not process.
410 * server.c (handle_detach): Preserve pid before destroying
411 process.
412 * lynx-low.c (lynx_join): Take pid, not process.
413 * linux-low.c (linux_join): Take pid, not process.
414
50138245
AH
4152018-11-23 Alan Hayward <alan.hayward@arm.com>
416
417 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
418 (aarch64_cannot_fetch_register): Likewise.
419 (struct linux_target_ops): Update references.
420
64f57f3d
PFC
4212018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
422
423 * linux-ppc-low.c: Include nat/linux-ptrace.h.
424
8d619c01
EBM
4252018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
426
427 * configure.srv (ipa_ppc_linux_regobj): Add
428 powerpc-isa207-htm-vsx32l-ipa.o and
429 powerpc-isa207-htm-vsx64l-ipa.o.
430 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
431 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
432 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
433 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
434 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
435 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
436 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
437 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
438 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
439 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
440 (init_registers_powerpc_isa207_htm_vsx32l)
441 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
442 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
443 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
444 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
445 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
446 (ppc_store_tm_ctarregset): New functions.
447 (ppc_regsets): Add entries for HTM regsets.
448 (ppc_arch_setup): Set htm in features struct when needed. Set
449 sizes for the HTM regsets.
450 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
451 (initialize_low_arch): Call
452 init_registers_powerpc_isa207_htm_vsx32l and
453 init_registers_powerpc_isa207_htm_vsx64l.
454 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
455 PPC_TDESC_ISA207_HTM_VSX.
456 (initialize_low_tracepoint): Call
457 init_registers_powerpc_isa207_htm_vsx32l and
458 init_registers_powerpc_isa207_htm_vsx64l.
459
232bfb86
EBM
4602018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
461
462 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
463 rs6000/power-linux-pmu.xml to srv_xmlfiles.
464 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
465 (ppc_store_pmuregset): New functions.
466 (ppc_regsets): Add entries for ebb and pmu regsets.
467 (ppc_arch_setup): Set isa207 in features struct if the ebb and
468 pmu regsets are available. Set sizes for these regsets.
469
f2cf6173
EBM
4702018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
471
472 * configure.srv (ipa_ppc_linux_regobj): Add
473 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
474 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
475 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
476 rs6000/powerpc-isa207-vsx32l.xml, and
477 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
478 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
479 <PPC_TDESC_ISA207_VSX>: New enum value.
480 (init_registers_powerpc_isa207_vsx32l): Declare.
481 (init_registers_powerpc_isa207_vsx64l): Declare.
482 * linux-ppc-low.c (ppc_fill_tarregset): New function.
483 (ppc_store_tarregset): New function.
484 (ppc_regsets): Add entry for the TAR regset.
485 (ppc_arch_setup): Set isa207 in features struct when needed. Set
486 size for the TAR regsets.
487 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
488 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
489 and init_registers_powerpc_isa207_vsx64l.
490 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
491 (initialize_low_tracepoint): Call
492 init_registers_powerpc_isa207_vsx32l and
493 init_registers_powerpc_isa207_vsx64l.
494
7ca18ed6
EBM
4952018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
496 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
497
498 * configure.srv (ipa_ppc_linux_regobj): Add
499 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
500 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
501 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
502 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
503 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
504 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
505 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
506 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
507 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
508 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
509 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
510 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
511 (ppc_hwcap): Add comment.
512 (ppc_hwcap2): New global.
513 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
514 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
515 (ppc_regsets): Add entries for the DSCR and PPR regsets.
516 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
517 when needed. Set sizes for the the DSCR and PPR regsets.
518 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
519 (initialize_low_arch): Call
520 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
521 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
522 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
523 PPC_TDESC_ISA205_PPR_DSCR_VSX.
524 (initialize_low_tracepoint): Call
525 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
526 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
527
5c849b22
PFC
5282018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
529
530 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
531
8ecfd7bd
SDJ
5322018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
533 Simon Marchi <simark@simark.ca>
534
535 * acinclude.m4: Include "../selftest.m4".
536 * configure: Regenerate.
537 * configure.ac: Use "GDB_AC_SELFTEST".
538 * configure.srv: Use "$enable_unittests" instead of
539 "$development" when checking whether unit tests have been
540 enabled.
541 * server.c (captured_main): Update message informing that
542 selftests have been disabled.
543
96643e35
TT
5442018-10-04 Tom Tromey <tom@tromey.com>
545
546 * configure: Rebuild.
547
da4ae14a
TT
5482018-10-04 Tom Tromey <tom@tromey.com>
549
550 * server.c (handle_status): Rename inner "thread".
551 (process_serial_event): Declare "res" in 'm' case.
552 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
553 (iterate_over_lwps): Rename inner "thread".
554 (linux_qxfer_libraries_svr4): Rename inner "len".
555 * gdbthread.h (find_thread_in_random): Rename inner "thread".
556
7c619dbd
GB
5572018-10-01 Gary Benson <gbenson@redhat.com>
558
559 * gdb_proc_service.h: Moved common code to
560 common/gdb_proc_service.h.
561
3795e814
GB
5622018-10-01 Gary Benson <gbenson@redhat.com>
563
564 * gdb_proc_service.h: Synchronize comments and whitespace with
565 GDB's version of this file.
566
49b036f1
TT
5672018-09-25 Tom Tromey <tom@tromey.com>
568
569 * configure: Rebuild.
570 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
571
8ff03f0b
SM
5722018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
573
574 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
575 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
576 ($(IPA_LIB)): Sort IPA_OBJS.
577
a1cd91dc
SM
5782018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
579
580 * Makefile.in: Remove references to $(ADD_DEPS).
581
752312ba
TT
5822018-09-16 Tom Tromey <tom@tromey.com>
583
584 * remote-utils.c (remote_open): Use GNU style for metasyntactic
585 variables.
586 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
587 variables.
588
f1628857
TT
5892018-09-05 Tom Tromey <tom@tromey.com>
590
591 * configure: Rebuild.
592
ad202fcc
SM
5932018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
594
595 PR build/23399
596 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
597
d3d8724a
TT
5982018-08-27 Tom Tromey <tom@tromey.com>
599
600 PR build/23087:
601 * configure: Rebuild.
602
b4f183d2
TT
6032018-08-27 Tom Tromey <tom@tromey.com>
604
605 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
606 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
607 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
608 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
609 (s390x_emit_stack_adjust): Add casts to unsigned char.
610
4e2aa472
SM
6112018-08-22 Simon Marchi <simon.marchi@ericsson.com>
612
613 PR gdb/23374
614 PR gdb/23375
615 * server.h (struct client_state) <disable_randomization>:
616 Initialize to 1.
617
cf4088a9
SM
6182018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
619
620 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
621 variable.
622 (mips_supply_ptrace_register): Likewise.
623
a0de763e
TT
6242018-07-22 Tom Tromey <tom@tromey.com>
625
626 * configure: Rebuild.
627
b0a7723d
TT
6282018-07-22 Tom Tromey <tom@tromey.com>
629
630 * win32-low.c (win32_create_inferior): Remove unused variables.
631 * gdbreplay.c (remote_open): Remove unused variable.
632 * remote-utils.c (remote_prepare): Remove unused variable.
633 * x86-tdesc.h (X86_TDESC_H): Define.
634 (amd64_expedite_regs): Define conditionally.
635 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
636 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
637 * remote-utils.c (readchar): Remove unused variable.
638
a780ef4f
PA
6392018-07-13 Pedro Alves <palves@redhat.com>
640
641 * linux-low.c (linux_kill): Change parameter to process_info
642 pointer instead of pid. Adjust.
643 * lynx-low.c (lynx_kill): Likewise.
644 * nto-low.c (nto_kill): Likewise.
645 * spu-low.c (spu_kill): Likewise.
646 * win32-low.c (win32_kill): Likewise.
647 * server.c (handle_v_kill, kill_inferior_callback)
648 (detach_or_kill_for_exit): Adjust.
649 * target.c (kill_inferior): Change parameter to process_info
650 pointer instead of pid. Adjust.
651 * target.h (struct target_ops) <kill>: Change parameter to
652 process_info pointer instead of pid. Adjust all implementations
653 and callers.
654 (kill_inferior): Likewise.
655
ef2ddb33
PA
6562018-07-13 Pedro Alves <palves@redhat.com>
657
658 * linux-low.c (linux_detach, linux_join): Change parameter to
659 process_info pointer instead of pid. Adjust.
660 * lynx-low.c (lynx_detach, lynx_join): Likewise.
661 * nto-low.c (nto_detach): Likewise.
662 * spu-low.c (spu_detach, spu_join): Likewise.
663 * win32-low.c (win32_detach, win32_join): Likewise.
664 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
665 * target.h (struct target_ops) <detach, join>: Change parameter to
666 process_info pointer instead of pid. Adjust all implementations
667 and callers.
668 (detach_inferior, join_inferior): Rename 'pid' parameter to
669 'proc'.
670
c7ab0aef
SDJ
6712018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
672 Jan Kratochvil <jan.kratochvil@redhat.com>
673 Paul Fertser <fercerpav@gmail.com>
674 Tsutomu Seki <sekiriki@gmail.com>
675
676 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
677 (OBS): Add 'common/netstuff.o'.
678 (GDBREPLAY_OBS): Likewise.
679 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
680 (remote_open): Implement support for IPv6
681 connections.
682 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
683 and 'wspiapi.h'.
684 (handle_accept_event): Accept connections from IPv6 sources.
685 (remote_prepare): Handle IPv6-style hostnames; implement
686 support for IPv6 connections.
687 (remote_open): Implement support for printing connections from
688 IPv6 sources.
689
31445d10
PA
6902018-07-11 Pedro Alves <palves@redhat.com>
691
692 PR gdb/23377
693 * mem-break.c (any_persistent_commands): Add process_info
694 parameter and use it instead of relying on the current process.
695 Change return type to bool.
696 * mem-break.h (any_persistent_commands): Add process_info
697 parameter and change return type to bool.
698 * server.c (handle_detach): Remove require_running_or_return call.
699 Look up the process_info for the process we're about to detach.
700 If not found, return back error to GDB. Adjust
701 any_persistent_commands call to pass down a process pointer.
702
cb197132
PA
7032018-07-11 Pedro Alves <palves@redhat.com>
704
705 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
706 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
707 instead of collect_register_by_name.
708 * regcache.c (regcache_raw_get_unsigned_by_name): New.
709 * regcache.h (regcache_raw_get_unsigned_by_name): New.
710
1b919490
VB
7112018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
712 Pedro Alves <palves@redhat.com>
713
714 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
715
d7e15655
TT
7162018-07-03 Tom Tromey <tom@tromey.com>
717
718 * linux-low.c: Update.
719 * lynx-low.c: Update.
720 * mem-break.c: Update.
721 * nto-low.c: Update.
722 * remote-utils.c: Update.
723 * server.c: Update.
724 * spu-low.c: Update.
725 * target.c: Update.
726 * win32-low.c: Update.
727
26a57c92
TT
7282018-07-03 Tom Tromey <tom@tromey.com>
729
730 * server.c: Update.
731
0e998d96
TT
7322018-07-03 Tom Tromey <tom@tromey.com>
733
734 * linux-low.c: Update.
735
cc6bcb54
TT
7362018-07-03 Tom Tromey <tom@tromey.com>
737
738 * target.c: Update.
739
e38504b3
TT
7402018-07-03 Tom Tromey <tom@tromey.com>
741
742 * linux-low.c: Update.
743 * linux-mips-low.c: Update.
744 * lynx-low.c: Update.
745 * nto-low.c: Update.
746 * remote-utils.c: Update.
747 * server.c: Update.
748 * spu-low.c: Update.
749 * target.c: Update.
750 * thread-db.c: Update.
751
e99b03dc
TT
7522018-07-03 Tom Tromey <tom@tromey.com>
753
754 * linux-low.c: Update.
755 * linux-mips-low.c: Update.
756 * lynx-low.c: Update.
757 * mem-break.c: Update.
758 * nto-low.c: Update.
759 * remote-utils.c: Update.
760 * server.c: Update.
761 * spu-low.c: Update.
762 * target.c: Update.
763 * tracepoint.c: Update.
764
f2907e49
TT
7652018-07-03 Tom Tromey <tom@tromey.com>
766
767 * linux-low.c: Update.
768 * linux-ppc-low.c: Update.
769 * linux-x86-low.c: Update.
770 * proc-service.c: Update.
771 * server.c: Update.
772 * spu-low.c: Update.
773 * thread-db.c: Update.
774 * win32-low.c: Update.
775
fd79271b
TT
7762018-07-03 Tom Tromey <tom@tromey.com>
777
778 * linux-low.c: Update.
779 * lynx-low.c: Update.
780 * nto-low.c: Update.
781 * remote-utils.c: Update.
782 * spu-low.c: Update.
783 * thread-db.c: Update.
784 * win32-low.c: Update.
785
c0867626
SDJ
7862018-06-29 Joel Brobecker <brobecker@adacore.com>
787
788 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
789 parameter in call to 'amd64_create_target_description'.
790
2512d7ef
JK
7912018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
792
793 * x86-tdesc.h: Remove executable permission flag.
794
d0ac1c44
SM
7952018-06-19 Simon Marchi <simon.marchi@ericsson.com>
796
797 * configure.ac: Remove AC_PREREQ, add missing quoting.
798 * configure: Re-generate.
799 * config.in: Re-generate.
800 * aclocal.m4: Re-generate.
801
c4eb05ff
SM
8022018-06-18 Simon Marchi <simon.marchi@ericsson.com>
803
804 * tracepoint.h (current_traceframe): Remove declaration.
805
02895270
AH
8062018-06-18 Alan Hayward <alan.hayward@arm.com>
807
808 * linux-aarch64-low.c (is_sve_tdesc): New function.
809 (aarch64_sve_regs_copy_to_regcache): Likewise.
810 (aarch64_sve_regs_copy_from_regcache): Likewise.
811 (aarch64_regs_info): Add SVE checks.
812 (initialize_low_arch): Initialize SVE.
813
e9902bfc
AH
8142018-06-18 Alan Hayward <alan.hayward@arm.com>
815
816 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
817
fefa175e
AH
8182018-06-11 Alan Hayward <alan.hayward@arm.com>
819
820 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
821 (initialize_low_tracepoint): Likewise
822 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
823 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
824 param.
825 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
826 checks.
827 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
828
b91ad3ff
AH
8292018-06-11 Alan Hayward <alan.hayward@arm.com>
830
831 * server.h (PBUFSIZ): Increase size
832
f868386e
AH
8332018-06-11 Alan Hayward <alan.hayward@arm.com>
834
835 * regcache.c (regcache::raw_compare): New function.
836 * regcache.h (regcache::raw_compare): New declaration.
837
9c861883
AH
8382018-06-11 Alan Hayward <alan.hayward@arm.com>
839
840 * regcache.c (new_register_cache): Use new.
841 (free_register_cache): Use delete.
842 (register_data): Use const.
843 (supply_register): Move body inside regcache.
844 (regcache::raw_supply): New override function.
845 (collect_register): Move body inside regcache.
846 (regcache::raw_collect): New override function.
847 (regcache::get_register_status): New override function.
848 * regcache.h (struct regcache): Inherit from reg_buffer_common.
849
40591844
TT
8502018-06-09 Tom Tromey <tom@tromey.com>
851
852 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
853 declare queue.
854 (event_queue): Use std::queue.
855 (gdb_event_xfree): Remove.
856 (initialize_event_loop, process_event, wait_for_event): Update.
857
6341380d
SC
8582018-06-08 Stan Cox <scox@redhat.com>
859
860 * win32-low.c (win32_create_inferior): last_ptid and last_status
861 moved to client_state.
862
03349c93
PA
8632018-06-08 Pedro Alves <palves@redhat.com>
864
865 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
866 common/common-exceptions.o, common/common-utils.o,
867 common/errors.o, common/print-utils.o and utils.o.
868 * gdbreplay.c: Include "common-defs.h" instead of the two
869 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
870 string.h or alloca.h.
871 (perror_with_name): Delete.
872 (remote_open): Use xstrdup instead of strdup.
873 (main): Rename to ...
874 (captured_main): ... this.
875 (main): New.
876
8dcc53b3
TT
8772018-06-08 Tom Tromey <tom@tromey.com>
878
879 * linux-low.c (linux_low_read_btrace): Update.
880
c12a5089
SC
8812018-06-04 Stan Cox <scox@redhat.com>
882
883 * server.h (struct client_state): New.
884 * server.c (cont_thread, general_thread, multi_process)
885 (report_fork_events, report_vfork_events, report_exec_events)
886 (report_thread_events, swbreak_feature, hwbreak_feature)
887 (vCont_supported, disable_randomization, pass_signals)
888 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
889 Moved to client_state.
890 * remote-utils.c (remote_debug, noack_mode)
891 (transport_is_reliable): Moved to client_state.
892 * tracepoint.c (current_traceframe): Moved to client_state.
893
894 Update all callers.
895 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
896 linux-low.c, remote-utils.h, target.c: Use client_state.
897
122394f1
AH
8982018-05-31 Alan Hayward <alan.hayward@arm.com>
899
900 * configure.srv: Add new c/h file.
901
95228a0d
AH
9022018-05-31 Alan Hayward <alan.hayward@arm.com>
903
904 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
905 null VQ.
906
d8dab6c3
MR
9072018-05-25 Maciej W. Rozycki <macro@mips.com>
908
909 * gdb.arch/mips-fpregset-core.exp: New test.
910 * gdb.arch/mips-fpregset-core.c: New test source.
911
81e25b7c
EK
9122018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
913
914 PR server/23198
915 * hostio.c (require_int): Do not report overflow for integers
916 between 0xfffffff and 0x7fffffff.
917
7e947ad3
MR
9182018-05-22 Maciej W. Rozycki <macro@mips.com>
919
920 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
921 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
922 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
923 functions.
924 (the_low_target): Wire them.
925
1d75a658
PFC
9262018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
927
928 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
929 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
930 mode. Call collect_register_by_name with vscr using
931 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
932 (ppc_store_vrregset): Add and set vscr_offset variable as in
933 ppc_fill_vrregset. Call supply_register_by_name with vscr using
934 vscr_offset.
935
d078308a
PFC
9362018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
937
938 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
939 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
940 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
941
7273b5fc
PFC
9422018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
943
944 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
945 (ppc_store_vsxregset): Likewise.
946 (ppc_fill_vrregset): Likewise.
947 (ppc_store_vrregset): Likewise.
948 (ppc_fill_evrregset): Likewise.
949 (ppc_store_evrregset): Likewise.
950 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
951 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
952 needed.
953
2e077f5e
PFC
9542018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
955
956 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
957 wordsize of the inferior. Call ppc_linux_target_wordsize.
958
bd64614e
PFC
9592018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
960
961 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
962 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
963 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
964 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
965 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
966 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
967 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
968 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
969 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
970 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
971 (tdesc_powerpc_e500l): Remove.
972 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
973 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
974 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
975 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
976 linux-ppc-tdesc.h.
977 (ppc_arch_setup): Remove target description matching code. Fill a
978 ppc_linux_features struct and call ppc_linux_match_description
979 with it.
980
75d74cca
MR
9812018-05-22 Maciej W. Rozycki <macro@mips.com>
982
983 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
984 width of the requested register exceeds the width of the
985 `ptrace' data type.
986 (mips_cannot_store_register): Likewise.
987
e4439e43
MR
9882018-05-21 Maciej W. Rozycki <macro@mips.com>
989
990 * linux-mips-low.c (mips_fetch_register): New function. Update
991 preceding comment.
992 (mips_store_gregset): Supply 0 rather than $restart for $zero.
993 (the_low_target): Wire `mips_fetch_register'.
994
55271bf9
JB
9952018-05-10 Joel Brobecker <brobecker@adacore.com>
996
997 * lynx-i386-low.c (LYNXOS_178): New macro.
998 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
999 the layout on LynxOS-178.
1000 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1001 handle floating point registers that are not supported by
1002 LynxOS-178.
1003
1a34f210
TT
10042018-05-10 Tom Tromey <tom@tromey.com>
1005
1006 * configure: Rebuild.
1007
190852c8
JB
10082018-05-10 Joel Brobecker <brobecker@adacore.com>
1009
1010 PR server/23158:
1011 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1012 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1013 Use it to set the expedite_regs field in the given tdesc.
1014 * x86-tdesc.h: New file.
1015 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1016 Adjust following the addition of the new expedite_regs parameter
1017 to init_target_desc.
1018 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1019 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1020 (i386_linux_read_description, amd64_linux_read_description):
1021 Adjust following the addition of the new expedite_regs parameter
1022 to init_target_desc.
1023 * lynx-i386-low.c: #include "x86-tdesc.h".
1024 (lynx_i386_arch_setup): Adjust following the addition of the new
1025 expedite_regs parameter to init_target_desc.
1026 * nto-x86-low.c: #include "x86-tdesc.h".
1027 (nto_x86_arch_setup): Adjust following the addition of the new
1028 expedite_regs parameter to init_target_desc.
1029 * win32-i386-low.c: #include "x86-tdesc.h".
1030 (i386_arch_setup): Adjust following the addition of the new
1031 expedite_regs parameter to init_target_desc.
1032
7dbac825
JB
10332018-05-10 Joel Brobecker <brobecker@adacore.com>
1034
1035 PR server/23158:
1036 * win32-low.c (win32_create_inferior): Add call to my_wait
1037 setting last_status global.
1038
906994d9
JB
10392018-05-10 Joel Brobecker <brobecker@adacore.com>
1040
1041 PR server/23158:
1042 * win32-low.c (create_process): Only call gdb_tilde_expand if
1043 inferior_cwd is not NULL.
1044
8ee22052
AB
10452018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1046
1047 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1048 registers to the cache if their values have changed.
1049 (i387_xsave_to_cache): Provide default values for x87 control
1050 registers when these features are available, but disabled.
1051 * regcache.c (supply_register_by_name_zeroed): New function.
1052 * regcache.h (supply_register_by_name_zeroed): Declare new
1053 function.
1054
aff689d3
TT
10552018-05-07 Tom Tromey <tom@tromey.com>
1056
1057 * configure: Rebuild.
1058
85e26832
TT
10592018-05-04 Tom Tromey <tom@tromey.com>
1060
1061 * configure: Rebuild.
1062
a3b60e45
JK
10632018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1064 Pedro Alves <palves@redhat.com>
1065
1066 * linux-aarch64-low.c (aarch64_stopped_data_address):
1067 Likewise.
1068
632e107b
TT
10692018-04-27 Tom Tromey <tom@tromey.com>
1070
1071 * configure: Rebuild.
1072
458412c3
TT
10732018-04-23 Tom Tromey <tom@tromey.com>
1074
1075 * configure: Rebuild.
1076
f31c089e
SM
10772018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1078
1079 * Makefile.in (depcomp): Add "..".
1080 (all_deps_files): New and use it.
1081
b319b098
AH
10822018-04-18 Alan Hayward <alan.hayward@arm.com>
1083
1084 * configure.srv (aarch64*-*-linux*): Don't include xml.
1085 (i[34567]86-*-cygwin*): Likewise.
1086 (i[34567]86-*-linux*): Likewise.
1087 (i[34567]86-*-lynxos*): Likewise.
1088 (i[34567]86-*-mingw32ce*): Likewise.
1089 (i[34567]86-*-mingw*): Likewise.
1090 (i[34567]86-*-nto*): Likewise.
1091 (tic6x-*-uclinux): Likewise.
1092 (x86_64-*-linux*): Likewise.
1093 (x86_64-*-mingw*): Likewise.
1094 (x86_64-*-cygwin*): Likewise.
1095
3b74854b
AH
10962018-04-18 Alan Hayward <alan.hayward@arm.com>
1097
1098 * tdesc.c: Remove xml parameter.
1099
e98577a9
AH
11002018-04-18 Alan Hayward <alan.hayward@arm.com>
1101
1102 * server.c (get_features_xml): Remove cast.
1103 * tdesc.c (void target_desc::accept): Fill in function.
1104 (tdesc_get_features_xml): Remove old xml creation.
1105 (print_xml_feature::visit_pre): Add xml vistor.
1106 * tdesc.h (struct target_desc): Make xmltarget mutable.
1107 (tdesc_get_features_xml): Remove declaration.
1108
d278f585
AH
11092018-04-18 Alan Hayward <alan.hayward@arm.com>
1110
1111 * tdesc.c (tdesc_architecture_name): Add new function.
1112 (tdesc_osabi_name): Likewise.
1113 (tdesc_get_features_xml): Use new functions.
1114
eee8a18d
AH
11152018-04-18 Alan Hayward <alan.hayward@arm.com>
1116
1117 * tdesc.c (tdesc_create_flags): Remove.
1118 (tdesc_add_flag): Likewise.
1119 (tdesc_named_type): Likewise.
1120 (tdesc_create_union): Likewise.
1121 (tdesc_create_struct): Likewise.
1122 (tdesc_create_vector): Likewise.
1123 (tdesc_add_bitfield): Likewise.
1124 (tdesc_add_field): Likewise.
1125 (tdesc_set_struct_size): Likewise.
1126
82ec9bc7
AH
11272018-04-18 Alan Hayward <alan.hayward@arm.com>
1128
1129 * tdesc.c (~target_desc): Remove implictly deleted items.
1130 (init_target_desc): Iterate all features.
1131 (tdesc_get_features_xml): Use vector.
1132 (tdesc_create_feature): Create feature.
1133 * tdesc.h (tdesc_feature) Remove
1134 (target_desc): Add features.
1135
ea3e7d71
AH
11362018-04-18 Alan Hayward <alan.hayward@arm.com>
1137
1138 * Makefile.in: Add common/tdesc.c
1139 * tdesc.c (init_target_desc): init all reg_defs from register
1140 vector.
1141 (tdesc_create_reg): Create tdesc_reg.
1142 * tdesc.h (tdesc_feature): Add register vector.
1143
17d08cd4
SM
11442018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1145
1146 * tdesc.h (struct target_desc) <features>: Change type to
1147 std::vector<std::string>.
1148 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1149 changes.
1150 (tdesc_get_features_xml): Likewise.
1151 (tdesc_create_feature): Likewise.
1152
5cd3e386
AH
11532018-03-26 Alan Hayward <alan.hayward@arm.com>
1154
1155 * regcache.c (find_register_by_number): Return a ref.
1156 (find_regno): Use references.
1157 (register_size): Likewise.
1158 (register_data): Likewise.
1159 * tdesc.c (target_desc::~target_desc): Remove free calls.
1160 (target_desc::operator==): Use std::vector compare.
1161 (init_target_desc): Use reference.
1162 (tdesc_create_reg): Use reg constructors.
1163 * tdesc.h (struct target_desc): Replace pointer with object.
1164
dff7492c
AH
11652018-03-23 Alan Hayward <alan.hayward@arm.com>
1166
1167 * regcache.c (find_register_by_number): Make static.
1168 (find_regno): Use find_register_by_number
1169 * regcache.h (struct reg): Remove declaration.
1170
d80e5242
AH
11712018-03-23 Alan Hayward <alan.hayward@arm.com>
1172
1173 * tdesc.c (target_desc::~target_desc): Move to here.
1174 (target_desc::operator==): Likewise.
1175 * tdesc.h (target_desc::~target_desc): Move from here.
1176 (target_desc::operator==): Likewise.
1177
f69c5afb
AA
11782018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1179
1180 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1181
ce29f843
AA
11822018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1183
1184 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1185 S390_TDESC_GS.
1186 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1187 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1188 and init_registers_s390_gs_linux64.
1189
c49bd90b
AA
11902018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1191
1192 * linux-s390-low.c (s390_fill_gs): Remove function.
1193 (s390_fill_gsbc): Remove function.
1194 (s390_regsets): Set fill functions for the guarded storage regsets
1195 to NULL.
1196
7edb9bd3
AA
11972018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1198
1199 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1200 the word size. Add comment.
1201 (s390_get_wordsize): New function.
1202 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1203 pswm with it. Instead, use s390_get_wordsize to determine the
1204 word size first and derive the correct tdesc from that directly.
1205
39be3c7e
SM
12062018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1207
1208 * Makefile.in: Include silent-rules.mk.
1209 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1210 (COMPILE): Add ECHO_CXX.
1211 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1212 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1213 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1214 (version-generated.c): Add ECHO_GEN.
1215 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1216 (IPAGENT_COMPILE): Add ECHO_CXX.
1217 (%-generated.c): Add ECHO_REGDAT.
1218
3ae9ce5d
TT
12192018-03-14 Tom Tromey <tom@tromey.com>
1220
1221 PR cli/14977:
1222 * ax.c (ax_printf): Special case for NULL.
1223
e6a58aa8
SM
12242018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1225
1226 * linux-low.c (linux_qxfer_libraries_svr4): Use
1227 xml_escape_text_append.
1228
f6e8a41e
SM
12292018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1230
1231 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1232
b9671caf
SM
12332018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1234
1235 * server.c (handle_general_set): Remove unnecessary xstrdup.
1236
e80aaf61
SM
12372018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1238
1239 * server.c (parse_debug_format_options): Adjust to
1240 delim_string_to_char_ptr_vec changes.
1241 * thread-db.c (thread_db_load_search): Adjust to
1242 dirnames_to_char_ptr_vec changes.
1243
b1223e78
MM
12442018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1245
1246 * target.h (target_enable_btrace, target_disable_btrace)
1247 (target_read_btrace, target_read_btrace_conf): Turn macro into
1248 inline function. Throw error if target method is not defined.
1249 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1250 check for btrace target method. Be prepared to handle exceptions
1251 from btrace target methods.
1252
81561546
SDJ
12532018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1254
1255 * server.c (captured_main): Change order of error message printed
1256 when the current working directory cannot be found.
1257
25e3c82c
SDJ
12582018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1259
1260 * server.c: Include "filenames.h" and "pathstuff.h".
1261 (program_name): Delete variable.
1262 (program_path): New anonymous class.
1263 (get_exec_wrapper): Use "program_path" instead of
1264 "program_name".
1265 (handle_v_run): Likewise.
1266 (captured_main): Likewise.
1267 (process_serial_event): Likewise.
1268
b4987c95
SDJ
12692018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1270
1271 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1272 (OBJS): Add "pathstuff.o".
1273 * server.c (current_directory): New global variable.
1274 (captured_main): Initialize "current_directory".
1275
f46cd62a
AH
12762018-02-26 Alan Hayward <alan.hayward@arm.com>
1277
1278 * tdesc.c: Use common/tdesc.h.
1279 * tdesc.h: Likewise.
1280
a543c5ca
AH
12812018-02-20 Alan Hayward <alan.hayward@arm.com>
1282 Simon Marchi <simon.marchi@ericsson.com>
1283
1284 * Makefile.in: Switch order of make rules.
1285
b5884fa7
AH
12862018-02-19 Alan Hayward <alan.hayward@arm.com>
1287
1288 * Makefile.in: Add common directory in build.
1289 * configure.ac: Add common reference.
1290 * configure: Regenerate.
1291
de6242d3
MM
12922018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1293
1294 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1295 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1296 * spu-low.c (spu_target_ops): Likewise.
1297 * win32-low.c (win32_target_ops): Likewise.
1298 * server.c (supported_btrace_packets): Report packets unconditionally.
1299 * target.h (target_ops) <supports_btrace>: Remove.
1300 (target_supports_btrace): Remove.
1301
9ee23a85
MM
13022018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1303
1304 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1305 (handle_btrace_disable): Change return type to void. Use exceptions
1306 to report errors.
1307 (handle_btrace_general_set): Catch exception and copy message to
1308 return message.
1309
8ce47547
TT
13102018-02-08 Tom Tromey <tom@tromey.com>
1311
1312 * linux-low.c (install_software_single_step_breakpoints): Use
1313 make_scoped_restore.
1314 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1315 (do_restore_current_thread_cleanup): Remove.
1316 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1317 declare.
1318
45dd3607
TT
13192018-02-08 Tom Tromey <tom@tromey.com>
1320
1321 * mem-break.c (set_raw_breakpoint_at): Use
1322 gdb::unique_xmalloc_ptr.
1323
e671cd59
PA
13242018-01-30 Pedro Alves <palves@redhat.com>
1325
1326 PR gdb/13211
1327 * target.c (target_terminal::terminal_state): Rename to ...
1328 (target_terminal::m_terminal_state): ... this.
1329
a0aad537
JC
13302018-01-19 James Clarke <jrtc27@jrtc27.com>
1331
1332 * linux-low.c (handle_extended_wait): Surround call to
1333 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1334
4d9b86e1
SM
13352018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1336
1337 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1338 linux_ptrace_attach_fail_reason_string now returning an
1339 std::string.
1340 (linux_attach): Likewise.
1341 * thread-db.c (attach_thread): Likewise.
1342
f517c180
EA
13432018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1344
1345 PR gdb/21559
1346 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1347 checking for fs_base/gs_base fields in struct user_regs_struct.
1348 * configure: Regenerate.
1349
9a70f35c
YQ
13502018-01-16 Yao Qi <yao.qi@linaro.org>
1351
1352 PR gdb/18749
1353 * linux-low.c (fetch_register): Call supply_register instead of
1354 error.
1355
605fd3c6
YQ
13562018-01-08 Yao Qi <yao.qi@linaro.org>
1357 Simon Marchi <simon.marchi@ericsson.com>
1358
1359 * Makefile.in (OBS): Remove selftest.o.
1360 * configure.ac: Set srv_selftest_objs if $development is true.
1361 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1362 * configure: Re-generated.
1363 * server.c (captured_main): Wrap variable selftest_filter with
1364 GDB_SELF_TEST.
1365
2cc05030
SM
13662018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1367
1368 * server.c (parse_debug_format_options): Return std::string.
1369 (handle_monitor_command, captured_main): Adjust.
1370
e379cee6
PA
13712018-01-05 Pedro Alves <palves@redhat.com>
1372
1373 PR gdb/18653
1374 * server.c (captured_main): Pass quiet=false to
1375 save_original_signals_state.
1376
82e1e79a
JB
13772018-01-01 Joel Brobecker <brobecker@adacore.com>
1378
1379 * gdbreplay.c (gdbreplay_version): Update copyright year in
1380 version message.
1381 * server.c (gdbserver_version): Likewise.
1382
8e481c3b
TT
13832017-12-08 Tom Tromey <tom@tromey.com>
1384
1385 * ax.c (ax_printf): Update.
1386
a8806230
YQ
13872017-12-07 Yao Qi <yao.qi@linaro.org>
1388
1389 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1390 aarch64_linux_read_description.
1391 * linux-amd64-ipa.c (idx2mask): New array.
1392 (get_ipa_tdesc): Move idx2mask out.
1393 (initialize_low_tracepoint): Initialize target descriptions.
1394 * linux-i386-ipa.c (idx2mask): New array.
1395 (get_ipa_tdesc): Move idx2mask out.
1396 (initialize_low_tracepoint): Initialize target descriptions.
1397
d4a0e8b5
SM
13982017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1399
1400 * tdesc.c (struct tdesc_type): Change return type.
1401 (tdesc_add_flag): Change parameter type.
1402 (tdesc_add_bitfield): Likewise.
1403 (tdesc_add_field): Likewise.
1404 (tdesc_set_struct_size): Likewise.
1405
798a7429
SM
14062017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1407
1408 * regcache.c (registers_to_string): Remove unused variable.
1409
c0e15c9b
SM
14102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * inferiors.c (for_each_inferior_with_data): Remove.
1413 * inferiors.h (for_each_inferior_with_data): Remove.
1414 * server.c (handle_qxfer_threads_worker): Change parameter type.
1415 (handle_qxfer_threads_proper): Use for_each_thread.
1416
f0045347
SM
14172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1418
1419 * inferiors.c (for_each_inferior): Remove.
1420 (clear_inferiors): Use for_each_thread.
1421 * inferiors.h (for_each_inferior): Remove.
1422 * linux-low.c (linux_wait_for_event_filtered): Use
1423 for_each_thread.
1424 (linux_stabilize_threads): Likewise.
1425 * regcache.c (regcache_release): Likewise.
1426 * server.c (gdb_wants_all_threads_stopped): Likewise.
1427 (clear_pending_status_callback): Remove.
1428 (handle_status): Use for_each_thread.
1429 (captured_main): Likewise.
1430 * win32-low.c (child_init_thread_list): Likewise.
1431 (win32_clear_inferiors): Likewise.
1432 (fake_breakpoint_event): Likewise.
1433
9521758b
SM
14342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1435
1436 * inferiors.h (find_inferior): Remove.
1437 * inferiors.c (find_inferior): Remove.
1438
8f86d7aa
SM
14392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1440
1441 * linux-low.c (resume_status_pending_p): Update comment.
1442 (need_step_over_p): Update comment.
1443
e2b44075
SM
14442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1445
1446 * linux-low.c (proceed_one_lwp): Return void, change parameter
1447 type.
1448 (unsuspend_and_proceed_one_lwp): Likewise.
1449 (proceed_all_lwps): Use for_each_thread.
1450 (unstop_all_lwps): Likewise.
1451
c80825ff
SM
14522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1453
1454 * linux-low.c (linux_resume_one_thread): Return void, take
1455 parameter directly.
1456 (linux_resume): Use for_each_thread.
1457
df3e4dbe
SM
14582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1459
1460 * linux-low.c (send_sigstop_callback): Return void, change
1461 parameter type. Rename to...
1462 (send_sigstop): ... this.
1463 (suspend_and_send_sigstop_callback): Return void, change parameter
1464 type. Rename to...
1465 (suspend_and_send_sigstop): ... this.
1466 (stop_all_lwps): Use for_each_thread.
1467
5a6b0a41
SM
14682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1469
1470 * linux-low.c (lwp_running): Return bool, remove unused
1471 argument.
1472 (linux_stabilize_threads): Use find_thread.
1473
39a64da5
SM
14742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1475
1476 * linux-low.c (select_singlestep_lwp_callback): Remove.
1477 (count_events_callback): Remove.
1478 (select_event_lwp_callback): Remove.
1479 (select_event_lwp): Use find_thread/for_each_thread.
1480
a1385b7b
SM
14812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1482
1483 * linux-low.c (not_stopped_callback): Return bool, take filter
1484 argument directly.
1485 (linux_wait_for_event_filtered): Use find_thread.
1486 (linux_wait_1): Likewise.
1487
454296a2
SM
14882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1489
1490 * linux-low.c (same_lwp): Remove.
1491 (find_lwp_pid): Use find_thread.
1492
6b2a85da
SM
14932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1494
1495 * linux-low.c (delete_lwp_callback): Remove.
1496 (linux_mourn): Use for_each_thread.
1497
798a38e8
SM
14982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1499
1500 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1501 args parameter, don't check for pid.
1502 (linux_detach): Use for_each_thread.
1503
e4eb0dec
SM
15042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1505
1506 * linux-low.c (struct counter): Remove.
1507 (second_thread_of_pid_p): Remove.
1508 (last_thread_of_process_p): Use find_thread.
1509
83e1b6c1
SM
15102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1511
1512 * inferiors.c (find_inferior_in_random): Remove.
1513 * inferiors.h (find_inferior_in_random): Remove.
1514 * linux-low.c (status_pending_p_callback): Return bool, accept
1515 parameter ptid directly.
1516 (linux_wait_for_event_filtered): Use find_thread_in_random.
1517 (linux_wait_1): Likewise.
1518
8dc7b443
SM
15192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1520
1521 * inferiors.c (find_inferior_id): Remove.
1522 (find_thread_ptid): Move implemention from find_inferior_id to
1523 here.
1524 * inferiors.h (find_inferior_id): Remove.
1525 * server.c (handle_status): Use find_thread_ptid.
1526 (process_serial_event): Likewise.
1527 * thread-db.c (find_one_thread): Likewise.
1528 (thread_db_thread_handle): Likewise.
1529 * win32-low.c (thread_rec): Likewise.
1530 (child_delete_thread): Likewise.
1531 (win32_thread_alive): Likewise.
1532 (get_child_debug_event): Likewise.
1533
da25033c
SM
15342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1535
1536 * linux-mips-low.c (update_watch_registers_callback): Return
1537 void, remove pid_p parameter, don't check for pid.
1538 (mips_insert_point, mips_remove_point): Use for_each_thread.
1539
c91bb56b
SM
15402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1541
1542 * lynx.low (lynx_delete_thread_callback): Remove.
1543 (lynx_mourn): Use for_each_thread.
1544
634a3254
SM
15452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1546
1547 * regcache.c (regcache_invalidate_one): Remove.
1548 (regcache_invalidate_pid): use for_each_thread.
1549
41272101
TT
15502017-11-26 Tom Tromey <tom@tromey.com>
1551
1552 * linux-low.c (linux_create_inferior): Update.
1553
f5291a6f
UW
15542017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1555
1556 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1557
6654d750
AH
15582017-11-24 Alan Hayward <alan.hayward@arm.com>
1559
1560 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
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
15652017-11-24 Alan Hayward <alan.hayward@arm.com>
1566
1567 * configure.srv: Add new file.
1568 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1569 * linux-aarch64-tdesc-selftest.c: New file.
1570 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1571
49bdb7ee
AH
15722017-11-24 Alan Hayward <alan.hayward@arm.com>
1573
1574 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1575 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1576 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1577
d6d7ce56
AH
15782017-11-24 Alan Hayward <alan.hayward@arm.com>
1579
1580 * configure.srv: Add new files.
1581 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1582 aarch64_linux_read_description.
1583 * linux-aarch64-low.c (aarch64_linux_read_description):
1584 Merge with aarch64_arch_setup.
1585 (aarch64_arch_setup): Call aarch64_linux_read_description.
1586 * linux-aarch64-tdesc.c: New file.
1587 * linux-aarch64-tdesc.h: New file.
1588
506fe5f4
YQ
15892017-11-24 Yao Qi <yao.qi@linaro.org>
1590
1591 * configure.srv: Set $srv_regobj for tic6x-linux.
1592 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1593 (tic6x_read_description): Move some code to tic6x_arch_setup.
1594 (tic6x_tdesc_test): New function.
1595 (initialize_low_arch): Call selftests::register_test.
1596
29f9a567
YQ
15972017-11-22 Yao Qi <yao.qi@linaro.org>
1598
1599 * remote-utils.c (prepare_resume_reply): Use memcpy.
1600
578290ec
SM
16012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1602
1603 * linux-low.c (kill_one_lwp_callback): Return void, take
1604 argument directly, don't filter on pid.
1605 (linux_kill): Use for_each_thread.
1606
eca55aec
SM
16072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1608
1609 * linux-low.c (need_step_over_p): Return bool, remove dummy
1610 argument.
1611 (linux_resume, proceed_all_lwps): Use find_thread.
1612
25c28b4d
SM
16132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1614
1615 * linux-low.c (resume_status_pending_p): Return bool, remove
1616 flag_p argument.
1617 (linux_resume): Use find_thread.
1618
5fdda392
SM
16192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1620
1621 * linux-low.c (struct thread_resume_array): Remove.
1622 (linux_set_resume_request): Return void, take arguments
1623 directly.
1624 (linux_resume): Use for_each_thread.
1625
fcb056a5
SM
16262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1627
1628 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1629 return bool, remove data argument.
1630 (linux_stabilize_threads): Use find_thread.
1631
139720c5
SM
16322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1633
1634 * linux-low.c (unsuspend_one_lwp): Remove.
1635 (unsuspend_all_lwps): Use for_each_thread, inline code from
1636 unsuspend_one_lwp.
1637
6d1e5673
SM
16382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1639
1640 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1641 * linux-low.c (struct iterate_over_lwps_args): Remove.
1642 (iterate_over_lwps_filter): Remove.
1643 (iterate_over_lwps): Use find_thread.
1644
bbf550d5
SM
16452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1646
1647 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1648 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1649 code from reset_lwp_ptrace_options_callback.
1650
00192f77
SM
16512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1652
1653 * linux-arm-low.c (struct update_registers_data): Remove.
1654 (update_registers_callback): Return void, take arguments
1655 directly, don't check thread's pid.
1656 (arm_insert_point, arm_remove_point): Use for_each_thread.
1657
2bee2b6c
SM
16582017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1659
1660 * win32-low.c (continue_one_thread): Return void, take argument
1661 directly.
1662 (child_continue): Use for_each_thread.
1663
0b360f19
SM
16642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1665
1666 * win32-i386-low.c (update_debug_registers_callback): Rename
1667 to ...
1668 (update_debug_registers): ... this, return void, remove pid_p arg.
1669 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1670
f27866ba
SM
16712017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1672
1673 * inferiors.h (struct process_info): Add constructor, initialize
1674 fields..
1675 <syscalls_to_catch>: Change type to std::vector<int>.
1676 * inferiors.c (add_process): Allocate process_info with new.
1677 (remove_process): Free process_info with delete.
1678 * linux-low.c (handle_extended_wait): Adjust.
1679 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1680 * server.c (handle_general_set): Adjust.
1681
e849ea89
PA
16822017-11-16 Pedro Alves <palves@redhat.com>
1683
1684 * remote-utils.c (remote_close): Block SIGIO signals instead of
1685 uninstalling the SIGIO handler.
1686
1d0aa65c
AH
16872017-11-16 Alan Hayward <alan.hayward@arm.com>
1688
1689 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1690
3491a34c
YQ
16912017-11-16 Yao Qi <yao.qi@linaro.org>
1692
1693 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1694 (tic6x_store_gregset): Likewise.
1695 (tic6x_usrregs_info): Move it up.
1696
a602f924
AH
16972017-11-15 Alan Hayward <alan.hayward@arm.com>
1698
1699 * Makefile.in: Update arch rules.
1700 * configure.srv: Explicitly mark arch/ files.
1701
5616b6c3
AS
17022017-11-13 Andreas Schwab <schwab@suse.de>
1703
1704 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1705 function.
1706 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1707
d1928160
PA
17082017-11-06 Pedro Alves <palves@redhat.com>
1709
1710 * config.in, configure: Regenerate.
1711
bac608e7
SM
17122017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1713
1714 * target.c (struct thread_search): Remove.
1715 (thread_search_callback): Remove.
1716 (prepare_to_access_memory): Use for_each_thread instead of
1717 find_inferior. Inline code from thread_search_callback.
1718
eaddb425
SM
17192017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1720
1721 * server.c (struct visit_actioned_threads_data): Remove.
1722 (visit_actioned_threads): Change prototype to take arguments
1723 directly.
1724 (resume): Use find_thread instead of find_inferior.
1725
99078d34
SM
17262017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1727
1728 * server.c (queue_stop_reply_callback): Change prototype, return
1729 void.
1730 (find_status_pending_thread_callback): Remove.
1731 (handle_status): Replace find_inferior with find_thread and
1732 for_each_thread.
1733
cc628f3d
AH
17342017-10-25 Alan Hayward <alan.hayward@arm.com>
1735
1736 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1737 with REGNO.
1738 (aarch64_store_gregset): Likewise.
1739 (aarch64_fill_fpregset): Likewise.
1740 (aarch64_store_fpregset): Likewise.
1741
4d3bb80e
SM
17422017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1743
1744 * gdbthread.h (find_thread, for_each_thread): New functions.
1745 * inferiors.c (thread_of_pid): Remove.
1746 (find_any_thread_of_pid): Use find_thread.
1747 * linux-low.c (num_lwps): Use for_each_thread.
1748
7a7cdfa0
YQ
17492017-10-17 Yao Qi <yao.qi@linaro.org>
1750
1751 * Makefile.in: Remove one rule.
1752 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1753
e675d170
YQ
17542017-10-17 Yao Qi <yao.qi@linaro.org>
1755
1756 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1757 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1758
7eb4e0f9
YQ
17592017-10-17 Yao Qi <yao.qi@linaro.org>
1760
1761 * configure.srv: Rename arm.o with arch/arm.o.
1762
60d6cfc9
YQ
17632017-10-17 Yao Qi <yao.qi@linaro.org>
1764
1765 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1766 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1767 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1768 (arch-i386.o, arch-amd64.o): Remove rules.
1769 (arch/%.o): New rule.
1770 Update POSTCOMPILE and COMPILE.pre.
1771 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1772 * configure: Re-generated.
1773 * configure.srv: Replace arch-i386.o with arch/i386.o.
1774 Replace arch-amd64.o with arch/amd64.o.
1775
5bfda255
YQ
17762017-10-16 Yao Qi <yao.qi@linaro.org>
1777
1778 * configure: Regenerated.
1779
9c80ecd6
SM
17802017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1781
1782 * inferiors.h: (struct inferior_list): Remove.
1783 (struct inferior_list_entry); Remove.
1784 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1785 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1786 get_first_inferior): Remove.
1787 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1788 find_inferior_id, find_inferior_in_random): Change signature.
1789 * inferiors.c (all_threads): Change type to
1790 std::list<thread_info *>.
1791 (get_thread): Remove macro.
1792 (find_inferior, find_inferior_id): Change signature, implement
1793 using find_thread.
1794 (find_inferior_in_random): Change signature, implement using
1795 find_thread_in_random.
1796 (for_each_inferior, for_each_inferior_with_data): Change
1797 signature, implement using for_each_thread.
1798 (add_inferior_to_list, remove_inferior): Remove.
1799 (add_thread, get_first_thread, thread_of_pid,
1800 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1801 (get_first_inferior, one_inferior_p, clear_inferior_list):
1802 Remove.
1803 (clear_inferiors, get_thread_process): Update.
1804 * gdbthread.h: Include <list>.
1805 (struct thread_info) <entry>: Remove field.
1806 <id>: New field.
1807 (all_threads): Change type to std::list<thread_info *>.
1808 (get_first_inferior): Add doc.
1809 (find_thread, for_each_thread, find_thread_in_random): New
1810 functions.
1811 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1812 * linux-arm-low.c (update_registers_callback): Update.
1813 * linux-low.c (second_thread_of_pid_p): Update.
1814 (kill_one_lwp_callback, linux_detach_lwp_callback,
1815 delete_lwp_callback, status_pending_p_callback, same_lwp,
1816 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1817 iterate_over_lwps, not_stopped_callback,
1818 resume_stopped_resumed_lwps, count_events_callback,
1819 select_singlestep_lwp_callback, select_event_lwp_callback,
1820 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1821 suspend_and_send_sigstop_callback, wait_for_sigstop,
1822 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1823 lwp_running, linux_set_resume_request, resume_status_pending_p,
1824 need_step_over_p, start_step_over, linux_resume_one_thread,
1825 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1826 reset_lwp_ptrace_options_callback): Update.
1827 * linux-mips-low.c (update_watch_registers_callback): Update.
1828 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1829 Update.
1830 (free_register_cache_thread_one): Remove.
1831 (regcache_release): Update.
1832 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1833 handle_qxfer_threads_worker): Update.
1834 (handle_query): Update, use list iterator.
1835 (visit_actioned_threads, handle_pending_status,
1836 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1837 clear_pending_status_callback, set_pending_status_callback,
1838 find_status_pending_thread_callback, handle_status,
1839 process_serial_event): Update.
1840 * target.c (thread_search_callback): Update.
1841 * thread-db.c (thread_db_get_tls_address): Update.
1842 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1843 Update.
1844 * win32-i386-low.c (update_debug_registers_callback): Update.
1845 * win32-low.c (delete_thread_info, child_delete_thread,
1846 continue_one_thread, suspend_one_thread,
1847 get_child_debug_event): Adjust.
1848
9179355e
SM
18492017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1850
1851 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1852 * inferiors.h: Include <list>.
1853 (struct process_info) <entry>: Remove field.
1854 <pid>: New field.
1855 (pid_of): Change macro to function.
1856 (ptid_of, lwpid_of): Remove macro.
1857 (all_processes): Change type to std::list<process_info *>.
1858 (ALL_PROCESSES): Remove macro.
1859 (for_each_process, find_process): New function.
1860 * inferiors.c (all_processes): Change type to
1861 std::list<process_info *>.
1862 (find_thread_process): Adjust.
1863 (add_process): Likewise.
1864 (remove_process): Likewise.
1865 (find_process_pid): Likewise.
1866 (get_first_process): Likewise.
1867 (started_inferior_callback): Remove.
1868 (have_started_inferiors_p): Adjust.
1869 (attached_inferior_callback): Remove.
1870 (have_attached_inferiors_p): Adjust.
1871 * linux-low.c (check_zombie_leaders): Likewise.
1872 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1873 (x86_linux_update_xmltarget): Adjust.
1874 * server.c (handle_query): Likewise.
1875 (gdb_reattached_process): Remove.
1876 (handle_status): Adjust.
1877 (kill_inferior_callback): Likewise.
1878 (detach_or_kill_inferior): Remove.
1879 (print_started_pid): Likewise.
1880 (print_attached_pid): Likewise.
1881 (detach_or_kill_for_exit): Update.
1882 (process_serial_event): Likewise.
1883 * linux-arm-low.c (arm_new_fork): Likewise.
1884
c9cb8905
SM
18852017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1886
1887 * dll.h: Include <list>.
1888 (struct dll_info): Add constructor.
1889 <entry>: Remove field.
1890 (all_dlls): Change type to std::list<dll_info>.
1891 * dll.c: Include <algorithm>.
1892 (get_dll): Remove macro.
1893 (all_dlls): Change type to std::list<dll_info *>.
1894 (free_one_dll): Remove.
1895 (match_dll): Likewise.
1896 (loaded_dll): Adjust.
1897 (unloaded_dll): Adjust to all_dlls type change, use
1898 std::find_if. Inline code from match_dll.
1899 (clear_dlls): Adjust to all_dlls type change.
1900 * server.c (emit_dll_description): Remove.
1901 (handle_qxfer_libraries): Adjust to all_dlls type change,
1902 integrate emit_dll_description's functionality.
1903
04ec7890
SM
19042017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * linux-low.h (struct linux_target_ops) <delete_process>: New
1907 field.
1908 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1909 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1910 (struct linux_target_ops): Add delete_process callback.
1911 * linux-arm-low.c (arm_delete_process): New.
1912 (struct linux_target_ops): Add delete_process callback.
1913 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1914 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1915 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1916 * linux-mips-low.c (mips_linux_delete_process): New.
1917 (struct linux_target_ops): Add delete_process callback.
1918 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1919 * linux-s390-low.c (struct linux_target_ops): Likewise.
1920 * linux-sh-low.c (struct linux_target_ops): Likewise.
1921 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1922 * linux-tile-low.c (struct linux_target_ops): Likewise.
1923 * linux-x86-low.c (x86_linux_delete_process): New.
1924 (struct linux_target_ops): Add delete_process callback.
1925 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1926
466eecee
SM
19272017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1928
1929 * linux-aarch64-low.c (the_low_target): Add thread delete
1930 callback.
1931 * linux-arm-low.c (arm_delete_thread): New function.
1932 (the_low_target): Add thread delete callback.
1933 * linux-bfin-low.c (the_low_target): Likewise.
1934 * linux-crisv32-low.c (the_low_target): Likewise.
1935 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1936 set.
1937 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1938 field.
1939 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1940 * linux-mips-low.c (mips_linux_delete_thread): New function.
1941 (the_low_target): Add thread delete callback.
1942 * linux-ppc-low.c (the_low_target): Likewise.
1943 * linux-s390-low.c (the_low_target): Likewise.
1944 * linux-sh-low.c (the_low_target): Likewise.
1945 * linux-tic6x-low.c (the_low_target): Likewise.
1946 * linux-tile-low.c (the_low_target): Likewise.
1947 * linux-x86-low.c (the_low_target): Likewise.
1948 * linux-xtensa-low.c (the_low_target): Likewise.
1949
b79f7801
YZ
19502017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1951
1952 * win32-low.c: Include "common-inferior.h".
1953
bc3b087d
SDJ
19542017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1955
1956 * inferiors.c (set_inferior_cwd): New function.
1957 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1958 (handle_query): Inform that QSetWorkingDir is supported.
1959 * win32-low.c (create_process): Pass the inferior's cwd to
1960 CreateProcess.
1961
d092c5a2
SDJ
19622017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1963
1964 * inferiors.c (current_inferior_cwd): New global variable.
1965 (get_inferior_cwd): New function.
1966 * inferiors.h (struct process_info) <cwd>: New field.
1967
7da0a886
SDJ
19682017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1969
1970 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1971 (OBS): Add gdb_tilde_expand.o.
1972
289a6840
SM
19732017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1974
1975 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1976 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1977
256642e8
PA
19782017-09-29 Pedro Alves <palves@redhat.com>
1979
1980 * ax.c (gdb_parse_agent_expr): Constify.
1981 * ax.h (gdb_parse_agent_expr): Constify.
1982 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1983 Constify.
1984 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1985 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1986 * remote-utils.h (read_ptid): Constify.
1987 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1988 (process_point_options, process_serial_event): Constify.
1989 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1990 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1991 (cmd_qtbuffer): Constify.
1992
5b9ca4d4
PA
19932017-09-29 Pedro Alves <palves@redhat.com>
1994
1995 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1996 fails.
1997
94c207e0
PA
19982017-09-29 Pedro Alves <palves@redhat.com>
1999
2000 * linux-low.c (handle_extended_wait): Pass parent thread instead
2001 of process to thread_db_notice_clone.
2002 * linux-low.h (thread_db_notice_clone): Replace parent process
2003 parameter with parent thread parameter.
2004 * thread-db.c (find_one_thread): Add comment.
2005 (thread_db_notice_clone): Replace parent process parameter with
2006 parent thread parameter. Temporarily switch to the parent thread.
2007
75352e28
SDJ
20082017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2009
2010 * gdbthread.h: Include "common-gdbthread.h".
2011 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2012 "if" when validating the ptid.
2013 * remote-utils.c: Include "gdbthread.h".
2014 (prepare_resume_reply): Use "switch_to_thread".
2015 * target.c (done_accessing_memory): Likewise.
2016
ad339634
AA
20172017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2018
2019 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2020 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2021 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2022 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2023 s390x-gs-linux64-ipa.o to ipa_obj.
2024 * linux-s390-low.c (HWCAP_S390_GS): New define.
2025 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2026 New functions.
2027 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2028 (s390_arch_setup): Check for guarded-storage support and choose
2029 appropriate tdesc.
2030 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2031 init_registers_s390x_gs_linux64.
2032 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2033 enum value.
2034 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2035 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2036
cc4d742f
SM
20372017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2038
2039 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2040
f6327dcb
KB
20412017-09-21 Kevin Buettner <kevinb@redhat.com>
2042
2043 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2044 (thread_db_thread_handle): Declare.
2045 * linux-low.c (linux_target_ops): Initialize thread_handle.
2046 * server.c (handle_qxfer_threads_worker): Add support for
2047 "handle" attribute.
2048 * target.h (struct target_ops): Add new function pointer,
2049 thread_handle.
2050 (target_thread_handle): Define.
2051 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2052 field in lwp.
2053 (thread_db_thread_handle): New function.
2054
86299109
KB
20552017-09-21 Kevin Buettner <kevinb@redhat.com>
2056
2057 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2058 * linux-low.h (thread_db_notice_clone): Declare.
2059 * thread-db.c (thread_db_notice_clone): New function.
2060
f557a88a
PA
20612017-09-21 Pedro Alves <palves@redhat.com>
2062
2063 * server.c (gdb_read_memory, handle_status, process_serial_event)
2064 (handle_serial_event, handle_target_event): Adjust to
2065 set_desired_thread prototype change.
2066 * target.c (set_desired_thread): Remove 'use_general' parameter
2067 and adjust.
2068 * target.h (set_desired_thread): Remove 'use_general' parameter.
2069
223ffa71
TT
20702017-09-20 Tom Tromey <tom@tromey.com>
2071
2072 * target.c (target_terminal::terminal_state): Define.
2073 (target_terminal::init): Rename from target_terminal_init.
2074 (target_terminal::inferior): Rename from
2075 target_terminal_inferior.
2076 (target_terminal::ours): Rename from target_terminal_ours.
2077 (target_terminal::ours_for_output, target_terminal::info): New.
2078
04fd3ba9
SM
20792017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2080
2081 * server.c (accumulate_file_name_length): Remove.
2082 (emit_dll_description): Adjust to std::string change.
2083 (handle_qxfer_libraries): Use std::string to hold document.
2084
5e187554
SM
20852017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2086
2087 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2088 return type of xml_escape_text.
2089 * server.c (emit_dll_description): Likewise.
2090
1526853e
SM
20912017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2092
2093 * server.c (captured_main): Accept argument for --selftest.
2094 Update run_tests call.
2095 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2096 when registering selftests.
2097
c4dfafab
SDJ
20982017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2099
2100 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2101 instead of "VEC" for "target_desc.reg_defs".
2102 (regcache_cpy): Likewise.
2103 (registers_to_string): Likewise.
2104 (registers_from_string): Likewise.
2105 (find_regno): Likewise.
2106 (supply_regblock): Likewise.
2107 (regcache_raw_read_unsigned): Likewise.
2108 * tdesc.c (init_target_desc): Likewise.
2109 (tdesc_create_reg): Likewise.
2110 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2111 (struct target_desc) <reg_defs>: Convert to "std::vector".
2112 (target_desc): Do not initialize "reg_defs".
2113 (~target_desc): Update code to use "std::vector" instead of "VEC"
2114 for "target_desc.reg_defs".
2115 (operator==): Likewise.
2116
124aceb4
SM
21172017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2118
2119 * inferiors.h (thread_to_gdb_id): Remove.
2120 * inferiors.c (thread_to_gdb_id): Remove.
2121 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2122 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2123 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2124 Likewise.
2125 * nto-low.c (nto_fetch_registers, nto_store_registers,
2126 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2127
96cde54f
SM
21282017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2129
2130 * inferiors.h (gdb_id_to_thread_id): Remove.
2131 * inferiors.c (gdb_id_to_thread_id): Remove.
2132 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2133 removal. Move pid declaration closer to where it's used.
2134
e8ca139e
SM
21352017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2136
2137 * server.c (handle_detach): New function.
2138 (process_serial_event): Move code out, call handle_detach.
2139
f8a4e119
SM
21402017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2141
2142 * server.c (require_running): Rename to ...
2143 (require_running_or_return): ... this ...
2144 (require_running_or_break): ... and this.
2145 (handle_query, process_serial_event): Adjust.
2146
0eb0a407
SM
21472017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2148
2149 * linux-low.c (linux_set_resume_request): Remove unused
2150 variables.
2151
785922a5
SM
21522017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2153
2154 * server.c (first_thread_of): Remove.
2155 (process_serial_event): Replace usage of first_thread_of with
2156 find_any_thread_of_pid.
2157 * tracepoint.c (same_process_p): Remove.
2158 (gdb_agent_about_to_close): Replace usage of same_process_p with
2159 find_any_thread_of_pid.
2160 * linux-x86-low.c (same_process_callback): Remove.
2161 (x86_arch_setup_process_callback): Replace usage of
2162 same_process_callback with find_any_thread_of_pid.
2163 * thread-db.c (any_thread_of): Remove.
2164 (switch_to_process): Replace usage of any_thread_of with
2165 find_any_thread_of_pid.
2166 * inferiors.c (thread_pid_matches_callback): Remove.
2167 (find_thread_process): Adjust to use find_any_thread_of_pid.
2168
a059f00c
SDJ
21692017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2170
2171 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2172 with "!VEC_empty".
a059f00c 2173
cc397f3a
SDJ
21742017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2175
2176 * linux-low.c (handle_extended_wait): Use
2177 "allocate_target_description" instead of "XNEW".
2178 * linux-x86-low.c (initialize_low_arch): Likewise.
2179
22916b07
YQ
21802017-09-05 Yao Qi <yao.qi@linaro.org>
2181
2182 * configure.srv (srv_i386_regobj): Remove.
2183 (srv_amd64_regobj): Remove.
2184 (srv_regobj): Set it to "" for x86 non-linux targets.
2185 * linux-x86-tdesc.c (i386_linux_read_description):
2186 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2187 (init_registers_i386): Remove the declaration.
2188 (tdesc_i386): Remove the declaration.
2189 (lynx_i386_arch_setup): Call i386_create_target_description.
2190 * nto-x86-low.c: Likewise.
2191 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2192 [!__x86_64__]: include arch/i386.h.
2193 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2194
38602d55
YQ
21952017-09-05 Yao Qi <yao.qi@linaro.org>
2196
2197 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2198 i386/amd64-XXX-linux from it.
2199
44b886ff
YQ
22002017-09-05 Yao Qi <yao.qi@linaro.org>
2201
2202 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2203 false.
2204 (ipa_amd64_linux_regobj): Remove.
2205 (ipa_x32_linux_regobj): Remove.
2206
b4570e4b
YQ
22072017-09-05 Yao Qi <yao.qi@linaro.org>
2208
2209 * Makefile.in (arch-amd64.o): New rule.
2210 * configure.srv: Append arch-amd64.o.
2211 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2212 (get_ipa_tdesc): Call amd64_linux_read_description.
2213 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2214 and init_registers_amd64_XXX.
2215 * linux-x86-low.c (x86_linux_read_description): Call
2216 amd64_linux_read_description.
2217 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2218 (initialize_low_arch): Don't call init_registers_x32_XXX and
2219 init_registers_amd64_XXX.
2220 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2221 and tdesc_amd64_XXX.
2222 [__x86_64__] (amd64_tdesc_test): New function.
2223 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2224 and init_registers_amd64_XXX.
2225 * linux-x86-tdesc.c: Include arch/amd64.h.
2226 (xcr0_to_tdesc_idx): New function.
2227 (i386_linux_read_description): New function.
2228 (amd64_get_ipa_tdesc_idx): New function.
2229 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2230 (amd64_get_ipa_tdesc): Declare.
2231
d1f28ea2
YQ
22322017-09-05 Yao Qi <yao.qi@linaro.org>
2233
2234 * configure.srv (srv_i386_linux_xmlfiles): Remove
2235 i386/i386-XXX-linux.xml from it.
2236
25a93583
YQ
22372017-09-05 Yao Qi <yao.qi@linaro.org>
2238
2239 * configure.srv: Set srv_i386_linux_regobj empty if $development
2240 is false.
2241 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2242 initialize_low_tdesc.
2243 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2244 with #if initialize_low_tdesc.
2245 * linux-x86-tdesc-selftest.c: New file.
2246 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2247
5f035c07
YQ
22482017-09-05 Yao Qi <yao.qi@linaro.org>
2249
2250 * Makefile.in (arch-i386.o): New rule.
2251 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2252 (x86_64-*-linux*): Likewise.
2253 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2254 include arch/i386.h.
2255 (i386_linux_read_description): Remove code and call
2256 i386_create_target_description.
2257 * tdesc.c (allocate_target_description): New function.
2258 * tdesc.h (set_tdesc_architecture): Remove declaration.
2259 (set_tdesc_osabi): Likewise.
2260
0abe8a89
YQ
22612017-09-05 Yao Qi <yao.qi@linaro.org>
2262
2263 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2264 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2265 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2266 .xmltarget.
2267 * server.c (get_features_xml): Call tdesc_get_features_xml.
2268 * tdesc.c (set_tdesc_architecture): New function.
2269 (set_tdesc_osabi): New function.
2270 (tdesc_get_features_xml): New function.
2271 (tdesc_create_feature): Add an argument.
2272 * tdesc.h (struct target_desc) <features>: New field.
2273 <arch, osabi>: New field.
2274 (~target_desc): xfree features, arch, and osabi.
2275 (target_desc::oerator==): Don't compare .xmltarget.
2276 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2277 (set_tdesc_osabi): Likewise.
2278 (tdesc_get_features_xml): Likewise.
2279
0a188386
YQ
22802017-09-05 Yao Qi <yao.qi@linaro.org>
2281
2282 * linux-x86-tdesc.c: Include selftest.h.
2283 (i386_tdesc_test): New function.
2284 (initialize_low_tdesc): Call selftests::register_test.
2285 * tdesc.h: Include regdef.h.
2286 (target_desc): Override operator == and !=.
2287
f49ff000
YQ
22882017-09-05 Yao Qi <yao.qi@linaro.org>
2289
2290 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2291 (ipa_obj): Likewise.
2292 * linux-i386-ipa.c: Include common/x86-xstate.h
2293 (get_ipa_tdesc): Call i386_linux_read_description.
2294 (initialize_low_tracepoint): Don't call init_registers_XXX
2295 functions, call initialize_low_tdesc instead.
2296 * linux-x86-low.c (x86_linux_read_description): Call
2297 i386_linux_read_description.
2298 (initialize_low_arch): Don't call init_registers_i386_XXX
2299 functions, call initialize_low_tdesc.
2300 * linux-x86-tdesc.c: New file.
2301 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2302 (i386_get_ipa_tdesc_idx): Declare.
2303 (i386_get_ipa_tdesc): Declare.
2304 (initialize_low_tdesc): Declare.
2305
2b68ef2f
YQ
23062017-09-05 Yao Qi <yao.qi@linaro.org>
2307
2308 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2309 instead of 0.
2310
f7000548
YQ
23112017-09-05 Yao Qi <yao.qi@linaro.org>
2312
2313 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2314 * regcache.c (get_thread_regcache): Use VEC_length.
2315 (init_register_cache): Likewise.
2316 (regcache_cpy): Likewise.
2317 (registers_to_string): Iterate reg_defs via VEC_iterate.
2318 (find_regno): Likewise.
2319 (find_register_by_number): Use VEC_index.
2320 (register_size): Call find_register_by_number.
2321 (register_data): Call find_register_by_number.
2322 (supply_regblock): Use VEC_length.
2323 (regcache_raw_read_unsigned): Likewise.
2324 * tdesc.c (init_target_desc): Iterate reg_defs via
2325 VEC_iterate.
2326 (default_description): Update initializer.
2327 (copy_target_description): Don't update field num_registers.
2328 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2329 <num_registers>: Remove.
2330
50a421ac
SM
23312017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2332
2333 * Makefile.in (.SECONDARY): Define target.
2334
23fdd69e
SM
23352017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2336
2337 * linux-low.c (linux_wait_1): Adjust.
2338 * server.c (queue_stop_reply_callback): Adjust.
2339
0a2dde4a
SDJ
23402017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2341
2342 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2343 QEnvironmentUnset and QEnvironmentReset packets.
2344 (handle_query): Inform remote that QEnvironmentHexEncoded,
2345 QEnvironmentUnset and QEnvironmentReset are supported.
2346
6afd337d
SM
23472017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2348
2349 * inferiors.h (inferior_target_data): Rename to ...
2350 (thread_target_data): ... this.
2351 (inferior_regcache_data): Rename to ...
2352 (thread_regcache_data): ... this.
2353 (set_inferior_regcache_data): Rename to ...
2354 (set_thread_regcache_data): ... this.
2355 * inferiors.c (inferior_target_data): Rename to ...
2356 (thread_target_data): ... this.
2357 (inferior_regcache_data): Rename to ...
2358 (thread_regcache_data): ... this.
2359 (set_inferior_regcache_data): Rename to ...
2360 (set_thread_regcache_data): ... this.
2361 (free_one_thread): Update.
2362 * linux-low.h (get_thread_lwp): Update.
2363 * regcache.c (get_thread_regcache): Update.
2364 (regcache_invalidate_thread): Update.
2365 (free_register_cache_thread): Update.
2366 * win32-i386-low.c (update_debug_registers_callback): Update.
2367 (win32_get_current_dr): Update.
2368 * win32-low.c (thread_rec): Update.
2369 (delete_thread_info): Update.
2370 (continue_one_thread): Update.
2371 (suspend_one_thread): Update.
2372
a160cc46
SM
23732017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2374
2375 * inferiors.c (set_inferior_target_data): Remove.
2376 * inferiors.h (set_inferior_target_data): Remove.
2377
6d580b63
YQ
23782017-08-18 Yao Qi <yao.qi@linaro.org>
2379
2380 * Makefile.in (OBS): Add selftest.o.
2381 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2382 * configure, config.in: Re-generated.
2383 * server.c: Include common/sefltest.h.
2384 (captured_main): Handle option --selftest.
2385
f5a29eb0
YQ
23862017-08-09 Yao Qi <yao.qi@linaro.org>
2387
2388 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2389 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2390 i386-avx-mpx.o and i386-mmx.o.
2391 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2392 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2393 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2394 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2395 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2396 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2397 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2398 i386/amd64-avx-mpx.xml.
2399
57757c2f
YQ
24002017-08-09 Yao Qi <yao.qi@linaro.org>
2401
2402 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2403 and x32-avx-avx512.o.
2404 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2405 i386/x32-avx-avx512.xml.
2406
229d26fc
SM
24072017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2408
2409 * tracepoint.h (enum class fast_tpoint_collect_result): New
2410 enumeration.
2411 (fast_tracepoint_collecting): Change return type to
2412 fast_tpoint_collect_result.
2413 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2414 * linux-low.h: Include tracepoint.h.
2415 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2416 fast_tpoint_collect_result.
2417 * linux-low.c (handle_tracepoints): Adjust.
2418 (linux_fast_tracepoint_collecting): Change return type to
2419 fast_tpoint_collect_result.
2420 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2421 linux_wait_1, stuck_in_jump_pad_callback,
2422 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2423 proceed_one_lwp): Adjust to type change.
2424
2e1e43e1
YQ
24252017-07-10 Yao Qi <yao.qi@linaro.org>
2426
2427 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2428
adc764e7
YQ
24292017-06-29 Yao Qi <yao.qi@linaro.org>
2430
2431 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2432 Remove.
2433 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2434
a206891a
SM
24352017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2436
2437 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2438
9a6c7d9c
SDJ
24392017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2440
2441 * linux-low.c (linux_create_inferior): Adjust code to access the
2442 environment information via 'gdb_environ' class.
2443 * lynx-low.c (lynx_create_inferior): Likewise.
2444 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2445 (get_environ): Return a pointer to 'our_environ'.
2446 (captured_main): Initialize 'our_environ'.
2447 * server.h (get_environ): Adjust prototype.
2448 * spu-low.c (spu_create_inferior): Adjust code to access the
2449 environment information via 'gdb_environ' class.
2450
ae3e2ccf
SM
24512017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2452
2453 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2454 usage of "register" keyword.
2455
3e019bdc
SM
24562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2457
2458 * configure: Re-generate.
2459
8465943a
SM
24602017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2461
2462 * configure: Re-generate.
2463
cf0dd6f0
SM
24642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2465
2466 * Makefile.in (COMPILE.pre): Add "-x c++".
2467
9845682b
SDJ
24682017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2469
2470 * fork-child.c: Conditionally include <signal.h>.
2471
aefd8b33
SDJ
24722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2473
2474 * server.c (handle_general_set): Handle new packet
2475 "QStartupWithShell".
2476 (handle_query): Add "QStartupWithShell" to the list of supported
2477 packets.
2478 (gdbserver_usage): Add help text explaining the
2479 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2480 options.
2481 (captured_main): Recognize and act upon the presence of the new
2482 CLI options.
2483
2090129c
SDJ
24842017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2485 Pedro Alves <palves@redhat.com>
2486
2487 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2488 * configure: Regenerate.
2489 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2490 "fork-inferior.o".
2491 (i[34567]86-*-lynxos*): Likewise.
2492 (spu*-*-*): Likewise.
2493 * fork-child.c: New file.
2494 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2495 and "environ.h".
2496 (linux_ptrace_fun): New function.
2497 (linux_create_inferior): Adjust function prototype to reflect
2498 change on "target.h". Adjust function code to use
2499 "fork_inferior".
2500 (linux_request_interrupt): Delete "signal_pid".
2501 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2502 (lynx_ptrace_fun): New function.
2503 (lynx_create_inferior): Adjust function prototype to reflect
2504 change on "target.h". Adjust function code to use
2505 "fork_inferior".
2506 * nto-low.c (nto_create_inferior): Adjust function prototype and
2507 code to reflect change on "target.h". Update comments.
2508 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2509 "common-terminal.h" and "environ.h".
2510 (terminal_fd): Moved to fork-child.c.
2511 (old_foreground_pgrp): Likewise.
2512 (restore_old_foreground_pgrp): Likewise.
2513 (last_status): Make it global.
2514 (last_ptid): Likewise.
2515 (our_environ): New variable.
2516 (startup_with_shell): Likewise.
2517 (program_name): Likewise.
2518 (program_argv): Rename to...
2519 (program_args): ...this.
2520 (wrapper_argv): New variable.
2521 (start_inferior): Delete function.
2522 (get_exec_wrapper): New function.
2523 (get_exec_file): Likewise.
2524 (get_environ): Likewise.
2525 (prefork_hook): Likewise.
2526 (post_fork_inferior): Likewise.
2527 (postfork_hook): Likewise.
2528 (postfork_child_hook): Likewise.
2529 (handle_v_run): Update code to deal with arguments coming from the
2530 remote host. Update calls from "start_inferior" to
2531 "create_inferior".
2532 (captured_main): Likewise. Initialize environment variable. Call
2533 "have_job_control".
2534 * server.h (post_fork_inferior): New prototype.
2535 (get_environ): Likewise.
2536 (last_status): Declare.
2537 (last_ptid): Likewise.
2538 (signal_pid): Likewise.
2539 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2540 (spu_ptrace_fun): New function.
2541 (spu_create_inferior): Adjust function prototype to reflect change
2542 on "target.h". Adjust function code to use "fork_inferior".
2543 * target.c (target_terminal_init): New function.
2544 (target_terminal_inferior): Likewise.
2545 (target_terminal_ours): Likewise.
2546 * target.h: Include <vector>.
2547 (struct target_ops) <create_inferior>: Update prototype.
2548 (create_inferior): Update macro.
2549 * utils.c (gdb_flush_out_err): New function.
2550 * win32-low.c (win32_create_inferior): Adjust function prototype
2551 and code to reflect change on "target.h".
2552
043a4934
SDJ
25532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2554
2555 * inferiors.c (switch_to_thread): New function.
2556
15652511
SDJ
25572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2558
2559 * Makefile.in (SFILE): Add "common/job-control.c".
2560 (OBS): Add "job-control.o".
2561
21ea5acd
SDJ
25622017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2563
2564 * Makefile: Remove "@host_makefile_frag@".
2565
e13cb306
PA
25662017-05-05 Pedro Alves <palves@redhat.com>
2567
2568 * configure: Regenerate.
2569
c94fee56
SDJ
25702017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2571
2572 * configure: Regenerate.
2573
a0ff9e1a
SM
25742017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2575
2576 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2577 software_single_step change of return type to
2578 std::vector<CORE_ADDR>.
2579 * linux-low.c (install_software_single_step_breakpoints):
2580 Likewise.
2581 * linux-low.h (install_software_single_step_breakpoints):
2582 Likewise.
2583
be628ab8
SDJ
25842017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2585
2586 * remote-utils.c: Include "gdb_termios.h" instead of
2587 "terminal.h".
2588 * terminal.h: Delete file.
2589
7c5ded6a
SDJ
25902017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2591
2592 * server.c: Include <vector>.
2593 <program_argv, wrapper_argv>: Convert to std::vector.
2594 (start_inferior): Rewrite function to use C++.
2595 (handle_v_run): Likewise. Update code that calculates the argv
2596 based on the vRun packet; use C++.
2597 (captured_main): Likewise.
2598
436252de
SM
25992017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2600
2601 * server.c (handle_v_cont): Initialize thread_resume::thread
2602 with null_ptid.
2603
9bf2a700
PA
26042017-04-05 Pedro Alves <palves@redhat.com>
2605
2606 * configure: Regenerate.
2607
a121b7c1
PA
26082017-04-05 Pedro Alves <palves@redhat.com>
2609
2610 * gdbreplay.c (sync_error): Constify.
2611 * linux-x86-low.c (push_opcode): Constify.
2612
21c8a587
PA
26132017-04-05 Pedro Alves <palves@redhat.com>
2614
2615 * win32-low.c (get_child_debug_event)
2616 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2617 Report TARGET_WAITKIND_SPURIOUS instead.
2618
fb32b4f7
PA
26192017-04-05 Pedro Alves <palves@redhat.com>
2620
e79be6e5
SM
2621 * remote-utils.c (remote_prepare, remote_open): Constify.
2622 * remote-utils.h (remote_prepare, remote_open): Constify.
2623 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2624
65dd1e59
SM
26252017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2626
2627 * Makefile.in (clean): Clear .deps.
2628
8fa5b777
SM
26292017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2630
2631 * .gitignore: Remove generated files, replace with wildcard.
2632 * (clean): Replace removal of generated files with wildcard.
2633 (version.c): Replace with...
2634 (version-generated.c): ...this.
2635 (xml-builtin.c): Replace with...
2636 (xml-builtin-generated.c): ...this.
2637 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2638 (%.c: *regformats*): Replace with...
2639 (%-generated.c: *regformats*): ...this.
2640
a12e714b
MF
26412017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2642
2643 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2644 (xtensa_fill_gregset): Call collect_register_by_name for
2645 threadptr register.
2646 (xtensa_store_gregset): Call supply_register_by_name for
2647 threadptr register.
2648
1a09b50a
MF
26492017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2650
2651 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2652 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2653 (xtensa_store_gregset): Call supply_register for all registers in
2654 a0_regnum..a0_regnum + C0_NREGS range.
2655
1a01e7c6
SM
26562017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2657
2658 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2659 (ax-ipa.o: ax.c): Remove.
2660 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2661 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2662 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2663 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2664 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2665
36bc18a8
SM
26662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2667
2668 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2669 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2670 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2671 (errors-ipa.o: ../common/errors.c): Remove.
2672 (format-ipa.o: ../common/format.c): Remove.
2673 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2674
a8ebe3d5
SM
26752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2676
2677 * Makefile.in (%-ipa.o: %.c): New rule.
2678 (tracepoint-ipa.o: tracepoint.c): Remove.
2679 (utils-ipa.o: utils.c): Remove.
2680 (remote-utils-ipa.o: remote-utils.c): Remove.
2681 (regcache-ipa.o: regcache.c): Remove.
2682 (i386-linux-ipa.o: i386-linux.c): Remove.
2683 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2684 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2685 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2686 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2687 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2688 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2689 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2690 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2691 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2692 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2693 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2694 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2695 (aarch64-ipa.o: aarch64.c): Remove.
2696 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2697 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2698 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2699 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2700 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2701 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2702 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2703 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2704 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2705 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2706 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2707 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2708 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2709 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2710 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2711 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2712 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2713 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2714 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2715 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2716 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2717 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2718 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2719 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2720 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2721 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2722 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2723 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2724 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2725 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2726 (tdesc-ipa.o: tdesc.c): Remove.
2727 (x32-linux-ipa.o: x32-linux.c): Remove.
2728 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2729 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2730
50cfacb7
SM
27312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2732
2733 * Makefile.in (%.o: ../arch/%.c): New rule.
2734 (arm.o: ../arch/arm.c): Remove.
2735 (arm-linux.o: ../arch/arm-linux.c): Remove.
2736 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2737 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2738
c5a22423
SM
27392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2740
2741 * Makefile.in (%.o: ../nat/%.c): New rule.
2742 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2743 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2744 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2745 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2746 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2747 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2748 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2749 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2750 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2751 (linux-personality.o: ../nat/linux-personality.c): Remove.
2752 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2753 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2754 (x86-linux.o: ../nat/x86-linux.c): Remove.
2755 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2756 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2757
6bda016b
SM
27582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2759
2760 * Makefile.in (%.o: ../common/%.c): New rule.
2761 (signals.o: ../common/signals.c): Remove.
2762 (print-utils.o: ../common/print-utils.c): Remove.
2763 (rsp-low.o: ../common/rsp-low.c): Remove.
2764 (common-utils.o: ../common/common-utils.c): Remove.
2765 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2766 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2767 (vec.o: ../common/vec.c): Remove.
2768 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2769 (xml-utils.o: ../common/xml-utils.c): Remove.
2770 (ptid.o: ../common/ptid.c): Remove.
2771 (buffer.o: ../common/buffer.c): Remove.
2772 (format.o: ../common/format.c): Remove.
2773 (filestuff.o: ../common/filestuff.c): Remove.
2774 (agent.o: ../common/agent.c): Remove.
2775 (errors.o: ../common/errors.c): Remove.
2776 (environ.o: ../common/environ.c): Remove.
2777 (common-debug.o: ../common/common-debug.c): Remove.
2778 (cleanups.o: ../common/cleanups.c): Remove.
2779 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2780 (fileio.o: ../common/fileio.c): Remove.
2781 (common-regcache.o: ../common/common-regcache.c): Remove.
2782 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2783 (new-op.o: ../common/new-op.c): Remove.
2784 (btrace-common.o: ../common/btrace-common.c): Remove.
2785
21122961
SM
27862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2787
2788 * Makefile.in (%.o: ../target/%.c): New rule.
2789 (waitstatus.o: ../target/waitstatus.c): Remove.
2790
c362e621
SM
27912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2792
2793 * Makefile.in
2794 (%.c: ../regformats/%.dat,
2795 (%.c: ../regformats/arm/%.dat,
2796 (%.c: ../regformats/i386/%.dat,
2797 (%.c: ../regformats/rs6000/%.dat): New rules.
2798 (aarch64.c): Remove.
2799 (reg-arm.c): Remove.
2800 (arm-with-iwmmxt.c): Remove.
2801 (arm-with-vfpv2.c): Remove.
2802 (arm-with-vfpv3.c): Remove.
2803 (arm-with-neon.c): Remove.
2804 (reg-bfin.c): Remove.
2805 (reg-cris.c): Remove.
2806 (reg-crisv32.c): Remove.
2807 (i386.c): Remove.
2808 (i386-linux.c): Remove.
2809 (i386-avx.c): Remove.
2810 (i386-avx-linux.c): Remove.
2811 (i386-avx-avx512.c): Remove.
2812 (i386-avx-avx512-linux.c): Remove.
2813 (i386-mpx.c): Remove.
2814 (i386-mpx-linux.c): Remove.
2815 (i386-avx-mpx-avx512-pku.c): Remove.
2816 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2817 (i386-avx-mpx.c): Remove.
2818 (i386-avx-mpx-linux.c): Remove.
2819 (i386-mmx.c): Remove.
2820 (i386-mmx-linux.c): Remove.
2821 (reg-ia64.c): Remove.
2822 (reg-m32r.c): Remove.
2823 (reg-m68k.c): Remove.
2824 (reg-cf.c): Remove.
2825 (mips-linux.c): Remove.
2826 (mips-dsp-linux.c): Remove.
2827 (mips64-linux.c): Remove.
2828 (mips64-dsp-linux.c): Remove.
2829 (nios2-linux.c): Remove.
2830 (powerpc-32.c): Remove.
2831 (powerpc-32l.c): Remove.
2832 (powerpc-altivec32l.c): Remove.
2833 (powerpc-cell32l.c): Remove.
2834 (powerpc-vsx32l.c): Remove.
2835 (powerpc-isa205-32l.c): Remove.
2836 (powerpc-isa205-altivec32l.c): Remove.
2837 (powerpc-isa205-vsx32l.c): Remove.
2838 (powerpc-e500l.c): Remove.
2839 (powerpc-64l.c): Remove.
2840 (powerpc-altivec64l.c): Remove.
2841 (powerpc-cell64l.c): Remove.
2842 (powerpc-vsx64l.c): Remove.
2843 (powerpc-isa205-64l.c): Remove.
2844 (powerpc-isa205-altivec64l.c): Remove.
2845 (powerpc-isa205-vsx64l.c): Remove.
2846 (s390-linux32.c): Remove.
2847 (s390-linux32v1.c): Remove.
2848 (s390-linux32v2.c): Remove.
2849 (s390-linux64.c): Remove.
2850 (s390-linux64v1.c): Remove.
2851 (s390-linux64v2.c): Remove.
2852 (s390-te-linux64.c): Remove.
2853 (s390-vx-linux64.c): Remove.
2854 (s390-tevx-linux64.c): Remove.
2855 (s390x-linux64.c): Remove.
2856 (s390x-linux64v1.c): Remove.
2857 (s390x-linux64v2.c): Remove.
2858 (s390x-te-linux64.c): Remove.
2859 (s390x-vx-linux64.c): Remove.
2860 (s390x-tevx-linux64.c): Remove.
2861 (tic6x-c64xp-linux.c): Remove.
2862 (tic6x-c64x-linux.c): Remove.
2863 (tic6x-c62x-linux.c): Remove.
2864 (reg-sh.c): Remove.
2865 (reg-sparc64.c): Remove.
2866 (reg-spu.c): Remove.
2867 (amd64.c): Remove.
2868 (amd64-linux.c): Remove.
2869 (amd64-avx.c): Remove.
2870 (amd64-avx-linux.c): Remove.
2871 (amd64-avx-avx512.c): Remove.
2872 (amd64-avx-avx512-linux.c): Remove.
2873 (amd64-mpx.c): Remove.
2874 (amd64-mpx-linux.c): Remove.
2875 (amd64-avx-mpx-avx512-pku.c): Remove.
2876 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2877 (amd64-avx-mpx.c): Remove.
2878 (amd64-avx-mpx-linux.c): Remove.
2879 (x32.c): Remove.
2880 (x32-linux.c): Remove.
2881 (x32-avx.c): Remove.
2882 (x32-avx-linux.c): Remove.
2883 (x32-avx-avx512.c): Remove.
2884 (x32-avx-avx512-linux.c): Remove.
2885 (reg-xtensa.c): Remove.
2886 (reg-tilegx.c): Remove.
2887 (reg-tilegx32.c): Remove.
2888
1672e0d9
SDJ
28892017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2890
2891 * Makefile.in (SFILES): Add "common/environ.c".
2892 (OBJS): Add "common/environ.h".
2893
239b6d10
WT
28942017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2895
2896 * configure.ac: Check if the fs_base and gs_base members of
2897 `struct user_regs_struct' exist.
2898 * config.in: Regenerated.
2899 * configure: Likewise.
2900
694b382c
AT
29012017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2902
2903 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2904 target_read_memory.
2905 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2906 (get_next_pcs_syscall_next_pc): Likewise.
2907
7dc53023
LM
29082016-12-23 Luis Machado <lgustavo@codesourcery.com>
2909
2910 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2911 * nto-x86-low.c: Likewise.
2912
ad02e4fe
SM
29132016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2914
2915 * Makefile.in: Include disable-implicit-rules.mk.
2916
dcb07cfa
PA
29172016-11-23 Pedro Alves <palves@redhat.com>
2918
2919 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2920 (debug_vprintf): Use std::chrono::steady_clock instead of
2921 gettimeofday. Use '.' instead of ':'.
2922 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2923 (get_timestamp): Use std::chrono::steady_clock instead of
2924 gettimeofday.
2925
8629c02c
SM
29262016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2927
2928 * Makefile.in: Fix whitespace formatting.
2929
b593ecca
SM
29302016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2931
2932 * Makefile.in (SFILES, OBS): Flatten list and order
2933 alphabetically.
2934
9986ba08
PA
29352016-11-23 Pedro Alves <palves@redhat.com>
2936
2937 * event-loop.c (handle_file_event): Use warning.
2938 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2939 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2940 Use warning.
2941
4eefa7bc
PA
29422016-11-23 Pedro Alves <palves@redhat.com>
2943
2944 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2945 output.
2946 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2947 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2948 debug_printf and debug_flush for debug output.
2949 * server.c (handle_general_set): Likewise.
2950 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2951 output.
2952
5443506e
SM
29532016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2954
2955 * Makefile.in (.c.o): Replace rule with ...
2956 (%.o: %.c): ... this one.
2957
3b165252
SM
29582016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2959
2960 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2961 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2962 make.
2963 * configure.ac: Remove checks for the make program.
2964 * configure: Re-generate.
2965
0bcda685
PA
29662016-10-28 Pedro Alves <palves@redhat.com>
2967
2968 * Makefile.in (CXX_DIALECT): Get from configure.
2969 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2970 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2971 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2972 * config.in: Regenerate.
2973 * configure: Regenerate.
2974
c3805894
YQ
29752016-10-27 Yao Qi <yao.qi@linaro.org>
2976
2977 * linux-low.c (linux_supports_range_stepping): Return true if
2978 can_software_single_step return true.
2979
89342618
YQ
29802016-10-27 Yao Qi <yao.qi@linaro.org>
2981
2982 * inferiors.c (find_inferior_in_random): New function.
2983 * inferiors.h (find_inferior_in_random): Declare.
2984 * linux-low.c (linux_wait_for_event_filtered): Call
2985 find_inferior_in_random instead of find_inferior.
2986
e3652c84
YQ
29872016-10-27 Yao Qi <yao.qi@linaro.org>
2988
2989 * linux-low.c (linux_wait_1): If single-step breakpoints are
2990 inserted, remove them.
2991
5a04c4cf
PA
29922016-10-26 Pedro Alves <palves@redhat.com>
2993
2994 * linux-low.c (handle_extended_wait): Link parent/child fork
2995 threads.
2996 (linux_wait_1): Unlink them.
2997 (linux_set_resume_request): Ignore resume requests for
2998 already-resumed and unhandled fork child threads.
2999 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3000 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3001 New functions.
3002 (handle_v_requests) <vCont>: Don't call require_running.
3003 * server.h (in_queued_stop_replies): New declaration.
3004
cb93dc7f
YQ
30052016-10-24 Yao Qi <yao.qi@linaro.org>
3006
3007 PR server/20733
3008 * linux-aarch64-low.c (append_insns): Cast the return value to
3009 'uint32_t *'.
3010
a1078bea
YQ
30112016-10-10 Yao Qi <yao.qi@linaro.org>
3012
3013 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3014
1fb77080
SDJ
30152016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3016
3017 * target.c (target_supports_multi_process): New function, moved
3018 from...
3019 * target.h (target_supports_multi_process): ... here. Remove
3020 macro.
3021
39b5a3b9
TT
30222016-10-05 Tom Tromey <tom@tromey.com>
3023
3024 PR remote/20655:
3025 * tracepoint.c (handle_tracepoint_bkpts): Check
3026 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3027
c1d0b70a
YQ
30282016-10-05 Yao Qi <yao.qi@linaro.org>
3029
3030 * configure.srv: Update the path of arm-*.xml files.
3031
0a69eedb
YQ
30322016-10-05 Terry Guo <terry.guo@arm.com>
3033 Yao Qi <yao.qi@linaro.org>
3034
3035 * Makefile.in: Adjust the path of rules.
3036 * configure.srv: Update the path of xml files.
3037 * regformats/arm-with-iwmmxt.dat: Regenerated.
3038 * regformats/arm-with-neon.dat: Likewise.
3039 * regformats/arm-with-vfpv2.dat: Likewise.
3040 * regformats/arm-with-vfpv3.dat Likewise.
3041
17e16485
YQ
30422016-09-30 Yao Qi <yao.qi@linaro.org>
3043
3044 PR gdbserver/20627
3045 * target.c (target_stop_and_wait): Don't call
3046 target_continue_no_signal, use resume_stop instead.
3047
edeeb602
YQ
30482016-09-26 Yao Qi <yao.qi@linaro.org>
3049
3050 * linux-low.c (linux_wait_1): Call debug_exit.
3051
503b1c39
PA
30522016-09-23 Pedro Alves <palves@redhat.com>
3053
3054 * Makefile.in (SFILES): Add common/new-op.c.
3055 (OBS): Add common/new-op.o.
3056 (new-op.o): New rule.
3057
74172ecf
SM
30582016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3059
3060 * .gitinore: Ignore more files.
3061
fc6cda2e
YQ
30622016-09-21 Yao Qi <yao.qi@linaro.org>
3063
3064 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3065 23.
3066
bc1e6c81
SDJ
30672016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3068
3069 * server.c (start_inferior): Call target_mourn_inferior instead of
3070 mourn_inferior; pass ptid_t argument to it.
3071 (resume): Likewise.
3072 (handle_target_event): Likewise.
3073 * target.c (target_mourn_inferior): New function.
3074 * target.h (mourn_inferior): Delete macro.
3075
0e00e962
AA
30762016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3077
3078 * linux-low.c (lwp_is_stepping): New function.
3079
1d8cb77d
CL
30802016-09-06 Carl Love <cel@us.ibm.com>
3081
3082 * server.c (start_inferior): Fixed comment, requested comment change
3083 didn't get updated correctly. Removed reference to ptrace () call as
3084 it is only true on Linux systems.
3085
7313bced
CL
30862016-09-06 Carl Love <cel@us.ibm.com>
3087
3088 * server.c (start_inferior): Do not call
3089 function target_post_create_inferior () if the
3090 inferior process has already exited.
3091
cf6de44d
PA
30922016-09-05 Pedro Alves <palves@redhat.com>
3093
3094 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3095 (COMPILE.pre, CC_LD): Use CXX directly.
3096 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3097 * acinclude.m4: Don't include build-with-cxx.m4.
3098 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3099 * configure: Regenerate.
3100
c1da6748
AT
31012016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3102
3103 PR gdb/19495
3104 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3105 call writing data to own_buf.
3106
f2b9e3df
SDJ
31072016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3108
3109 * target.c (mywait): Call target_wait instead of
3110 the_target->wait.
3111 (target_wait): New function.
3112
049a8570
SDJ
31132016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3114
3115 * server.c (start_inferior): New variable 'ptid'. Replace calls
3116 to the_target->resume by target_continue{,_no_signal}, depending
3117 on the case.
3118 * target.c (target_stop_and_wait): Call target_continue_no_signal
3119 instead of the_target->resume.
3120 (target_continue): New function.
3121
3aa5cfa0
AT
31222016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3123
3124 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3125
754653a7
AZ
31262016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3127
3128 PR server/20491
3129 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3130 ps_prochandle.
3131 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3132 * linux-arm-low.c (ps_get_thread_area): Likewise.
3133 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3134 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3135 * linux-mips-low.c (ps_get_thread_area): Likewise.
3136 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3137 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3138 * linux-x86-low.c (ps_get_thread_area): Likewise.
3139 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3140
ed036b40
PA
31412016-08-19 Pedro Alves <palves@redhat.com>
3142
3143 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3144
c8ef42ee
PA
31452016-08-19 Pedro Alves <palves@redhat.com>
3146
3147 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3148 comment. Use memcpy instead of casting through unsigned long.
3149
9c235a72
PA
31502016-08-19 Pedro Alves <palves@redhat.com>
3151
3152 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3153 allocating around 0x80000000.
3154
201506da
PA
31552016-08-19 Pedro Alves <palves@redhat.com>
3156
3157 PR gdb/20415
3158 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3159 (x32-avx512-linux-ipa.o): New rules.
3160 * configure.ac (x86_64-*-linux*): New x32 check.
3161 * configure.srv (ipa_x32_linux_regobj): New.
3162 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3163 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3164 descriptions.
3165 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3166 descriptions.
3167 * configure: Regenerate.
3168
f348d89a
PA
31692016-08-09 Pedro Alves <palves@redhat.com>
3170
3171 PR gdb/18653
3172 * Makefile.in (OBS): Add signals-state-save-restore.o.
3173 (signals-state-save-restore.o): New rule.
3174 * config.in: Regenerate.
3175 * configure: Regenerate.
3176 * linux-low.c: Include "signals-state-save-restore.h".
3177 (linux_create_inferior): Call
3178 restore_original_signals_state.
3179 * server.c: Include "dispositions-save-restore.h".
3180 (captured_main): Call save_original_signals_state.
3181
1baf5149
PA
31822016-08-05 Pedro Alves <palves@redhat.com>
3183
3184 * configure: Regenerate.
3185
fcd4a73d
YQ
31862016-08-04 Yao Qi <yao.qi@linaro.org>
3187
3188 * linux-low.c (regsets_fetch_inferior_registers): Check
3189 errno is ESRCH or not.
3190
979659d0
YQ
31912016-08-02 Yao Qi <yao.qi@linaro.org>
3192
3193 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3194 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3195 (thread_db_load_search): Update.
3196 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3197 td_ta_set_event and td_ta_event_getmsg.
3198
6598661d
PA
31992016-07-26 Pedro Alves <palves@redhat.com>
3200
3201 PR server/20414
3202 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3203 of unsigned long for 64-bit registers and use uint32_t instead of
3204 unsigned int for 32-bit registers.
3205
9cf12d57
PA
32062016-07-26 Pedro Alves <palves@redhat.com>
3207
3208 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3209 to 'ptrace'.
3210
305450ed
TT
32112016-07-21 Tom Tromey <tom@tromey.com>
3212
3213 * configure: Rebuild.
3214
2583da7c
YQ
32152016-07-21 Yao Qi <yao.qi@linaro.org>
3216
3217 * mem-break.c (find_gdb_breakpoint): Cast bp to
3218 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3219
21536b36
YQ
32202016-07-21 Yao Qi <yao.qi@linaro.org>
3221
3222 * server.c (handle_v_requests): Support s and S actions
3223 if target_supports_software_single_step return true.
3224
8901d193
YQ
32252016-07-21 Yao Qi <yao.qi@linaro.org>
3226
3227 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3228 is resume_step, call maybe_hw_step.
3229 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3230 and unstop them.
3231 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3232 breakpoints or not.
3233 (proceed_one_lwp): If resume request is resume_step, install
3234 reinsert breakpoints and call maybe_hw_step.
3235
0e9a339e
YQ
32362016-07-21 Yao Qi <yao.qi@linaro.org>
3237
3238 * linux-low.c (proceed_one_lwp): Declare.
3239 (linux_resume_one_thread): Remove local variable 'step'.
3240 Lift code enqueue signal. Call proceed_one_lwp instead of
3241 linux_resume_one_lwp.
3242
4281b351
YQ
32432016-07-21 Yao Qi <yao.qi@linaro.org>
3244
3245 * linux-low.c (linux_resume_one_thread): Call
3246 enqueue_pending_signal.
3247
984a2c04
YQ
32482016-07-21 Yao Qi <yao.qi@linaro.org>
3249
3250 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3251 * inferiors.c (do_restore_current_thread_cleanup): New function.
3252 (make_cleanup_restore_current_thread): Likewise.
3253 * linux-low.c (install_software_single_step_breakpoints): Call
3254 make_cleanup_restore_current_thread. Switch current_thread to
3255 thread.
3256
bec903c9
YQ
32572016-07-21 Yao Qi <yao.qi@linaro.org>
3258
3259 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3260 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3261 (clone_one_breakpoint): Likewise.
3262 (delete_reinsert_breakpoints): Change parameter to thread.
3263 Callers updated.
3264 (has_reinsert_breakpoints): Likewise.
3265 (uninsert_reinsert_breakpoints): Likewise.
3266 (reinsert_reinsert_breakpoints): Likewise.
3267 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3268 (delete_reinsert_breakpoints): Likewise.
3269 (reinsert_reinsert_breakpoints): Likewise.
3270 (uninsert_reinsert_breakpoints): Likewise.
3271 (has_reinsert_breakpoints): Likewise.
3272
63c40ec7
YQ
32732016-07-21 Yao Qi <yao.qi@linaro.org>
3274
3275 * inferiors.c (get_thread_process): Make parameter const.
3276 * inferiors.h (get_thread_process): Update declaration.
3277 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3278 Add new parameters child_thread and parent_thread. Callers
3279 updated.
3280 * mem-break.h (clone_all_breakpoints): Update declaration.
3281
9aa76cd0
YQ
32822016-07-21 Yao Qi <yao.qi@linaro.org>
3283
3284 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3285 <command_list, handler>: Remove.
3286 (struct gdb_breakpoint): New.
3287 (struct other_breakpoint): New.
3288 (struct reinsert_breakpoint): New.
3289 (is_gdb_breakpoint): New function.
3290 (any_persistent_commands): Update command_list if
3291 is_gdb_breakpoint returns true.
3292 (set_breakpoint): Create breakpoints according to their types.
3293 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3294 (set_gdb_breakpoint_1): Likewise.
3295 (set_gdb_breakpoint): Likewise.
3296 (clear_breakpoint_conditions): Change parameter type to
3297 'struct gdb_breakpoint *'.
3298 (clear_breakpoint_commands): Likewise.
3299 (clear_breakpoint_conditions_and_commands): Likewise.
3300 (add_condition_to_breakpoint): Likewise.
3301 (add_breakpoint_condition): Likewise.
3302 (add_commands_to_breakpoint): Likewise.
3303 (check_breakpoints): Check other_breakpoint.
3304 (clone_one_breakpoint): Clone breakpopint according to its type.
3305 * mem-break.h (struct gdb_breakpoint): Declare.
3306 (set_gdb_breakpoint): Update declaration.
3307 (clear_breakpoint_conditions_and_commands): Likewise.
3308 (add_breakpoint_condition): Likewise.
3309 (add_breakpoint_commands): Likewise.
3310 * server.c (process_point_options): Change parameter type to
3311 'struct gdb_breakpoint *'.
3312
811f8301
YQ
33132016-07-21 Yao Qi <yao.qi@linaro.org>
3314
3315 * mem-break.c (set_breakpoint_at): Rename it to ...
3316 (set_breakpoint_type_at): ... it.
3317 (set_breakpoint_at): Call set_breakpoint_type_at.
3318 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3319 * mem-break.h (set_breakpoint_at): Update comments.
3320
b1c51e36
CLT
33212016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3322
3323 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3324 to buf parameter.
3325 (nios2_store_gregset): Likewise.
3326
ced2dffb
PA
33272016-07-01 Pedro Alves <palves@redhat.com>
3328 Antoine Tremblay <antoine.tremblay@ericsson.com>
3329
3330 * linux-low.c: Change interface to take the target lwp_info
3331 pointer directly and return void. Handle detaching from a zombie
3332 thread.
3333 (linux_detach_lwp_callback): New function.
3334 (linux_detach): Detach from the leader thread after detaching from
3335 the clone threads.
3336
2ac09a5b
YQ
33372016-06-28 Yao Qi <yao.qi@linaro.org>
3338
3339 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3340 for variable new_offset.
3341 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3342 (aarch64_ftrace_insn_reloc_cb): Likewise.
3343 (aarch64_ftrace_insn_reloc_tb): Likewise.
3344 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3345 PRIx64 instead of PRIx32.
3346
79e7fd4f
YQ
33472016-06-28 Yao Qi <yao.qi@linaro.org>
3348
3349 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3350 (the_low_target): Install arm_get_syscall_trapinfo.
3351
061fc021
YQ
33522016-06-28 Yao Qi <yao.qi@linaro.org>
3353
3354 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3355 function.
3356 (the_low_target): Install aarch64_get_syscall_trapinfo.
3357
4cc32bec
YQ
33582016-06-28 Yao Qi <yao.qi@linaro.org>
3359
3360 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3361 Callers updated.
3362 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3363 Remove parameter sysno.
3364 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3365 sysret.
3366
782c1122
AA
33672016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3368
3369 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3370 (s390_emit_ne_goto): Likewise.
3371 (s390_emit_lt_goto): Likewise.
3372 (s390_emit_le_goto): Likewise.
3373 (s390_emit_gt_goto): Likewise.
3374 (s390_emit_ge_goto): Likewise.
3375 (s390x_emit_eq_goto): Likewise.
3376 (s390x_emit_ne_goto): Likewise.
3377 (s390x_emit_lt_goto): Likewise.
3378 (s390x_emit_le_goto): Likewise.
3379 (s390x_emit_gt_goto): Likewise.
3380 (s390x_emit_ge_goto): Likewise.
3381 (s390_emit_ops_impl): Mark variable static.
3382 (s390x_emit_ops): Likewise.
3383
2e7b624b
YQ
33842016-06-17 Yao Qi <yao.qi@linaro.org>
3385
3386 * linux-low.c (handle_extended_wait): Call
3387 uninsert_reinsert_breakpoints for the parent process. Remove
3388 reinsert breakpoints from the child process. Reinsert them to
3389 the parent process when vfork is done.
3390 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3391 (reinsert_reinsert_breakpoints): New function.
3392 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3393 (reinsert_reinsert_breakpoints): Declare.
3394
8a81c5d7
YQ
33952016-06-17 Yao Qi <yao.qi@linaro.org>
3396
3397 * linux-low.c (handle_extended_wait): If the parent is doing
3398 step-over, remove the reinsert breakpoints from the forked child.
3399
f50bf8e5
YQ
34002016-06-17 Yao Qi <yao.qi@linaro.org>
3401
3402 * linux-low.c (unsuspend_all_lwps): Declare.
3403 (linux_low_filter_event): If thread exited, call finish_step_over.
3404 If step-over is finished, unsuspend other threads.
3405
8376a3cb
YQ
34062016-06-17 Yao Qi <yao.qi@linaro.org>
3407
3408 * linux-low.c (linux_resume_one_lwp_throw): Assert
3409 has_reinsert_breakpoints returns false.
3410 * mem-break.c (delete_disabled_breakpoints): Assert
3411 bp type isn't reinsert_breakpoint.
3412
f79b145d
YQ
34132016-06-17 Yao Qi <yao.qi@linaro.org>
3414
3415 * linux-low.c (maybe_hw_step): New function.
3416 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3417 (finish_step_over): Switch current_thread to lwp temporarily,
3418 and assert has_reinsert_breakpoints returns true.
3419 (proceed_one_lwp): Call maybe_hw_step.
3420 * mem-break.c (has_reinsert_breakpoints): New function.
3421 * mem-break.h (has_reinsert_breakpoints): Declare.
3422
0ae534d2
JT
34232016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3424
3425 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3426
fcdad592
YQ
34272016-05-17 Yao Qi <yao.qi@linaro.org>
3428
3429 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3430 instead of find_inferior.
3431
9e784964
YQ
34322016-05-05 Yao Qi <yao.qi@linaro.org>
3433
3434 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3435 Initialize res to zero.
3436
cf2ebb6e
YQ
34372016-05-05 Yao Qi <yao.qi@linaro.org>
3438
3439 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3440 to uint32_t.
3441
c1aebf87
UW
34422016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3443
3444 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3445 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3446 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3447
35fd2deb 34482016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3449 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3450
3451 * tracepoint.c (write_inferior_int8): New function.
3452 (cmd_qtenable_disable): Write enable flag using
3453 write_inferior_int8.
3454
484b3c32
YQ
34552016-04-25 Yao Qi <yao.qi@linaro.org>
3456
3457 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3458 (need_step_over_p): Return zero if the LWP has pending signals
3459 can be delivered on software single step target.
3460
85ba7d86
YQ
34612016-04-25 Yao Qi <yao.qi@linaro.org>
3462
3463 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3464 return instead of error.
3465
3539aa13
YQ
34662016-04-22 Yao Qi <yao.qi@linaro.org>
3467
3468 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3469 to 23.
3470
5b061e98
YQ
34712016-04-22 Yao Qi <yao.qi@linaro.org>
3472
3473 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3474 signal when stepping over breakpoint with software single
3475 step.
3476
3451269c
PA
34772016-04-21 Pedro Alves <palves@redhat.com>
3478
3479 * linux-s390-low.c (s390_collect_ptrace_register)
3480 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3481 add casts.
3482 (s390_check_regset): Use void * instead of gdb_byte *.
3483
a2358508
PA
34842016-04-20 Pedro Alves <palves@redhat.com>
3485
3486 * configure: Renegerate.
3487
6885166d
YQ
34882016-04-20 Yao Qi <yao.qi@linaro.org>
3489
3490 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3491 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3492 number 16.
3493 (arm_store_gregset): Likewise.
3494
2b863f51
WT
34952016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3496
3497 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3498 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3499 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3500 (amd64-avx-mpx-linux.c): New rules.
3501 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3502 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3503 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3504 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3505 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3506 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3507 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3508 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3509 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3510 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3511 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3512 * linux-x86-low.c (x86_linux_read_description): Add case for
3513 X86_XSTATE_AVX_MPX_MASK.
3514 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3515 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3516 init_registers_i386_avx_mpx_linux.
3517 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3518 (initialize_low_tracepoint): Call
3519 init_registers_i386_avx_mpx_linux.
3520 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3521 (initialize_low_tracepoint): Call
3522 init_registers_amd64_avx_mpx_linux.
3523 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3524 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3525 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3526 declarations.
3527
9b30624b
PA
35282016-04-18 Pedro Alves <palves@redhat.com>
3529
3530 * configure: Regenerate.
3531
45e3745e
AT
35322016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3533
3534 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3535 (aarch64_emit_sub): Likewise.
3536
2afc13ff
PA
35372016-04-12 Pedro Alves <palves@redhat.com>
3538
3539 * utils.c (prepare_to_throw_exception): Delete.
3540
6e774b13
SM
35412016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3542
3543 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3544
4dca19f8
MK
35452016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3546
3547 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3548
d0a9981f
MK
35492016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3550
3551 * linux-aarch64-ipa.c: Add <elf.h> include.
3552 * linux-ppc-ipa.c: Add <elf.h> include.
3553 * linux-s390-ipa.c: Add <elf.h> include.
3554
252db07e
MK
35552016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3556
3557 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3558 (get_raw_reg_ptr): Likewise.
3559 (get_trace_state_variable_value_ptr): Likewise.
3560 (set_trace_state_variable_value_ptr): Likewise.
3561 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3562 char *.
3563
14e2b6d9
MK
35642016-03-31 Wei-cheng Wang <cole945@gmail.com>
3565 Marcin Kościelnicki <koriakin@0x04.net>
3566
3567 PR/17221
3568 * linux-ppc-low.c (emit_insns): New function.
3569 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3570 (ppc_emit_prologue): New function.
3571 (ppc_emit_epilogue): New function.
3572 (ppc_emit_add): New function.
3573 (ppc_emit_sub): New function.
3574 (ppc_emit_mul): New function.
3575 (ppc_emit_lsh): New function.
3576 (ppc_emit_rsh_signed): New function.
3577 (ppc_emit_rsh_unsigned): New function.
3578 (ppc_emit_ext): New function.
3579 (ppc_emit_zero_ext): New function.
3580 (ppc_emit_log_not): New function.
3581 (ppc_emit_bit_and): New function.
3582 (ppc_emit_bit_or): New function.
3583 (ppc_emit_bit_xor): New function.
3584 (ppc_emit_bit_not): New function.
3585 (ppc_emit_equal): New function.
3586 (ppc_emit_less_signed): New function.
3587 (ppc_emit_less_unsigned): New function.
3588 (ppc_emit_ref): New function.
3589 (ppc_emit_const): New function.
3590 (ppc_emit_reg): New function.
3591 (ppc_emit_pop): New function.
3592 (ppc_emit_stack_flush): New function.
3593 (ppc_emit_swap): New function.
3594 (ppc_emit_stack_adjust): New function.
3595 (ppc_emit_call): New function.
3596 (ppc_emit_int_call_1): New function.
3597 (ppc_emit_void_call_2): New function.
3598 (ppc_emit_if_goto): New function.
3599 (ppc_emit_goto): New function.
3600 (ppc_emit_eq_goto): New function.
3601 (ppc_emit_ne_goto): New function.
3602 (ppc_emit_lt_goto): New function.
3603 (ppc_emit_le_goto): New function.
3604 (ppc_emit_gt_goto): New function.
3605 (ppc_emit_ge_goto): New function.
3606 (ppc_write_goto_address): New function.
3607 (ppc_emit_ops_impl): New static variable.
3608 (ppc64v1_emit_prologue): New function.
3609 (ppc64v2_emit_prologue): New function.
3610 (ppc64_emit_epilogue): New function.
3611 (ppc64_emit_add): New function.
3612 (ppc64_emit_sub): New function.
3613 (ppc64_emit_mul): New function.
3614 (ppc64_emit_lsh): New function.
3615 (ppc64_emit_rsh_signed): New function.
3616 (ppc64_emit_rsh_unsigned): New function.
3617 (ppc64_emit_ext): New function.
3618 (ppc64_emit_zero_ext): New function.
3619 (ppc64_emit_log_not): New function.
3620 (ppc64_emit_bit_and): New function.
3621 (ppc64_emit_bit_or): New function.
3622 (ppc64_emit_bit_xor): New function.
3623 (ppc64_emit_bit_not): New function.
3624 (ppc64_emit_equal): New function.
3625 (ppc64_emit_less_signed): New function.
3626 (ppc64_emit_less_unsigned): New function.
3627 (ppc64_emit_ref): New function.
3628 (ppc64_emit_const): New function.
3629 (ppc64v1_emit_reg): New function.
3630 (ppc64v2_emit_reg): New function.
3631 (ppc64_emit_pop): New function.
3632 (ppc64_emit_stack_flush): New function.
3633 (ppc64_emit_swap): New function.
3634 (ppc64v1_emit_call): New function.
3635 (ppc64v2_emit_call): New function.
3636 (ppc64v1_emit_int_call_1): New function.
3637 (ppc64v2_emit_int_call_1): New function.
3638 (ppc64v1_emit_void_call_2): New function.
3639 (ppc64v2_emit_void_call_2): New function.
3640 (ppc64_emit_if_goto): New function.
3641 (ppc64_emit_eq_goto): New function.
3642 (ppc64_emit_ne_goto): New function.
3643 (ppc64_emit_lt_goto): New function.
3644 (ppc64_emit_le_goto): New function.
3645 (ppc64_emit_gt_goto): New function.
3646 (ppc64_emit_ge_goto): New function.
3647 (ppc64v1_emit_ops_impl): New static variable.
3648 (ppc64v2_emit_ops_impl): New static variable.
3649 (ppc_emit_ops): New function.
3650 (linux_low_target): Wire in ppc_emit_ops.
3651
a2174ba4
MK
36522016-03-31 Wei-cheng Wang <cole945@gmail.com>
3653 Marcin Kościelnicki <koriakin@0x04.net>
3654
3655 PR/17221
3656 * Makefile.in: Add powerpc-*-ipa.o
3657 * configure.srv: Add ipa_obj for powerpc*-linux.
3658 * linux-ppc-ipa.c: New file.
3659 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3660 includes.
3661 (PPC_FIELD): New macro.
3662 (PPC_SEXT): New macro.
3663 (PPC_OP6): New macro.
3664 (PPC_BO): New macro.
3665 (PPC_LI): New macro.
3666 (PPC_BD): New macro.
3667 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3668 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3669 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3670 (ppc_get_thread_area): New function.
3671 (is_elfv2_inferior): New function.
3672 (gen_ds_form): New function.
3673 (GEN_STD): New macro.
3674 (GEN_STDU): New macro.
3675 (GEN_LD): New macro.
3676 (GEN_LDU): New macro.
3677 (gen_d_form): New function.
3678 (GEN_ADDI): New macro.
3679 (GEN_ADDIS): New macro.
3680 (GEN_LI): New macro.
3681 (GEN_LIS): New macro.
3682 (GEN_ORI): New macro.
3683 (GEN_ORIS): New macro.
3684 (GEN_LWZ): New macro.
3685 (GEN_STW): New macro.
3686 (GEN_STWU): New macro.
3687 (gen_xfx_form): New function.
3688 (GEN_MFSPR): New macro.
3689 (GEN_MTSPR): New macro.
3690 (GEN_MFCR): New macro.
3691 (GEN_MTCR): New macro.
3692 (GEN_SYNC): New macro.
3693 (GEN_LWSYNC): New macro.
3694 (gen_x_form): New function.
3695 (GEN_OR): New macro.
3696 (GEN_MR): New macro.
3697 (GEN_LWARX): New macro.
3698 (GEN_STWCX): New macro.
3699 (GEN_CMPW): New macro.
3700 (gen_md_form): New function.
3701 (GEN_RLDICL): New macro.
3702 (GEN_RLDICR): New macro.
3703 (gen_i_form): New function.
3704 (GEN_B): New macro.
3705 (GEN_BL): New macro.
3706 (gen_b_form): New function.
3707 (GEN_BNE): New macro.
3708 (GEN_LOAD): New macro.
3709 (GEN_STORE): New macro.
3710 (gen_limm): New function.
3711 (gen_atomic_xchg): New function.
3712 (gen_call): New function.
3713 (ppc_relocate_instruction): New function.
3714 (ppc_install_fast_tracepoint_jump_pad): New function.
3715 (ppc_get_min_fast_tracepoint_insn_len): New function.
3716 (ppc_get_ipa_tdesc_idx): New function.
3717 (the_low_target): Wire in the new functions.
3718 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3719 tdescs.
3720 * linux-ppc-tdesc.h: New file.
3721
a13c4696
MK
37222016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3723
3724 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3725 (alloc_jump_pad_buffer): New function.
3726 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3727 (alloc_jump_pad_buffer): New function.
3728 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3729 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3730 (alloc_jump_pad_buffer): New function.
3731 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3732 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3733 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3734 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3735
1cda1512
MK
37362016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3737
3738 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3739 * linux-amd64-ipa.c: Likewise.
3740 * linux-i386-ipa.c: Likewise.
3741 * linux-s390-ipa.c: Likewise.
3742 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3743 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3744 set_trace_state_variable_value_ptr.
3745 (struct ipa_sym_addresses): Likewise.
3746 (symbol_list): Likewise.
3747 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3748 accessing gdb_collect directly.
3749 (gdb_collect_ptr_type): New typedef.
3750 (get_raw_reg_ptr_type): New typedef.
3751 (get_trace_state_variable_value_ptr_type): New typedef.
3752 (set_trace_state_variable_value_ptr_type): New typedef.
3753 (gdb_collect_ptr): New global.
3754 (get_raw_reg_ptr): New global.
3755 (get_trace_state_variable_value_ptr): New global.
3756 (set_trace_state_variable_value_ptr): New global.
3757 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3758 accessing get_raw_reg directly.
3759 (get_get_tsv_func_addr): Likewise for
3760 get_trace_state_variable_value_ptr.
3761 (get_set_tsv_func_addr): Likewise for
3762 set_trace_state_variable_value_ptr.
3763 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3764
72fb5488
SM
37652016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3766
3767 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3768
28170b88
MK
37692016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3770
3771 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3772 packets.
3773 (relocate_instruction): Remove own_buf.
3774 * server.c (own_buf): Make global.
3775 (handle_v_requests): Make global.
3776 * server.h (own_buf): New declaration.
3777 (handle_v_requests): New prototype.
3778
f39e8743
MK
37792016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3780
3781 PR 18377
3782 * linux-s390-low.c (add_insns): New function.
3783 (s390_emit_prologue): New function.
3784 (s390_emit_epilogue): New function.
3785 (s390_emit_add): New function.
3786 (s390_emit_sub): New function.
3787 (s390_emit_mul): New function.
3788 (s390_emit_lsh): New function.
3789 (s390_emit_rsh_signed): New function.
3790 (s390_emit_rsh_unsigned): New function.
3791 (s390_emit_ext): New function.
3792 (s390_emit_log_not): New function.
3793 (s390_emit_bit_and): New function.
3794 (s390_emit_bit_or): New function.
3795 (s390_emit_bit_xor): New function.
3796 (s390_emit_bit_not): New function.
3797 (s390_emit_equal): New function.
3798 (s390_emit_less_signed): New function.
3799 (s390_emit_less_unsigned): New function.
3800 (s390_emit_ref): New function.
3801 (s390_emit_if_goto): New function.
3802 (s390_emit_goto): New function.
3803 (s390_write_goto_address): New function.
3804 (s390_emit_litpool): New function.
3805 (s390_emit_const): New function.
3806 (s390_emit_call): New function.
3807 (s390_emit_reg): New function.
3808 (s390_emit_pop): New function.
3809 (s390_emit_stack_flush): New function.
3810 (s390_emit_zero_ext): New function.
3811 (s390_emit_swap): New function.
3812 (s390_emit_stack_adjust): New function.
3813 (s390_emit_set_r2): New function.
3814 (s390_emit_int_call_1): New function.
3815 (s390_emit_void_call_2): New function.
3816 (s390_emit_eq_goto): New function.
3817 (s390_emit_ne_goto): New function.
3818 (s390_emit_lt_goto): New function.
3819 (s390_emit_le_goto): New function.
3820 (s390_emit_gt_goto): New function.
3821 (s390_emit_ge_goto): New function.
3822 (s390x_emit_prologue): New function.
3823 (s390x_emit_epilogue): New function.
3824 (s390x_emit_add): New function.
3825 (s390x_emit_sub): New function.
3826 (s390x_emit_mul): New function.
3827 (s390x_emit_lsh): New function.
3828 (s390x_emit_rsh_signed): New function.
3829 (s390x_emit_rsh_unsigned): New function.
3830 (s390x_emit_ext): New function.
3831 (s390x_emit_log_not): New function.
3832 (s390x_emit_bit_and): New function.
3833 (s390x_emit_bit_or): New function.
3834 (s390x_emit_bit_xor): New function.
3835 (s390x_emit_bit_not): New function.
3836 (s390x_emit_equal): New function.
3837 (s390x_emit_less_signed): New function.
3838 (s390x_emit_less_unsigned): New function.
3839 (s390x_emit_ref): New function.
3840 (s390x_emit_if_goto): New function.
3841 (s390x_emit_const): New function.
3842 (s390x_emit_call): New function.
3843 (s390x_emit_reg): New function.
3844 (s390x_emit_pop): New function.
3845 (s390x_emit_stack_flush): New function.
3846 (s390x_emit_zero_ext): New function.
3847 (s390x_emit_swap): New function.
3848 (s390x_emit_stack_adjust): New function.
3849 (s390x_emit_int_call_1): New function.
3850 (s390x_emit_void_call_2): New function.
3851 (s390x_emit_eq_goto): New function.
3852 (s390x_emit_ne_goto): New function.
3853 (s390x_emit_lt_goto): New function.
3854 (s390x_emit_le_goto): New function.
3855 (s390x_emit_gt_goto): New function.
3856 (s390x_emit_ge_goto): New function.
3857 (s390_emit_ops): New function.
3858 (struct linux_target_ops): Fill in emit_ops hook.
3859
abd9baf9
MK
38602016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3861
3862 PR 18377
3863 * Makefile.in: Add s390 IPA files.
3864 * configure.srv: Build IPA for s390.
3865 * linux-s390-ipa.c: New file.
3866 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3867 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3868 (tdesc_s390_linux32): Likewise.
3869 (init_registers_s390_linux32v1): Likewise.
3870 (tdesc_s390_linux32v1): Likewise.
3871 (init_registers_s390_linux32v2): Likewise.
3872 (tdesc_s390_linux32v2): Likewise.
3873 (init_registers_s390_linux64): Likewise.
3874 (tdesc_s390_linux64): Likewise.
3875 (init_registers_s390_linux64v1): Likewise.
3876 (tdesc_s390_linux64v1): Likewise.
3877 (init_registers_s390_linux64v2): Likewise.
3878 (tdesc_s390_linux64v2): Likewise.
3879 (init_registers_s390_te_linux64): Likewise.
3880 (tdesc_s390_te_linux64): Likewise.
3881 (init_registers_s390_vx_linux64): Likewise.
3882 (tdesc_s390_vx_linux64): Likewise.
3883 (init_registers_s390_tevx_linux64): Likewise.
3884 (tdesc_s390_tevx_linux64): Likewise.
3885 (init_registers_s390x_linux64): Likewise.
3886 (tdesc_s390x_linux64): Likewise.
3887 (init_registers_s390x_linux64v1): Likewise.
3888 (tdesc_s390x_linux64v1): Likewise.
3889 (init_registers_s390x_linux64v2): Likewise.
3890 (tdesc_s390x_linux64v2): Likewise.
3891 (init_registers_s390x_te_linux64): Likewise.
3892 (tdesc_s390x_te_linux64): Likewise.
3893 (init_registers_s390x_vx_linux64): Likewise.
3894 (tdesc_s390x_vx_linux64): Likewise.
3895 (init_registers_s390x_tevx_linux64): Likewise.
3896 (tdesc_s390x_tevx_linux64): Likewise.
3897 (have_hwcap_s390_vx): New static variable.
3898 (s390_arch_setup): Fill have_hwcap_s390_vx.
3899 (s390_get_thread_area): New function.
3900 (s390_ft_entry_gpr_esa): New const.
3901 (s390_ft_entry_gpr_zarch): New const.
3902 (s390_ft_entry_misc): New const.
3903 (s390_ft_entry_fr): New const.
3904 (s390_ft_entry_vr): New const.
3905 (s390_ft_main_31): New const.
3906 (s390_ft_main_64): New const.
3907 (s390_ft_exit_fr): New const.
3908 (s390_ft_exit_vr): New const.
3909 (s390_ft_exit_misc): New const.
3910 (s390_ft_exit_gpr_esa): New const.
3911 (s390_ft_exit_gpr_zarch): New const.
3912 (append_insns): New function.
3913 (s390_relocate_instruction): New function.
3914 (s390_install_fast_tracepoint_jump_pad): New function.
3915 (s390_get_min_fast_tracepoint_insn_len): New function.
3916 (s390_get_ipa_tdesc_idx): New function.
3917 (struct linux_target_ops): Wire in the above functions.
3918 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3919 * linux-s390-tdesc.h: New file.
3920
a4105d04
MK
39212016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3922
3923 * linux-s390-low.c (s390_supports_tracepoints): New function.
3924 (struct linux_target_ops): Fill supports_tracepoints hook.
3925
35ac8b3e
YQ
39262016-03-18 Yao Qi <yao.qi@linaro.org>
3927
3928 * linux-low.c (lwp_signal_can_be_delivered): New function.
3929 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3930
94610ec4
YQ
39312016-03-18 Yao Qi <yao.qi@linaro.org>
3932
3933 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3934 0 if signal is enqueued. Remove 'signal' from one debugging
3935 message. Move one debugging message to some lines below.
3936 Remove code setting 'signal' to 0.
3937
80aea927
YQ
39382016-03-18 Yao Qi <yao.qi@linaro.org>
3939
3940 * linux-low.c (linux_low_filter_event): Remove redundant
3941 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3942
b04fd3be
MK
39432016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3944
3945 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3946 (struct linux_target_ops): Wire in the above.
3947
c40c8d4b
YQ
39482016-03-03 Yao Qi <yao.qi@linaro.org>
3949
3950 * linux-low.c: Update comments to start_step_over.
3951
0f8288ae
YQ
39522016-03-03 Yao Qi <yao.qi@linaro.org>
3953
3954 PR server/19736
3955 * linux-low.c (handle_extended_wait): Set child suspended
3956 if event_lwp->bp_reinsert isn't zero.
3957
fdbd04a8
YQ
39582016-03-02 Yao Qi <yao.qi@linaro.org>
3959
3960 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3961 enqueue_pending_signal.
3962
6896a8fa
MK
39632016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3964
3965 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3966 is actually loaded.
3967
ab503087
MK
39682016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3969
3970 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3971 (s390_regmap_3264) [!__s390x__]: New global.
3972 (s390_collect_ptrace_register): Skip map entries containing -1.
3973 (s390_supply_ptrace_register): Ditto.
3974 (s390_fill_gprs_high): New function.
3975 (s390_store_gprs_high): New function.
3976 (s390_regsets): Add NT_S390_HIGH_GPRS.
3977 (s390_get_hwcap): Enable on 31-bit.
3978 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3979 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3980 Detect NT_S390_HIGH_GPRS.
3981 (s390_usrregs_info_3264): Enable on 31-bit.
3982 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3983 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3984
ae91f625
MK
39852016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3986
3987 PR gdb/13808
3988 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3989 * configure.srv: Ditto.
3990 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3991 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3992 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3993 (init_registers_amd64_linux): Remove prototype.
3994 (tdesc_amd64_linux): Remove declaration.
3995 (get_ipa_tdesc): New function.
3996 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3997 initialize remaining tdescs.
3998 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3999 (init_registers_i386_linux): Remove prototype.
4000 (tdesc_i386_linux): Remove declaration.
4001 (get_ipa_tdesc): New function.
4002 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4003 initialize remaining tdescs.
4004 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4005 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4006 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4007 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4008 (x86_get_ipa_tdesc_idx): New function.
4009 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4010 * linux-x86-tdesc.h: New file.
4011 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4012 (target_get_ipa_tdesc_idx): New macro.
4013 * tracepoint.c (ipa_tdesc_idx): New macro.
4014 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4015 (symbol_list): Add ipa_tdesc_idx.
4016 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4017 (ipa_tdesc): Remove.
4018 (ipa_tdesc_idx): New variable.
4019 (get_context_regcache): Use get_ipa_tdesc.
4020 (gdb_collect): Ditto.
4021 (gdb_probe): Ditto.
4022 * tracepoint.h (get_ipa_tdesc): New prototype.
4023 (ipa_tdesc): Remove.
4024
e7ad2f14
PA
40252016-02-24 Pedro Alves <palves@redhat.com>
4026
4027 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4028 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4029 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4030 Factor out common code between the USE_SIGTRAP_SIGINFO and
4031 !USE_SIGTRAP_SIGINFO blocks.
4032 (linux_low_filter_event): Call save_stop_reason instead of
4033 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4034 Update comments.
4035 (linux_wait_1): Update comments.
4036
657f9cde
WW
40372016-02-24 Wei-cheng Wang <cole945@gmail.com>
4038
4039 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4040 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4041 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4042 ppc_insert_point, ppc_remove_point.
4043
b00b61e1
MK
40442016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4045
4046 * linux-s390-low.c (s390_supports_z_point_type): New function.
4047 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4048
553cb527
YQ
40492016-02-16 Yao Qi <yao.qi@linaro.org>
4050
4051 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4052 PC. Get pc from regcache_read_pc.
4053
a5652c21
YQ
40542016-02-12 Yao Qi <yao.qi@linaro.org>
4055
4056 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4057 or linux_get_pc_32bit.
4058 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4059
ed443b61
YQ
40602016-02-12 Yao Qi <yao.qi@linaro.org>
4061
4062 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4063 arm_linux_get_next_pcs_fixup.
4064
020ecd38
MK
40652016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4066
4067 * tracepoint.c (x_tracepoint_action_download): Change
4068 write_inferior_data_ptr to write_inferior_data_pointer.
4069 (cmd_qtstart): Likewise.
4070 (write_inferior_data_ptr): Remove.
4071 (download_agent_expr): Change write_inferior_data_ptr to
4072 write_inferior_data_pointer.
4073 (download_tracepoint_1): Likewise.
4074 (download_tracepoint): Likewise.
4075 (download_trace_state_variables): Likewise.
4076
7cae9051
WW
40772016-02-11 Wei-cheng Wang <cole945@gmail.com>
4078 Marcin Kościelnicki <koriakin@0x04.net>
4079
4080 * tracepoint.c (struct tracepoint_action_ops): Remove.
4081 (struct tracepoint_action): Remove ops.
4082 (m_tracepoint_action_download, r_tracepoint_action_download)
4083 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4084 size and offset accordingly.
4085 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4086 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4087 (tracepoint_action_send, tracepoint_action_download): New functions.
4088 Helpers for trace action handlers.
4089 (add_tracepoint_action): Remove setup actions ops.
4090 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4091
9f6a71b4
YQ
40922016-02-10 Yao Qi <yao.qi@linaro.org>
4093
4094 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4095
1e94266c
SM
40962016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4097
4098 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4099 to AC_OUTPUT.
4100 * configure: Regenerate.
4101
8adce034
SM
41022016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4103
4104 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4105 void * to gdb_byte *.
4106 * linux-low.c (siginfo_fixup): Likewise.
4107 (linux_xfer_siginfo): Likewise.
4108 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4109 Likewise.
4110 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4111
93813b37
WT
41122016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4113
4114 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4115 to srv_tgtobj.
4116 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4117 to srv_tgtobj.
4118 * linux-x86-low.c [__x86_64__]: Include
4119 "nat/amd64-linux-siginfo.h".
4120 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4121 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4122 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4123 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4124 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4125 (cpt_si_fd, si_timerid, si_overrun): Move from
4126 nat/amd64-linux-siginfo.c.
4127 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4128
8424cc97
SM
41292016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4130
4131 * server.c (skip_to_semicolon): Remove.
4132 (process_point_options): Use strchrnul instead of
4133 skip_to_semicolon.
4134
4d18591b
YQ
41352016-01-26 Yao Qi <yao.qi@linaro.org>
4136
4137 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4138 * linux-low.c (install_software_single_step_breakpoints): Don't
4139 call regcache_read_pc.
4140 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4141 argument pc.
4142
d8020970
YQ
41432016-01-26 Yao Qi <yao.qi@linaro.org>
4144
4145 * linux-low.c (install_software_single_step_breakpoints): Call
4146 regcache_read_pc instead of get_pc.
4147
8b207339
YQ
41482016-01-26 Yao Qi <yao.qi@linaro.org>
4149
4150 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4151 (unblock_async_io): Rename to ...
4152 (block_unblock_async_io): ... it. New function.
4153 (enable_async_io): Don't install SIGIO handler. Unblock it
4154 instead.
4155 (disable_async_io): Don't ignore SIGIO. Block it instead.
4156 (initialize_async_io): Install SIGIO handler. Don't call
4157 unblock_async_io.
4158
18879fef
YQ
41592016-01-26 Yao Qi <yao.qi@linaro.org>
4160
4161 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4162 first character is '\003', call *the_target->request_interrupt.
4163
a0f8e08a
YQ
41642016-01-25 Yao Qi <yao.qi@linaro.org>
4165
4166 * remote-utils.c (new_thread_notify): Remove.
4167 (dead_thread_notify): Likewise.
4168 * remote-utils.h (new_thread_notify): Remove declaration.
4169 (dead_thread_notify): Likewise.
4170
cc5fd9ab
MK
41712016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4172
4173 * gdb.trace/pending.exp: Fix expected message on continue.
4174
99e8eb11
MK
41752016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4176
4177 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4178 it works properly on big-endian machines where sizeof (CORE_ADDR)
4179 != sizeof (void *).
4180
a994041d
PA
41812016-01-21 Pedro Alves <palves@redhat.com>
4182
4183 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4184 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4185 * configure: Regenerate.
4186
f7a6a40d
YQ
41872016-01-21 Yao Qi <yao.qi@linaro.org>
4188
4189 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4190 is_thumb and set it according to CPSR saved on the stack.
4191 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4192 arm_sigreturn_next_pc.
4193
6f69e520
YQ
41942016-01-18 Yao Qi <yao.qi@linaro.org>
4195
4196 * linux-low.c (linux_set_pc_64bit): New function.
4197 (linux_get_pc_64bit): New function.
4198 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4199 Declare.
4200 * linux-sparc-low.c (debug_threads): Remove declaration.
4201 (sparc_get_pc): Remove.
4202 (the_low_target): Use linux_get_pc_64bit instead of
4203 sparc_get_pc.
4204 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4205 (the_low_target): Use linux_get_pc_64bit and
4206 linux_set_pc_64bit.
4207
276d4552
YQ
42082016-01-18 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-arm-low.c (debug_threads): Remove declaration.
4211 (arm_get_pc, arm_set_pc): Remove.
4212 (the_low_target): Use linux_get_pc_32bit and
4213 linux_set_pc_32bit.
4214 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4215 (the_low_target): Use linux_get_pc_32bit and
4216 linux_set_pc_32bit.
4217 * linux-cris-low.c (debug_threads): Remove declaration.
4218 (cris_get_pc, cris_set_pc,): Remove.
4219 (the_low_target): Use linux_get_pc_32bit and
4220 linux_set_pc_32bit.
4221 * linux-crisv32-low.c (debug_threads): Remove declaration.
4222 (cris_get_pc, cris_set_pc): Remove.
4223 (the_low_target): Use linux_get_pc_32bit and
4224 linux_set_pc_32bit.
4225 * linux-low.c: Include inttypes.h.
4226 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4227 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4228 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4229 (the_low_target): Use linux_get_pc_32bit and
4230 linux_set_pc_32bit.
4231 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4232 (the_low_target): Use linux_get_pc_32bit and
4233 linux_set_pc_32bit.
4234 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4235 (the_low_target): Use linux_get_pc_32bit and
4236 linux_set_pc_32bit.
4237 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4238 (the_low_target): Use linux_get_pc_32bit and
4239 linux_set_pc_32bit.
4240 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4241 (the_low_target): Use linux_get_pc_32bit and
4242 linux_set_pc_32bit.
4243
eb0edac8
GB
42442016-01-18 Gary Benson <gbenson@redhat.com>
4245
4246 * configure.ac (AC_FUNC_FORK): New check.
4247 * config.in: Regenerate.
4248 * configure: Likewise.
4249
1b451dda
YQ
42502016-01-14 Yao Qi <yao.qi@linaro.org>
4251
4252 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4253 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4254 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4255 arm_get_next_pcs_ctor.
4256
82075af2
JS
42572016-01-12 Josh Stone <jistone@redhat.com>
4258 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4259
4260 * inferiors.h: Include "gdb_vecs.h".
4261 (struct process_info): Add syscalls_to_catch.
4262 * inferiors.c (remove_process): Free syscalls_to_catch.
4263 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4264 syscall_return stops.
4265 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4266 * server.c (handle_general_set): Handle QCatchSyscalls.
4267 (handle_query): Report support for QCatchSyscalls.
4268 * target.h (struct target_ops): Add supports_catch_syscall.
4269 (target_supports_catch_syscall): New macro.
4270 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4271 (struct lwp_info): Add syscall_state.
4272 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4273 Maintain syscall_state and syscalls_to_catch across exec.
4274 (get_syscall_trapinfo): New function, proxy to the_low_target.
4275 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4276 (linux_low_filter_event): Toggle syscall_state entry/return for
4277 syscall traps, and set it ignored for all others.
4278 (gdb_catching_syscalls_p): New function.
4279 (gdb_catch_this_syscall_p): New function.
4280 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4281 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4282 (linux_supports_catch_syscall): New function.
4283 (linux_target_ops): Install it.
4284 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4285 (the_low_target): Install it.
4286
8f13a3ce
MF
42872016-01-12 Mike Frysinger <vapier@gentoo.org>
4288
4289 * acinclude.m4: Include new ../warning.m4 file.
4290 * configure: Regenerated.
4291 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4292
5b3da067
MF
42932016-01-12 Mike Frysinger <vapier@gentoo.org>
4294
4295 * ax.c (is_goto_target): Mark static.
4296 * linux-low.c (register_addr): Likewise.
4297 (linux_fetch_registers, linux_store_registers): Likewise.
4298 * mem-break.c (any_persistent_commands): Fix old prototype.
4299 (add_commands_to_breakpoint): Mark static.
4300 * regcache.c (find_register_by_name): Delete unused func.
4301 * remote-utils.c (hex_or_minus_one): Mark static.
4302 * server.c (monitor_show_help): Mark static.
4303 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4304 handle_v_requests): Likewise.
4305
bc504a31
PA
43062016-01-12 Pedro Alves <palves@redhat.com>
4307
4308 Remove use of the registered trademark symbol throughout.
4309
5a0dd67a
YQ
43102016-01-08 Yao Qi <yao.qi@linaro.org>
4311
4312 * remote-utils.c (getpkt): If c is '\003', call target hook
4313 request_interrupt.
4314
b2ca446f
YQ
43152016-01-06 Yao Qi <yao.qi@linaro.org>
4316
4317 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4318 linux-aarch32-low.c.
4319 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4320 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4321 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4322 (thumb2_breakpoint): Declare.
4323 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4324 linux-aarch32-low.h.
4325 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4326 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4327 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4328
edd88788
JB
43292016-01-01 Joel Brobecker <brobecker@adacore.com>
4330
4331 * gdbreplay.c (gdbreplay_version): Change copyright year in
4332 version message.
4333 * server.c (gdbserver_version): Likewise.
4334
65da7f14
PP
43352015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4336
4337 * server.c (crc32_table): Delete.
4338 (crc32): Use libiberty's xcrc32 function.
4339
4abd5ed2
JB
43402015-12-22 Joel Brobecker <brobecker@adacore.com>
4341
4342 * lynx-low.c (lynx_delete_thread_callback): New function.
4343 (lynx_mourn): Properly delete our process and all of its
4344 threads. Remove call to clear_inferiors.
4345
0e50fe5c
JB
43462015-12-22 Joel Brobecker <brobecker@adacore.com>
4347
4348 * target.c (thread_search_callback): Add check that
4349 the thread_stopped target callback is not NULL before
4350 calling it.
4351
35adc03f
YQ
43522015-12-21 Yao Qi <yao.qi@linaro.org>
4353
4354 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4355 arm breakpoint.
4356
bd2b2909
AT
43572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4358
4359 * server.c (handle_query): Call target_supports_software_single_step.
4360
7fe5e27e
AT
43612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4362
4363 * linux-low.c (single_step): New function.
4364 (linux_resume_one_lwp_throw): Call single_step.
4365 (start_step_over): Likewise.
4366
d9311bfa
AT
43672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4368
4369 * Makefile.in (SFILES): Append arch/arm-linux.c,
4370 arch/arm-get-next-pcs.c.
4371 (arm-linux.o): New rule.
4372 (arm-get-next-pcs.o): New rule.
4373 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4374 arm-linux.o.
4375 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4376 to 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): Make non-static.
4382 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4383 from linux-aarch32-low.c.
4384 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4385 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4386 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4387 (thumb2_breakpoint_len): Likewise.
4388 (arm_is_thumb_mode): New declaration.
4389 * linux-arm-low.c: Include arch/arm-linux.h
4390 aarch/arm-get-next-pcs.h, sys/syscall.h.
4391 (get_next_pcs_ops): New struct.
4392 (get_next_pcs_addr_bits_remove): New function.
4393 (get_next_pcs_is_thumb): New function.
4394 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4395 (arm_sigreturn_next_pc): Likewise.
4396 (get_next_pcs_syscall_next_pc): Likewise.
4397 (arm_gdbserver_get_next_pcs): Likewise.
4398 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4399 Initialize.
4400 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4401 * server.h: Include gdb_vecs.h.
4402
68ce2059
AT
44032015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4404
4405 * Makefile.in (SFILES): Append common/common-regcache.c.
4406 (OBS): Append common-regcache.o.
4407 (common-regcache.o): New rule.
4408 * regcache.c (init_register_cache): Initialize cache to
4409 REG_UNAVAILABLE.
4410 (regcache_raw_read_unsigned): New function.
4411 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4412 register_status enum.
4413
fa5308bd
AT
44142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4415
4416 * linux-aarch64-low.c (the_low_targets): Rename
4417 breakpoint_reinsert_addr to get_next_pcs.
4418 * linux-arm-low.c (the_low_targets): Likewise.
4419 * linux-bfin-low.c (the_low_targets): Likewise.
4420 * linux-cris-low.c (the_low_targets): Likewise.
4421 * linux-crisv32-low.c (the_low_targets): Likewise.
4422 * linux-low.c (can_software_single_step): Likewise.
4423 (install_software_single_step_breakpoints): New function.
4424 (start_step_over): Use install_software_single_step_breakpoints.
4425 * linux-low.h: New CORE_ADDR vector.
4426 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4427 get_next_pcs.
4428 * linux-mips-low.c (the_low_targets): Likewise.
4429 * linux-nios2-low.c (the_low_targets): Likewise.
4430 * linux-sparc-low.c (the_low_targets): Likewise.
4431
4a6ed09b
PA
44322015-12-17 Pedro Alves <palves@redhat.com>
4433
4434 * linux-low.c (linux_kill_one_lwp): Remove references to
4435 LinuxThreads.
4436 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4437 to 'kill'.
4438 (linux_init_signals): Delete.
4439 (initialize_low): Adjust.
4440 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4441
7544db95
PA
44422015-12-16 Pedro Alves <palves@redhat.com>
4443
4444 * configure.ac (compiler warning flags): When testing a
4445 -Wno-foo option, check whether -Wfoo works instead.
4446 * configure: Regenerate.
4447
8020350c
DB
44482015-12-11 Don Breazeal <donb@codesourcery.com>
4449
4450 * server.c (process_serial_event): Don't exit from gdbserver
4451 in remote mode if there are still active inferiors.
4452
db91f502
YQ
44532015-12-11 Yao Qi <yao.qi@linaro.org>
4454
4455 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4456 arm_breakpoint_at if the process is 32-bit.
4457
b37a6290
YQ
44582015-12-11 Yao Qi <yao.qi@linaro.org>
4459
4460 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4461 arm breakpoint.
4462
17b1509a
YQ
44632015-12-07 Yao Qi <yao.qi@linaro.org>
4464
4465 * configure.srv: Append arm.o to srv_tgtobj for
4466 aarch64*-*-linux* target.
4467 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4468 from linux-arm-low.c.
4469 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4470 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4471 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4472 (thumb2_breakpoint_len): Likewise.
4473 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4474 (arm_breakpoint_kinds): Likewise.
4475 (arm_breakpoint_kind_from_pc): Likewise.
4476 (arm_sw_breakpoint_from_kind): Likewise.
4477 (arm_breakpoint_kind_from_current_state): Likewise.
4478 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4479 (arm_sw_breakpoint_from_kind): Declare.
4480 (arm_breakpoint_kind_from_current_state): Declare.
4481 (arm_breakpoint_at): Declare.
4482 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4483 arm_sw_breakpoint_from_kind if process is 32-bit.
4484 (aarch64_breakpoint_kind_from_pc): New function.
4485 (aarch64_breakpoint_kind_from_current_state): New function.
4486 (the_low_target): Initialize fields breakpoint_kind_from_pc
4487 and breakpoint_kind_from_current_state.
4488 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4489 linux-aarch32-low.c.
4490 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4491 (arm_breakpoint, arm_breakpoint_len): Likewise.
4492 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4493 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4494 (arm_is_thumb_mode): Likewise.
4495 (arm_breakpoint_at): Likewise.
4496 (arm_breakpoint_kind_from_pc): Likewise.
4497 (arm_sw_breakpoint_from_kind): Likewise.
4498 (arm_breakpoint_kind_from_current_state): Likewise.
4499
4500 Revert:
4501 2015-08-04 Yao Qi <yao.qi@linaro.org>
4502
4503 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4504 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4505 * server.c (extended_protocol): Remove "static".
4506 * server.h (extended_protocol): Declare it.
4507
ece66d65
JS
45082015-12-04 Josh Stone <jistone@redhat.com>
4509
4510 * target.h (struct target_ops) <arch_setup>: Rename to ...
4511 (struct target_ops) <post_create_inferior>: ... this.
4512 (target_arch_setup): Rename to ...
4513 (target_post_create_inferior): ... this, calling post_create_inferior.
4514 * server.c (start_inferior): Update target_arch_setup calls to
4515 target_post_create_inferior.
4516 * linux-low.c (linux_low_ptrace_options): Forward declare.
4517 (linux_arch_setup): Update its comment for general use.
4518 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4519 (struct linux_target_ops): Use linux_post_create_inferior.
4520 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4521 to post_create_inferior.
4522 * nto-low.c (struct nto_target_ops): Likewise.
4523 * spu-low.c (struct spu_target_ops): Likewise.
4524 * win32-low.c (struct win32_target_ops): Likewise.
4525
e58c48b4
AT
45262015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4527
4528 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4529
fbec8956
AT
45302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4531
4532 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4533 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4534 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4535 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4536 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4537 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4538 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4539 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4540 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4541 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4542 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4543 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4544
9b4c5f87
AT
45452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4546
4547 * linux-low.c (linux_look_up_symbols): Don't call
4548 linux_supports_traceclone.
4549 * linux-low.h (thread_db_init): Remove use_events argument.
4550 * thread-db.c (thread_db_use_event): Remove global variable.
4551 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4552 (struct thread_db) <td_create_bp>: Remove field.
4553 (thread_db_create_event): Remove function.
4554 (thread_db_enable_reporting): Likewise.
4555 (find_one_thread): Don't check for thread_db_use_events.
4556 (attach_thread): Likewise.
4557 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4558 (try_thread_db_load_1): Don't check for thread_db_use_events.
4559 (thread_db_init): Remove use_events argument and thread events
4560 handling.
4561 (remove_thread_event_breakpoints): Remove function.
4562 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4563
7d00775e
AT
45642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4565
4566 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4567 New function.
4568 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4569 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4570 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4571 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4572 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4573 Initialize.
4574 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4575 New function.
4576 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4577 * linux-low.c (can_hardware_single_step): Use
4578 supports_hardware_single_step.
4579 (can_software_single_step): New function.
4580 (start_step_over): Call can_software_single_step.
4581 (linux_supports_hardware_single_step): New function.
4582 (struct target_ops) <supports_software_single_step>: Initialize.
4583 * linux-low.h (struct linux_target_ops)
4584 <supports_hardware_single_step>: Initialize.
4585 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4586 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4587 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4588 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4589 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4590 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4591 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4592 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4593 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4594 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4595 Initialize.
4596 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4597 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4598 Initialize.
4599 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4600 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4601 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4602 New function.
4603 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4604 * target.h (struct target_ops): <supports_software_single_step>:
4605 New field.
4606 (target_supports_software_single_step): New macro.
4607
2d97cd35
AT
46082015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4609
4610 * linux-low.c (linux_wait_1): Fix pc advance condition.
4611 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4612 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4613
769ef81f
AT
46142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4615
4616 * linux-arm-low.c (arm_is_thumb_mode): New function.
4617 (arm_breakpoint_at): Use arm_is_thumb_mode.
4618 (arm_breakpoint_kind_from_current_state): New function.
4619 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4620 Initialize.
4621 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4622 (linux_breakpoint_kind_from_current_state): New function.
4623 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4624 * linux-low.h (struct linux_target_ops)
4625 <breakpoint_kind_from_current_state>: New field.
4626 * target.h (struct target_ops): Likewise.
4627 (target_breakpoint_kind_from_current_state): New macro.
4628
1bebeeca
PA
46292015-11-30 Pedro Alves <palves@redhat.com>
4630
4631 * linux-low.c (linux_resume): Wake up the event loop before
4632 returning.
4633
a67a9fae
PA
46342015-11-30 Pedro Alves <palves@redhat.com>
4635
4636 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4637 check.
4638 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4639 to -1.
4640 * target.c (struct thread_search): New structure.
4641 (thread_search_callback): New function.
4642 (prev_general_thread): New global.
4643 (prepare_to_access_memory, done_accessing_memory): New functions.
4644 * target.h (prepare_to_access_memory, done_accessing_memory):
4645 Replace macros with function declarations.
4646
f2faf941
PA
46472015-11-30 Pedro Alves <palves@redhat.com>
4648
4649 PR 14618
4650 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4651 report TARGET_WAITKIND_NO_RESUMED.
4652 * remote-utils.c (prepare_resume_reply): Handle
4653 TARGET_WAITKIND_NO_RESUMED.
4654 * server.c (report_no_resumed): New global.
4655 (handle_query) <qSupported>: Handle "no-resumed+". Report
4656 "no-resumed+" support.
4657 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4658 return error if the client doesn't support no-resumed events.
4659 (push_stop_notification): New function.
4660 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4661 events if the client supports them.
4662
a681f9c9
PA
46632015-11-30 Pedro Alves <palves@redhat.com>
4664
4665 * linux-low.c (thread_still_has_status_pending_p): Don't check
4666 vCont;t here.
4667 (lwp_resumed): New function.
4668 (status_pending_p_callback): Return early if the LWP is not
4669 supposed to be resumed.
4670
65706a29
PA
46712015-11-30 Pedro Alves <palves@redhat.com>
4672
4673 * linux-low.c (handle_extended_wait): Assert that the LWP's
4674 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4675 thread create events, leave the new child's status pending.
4676 (linux_low_filter_event): If GDB wants to hear about thread exit
4677 events, leave the LWP marked dead and don't delete it.
4678 (linux_wait_for_event_filtered): Don't check for thread exit.
4679 (filter_exit_event): New function.
4680 (linux_wait_1): Use it, when returning an exit event.
4681 (linux_resume_one_lwp_throw): Assert that the LWP's
4682 waitstatus is TARGET_WAITKIND_IGNORE.
4683 * remote-utils.c (prepare_resume_reply): Handle
4684 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4685 * server.c (report_thread_events): New global.
4686 (handle_general_set): Handle QThreadEvents.
4687 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4688 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4689 TARGET_WAITKIND_THREAD_EXITED.
4690 * server.h (report_thread_events): Declare.
4691
56cf4bed
PA
46922015-11-30 Pedro Alves <palves@redhat.com>
4693
4694 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4695 the thread's last_resume_kind was resume_stop.
4696
500c1d85
PA
46972015-11-30 Pedro Alves <palves@redhat.com>
4698
4699 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4700 before returning.
4701
de979965
PA
47022015-11-30 Pedro Alves <palves@redhat.com>
4703
4704 * server.c (handle_v_requests): Handle vCtrlC.
4705
34c65914
PA
47062015-11-30 Pedro Alves <palves@redhat.com>
4707
4708 * gdbthread.h (find_any_thread_of_pid): Declare.
4709 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4710 functions.
4711 * server.c (handle_query): If current_thread is NULL, look for
4712 another thread of the selected process.
4713
79efa585 47142015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4715 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4716
4717 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4718 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4719 name in reply.
4720 * target.h (struct target_ops) <thread_name>: New field.
4721 (target_thread_name): New macro.
4722
80d82c19
JB
47232015-11-23 Joel Brobecker <brobecker@adacore.com>
4724
4725 * regcache.h (regcache_invalidate_pid): Add declaration.
4726 * regcache.c (regcache_invalidate_pid): New function, extracted
4727 from regcache_invalidate.
4728 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4729 Add trivial documentation comment.
4730 * lynx-low.c: Use regcache_invalidate_pid instead of
4731 regcache_invalidate.
4732
64da5dd5
JB
47332015-11-23 Joel Brobecker <brobecker@adacore.com>
4734
4735 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4736 and Elf64_auxv_t if the target is Android.
4737
37ce4055
DE
47382015-11-22 Doug Evans <xdje42@gmail.com>
4739
4740 * target.h: #include <sys/types.h>.
4741
06e03fff
PA
47422015-11-19 Pedro Alves <palves@redhat.com>
4743
4744 * linux-low.c (linux_process_qsupported): Change prototype.
4745 Adjust.
4746 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4747 Change prototype.
4748 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4749 and adjust to loop over all features.
4750 * server.c (handle_query) <qSupported>: Adjust to call
4751 target_process_qsupported once, passing it a vector of unprocessed
4752 features.
4753 * target.h (struct target_ops) <process_qsupported>: Change
4754 prototype.
4755 (target_process_qsupported): Adjust.
4756
9a084706
PA
47572015-11-19 Pedro Alves <palves@redhat.com>
4758
4759 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4760 mode.
4761 * configure: Regenerate.
4762
dad44a1f
PA
47632015-11-19 Pedro Alves <palves@redhat.com>
4764
4765 * configure: Regenerate.
4766
231c0592
YQ
47672015-11-19 Yao Qi <yao.qi@linaro.org>
4768
4769 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4770 type to uint32_t.
4771
6c1c9a8b
YQ
47722015-11-19 Yao Qi <yao.qi@linaro.org>
4773
4774 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4775 (struct aarch64_operand): Move enum out.
4776
9caa3311
YQ
47772015-11-19 Yao Qi <yao.qi@linaro.org>
4778
4779 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4780 struct user_fpsimd_state *.
4781 (aarch64_store_fpregset): Likewise.
4782
6a69a054
YQ
47832015-11-19 Yao Qi <yao.qi@linaro.org>
4784
4785 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4786 struct user_pt_regs *.
4787 (aarch64_store_gregset): Likewise.
4788
1798301e
PA
47892015-11-18 Pedro Alves <palves@redhat.com>
4790
4791 * Makefile.in (all_object_files): Add $IPA_OBJS.
4792
ce7715e2
PA
47932015-11-17 Pedro Alves <palves@redhat.com>
4794
4795 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4796 GDB_SIGNAL_0 and gdb_signal_to_string.
4797
c0879059
PA
47982015-11-17 Pedro Alves <palves@redhat.com>
4799
4800 * win32-low.c (handle_output_debug_string): Remove parameter.
4801 (win32_kill): Remove our_status local and adjust call to
4802 handle_output_debug_string.
4803 (get_child_debug_event): Adjust call to
4804 handle_output_debug_string.
4805
1996e237
SM
48062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4807
4808 * linux-mips-low.c (mips_fill_gregset): Add cast.
4809 (mips_store_gregset): Likewise.
4810 (mips_fill_fpregset): Likewise.
4811 (mips_store_fpregset): Likewise.
4812
cbec665b
SM
48132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4814
4815 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4816 priv.
4817
eb3e3c67
SM
48182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4819
4820 * linux-mips-low.c (mips_linux_new_thread): Change type of
4821 watch_type to enum target_hw_bp_type.
4822
171de4b8
SM
48232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4824
4825 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4826 Change return type to arm_hwbp_type.
4827
04248ead
SM
48282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4829
4830 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4831 (arm_store_gregset): Likewise.
4832 * linux-arm-low.c (arm_get_hwcap): Likewise.
4833 (arm_read_description): Likewise.
4834
04b3479c
SM
48352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4836
4837 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4838
2bc84e8a
SM
48392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4840
4841 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4842 (ppc_fill_vsxregset): Likewise.
4843 (ppc_store_vsxregset): Likewise.
4844 (ppc_fill_vrregset): Likewise.
4845 (ppc_store_vrregset): Likewise.
4846 (ppc_fill_evrregset): Likewise.
4847 (ppc_store_evrregset): Likewise.
4848
e6c5bb05
SM
48492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4850
4851 * linux-ppc-low.c (ppc_usrregs_info): Remove
4852 forward-declaration.
4853 (ppc_arch_setup): Move lower in file.
4854
7ea45d72
SM
48552015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4856
4857 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4858 (ps_pdwrite): Likewise.
4859
69291610
HW
48602015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4861
4862 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4863 to after assert checks.
4864
b42945fd
SM
48652015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4866
4867 * proc-service.c (ps_pdread): Add/adjust casts.
4868 (ps_pdwrite): Add/adjust casts.
4869
d6f85c84
SM
48702015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4871
4872 * server.c (handle_search_memory_1): Cast return value of
4873 memmem.
4874
f98cd059
SM
48752015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4876
4877 * server.c (write_qxfer_response): Change type of data to
4878 gdb_byte *.
4879
d2412fa5
PA
48802015-10-29 Pedro Alves <palves@redhat.com>
4881
4882 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4883
c17414a2
PA
48842015-10-29 Pedro Alves <palves@redhat.com>
4885
4886 * tracepoint.c (clear_installed_tracepoints): Add casts.
4887
e053fbc4
PA
48882015-10-29 Pedro Alves <palves@redhat.com>
4889
4890 * server.c (handle_v_cont, process_serial_event): Add enum
4891 gdb_signal casts to signal parsing code.
4892
add67df8
PA
48932015-10-29 Pedro Alves <palves@redhat.com>
4894
4895 * linux-low.h (NULL_REGSET): Define.
4896 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4897 * linux-arm-low.c (arm_regsets): Likewise.
4898 * linux-crisv32-low.c (cris_regsets): Likewise.
4899 * linux-m68k-low.c (m68k_regsets): Likewise.
4900 * linux-mips-low.c (mips_regsets): Likewise.
4901 * linux-nios2-low.c (nios2_regsets): Likewise.
4902 * linux-ppc-low.c (ppc_regsets): Likewise.
4903 * linux-s390-low.c (s390_regsets): Likewise.
4904 * linux-sh-low.c (sh_regsets): Likewise.
4905 * linux-sparc-low.c (sparc_regsets): Likewise.
4906 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4907 * linux-tile-low.c (tile_regsets): Likewise.
4908 * linux-x86-low.c (x86_regsets): Likewise.
4909 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4910
50bc912a
PA
49112015-10-29 Pedro Alves <palves@redhat.com>
4912
4913 * linux-low.h (NULL_REGSET): Define.
4914 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4915 * linux-arm-low.c (arm_regsets): Likewise.
4916 * linux-crisv32-low.c (cris_regsets): Likewise.
4917 * linux-m68k-low.c (m68k_regsets): Likewise.
4918 * linux-mips-low.c (mips_regsets): Likewise.
4919 * linux-nios2-low.c (nios2_regsets): Likewise.
4920 * linux-ppc-low.c (ppc_regsets): Likewise.
4921 * linux-s390-low.c (s390_regsets): Likewise.
4922 * linux-sh-low.c (sh_regsets): Likewise.
4923 * linux-sparc-low.c (sparc_regsets): Likewise.
4924 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4925 * linux-tile-low.c (tile_regsets): Likewise.
4926 * linux-x86-low.c (x86_regsets): Likewise.
4927 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4928
682b2546
DE
49292015-10-26 Doug Evans <dje@google.com>
4930
4931 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4932
963843d4
DE
49332015-10-26 Doug Evans <dje@google.com>
4934
4935 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4936
d41401ac
DE
49372015-10-26 Doug Evans <dje@google.com>
4938
4939 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4940 for debug_printf.
4941 (attach_thread, find_new_threads_callback): Ditto.
4942
3db28855
AT
49432015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4944
4945 * mem-break.h (set_breakpoint_data): Remove.
4946
fb78e89c
AT
49472015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4948
4949 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4950 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4951 (initialize_low): Remove set_breakpoint_data call.
4952 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4953 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4954 (initialize_low): Remove set_breakpoint_data call.
4955 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4956 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4957 (initialize_low): Remove set_breakpoint_data call.
4958
2e6ee069
AT
49592015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4960
4961 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4962 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4963 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4964 * target.h (target_breakpoint_kind_from_pc): New macro.
4965
1652a986
AT
49662015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4967
4968 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4969 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4970 the default breakpoint kind.
4971
abeead09
AT
49722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4973
4974 * linux-arm-low.c (arm_supports_z_point_type): Add software
4975 breakpoint support.
4976
b0b4b501
AT
49772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4978
4979 * linux-arm-low.c: Refactor breakpoint definitions.
4980 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4981 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4982
8689682c
AT
49832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4984
4985 * Makefile.in: Add arm.c/o.
4986 * configure.srv: Likewise.
4987 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4988 (arm_breakpoint_kind_from_pc): New function.
4989 (arm_sw_breakpoint_from_kind): Return proper kind.
4990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4991
27165294
AT
49922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4993
4994 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4995 removal.
4996 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4997 (struct raw_breakpoint) <size>: Remove.
4998 (struct raw_breakpoint) <kind>: Add.
4999 (bp_size): New function.
5000 (bp_opcode): Likewise.
5001 (find_raw_breakpoint_at): Adjust for kind.
5002 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5003 (remove_memory_breakpoint): Adjust for kind call bp_size.
5004 (set_raw_breakpoint_at): Adjust for kind.
5005 (set_breakpoint): Likewise.
5006 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5007 (delete_raw_breakpoint): Adjust for kind.
5008 (delete_breakpoint): Likewise.
5009 (find_gdb_breakpoint): Likewise.
5010 (set_gdb_breakpoint_1): Likewise.
5011 (set_gdb_breakpoint): Likewise.
5012 (delete_gdb_breakpoint_1): Likewise.
5013 (delete_gdb_breakpoint): Likewise.
5014 (uninsert_raw_breakpoint): Likewise.
5015 (reinsert_raw_breakpoint): Likewise.
5016 (set_breakpoint_data): Remove.
5017 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5018 (check_mem_read): Adjust for kind call bp_size.
5019 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5020 (clone_one_breakpoint): Adjust for kind.
5021 * mem-break.h (set_gdb_breakpoint): Likewise.
5022 (delete_gdb_breakpoint): Likewise.
5023 * server.c (process_serial_event): Likewise.
5024
dd373349
AT
50252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5026
5027 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5033 (arm_sw_breakpoint_from_kind): New function.
5034 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5035 (struct linux_target_ops) <breakpoint>: Remove.
5036 (struct linux_target_ops) <breakpoint_len>: Remove.
5037 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5038 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5039 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5040 (struct linux_target_ops) <breakpoint>: Remove.
5041 (struct linux_target_ops) <breakpoint_len>: Remove.
5042 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5043 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5044 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5045 (struct linux_target_ops) <breakpoint>: Remove.
5046 (struct linux_target_ops) <breakpoint_len>: Remove.
5047 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5048 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5049 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5050 and sw_breakpoint_from_kind to increment the pc.
5051 (linux_breakpoint_kind_from_pc): New function.
5052 (linux_sw_breakpoint_from_kind): New function.
5053 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5054 (initialize_low): Call breakpoint_kind_from_pc and
5055 sw_breakpoint_from_kind to replace breakpoint_data/len.
5056 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5057 New field.
5058 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5059 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5060 (struct linux_target_ops) <breakpoint>: Remove.
5061 (struct linux_target_ops) <breakpoint_len>: Remove.
5062 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5063 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5064 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5065 (struct linux_target_ops) <breakpoint>: Remove.
5066 (struct linux_target_ops) <breakpoint_len>: Remove.
5067 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5068 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5069 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5070 (struct linux_target_ops) <breakpoint>: Remove.
5071 (struct linux_target_ops) <breakpoint_len>: Remove.
5072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5073 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5074 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5075 (struct linux_target_ops) <breakpoint>: Remove.
5076 (struct linux_target_ops) <breakpoint_len>: Remove.
5077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5079 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5080 (struct linux_target_ops) <breakpoint>: Remove.
5081 (struct linux_target_ops) <breakpoint_len>: Remove.
5082 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5083 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5084 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5085 (struct linux_target_ops) <breakpoint>: Remove.
5086 (struct linux_target_ops) <breakpoint_len>: Remove.
5087 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5088 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5089 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5090 (struct linux_target_ops) <breakpoint>: Remove.
5091 (struct linux_target_ops) <breakpoint_len>: Remove.
5092 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5093 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5094 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5095 (struct linux_target_ops) <breakpoint>: Remove.
5096 (struct linux_target_ops) <breakpoint_len>: Remove.
5097 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5098 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5099 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5100 (struct linux_target_ops) <breakpoint>: Remove.
5101 (struct linux_target_ops) <breakpoint_len>: Remove.
5102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5103 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5104 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5105 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5106 (struct linux_target_ops) <breakpoint>: Remove.
5107 (struct linux_target_ops) <breakpoint_len>: Remove.
5108 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5109 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5110 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5111 (struct linux_target_ops) <breakpoint>: Remove.
5112 (struct linux_target_ops) <breakpoint_len>: Remove.
5113 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5115
4cd98a19
AT
51162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5117
5118 * linux-cris-low.c (cris_get_pc): Remove void arg.
5119
774ee6d2
AR
51202015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5121
5122 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5123 variable name.
5124
833dcd29
AR
51252015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5126
5127 * inferiors.c (thread_pid_matches_callback): New function.
5128 (find_thread_process): New function.
5129 (remove_thread): Reset current_thread.
5130 (remove_process): Assert threads have been removed first.
5131
8d689ee5
YQ
51322015-10-15 Yao Qi <yao.qi@linaro.org>
5133
5134 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5135 if it is 3.
5136 (aarch64_remove_point): Likewise.
5137 * regcache.c (regcache_register_size): New function.
5138
1c2e1515
YQ
51392015-10-12 Yao Qi <yao.qi@linaro.org>
5140
5141 * linux-aarch64-low.c: Update all callers as emit_load_store
5142 is renamed to aarch64_emit_load_store.
5143
e1c587c3
YQ
51442015-10-12 Yao Qi <yao.qi@linaro.org>
5145
5146 * linux-aarch64-low.c: Update all callers of function renaming
5147 from emit_insn to aarch64_emit_insn.
5148
b6542f81
YQ
51492015-10-12 Yao Qi <yao.qi@linaro.org>
5150
5151 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5152 arch/aarch64-insn.h.
5153 (struct aarch64_memory_operand): Likewise.
5154 (ENCODE): Likewise.
5155 (emit_insn): Move to arch/aarch64-insn.c.
5156 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5157 (emit_load_store): Move to arch/aarch64-insn.c.
5158 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5159 (can_encode_int32): Remove.
5160
246994ce
YQ
51612015-10-12 Yao Qi <yao.qi@linaro.org>
5162
5163 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5164 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5165 (aarch64_relocate_instruction): Likewise.
5166 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5167 (struct aarch64_insn_visitor): Likewise.
5168
0badd99f
YQ
51692015-10-12 Yao Qi <yao.qi@linaro.org>
5170
5171 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5172 (struct aarch64_insn_visitor): New.
5173 (struct aarch64_insn_relocation_data): New.
5174 (aarch64_ftrace_insn_reloc_b): New function.
5175 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5176 (aarch64_ftrace_insn_reloc_cb): Likewise.
5177 (aarch64_ftrace_insn_reloc_tb): Likewise.
5178 (aarch64_ftrace_insn_reloc_adr): Likewise.
5179 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5180 (aarch64_ftrace_insn_reloc_others): Likewise.
5181 (visitor): New.
5182 (aarch64_relocate_instruction): Use visitor.
5183
dfaffe9d
YQ
51842015-10-12 Yao Qi <yao.qi@linaro.org>
5185
5186 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5187 int. Add argument buf.
5188 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5189 aarch64_relocate_instruction.
5190
70b439f0
YQ
51912015-10-12 Yao Qi <yao.qi@linaro.org>
5192
5193 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5194 argument insn. Remove local variable insn. Don't call
5195 target_read_uint32.
5196 (aarch64_install_fast_tracepoint_jump_pad): Call
5197 target_read_uint32.
5198
7781c06f
YQ
51992015-09-30 Yao Qi <yao.qi@linaro.org>
5200
5201 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5202 (emit_load_store_pair): Likewise.
5203
9a3c8263
SM
52042015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5205
5206 * dll.c (match_dll): Add cast(s).
5207 (unloaded_dll): Likewise.
5208 * linux-low.c (second_thread_of_pid_p): Likewise.
5209 (delete_lwp_callback): Likewise.
5210 (count_events_callback): Likewise.
5211 (select_event_lwp_callback): Likewise.
5212 (linux_set_resume_request): Likewise.
5213 * server.c (accumulate_file_name_length): Likewise.
5214 (emit_dll_description): Likewise.
5215 (handle_qxfer_threads_worker): Likewise.
5216 (visit_actioned_threads): Likewise.
5217 * thread-db.c (any_thread_of): Likewise.
5218 * tracepoint.c (same_process_p): Likewise.
5219 (match_blocktype): Likewise.
5220 (build_traceframe_info_xml): Likewise.
5221
224c3ddb
SM
52222015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5223
5224 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5225 assignment.
5226 (gdb_unparse_agent_expr): Likewise.
5227 * hostio.c (require_data): Likewise.
5228 (handle_pread): Likewise.
5229 * linux-low.c (disable_regset): Likewise.
5230 (fetch_register): Likewise.
5231 (store_register): Likewise.
5232 (get_dynamic): Likewise.
5233 (linux_qxfer_libraries_svr4): Likewise.
5234 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5235 (set_fast_tracepoint_jump): Likewise.
5236 (uninsert_fast_tracepoint_jumps_at): Likewise.
5237 (reinsert_fast_tracepoint_jumps_at): Likewise.
5238 (validate_inserted_breakpoint): Likewise.
5239 (clone_agent_expr): Likewise.
5240 * regcache.c (init_register_cache): Likewise.
5241 * remote-utils.c (putpkt_binary_1): Likewise.
5242 (decode_M_packet): Likewise.
5243 (decode_X_packet): Likewise.
5244 (look_up_one_symbol): Likewise.
5245 (relocate_instruction): Likewise.
5246 (monitor_output): Likewise.
5247 * server.c (handle_search_memory): Likewise.
5248 (handle_qxfer_exec_file): Likewise.
5249 (handle_qxfer_libraries): Likewise.
5250 (handle_qxfer): Likewise.
5251 (handle_query): Likewise.
5252 (handle_v_cont): Likewise.
5253 (handle_v_run): Likewise.
5254 (captured_main): Likewise.
5255 * target.c (write_inferior_memory): Likewise.
5256 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5257 * tracepoint.c (init_trace_buffer): Likewise.
5258 (add_tracepoint_action): Likewise.
5259 (add_traceframe): Likewise.
5260 (add_traceframe_block): Likewise.
5261 (cmd_qtdpsrc): Likewise.
5262 (cmd_qtdv): Likewise.
5263 (cmd_qtstatus): Likewise.
5264 (response_source): Likewise.
5265 (response_tsv): Likewise.
5266 (cmd_qtnotes): Likewise.
5267 (gdb_collect): Likewise.
5268 (initialize_tracepoint): Likewise.
5269
afbe19f8
PL
52702015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5271
5272 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5273 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5274 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5275 <NOP>: New.
5276 (enum aarch64_condition_codes): New enum.
5277 (w0): New static global.
5278 (fp): Likewise.
5279 (lr): Likewise.
5280 (struct aarch64_memory_operand) <type>: New
5281 MEMORY_OPERAND_POSTINDEX type.
5282 (postindex_memory_operand): New helper function.
5283 (emit_ret): New function.
5284 (emit_load_store_pair): New function, factored out of emit_stp
5285 with support for MEMORY_OPERAND_POSTINDEX.
5286 (emit_stp): Rewrite using emit_load_store_pair.
5287 (emit_ldp): New function.
5288 (emit_load_store): Likewise.
5289 (emit_ldr): Mention post-index instruction in comment.
5290 (emit_ldrh): New function.
5291 (emit_ldrb): New function.
5292 (emit_ldrsw): Mention post-index instruction in comment.
5293 (emit_str): Likewise.
5294 (emit_subs): New function.
5295 (emit_cmp): Likewise.
5296 (emit_and): Likewise.
5297 (emit_orr): Likewise.
5298 (emit_orn): Likewise.
5299 (emit_eor): Likewise.
5300 (emit_mvn): Likewise.
5301 (emit_lslv): Likewise.
5302 (emit_lsrv): Likewise.
5303 (emit_asrv): Likewise.
5304 (emit_mul): Likewise.
5305 (emit_sbfm): Likewise.
5306 (emit_sbfx): Likewise.
5307 (emit_ubfm): Likewise.
5308 (emit_ubfx): Likewise.
5309 (emit_csinc): Likewise.
5310 (emit_cset): Likewise.
5311 (emit_nop): Likewise.
5312 (emit_ops_insns): New helper function.
5313 (emit_pop): Likewise.
5314 (emit_push): Likewise.
5315 (aarch64_emit_prologue): New function.
5316 (aarch64_emit_epilogue): Likewise.
5317 (aarch64_emit_add): Likewise.
5318 (aarch64_emit_sub): Likewise.
5319 (aarch64_emit_mul): Likewise.
5320 (aarch64_emit_lsh): Likewise.
5321 (aarch64_emit_rsh_signed): Likewise.
5322 (aarch64_emit_rsh_unsigned): Likewise.
5323 (aarch64_emit_ext): Likewise.
5324 (aarch64_emit_log_not): Likewise.
5325 (aarch64_emit_bit_and): Likewise.
5326 (aarch64_emit_bit_or): Likewise.
5327 (aarch64_emit_bit_xor): Likewise.
5328 (aarch64_emit_bit_not): Likewise.
5329 (aarch64_emit_equal): Likewise.
5330 (aarch64_emit_less_signed): Likewise.
5331 (aarch64_emit_less_unsigned): Likewise.
5332 (aarch64_emit_ref): Likewise.
5333 (aarch64_emit_if_goto): Likewise.
5334 (aarch64_emit_goto): Likewise.
5335 (aarch64_write_goto_address): Likewise.
5336 (aarch64_emit_const): Likewise.
5337 (aarch64_emit_call): Likewise.
5338 (aarch64_emit_reg): Likewise.
5339 (aarch64_emit_pop): Likewise.
5340 (aarch64_emit_stack_flush): Likewise.
5341 (aarch64_emit_zero_ext): Likewise.
5342 (aarch64_emit_swap): Likewise.
5343 (aarch64_emit_stack_adjust): Likewise.
5344 (aarch64_emit_int_call_1): Likewise.
5345 (aarch64_emit_void_call_2): Likewise.
5346 (aarch64_emit_eq_goto): Likewise.
5347 (aarch64_emit_ne_goto): Likewise.
5348 (aarch64_emit_lt_goto): Likewise.
5349 (aarch64_emit_le_goto): Likewise.
5350 (aarch64_emit_gt_goto): Likewise.
5351 (aarch64_emit_ge_got): Likewise.
5352 (aarch64_emit_ops_impl): New static global variable.
5353 (aarch64_emit_ops): New target function, return
5354 &aarch64_emit_ops_impl.
5355 (struct linux_target_ops): Install it.
5356
bb903df0
PL
53572015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5358
5359 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5360 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5361 aarch64-ipa.o.
5362 * linux-aarch64-ipa.c: New file.
5363 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5364 and endian.h.
5365 (aarch64_get_thread_area): New target method.
5366 (extract_signed_bitfield): New helper function.
5367 (aarch64_decode_ldr_literal): New function.
5368 (enum aarch64_opcodes): New enum.
5369 (struct aarch64_register): New struct.
5370 (struct aarch64_operand): New struct.
5371 (x0): New static global.
5372 (x1): Likewise.
5373 (x2): Likewise.
5374 (x3): Likewise.
5375 (x4): Likewise.
5376 (w2): Likewise.
5377 (ip0): Likewise.
5378 (sp): Likewise.
5379 (xzr): Likewise.
5380 (aarch64_register): New helper function.
5381 (register_operand): Likewise.
5382 (immediate_operand): Likewise.
5383 (struct aarch64_memory_operand): New struct.
5384 (offset_memory_operand): New helper function.
5385 (preindex_memory_operand): Likewise.
5386 (enum aarch64_system_control_registers): New enum.
5387 (ENCODE): New macro.
5388 (emit_insn): New helper function.
5389 (emit_b): New function.
5390 (emit_bcond): Likewise.
5391 (emit_cb): Likewise.
5392 (emit_tb): Likewise.
5393 (emit_blr): Likewise.
5394 (emit_stp): Likewise.
5395 (emit_ldp_q_offset): Likewise.
5396 (emit_stp_q_offset): Likewise.
5397 (emit_load_store): Likewise.
5398 (emit_ldr): Likewise.
5399 (emit_ldrsw): Likewise.
5400 (emit_str): Likewise.
5401 (emit_ldaxr): Likewise.
5402 (emit_stxr): Likewise.
5403 (emit_stlr): Likewise.
5404 (emit_data_processing_reg): Likewise.
5405 (emit_data_processing): Likewise.
5406 (emit_add): Likewise.
5407 (emit_sub): Likewise.
5408 (emit_mov): Likewise.
5409 (emit_movk): Likewise.
5410 (emit_mov_addr): Likewise.
5411 (emit_mrs): Likewise.
5412 (emit_msr): Likewise.
5413 (emit_sevl): Likewise.
5414 (emit_wfe): Likewise.
5415 (append_insns): Likewise.
5416 (can_encode_int32_in): New helper function.
5417 (aarch64_relocate_instruction): New function.
5418 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5419 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5420 (struct linux_target_ops): Install aarch64_get_thread_area,
5421 aarch64_install_fast_tracepoint_jump_pad and
5422 aarch64_get_min_fast_tracepoint_insn_len.
5423
787749ea
PL
54242015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5425
5426 * Makefile.in (aarch64-insn.o): New rule.
5427 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5428
9812b2e6
YQ
54292015-09-21 Yao Qi <yao.qi@linaro.org>
5430
5431 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5432
18fe412b
YQ
54332015-09-21 Yao Qi <yao.qi@linaro.org>
5434
5435 * tracepoint.c (max_jump_pad_size): Remove.
5436
a0cc84cd
YQ
54372015-09-18 Yao Qi <yao.qi@linaro.org>
5438
5439 * linux-aarch64-low.c: Don't include sys/uio.h.
5440 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5441
d78908cf
WW
54422015-09-16 Wei-cheng Wang <cole945@gmail.com>
5443
5444 * tracepoint.c (eval_result_type): Change prototype.
5445 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5446
d57e0d50
PA
54472015-09-15 Pedro Alves <palves@redhat.com>
5448
5449 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5450 Check whether to report exec events instead of checking whether
5451 multiprocess is enabled.
5452
5a676acc
PA
54532015-09-15 Pedro Alves <palves@redhat.com>
5454
5455 PR remote/18965
5456 * remote-utils.c (prepare_resume_reply): Merge
5457 TARGET_WAITKIND_VFORK_DONE switch case with the
5458 TARGET_WAITKIND_FORKED case.
5459
7c5d0fad
YQ
54602015-09-15 Yao Qi <yao.qi@linaro.org>
5461
5462 * server.c (handle_query): Check string comparison using
5463 "else if" instead of "if".
5464
750ce8d1
YQ
54652015-09-15 Yao Qi <yao.qi@linaro.org>
5466
5467 * server.c (vCont_supported): New global variable.
5468 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5469 matches. Append ";vContSupported+" to own_buf.
5470 (handle_v_requests): Append ";s;S" to own_buf if target supports
5471 hardware single step or vCont_supported is false.
5472 (capture_main): Set vCont_supported to zero.
5473
70b90b91
YQ
54742015-09-15 Yao Qi <yao.qi@linaro.org>
5475
5476 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5477 it to ...
5478 (linux_supports_hardware_single_step): ... New function.
5479 (linux_target_ops): Update.
5480 * lynx-low.c (lynx_target_ops): Set field
5481 supports_hardware_single_step to target_can_do_hardware_single_step.
5482 * nto-low.c (nto_target_ops): Likewise.
5483 * spu-low.c (spu_target_ops): Likewise.
5484 * win32-low.c (win32_target_ops): Likewise.
5485 * target.c (target_can_do_hardware_single_step): New function.
5486 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5487 Remove. <supports_hardware_single_step>: New field.
5488 (target_supports_conditional_breakpoints): Remove.
5489 (target_supports_hardware_single_step): New macro.
5490 (target_can_do_hardware_single_step): Declare.
5491 * server.c (handle_query): Use target_supports_hardware_single_step
5492 instead of target_supports_conditional_breakpoints.
5493
ade90bde
YQ
54942015-09-15 Yao Qi <yao.qi@linaro.org>
5495
5496 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5497 function.
5498 (struct linux_target_ops the_low_target): Install
5499 aarch64_linux_siginfo_fixup.
5500
94585166
DB
55012015-09-11 Don Breazeal <donb@codesourcery.com>
5502 Luis Machado <lgustavo@codesourcery.com>
5503
5504 * linux-low.c (linux_mourn): Static declaration.
5505 (linux_arch_setup): Move in front of
5506 handle_extended_wait.
5507 (linux_arch_setup_thread): New function.
5508 (handle_extended_wait): Handle exec events. Call
5509 linux_arch_setup_thread. Make event_lwp argument a
5510 pointer-to-a-pointer.
5511 (check_zombie_leaders): Do not check stopped threads.
5512 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5513 (linux_low_filter_event): Add lwp and thread for exec'ing
5514 non-leader thread if leader thread has been deleted.
5515 Refactor code into linux_arch_setup_thread and call it.
5516 Pass child lwp pointer by reference to handle_extended_wait.
5517 (linux_wait_for_event_filtered): Update comment.
5518 (linux_wait_1): Prevent clobbering exec event status.
5519 (linux_supports_exec_events): New function.
5520 (linux_target_ops) <supports_exec_events>: Initialize new member.
5521 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5522 new member.
5523 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5524 * server.c (report_exec_events): New global variable.
5525 (handle_query): Handle qSupported query for exec-events feature.
5526 (captured_main): Initialize report_exec_events.
5527 * server.h (report_exec_events): Declare new global variable.
5528 * target.h (struct target_ops) <supports_exec_events>: New
5529 member.
5530 (target_supports_exec_events): New macro.
5531 * win32-low.c (win32_target_ops) <supports_exec_events>:
5532 Initialize new member.
5533
0568462b
MM
55342015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5535
5536 * linux-low.c (linux_low_enable_btrace): Remove.
5537 (linux_target_ops): Replace linux_low_enable_btrace with
5538 linux_enable_btrace.
5539
39edd165
YQ
55402015-09-03 Yao Qi <yao.qi@linaro.org>
5541
5542 * linux-aarch64-low.c (aarch64_insert_point): Call
5543 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5544 returns true.
5545
1db33b5a
UW
55462015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5547
5548 * linux-low.c (check_stopped_by_breakpoint): Use
5549 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5550
ab290430
PA
55512015-08-27 Pedro Alves <palves@redhat.com>
5552
5553 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5554
8d749320
SM
55552015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5556
6711b7f8
SM
5557 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5558 the XNEW-family equivalent.
8d749320
SM
5559 (compile_bytecodes): Likewise.
5560 * dll.c (loaded_dll): Likewise.
5561 * event-loop.c (append_callback_event): Likewise.
5562 (create_file_handler): Likewise.
5563 (create_file_event): Likewise.
5564 * hostio.c (handle_open): Likewise.
5565 * inferiors.c (add_thread): Likewise.
5566 (add_process): Likewise.
5567 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5568 * linux-arm-low.c (arm_new_process): Likewise.
5569 (arm_new_thread): Likewise.
5570 * linux-low.c (add_to_pid_list): Likewise.
5571 (linux_add_process): Likewise.
5572 (handle_extended_wait): Likewise.
5573 (add_lwp): Likewise.
5574 (enqueue_one_deferred_signal): Likewise.
5575 (enqueue_pending_signal): Likewise.
5576 (linux_resume_one_lwp_throw): Likewise.
5577 (linux_resume_one_thread): Likewise.
5578 (linux_read_memory): Likewise.
5579 (linux_write_memory): Likewise.
5580 * linux-mips-low.c (mips_linux_new_process): Likewise.
5581 (mips_linux_new_thread): Likewise.
5582 (mips_add_watchpoint): Likewise.
5583 * linux-x86-low.c (initialize_low_arch): Likewise.
5584 * lynx-low.c (lynx_add_process): Likewise.
5585 * mem-break.c (set_raw_breakpoint_at): Likewise.
5586 (set_breakpoint): Likewise.
5587 (add_condition_to_breakpoint): Likewise.
5588 (add_commands_to_breakpoint): Likewise.
5589 (clone_agent_expr): Likewise.
5590 (clone_one_breakpoint): Likewise.
5591 * regcache.c (new_register_cache): Likewise.
5592 * remote-utils.c (look_up_one_symbol): Likewise.
5593 * server.c (queue_stop_reply): Likewise.
5594 (start_inferior): Likewise.
5595 (queue_stop_reply_callback): Likewise.
5596 (handle_target_event): Likewise.
5597 * spu-low.c (fetch_ppc_memory): Likewise.
5598 (store_ppc_memory): Likewise.
5599 * target.c (set_target_ops): Likewise.
5600 * thread-db.c (thread_db_load_search): Likewise.
5601 (try_thread_db_load_1): Likewise.
5602 * tracepoint.c (add_tracepoint): Likewise.
5603 (add_tracepoint_action): Likewise.
5604 (create_trace_state_variable): Likewise.
5605 (cmd_qtdpsrc): Likewise.
5606 (cmd_qtro): Likewise.
5607 (add_while_stepping_state): Likewise.
5608 * win32-low.c (child_add_thread): Likewise.
5609 (get_image_name): Likewise.
5610
ed8b7b42
YQ
56112015-08-25 Yao Qi <yao.qi@linaro.org>
5612
5613 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5614
db3cb7cb
YQ
56152015-08-25 Yao Qi <yao.qi@linaro.org>
5616
5617 * Makefile.in (aarch64-linux.o): New rule.
5618 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5619 srv_tgtobj.
5620 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5621 (aarch64_init_debug_reg_state): Make it extern.
5622 (aarch64_linux_prepare_to_resume): Remove.
5623
f6011a1c
YQ
56242015-08-25 Yao Qi <yao.qi@linaro.org>
5625
5626 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5627 lwp_arch_private_info and ptid_of_lwp.
5628
88e2cf7e
YQ
56292015-08-25 Yao Qi <yao.qi@linaro.org>
5630
5631 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5632 Find proc_info by find_process_pid. All callers updated.
5633
5e35436e
YQ
56342015-08-25 Yao Qi <yao.qi@linaro.org>
5635
5636 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5637 Remove.
5638 (debug_reg_change_callback): Remove.
5639 (aarch64_notify_debug_reg_change): Remove.
5640
4a8a7965
YQ
56412015-08-25 Yao Qi <yao.qi@linaro.org>
5642
5643 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5644 Call current_lwp_ptid.
5645
32a271ee
YQ
56462015-08-25 Yao Qi <yao.qi@linaro.org>
5647
5648 * linux-aarch64-low.c (debug_reg_change_callback): Use
5649 debug_printf.
5650
0d51c8d7
YQ
56512015-08-25 Yao Qi <yao.qi@linaro.org>
5652
5653 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5654
31a43dd5
YQ
56552015-08-25 Yao Qi <yao.qi@linaro.org>
5656
5657 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5658
8ee52567
YQ
56592015-08-25 Yao Qi <yao.qi@linaro.org>
5660
5661 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5662 the code.
5663
ff3f0f45
YQ
56642015-08-25 Yao Qi <yao.qi@linaro.org>
5665
5666 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5667 Remove.
5668 (debug_reg_change_callback): Remove argument entry and add argument
5669 lwp. Remove local variable thread. Don't print thread id in the
5670 debugging output. Don't check whether pid of thread equals to pid.
5671 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5672 iterate_over_lwps instead find_inferior.
5673
3d40fbb5
PA
56742015-08-24 Pedro Alves <palves@redhat.com>
5675
5676 * inferiors.c (get_first_process): New function.
5677 * inferiors.h (get_first_process): New declaration.
5678 * remote-utils.c (read_ptid): Default to the first process in the
5679 list, instead of to the current thread's process.
5680
438e1e42
PA
56812015-08-24 Pedro Alves <palves@redhat.com>
5682
5683 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5684 * event-loop.c: Likewise.
5685 * remote-utils.c: Likewise.
5686 * tracepoint.c: Likewise.
5687
a8c6d4fc
PA
56882015-08-24 Pedro Alves <palves@redhat.com>
5689
5690 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5691 ptid_get_lwp.
5692
99b0bb12
PA
56932015-08-21 Pedro Alves <palves@redhat.com>
5694
5695 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5696 instead of literal 1.
5697
f8904751
PA
56982015-08-21 Pedro Alves <palves@redhat.com>
5699
5700 * tdesc.c (default_description): Explicitly zero-initialize.
5701
465a859e
PA
57022015-08-21 Pedro Alves <palves@redhat.com>
5703
5704 PR gdb/18749
5705 * inferiors.c (remove_thread): Discard any pending stop reply for
5706 this thread.
5707 * server.c (remove_all_on_match_pid): Rename to ...
5708 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5709 instead of a pid.
5710 (discard_queued_stop_replies): Change parameter to a ptid. Now
5711 extern.
5712 (handle_v_kill, kill_inferior_callback, captured_main)
5713 (process_serial_event): Adjust.
5714 * server.h (discard_queued_stop_replies): Declare.
5715
f0db101d
PA
57162015-08-21 Pedro Alves <palves@redhat.com>
5717
5718 * linux-low.c (wait_for_sigstop): Always switch to no thread
5719 selected if the previously current thread dies.
5720 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5721 process instead of the current thread's.
5722 * remote-utils.c (input_interrupt): Don't check if there's no
5723 current thread.
5724 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5725 current thread to the general thread fails, error out.
5726 (handle_qxfer_auxv, handle_qxfer_libraries)
5727 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5728 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5729 (handle_query): Check if there's a thread selected instead of
5730 checking whether there's any thread in the thread list.
5731 (handle_qxfer_threads, handle_qxfer_btrace)
5732 (handle_qxfer_btrace_conf): Don't error out early if there's no
5733 thread in the thread list.
5734 (handle_v_cont, myresume): Don't set the current thread to the
5735 continue thread.
5736 (process_serial_event) <Hg handling>: Also set thread_id if the
5737 previous general thread is still alive.
5738 (process_serial_event) <g/G handling>: If setting the current
5739 thread to the general thread fails, error out.
5740 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5741 thread's lwp instead of the current thread's.
5742 * target.c (set_desired_thread): If the desired thread was not
5743 found, leave the current thread pointing to NULL. Return an int
5744 (boolean) indicating success.
5745 * target.h (set_desired_thread): Change return type to int.
5746
40045d91
MF
57472015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5748
5749 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5750 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5751 #includes.
5752 (ps_get_thread_area): New function.
5753
45face3b
GB
57542015-08-19 Gary Benson <gbenson@redhat.com>
5755
5756 * hostio.c (handle_pread): Do not attempt to read more data
5757 than hostio_reply_with_data can fit in a packet.
5758
16d5f642
JB
57592015-08-18 Joel Brobecker <brobecker@adacore.com>
5760
5761 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5762
a738da3a
MF
57632015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5764
5765 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5766
33ebda9d
PA
57672015-08-06 Pedro Alves <palves@redhat.com>
5768
5769 * tracepoint.c (expr_eval_result): Now an int.
5770
a44892be
PA
57712015-08-06 Pedro Alves <palves@redhat.com>
5772
5773 * gdbthread.h (struct regcache): Forward declare.
5774 (struct thread_info) <regcache_data>: Now a struct regcache
5775 pointer.
5776 * inferiors.c (inferior_regcache_data)
5777 (set_inferior_regcache_data): Now work with struct regcache
5778 pointers.
5779 * inferiors.h (struct regcache): Forward declare.
5780 (inferior_regcache_data, set_inferior_regcache_data): Now work
5781 with struct regcache pointers.
5782 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5783 (free_register_cache_thread): Remove struct regcache pointer
5784 casts.
5785
608a1e46
PA
57862015-08-06 Pedro Alves <palves@redhat.com>
5787
5788 * server.c (captured_main): On error, print the exception message
5789 to stderr, and if run_once is set, throw a quit.
5790
f0ce0d3a
PA
57912015-08-06 Pedro Alves <palves@redhat.com>
5792
5793 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5794 the current thread.
5795
bf47e248
PA
57962015-08-06 Pedro Alves <palves@redhat.com>
5797
5798 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5799 reading beyond the passed in buffer length.
5800
b6b9ffcc
PL
58012015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5802
5803 * tracepoint.c (symbol_list) <required>: Remove.
5804
863d01bd
PA
58052015-08-06 Pedro Alves <palves@redhat.com>
5806
5807 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5808 count if stopping and suspending threads.
5809 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5810 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5811 (linux_detach): Complete an ongoing step-over.
5812 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5813 throughout.
5814 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5815 (linux_wait_1): If passing a signal to the inferior after
5816 finishing a step-over, unsuspend and re-resume all lwps. If we
5817 see a single-step event but the thread should be continuing, don't
5818 pass the trap to gdb.
5819 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5820 internal_error instead of gdb_assert.
5821 (enqueue_pending_signal): New function.
5822 (check_ptrace_stopped_lwp_gone): Add debug output.
5823 (start_step_over): Use internal_error instead of gdb_assert.
5824 (complete_ongoing_step_over): New function.
5825 (linux_resume_one_thread): Don't resume a suspended thread.
5826 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5827 it stepping.
5828
00db26fa
PA
58292015-08-06 Pedro Alves <palves@redhat.com>
5830
5831 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5832 (linux_thread_alive): Use lwp_is_marked_dead.
5833 (extended_event_reported): Delete.
5834 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5835 instead of extended_event_reported.
5836 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5837 as well.
5838 (lwp_is_marked_dead): New function.
5839 (lwp_running): Use lwp_is_marked_dead.
5840 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5841 comment.
5842
ad071a30
PA
58432015-08-06 Pedro Alves <palves@redhat.com>
5844
5845 * linux-low.c (linux_wait_1): Move fork event output out of the
5846 !report_to_gdb check. Pass event_child->waitstatus to
5847 target_waitstatus_to_string instead of ourstatus.
5848
524b57e6
YQ
58492015-08-04 Yao Qi <yao.qi@linaro.org>
5850
5851 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5852 if current_thread is 32 bit.
5853
6085d6f6
YQ
58542015-08-04 Yao Qi <yao.qi@linaro.org>
5855
5856 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5857 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5858 * server.c (extended_protocol): Remove "static".
5859 * server.h (extended_protocol): Declare it.
5860
8a7e4587
YQ
58612015-08-04 Yao Qi <yao.qi@linaro.org>
5862
5863 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5864 both aarch64 and aarch32.
5865 (aarch64_set_pc): Likewise.
5866
3b53ae99
YQ
58672015-08-04 Yao Qi <yao.qi@linaro.org>
5868
5869 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5870 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5871 arm-with-neon.xml to srv_xmlfiles.
5872 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5873 (is_64bit_tdesc): New function.
5874 (aarch64_linux_read_description): New function.
5875 (aarch64_arch_setup): Call aarch64_linux_read_description.
5876 (regs_info): Rename to regs_info_aarch64.
5877 (aarch64_regs_info): Return right regs_info.
5878 (initialize_low_arch): Call initialize_low_arch_aarch32.
5879
bd9e6534
YQ
58802015-08-04 Yao Qi <yao.qi@linaro.org>
5881
5882 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5883 * linux-aarch32-low.c: New file.
5884 * linux-aarch32-low.h: New file.
5885 * linux-arm-low.c (arm_fill_gregset): Move it to
5886 linux-aarch32-low.c.
5887 (arm_store_gregset): Likewise.
5888 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5889 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5890 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5891 (regs_info): Rename to regs_info_arm.
5892 (arm_regs_info): Return regs_info_aarch32 if
5893 have_ptrace_getregset is 1 and target description is
5894 arm_with_neon or arm_with_vfpv3.
5895 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5896 Call initialize_low_arch_aarch32 instead.
5897
ded48a5e
YQ
58982015-08-04 Yao Qi <yao.qi@linaro.org>
5899
5900 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5901 * linux-low.c: ... here.
5902 * linux-low.h (have_ptrace_getregset): Declare it.
5903
96e9210f
PA
59042015-08-04 Pedro Alves <palves@redhat.com>
5905
5906 * thread-db.c (struct thread_db): Use new typedefs.
5907 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5908 CHK calls.
5909 (disable_thread_event_reporting): Cast result of dlsym to
5910 destination function pointer type.
5911 (thread_db_mourn): Use td_ta_delete_ftype.
5912
af60a1ef
SL
59132015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5914
5915 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5916 arch variant.
5917 (CDX_BREAKPOINT): Define for R2.
5918 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5919 (the_low_target): Add comments.
5920
e8b41681
YQ
59212015-07-30 Yao Qi <yao.qi@linaro.org>
5922
5923 * linux-arm-low.c (arm_hwcap): Remove it.
5924 (arm_read_description): New local variable arm_hwcap. Don't
5925 set arm_hwcap to zero.
5926
89abb039
YQ
59272015-07-30 Yao Qi <yao.qi@linaro.org>
5928
5929 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5930 Use regcache->tdesc instead.
5931 (arm_store_wmmxregset): Likewise.
5932 (arm_fill_vfpregset): Likewise.
5933 (arm_store_vfpregset): Likewise.
5934
deca266c
YQ
59352015-07-30 Yao Qi <yao.qi@linaro.org>
5936
5937 * linux-arm-low.c: Include arch/arm.h.
5938 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5939 (arm_store_gregset): Likewise.
5940
aa58a496
SM
59412015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5942
5943 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5944 ptrace's 4th parameter.
5945
50904b25
YQ
59462015-07-27 Yao Qi <yao.qi@linaro.org>
5947
5948 * configure.srv (case aarch64*-*-linux*): Don't set
5949 srv_linux_usrregs.
5950
5826e159
PA
59512015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5952
5953 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5954 sys/ptrace.h.
5955 * linux-arm-low.c: Likewise.
5956 * linux-cris-low.c: Likewise.
5957 * linux-crisv32-low.c: Likewise.
5958 * linux-low.c: Likewise.
5959 * linux-m68k-low.c: Likewise.
5960 * linux-mips-low.c: Likewise.
5961 * linux-nios2-low.c: Likewise.
5962 * linux-s390-low.c: Likewise.
5963 * linux-sparc-low.c: Likewise.
5964 * linux-tic6x-low.c: Likewise.
5965 * linux-tile-low.c: Likewise.
5966 * linux-x86-low.c: Likewise.
5967
54019719
PA
59682015-07-24 Pedro Alves <palves@redhat.com>
5969
5970 * config.in: Regenerate.
5971 * configure: Regenerate.
5972
eb7aa561
PA
59732015-07-24 Pedro Alves <palves@redhat.com>
5974
5975 * acinclude.m4: Include ../ptrace.m4.
5976 * configure.ac: Call GDB_AC_PTRACE.
5977 * config.in, configure: Regenerate.
5978
55d7b841
YQ
59792015-07-24 Yao Qi <yao.qi@linaro.org>
5980
5981 * linux-low.c (linux_create_inferior): Remove setting to
5982 proc->priv->new_inferior.
5983 (linux_attach): Likewise.
5984 (linux_low_filter_event): Likewise.
5985 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5986
c06cbd92
YQ
59872015-07-24 Yao Qi <yao.qi@linaro.org>
5988
5989 * linux-low.c (linux_arch_setup): New function.
5990 (linux_low_filter_event): If proc->tdesc is NULL and
5991 proc->attached is true, call the_low_target.arch_setup.
5992 Otherwise, keep status pending, and return.
5993 (linux_resume_one_lwp_throw): Don't call get_pc if
5994 thread->while_stepping isn't NULL. Don't call
5995 get_thread_regcache if proc->tdesc is NULL.
5996 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5997 (linux_target_ops): Install arch_setup.
5998 * server.c (start_inferior): Call the_target->arch_setup.
5999 * target.h (struct target_ops) <arch_setup>: New field.
6000 (target_arch_setup): New marco.
6001 * lynx-low.c (lynx_target_ops): Update.
6002 * nto-low.c (nto_target_ops): Update.
6003 * spu-low.c (spu_target_ops): Update.
6004 * win32-low.c (win32_target_ops): Update.
6005
5ae3ebba
YQ
60062015-07-24 Yao Qi <yao.qi@linaro.org>
6007
6008 * linux-low.c (linux_add_process): Don't set
6009 proc->priv->new_inferior.
6010 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6011 (linux_attach): Likewise.
6012
eb97750b
YQ
60132015-07-24 Yao Qi <yao.qi@linaro.org>
6014
6015 * server.c (start_inferior): Code refactor.
6016
51aee833
YQ
60172015-07-24 Yao Qi <yao.qi@linaro.org>
6018
6019 * server.c (process_serial_event): Set general_thread.
6020
af1b22f3
YQ
60212015-07-21 Yao Qi <yao.qi@linaro.org>
6022
6023 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6024 aarch64_linux_get_debug_reg_capacity.
6025
554717a3
YQ
60262015-07-17 Yao Qi <yao.qi@linaro.org>
6027
6028 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6029 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6030 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6031 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6032 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6033 (AARCH64_HWP_ALIGNMENT): Likewise.
6034 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6035 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6036 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6037 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6038 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6039 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6040 (struct aarch64_debug_reg_state): Likewise.
6041 (struct arch_lwp_info): Likewise.
6042 (aarch64_align_watchpoint): Likewise.
6043 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6044 (aarch64_watchpoint_length): Likewise.
6045 (aarch64_point_encode_ctrl_reg): Likewise
6046 (aarch64_point_is_aligned): Likewise.
6047 (aarch64_align_watchpoint): Likewise.
6048 (aarch64_linux_set_debug_regs):
6049 (aarch64_dr_state_insert_one_point): Likewise.
6050 (aarch64_dr_state_remove_one_point): Likewise.
6051 (aarch64_handle_breakpoint): Likewise.
6052 (aarch64_handle_aligned_watchpoint): Likewise.
6053 (aarch64_handle_unaligned_watchpoint): Likewise.
6054 (aarch64_handle_watchpoint): Likewise.
6055
c67ca4de
YQ
60562015-07-17 Yao Qi <yao.qi@linaro.org>
6057
6058 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6059 and don't aarch64_get_debug_reg_state. All callers update.
6060 (aarch64_handle_aligned_watchpoint): Likewise.
6061 (aarch64_handle_unaligned_watchpoint): Likewise.
6062 (aarch64_handle_watchpoint): Likewise.
6063 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6064 (aarch64_remove_point): Likewise.
6065
25abf979
YQ
60662015-07-17 Yao Qi <yao.qi@linaro.org>
6067
6068 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6069 debug_printf.
6070 (aarch64_handle_unaligned_watchpoint): Likewise.
6071
db1ff28b
JK
60722015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6073
6074 Revert the previous 3 commits:
6075 Move gdb_regex* to common/
6076 Move linux_find_memory_regions_full & co.
6077 gdbserver build-id attribute generator
6078
700ca40f
JK
60792015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6080 Jan Kratochvil <jan.kratochvil@redhat.com>
6081
6082 gdbserver build-id attribute generator.
6083 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6084 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6085 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6086 (find_phdr): New.
6087 (get_dynamic): Use find_pdhr to traverse program headers.
6088 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6089 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6090 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6091 (get_hex_build_id): New.
6092 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6093 to reply XML document.
6094
9904185c
JK
60952015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6096 Jan Kratochvil <jan.kratochvil@redhat.com>
6097
6098 * target.c: Include target/target-utils.h and fcntl.h.
6099 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6100 (target_fileio_read_stralloc): New functions.
6101
6e5b4429
JK
61022015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6103
6104 * Makefile.in (OBS): Add gdb_regex.o.
6105 (gdb_regex.o): New.
6106 * config.in: Rebuilt.
6107 * configure: Rebuilt.
6108
ddc98fbf
JK
61092015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6110 Jan Kratochvil <jan.kratochvil@redhat.com>
6111
6112 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6113 * Makefile.in (OBS): Add target-utils.o.
6114 (linux-maps.o, target-utils.o): New.
6115 * configure.srv (srv_linux_obj): Add linux-maps.o.
6116
e57bb7a0
PL
61172015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6118
6119 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6120 function, return 1.
6121 (the_low_target): Install it.
6122
586b02a9
PA
61232015-07-14 Pedro Alves <palves@redhat.com>
6124
6125 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6126 Instead, ignore ECHILD, and throw an error for other errnos.
6127
58c1b36c
PA
61282015-07-10 Pedro Alves <palves@redhat.com>
6129
6130 * event-loop.c (struct callback_event) <data>: Change type to
6131 gdb_client_data instance instead of gdb_client_data pointer.
6132 (append_callback_event): Adjust.
6133
421530db
PL
61342015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6135
6136 * linux-aarch64-low.c: Add comments for each linux_target_ops
6137 method. Remove comments already covered in target_ops and
6138 linux_target_ops definitions.
6139 (the_low_target): Add comments for each unimplemented method.
6140
c2d65f38
YQ
61412015-07-09 Yao Qi <yao.qi@linaro.org>
6142
6143 * linux-aarch64-low.c (aarch64_regmap): Remove.
6144 (aarch64_usrregs_info): Remove.
6145 (regs_info): Set field usrregs to NULL.
6146
b20a6524
MM
61472015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6148
6149 * linux-low.c: Include "rsp-low.h"
6150 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6151 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6152 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6153 (handle_btrace_enable_pt): New.
6154 (handle_btrace_general_set): Support "pt".
6155 (handle_btrace_conf_general_set): Support "pt:size".
6156
96c97461
PL
61572015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6158
6159 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6160 Z_PACKET_SW_BP.
6161
37d66942
PL
61622015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6163
6164 * linux-aarch64-low.c: Remove comment about endianness.
6165 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6166 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6167 memcmp.
6168
dc06243f
GB
61692015-06-24 Gary Benson <gbenson@redhat.com>
6170
6171 * linux-i386-ipa.c (stdint.h): Do not include.
6172 * lynx-i386-low.c (stdint.h): Likewise.
6173 * lynx-ppc-low.c (stdint.h): Likewise.
6174 * mem-break.c (stdint.h): Likewise.
6175 * thread-db.c (stdint.h): Likewise.
6176 * tracepoint.c (stdint.h): Likewise.
6177 * win32-low.c (stdint.h): Likewise.
6178
124e13d9
SM
61792015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6180
6181 * server.c (write_qxfer_response): Update call to
6182 remote_escape_output.
6183
909c2cda
JK
61842015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6185 Jan Kratochvil <jan.kratochvil@redhat.com>
6186
6187 Merge multiple hex conversions.
6188 * gdbreplay.c (tohex): Rename to 'fromhex'.
6189 (logchar): Use fromhex.
6190
24c05f46
JK
61912015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6192
6193 * server.c (handle_qxfer_libraries): Set `version' attribute for
6194 <library-list>.
6195
14d2069a
GB
61962015-06-10 Gary Benson <gbenson@redhat.com>
6197
6198 * target.h (struct target_ops) <multifs_open>: New field.
6199 <multifs_unlink>: Likewise.
6200 <multifs_readlink>: Likewise.
6201 * linux-low.c (nat/linux-namespaces.h): New include.
6202 (linux_target_ops): Initialize the_target->multifs_open,
6203 the_target->multifs_unlink and the_target->multifs_readlink.
6204 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6205 * hostio.c (hostio_fs_pid): New static variable.
6206 (hostio_handle_new_gdb_connection): New function.
6207 (handle_setfs): Likewise.
6208 (handle_open): Use the_target->multifs_open as appropriate.
6209 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6210 (handle_readlink): Use the_target->multifs_readlink as
6211 appropriate.
6212 (handle_vFile): Handle vFile:setfs packets.
6213 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6214 after target_handle_new_gdb_connection.
6215
4b8b5e72
GB
62162015-06-10 Gary Benson <gbenson@redhat.com>
6217
6218 * configure.ac (AC_CHECK_FUNCS): Add setns.
6219 * config.in: Regenerate.
6220 * configure: Likewise.
6221 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6222 (linux-namespaces.o): New rule.
6223 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6224
3ac2e371
GB
62252015-06-09 Gary Benson <gbenson@redhat.com>
6226
6227 * hostio.c (handle_open): Process mode argument with
6228 fileio_to_host_mode.
6229
ca9b78ce
YQ
62302015-06-01 Yao Qi <yao.qi@linaro.org>
6231
6232 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6233 * linux-x86-low.c: Likewise.
6234
bfacd19d
DB
62352015-05-28 Don Breazeal <donb@codesourcery.com>
6236
6237 * linux-low.c (handle_extended_wait): Initialize
6238 thread_info.last_resume_kind for new fork children.
6239
452003ef
PA
62402015-05-15 Pedro Alves <palves@redhat.com>
6241
6242 * target.h (target_handle_new_gdb_connection): Rewrite using if
6243 wrapped in do/while.
6244
1041a03c
JB
62452015-05-14 Joel Brobecker <brobecker@adacore.com>
6246
6247 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6248 * configure, config.in: Regenerate.
6249 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6250 Declare typedef.
6251
c269dbdb
DB
62522015-05-12 Don Breazeal <donb@codesourcery.com>
6253
6254 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6255 PTRACE_EVENT_VFORK_DONE.
6256 (linux_low_ptrace_options, extended_event_reported): Add vfork
6257 events.
6258 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6259 and "vforkdone" for RSP 'T' Stop Reply Packet.
6260 * server.h (report_vfork_events): Declare
6261 global variable.
6262
3a8a0396
DB
62632015-05-12 Don Breazeal <donb@codesourcery.com>
6264
6265 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6266 (the_low_target) <new_fork>: Initialize new member.
6267 * linux-arm-low.c (arm_new_fork): New function.
6268 (the_low_target) <new_fork>: Initialize new member.
6269 * linux-low.c (handle_extended_wait): Call new target function
6270 new_fork.
6271 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6272 * linux-mips-low.c (mips_add_watchpoint): New function
6273 extracted from mips_insert_point.
6274 (the_low_target) <new_fork>: Initialize new member.
6275 (mips_linux_new_fork): New function.
6276 (mips_insert_point): Call mips_add_watchpoint.
6277 * linux-x86-low.c (x86_linux_new_fork): New function.
6278 (the_low_target) <new_fork>: Initialize new member.
6279
de0d863e
DB
62802015-05-12 Don Breazeal <donb@codesourcery.com>
6281
6282 * linux-low.c (handle_extended_wait): Implement return value,
6283 rename argument 'event_child' to 'event_lwp', handle
6284 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6285 (linux_low_ptrace_options): New function.
6286 (linux_low_filter_event): Call linux_low_ptrace_options,
6287 use different argument fo linux_enable_event_reporting,
6288 use return value from handle_extended_wait.
6289 (extended_event_reported): New function.
6290 (linux_wait_1): Call extended_event_reported and set
6291 status to report fork events.
6292 (linux_write_memory): Add pid to debug message.
6293 (reset_lwp_ptrace_options_callback): New function.
6294 (linux_handle_new_gdb_connection): New function.
6295 (linux_target_ops): Initialize new structure member.
6296 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6297 * lynx-low.c: Initialize new structure member.
6298 * remote-utils.c (prepare_resume_reply): Implement stop reason
6299 "fork" for "T" stop message.
6300 * server.c (handle_query): Call handle_new_gdb_connection.
6301 * server.h (report_fork_events): Declare global flag.
6302 * target.h (struct target_ops) <handle_new_gdb_connection>:
6303 New member.
6304 (target_handle_new_gdb_connection): New macro.
6305 * win32-low.c: Initialize new structure member.
6306
ddcbc397
DB
63072015-05-12 Don Breazeal <donb@codesourcery.com>
6308
6309 * mem-break.c (APPEND_TO_LIST): Define macro.
6310 (clone_agent_expr): New function.
6311 (clone_one_breakpoint): New function.
6312 (clone_all_breakpoints): New function.
6313 * mem-break.h: Declare new functions.
6314
89245bc0
DB
63152015-05-12 Don Breazeal <donb@codesourcery.com>
6316
6317 * linux-low.c (linux_supports_fork_events): New function.
6318 (linux_supports_vfork_events): New function.
6319 (linux_target_ops): Initialize new structure members.
6320 (initialize_low): Call linux_check_ptrace_features.
6321 * lynx-low.c (lynx_target_ops): Initialize new structure
6322 members.
6323 * server.c (report_fork_events, report_vfork_events):
6324 New global flags.
6325 (handle_query): Add new features to qSupported packet and
6326 response.
6327 (captured_main): Initialize new global variables.
6328 * target.h (struct target_ops) <supports_fork_events>:
6329 New member.
6330 <supports_vfork_events>: New member.
6331 (target_supports_fork_events): New macro.
6332 (target_supports_vfork_events): New macro.
6333 * win32-low.c (win32_target_ops): Initialize new structure
6334 members.
6335
835205d0
GB
63362015-05-12 Gary Benson <gbenson@redhat.com>
6337
6338 * server.c (handle_qxfer_exec_file): Use current process
6339 if annex is empty.
6340
21e94bd9
SL
63412015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6342
6343 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6344 Remove HAVE_PTRACE_GETREGS conditionals.
6345 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6346 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6347
45614f15
YQ
63482015-05-08 Yao Qi <yao.qi@linaro.org>
6349
6350 * linux-low.c (linux_supports_conditional_breakpoints): New
6351 function.
6352 (linux_target_ops): Install new target method.
6353 * lynx-low.c (lynx_target_ops): Install NULL hook for
6354 supports_conditional_breakpoints.
6355 * nto-low.c (nto_target_ops): Likewise.
6356 * spu-low.c (spu_target_ops): Likewise.
6357 * win32-low.c (win32_target_ops): Likewise.
6358 * server.c (handle_query): Check
6359 target_supports_conditional_breakpoints.
6360 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6361 New field.
6362 (target_supports_conditional_breakpoints): New macro.
6363
80ad801e
PA
63642015-05-06 Pedro Alves <palves@redhat.com>
6365
6366 PR server/18081
6367 * server.c (start_inferior): If the process exits, mourn it.
6368
819843c7
GB
63692015-04-21 Gary Benson <gbenson@redhat.com>
6370
6371 * hostio.c (fileio_open_flags_to_host): Factored out to
6372 fileio_to_host_openflags in common/fileio.c. Single use
6373 updated.
6374
a2d5a9d7
MF
63752015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6376
6377 * linux-xtensa-low.c (xtensa_fill_gregset)
6378 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6379 XCHAL_HAVE_LOOP.
6380
deb44829
MF
63812015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6382
6383 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6384 (regs_info): Replace usrregs pointer with NULL.
6385
e57f1de3
GB
63862015-04-17 Gary Benson <gbenson@redhat.com>
6387
6388 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6389 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6390 * server.c (handle_qxfer_exec_file): New function.
6391 (qxfer_packets): Add exec-file entry.
6392 (handle_query): Report qXfer:exec-file:read as supported packet.
6393
62828379
RN
63942015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6395
6396 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6397
b88bb450
GB
63982015-04-09 Gary Benson <gbenson@redhat.com>
6399
6400 * hostio-errno.c (errno_to_fileio_error): Remove function.
6401 Update caller to use remote_fileio_to_fio_error.
6402
c8f4bfdd
YQ
64032015-04-09 Yao Qi <yao.qi@linaro.org>
6404
6405 * linux-low.c (linux_insert_point): Call
6406 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6407 (linux_remove_point): Call remove_memory_breakpoint if type is
6408 raw_bkpt_type_sw.
6409 * linux-x86-low.c (x86_insert_point): Don't call
6410 insert_memory_breakpoint.
6411 (x86_remove_point): Don't call remove_memory_breakpoint.
6412
41f98f02
PA
64132015-04-01 Pedro Alves <palves@redhat.com>
6414 Cleber Rosa <crosa@redhat.com>
6415
6416 * server.c (gdbserver_usage): Reorganize and extend the usage
6417 message.
6418
2bf6fb9d
PA
64192015-03-24 Pedro Alves <palves@redhat.com>
6420
6421 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6422 output. Also dump TRAP_TRACE.
6423 (linux_low_filter_event): In debug output, distinguish a
6424 resume_stop SIGSTOP from a delayed SIGSTOP.
6425
369f6daa
GB
64262015-03-24 Gary Benson <gbenson@redhat.com>
6427
6428 * linux-x86-low.c (x86_linux_new_thread): Moved to
6429 nat/x86-linux.c.
6430 (x86_linux_prepare_to_resume): Likewise.
6431
8e5d4070
GB
64322015-03-24 Gary Benson <gbenson@redhat.com>
6433
6434 * Makefile.in (x86-linux-dregs.o): New rule.
6435 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6436 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6437 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6438 (x86_linux_dr_get): Likewise.
6439 (x86_linux_dr_set): Likewise.
6440 (update_debug_registers_callback): Likewise.
6441 (x86_linux_dr_set_addr): Likewise.
6442 (x86_linux_dr_get_addr): Likewise.
6443 (x86_linux_dr_set_control): Likewise.
6444 (x86_linux_dr_get_control): Likewise.
6445 (x86_linux_dr_get_status): Likewise.
6446 (x86_linux_update_debug_registers): Likewise.
6447
2b95d440
GB
64482015-03-24 Gary Benson <gbenson@redhat.com>
6449
6450 * linux-x86-low.c (x86_linux_update_debug_registers):
6451 New function, factored out from...
6452 (x86_linux_prepare_to_resume): ...this.
6453
14b0bc68
GB
64542015-03-24 Gary Benson <gbenson@redhat.com>
6455
6456 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6457 (x86_linux_dr_set): Likewise.
6458 (update_debug_registers_callback): Likewise.
6459 (x86_linux_dr_set_addr): Likewise.
6460 (x86_linux_dr_get_addr): Likewise.
6461 (x86_linux_dr_set_control): Likewise.
6462 (x86_linux_dr_get_control): Likewise.
6463 (x86_linux_dr_get_status): Likewise.
6464 (x86_linux_prepare_to_resume): Likewise.
6465
5dfe6ca8
GB
64662015-03-24 Gary Benson <gbenson@redhat.com>
6467
6468 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6469 Use perror_with_name. Pass string through gettext.
6470 (x86_linux_dr_set): Likewise.
6471
d33472ad
GB
64722015-03-24 Gary Benson <gbenson@redhat.com>
6473
6474 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6475 (x86_linux_dr_set_addr): ...this.
6476 (x86_dr_low_get_addr): Rename to...
6477 (x86_linux_dr_get_addr): ...this.
6478 (x86_dr_low_set_control): Rename to...
6479 (x86_linux_dr_set_control): ...this.
6480 (x86_dr_low_get_control): Rename to...
6481 (x86_linux_dr_get_control): ...this.
6482 (x86_dr_low_get_status): Rename to...
6483 (x86_linux_dr_get_status): ...this.
6484 (x86_dr_low): Update with new function names.
6485
4b134ca1
GB
64862015-03-24 Gary Benson <gbenson@redhat.com>
6487
6488 * Makefile.in (x86-linux.o): New rule.
6489 * configure.srv: Add x86-linux.o to relevant targets.
6490 * linux-low.c (lwp_set_arch_private_info): New function.
6491 (lwp_arch_private_info): Likewise.
6492 * linux-x86-low.c: Include nat/x86-linux.h.
6493 (arch_lwp_info): Removed structure.
6494 (update_debug_registers_callback):
6495 Use lwp_set_debug_registers_changed.
6496 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6497 and lwp_set_debug_registers_changed.
6498 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6499
34c703da
GB
65002015-03-24 Gary Benson <gbenson@redhat.com>
6501
6502 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6503 * linux-arm-low.c (arm_new_thread): Likewise.
6504 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6505 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6506 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6507 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6508
cff068da
GB
65092015-03-24 Gary Benson <gbenson@redhat.com>
6510
6511 * linux-low.c (ptid_of_lwp): New function.
6512 (lwp_is_stopped): Likewise.
6513 (lwp_stop_reason): Likewise.
6514 * linux-x86-low.c (update_debug_registers_callback):
6515 Use lwp_is_stopped.
6516 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6517 lwp_stop_reason.
6518
b2f7c7e8
GB
65192015-03-24 Gary Benson <gbenson@redhat.com>
6520
6521 * linux-low.h (linux_stop_lwp): Remove declaration.
6522
6d4ee8c6
GB
65232015-03-24 Gary Benson <gbenson@redhat.com>
6524
6525 * linux-low.h: Include nat/linux-nat.h.
6526 * linux-low.c (iterate_over_lwps_args): New structure.
6527 (iterate_over_lwps_filter): New function.
6528 (iterate_over_lwps): Likewise.
6529 * linux-x86-low.c (update_debug_registers_callback):
6530 Update signature to what iterate_over_lwps expects.
6531 Remove PID check that iterate_over_lwps now performs.
6532 (x86_dr_low_set_addr): Use iterate_over_lwps.
6533 (x86_dr_low_set_control): Likewise.
6534
70a0bb6b
GB
65352015-03-24 Gary Benson <gbenson@redhat.com>
6536
6537 * linux-x86-low.c (x86_debug_reg_state): New function.
6538 (x86_linux_prepare_to_resume): Use the above.
6539
7b669087
GB
65402015-03-24 Gary Benson <gbenson@redhat.com>
6541
6542 * linux-low.c (current_lwp_ptid): New function.
6543 * linux-x86-low.c: Include nat/linux-nat.h.
6544 (x86_dr_low_get_addr): Use current_lwp_ptid.
6545 (x86_dr_low_get_control): Likewise.
6546 (x86_dr_low_get_status): Likewise.
6547
eef49a3d
PA
65482015-03-20 Pedro Alves <palves@redhat.com>
6549
6550 * tracepoint.c (cmd_qtstatus): Make "str" const.
6551
b2333d22
PA
65522015-03-20 Pedro Alves <palves@redhat.com>
6553
6554 * server.c (handle_general_set): Make "req_str" const.
6555
23f238d3
PA
65562015-03-19 Pedro Alves <palves@redhat.com>
6557
6558 * linux-low.c (linux_resume_one_lwp): Rename to ...
6559 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6560 instead call perror_with_name.
6561 (check_ptrace_stopped_lwp_gone): New function.
6562 (linux_resume_one_lwp): Reimplement as wrapper around
6563 linux_resume_one_lwp_throw that swallows errors if the LWP is
6564 gone.
6565
91baf43f
PA
65662015-03-19 Pedro Alves <palves@redhat.com>
6567
6568 * linux-low.c (count_events_callback, select_event_lwp_callback):
6569 No longer check whether the thread has resume_stop as last resume
6570 kind.
6571
8bf3b159
PA
65722015-03-19 Pedro Alves <palves@redhat.com>
6573
6574 * linux-low.c (count_events_callback, select_event_lwp_callback):
6575 Use the lwp's status_pending_p field, not the thread's.
6576
b90fc188
PA
65772015-03-19 Pedro Alves <palves@redhat.com>
6578
6579 * linux-low.c (select_event_lwp_callback): Update comments to
6580 no longer mention SIGTRAP.
6581
464b0089
GB
65822015-03-18 Gary Benson <gbenson@redhat.com>
6583
6584 * server.c (handle_query): Do not report vFile:fstat as supported.
6585
aa9e327f
GB
65862015-03-11 Gary Benson <gbenson@redhat.com>
6587
6588 * hostio.c (sys/types.h): New include.
6589 (sys/stat.h): Likewise.
6590 (common-remote-fileio.h): Likewise.
6591 (handle_fstat): New function.
6592 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6593
791c0056
GB
65942015-03-11 Gary Benson <gbenson@redhat.com>
6595
6596 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6597 struct stat.st_blocks and struct stat.st_blksize.
6598 * configure: Regenerate.
6599 * config.in: Likewise.
6600 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6601 (OBS): Add common-remote-fileio.o.
6602 (common-remote-fileio.o): New rule.
6603
9a9df970
PA
66042015-03-09 Pedro Alves <palves@redhat.com>
6605
6606 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6607 'struct sockaddr' pointer in 'accept' call.
6608
9eb1356e
PA
66092015-03-09 Pedro Alves <palves@redhat.com>
6610
6611 Revert:
6612 2015-03-07 Pedro Alves <palves@redhat.com>
6613 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6614 or <winsock2.h> here. Instead include "gdb_socket.h".
6615 (remote_open): Use union gdb_sockaddr_u.
6616 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6617 or <winsock2.h> here. Instead include "gdb_socket.h".
6618 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6619 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6620 or <sys/un.h>.
6621 (init_named_socket, gdb_agent_helper_thread): Use union
6622 gdb_sockaddr_u.
6623
aac331e4
PA
66242015-03-07 Pedro Alves <palves@redhat.com>
6625
6626 * configure.ac (build_warnings): Move
6627 -Wdeclaration-after-statement to the C-specific set.
6628 * configure: Regenerate.
6629
366c75fc
PA
66302015-03-07 Pedro Alves <palves@redhat.com>
6631
6632 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6633 or <winsock2.h> here. Instead include "gdb_socket.h".
6634 (remote_open): Use union gdb_sockaddr_u.
6635 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6636 or <winsock2.h> here. Instead include "gdb_socket.h".
6637 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6638 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6639 or <sys/un.h>.
6640 (init_named_socket, gdb_agent_helper_thread): Use union
6641 gdb_sockaddr_u.
6642
492d29ea
PA
66432015-03-07 Pedro Alves <palves@redhat.com>
6644
6645 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6646 instead.
6647
60a191ed
YQ
66482015-03-06 Yao Qi <yao.qi@linaro.org>
6649
6650 * linux-aarch64-low.c (aarch64_insert_point): Use
6651 show_debug_regs as a boolean.
6652 (aarch64_remove_point): Likewise.
6653
f5771b1d
PA
66542015-03-05 Pedro Alves <palves@redhat.com>
6655
6656 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6657 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6658 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6659 * nto-low.c (nto_target_ops): Likewise.
6660 * spu-low.c (spu_target_ops): Likewise.
6661 * win32-low.c (win32_target_ops): Likewise.
6662
3e572f71
PA
66632015-03-04 Pedro Alves <palves@redhat.com>
6664
72f4393d 6665 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6666 Decide whether a breakpoint triggered based on the SIGTRAP's
6667 siginfo.si_code.
72f4393d
L
6668 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6669 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6670 (linux_low_filter_event): Check for breakpoints before checking
6671 watchpoints.
6672 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6673 siginfo.si_code.
72f4393d
L
6674 (linux_stopped_by_sw_breakpoint)
6675 (linux_supports_stopped_by_sw_breakpoint)
6676 (linux_stopped_by_hw_breakpoint)
6677 (linux_supports_stopped_by_hw_breakpoint): New functions.
6678 (linux_target_ops): Install new target methods.
3e572f71 6679
1ec68e26
PA
66802015-03-04 Pedro Alves <palves@redhat.com>
6681
6682 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6683 * server.c (swbreak_feature, hwbreak_feature): New globals.
6684 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6685 (captured_main): Clear swbreak_feature and hwbreak_feature.
6686 * server.h (swbreak_feature, hwbreak_feature): Declare.
6687 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6688 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6689 supports_stopped_by_hw_breakpoint>: New fields.
6690 (target_supports_stopped_by_sw_breakpoint)
6691 (target_stopped_by_sw_breakpoint)
6692 (target_supports_stopped_by_hw_breakpoint)
6693 (target_stopped_by_hw_breakpoint): Declare.
6694
15c66dd6
PA
66952015-03-04 Pedro Alves <palves@redhat.com>
6696
6697 enum lwp_stop_reason -> enum target_stop_reason
6698 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6699 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6700 (linux_wait_1, stuck_in_jump_pad_callback)
6701 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6702 (linux_stopped_by_watchpoint):
6703 * linux-low.h (enum lwp_stop_reason): Delete.
6704 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6705 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6706
98fc70d6
YQ
67072015-03-04 Yao Qi <yao.qi@linaro.org>
6708
6709 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6710
dd2ac174
GB
67112015-03-03 Gary Benson <gbenson@redhat.com>
6712
6713 * hostio.c (handle_vFile): Fix prefix lengths.
6714
d68e53f4
MM
67152015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6716
6717 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6718 ptr_bits.
6719
bf2d68ab
AA
67202015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6721
6722 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6723 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6724 (clean): Add "rm -f" for above C files.
6725 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6726 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6727 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6728 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6729 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6730 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6731 (init_registers_s390x_vx_linux64)
6732 (init_registers_s390x_tevx_linux64)
6733 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6734 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6735 declarations.
6736 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6737 (s390_store_vxrs_high): New functions.
6738 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6739 NT_S390_VXRS_HIGH.
6740 (s390_arch_setup): Add logic for selecting one of the new target
6741 descriptions. Activate the new vector regsets if applicable.
6742 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6743 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6744 and init_registers_s390x_tevx_linux64.
6745
c966a859
PA
67462015-03-01 Pedro Alves <palves@redhat.com>
6747
6748 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6749 parameter.
6750
4180215b
PA
67512015-02-27 Pedro Alves <palves@redhat.com>
6752
6753 * linux-x86-low.c (u_debugreg_offset): New function.
6754 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6755
749bab01
PA
67562015-02-27 Pedro Alves <palves@redhat.com>
6757
6758 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6759 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6760 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6761 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6762 (ps_lsetfpregs, ps_getpid)
6763 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6764 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6765 (ps_lsetxregs, ps_plog): Declare.
6766
3c14e5a3
PA
67672015-02-27 Pedro Alves <palves@redhat.com>
6768
6769 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6770 IP_AGENT_EXPORT_FUNC.
6771 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6772 IP_AGENT_EXPORT_FUNC.
6773 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6774 (IP_AGENT_EXPORT): Delete.
6775 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6776 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6777 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6778 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6779 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6780 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6781 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6782 (traceframe_read_count, traceframe_write_count)
6783 (traceframes_created, trace_state_variables, get_raw_reg)
6784 (get_trace_state_variable_value, set_trace_state_variable_value)
6785 (ust_loaded, helper_thread_id, cmd_buf): Use
6786 IPA_SYM_EXPORTED_NAME.
6787 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6788 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6789 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6790 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6791 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6792 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6793 EXTERN_C_PUSH/EXTERN_C_POP.
6794 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6795 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6796 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6797 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6798 (traceframe_write_count, traceframe_read_count)
6799 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6800 (about_to_request_buffer_space, get_trace_state_variable_value)
6801 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6802 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6803 EXTERN_C_PUSH/EXTERN_C_POP.
6804 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6805 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6806 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6807 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6808 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6809 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6810 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6811 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6812 Define.
6813 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6814 (IP_AGENT_EXPORT_VAR_DECL): Define.
6815 (tracing): Declare.
6816 (gdb_agent_get_raw_reg): Declare.
6817
fe978cb0
PA
68182015-02-27 Tom Tromey <tromey@redhat.com>
6819 Pedro Alves <palves@redhat.com>
6820
6821 Rename symbols whose names are reserved C++ keywords throughout.
6822
3bc3d82a
PA
68232015-02-27 Pedro Alves <palves@redhat.com>
6824
6825 * Makefile.in (COMPILER): New, get it from autoconf.
6826 (CXX): Get from autoconf instead.
6827 (COMPILE.pre): Use COMPILER.
6828 (CC-LD): Rename to ...
6829 (CC_LD): ... this. Use COMPILER.
6830 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6831 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6832 * acinclude.m4: Include build-with-cxx.m4.
6833 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6834 Disable -Werror by default if building in C++ mode.
6835 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6836 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6837 the C++ compiler. Save/restore CXXFLAGS too.
6838 * configure: Regenerate.
6839
07697489
PA
68402015-02-27 Pedro Alves <palves@redhat.com>
6841
6842 * acinclude.m4: Include libiberty.m4.
6843 * configure.ac: Call libiberty_INIT.
6844 * config.in, configure: Regenerate.
6845
9beb7c4e
PA
68462015-02-26 Pedro Alves <palves@redhat.com>
6847
6848 * linux-low.c (linux_wait_1): When incrementing the PC past a
6849 program breakpoint always use the_low_target.breakpoint_len as
6850 increment, rather than the maximum between that and
6851 the_low_target.decr_pc_after_break.
6852
8090aef2
PA
68532015-02-23 Pedro Alves <palves@redhat.com>
6854
6855 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6856 thread was doing a step-over; always adjust the PC if
6857 we stepped over a permanent breakpoint.
6858 (linux_wait_1): If we stepped over breakpoint that was on top of a
6859 permanent breakpoint, manually advance the PC past it.
6860
bc9540e8
PA
68612015-02-23 Pedro Alves <palves@redhat.com>
6862
6863 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6864 modes.
6865 (x86_fill_gregset, x86_store_gregset): Use it when handling
6866 $orig_eax.
6867
2db9a427
PA
68682015-02-20 Pedro Alves <palves@redhat.com>
6869
6870 * thread-db.c: Include "nat/linux-procfs.h".
6871 (thread_db_init): Skip listing new threads if the kernel supports
6872 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6873
afa8d396
PA
68742015-02-20 Pedro Alves <palves@redhat.com>
6875
6876 * linux-low.c (status_pending_p_callback): Use ptid_match.
6877
c9587f88
AT
68782015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6879
6880 PR breakpoints/16812
6881 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6882 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6883 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6884
b05ec7a5
AT
68852015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6886
6887 PR breakpoints/15956
6888 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6889
d33501a5
MM
68902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6891
6892 * linux-low.c (linux_low_btrace_conf): Print size.
6893 * server.c (handle_btrace_conf_general_set): New.
6894 (hanle_general_set): Call handle_btrace_conf_general_set.
6895 (handle_query): Report Qbtrace-conf:bts:size as supported.
6896
f4abbc16
MM
68972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6898
6899 * linux-low.c (linux_low_enable_btrace): Update parameters.
6900 (linux_low_btrace_conf): New.
6901 (linux_target_ops)<to_btrace_conf>: Initialize.
6902 * server.c (current_btrace_conf): New.
6903 (handle_btrace_enable): Rename to ...
6904 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6905 to target_enable_btrace. Update comment. Update users.
6906 (handle_qxfer_btrace_conf): New.
6907 (qxfer_packets): Add btrace-conf entry.
6908 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6909 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6910 (target_ops)<read_btrace_conf>: New.
6911 (target_enable_btrace): Update parameters.
6912 (target_read_btrace_conf): New.
6913
043c3577
MM
69142015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6915
6916 * server.c (handle_btrace_general_set): Remove call to
6917 target_supports_btrace.
6918 (supported_btrace_packets): New.
6919 (handle_query): Call supported_btrace_packets.
6920 * target.h: include btrace-common.h.
6921 (btrace_target_info): Removed.
6922 (supports_btrace, target_supports_btrace): Update parameters.
6923
734b0e4b
MM
69242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6925
6926 * Makefile.in (SFILES): Add common/btrace-common.c.
6927 (OBS): Add common/btrace-common.o.
6928 (btrace-common.o): Add build rules.
6929 * linux-low: Include btrace-common.h.
6930 (linux_low_read_btrace): Use struct btrace_data. Call
6931 btrace_data_init and btrace_data_fini.
6932
d6c146e9
PA
69332015-02-06 Pedro Alves <palves@redhat.com>
6934
6935 * thread-db.c (find_new_threads_callback): Add debug output.
6936
20ba1ce6
PA
69372015-02-04 Pedro Alves <palves@redhat.com>
6938
6939 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6940 (resume_stopped_resumed_lwps): New function.
6941 (linux_wait_for_event_filtered): Use it.
6942
8cc73a39
SDJ
69432015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6944
6945 * Makefile.in (SFILES): Add linux-personality.c.
6946 (linux-personality.o): New rule.
6947 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6948 list of objects to be built.
6949 * linux-low.c: Include nat/linux-personality.h.
6950 (linux_create_inferior): Remove code to disable address space
6951 randomization (moved to ../nat/linux-personality.c). Create
6952 cleanup to disable address space randomization.
6953
fb23d554
SDJ
69542015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6955
6956 * Makefile.in (posix-strerror.o): New rule.
6957 (mingw-strerror.o): Likewise.
6958 * configure: Regenerated.
6959 * configure.ac: Source file ../common/common.host. Initialize new
6960 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6961
cdf43629
YQ
69622015-01-14 Yao Qi <yao@codesourcery.com>
6963
6964 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6965 (ppc-linux.o): New rule.
6966 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6967 * configure.ac: AC_CHECK_FUNCS(getauxval).
6968 * config.in: Re-generated.
6969 * configure: Re-generated.
6970 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6971 ppc64_64bit_inferior_p
6972
514c5338
YQ
69732015-01-14 Yao Qi <yao@codesourcery.com>
6974
6975 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6976 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6977 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6978 (PT_ORIG_R3, PT_TRAP): Likewise.
6979 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6980 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6981 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6982
3368c1e5
JB
69832015-01-10 Joel Brobecker <brobecker@adacore.com>
6984
6985 * i387-fp.c (i387_cache_to_xsave): In look over
6986 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6987 zmmh_low_space field by use of zmmh_high_space.
6988
582511be
PA
69892015-01-09 Pedro Alves <palves@redhat.com>
6990
6991 * linux-low.c (step_over_bkpt): Move higher up in the file.
6992 (handle_extended_wait): Don't store the stop_pc here.
6993 (get_stop_pc): Adjust comments and rename to ...
6994 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6995 stopped for a software breakpoint or hardware breakpoint.
6996 (thread_still_has_status_pending_p): New function.
6997 (status_pending_p_callback): Use
6998 thread_still_has_status_pending_p. If the event is no longer
6999 interesting, resume the LWP.
7000 (handle_tracepoints): Add assert.
7001 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7002 (wstatus_maybe_breakpoint): New function.
7003 (cancel_breakpoint): Delete function.
7004 (check_stopped_by_watchpoint): New function, factored out from
7005 linux_low_filter_event.
7006 (lp_status_maybe_breakpoint): Delete function.
7007 (linux_low_filter_event): Remove filter_ptid argument.
7008 Leave thread group exits pending here. Store the LWP's stop PC.
7009 Always leave events pending.
7010 (linux_wait_for_event_filtered): Pull all events out of the
7011 kernel, and leave them all pending.
7012 (count_events_callback, select_event_lwp_callback): Consider all
7013 events.
7014 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7015 (select_event_lwp): Only give preference to the stepping LWP in
7016 all-stop mode. Adjust comments.
7017 (ignore_event): New function.
7018 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7019 references to cancel_breakpoints. Adjust to renames. Also give
7020 equal priority to all LWPs that have had events in non-stop mode.
7021 If reporting a software breakpoint event, unadjust the LWP's PC.
7022 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7023 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7024 Adjust.
7025 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7026 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7027 (linux_stopped_by_watchpoint): Adjust.
7028 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7029 * linux-low.h (enum lwp_stop_reason): New.
7030 (struct lwp_info) <stop_pc>: Adjust comment.
7031 <stopped_by_watchpoint>: Delete field.
7032 <stop_reason>: New field.
7033 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7034 * mem-break.c (software_breakpoint_inserted_here)
7035 (hardware_breakpoint_inserted_here): New function.
7036 * mem-break.h (software_breakpoint_inserted_here)
7037 (hardware_breakpoint_inserted_here): Declare.
7038 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7039 (cancel_breakpoints): Delete.
7040 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7041 (upload_fast_traceframes): Remove references to
7042 cancel_breakpoints.
7043
a33e3959
PA
70442015-01-09 Pedro Alves <palves@redhat.com>
7045
7046 * thread-db.c (find_new_threads_callback): Ignore thread if the
7047 kernel thread ID is -1.
7048
8784d563
PA
70492015-01-09 Pedro Alves <palves@redhat.com>
7050
7051 * linux-low.c (linux_attach_fail_reason_string): Move to
7052 nat/linux-ptrace.c, and rename.
7053 (linux_attach_lwp): Update comment.
7054 (attach_proc_task_lwp_callback): New function.
7055 (linux_attach): Adjust to rename and use
7056 linux_proc_attach_tgid_threads.
7057 (linux_attach_fail_reason_string): Delete declaration.
7058
76f2b779
JB
70592015-01-01 Joel Brobecker <brobecker@adacore.com>
7060
7061 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7062 * server.c (gdbserver_version): Likewise.
7063
fafcc06a
SDJ
70642014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7065
7066 * remote-utils.c: Include ctype.h.
7067 (input_interrupt): Explicitly handle the case when the char
7068 received is the NUL byte. Improve the printing of non-ASCII
7069 characters.
7070
beed38b8
JB
70712014-12-16 Joel Brobecker <brobecker@adacore.com>
7072
7073 * linux-low.c (linux_low_filter_event): Update call to
7074 linux_enable_event_reporting following the addition of
7075 a new parameter to that function.
7076
bf330350
CU
70772014-12-16 Catalin Udma <catalin.udma@freescale.com>
7078
7079 PR server/17457
7080 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7081 (AARCH64_FPCR_REGNO): Likewise.
7082 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7083 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7084 (aarch64_store_fpregset): Likewise.
7085
5227d625
JB
70862014-12-15 Joel Brobecker <brobecker@adacore.com>
7087
7088 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7089 Remove FIXME comment about assumption about N.
7090
f93b65a0
JB
70912014-12-13 Joel Brobecker <brobecker@adacore.com>
7092
7093 * configure.ac: If large-file support is disabled in GDBserver,
7094 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7095 * configure: Regenerate.
7096
e5a9158d
AA
70972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7098
7099 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7100 warning upon ENODATA from ptrace.
7101 * linux-s390-low.c (s390_store_tdb): New.
7102 (s390_regsets): Add regset for NT_S390_TDB.
7103
feea5f36
AA
71042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7105
7106 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7107 without a fill_function.
7108 * linux-s390-low.c (s390_fill_last_break): Remove.
7109 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7110 (s390_arch_setup): Use regset's size instead of fill_function for
7111 loop end condition.
7112
098dbe61
AA
71132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7114
7115 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7116 the regset's store function when ptrace returned an error.
7117 * regcache.c (get_thread_regcache): Invalidate register cache
7118 before fetching inferior's registers.
7119
28eef672
AA
71202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7121
7122 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7123 while-loop as for-loop.
7124 (regsets_store_inferior_registers): Likewise.
7125
bdca27a2
YQ
71262014-11-28 Yao Qi <yao@codesourcery.com>
7127
7128 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7129 * config.in, configure: Re-generate.
7130 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7131 is defined.
7132
9c232dda
YQ
71332014-11-21 Yao Qi <yao@codesourcery.com>
7134
7135 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7136 (AC_CHECK_HEADERS): Remove malloc.h.
7137 * configure: Re-generated.
7138 * config.in: Re-generated.
7139 * server.h: Don't include alloca.h and malloc.h.
7140 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7141 Don't include malloc.h.
7142
43968415
JB
71432014-11-17 Joel Brobecker <brobecker@adacore.com>
7144
7145 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7146 corresponding ERRNO check in same block.
7147
40e91bc7
PA
71482014-11-12 Pedro Alves <palves@redhat.com>
7149
7150 * server.c (cont_thread): Update comment.
7151 (start_inferior, attach_inferior): No longer clear cont_thread.
7152 (handle_v_cont): No longer set cont_thread.
7153 (captured_main): Clear cont_thread each time a GDB connects.
7154
c2c118cf
PA
71552014-11-12 Pedro Alves <palves@redhat.com>
7156
7157 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7158 thread, and don't resume all threads if the Hc thread has exited.
7159
78708b7c
PA
71602014-11-12 Pedro Alves <palves@redhat.com>
7161
7162 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7163 the process group instead of to a specific LWP.
7164
a2abc7de
PA
71652014-10-15 Pedro Alves <palves@redhat.com>
7166
7167 PR server/17487
7168 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7169 parameter.
7170 (arm_set_thread_context): Delete.
7171 (the_low_target): Adjust.
7172 * win32-i386-low.c (debug_registers_changed)
7173 (debug_registers_used): Delete.
7174 (update_debug_registers_callback): New function.
7175 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7176 needing to update their debug registers.
7177 (win32_get_current_dr): New function.
7178 (x86_dr_low_get_addr, x86_dr_low_get_control)
7179 (x86_dr_low_get_status): Fetch the debug register from the thread
7180 record's context.
7181 (i386_initial_stuff): Adjust.
7182 (i386_get_thread_context): Remove current_event parameter. Don't
7183 clear debug_registers_changed nor copy DR values to
7184 debug_reg_state.
7185 (i386_set_thread_context): Delete.
7186 (i386_prepare_to_resume): New function.
7187 (i386_thread_added): Mark the thread as needing to update irs
7188 debug registers.
7189 (the_low_target): Remove i386_set_thread_context and install
7190 i386_prepare_to_resume.
7191 * win32-low.c (win32_get_thread_context): Adjust.
7192 (win32_set_thread_context): Use SetThreadContext
7193 directly.
7194 (win32_prepare_to_resume): New function.
7195 (win32_require_context): New function, factored out from ...
7196 (thread_rec): ... this.
7197 (continue_one_thread): Call win32_prepare_to_resume on each thread
7198 we're about to continue.
7199 (win32_resume): Call win32_prepare_to_resume on the event thread.
7200 * win32-low.h (struct win32_thread_info)
7201 <debug_registers_changed>: New field.
7202 (struct win32_target_ops): Change prototype of set_thread_context,
7203 delete set_thread_context and add prepare_to_resume.
7204 (win32_require_context): New declaration.
7205
a442d071
GB
72062014-10-08 Gary Benson <gbenson@redhat.com>
7207
7208 * server.h: Do not include common-exceptions.h.
7209
6f1947e8
GB
72102014-10-08 Gary Benson <gbenson@redhat.com>
7211
7212 * server.h: Do not include cleanups.h.
7213
63b434a4
JH
72142014-09-30 James Hogan <james.hogan@imgtec.com>
7215
7216 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7217 mips64-dsp-linux.c.
7218
c4d9ceb6
YQ
72192014-09-23 Yao Qi <yao@codesourcery.com>
7220
7221 * linux-low.c (lp_status_maybe_breakpoint): New function.
7222 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7223 (count_events_callback): Likewise.
7224 (select_event_lwp_callback): Likewise.
7225 (cancel_breakpoints_callback): Likewise.
7226
89a5711c
DB
72272014-09-19 Don Breazeal <donb@codesourcery.com>
7228
7229 * linux-low.c (handle_extended_wait): Call
7230 linux_ptrace_get_extended_event.
7231 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7232 linux_is_extended_waitstatus.
7233
bffc0964
JB
72342014-09-16 Joel Brobecker <brobecker@adacore.com>
7235
7236 * Makefile.in (CPPFLAGS): Define.
7237 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7238 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7239
0bfdf32f
GB
72402014-09-16 Gary Benson <gbenson@redhat.com>
7241
7242 * inferiors.h (current_inferior): Renamed as...
7243 (current_thread): New variable. All uses updated.
7244 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7245 (maybe_move_out_of_jump_pad): Likewise.
7246 (cancel_breakpoint): Likewise.
7247 (linux_low_filter_event): Likewise.
7248 (wait_for_sigstop): Likewise.
7249 (linux_resume_one_lwp): Likewise.
7250 (need_step_over_p): Likewise.
7251 (start_step_over): Likewise.
7252 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7253 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7254 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7255 and save_inferior as saved_thread.
7256 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7257 saved_thread.
7258 (regcache_invalidate_thread): Likewise.
7259 * remote-utils.c (prepare_resume_reply): Likewise.
7260 * thread-db.c (thread_db_get_tls_address): Likewise.
7261 (disable_thread_event_reporting): Likewise.
7262 (remove_thread_event_breakpoints): Likewise.
7263 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7264 as saved_thread.
7265 * target.h (set_desired_inferior): Renamed as...
7266 (set_desired_thread): New declaration. All uses updated.
7267 * server.c (myresume): Updated comment to reference thread instead
7268 of inferior.
7269 (handle_serial_event): Likewise.
7270 (handle_target_event): Likewise.
7271
361c8ade
GB
72722014-09-12 Tom Tromey <tromey@redhat.com>
7273 Gary Benson <gbenson@redhat.com>
7274
7275 * regcache.h: Include common-regcache.h.
7276 (regcache_read_pc): Don't declare.
7277 * regcache.c (get_thread_regcache_for_ptid): New function.
7278
bd9269f7
GB
72792014-09-11 Tom Tromey <tromey@redhat.com>
7280 Gary Benson <gbenson@redhat.com>
7281
7282 * symbol.c: New file.
7283 * Makefile.in (SFILES): Add symbol.c.
7284 (OBS): Add symbol.o.
7285
f8c1d06b
GB
72862014-09-11 Gary Benson <gbenson@redhat.com>
7287
7288 * target.c (target_stop_ptid, target_continue_ptid): New
7289 functions.
7290
721ec300
GB
72912014-09-11 Tom Tromey <tromey@redhat.com>
7292 Gary Benson <gbenson@redhat.com>
7293
7294 * target.h: Include target/target.h.
7295 * target.c (target_read_memory, target_read_uint32)
7296 (target_write_memory): New functions.
7297
c5e92cca
GB
72982014-09-11 Gary Benson <gbenson@redhat.com>
7299
7300 * server.h (debug_hw_points): Don't declare.
7301 * server.c (debug_hw_points): Don't define. Replace all uses
7302 with show_debug_regs.
7303 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7304 all uses with show_debug_regs.
7305
2e4bb98a
EBM
73062014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7307
7308 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7309 endianness into account.
7310 (ppc_supply_ptrace_register): Likewise.
7311
ac740bc7
JH
73122014-09-03 James Hogan <james.hogan@imgtec.com>
7313
7314 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7315 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7316
97ea6506
GB
73172014-09-03 Gary Benson <gbenson@redhat.com>
7318
7319 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7320 ALL_DEBUG_ADDRESS_REGISTERS.
7321
df7e5265
GB
73222014-09-02 Gary Benson <gbenson@redhat.com>
7323
7324 * i386-low.h: Renamed as...
7325 * x86-low.h: New file. All type, function and variable name
7326 prefixes changed from "i386_" to "x86_". All references updated.
7327 * i386-low.c: Renamed as...
7328 * x86-low.c: New file. All type, function and variable name
7329 prefixes changed from "i386_" to "x86_". All references updated.
7330
ed859da7
GB
73312014-09-02 Gary Benson <gbenson@redhat.com>
7332
7333 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7334 (x86_linux_new_thread): Likewise.
7335
860789c7
GB
73362014-08-29 Gary Benson <gbenson@redhat.com>
7337
7338 * server.h (setjmp.h): Do not include.
7339 (toplevel): Do not declare.
7340 (common-exceptions.h): Include.
7341 (cleanups.h): Likewise.
7342 * server.c (toplevel): Do not define.
7343 (exit_code): New static global.
7344 (detach_or_kill_for_exit_cleanup): New function.
7345 (main): New function. Original main renamed to...
7346 (captured_main): New function.
7347 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7348
ff55e1b5
GB
73492014-08-29 Gary Benson <gbenson@redhat.com>
7350
7351 * Makefile.in (SFILES): Add common/common-exceptions.c.
7352 (OBS): Add common-exceptions.o.
7353 (common-exceptions.o): New rule.
7354 * utils.c (prepare_to_throw_exception): New function.
7355
e9bcb658
GB
73562014-08-29 Gary Benson <gbenson@redhat.com>
7357
7358 * config.in: Regenerate.
7359 * configure: Likewise.
7360
e3180625
GB
73612014-08-29 Gary Benson <gbenson@redhat.com>
7362
7363 * Makefile.in (SFILES): Add common/cleanups.c.
7364 (OBS): cleanups.o.
7365 (cleanups.o): New rule.
7366
e3d6ba5d
GB
73672014-08-29 Gary Benson <gbenson@redhat.com>
7368
7369 * utils.c (internal_vwarning): New function.
7370
7096e886
GB
73712014-08-28 Gary Benson <gbenson@redhat.com>
7372
7373 * utils.h (fatal): Remove declaration.
7374 * utils.c (fatal): Remove function.
7375
14ce3192
GB
73762014-08-28 Gary Benson <gbenson@redhat.com>
7377
7378 * tracepoint.c (gdb_agent_init): Replace fatal with
7379 perror_with_name.
7380 (initialize_tracepoint): Likewise.
7381
50278d59
GB
73822014-08-28 Gary Benson <gbenson@redhat.com>
7383
7384 * remote-utils.c (remote_prepare): Replace fatal with error.
7385
aa96c426
GB
73862014-08-28 Gary Benson <gbenson@redhat.com>
7387
7388 * linux-low.c (linux_async): Replace fatal with warning.
7389 Tidy up and return.
7390 (linux_start_non_stop): Return -1 if linux_async failed.
7391
f7160e97
GB
73922014-08-28 Gary Benson <gbenson@redhat.com>
7393
7394 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7395 gdb_assert.
7396 (i386_dr_low_get_addr): Remove vague comment.
7397 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7398 gdb_assert.
7399
38e08fca
GB
74002014-08-28 Gary Benson <gbenson@redhat.com>
7401
7402 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7403 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7404 internal_error.
7405 (linux_resume_one_lwp): Likewise.
7406 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7407 gdb_assert.
7408 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7409 with internal_error.
7410 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7411 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7412 (find_register_by_name): Replace fatal with internal_error.
7413 (find_regno): Likewise.
7414 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7415 * thread-db.c (thread_db_create_event): Likewise.
7416 (thread_db_load_search): Likewise.
7417 (try_thread_db_load_1): Likewise.
7418 * tracepoint.c (get_jump_space_head): Replace fatal with
7419 internal_error.
7420 (claim_trampoline_space): Likewise.
7421 (have_fast_tracepoint_trampoline_buffer): Likewise.
7422 (cmd_qtstart): Likewise.
7423 (stop_tracing): Likewise.
7424 (fast_tracepoint_collecting): Likewise.
7425 (target_malloc): Likewise.
7426 (download_tracepoint): Likewise.
7427 (download_trace_state_variables): Replace check with gdb_assert.
7428 (upload_fast_traceframes): Replace fatal with internal_error.
7429
34abf635
GB
74302014-08-19 Tom Tromey <tromey@redhat.com>
7431 Gary Benson <gbenson@redhat.com>
7432
7433 * Makefile.in (SFILES): Add common/common-debug.c.
7434 (OBS): Add common-debug.o.
7435 (common-debug.o): New rule.
7436 * debug.h (debug_printf): Don't declare.
7437 * debug.c (debug_printf): Renamed and rewritten as...
7438 (debug_vprintf): New function.
7439
f6e94d78
GB
74402014-08-19 Gary Benson <gbenson@redhat.com>
7441
7442 * utils.h: Do not include print-utils.h.
7443
9239eeab
GB
74442014-08-19 Tom Tromey <tromey@redhat.com>
7445 Gary Benson <gbenson@redhat.com>
7446
7447 * server.h: Add static assertion.
7448 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7449
ef87c8bb
GB
74502014-08-19 Tom Tromey <tromey@redhat.com>
7451 Gary Benson <gbenson@redhat.com>
7452
7453 * Makefile.in (SFILES): Add common/errors.c.
7454 (OBS): Add errors.o.
7455 (IPA_OBS): Add errors-ipa.o.
7456 (errors.o): New rule.
7457 (errors-ipa.o): Likewise.
7458 * utils.h (perror_with_name, error, warning): Don't declare.
7459 * utils.c (warning): Renamed and rewritten as...
7460 (vwarning): New function.
7461 (error): Renamed and rewritten as...
7462 (verror): New function.
7463 (internal_error): Renamed and rewritten as...
7464 (internal_verror): New function.
7465
bb974a24
GB
74662014-08-07 Gary Benson <gbenson@redhat.com>
7467
7468 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7469 * configure: Regenerate.
7470 * config.in: Likewise.
7471 * server.h: Do not include errno.h.
7472 * event-loop.c: Likewise.
7473 * hostio-errno.c: Likewise.
7474 * linux-low.c: Likewise.
7475 * remote-utils.c: Likewise.
7476 * spu-low.c: Likewise.
7477 * utils.c: Likewise.
7478 * gdbreplay.c: Unconditionally include errno.h.
7479
6d3d12eb
GB
74802014-08-07 Gary Benson <gbenson@redhat.com>
7481
7482 * server.h: Do not include string.h.
7483 * event-loop.c: Likewise.
7484 * linux-low.c: Likewise.
7485 * regcache.c: Likewise.
7486 * remote-utils.c: Likewise.
7487 * spu-low.c: Likewise.
7488 * utils.c: Likewise.
7489
dccbb609
GB
74902014-08-07 Gary Benson <gbenson@redhat.com>
7491
7492 * server.h: Do not include gdb_assert.h.
7493
e76df0d0
GB
74942014-08-07 Gary Benson <gbenson@redhat.com>
7495
7496 * server.h: Do not include common-utils.h.
7497
4cb9c816
GB
74982014-08-07 Gary Benson <gbenson@redhat.com>
7499
7500 * server.h: Do not include ptid.h.
7501 * notif.h: Likewise.
7502
3995eeee
GB
75032014-08-07 Gary Benson <gbenson@redhat.com>
7504
7505 * server.h: Do not include gdb_locale.h.
7506
cb9f1a9b
GB
75072014-08-07 Gary Benson <gbenson@redhat.com>
7508
7509 * server.h: Do not include gdb/signals.h.
7510 * win32-low.c: Likewise.
7511
a5fceff8
GB
75122014-08-07 Gary Benson <gbenson@redhat.com>
7513
7514 * server.h: Do not include pathmax.h.
7515
b9391142
GB
75162014-08-07 Gary Benson <gbenson@redhat.com>
7517
7518 * server.h: Do not include libiberty.h.
7519 * linux-bfin-low.c: Likewise.
7520
0e443c87
GB
75212014-08-07 Gary Benson <gbenson@redhat.com>
7522
7523 * server.h: Do not include ansidecl.h.
7524
8ebb3f56
GB
75252014-08-07 Gary Benson <gbenson@redhat.com>
7526
7527 * linux-x86-low.c: Do not include stddef.h.
7528 * lynx-ppc-low.c: Likewise.
7529 * tracepoint.c: Likewise.
7530
8980bdf6
GB
75312014-08-07 Gary Benson <gbenson@redhat.com>
7532
7533 * server.h: Do not include stdarg.h.
7534 * nto-low.c: Likewise.
7535
d7096f71
GB
75362014-08-07 Gary Benson <gbenson@redhat.com>
7537
7538 * server.h: Do not include stdlib.h.
7539 * inferiors.c: Likewise.
7540 * linux-low.c: Likewise.
7541 * regcache.c: Likewise.
7542 * spu-low.c: Likewise.
7543 * tracepoint.c: Likewise.
7544 * utils.c: Likewise.
7545
d02f550d
GB
75462014-08-07 Gary Benson <gbenson@redhat.com>
7547
7548 * server.h: Do not include stdio.h.
7549 * linux-low.c: Likewise.
7550 * remote-utils.c: Likewise.
7551 * spu-low.c: Likewise.
7552 * utils.c: Likewise.
7553 * wincecompat.c: Likewise.
7554
87f6c4e3
GB
75552014-08-06 Gary Benson <gbenson@redhat.com>
7556
7557 * regcache.c (init_register_cache): Move conditionals inside if.
7558
7089dca4
GB
75592014-08-06 Gary Benson <gbenson@redhat.com>
7560
7561 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7562
462f517e
GB
75632014-07-31 Gary Benson <gbenson@redhat.com>
7564
7565 * ax.h: Do not include server.h.
7566 * gdbthread.h: Likewise.
7567 * lynx-low.h: Likewise.
7568 * notif.h: Likewise.
7569
976411d6
GB
75702014-07-30 Gary Benson <gbenson@redhat.com>
7571
7572 * server.h: Include common-defs.h.
7573 Do not include config.h or build-gnulib-gdbserver/config.h.
7574
d41f6d8e
GB
75752014-07-30 Gary Benson <gbenson@redhat.com>
7576
7577 * hostio-errno.c: Move server.h to top of includes list.
7578 * inferiors.c: Likewise.
7579 * linux-x86-low.c: Likewise.
7580 * notif.c: Include server.h.
7581
314c6a35
TT
75822014-07-24 Tom Tromey <tromey@redhat.com>
7583 Gary Benson <gbenson@redhat.com>
7584
7585 * server.h (CORE_ADDR): Now unsigned.
7586
69ff6be5
PA
75872014-07-16 Pedro Alves <palves@redhat.com>
7588
7589 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7590
ce9e3fe7
PA
75912014-07-15 Pedro Alves <palves@redhat.com>
7592
7593 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7594 copy.
7595
e76126e8
PA
75962014-07-11 Pedro Alves <palves@redhat.com>
7597
7598 * linux-low.c (kill_wait_lwp): New function, based on
7599 kill_one_lwp_callback, but use my_waitpid directly.
7600 (kill_one_lwp_callback, linux_kill): Use it.
7601
8e9db26e
PA
76022014-06-23 Pedro Alves <palves@redhat.com>
7603
7604 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7605 before setting DR0..DR3.
7606
698b3e08
GB
76072014-06-20 Gary Benson <gbenson@redhat.com>
7608
7609 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7610 * configure: Regenerated.
7611 * config.in: Likewise.
7612
125f8a3d
GB
76132014-06-20 Gary Benson <gbenson@redhat.com>
7614
7615 * Makefile.in (SFILES): Update locations for files moved
7616 from common to nat.
7617 (object file files): Reordered.
7618
42995dbd
GB
76192014-06-20 Gary Benson <gbenson@redhat.com>
7620
7621 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7622 (i386_dr_low_set_addr): Likewise.
7623 (i386_dr_low_get_addr): Likewise.
7624 (i386_dr_low_can_set_control): Likewise.
7625 (i386_dr_low_set_control): Likewise.
7626 (i386_dr_low_get_control): Likewise.
7627 (i386_dr_low_get_status): Likewise.
7628 (i386_get_debug_register_length): Likewise.
7629 * linux-x86-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 * win32-i386-low.c (i386_dr_low_set_addr):
7637 Changed signature. Made static.
7638 (i386_dr_low_get_addr): Likewise.
7639 (i386_dr_low_set_control): Likewise.
7640 (i386_dr_low_get_control): Likewise.
7641 (i386_dr_low_get_status): Likewise.
7642 (i386_dr_low): New global variable.
7643
e1d2394b
MS
76442014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7645
7646 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7647 * Makefile.in (AR, AR_FLAGS): Define.
7648 * configure: Regenerate.
7649
3a8ee006
GB
76502014-06-19 Gary Benson <gbenson@redhat.com>
7651
7652 * Makefile.in (i386-dregs.o): New rule.
7653 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7654 * i386-low.c (target.h): Remove include.
7655 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7656 (DR_CONTROL_SHIFT): Likewise.
7657 (DR_CONTROL_SIZE): Likewise.
7658 (DR_RW_EXECUTE): Likewise.
7659 (DR_RW_WRITE): Likewise.
7660 (DR_RW_READ): Likewise.
7661 (DR_RW_IORW): Likewise.
7662 (DR_LEN_1): Likewise.
7663 (DR_LEN_2): Likewise.
7664 (DR_LEN_4): Likewise.
7665 (DR_LEN_8): Likewise.
7666 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7667 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7668 (DR_ENABLE_SIZE): Likewise.
7669 (DR_LOCAL_SLOWDOWN): Likewise.
7670 (DR_GLOBAL_SLOWDOWN): Likewise.
7671 (DR_CONTROL_RESERVED): Likewise.
7672 (I386_DR_CONTROL_MASK): Likewise.
7673 (I386_DR_VACANT): Likewise.
7674 (I386_DR_LOCAL_ENABLE): Likewise.
7675 (I386_DR_GLOBAL_ENABLE): Likewise.
7676 (I386_DR_DISABLE): Likewise.
7677 (I386_DR_SET_RW_LEN): Likewise.
7678 (I386_DR_GET_RW_LEN): Likewise.
7679 (I386_DR_WATCH_HIT): Likewise.
7680 (i386_wp_op_t): Likewise.
7681 (i386_show_dr): Likewise.
7682 (i386_length_and_rw_bits): Likewise.
7683 (i386_insert_aligned_watchpoint): Likewise.
7684 (i386_remove_aligned_watchpoint): Likewise.
7685 (i386_handle_nonaligned_watchpoint): Likewise.
7686 i386_update_inferior_debug_regs(): Likewise.
7687 (i386_dr_insert_watchpoint): Likewise.
7688 (i386_dr_remove_watchpoint): Likewise.
7689 (i386_dr_region_ok_for_watchpoint): Likewise.
7690 (i386_dr_stopped_data_address): Likewise.
7691 (i386_dr_stopped_by_watchpoint): Likewise.
7692
8f26655c
GB
76932014-06-19 Gary Benson <gbenson@redhat.com>
7694
7695 * i386-low.c (i386_dr_show): Renamed to
7696 i386_show_dr and made static. All uses updated.
7697 (i386_dr_length_and_rw_bits): Renamed to
7698 i386_length_and_rw_bits and made static.
7699 All uses updated.
7700 (i386_dr_insert_aligned_watchpoint): Renamed to
7701 i386_insert_aligned_watchpoint and made static.
7702 All uses updated.
7703 (i386_dr_remove_aligned_watchpoint): Renamed to
7704 i386_remove_aligned_watchpoint and made static.
7705 All uses updated.
7706 (i386_dr_update_inferior_debug_regs): Renamed to
7707 i386_update_inferior_debug_regs and made static.
7708 All uses updated.
7709
b9228891
GB
77102014-06-18 Gary Benson <gbenson@redhat.com>
7711
5171def3
GB
7712 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7713 (i386_dr_low_can_set_control): Likewise.
7714 (i386_get_debug_register_length): Likewise.
7715 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7716 (i386_dr_low_can_set_control): Likewise.
7717 (i386_get_debug_register_length): Likewise.
7718
77192014-06-17 Gary Benson <gbenson@redhat.com>
7720
b9228891
GB
7721 * i386-low.h (i386-dregs.h): New include.
7722 (DR_FIRSTADDR): Now in i386-dregs.h.
7723 (DR_LASTADDR): Likewise.
7724 (DR_NADDR): Likewise.
7725 (DR_STATUS): Likewise.
7726 (DR_CONTROL): Likewise.
7727 (i386_debug_reg_state): Likewise.
7728 (i386_dr_insert_watchpoint): Likewise.
7729 (i386_dr_remove_watchpoint): Likewise.
7730 (i386_dr_region_ok_for_watchpoint): Likewise.
7731 (i386_dr_stopped_data_address): Likewise.
7732 (i386_dr_stopped_by_watchpoint): Likewise.
7733 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7734
4be83cc2
GB
77352014-06-18 Gary Benson <gbenson@redhat.com>
7736
7737 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7738 i386_dr_insert_watchpoint.
7739 (i386_low_remove_watchpoint): Renamed to
7740 i386_dr_remove_watchpoint.
7741 (i386_low_region_ok_for_watchpoint): Renamed to
7742 i386_dr_region_ok_for_watchpoint.
7743 (i386_low_stopped_data_address): Renamed to
7744 i386_dr_stopped_data_address.
7745 (i386_low_stopped_by_watchpoint): Renamed to
7746 i386_dr_stopped_by_watchpoint.
7747 * i386-low.c (i386_show_dr): Renamed to
7748 i386_dr_show and made nonstatic. All uses updated.
7749 (i386_length_and_rw_bits): Renamed to
7750 i386_dr_length_and_rw_bits and made nonstatic.
7751 All uses updated.
7752 (i386_insert_aligned_watchpoint): Renamed to
7753 i386_dr_insert_aligned_watchpoint and made nonstatic.
7754 All uses updated.
7755 (i386_remove_aligned_watchpoint): Renamed to
7756 i386_dr_remove_aligned_watchpoint and made nonstatic.
7757 All uses updated.
7758 (i386_update_inferior_debug_regs): Renamed to
7759 i386_dr_update_inferior_debug_regs and made nonstatic.
7760 All uses updated.
7761 (i386_low_insert_watchpoint): Renamed to
7762 i386_dr_insert_watchpoint. All uses updated.
7763 (i386_low_remove_watchpoint): Renamed to
7764 i386_dr_remove_watchpoint. All uses updated.
7765 (i386_low_region_ok_for_watchpoint): Renamed to
7766 i386_dr_region_ok_for_watchpoint. All uses updated.
7767 (i386_low_stopped_data_address): Renamed to
7768 i386_dr_stopped_data_address. All uses updated.
7769 (i386_low_stopped_by_watchpoint): Renamed to
7770 i386_dr_stopped_by_watchpoint. All uses updated.
7771
131aa0d4
GB
77722014-06-18 Gary Benson <gbenson@redhat.com>
7773
7774 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7775 (i386_dr_low_can_set_control): Likewise.
7776 (i386_insert_aligned_watchpoint): New check.
7777
d9305f7f
GB
77782014-06-18 Gary Benson <gbenson@redhat.com>
7779
7780 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7781 Renamed to state.
7782
e927c9fc
GB
77832014-06-18 Gary Benson <gbenson@redhat.com>
7784
7785 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7786 instead of fatal and error.
7787 (i386_handle_nonaligned_watchpoint): Likewise.
7788
1b6d4134
GB
77892014-06-18 Gary Benson <gbenson@redhat.com>
7790
7791 * i386-low.c (i386_get_debug_register_length): New macro.
7792 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7793 (i386_show_dr): Use debug_printf instead of fprintf. Use
7794 phex to format values.
7795
6e62758f
GB
77962014-06-18 Gary Benson <gbenson@redhat.com>
7797
7798 * i386-low.h: Comment changes.
7799 * i386-low.c: Likewise.
7800
fc6e2f03
GB
78012014-06-18 Gary Benson <gbenson@redhat.com>
7802
7803 * i386-low.c: Whitespace changes.
7804
f9d1eeed
TT
78052014-06-12 Tom Tromey <tromey@redhat.com>
7806
7807 * utils.c (freeargv): Remove.
7808
0b04e523
TT
78092014-06-12 Tom Tromey <tromey@redhat.com>
7810
7811 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7812 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7813 (parse_debug_format_options): Likewise.
7814 (gdbserver_usage): Likewise.
7815 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7816 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7817 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7818 against libiberty.
7819 ($(LIBGNU)): Depend on libiberty.
7820 (all-lib): Recurse into all subdirs.
7821 (install-only): Invoke "install" target in subdirs.
7822 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7823 targets.
7824 * configure: Rebuild.
7825 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7826 for vasprintf, vsnprintf, or gettimeofday.
7827 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7828 srv_tgtobj.
7829
270c9937
JB
78302014-06-05 Joel Brobecker <brobecker@adacore.com>
7831
7832 * development.sh: Delete.
7833 * Makefile.in (config.status): Adjust dependency on development.sh.
7834 * configure.ac: Adjust development.sh source call.
7835 * configure: Regenerate.
7836
0a261ed8
PA
78372014-06-02 Pedro Alves <palves@redhat.com>
7838
7839 * ax.c (gdb_free_agent_expr): New function.
7840 * ax.h (gdb_free_agent_expr): New declaration.
7841 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7842 list.
7843 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7844 static.
7845 (clear_breakpoint_conditions_and_commands): New function.
7846 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7847 (clear_breakpoint_conditions_and_commands): New declaration.
7848
e9dae05e
RR
78492014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7850
7851 * linux-aarch64-low.c (asm/ptrace.h): Include.
7852
5876f503
JK
78532014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7854
7855 Fix TLS access for -static -pthread.
7856 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7857 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7858 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7859
802e8e6d
PA
78602014-05-20 Pedro Alves <palves@redhat.com>
7861
7862 * linux-aarch64-low.c (aarch64_insert_point)
7863 (aarch64_remove_point): No longer check whether the type is
7864 supported here. Adjust to new interface.
7865 (the_low_target): Install aarch64_supports_z_point_type as
7866 supports_z_point_type method.
7867 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7868 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7869 instead of a Z packet char. Adjust.
7870 (arm_supports_z_point_type): New function.
7871 (arm_insert_point, arm_remove_point): Adjust to new interface.
7872 (the_low_target): Install arm_supports_z_point_type.
7873 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7874 (cris_insert_point, cris_remove_point): Adjust to new interface.
7875 Don't check whether the type is supported here.
7876 (the_low_target): Install cris_supports_z_point_type.
7877 * linux-low.c (linux_supports_z_point_type): New function.
7878 (linux_insert_point, linux_remove_point): Adjust to new interface.
7879 * linux-low.h (struct linux_target_ops) <insert_point,
7880 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7881 raw_breakpoint pointer parameter.
7882 <supports_z_point_type>: New method.
7883 * linux-mips-low.c (mips_supports_z_point_type): New function.
7884 (mips_insert_point, mips_remove_point): Adjust to new interface.
7885 Use mips_supports_z_point_type.
7886 (the_low_target): Install mips_supports_z_point_type.
7887 * linux-ppc-low.c (the_low_target): Install NULL as
7888 supports_z_point_type method.
7889 * linux-s390-low.c (the_low_target): Install NULL as
7890 supports_z_point_type method.
7891 * linux-sparc-low.c (the_low_target): Install NULL as
7892 supports_z_point_type method.
7893 * linux-x86-low.c (x86_supports_z_point_type): New function.
7894 (x86_insert_point): Adjust to new insert_point interface. Use
7895 insert_memory_breakpoint. Adjust to new
7896 i386_low_insert_watchpoint interface.
7897 (x86_remove_point): Adjust to remove_point interface. Use
7898 remove_memory_breakpoint. Adjust to new
7899 i386_low_remove_watchpoint interface.
7900 (the_low_target): Install x86_supports_z_point_type.
7901 * lynx-low.c (lynx_target_ops): Install NULL as
7902 supports_z_point_type callback.
7903 * nto-low.c (nto_supports_z_point_type): New.
7904 (nto_insert_point, nto_remove_point): Adjust to new interface.
7905 (nto_target_ops): Install nto_supports_z_point_type.
7906 * mem-break.c: Adjust intro comment.
7907 (struct raw_breakpoint) <raw_type, size>: New fields.
7908 <inserted>: Update comment.
7909 <shlib_disabled>: Delete field.
7910 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7911 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7912 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7913 (raw_bkpt_type_to_target_hw_bp_type): New function.
7914 (find_enabled_raw_code_breakpoint_at): New function.
7915 (find_raw_breakpoint_at): New type and size parameters. Use them.
7916 (insert_memory_breakpoint): New function, based off
7917 set_raw_breakpoint_at.
7918 (remove_memory_breakpoint): New function.
7919 (set_raw_breakpoint_at): Reimplement.
7920 (set_breakpoint): New, based on set_breakpoint_at.
7921 (set_breakpoint_at): Reimplement.
7922 (delete_raw_breakpoint): Go through the_target->remove_point
7923 instead of assuming memory breakpoints.
7924 (find_gdb_breakpoint_at): Delete.
7925 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7926 (find_gdb_breakpoint): New function.
7927 (set_gdb_breakpoint_at): Delete.
7928 (z_type_supported): New function.
7929 (set_gdb_breakpoint_1): New function, loosely based off
7930 set_gdb_breakpoint_at.
7931 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7932 (delete_gdb_breakpoint_at): Delete.
7933 (delete_gdb_breakpoint_1): New function, loosely based off
7934 delete_gdb_breakpoint_at.
7935 (delete_gdb_breakpoint): New function.
7936 (clear_gdb_breakpoint_conditions): Rename to ...
7937 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7938 breakpoint.
7939 (add_condition_to_breakpoint): Make static.
7940 (add_breakpoint_condition): Take a struct breakpoint pointer
7941 instead of an address. Adjust.
7942 (gdb_condition_true_at_breakpoint): Rename to ...
7943 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7944 z_type parameter.
7945 (gdb_condition_true_at_breakpoint): Reimplement.
7946 (add_breakpoint_commands): Take a struct breakpoint pointer
7947 instead of an address. Adjust.
7948 (gdb_no_commands_at_breakpoint): Rename to ...
7949 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7950 parameter. Return true if no breakpoint was found. Change debug
7951 output.
7952 (gdb_no_commands_at_breakpoint): Reimplement.
7953 (run_breakpoint_commands): Rename to ...
7954 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7955 and change return type to boolean.
7956 (run_breakpoint_commands): New function.
7957 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7958 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7959 breakpoint. Go through the_target->remove_point instead of
7960 assuming memory breakpoint.
7961 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7962 software and hardware breakpoints.
7963 (reinsert_raw_breakpoint): Go through the_target->insert_point
7964 instead of assuming memory breakpoint.
7965 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7966 software and hardware breakpoints.
7967 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7968 Check both software and hardware breakpoints.
7969 (validate_inserted_breakpoint): Assert the breakpoint is a
7970 software breakpoint. Set the inserted flag to -1 instead of
7971 setting shlib_disabled.
7972 (delete_disabled_breakpoints): Adjust.
7973 (validate_breakpoints): Only validate software breakpoints.
7974 Adjust to inserted flag change.
7975 (check_mem_read, check_mem_write): Skip breakpoint types other
7976 than software breakpoints. Adjust to inserted flag change.
7977 * mem-break.h (enum raw_bkpt_type): New enum.
7978 (raw_breakpoint, struct process_info): Forward declare.
7979 (Z_packet_to_target_hw_bp_type): Delete declaration.
7980 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7981 (set_gdb_breakpoint, delete_gdb_breakpoint)
7982 (clear_breakpoint_conditions): New declarations.
7983 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7984 (breakpoint_inserted_here): Update comment.
7985 (add_breakpoint_condition, add_breakpoint_commands): Replace
7986 address parameter with a breakpoint pointer parameter.
7987 (gdb_breakpoint_here): Update comment.
7988 (delete_gdb_breakpoint_at): Delete.
7989 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7990 * server.c (process_point_options): Take a struct breakpoint
7991 pointer instead of an address. Adjust.
7992 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7993 delete_gdb_breakpoint.
7994 * spu-low.c (spu_target_ops): Install NULL as
7995 supports_z_point_type method.
7996 * target.h: Include mem-break.h.
7997 (struct target_ops) <prepare_to_access_memory>: Update comment.
7998 <supports_z_point_type>: New field.
7999 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8000 instead of a char. Also take a raw breakpoint pointer.
8001 * win32-arm-low.c (the_low_target): Install NULL as
8002 supports_z_point_type.
8003 * win32-i386-low.c (i386_supports_z_point_type): New function.
8004 (i386_insert_point, i386_remove_point): Adjust to new interface.
8005 (the_low_target): Install i386_supports_z_point_type.
8006 * win32-low.c (win32_supports_z_point_type): New function.
8007 (win32_insert_point, win32_remove_point): Adjust to new interface.
8008 (win32_target_ops): Install win32_supports_z_point_type.
8009 * win32-low.h (struct win32_target_ops):
8010 <supports_z_point_type>: New method.
8011 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8012 instead of a char. Also take a raw breakpoint pointer.
8013
932539e3
PA
80142014-05-20 Pedro Alves <palves@redhat.com>
8015
8016 * mem-break.h: Include break-common.h.
8017 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8018 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8019 (Z_packet_to_target_hw_bp_type): New declaration.
8020 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8021 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8022 (Z_PACKET_ACCESS_WP): Delete macros.
8023 (Z_packet_to_hw_type): Delete function.
8024 * i386-low.h: Don't include break-common.h here.
8025 (Z_packet_to_hw_type): Delete declaration.
8026 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8027 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8028 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8029 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8030 * linux-aarch64-low.c: Don't include break-common.h here.
8031 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8032 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8033 (Z_packet_to_target_hw_bp_type): Delete function.
8034 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8035 function.
8036 (mips_insert_point, mips_remove_point): Use
8037 Z_packet_to_target_hw_bp_type.
8038
4ff0d3d8
PA
80392014-05-20 Pedro Alves <palves@redhat.com>
8040
8041 * linux-aarch64-low.c: Include break-common.h.
8042 (enum target_point_type): Delete.
8043 (Z_packet_to_point_type): Rename to ...
8044 (Z_packet_to_target_hw_bp_type): ... this, and return a
8045 target_hw_bp_type instead.
8046 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8047 instead of an enum target_point_type.
8048 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8049 breakpoint type.
8050 (aarch64_dr_state_insert_one_point)
8051 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8052 (aarch64_handle_aligned_watchpoint)
8053 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8054 Take an enum target_hw_bp_type instead of an enum
8055 target_point_type.
8056 (aarch64_supports_z_point_type): New function.
8057 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8058 use Z_packet_to_target_hw_bp_type.
8059
786dc519
JB
80602014-05-20 Joel Brobecker <brobecker@adacore.com>
8061
8062 * configure.ac: Only use -Werror by default when DEVELOPMENT
8063 is true.
8064 * configure: Regenerate.
8065
9e0aa64f
JK
80662014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8067
8068 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8069 * linux-x86-low.c (X86_64_USER_REGS): New.
8070 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8071
2b577b92
YQ
80722014-04-28 Yao Qi <yao@codesourcery.com>
8073
8074 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8075 name.
8076
94611da2
PA
80772014-04-25 Pedro Alves <palves@redhat.com>
8078
8079 PR server/16255
8080 * linux-low.c (linux_attach_fail_reason_string): New function.
8081 (linux_attach_lwp): Delete.
8082 (linux_attach_lwp_1): Rename to ...
8083 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8084 argument. Remove "initial" parameter. Return int instead of
8085 void. Don't error or warn here.
8086 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8087 failure to attach to the tgid. Call warning when failing to
8088 attach to an lwp.
8089 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8090 argument. Remove "initial" parameter. Return int instead of
8091 void. Don't error or warn here.
8092 (linux_attach_fail_reason_string): New declaration.
8093 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8094 interface change. Use linux_attach_fail_reason_string.
8095
01f9f808
MS
80962014-04-24 Michael Sturm <michael.sturm@mintel.com>
8097 Walfred Tedeschi <walfred.tedeschi@intel.com>
8098
8099 * Makefile.in: Added rules to handle new files
8100 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8101 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8102 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8103 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8104 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8105 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8106 x32-avx512-linux.o.
8107 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8108 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8109 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8110 i386/x32-avx512.xml.
8111 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8112 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8113 i386/x32-avx512-linux.xml.
8114 * i387-fp.c (num_avx512_k_registers): New constant for number
8115 of K registers.
8116 (num_avx512_zmmh_low_registers): New constant for number of
8117 lower ZMM registers (0-15).
8118 (num_avx512_zmmh_high_registers): New constant for number of
8119 higher ZMM registers (16-31).
8120 (num_avx512_ymmh_registers): New contant for number of higher
8121 YMM registers (ymm16-31 added by avx521 on x86_64).
8122 (num_avx512_xmm_registers): New constant for number of higher
8123 XMM registers (xmm16-31 added by AVX512 on x86_64).
8124 (struct i387_xsave): Add space for AVX512 registers.
8125 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8126 Add code to handle AVX512 registers.
8127 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8128 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8129 prototypei from generated file.
8130 (tdesc_amd64_avx512_linux): Likewise.
8131 (init_registers_x32_avx512_linux): Likewise.
8132 (tdesc_x32_avx512_linux): Likewise.
8133 (init_registers_i386_avx512_linux): Likewise.
8134 (tdesc_i386_avx512_linux): Likewise.
8135 (x86_64_regmap): Add AVX512 registers.
8136 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8137 mask.
8138 (initialize_low_arch): Add code to initialize AVX512 registers.
8139
51aa91f9
PA
81402014-04-23 Pedro Alves <palves@redhat.com>
8141
8142 * mem-break.c (find_gdb_breakpoint_at): Make static.
8143 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8144
a4165e94
PA
81452014-04-23 Pedro Alves <palves@redhat.com>
8146
8147 * i386-low.c: Don't include break-common.h here.
8148 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8149 prototype to take target_hw_bp_type as argument instead of a Z
8150 packet char.
8151 * i386-low.h: Include break-common.h here.
8152 (Z_packet_to_hw_type): Declare.
8153 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8154 prototypes.
8155 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8156 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8157 (x86_remove_point): Convert the packet number to a
8158 target_hw_bp_type before calling i386_low_remove_watchpoint.
8159 * win32-i386-low.c (i386_insert_point): Convert the packet number
8160 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8161 (i386_remove_point): Convert the packet number to a
8162 target_hw_bp_type before calling i386_low_remove_watchpoint.
8163
b8acf843
PA
81642014-04-23 Pedro Alves <palves@redhat.com>
8165
8166 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8167
d708bcd1
PA
81682014-04-10 Pedro Alves <palves@redhat.com>
8169
8170 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8171 Check if the condition or command is NULL before checking if the
8172 breakpoint is known. On success, return true.
8173 * mem-break.h (add_breakpoint_condition): Document return.
8174 (add_breakpoint_commands): Add describing comment.
8175 * server.c (skip_to_semicolon): New function.
8176 (process_point_options): Use it.
8177
2eec7d5b
PA
81782014-04-09 Pedro Alves <palves@redhat.com>
8179
8180 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8181 to lwpid_of.
8182
fa96cb38
PA
81832014-02-27 Pedro Alves <palves@redhat.com>
8184
8185 PR 12702
8186 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8187 macros.
8188 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8189 output.
8190 (last_thread_of_process_p): Take a PID argument instead of a
8191 thread pointer.
8192 (linux_wait_for_lwp): Delete.
8193 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8194 functions.
8195 (linux_low_filter_event): New function, party factored out from
8196 linux_wait_for_event.
8197 (linux_wait_for_event): Rename to ...
8198 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8199 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8200 sigsuspend. Check for zombie leaders.
8201 (linux_wait_for_event): Reimplement as wrapper around
8202 linux_wait_for_event_filtered.
8203 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8204 a normal or signal exit is seen, it's the whole process exiting.
8205 (wait_for_sigstop): No longer a for_each_inferior callback.
8206 Rewrite on top of linux_wait_for_event_filtered.
8207 (stop_all_lwps): Call wait_for_sigstop directly.
8208 * server.c (resume, handle_target_event): Handle
8209 TARGET_WAITKIND_NO_RESUMED.
8210
d763de10
JB
82112014-02-26 Joel Brobecker <brobecker@adacore.com>
8212
8213 * win32-low.c (psapi_get_dll_name,
8214 * win32_CreateToolhelp32Snapshot): Delete.
8215 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8216 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8217 Delete.
8218 (handle_load_dll): Add function description.
8219 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8220
850a0f76
JB
82212014-02-26 Joel Brobecker <brobecker@adacore.com>
8222
8223 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8224 Add comment.
8225 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8226 base address when calling win32_add_one_solib.
8227 (handle_load_dll): Delete local variable load_addr.
8228 Remove 0x1000 offset applied to DLL base address when calling
8229 win32_add_one_solib.
8230 (handle_unload_dll): Add comment.
8231
f25b3fc3
JB
82322014-02-26 Joel Brobecker <brobecker@adacore.com>
8233
8234 * win32-low.c (win32_add_all_dlls): Renames
8235 win32_ensure_ntdll_loaded. Rewrite function documentation.
8236 Adjust implementation to always load all DLLs.
8237 Add 0x1000 offset to DLL base address when calling
8238 win32_add_one_solib.
8239 (child_initialization_done): New static global.
8240 (do_initial_child_stuff): Set child_initialization_done to
8241 zero during child initialization, and 1 after. Replace call
8242 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8243 Add comment.
8244 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8245 (handle_unload_dll): Add function documentation.
8246 (get_child_debug_event): Ignore load and unload DLL events
8247 during child initialization.
8248
d86d4aaf
DE
82492014-02-20 Doug Evans <dje@google.com>
8250
3bc32da3 8251 Remove global all_lwps.
d86d4aaf
DE
8252 * inferiors.h (ptid_of): Move here from linux-low.h.
8253 (pid_of, lwpid_of): Ditto.
8254 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8255 parameter is a struct thread_info * now.
8256 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8257 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8258 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8259 directly.
8260 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8261 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8262 * linux-arm-low.c (update_registers_callback): Update, "entry"
8263 parameter is a struct thread_info * now.
8264 Fetch lwpid from current_inferior directly.
8265 (arm_insert_point): Pass &all_threads to find_inferior instead of
8266 &all_lwps.
8267 (arm_remove_point): Ditto.
8268 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8269 (arm_prepare_to_resume): Fetch pid from thread.
8270 (arm_read_description): Fetch lwpid from current_inferior directly.
8271 * linux-low.c (all_lwps): Delete.
8272 (delete_lwp): Delete call to remove_inferior.
8273 (handle_extended_wait): Fetch lwpid from thread.
8274 (add_lwp): Don't set lwp->entry.id. Remove call to
8275 add_inferior_to_list.
8276 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8277 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8278 (kill_one_lwp_callback): Ditto.
8279 (linux_kill): Don't dereference NULL pointer.
8280 Fetch ptid,lwpid from thread.
8281 (get_detach_signal): Fetch ptid from thread.
8282 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8283 Simplify call to regcache_invalidate_thread.
8284 (delete_lwp_callback): Update, "entry" parameter is a
8285 struct thread_info * now. Fetch pid from thread.
8286 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8287 (status_pending_p_callback): Update, "entry" parameter is a
8288 struct thread_info * now. Fetch ptid from thread.
8289 (find_lwp_pid): Update, "entry" parameter is a
8290 struct thread_info * now.
8291 (linux_wait_for_lwp): Fetch pid from thread.
8292 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8293 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8294 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8295 (dequeue_one_deferred_signal): Ditto.
8296 (cancel_breakpoint): Fetch ptid from current_inferior.
8297 (linux_wait_for_event): Pass &all_threads to find_inferior,
8298 not &all_lwps. Fetch ptid, lwpid from thread.
8299 (count_events_callback): Update, "entry" parameter is a
8300 struct thread_info * now.
8301 (select_singlestep_lwp_callback): Ditto.
8302 (select_event_lwp_callback): Ditto.
8303 (cancel_breakpoints_callback): Ditto.
8304 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8305 not &all_lwps.
8306 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8307 (unsuspend_one_lwp): Update, "entry" parameter is a
8308 struct thread_info * now.
8309 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8310 not &all_lwps.
8311 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8312 Fetch lwpid from thread, not lwp.
8313 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8314 Pass &all_threads to find_inferior, not &all_lwps.
8315 (send_sigstop): Fetch lwpid from thread, not lwp.
8316 (send_sigstop_callback): Update, "entry" parameter is a
8317 struct thread_info * now.
8318 (suspend_and_send_sigstop_callback): Ditto.
8319 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8320 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8321 struct thread_info * now.
8322 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8323 from thread, lwp.
8324 (lwp_running): Update, "entry" parameter is a
8325 struct thread_info * now.
8326 (stop_all_lwps): Fetch ptid from thread.
8327 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8328 (linux_resume_one_lwp): Fetch lwpid from thread.
8329 (linux_set_resume_request): Update, "entry" parameter is a
8330 struct thread_info * now. Fetch pid, lwpid from thread.
8331 (resume_status_pending_p): Update, "entry" parameter is a
8332 struct thread_info * now.
8333 (need_step_over_p): Ditto. Fetch lwpid from thread.
8334 (start_step_over): Fetch lwpid from thread.
8335 (linux_resume_one_thread): Update, "entry" parameter is a
8336 struct thread_info * now. Fetch lwpid from thread.
8337 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8338 (proceed_one_lwp): Update, "entry" parameter is a
8339 struct thread_info * now. Fetch lwpid from thread.
8340 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8341 struct thread_info * now.
8342 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8343 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8344 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8345 directly.
8346 (regsets_store_inferior_registers): Ditto.
8347 (fetch_register, store_register): Ditto.
8348 (linux_read_memory, linux_write_memory): Ditto.
8349 (linux_request_interrupt): Ditto.
8350 (linux_read_auxv): Ditto.
8351 (linux_xfer_siginfo): Ditto.
8352 (linux_qxfer_spu): Ditto.
8353 (linux_qxfer_libraries_svr4): Ditto.
8354 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8355 moved to inferiors.h.
8356 (get_lwp): Delete.
8357 (get_thread_lwp): Update.
8358 (struct lwp_info): Delete member "entry". Simplify comment for
8359 member "thread".
8360 (all_lwps): Delete.
8361 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8362 current_inferior directly.
8363 (update_watch_registers_callback): Update, "entry" parameter is a
8364 struct thread_info * now. Fetch pid from thread.
8365 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8366 (mips_insert_point): Fetch lwpid from current_inferior.
8367 Pass &all_threads to find_inferior, not &all_lwps.
8368 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8369 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8370 directly.
8371 (mips_stopped_data_address): Ditto.
8372 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8373 directly.
8374 * linux-tile-low.c (tile_arch_setup): Ditto.
8375 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8376 (update_debug_registers_callback): Update, "entry" parameter is a
8377 struct thread_info * now. Fetch pid from thread.
8378 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8379 Pass &all_threads to find_inferior, not &all_lwps.
8380 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8381 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8382 Pass &all_threads to find_inferior, not &all_lwps.
8383 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8384 (i386_dr_low_get_status): Ditto.
8385 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8386 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8387 (x86_linux_read_description): Ditto.
8388 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8389
3b8361aa
DE
83902014-02-20 Doug Evans <dje@google.com>
8391
8392 * inferiors.c (get_first_inferior): Fix buglet.
8393
f7667f0d
DE
83942014-02-19 Doug Evans <dje@google.com>
8395
8396 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8397 * inferiors.c (add_thread): Change result type to struct thread_info *.
8398 All callers updated.
8399 (add_lwp): Call add_thread here instead of in callers.
8400 All callers updated.
8401 * linux-low.h (get_lwp_thread): Rewrite.
8402 (struct lwp_info): New member "thread".
8403
b3312d80
DE
84042014-02-19 Doug Evans <dje@google.com>
8405
8406 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8407 All callers updated.
8408
ecc6f45c
DE
84092014-02-19 Doug Evans <dje@google.com>
8410
8411 * inferiors.c (add_thread): Fix whitespace.
8412
649ebbca
DE
84132014-02-19 Doug Evans <dje@google.com>
8414
8415 * dll.c (clear_dlls): Replace accessing list implemention details
8416 with API function.
8417 * gdbthread.h (get_first_thread): Declare.
8418 * inferiors.c (for_each_inferior_with_data): New function.
8419 (get_first_thread): New function.
8420 (find_thread_ptid): Simplify.
8421 (get_first_inferior): New function.
8422 (clear_list): Delete.
8423 (one_inferior_p): New function.
8424 (clear_inferior_list): New function.
8425 (clear_inferiors): Update.
8426 * inferiors.h (for_each_inferior_with_data): Declare.
8427 (clear_inferior_list): Declare.
8428 (one_inferior_p): Declare.
8429 (get_first_inferior): Declare.
8430 * linux-low.c (linux_wait_for_event): Replace accessing list
8431 implemention details with API function.
8432 * server.c (target_running): Ditto.
8433 (accumulate_file_name_length): New function.
8434 (emit_dll_description): New function.
8435 (handle_qxfer_libraries): Replace accessing list implemention
8436 details with API function.
8437 (handle_qxfer_threads_worker): New function.
8438 (handle_qxfer_threads_proper): Replace accessing list implemention
8439 details with API function.
8440 (handle_query): Ditto.
8441 (visit_actioned_threads_callback_ftype): New typedef.
8442 (visit_actioned_threads_data): New struct.
8443 (visit_actioned_threads): Rewrite to be find_inferior callback.
8444 (resume): Call find_inferior.
8445 (handle_status): Replace accessing list implemention
8446 details with API function.
8447 (process_serial_event): Replace accessing list implemention details
8448 with API function.
8449 * target.c (set_desired_inferior): Replace accessing list implemention
8450 details with API function.
8451 * tracepoint.c (same_process_p): New function.
8452 (gdb_agent_about_to_close): Replace accessing list implemention
8453 details with API function.
8454 * win32-low.c (child_delete_thread): Replace accessing list
8455 implemention details with API function.
8456 (match_dll_by_basename): New function.
8457 (dll_is_loaded_by_basename): New function.
8458 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8459 details call to dll_is_loaded_by_basename.
8460
80894984
DE
84612014-02-19 Doug Evans <dje@google.com>
8462
8463 * dll.h (struct dll_info): Add comment.
8464 * gdbthread.h (struct thread_info): Add comment.
8465 (current_ptid): Simplify.
8466 * inferiors.c (add_process): Update.
8467 (remove_process): Update.
8468 * inferiors.h (struct process_info): Rename member "head" to "entry".
8469 * linux-low.c (delete_lwp): Update.
8470 (add_lwp): Update.
8471 (last_thread_of_process_p): Update.
8472 (kill_one_lwp_callback, linux_kill): Update.
8473 (status_pending_p_callback): Update.
8474 (wait_for_sigstop): Update. Simplify read of ptid.
8475 (start_step_over): Update.
8476 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8477 (get_lwp_thread): Update.
8478 (struct lwp_info): Rename member "head" to "entry".
8479 * regcache.h (inferior_list_entry): Delete.
8480 * server.c (kill_inferior_callback): Update.
8481 (detach_or_kill_inferior_callback): Update.
8482 (print_started_pid): Update.
8483 (print_attached_pid): Update.
8484 (process_serial_event): Simplify read of ptid.
8485 * thread-db.c (thread_db_create_event): Update.
8486 (thread_db_get_tls_address): Update.
8487 * win32-low.c (current_inferior_ptid): Simplify.
8488
46917d26
TT
84892014-02-19 Tom Tromey <tromey@redhat.com>
8490
8491 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8492 argument.
8493 (target_supports_btrace): Update.
8494
0759a81e
YQ
84952014-02-14 Yao Qi <yao@codesourcery.com>
8496
8497 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8498 (rsp-low-ipa.o): New target.
8499
a7191e8b
TT
85002014-02-12 Tom Tromey <tromey@redhat.com>
8501
8502 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8503 convert_ascii_to_int.
8504 * regcache.c (registers_to_string): Likewise.
8505 * remote-utils.c (decode_M_packet): Likewise.
8506 * server.c (process_serial_event): Likewise.
8507
ff0e980e
TT
85082014-02-12 Tom Tromey <tromey@redhat.com>
8509
8510 * server.c (handle_query, handle_v_run): Use hex2bin, not
8511 unhexify.
8512 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8513
e9371aff
TT
85142014-02-12 Tom Tromey <tromey@redhat.com>
8515
8516 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8517 convert_int_to_ascii.
8518 * regcache.c (registers_to_string, collect_register_as_string):
8519 Likewise.
8520 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8521 Likewise.
8522 * server.c (process_serial_event): Likewise.
8523 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8524 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8525
971dc0b8
TT
85262014-02-12 Tom Tromey <tromey@redhat.com>
8527
8528 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8529 bin2hex, not hexify.
8530 * tracepoint.c (cmd_qtstatus): Likewise.
8531
0a822afb
TT
85322014-02-12 Tom Tromey <tromey@redhat.com>
8533
8534 * remote-utils.c (monitor_output): Pass explicit length to
8535 hexify.
8536
9c3d6531
TT
85372014-02-12 Tom Tromey <tromey@redhat.com>
8538
8539 * tracepoint.c: Include rsp-low.h.
8540 * server.c: Include rsp-low.h.
8541 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8542 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8543 declare.
8544 * remote-utils.c: Include rsp-low.h.
8545 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8546 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8547 (convert_int_to_ascii, convert_ascii_to_int): Move to
8548 common/rsp-low.c.
8549 * regcache.c: Include rsp-low.h.
8550 * ax.c: Include rsp-low.h.
8551 * Makefile.in (SFILES): Add common/rsp-low.c.
8552 (OBS): Add rsp-low.o.
8553 (rsp-low.o): New target.
8554
01fd3ea5
TT
85552014-02-12 Tom Tromey <tromey@redhat.com>
8556
8557 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8558 Include print-utils.h.
8559 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8560 (plongest, thirty_two, phex_nz): Remove.
8561 * Makefile.in (SFILES): Add common/print-utils.c.
8562 (OBS): Add print-utils.o.
8563 (print-utils-ipa.o): New target.
8564 (print-utils.o): New target.
8565 (IPA_OBJS): Add print-utils-ipa.o.
8566
e99dc820
TT
85672014-02-06 Tom Tromey <tromey@redhat.com>
8568
8569 * Makefile.in (SFILES): Fix indentation.
8570
ee1e2d4f
DE
85712014-02-05 Doug Evans <dje@google.com>
8572
8573 * linux-low.c (linux_wait_for_event): Improve comment.
8574 (linux_wait_1): Keep current_inferior in sync with event_child.
8575
f5a02773
DE
85762014-01-22 Doug Evans <dje@google.com>
8577
8578 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8579
87ce2a04
DE
85802014-01-22 Doug Evans <dje@google.com>
8581
8582 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8583 * configure: Regenerate.
8584 * config.in: Regenerate.
8585 * Makefile.in (SFILES): Add debug.c.
8586 (OBS): Add debug.o.
8587 * debug.c: New file.
8588 * debug.h: New file.
8589 * linux-aarch64-low.c (*): Update all debugging printfs to use
8590 debug_printf instead of fprintf.
8591 * linux-arm-low.c (*): Ditto.
8592 * linux-cris-low.c (*): Ditto.
8593 * linux-crisv32-low.c (*): Ditto.
8594 * linux-m32r-low.c (*): Ditto.
8595 * linux-sparc-low.c (*): Ditto.
8596 * linux-x86.c (*): Ditto.
8597 * linux-low.c (*): Ditto.
8598 (linux_wait_1): Add calls to debug_enter, debug_exit.
8599 (linux_wait): Remove redundant debugging printf.
8600 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8601 (linux_resume, unstop_all_lwps): Ditto.
8602 * mem-break.c (*): Update all debugging printfs to use
8603 debug_printf instead of fprintf.
8604 * remote-utils.c (*): Ditto.
8605 * thread-db.c (*): Ditto.
8606 * server.c #include <ctype.h>, "gdb_vecs.h".
8607 (debug_threads): Moved to debug.c.
8608 (*): Update all debugging printfs to use debug_printf instead of
8609 fprintf.
8610 (start_inferior): Replace call to fflush with call to debug_flush.
8611 (monitor_show_help): Mention set debug-format.
8612 (parse_debug_format_options): New function.
8613 (handle_monitor_command): Handle "monitor set debug-format".
8614 (gdbserver_usage): Mention --debug-format.
8615 (main): Parse --debug-format.
8616 * server.h (debug_threads): Declaration moved to debug.h.
8617 #include "debug.h".
8618 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8619 trace_debug_1 that uses debug_printf.
8620 (tracepoint_look_up_symbols): Update all debugging printfs to use
8621 debug_printf instead of fprintf.
8622
e671835b
BS
86232014-01-20 Baruch Siach <baruch@tkos.co.il>
8624
8625 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8626 sys/ptrace.h.
8627
b5737fa9
PA
86282014-01-17 Pedro Alves <palves@redhat.com>
8629
ea38d2a9 8630 PR build/16445
c7faa97a
PA
8631 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8632 defined after including gdb_proc_service.h.
b5737fa9 8633
40ed484e
DE
86342014-01-16 Doug Evans <dje@google.com>
8635
8636 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8637 (match_dll): Use it.
8638
969c39fb
MM
86392014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8640
8641 * target.h (target_ops) <read_btrace>: Change parameters and
8642 return type to allow error reporting.
8643 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8644 trace reading errors on.
8645 * linux-low.c (linux_low_read_btrace): Pass trace reading
8646 errors on.
8647 (linux_low_disable_btrace): New.
8648
ab7f45ba
DE
86492014-01-15 Doug Evans <dje@google.com>
8650
8651 * inferiors.c (thread_id_to_gdb_id): Delete.
8652 * inferiors.h (thread_id_to_gdb_id): Delete.
8653
66af0f44
EZ
86542014-01-13 Eli Zaretskii <eliz@gnu.org>
8655
8656 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8657 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8658 versions.
8659
9939e131
PA
86602014-01-08 Pedro Alves <palves@redhat.com>
8661
8662 * server.c (handle_status): Don't discard previous queued stop
8663 replies or thread's pending status here.
8664 (main) <disconnection>: Do it here instead.
8665
b7ea362b
PA
86662014-01-08 Pedro Alves <palves@redhat.com>
8667
8668 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8669 * server.c (visit_actioned_threads, handle_pending_status): New
8670 function.
8671 (handle_v_cont): Factor out parts to ...
8672 (resume): ... this new function. If in all-stop, and a thread
8673 being resumed has a pending status, report it without actually
8674 resuming.
8675 (myresume): Adjust to use the new 'resume' function.
8676 (clear_pending_status_callback, set_pending_status_callback)
8677 (find_status_pending_thread_callback): New functions.
8678 (handle_status): Handle the case of multiple threads having
8679 interesting statuses to report. Report threads' real last signal
8680 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8681 with an interesting thread to report the status for, instead of
8682 always reporting the status of the first thread.
8683
28498c42
JB
86842014-01-01 Joel Brobecker <brobecker@adacore.com>
8685
8686 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8687 * gdbreplay.c (gdbreplay_version): Likewise.
8688
f45c82da
YZ
86892013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8690
8691 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8692 iov.iov_len with the real length in use.
8693
379a5e2d
JB
86942013-12-13 Joel Brobecker <brobecker@adacore.com>
8695
8696 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8697 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8698 for all targets that use win32-low.c.
8699 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8700 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8701
4210d83e
PA
87022013-12-13 Pedro Alves <palves@redhat.com>
8703
8704 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8705 if equal to TARGET_WAITKIND_LOADED.
8706 * win32-low.c (cached_status): New static global.
8707 (win32_wait): Add declaration.
8708 (do_initial_child_stuff): Flush all initial pending debug events
8709 up to the initial breakpoint.
8710 (win32_wait): If CACHED_STATUS was set, return that instead
8711 of doing a real wait. Remove the code resuming the execution
8712 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8713 during the initial phase. Also remove the code changing
8714 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8715 TARGET_WAITKIND_STOPPED.
8716
e7f0d979
YQ
87172013-12-11 Yao Qi <yao@codesourcery.com>
8718
8719 * notif.c (handle_notif_ack): Return 0 if no notification
8720 matches.
8721
ebcf782c
DE
87222013-11-20 Doug Evans <dje@google.com>
8723
8724 * linux-low.c (linux_set_resume_request): Fix comment.
8725
20ad9378
DE
87262013-11-20 Doug Evans <dje@google.com>
8727
8728 * linux-low.c (resume_status_pending_p): Tweak comment.
8729
a196ebeb
WT
87302013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8731
8732 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8733 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8734 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8735 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8736 (srv_amd64_regobj): Add amd64-mpx.o.
8737 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8738 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8739 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8740 * i387-fp.c (num_pl_bnd_register) Added constant.
8741 (num_pl_bnd_cfg_registers) Added constant.
8742 (struct i387_xsave) Added reserved area and MPX fields.
8743 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8744 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8745 function.
8746 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8747 (init_registers_amd64_mpx_linux): Declare new function.
8748 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8749 (x86_64_regmap): Add MPX registers.
8750 (x86_linux_read_description): Add MPX case.
8751 (initialize_low_arch): Initialize MPX targets.
8752
0080a2f6
TT
87532013-11-18 Tom Tromey <tromey@redhat.com>
8754
8755 * configure: Rebuild.
8756 * configure.ac: Don't check for stdlib.h.
8757 * gdbreplay.c: Unconditionally include stdlib.h.
8758
2978b111
TT
87592013-11-18 Tom Tromey <tromey@redhat.com>
8760
8761 * config.in: Rebuild.
8762 * configure: Rebuild.
8763 * configure.ac: Don't use AC_HEADER_DIRENT.
8764
a3d08894
TT
87652013-11-18 Tom Tromey <tromey@redhat.com>
8766
8767 * server.h: Don't check HAVE_STRING_H.
8768 * gdbreplay.c: Don't check HAVE_STRING_H.
8769 * configure: Rebuild.
8770
0a5dd17d
TT
87712013-11-18 Tom Tromey <tromey@redhat.com>
8772
8773 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8774 LIBGNU.
8775
1bd2f0ba
TT
87762013-11-08 Tom Tromey <tromey@redhat.com>
8777
8778 * configure, config.in: Rebuild.
8779 * configure.ac: Remove unused configury.
8780
3266f10b
TT
87812013-11-08 Tom Tromey <tromey@redhat.com>
8782
8783 * acinclude.m4: Include common.m4, codeset.m4.
8784 * configure, config.in: Rebuild.
8785 * configure.ac: Use GDB_AC_COMMON.
8786
6682d959
AA
87872013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8788
8789 * linux-s390-low.c (HWCAP_S390_TE): New define.
8790 (s390_arch_setup): Consider the TE field in the HWCAP for
8791 determining 'have_regset_tdb'.
8792
fd0a4d76
SDJ
87932013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8794
8795 PR gdb/16014
8796 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8797 call to sizeof.
8798
1a3d890b
PA
87992013-10-02 Pedro Alves <palves@redhat.com>
8800
8801 * server.c (process_serial_event): Don't output "GDBserver
8802 exiting" if GDB is connected through stdio.
8803 * target.c (mywait): Likewise, be silent if GDB is connected
8804 through stdio.
8805
97ad4581
JB
88062013-10-01 Joel Brobecker <brobecker@adacore.com>
8807
8808 * lynx-low.c (lynx_add_threads_after_attach): New function.
8809 (lynx_attach): Remove call to add_thread. Add call to
8810 lynx_add_threads_after_attach instead.
8811
5b4e221c
MF
88122013-09-28 Mike Frysinger <vapier@gentoo.org>
8813
8814 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8815 * config.in, configure: Regenerated.
8816
ee47b2f8
YQ
88172013-09-18 Yao Qi <yao@codesourcery.com>
8818
8819 PR server/15959
8820 * server.c (start_inferior): Clear 'resume_info'.
8821
d6707650 88222013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8823
d6707650
JW
8824 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8825 for each register.
8826
9243dd0e 88272013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8828
9243dd0e
JW
8829 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8830 linux-tile-low.o to srv_tgtobj.
8831
c623a6ef
WN
88322013-09-16 Will Newton <will.newton@linaro.org>
8833
8834 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8835 out regs.
8836
fb71d39e
PA
88372013-09-06 Pedro Alves <palves@redhat.com>
8838
8839 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8840 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8841 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8842 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8843 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8844 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8845
8e7e9910
PA
88462013-09-06 Pedro Alves <palves@redhat.com>
8847
8848 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8849 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8850
7c3a12ca
PA
88512013-09-06 Pedro Alves <palves@redhat.com>
8852
8853 * linux-amd64-ipa.c: Include tracepoint.h.
8854 * linux-i386-ipa.c: Include tracepoint.h.
8855
8eb3d7b6
RW
88562013-09-06 Ricard Wanderlof <ricardw@axis.com>
8857
8858 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8859 (ps_get_thread_area): New function.
8860
eddddb9d
RW
88612013-09-06 Ricard Wanderlof <ricardw@axis.com>
8862
8863 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8864 (initialize_low_arch): Call init_registers_crisv32 rather than
8865 init_register_crisv32.
8866
533b0600
PA
88672013-09-05 Pedro Alves <palves@redhat.com>
8868
8869 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8870 to ...
8871 * hostio.h: ... this new file.
8872 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8873 win32-low.c: Include hostio.h.
8874
0ce3d3b5
PA
88752013-09-05 Pedro Alves <palves@redhat.com>
8876
8877 * server.h (gdb_client_data, handler_func, callback_handler_func)
8878 (delete_file_handler, add_file_handler, append_callback_event)
8879 (delete_callback_event, start_event_loop, initialize_event_loop):
8880 Move to event-loop.h and include it.
8881 * event-loop.h: New file.
8882
799cdc37
PA
88832013-09-05 Pedro Alves <palves@redhat.com>
8884
8885 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8886 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8887 (loaded_dll, unloaded_dll): Move to ...
8888 * dll.h: ... this new file.
8889 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8890
6a6bbd9d
PA
88912013-09-05 Pedro Alves <palves@redhat.com>
8892
8893 * server.h (current_process, get_thread_process, all_processes)
8894 (add_inferior_to_list, for_each_inferior, current_inferior)
8895 (remove_inferior, add_process, remove_process, find_process_pid)
8896 (have_started_inferiors_p, have_attached_inferiors_p)
8897 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8898 (clear_inferiors, find_inferior, find_inferior_id)
8899 (inferior_target_data, set_inferior_target_data)
8900 (inferior_regcache_data, set_inferior_regcache_data): Move to
8901 inferiors.h, and include it.
8902 * inferiors.h: New file.
8903
f699aaba
PA
89042013-09-05 Pedro Alves <palves@redhat.com>
8905
8906 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8907 Move ...
72f4393d 8908 * ax.h: ... here.
f699aaba 8909
c144c7a0
PA
89102013-09-05 Pedro Alves <palves@redhat.com>
8911
8912 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8913 tracepoint.h.
8914 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8915 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8916 (handle_tracepoint_general_set, handle_tracepoint_query)
8917 (tracepoint_finished_step, tracepoint_was_hit)
8918 (release_while_stepping_state_list, current_traceframe)
8919 (in_readonly_region, traceframe_read_mem)
8920 (fetch_traceframe_registers, traceframe_read_sdata)
8921 (traceframe_read_info, struct fast_tpoint_collect_status)
8922 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8923 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8924 (supply_fast_tracepoint_registers)
8925 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8926 (ipa_tdesc, claim_trampoline_space)
8927 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8928 (agent_mem_read, agent_get_trace_state_variable_value)
8929 (agent_set_trace_state_variable_value, agent_tsv_read)
8930 (agent_mem_read_string, get_raw_reg_func_addr)
8931 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8932 * tracepoint.h: ... this new file.
8933
ff42e6ab
PA
89342013-09-05 Pedro Alves <palves@redhat.com>
8935
8936 * server.h (perror_with_name, error, fatal, warning, paddress)
8937 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8938 include it.
8939 * utils.h: New file.
8940
541af0f4
PA
89412013-09-05 Pedro Alves <palves@redhat.com>
8942
8943 * server.h (remote_debug, noack_mode, transport_is_reliable)
8944 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8945 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8946 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8947 (write_enn, initialize_async_io, enable_async_io)
8948 (disable_async_io, check_remote_input_interrupt_request)
8949 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8950 (dead_thread_notify, prepare_resume_reply)
8951 (decode_address_to_semicolon, decode_address, decode_m_packet)
8952 (decode_M_packet, decode_X_packet, decode_xfer_write)
8953 (decode_search_memory_packet, unhexify, hexify)
8954 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8955 (look_up_one_symbol, relocate_instruction)
8956 (monitor_output): Move to remote-utils.h, and include it.
8957 * remote-utils.h: New file.
8958
eebdf26b
PA
89592013-09-05 Pedro Alves <palves@redhat.com>
8960
8961 * server.h (_): Delete.
8962
3aafd2ff
PA
89632013-09-02 Pedro Alves <palves@redhat.com>
8964
8965 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8966 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8967 allocated.
8968 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8969
cee83bcb
PM
89702013-09-02 Pierre Muller <muller@sourceware.org>
8971
8972 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8973 or WriteProcessMemory complete successfully and handle
8974 ERROR_PARTIAL_COPY error.
8975
9a13b2fa
PA
89762013-09-02 Pedro Alves <palves@redhat.com>
8977
8978 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8979 error instead of EIO.
8980
602e3198
JK
89812013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8982
8983 PR server/15604
8984 * linux-low.c: Include filestuff.h.
8985 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8986 * lynx-low.c: Include filestuff.h.
8987 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8988 * server.c: Include filestuff.h.
8989 (main): Call notice_open_fds.
8990 * spu-low.c: Include filestuff.h.
8991 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8992
96d7229d
LM
89932013-08-22 Luis Machado <lgustavo@codesourcery.com>
8994
8995 * Makefile.in: Explain why ../target and ../nat are not
8996 listed as include file search paths.
8997 (linux-waitpid.o): New object file rule.
8998 * configure.srv (srv_native_linux_obj): New variable.
8999 Replace all occurrences of linux native object files with
9000 $srv_native_linux_obj.
9001 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9002 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9003 (linux_enable_event_reporting): Remove declaration.
9004 (my_waitpid): Moved to common/linux-waitpid.c.
9005 (linux_wait_for_event): Pass ptid when calling
9006 linux_enable_event_reporting.
9007 (linux_supports_tracefork_flag): Remove.
9008 (linux_enable_event_reporting): Likewise.
9009 (linux_tracefork_grandchild): Remove.
9010 (STACK_SIZE): Moved to common/linux-ptrace.c.
9011 (linux_tracefork_child): Remove.
9012 (linux_test_for_tracefork): Remove.
9013 (linux_look_up_symbols): Call linux_supports_traceclone.
9014 (initialize_low): Remove call to linux_test_for_tracefork.
9015 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9016 common/linux-ptrace.h.
9017 (PTRACE_TYPE_ARG4): Likewise.
9018 Include linux-ptrace.h.
9019
32940073
PA
90202013-08-21 Pedro Alves <palves@redhat.com>
9021
9022 * config.in: Renegerate.
9023
33b60d58 90242013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9025
33b60d58
LM
9026 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9027 (SFILES): Remove $(srcdir)/common/target-common.c and
9028 add $(srcdir)/target/waitstatus.c.
9029 (OBS): Remove target-common.o and add waitstatus.o.
9030 (server_h): Remove $(srcdir)/../common/target-common.h and
9031 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9032 and $(srcdir)/../target/waitstatus.h.
9033 (target-common.o): Remove.
9034 (waitstatus.o): New target object file.
9035 * target.h: Do not include target-common.h and
9036 include target/resume.h, target/wait.h and
9037 target/waitstatus.h.
9038
b8e1b30e
LM
90392013-08-13 Luis Machado <lgustavo@codesourcery.com>
9040
9041 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9042 to PTRACE_TYPE_ARG3.
9043 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9044 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9045 PTRACE_TYPE_ARG4.
9046 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9047 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9048
7a60ad40
YQ
90492013-07-27 Jie Zhang <jie@codesourcery.com>
9050 Daniel Jacobowitz <dan@codesourcery.com>
9051 Yao Qi <yao@codesourcery.com>
9052
9053 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9054 (mips-linux-watch.o): New rule.
9055 (mips_linux_watch_h): New variable.
9056 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9057 srv_tgtobj.
9058 * linux-mips-low.c: Include mips-linux-watch.h.
9059 (struct arch_process_info, struct arch_lwp_info): New.
9060 (update_watch_registers_callback): New function.
9061 (mips_linux_new_process, mips_linux_new_thread) New functions.
9062 (mips_linux_prepare_to_resume, mips_insert_point): New
9063 functions.
9064 (mips_remove_point, mips_stopped_by_watchpoint): New
9065 functions.
9066 (rsp_bp_type_to_target_hw_bp_type): New function.
9067 (mips_stopped_data_address): New function.
9068 (the_low_target): Add watchpoint support functions.
9069
de6f69ad
YQ
90702013-07-27 Yao Qi <yao@codesourcery.com>
9071
9072 * i386-low.c: Include break-common.h.
9073 (enum target_hw_bp_type): Remove.
9074
3360c0bf
LM
90752013-07-24 Luis Machado <lgustavo@codesourcery.com>
9076
9077 * Makefile.in (SFILES): /common/target-common.c.
9078 (OBS): Add target-common.o.
9079 (server_h): Add $(srcdir)/../common/target-common.h.
9080 (target-common.o): New target.
9081 * server.c (queue_stop_reply_callback): Free
9082 status string after use.
9083 * target.c (target_waitstatus_to_string): Remove.
9084 * target.h: Include target-common.h.
9085 (resume_kind): Likewise.
9086 (target_waitkind): Likewise.
9087 (target_waitstatus): Likewise.
9088 (TARGET_WNOHANG): Likewise.
9089
bd885420
YQ
90902013-07-04 Yao Qi <yao@codesourcery.com>
9091
9092 * Makefile.in (host_alias): Use @host_noncanonical@.
9093 (target_alias): Use @target_noncanonical@.
9094 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9095 ACX_NONCANONICAL_HOST.
9096 * configure: Regenerated.
9097
9098 Revert:
9099 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9100
9101 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9102 * configure: Rebuild.
9103 * Makefile.in (version_host, version_target): Get from configure.
9104 (version.c): Use $(version_host) and $(version_target).
9105
17ef446e
PA
91062013-07-03 Pedro Alves <palves@redhat.com>
9107
9108 * Makefile.in (config.status): Depend on development.sh.
9109 * acinclude.m4: Include libmcheck.m4.
9110 * configure: Regenerate.
9111
7a9a7487
MG
91122013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9113
9114 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9115 attribute inside the parentheses.
9116 (winapi_DebugSetProcessKillOnExit): Ditto.
9117 (winapi_DebugBreakProcess): Ditto.
9118 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9119
49b64de6
MG
91202013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9121
9122 * notif.h (notif_event): Add a dummy member to avoid compiler
9123 errors.
9124
d5749ee7
PA
91252013-07-01 Pedro Alves <palves@redhat.com>
9126
9127 * hostio.c (HOSTIO_PATH_MAX): Define.
9128 (require_filename, handle_open, handle_unlink, handle_readlink):
9129 Use it.
9130
d8d2a3ee
PA
91312013-07-01 Pedro Alves <palves@redhat.com>
9132
9133 * server.h: Include "pathmax.h".
9134 * linux-low.c: Don't include sys/param.h.
9135 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9136 MAXPATHLEN.
9137 * win32-low.c: Don't include sys/param.h.
9138 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9139
bc7dea8d
PA
91402013-07-01 Pedro Alves <palves@redhat.com>
9141
9142 * event-loop.c: Don't check HAVE_UNISTD_H before including
9143 <unistd.h>.
9144 * gdbreplay.c: Likewise.
9145 * remote-utils.c: Likewise.
9146 * server.c: Likewise.
9147 * configure.ac: Don't check for unistd.h.
9148 * configure: Regenerate.
9149
d6c2da54
TT
91502013-06-28 Tom Tromey <tromey@redhat.com>
9151
9152 * Makefile.in (version.c): Use version.in, not
9153 common/version.in.
9154
257b6bec
MG
91552013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9156
9157 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9158 * configure: Rebuild.
9159 * Makefile.in (version_host, version_target): Get from configure.
9160 (version.c): Use $(version_host) and $(version_target).
9161
86ebe149
DK
91622013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9163
9164 Fix trace-status to output user name without trailing colon.
9165 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9166
f30aa5af
DK
91672013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9168
9169 Fix trace-status to output proper start-time and stop-time.
9170 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9171 output start time and stop time in hex as gdb expects.
9172
28a93511
YQ
91732013-06-26 Pedro Alves <pedro@codesourcery.com>
9174
9175 * tracepoint.c (build_traceframe_info_xml): Output trace state
9176 variables present in the trace buffer.
9177
01208463
TT
91782013-06-24 Tom Tromey <tromey@redhat.com>
9179
9180 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9181 create-version.sh.
9182 (version.o): Remove.
9183 * gdbreplay.c: Include version.h.
9184 (version, host_name): Don't declare.
9185 * server.h: Include version.h.
9186 (version, host_name): Don't declare.
9187
760256f9
PA
91882013-06-12 Pedro Alves <palves@redhat.com>
9189
9190 * linux-x86-low.c (linux_is_elf64): Delete global.
9191 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9192 with local linux_pid_exe_is_elf_64_file use.
9193
030031ee
PA
91942013-06-11 Pedro Alves <palves@redhat.com>
9195
9196 * linux-low.c (regset_disabled, disable_regset): New functions.
9197 (regsets_fetch_inferior_registers)
9198 (regsets_store_inferior_registers): Use them.
9199 (initialize_regsets_info); Don't allocate the disabled_regsets
9200 array here.
9201 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9202 comment.
9203
5da6eb0a
PA
92042013-06-11 Pedro Alves <palves@redhat.com>
9205
9206 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9207 xmalloc.
9208
7e5aaa09
PA
92092013-06-11 Pedro Alves <palves@redhat.com>
9210
9211 * linux-x86-low.c (initialize_low_arch): Call
9212 init_registers_x32_avx_linux.
9213
d878444c
JK
92142013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9215
9216 Fix compatibility with Android Bionic.
9217 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9218 it is not empty.
9219
3aee8918
PA
92202013-06-07 Pedro Alves <palves@redhat.com>
9221
5f2b57b5 9222 PR server/14823
3aee8918
PA
9223 * Makefile.in (OBS): Add tdesc.o.
9224 (IPA_OBJS): Add tdesc-ipa.o.
9225 (tdesc-ipa.o): New rule.
9226 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9227 interface.
9228 * linux-low.c (new_inferior): Delete.
9229 (disabled_regsets, num_regsets): Delete.
9230 (linux_add_process): Adjust to set the new per-process
9231 new_inferior flag.
9232 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9233 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9234 was a stop. When calling arch_setup, switch the current inferior
9235 to the thread that got an event.
9236 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9237 (regsets_fetch_inferior_registers)
9238 (regsets_store_inferior_registers): New regsets_info parameter.
9239 Adjust to use it.
9240 (linux_register_in_regsets): New regs_info parameter. Adjust to
9241 use it.
9242 (register_addr, fetch_register, store_register): New usrregs_info
9243 parameter. Adjust to use it.
9244 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9245 parameter regs_info. Adjust to use it.
9246 (linux_fetch_registers): Get the current inferior's regs_info, and
9247 adjust to use it.
9248 (linux_store_registers): Ditto.
9249 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9250 (initialize_low): Don't initialize the target_regsets here. Call
9251 initialize_low_arch.
9252 * linux-low.h (target_regsets): Delete declaration.
9253 (struct regsets_info): New.
9254 (struct usrregs_info): New.
9255 (struct regs_info): New.
9256 (struct process_info_private) <new_inferior>: New field.
9257 (struct linux_target_ops): Delete the num_regs, regmap, and
9258 regset_bitmap fields. New field regs_info.
9259 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9260 * i387-fp.c (num_xmm_registers): Delete.
9261 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9262 calls to new interface.
9263 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9264 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9265 Infer the number of xmm registers from the regcache's target
9266 description.
9267 * i387-fp.h (num_xmm_registers): Delete.
9268 * inferiors.c (add_thread): Don't install the thread's regcache
9269 here.
9270 * proc-service.c (gregset_info): Fetch the current inferior's
9271 regs_info. Adjust to use it.
9272 * regcache.c: Include tdesc.h.
9273 (register_bytes, reg_defs, num_registers)
9274 (gdbserver_expedite_regs): Delete.
9275 (get_thread_regcache): If the thread doesn't have a regcache yet,
9276 create one, instead of aborting gdbserver.
9277 (regcache_invalidate_one): Rename to ...
9278 (regcache_invalidate_thread): ... this.
9279 (regcache_invalidate_one): New.
9280 (regcache_invalidate): Only invalidate registers of the current
9281 process.
9282 (init_register_cache): Add target_desc parameter, and use it.
9283 (new_register_cache): Ditto. Assert the target description has a
9284 non zero registers_size.
9285 (regcache_cpy): Add assertions. Adjust.
9286 (realloc_register_cache, set_register_cache): Delete.
9287 (registers_to_string, registers_from_string): Adjust.
9288 (find_register_by_name, find_regno, find_register_by_number)
9289 (register_cache_size): Add target_desc parameter, and use it.
9290 (free_register_cache_thread, free_register_cache_thread_one)
9291 (regcache_release, register_cache_size): New.
9292 (register_size): Add target_desc parameter, and use it.
9293 (register_data, supply_register, supply_register_zeroed)
9294 (supply_regblock, supply_register_by_name, collect_register)
9295 (collect_register_as_string, collect_register_by_name): Adjust.
9296 * regcache.h (struct target_desc): Forward declare.
9297 (struct regcache) <tdesc>: New field.
9298 (init_register_cache, new_register_cache): Add target_desc
9299 parameter.
9300 (regcache_invalidate_thread): Declare.
9301 (regcache_invalidate_one): Delete declaration.
9302 (regcache_release): Declare.
9303 (find_register_by_number, register_cache_size, register_size)
9304 (find_regno): Add target_desc parameter.
9305 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9306 declarations.
9307 * remote-utils.c: Include tdesc.h.
9308 (outreg, prepare_resume_reply): Adjust.
9309 * server.c: Include tdesc.h.
9310 (gdbserver_xmltarget): Delete declaration.
9311 (get_features_xml, process_serial_event): Adjust.
9312 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9313 declare.
9314 (struct process_info) <tdesc>: New field.
9315 (ipa_tdesc): Declare.
9316 * tdesc.c: New file.
9317 * tdesc.h: New file.
9318 * tracepoint.c: Include tdesc.h.
9319 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9320 (get_context_regcache): Adjust to pass ipa_tdesc down.
9321 (do_action_at_tracepoint): Adjust to get the register cache size
9322 from the context regcache's description.
9323 (traceframe_walk_blocks): Adjust to get the register cache size
9324 from the current trace frame's description.
9325 (traceframe_get_pc): Adjust to get current trace frame's
9326 description and pass it down.
9327 (gdb_collect): Adjust to get the register cache size from the
9328 IPA's description.
9329 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9330 (gdbserver_xmltarget): Delete.
9331 (initialize_low_tracepoint): Set the ipa's target description.
9332 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9333 (initialize_low_tracepoint): Set the ipa's target description.
9334 * linux-x86-low.c: Include tdesc.h.
9335 [__x86_64__] (is_64bit_tdesc): New.
9336 (ps_get_thread_area, x86_get_thread_area): Use it.
9337 (i386_cannot_store_register): Rename to ...
9338 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9339 (i386_cannot_fetch_register): Rename to ...
9340 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9341 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9342 to new interface.
9343 (target_regsets): Rename to ...
9344 (x86_regsets): ... this.
9345 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9346 interface.
9347 (x86_siginfo_fixup): Use is_64bit_tdesc.
9348 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9349 (tdesc_x32_avx_linux, tdesc_x32_linux)
9350 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9351 Declare.
9352 (x86_linux_update_xmltarget): Delete.
9353 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9354 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9355 (AMD64_LINUX_USER64_CS): New.
9356 (x86_linux_read_description): New, based on
9357 x86_linux_update_xmltarget.
9358 (same_process_callback): New.
9359 (x86_arch_setup_process_callback): New.
9360 (x86_linux_update_xmltarget): New.
9361 (x86_regsets_info): New.
9362 (amd64_linux_regs_info): New.
9363 (i386_linux_usrregs_info): New.
9364 (i386_linux_regs_info): New.
9365 (x86_linux_regs_info): New.
9366 (x86_arch_setup): Reimplement.
9367 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9368 (x86_emit_ops): Ditto.
9369 (the_low_target): Adjust. Install x86_linux_regs_info,
9370 x86_cannot_fetch_register, and x86_cannot_store_register.
9371 (initialize_low_arch): New.
9372 * linux-ia64-low.c (tdesc_ia64): Declare.
9373 (ia64_fetch_register): Adjust.
9374 (ia64_usrregs_info, regs_info): New globals.
9375 (ia64_regs_info): New function.
9376 (the_low_target): Adjust.
9377 (initialize_low_arch): New function.
9378 * linux-sparc-low.c (tdesc_sparc64): Declare.
9379 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9380 Adjust.
9381 (sparc_arch_setup): New function.
9382 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9383 (the_low_target): Adjust.
9384 (initialize_low_arch): New function.
9385 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9386 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9387 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9388 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9389 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9390 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9391 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9392 (tdesc_powerpc_isa205_vsx64l): Declare.
9393 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9394 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9395 (ppc_set_pc, ppc_get_hwcap): Adjust.
9396 (ppc_usrregs_info): Forward declare.
9397 (!__powerpc64__) ppc_regmap_adjusted: New global.
9398 (ppc_arch_setup): Adjust to the current process'es target
9399 description.
9400 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9401 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9402 (ppc_store_evrregset): Adjust.
9403 (target_regsets): Rename to ...
9404 (ppc_regsets): ... this, and make static.
9405 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9406 (ppc_regs_info): New function.
9407 (the_low_target): Adjust.
9408 (initialize_low_arch): New function.
9409 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9410 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9411 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9412 (tdesc_s390x_linux64v2): Declare.
9413 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9414 (s390_fill_gregset, s390_store_last_break): Adjust.
9415 (target_regsets): Rename to ...
9416 (s390_regsets): ... this, and make static.
9417 (s390_get_pc, s390_set_pc): Adjust.
9418 (s390_get_hwcap): New target_desc parameter, and use it.
9419 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9420 (s390_arch_setup): Adjust to set the current process'es target
9421 description. Don't adjust the regmap.
9422 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9423 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9424 (regs_info_3264): New globals.
9425 (s390_regs_info): New function.
9426 (the_low_target): Adjust.
9427 (initialize_low_arch): New function.
9428 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9429 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9430 [__mips64] (init_registers_mips_linux)
9431 (init_registers_mips_dsp_linux): Delete defines.
9432 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9433 (have_dsp): New global.
9434 (mips_read_description): New, based on mips_arch_setup.
9435 (mips_arch_setup): Reimplement.
9436 (get_usrregs_info): New function.
9437 (mips_cannot_fetch_register, mips_cannot_store_register)
9438 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9439 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9440 (target_regsets): Rename to ...
9441 (mips_regsets): ... this, and make static.
9442 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9443 (dsp_regs_info, regs_info): New globals.
9444 (mips_regs_info): New function.
9445 (the_low_target): Adjust.
9446 (initialize_low_arch): New function.
9447 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9448 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9449 Declare.
9450 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9451 (arm_read_description): New, with bits factored from
9452 arm_arch_setup.
9453 (arm_arch_setup): Reimplement.
9454 (target_regsets): Rename to ...
9455 (arm_regsets): ... this, and make static.
9456 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9457 (arm_regs_info): New function.
9458 (the_low_target): Adjust.
9459 (initialize_low_arch): New function.
9460 * linux-m68k-low.c (tdesc_m68k): Declare.
9461 (target_regsets): Rename to ...
9462 (m68k_regsets): ... this, and make static.
9463 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9464 (m68k_regs_info): New function.
9465 (m68k_arch_setup): New function.
9466 (the_low_target): Adjust.
9467 (initialize_low_arch): New function.
9468 * linux-sh-low.c (tdesc_sharch): Declare.
9469 (target_regsets): Rename to ...
9470 (sh_regsets): ... this, and make static.
9471 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9472 (sh_regs_info, sh_arch_setup): New functions.
9473 (the_low_target): Adjust.
9474 (initialize_low_arch): New function.
9475 * linux-bfin-low.c (tdesc_bfin): Declare.
9476 (bfin_arch_setup): New function.
9477 (bfin_usrregs_info, regs_info): New globals.
9478 (bfin_regs_info): New function.
9479 (the_low_target): Adjust.
9480 (initialize_low_arch): New function.
9481 * linux-cris-low.c (tdesc_cris): Declare.
9482 (cris_arch_setup): New function.
9483 (cris_usrregs_info, regs_info): New globals.
9484 (cris_regs_info): New function.
9485 (the_low_target): Adjust.
9486 (initialize_low_arch): New function.
9487 * linux-cris-low.c (tdesc_crisv32): Declare.
9488 (cris_arch_setup): New function.
9489 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9490 (cris_regs_info): New function.
9491 (the_low_target): Adjust.
9492 (initialize_low_arch): New function.
9493 * linux-m32r-low.c (tdesc_m32r): Declare.
9494 (m32r_arch_setup): New function.
9495 (m32r_usrregs_info, regs_info): New globals.
9496 (m32r_regs_info): Adjust.
9497 (initialize_low_arch): New function.
9498 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9499 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9500 (tic6x_usrregs_info): Forward declare.
9501 (tic6x_read_description): New function, based on ...
9502 (tic6x_arch_setup): ... this. Reimplement.
9503 (target_regsets): Rename to ...
9504 (tic6x_regsets): ... this, and make static.
9505 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9506 (tic6x_regs_info): New function.
9507 (the_low_target): Adjust.
9508 (initialize_low_arch): New function.
9509 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9510 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9511 (target_regsets): Rename to ...
9512 (xtensa_regsets): ... this, and make static.
9513 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9514 globals.
9515 (xtensa_arch_setup, xtensa_regs_info): New functions.
9516 (the_low_target): Adjust.
9517 (initialize_low_arch): New function.
9518 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9519 (nios2_arch_setup): Set the current process'es tdesc.
9520 (target_regsets): Rename to ...
9521 (nios2_regsets): ... this.
9522 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9523 (nios2_regs_info): New function.
9524 (the_low_target): Adjust.
9525 (initialize_low_arch): New function.
a261b8f5
PA
9526 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9527 (aarch64_arch_setup): Set the current process'es tdesc.
9528 (target_regsets): Rename to ...
9529 (aarch64_regsets): ... this.
9530 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9531 (aarch64_regs_info): New function.
9532 (the_low_target): Adjust.
9533 (initialize_low_arch): New function.
3aee8918
PA
9534 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9535 globals.
9536 (target_regsets): Rename to ...
9537 (tile_regsets): ... this.
9538 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9539 (tile_regs_info): New function.
9540 (tile_arch_setup): Set the current process'es tdesc.
9541 (the_low_target): Adjust.
9542 (initialize_low_arch): New function.
9543 * spu-low.c (tdesc_spu): Declare.
9544 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9545 * win32-arm-low.c (tdesc_arm): Declare.
9546 (arm_arch_setup): New function.
9547 (the_low_target): Install arm_arch_setup instead of
9548 init_registers_arm.
9549 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9550 (init_windows_x86): Rename to ...
9551 (i386_arch_setup): ... this. Set `win32_tdesc'.
9552 (the_low_target): Adjust.
9553 * win32-low.c (win32_tdesc): New global.
9554 (child_add_thread): Don't create the thread cache here.
9555 (do_initial_child_stuff): Set the new process'es tdesc.
9556 * win32-low.h (struct target_desc): Forward declare.
9557 (win32_tdesc): Declare.
9558 * lynx-i386-low.c (tdesc_i386): Declare global.
9559 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9560 * lynx-low.c (lynx_tdesc): New global.
9561 (lynx_add_process): Set the new process'es tdesc.
9562 * lynx-low.h (struct target_desc): Forward declare.
9563 (lynx_tdesc): Declare global.
9564 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9565 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9566 * nto-low.c (nto_tdesc): New global.
9567 (do_attach): Set the new process'es tdesc.
9568 * nto-low.h (struct target_desc): Forward declare.
9569 (nto_tdesc): Declare.
9570 * nto-x86-low.c (tdesc_i386): Declare.
9571 (nto_x86_arch_setup): Set `nto_tdesc'.
9572
b1fbec62
GB
95732013-06-04 Gary Benson <gbenson@redhat.com>
9574
9575 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9576 to qSupported response when appropriate.
9577 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9578 with nonzero-length annex.
9579 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9580 arguments supplied in annex.
9581
d1ec4ce7
DE
95822013-05-31 Doug Evans <dje@google.com>
9583
ac44adcb 9584 PR server/15594
d1ec4ce7
DE
9585 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9586 64 bits in 64-cross-32 environment.
9587
9b25f2d3
PA
95882013-05-28 Pedro Alves <palves@redhat.com>
9589
9590 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9591 (aarch64-without-fpu.c): Delete rule.
9592 * configure.srv (aarch64*-*-linux*): Remove references to
9593 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9594 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9595 declaration.
9596
6740dc9c
PA
95972013-05-24 Pedro Alves <palves@redhat.com>
9598
9599 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9600 instead of strchr/decode_address. Error if the range isn't split
9601 with a ','. Don't assume there's be a ':' in the action.
9602
c2d6af84
PA
96032013-05-23 Yao Qi <yao@codesourcery.com>
9604 Pedro Alves <palves@redhat.com>
9605
9606 * linux-low.c (lwp_in_step_range): New function.
9607 (linux_wait_1): If the thread was range stepping and stopped
9608 outside the stepping range, report the stop to GDB. Otherwise,
9609 continue stepping. Add range stepping debug output.
9610 (linux_set_resume_request): Copy the step range from the resume
9611 request to the lwp.
9612 (linux_supports_range_stepping): New.
9613 (linux_target_ops) <supports_range_stepping>: Set to
9614 linux_supports_range_stepping.
9615 * linux-low.h (struct linux_target_ops)
9616 <supports_range_stepping>: New field.
9617 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9618 * linux-x86-low.c (x86_supports_range_stepping): New.
9619 (the_low_target) <supports_range_stepping>: Set to
9620 x86_supports_range_stepping.
9621 * server.c (handle_v_cont): Handle 'r' action.
9622 (handle_v_requests): Append ";r" if the target supports range
9623 stepping.
9624 * target.h (struct thread_resume) <step_range_start,
9625 step_range_end>: New fields.
9626 (struct target_ops) <supports_range_stepping>:
9627 New field.
9628 (target_supports_range_stepping): New macro.
9629
58794e1a
JB
96302013-05-17 Joel Brobecker <brobecker@adacore.com>
9631
9632 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9633 confusion in comment.
9634
d631c5a7
JB
96352013-05-17 Joel Brobecker <brobecker@adacore.com>
9636
9637 * lynx-low.c (struct process_info_private): New type.
9638 (lynx_add_process): New function.
9639 (lynx_create_inferior, lynx_attach): Replace calls to
9640 add_process by calls to lynx_add_process.
9641 (lynx_resume): If PTID is null, then try using
9642 current_process()->private->last_wait_event_ptid.
9643 Add comments.
9644 (lynx_clear_inferiors): Delete. The contents of that function
9645 has been inlined in lynx_mourn;
9646 (lynx_wait_1): Save the ptid in the process's private data.
9647 (lynx_mourn): Free the process' private data. Replace call
9648 to lynx_clear_inferiors by call to clear_inferiors.
9649
96f7a20f
YQ
96502013-05-17 Yao Qi <yao@codesourcery.com>
9651
9652 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9653 the right place.
9654
db0dfaa0
LM
96552013-05-16 Luis Machado <lgustavo@codesourcery.com>
9656
9657 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9658 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9659 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9660 PT_TEXT_END_ADDR guards. Update comments.
9661 (linux_target_op) <read_offsets>: Conditionally define to
9662 linux_read_offsets if the target is UCLIBC and if it defines
9663 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9664
68f5f838
SL
96652013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9666 Andrew Jenner <andrew@codesourcery.com>
9667
9668 * Makefile.in (SFILES): Add linux-nios2-low.c.
9669 (clean): Add action to delete nios2-linux.c.
9670 (nios2-linux.c): New rule.
9671 * configure.srv: Add nios2*-*-linux*.
9672 * linux-nios2-low.c: New.
9673
1ebff1fd
HAQ
96742013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9675
9676 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9677
f6150862
HZ
96782013-04-25 Hui Zhu <hui@codesourcery.com>
9679
9680 PR gdb/15186
f6150862
HZ
9681 * ax.c (ax_printf): Add fflush.
9682
614c279d
TT
96832013-04-22 Tom Tromey <tromey@redhat.com>
9684
9685 * Makefile.in (SFILES): Add filestuff.c.
9686 (OBS): Add filestuff.o.
9687 (filestuff.o): New target.
9688 * config.in, configure: Rebuild.
9689 * configure.ac: Check for fdwalk, pipe2.
9690
7d4e5717
PA
96912013-04-17 Pedro Alves <palves@redhat.com>
9692
9693 * configure.ac (USE_THREAD_DB): Delete variable.
9694 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9695 Don't AC_SUBST USE_THREAD_DB.
9696 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9697 * config.in, configure: Regenerate.
9698
d5c93e41
PA
96992013-04-16 Pedro Alves <palves@redhat.com>
9700
9701 * linux-low.h (struct lwp_info) <thread_known>: Move under
9702 the USE_THREAD_DB #ifdef.
9703
04f5fe89
PA
97042013-04-16 Pedro Alves <palves@redhat.com>
9705
9706 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9707 (linux-low.o): Delete rule.
9708 * linux-low.h: Always include "gdb_thread_db.h" instead of
9709 conditionally including thread_db.h.
9710 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9711 HAVE_THREAD_DB_H.
9712
480b27bf
JK
97132013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9714
9715 * Makefile.in (install-only): Fix make install regression.
9716
43662968
JK
97172013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9718
9719 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9720 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9721 installation.
9722 * gdbserver.1: Remove.
9723
3e74e146
PA
97242013-03-22 Pedro Alves <palves@redhat.com>
9725
9726 * linux-low.c (handle_extended_wait): Don't call
9727 linux_enable_event_reporting.
9728
a8347a2a
TT
97292013-03-15 Tony Theodore <tonyt@logyst.com>
9730
9731 PR build/9098:
9732 * Makefile.in (SHELL): Use @SHELL@.
9733
eeb56fa7
SDJ
97342013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9735
9736 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9737 compiler warning.
9738
4fa7e2ff
JB
97392013-03-13 Joel Brobecker <brobecker@adacore.com>
9740
9741 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9742 Remove extraneous NULL element.
9743
8ddb1965
YQ
97442013-03-13 Yao Qi <yao@codesourcery.com>
9745
9746 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9747 'V' block in trace frame.
9748
9accd112
MM
97492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9750
9751 * target.h (struct target_ops): Add btrace ops.
9752 (target_supports_btrace): New macro.
9753 (target_enable_btrace): New macro.
9754 (target_disable_btrace): New macro.
9755 (target_read_btrace): New macro.
9756 * gdbthread.h (struct thread_info): Add btrace field.
9757 * server.c: Include btrace-common.h.
9758 (handle_btrace_general_set): New function.
9759 (handle_btrace_enable): New function.
9760 (handle_btrace_disable): New function.
9761 (handle_general_set): Call handle_btrace_general_set.
9762 (handle_qxfer_btrace): New function.
9763 (struct qxfer qxfer_packets[]): Add btrace entry.
9764 * inferiors.c (remove_thread): Disable btrace.
9765 * linux-low: Include linux-btrace.h.
9766 (linux_low_enable_btrace): New function.
9767 (linux_low_read_btrace): New function.
9768 (linux_target_ops): Add btrace ops.
9769 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9770 Add srv_linux_btrace=yes.
9771 (x86_64-*-linux*): Add linux-btrace.o.
9772 Add srv_linux_btrace=yes.
9773 * configure.ac: Define HAVE_LINUX_BTRACE.
9774 * config.in: Regenerated.
9775 * configure: Regenerated.
9776
5cc22e4c
MM
97772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9778
9779 * server.c (handle_qxfer): Preserve error message if -3 is
9780 returned.
9781 (qxfer): Document the -3 return value.
9782
7c97f91e
MM
97832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9784
9785 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9786 (linux_btrace_h): New variable.
9787 (linux-btrace.o): New rule.
9788
be9a119c 97892013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9790 Hafiz Abid Qadeer <abidh@codesourcery.com>
9791
9792 * tracepoint.c (trace_buffer_size): New global.
9793 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9794 (init_trace_buffer): Change to one-argument function. Allocate
9795 trace buffer memory.
9796 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9797 handle QTBuffer:size packet.
9798 (cmd_bigqtbuffer_size): New function.
9799 (initialize_tracepoint): Call init_trace_buffer with
9800 DEFAULT_TRACE_BUFFER_SIZE.
9801 * server.c (handle_query): Add QTBuffer:size in the
9802 supported packets.
9803
e64f7499
YQ
98042013-03-07 Yao Qi <yao@codesourcery.com>
9805
9806 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9807 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9808 of -1.
9809 (cmd_qtsp): Adjust condition. Do post increment.
9810 Set cur_action and cur_step_action back to 0.
9811
f0ae6fc3
PA
98122013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9813
9814 PR server/15236
9815 * linux-low.c (linux_write_memory): Return early success if LEN is
9816 zero.
9817
b5b0b0af
CV
98182013-03-05 Corinna Vinschen <vinschen@redhat.de>
9819
334ad4a8 9820 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9821
589bc927
TT
98222013-02-28 Tom Tromey <tromey@redhat.com>
9823
9824 * configure.ac: Invoke AC_SYS_LARGEFILE.
9825 * configure, config.in: Rebuild.
9826
dfe07582
CV
98272013-02-28 Corinna Vinschen <vinschen@redhat.com>
9828
9829 * win32-low.c: Throughout, fix format strings and casts of
9830 printf-like functions to avoid type related warnings on all
9831 platforms.
9832 (get_child_debug_event): Print dwDebugEventCode as hex since
9833 that's how it's usually documented.
9834
736cd585
YQ
98352013-02-28 Yao Qi <yao@codesourcery.com>
9836
9837 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9838 pulongest.
9839
e1f58301
JW
98402013-02-27 Jiong Wang <jiwang@tilera.com>
9841
9842 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9843 (reg-tilegx32.c): New rule.
9844 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9845 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9846 different register info initializer according to elf class.
9847 (init_registers_tilgx32): New function. The tilegx32 register info
9848 initializer.
9849 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9850 (tile_store_gregset): Likewise.
9851
d171ca78
YQ
98522013-02-27 Yao Qi <yao@codesourcery.com>
9853
9854 * server.c (process_point_options): Print debug message when
9855 debug_threads is true.
9856
282bbdf3
YQ
98572013-02-26 Yao Qi <yao@codesourcery.com>
9858
9859 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9860
aca22551
PA
98612013-02-19 Pedro Alves <palves@redhat.com>
9862 Kai Tietz <ktietz@redhat.com>
9863
9864 PR gdb/15161
9865
9866 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9867 instead of strtoul to extract address from packet.
9868 (process_serial_event) <'z'>: Likewise.
9869
4f3cee1c
YQ
98702013-02-18 Yao Qi <yao@codesourcery.com>
9871
9872 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9873
8e1d55a3
PA
98742013-02-14 Pedro Alves <palves@redhat.com>
9875
9876 Plug memory leak.
9877
9878 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9879 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9880
458820da
PA
98812013-02-14 Pedro Alves <palves@redhat.com>
9882
9883 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9884
baea0dae
PA
98852013-02-14 Pedro Alves <palves@redhat.com>
9886
9887 * tracepoint.c (save_string): Delete.
9888 (add_tracepoint_action): Use savestring instead of save_string.
9889
0b1afbb3
PA
98902013-02-12 Pedro Alves <palves@redhat.com>
9891
9892 * linux-xtensa-low.c: Ditto.
9893 * xtensa-xtregs.c: Ditto.
9894
8a4ac37e
PA
98952013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9896
9897 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9898 thread_db.
9899
148de6bb
MS
99002013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9901
9902 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9903 aarch64_num_wp_regs and aarch64_num_bp_regs to
9904 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9905
55fac6e0
MS
99062013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9907
9908 * linux-aarch64-low.c (ps_get_thread_area): Replace
9909 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9910
176eb98c
MS
99112013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9912 Marcus Shawcroft <marcus.shawcroft@arm.com>
9913 Nigel Stephens <nigel.stephens@arm.com>
9914 Yufeng Zhang <yufeng.zhang@arm.com>
9915
9916 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9917 (aarch64.c, aarch64-without-fpu.c): New targets.
9918 * configure.srv (aarch64*-*-linux*): New.
9919 * linux-aarch64-low.c: New file.
9920
56f7af9c
MS
99212013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9922
43aaf8b6 9923 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9924 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9925 (dequeue_one_deferred_signal, linux_resume_one_thread)
9926 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9927 (linux_tracefork_grandchild, linux_test_for_tracefork)
9928 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9929 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9930 where the argument is 0.
9931
60f662b0
YQ
99322013-01-25 Yao Qi <yao@codesourcery.com>
9933
9934 * event-loop.c: Include "queue.h".
9935 (gdb_event_p): New typedef.
9936 (struct gdb_event) <next_event>: Remove.
9937 (event_queue): Change to QUEUE(gdb_event_p).
9938 (async_queue_event): Remove.
9939 (gdb_event_xfree): New.
9940 (initialize_event_loop): New.
9941 (process_event): Use API from QUEUE.
9942 (wait_for_event): Likewise.
9943 * server.c (main): Call initialize_event_loop.
9944 * server.h (initialize_event_loop): Declare.
9945
5ae4861a
YQ
99462013-01-18 Yao Qi <yao@codesourcery.com>
9947
9948 * ax.h (struct eval_agent_expr_context): New.
9949 (gdb_eval_agent_expr): Update declaration.
9950 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9951 TFRAME. Add new argument CTX.
9952 * server.h (struct eval_agent_expr_context): Declare.
9953 (agent_mem_read, agent_tsv_read): Update declaration.
9954 (agent_mem_read_string): Likewise.
9955 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9956 (add_traceframe_block): Add new argument TPOINT.
9957 Increase TPOINT->traceframe_usage.
9958 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9959 eval_tracepoint_agent_expr.
9960 (condition_true_at_tracepoint): Likewise.
9961 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9962 (agent_mem_read_string, agent_tsv_read): Likewise.
9963
85e00e85
YQ
99642013-01-16 Yao Qi <yao@codesourcery.com>
9965
9966 * linux-low.c (linux_resume_one_lwp): Don't check
9967 'lwp->bp_reinsert != 0'.
9968
4039cf45
JB
99692013-01-07 Joel Brobecker <brobecker@adacore.com>
9970 Pedro Alves <palves@redhat.com>
9971
9972 * lynx-low.c (ptrace_request_to_str): Define a temporary
9973 macro and use it to simplify this function's implementation.
9974
9044dee2
JB
99752013-01-07 Joel Brobecker <brobecker@adacore.com>
9976
9977 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9978 sets errno.
9979
e6352c8f
JB
99802013-01-07 Joel Brobecker <brobecker@adacore.com>
9981
9982 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9983
50681a27
JB
99842013-01-07 Joel Brobecker <brobecker@adacore.com>
9985
9986 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9987
3f6e77ef
JB
99882013-01-07 Joel Brobecker <brobecker@adacore.com>
9989
9990 * lynx-low.c (lynx_resume): Use the resume_info parameter
9991 to determine the ptid for the lynx_ptrace call, unless
9992 it is equal to minus_one_ptid, in which case we use the
9993 ptid of the current_inferior.
9994 (lynx_wait_1): After having received a thread create/exit
9995 event, resume the inferior's execution using the signaling
9996 thread's ptid, rather than the old ptid.
9997
7fda33ae
JB
99982013-01-07 Joel Brobecker <brobecker@adacore.com>
9999
10000 * lynx-low.c (lynx_resume): Delete variable ret.
10001
b9786c74
JB
100022013-01-01 Joel Brobecker <brobecker@adacore.com>
10003
10004 * gdbreplay.c (gdbreplay_version): Update copyright year.
10005 * server.c (gdbserver_version): Likewise.
10006
8b93d60f
JB
100072012-12-17 Joel Brobecker <brobecker@adacore.com>
10008
10009 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10010 new thread.
10011
037335a7
JB
100122012-12-17 Joel Brobecker <brobecker@adacore.com>
10013
10014 * lynx-low.c (ptrace_request_to_str): Add handling for
10015 PTRACE_GETTRACESIG.
10016
52d4cbd8
JB
100172012-12-17 Joel Brobecker <brobecker@adacore.com>
10018
10019 * lynx-low.c (lynx_attach): Delete variable new_process.
10020
ab8f6ca9
JB
100212012-12-17 Joel Brobecker <brobecker@adacore.com>
10022
10023 * lynx-low.c (lynx_create_inferior): Delete variable
10024 new_process.
10025
78cbc024
JB
100262012-12-17 Joel Brobecker <brobecker@adacore.com>
10027
10028 * lynx-low.c (ptrace_request_to_str): Do not handle
10029 PTRACE_GETTHREADLIST if this macro does not exist.
10030
14a00470
YQ
100312012-12-15 Yao Qi <yao@codesourcery.com>
10032
10033 * Makefile.in (OBS): Add notif.o.
10034 * notif.c, notif.h: New.
10035 * server.c: Include "notif.h".
10036 (struct vstop_notif) <next>: Remove.
10037 <base>: New field.
10038 (queue_stop_reply): Update.
10039 (push_event, send_next_stop_reply): Remove.
10040 (discard_queued_stop_replies): Update.
10041 (notif_stop): New variable.
10042 (handle_v_stopped): Remove.
10043 (handle_v_requests): Don't call handle_v_stopped. Call
10044 handle_ack_notif instead.
10045 (queue_stop_reply_callback): Call notif_event_enque instead
10046 of queue_stop_reply.
10047 (handle_status): Don't call send_next_stop_reply, call
10048 notif_write_event instead.
10049 (kill_inferior_callback): Likewise.
10050 (detach_or_kill_inferior_callback): Likewise.
10051 (main): Call initialize_notif.
10052 (process_serial_event): Call QUEUE_is_empty.
10053 (handle_target_event): Call notif_push instead of push event.
10054 * server.h (push_event): Remove declaration.
10055
61c125b9
TT
100562012-12-10 Tom Tromey <tromey@redhat.com>
10057
10058 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10059 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10060 macros.
10061 (.c.o): Rewrite.
10062 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10063 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10064 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10065 (amd64-linux-ipa.o, ax.o): Rewrite.
10066 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10067 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10068 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10069 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10070 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10071 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10072 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10073 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10074 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10075 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10076 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10077 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10078 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10079 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10080 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10081 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10082 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10083 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10084 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10085 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10086 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10087 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10088 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10089 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10090 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10091 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10092 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10093 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10094 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10095 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10096 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10097 (reg-tilegx.o): Remove.
10098 (all_object_files): New macro.
10099 Include .deps files.
10100 * aclocal.m4, configure: Rebuild.
10101 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10102 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10103 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10104
e90e9ad9
TT
101052012-12-05 Tom Tromey <tromey@redhat.com>
10106
10107 PR gdb/14917:
10108 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10109
02d403bf 101102012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10111
10112 * configure.ac: Check for linux/perf_event.h.
10113 * config.in: Regenerated.
10114 * configure: Regenerated.
10115
0270a750
PA
101162012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10117
10118 * hostio.c (handle_readlink): Decrease buffer size
10119 parameter passed to readlink by one byte.
10120
8c29b58e
YQ
101212012-11-26 Yao Qi <yao@codesourcery.com>
10122
10123 * configure.ac (build_warnings): Append '-Wempty-body'.
10124 * configure: Regenerated.
10125 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10126 body.
10127
8bdce1ff
PM
101282012-11-15 Pierre Muller <muller@sourceware.org>
10129
10130 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10131 * config.in: Regenerate.
10132 * configure: Regenerate.
10133 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10134 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10135 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10136 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10137 header.
10138 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10139 instead of <sys/wait.h> header.
10140 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10141
02d403bf 101422012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10143
10144 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10145 (various make rules): Remove -DGDBSERVER
10146
fbd5db48
YQ
101472012-11-09 Yao Qi <yao@codesourcery.com>
10148
10149 * spu-low.c (current_ptid): Move it to ..
10150 * gdbthread.h: ... here. New.
10151 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10152 * server.c (myresume, process_serial_event): Likewise.
10153 * thread-db.c (thread_db_find_new_threads): Likewise.
10154 * tracepoint.c (run_inferior_command): Likewise.
10155
b3dc46ff
AB
101562012-10-01 Andrew Burgess <aburgess@broadcom.com>
10157
10158 * server.c (handle_search_memory_1): Include access length in
10159 warning message.
10160
07c04788
HPN
101612012-09-05 Michael Brandt <michael.brandt@axis.com>
10162
10163 * linux-crisv32-low.c: Fix compile errors.
10164
918d227b
YQ
101652012-09-04 Yao Qi <yao@codesourcery.com>
10166
10167 * tracepoint.c (cmd_qtsv): Adjust debug message.
10168 Don't check CUR_TPOINT.
10169
18c1b81a
YQ
101702012-08-28 Yao Qi <yao@codesourcery.com>
10171
10172 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10173 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10174 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10175 Remove declarations of xmalloc, xreallloc, xstrdup and
10176 freeargv.
10177 * Makefile.in (libiberty_h): New.
10178 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10179 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10180
dc82f37b
YQ
101812012-08-23 Yao Qi <yao@codesourcery.com>
10182
10183 * server.h: Remove declaration of 'xsnprintf'.
10184
406b1477
KS
101852012-08-22 Keith Seitz <keiths@redhat.com>
10186
10187 * server.h: Include build-gnulib-gbserver/config.h.
10188 * gdbreplay.c: Likewise.
10189
e6712ff1
DE
101902012-08-08 Doug Evans <dje@google.com>
10191
10192 * Makefile.in (SFILES): Add gdb_vecs.c.
10193 (OBS): Add gdb_vecs.o.
10194 (gdb_vecs_h, host_defs_h): New variables.
10195 (thread-db.o): Add $(gdb_vecs_h) dependency.
10196 (gdb_vecs.o): New rule.
10197 * thread-db.c: #include "gdb_vecs.h".
10198 (thread_db_load_search): Use a vector to iterate over path elements.
10199 Handle text appearing after "$pdir".
10200
10201 * configure.ac: Add check for strstr.
10202 * config.in: Regenerate.
10203 * configure: Regenerate.
10204
7c3270ae
UW
102052012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10206
10207 * hostio.c (handle_pread): If pread fails, fall back to attempting
10208 lseek/read.
10209 (handle_pwrite): Likewise for pwrite.
10210
b62e2b27
UW
102112012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10212
10213 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10214 between unsupported TYPE and unimplementable ADDR/LEN combination.
10215 (arm_insert_point): Act on new return value.
10216
78a99e91
PA
102172012-07-31 Pedro Alves <palves@redhat.com>
10218
10219 * server.c (process_point_options): Only skip tokens if we find
10220 one that is unrecognized. Don't treat 'X' specially while
10221 skipping unrecognized tokens.
10222
fcf303ab
UW
102232012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10224
10225 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10226 to 4-byte-align HW breakpoint addresses for Thumb.
10227
7255706c
YQ
102282012-07-27 Yao Qi <yao@codesourcery.com>
10229
10230 PR remote/14161.
10231
10232 * server.h: Declare gdb_agent_about_to_close.
10233 * target.c (kill_inferior): Include "agent.h".
10234 New. Send command 'kill'.
10235 * target.h (kill_inferior): Removed macro.
10236 * tracepoint.c (gdb_agent_about_to_close): New.
10237 (gdb_agent_helper_thread): Handle command 'close'.
10238 Wait endlessly until the inferior stops.
10239 Install gdb_agent_remove_socket to atexit hook.
10240 (agent_socket_name): New static variable.
10241 (gdb_agent_socket_init): Replace local variable 'name' with
10242 'agent_socket_name'.
10243 (gdb_agent_remove_socket): New.
10244
5a3f286f
YQ
102452012-07-27 Yao Qi <yao@codesourcery.com>
10246
10247 * server.c (process_point_options): Stop at 'X' when parsing.
10248
961bd387
ME
102492012-07-19 Michael Eager <eager@eagercon.com>
10250
a261b8f5 10251 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10252 to hw_execute.
10253 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10254 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10255 hardware breakpoint.
10256
aa7c7447
JK
102572012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10258
10259 * gdbserver/linux-low.c (initialize_low): Call
10260 linux_ptrace_init_warnings.
10261
7f216e7c
DE
102622012-07-02 Doug Evans <dje@google.com>
10263
10264 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10265 pointer to int.
10266
d3ce09f5
SS
102672012-07-02 Stan Shebs <stan@codesourcery.com>
10268
10269 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10270 (ax.o): Add it to build rule.
10271 (ax-ipa.o): Ditto.
10272 (OBS): Add format.o.
10273 (IPA_OBS): Add format.o.
10274 * server.c (handle_query): Claim support for breakpoint commands.
10275 (process_point_options): Add command case.
10276 (process_serial_event): Leave running if there are printfs in
10277 effect.
10278 * mem-break.h (any_persistent_commands): Declare.
10279 (add_breakpoint_commands): Declare.
10280 (gdb_no_commands_at_breakpoint): Declare.
10281 (run_breakpoint_commands): Declare.
10282 * mem-break.c (struct point_command_list): New struct.
10283 (struct breakpoint): New field command_list.
10284 (any_persistent_commands): New function.
10285 (add_commands_to_breakpoint): New function.
10286 (add_breakpoint_commands): New function.
10287 (gdb_no_commands_at_breakpoint): New function.
10288 (run_breakpoint_commands): New function.
10289 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10290 locally.
10291 * ax.c: Include format.h.
10292 (ax_printf): New function.
10293 (gdb_eval_agent_expr): Add printf opcode.
10294
2f8f6aed
YQ
102952012-06-13 Yao Qi <yao@codesourcery.com>
10296
10297 * server.c (start_inferior): Remove duplicated writes to fields
10298 'last_resume_kind' and 'last_status' of 'current_inferior'.
10299
0c9070b3
YQ
103002012-06-12 Yao Qi <yao@codesourcery.com>
10301 Pedro Alves <palves@redhat.com>
10302
10303 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10304 comment.
10305 * server.c (handle_v_cont): Extend comment.
10306
c52daf70
YQ
103072012-06-11 Yao Qi <yao@codesourcery.com>
10308
10309 * linux-low.c (linux_attach): Add 'static'.
10310
d38bbb0a
YQ
103112012-06-06 Yao Qi <yao@codesourcery.com>
10312
10313 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10314
89dc0afd
JK
103152012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10316
10317 Fix gcc -flto compilation warning.
10318 * server.c (main): Make variable multi_mode and attach volatile.
10319
75f62ce7
TJB
103202012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10321
10322 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10323 if the platform doesn't know about it.
10324
65f479b6
PA
103252012-05-30 Jeff Kenton <jkenton@tilera.com>
10326
10327 * Makefile.in (SFILES): Add linux-tile-low.c.
10328 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10329 * configure.srv: Handle tilegx-*-linux*.
10330 * linux-tile-low.c: New file.
10331
0c5bf5a9
JK
103322012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10333
10334 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10335
a493e3e2
PA
103362012-05-24 Pedro Alves <palves@redhat.com>
10337
10338 PR gdb/7205
10339
43aaf8b6 10340 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10341
2ea28649
PA
103422012-05-24 Pedro Alves <palves@redhat.com>
10343
10344 PR gdb/7205
10345
10346 Replace target_signal with gdb_signal throughout.
10347
8d409d16
MR
103482012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10349
10350 * linux-low.c (linux_store_registers): Avoid the copying sequence
10351 when no data has been retrieved by ptrace.
10352
23512c01
MGD
103532012-05-22 Will Deacon <will.deacon@arm.com>
10354
10355 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10356 Include asm/ptrace.h.
10357 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10358 already defined.
10359
4934b29e
MR
103602012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10361
10362 * linux-low.c (linux_store_registers): Don't re-retrieve data
10363 with ptrace that has already been obtained from /proc. Always
10364 copy any data retrieved with ptrace to the buffer supplied.
10365
bde24c0a
PA
103662012-05-11 Yao Qi <yao@codesourcery.com>
10367 Pedro Alves <palves@redhat.com>
10368
10369 * linux-low.c (enum stopping_threads_kind): New.
10370 (stopping_threads): Change type to `enum stopping_threads_kind'.
10371 (handle_extended_wait): If stopping and suspending threads, leave
10372 the new_lwp suspended too.
10373 (linux_wait_for_event): Adjust.
10374 (stop_all_lwps): Set `stopping_threads' to
10375 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10376 whether we're suspending threads or just stopping them. Assert no
10377 recursion happens.
10378
623b6bdf
YQ
103792012-04-29 Yao Qi <yao@codesourcery.com>
10380
10381 * server.h: Move some code to ...
10382 * gdbthread.h: ... here. New.
10383 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10384 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10385 (nto-low.o, win32-low.o): Likewise.
10386 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10387 * regcache.c, remote-utils.c, server.c: Likewise.
10388 * target.c, tracepoint.c, win32-low.c: Likewise.
10389
f15f9948
TJB
103902012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10391
10392 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10393 (PTRACE_ARG4_TYPE): Likewise.
10394 (PTRACE_XFER_TYPE): Likewise.
10395 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10396 ptrace to PTRACE_ARG3_TYPE.
10397 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10398 (PTRACE_ARG4_TYPE): Likewise.
10399 (PTRACE_XFER_TYPE): Likewise.
10400 (linux_detach_one_lwp): Cast fourth argument of
10401 ptrace to long then PTRACE_ARG4_TYPE.
10402 (regsets_fetch_inferior_registers): Cast third argument of
10403 ptrace to long then PTRACE_ARG3_TYPE.
10404 (regsets_store_inferior_registers): Likewise.
10405
38ea300a
PA
104062012-04-20 Pedro Alves <palves@redhat.com>
10407
10408 * configure: Regenerate.
10409
c971b7fa
PA
104102012-04-19 Pedro Alves <palves@redhat.com>
10411
43aaf8b6 10412 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10413 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10414 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10415 (all, install-only, uninstall, clean-info, all-lib, clean): No
10416 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10417 (maintainer-clean realclean distclean): Use subdir_do.
10418 (subdir_do): New.
10419 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10420 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10421 * acinclude.m4: Include acx_configure_dir.m4.
10422 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10423 calls. Call AC_PROG_RANLIB. Configure gnulib using
10424 ACX_CONFIGURE_DIR.
10425 (GNULIB): New.
10426 (GNULIB_STDINT_H): Adjust.
10427 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10428 * gdbreplay.c: Include build-gnulib/config.h.
10429 * server.h: Likewise.
10430 * aclocal.m4: Regenerate.
10431 * config.in: Regenerate.
10432 * configure: Regenerate.
c971b7fa 10433
809277f8
PA
104342012-04-19 Pedro Alves <palves@redhat.com>
10435
10436 * Makefile.in (LIBGNU, INCGNU): Adjust.
10437 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10438 (all, install-only, uninstall, clean-info, all-lib, clean)
10439 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10440 * configure.ac: Adjust AC_OUTPUT output.
10441 * aclocal.m4: Regenerate.
10442 * configure: Regenerate.
10443
fd9bb8b8
PA
104442012-04-19 Pedro Alves <palves@redhat.com>
10445
10446 * Makefile.in (generated_files): New.
10447 (server_h): Remove the explicit dependency on config.h, and depend
10448 on $generated_files.
10449
1c298c66
PA
104502012-04-19 Pedro Alves <palves@redhat.com>
10451
10452 * Makefile.in (INCGNU): Add -Ignulib.
10453
57c4b50b
PA
104542012-04-19 Pedro Alves <palves@redhat.com>
10455
10456 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10457 (INCGNU): ... this, and spell out -I here.
10458 (GNULIB_LIB): Rename to ...
10459 (LIBGNU): ... this.
10460 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10461
1030e047
PA
104622012-04-19 Pedro Alves <palves@redhat.com>
10463
10464 * config.in: Regenerate.
10465
447d4319
PA
104662012-04-19 Pedro Alves <palves@redhat.com>
10467
10468 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10469 * server.h (memmem): Remove declaration.
10470 * config.in: Regenerate.
10471 * configure: Regenerate.
10472
aad9eab9
YQ
104732012-04-19 Yao Qi <yao@codesourcery.com>
10474
10475 * Makefile.in (SFILES): Add common/vec.c.
10476 (OBS): Add vec.o.
10477 (vec.o): New rule.
10478
3e10640f
YQ
104792012-04-19 Yao Qi <yao@codesourcery.com>
10480
10481 * remote-utils.c (prepare_resume_reply): Replace with macro
10482 target_core_of_thread.
10483 * server.c (handle_qxfer_threads_proper): Likewise.
10484 * target.h (traget_core_of_thread): New macro.
10485
71622373
PA
104862012-04-18 Pedro Alves <palves@redhat.com>
10487
10488 * aclocal.m4: Regenerate.
10489 * configure: Regenerate.
10490
80d26939
YQ
104912012-04-16 Yao Qi <yao@codesourcery.com>
10492
10493 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10494 duplicated on address.
10495
42476b70
YQ
104962012-04-16 Yao Qi <yao@codesourcery.com>
10497
10498 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10499 (struct tracepoint_action_ops) <send>: New field.
10500 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10501 (agent_expr_send, x_tracepoint_action_send): New.
10502 (l_tracepoint_action_send): New.
10503 (cmd_qtdp): Download and install tracepoint
10504 according to `use_agent'.
10505 (run_inferior_command): Add one more parameter `len'.
10506 Update callers.
10507 (tracepoint_send_agent): New.
10508 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10509
7bc83639
YQ
105102012-04-16 Yao Qi <yao@codesourcery.com>
10511
10512 * tracepoint.c (download_tracepoints): Moved to ...
10513 (cmd_qtstart): ... here.
10514
5f18041e
YQ
105152012-04-14 Yao Qi <yao@codesourcery.com>
10516
10517 * tracepoint.c: Include inttypes.h.
10518 (struct collect_memory_action): Use sized types.
10519 (struct tracepoint): Likewise.
10520 (cmd_qtdp, stop_tracing): Update print specifiers.
10521 (cmd_qtp, response_tracepoint): Likewise.
10522 (collect_data_at_tracepoint): Likewise.
10523 (collect_data_at_step): Likewise.
10524
55a8c076
YQ
105252012-04-14 Yao Qi <yao@codesourcery.com>
10526
10527 Import gnulib module inttypes.
10528 * aclocal.m4, config.in, configure: Regenerated.
10529
dc750257
YQ
105302012-04-14 Yao Qi <yao@codesourcery.com>
10531
10532 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10533 Makefile and config.status at last.
10534
0ab5faf9
YQ
105352012-04-13 Yao Qi <yao@codesourcery.com>
10536
10537 * tracepoint.c: Include stdint.h unconditionally.
10538
18f5fd81
TJB
105392012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10540
10541 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10542 on BFD_HAVE_SYS_PROCFS_TYPE.
10543 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10544 * configure: Regenerate.
10545 * config.in: Likewise.
10546
4d47af5c
L
105472012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10548
10549 * Makefile.in (clean): Also remove x32.c x32-linux.c
10550 x32-avx.c x32-avx-linux.c.
10551 (x32.o): New target.
10552 (x32.c): Likewise.
10553 (x32-linux.o): Likewise.
10554 (x32-linux.c): Likewise.
10555 (x32-avx.o): Likewise.
10556 (x32-avx.c): Likewise.
10557 (x32-avx-linux.o): Likewise.
10558 (x32-avx-linux.c): Likewise.
10559
10560 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10561 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10562 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10563 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10564 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10565 i386/x32-avx-linux.xml.
10566
10567 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10568 (init_registers_x32_avx_linux): Likwise.
10569 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10570 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10571
ecedbe58
PA
105722012-04-13 Pedro Alves <palves@redhat.com>
10573
10574 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10575 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10576 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10577 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10578 the sub-make.
10579
c92b5177
L
105802012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10581
10582 * linux-x86-low.c (compat_x32_clock_t): New.
10583 (compat_x32_siginfo_t): Likewise.
10584 (compat_x32_siginfo_from_siginfo): Likewise.
10585 (siginfo_from_compat_x32_siginfo): Likewise.
10586 (linux_is_elf64): Likewise.
10587 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10588 and siginfo_from_compat_x32_siginfo for x32.
10589 (x86_arch_setup): Set linux_is_elf64.
10590
214d508e
L
105912012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10592
10593 PR gdb/13969
10594 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10595 e_machine field.
10596 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10597 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10598 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10599 compatible with process.
10600
c9a1864a
YQ
106012012-04-12 Yao Qi <yao@codesourcery.com>
10602
10603 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10604 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10605 (install-only, install-info, clean): Handle sub dir gnulib.
10606 (all-lib, am--refresh): New targets.
10607 (memmem.o): Remove target.
10608 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10609 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10610 (AC_REPLACE_FUNCS): Remove memmem.
10611 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10612 (AC_OUTPUT): Generate Makefile in gnulib/.
10613 * aclocal.m4, config.in, configure: Regenerated.
10614
367ba2c2
MR
106152012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10616
10617 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10618
9d236627
PA
106192012-04-05 Pedro Alves <palves@redhat.com>
10620
10621 -Werror=strict-aliasing
10622
10623 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10624 pointer.
10625
111217b3
PA
106262012-04-04 Pedro Alves <palves@redhat.com>
10627
10628 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10629 (sparc_store_gregset_from_stack, sparc_store_gregset)
10630 (sparc_breakpoint_at): Fix formatting.
10631
8365dcf5
TJB
106322012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10633
10634 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10635 are available.
10636 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10637 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10638 * config.in: Regenerate.
10639 * configure: Likewise.
10640
689cc2ae
PA
106412012-03-29 Pedro Alves <palves@redhat.com>
10642
10643 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10644 Correct ptrace arguments.
10645
c14dfd32
PA
106462012-03-28 Pedro Alves <palves@redhat.com>
10647
10648 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10649 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10650 (IA64_FR1_REGNUM): New defines.
10651 (ia64_fetch_register): New.
10652 (the_low_target): Install it.
10653 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10654 field.
10655 * linux-low.c (linux_fetch_registers): Try the
10656 the_low_target.fetch_register hook first.
10657
10658 * linux-arm-low.c (the_low_target): Adjust.
10659 * linux-bfin-low.c (the_low_target): Adjust.
10660 * linux-cris-low.c (the_low_target): Adjust.
10661 * linux-crisv32-low.c (the_low_target): Adjust.
10662 * linux-m32r-low.c (the_low_target): Adjust.
10663 * linux-m68k-low.c (the_low_target): Adjust.
10664 * linux-mips-low.c (the_low_target): Adjust.
10665 * linux-ppc-low.c (the_low_target): Adjust.
10666 * linux-s390-low.c (the_low_target): Adjust.
10667 * linux-sh-low.c (the_low_target): Adjust.
10668 * linux-sparc-low.c (the_low_target): Adjust.
10669 * linux-tic6x-low.c (the_low_target): Adjust.
10670 * linux-x86-low.c (the_low_target): Adjust.
10671 * linux-xtensa-low.c (the_low_target): Adjust.
10672
63c88e13
PA
106732012-03-26 Pedro Alves <palves@redhat.com>
10674
10675 * server.c (handle_qxfer_libraries): Don't bail early if
10676 the_target->qxfer_libraries_svr4 is not NULL.
10677
fb723180
PA
106782012-03-26 Pedro Alves <palves@redhat.com>
10679
10680 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10681
0afae3cf
PA
106822012-03-23 Pedro Alves <palves@redhat.com>
10683
10684 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10685 "library-list-svr4" element's start tag when the the DSO list is
10686 empty.
10687
485f1ee4
PA
106882012-03-23 Pedro Alves <palves@redhat.com>
10689
10690 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10691 a variable whose type size is the same as the inferior's pointer
10692 size.
10693
a5362b9a
TS
106942012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10695
10696 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10697 struct siginfo.
10698 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10699 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10700 * linux-low.h: Include <signal.h>.
10701 (struct siginfo): Remove forward declaration.
10702 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10703 struct siginfo.
10704
d226c142
MF
107052012-03-21 Mike Frysinger <vapier@gentoo.org>
10706
10707 * .gitignore: Ignore more files.
10708
122f36ef
PA
107092012-03-19 Pedro Alves <palves@redhat.com>
10710 Jan Kratochvil <jan.kratochvil@redhat.com>
10711
10712 * server.c (cont_thread, general_thread): Add describing comments.
10713 (start_inferior): Clear `cont_thread'.
10714 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10715 of a process.
10716
fc3e5175
YQ
107172012-03-15 Yao Qi <yao@codesourcery.com>
10718
10719 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10720 handling to ...
10721 (cmd_qtdp): ... here.
10722
8d0d92cd
YQ
107232012-03-15 Yao Qi <yao@codesourcery.com>
10724
10725 * tracepoint.c (struct tracepoint_action_ops): New.
10726 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10727 (m_tracepoint_action_download): New.
10728 (r_tracepoint_action_download): New.
10729 (x_tracepoint_action_download): New.
10730 (l_tracepoint_action_download): New.
10731 (add_tracepoint_action): Install `action->ops' according type.
10732 (download_tracepoint_1): Move code `download' function pointer
10733 of various tracepoint_action_ops.
10734
87b0bb13
JK
107352012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10736
10737 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10738 linux_ptrace_attach_warnings.
10739
5f572dec
JK
107402012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10741
10742 * Makefile.in (linux-ptrace.o): New.
10743 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10744 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10745 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10746 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10747 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10748 of these targets.
10749 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10750
f4647387
YQ
107512012-03-08 Yao Qi <yao@codesourcery.com>
10752 Pedro Alves <palves@redhat.com>
10753
10754 Fix PR server/13392.
10755 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10756 offset of JMP insn.
10757 * tracepoint.c (remove_tracepoint): New.
10758 (cmd_qtdp): Call remove_tracepoint when failed to install.
10759
9b224c5e
PA
107602012-03-07 Pedro Alves <palves@redhat.com>
10761
10762 * linux-low.c (get_detach_signal): New.
10763 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10764 Pass on pending signals to PTRACE_DETACH. Check the result of the
10765 ptrace call.
10766 * server.c (program_signals, program_signals_p): New.
10767 (handle_general_set): Handle QProgramSignals.
10768 * server.h (program_signals, program_signals_p): Declare.
10769
e237a7e2
JK
107702012-03-05 Pedro Alves <palves@redhat.com>
10771 Jan Kratochvil <jan.kratochvil@redhat.com>
10772
10773 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10774 New comment why.
10775
5808517f
YQ
107762012-03-03 Yao Qi <yao@codesourcery.com>
10777
10778 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10779 agent_look_up_symbols.
10780
58b4daa5
YQ
107812012-03-03 Yao Qi <yao@codesourcery.com>
10782
10783 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10784 (linux-x86-low.o): Likewise.
10785 * server.h: Remove in_process_agent_loaded.
10786 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10787 common/agent.c.
10788 Update callers.
10789
8ffcbaaf
YQ
107902012-03-03 Yao Qi <yao@codesourcery.com>
10791
10792 * tracepoint.c (gdb_agent_capability): New global.
10793 (in_process_agent_loaded_ust): Renamed to
10794 `in_process_agent_supports_ust'.
10795 Update callers.
10796 (in_process_agent_supports_ust): Call agent_capability_check.
10797 (clear_installed_tracepoints): Assert that agent supports
10798 agent.
10799
d1feda86
YQ
108002012-03-03 Yao Qi <yao@codesourcery.com>
10801
10802 * linux-low.c (linux_supports_agent): New.
10803 (linux_target_ops): Initialize field `supports_agent' with
10804 linux_supports_agent.
10805 * target.h (struct target_ops) <supports_agent>: New.
10806 (target_supports_agent): New macro.
10807 * server.c (handle_general_set): Handle packet 'QAgent'.
10808 (handle_query): Send `QAgent+'.
10809 * Makefile.in (server.o): Depends on agent.h.
10810
2fa291ac
YQ
108112012-03-03 Yao Qi <yao@codesourcery.com>
10812
10813 * Makefile.in (OBS): Add agent.o.
10814 Add new rule for agent.o.
10815 Track dependence of tracepoint.c on agent.h.
10816 * tracepoint.c (run_inferior_command_1):
10817 (run_inferior_command): Call agent_run_command.
10818 (gdb_ust_connect_sync_socket): Deleted. Move it to
10819 common/agent.c.
10820 (resume_thread, stop_thread): Likewise.
10821 (gdb_ust_socket_init): Renamed to ...
10822 (gdb_agent_socket_init): ... New.
10823 (gdb_ust_thread): Renamed to ...
10824 (gdb_agent_helper_thread): ... New.
10825 (gdb_ust_init): Move some code to ...
10826 (gdb_agent_init): ... here. New.
10827 [HAVE_UST]: Call gdb_ust_init.
10828 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10829 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10830 * config.in, configure: Regenerated.
10831
05044653
PA
108322012-03-02 Pedro Alves <palves@redhat.com>
10833
10834 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10835 * linux-low.c (struct simple_pid_list): New.
10836 (stopped_pids): New a struct simple_pid_list pointer.
10837 (add_to_pid_list, pull_pid_from_list): New.
10838 (handle_extended_wait): Don't assume the first signal new children
10839 report is SIGSTOP. Adjust call to pull_pid_from_list.
10840 (linux_wait_for_lwp): Adjust.
10841
8d00225b
YQ
108422012-03-02 Yao Qi <yao@codesourcery.com>
10843
10844 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10845 debug log.
10846
19560ba5
YQ
108472012-03-02 Yao Qi <yao@codesourcery.com>
10848
10849 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10850 `stop_pc' and `tpoint'. Update caller.
10851
1faeff08
MR
108522012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10853
10854 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10855 * linux-low.c (use_linux_regsets): New macro.
10856 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10857 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10858 (linux_register_in_regsets): New function.
10859 (usr_fetch_inferior_registers): Skip registers covered by
10860 regsets.
10861 (usr_store_inferior_registers): Likewise.
10862 (usr_fetch_inferior_registers): New macro.
10863 (usr_store_inferior_registers): Likewise.
10864 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10865 (linux_store_registers): Likewise.
10866 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10867 prototype.
10868 (init_registers_mips64_dsp_linux): Likewise.
10869 (init_registers_mips_linux): New macro.
10870 (init_registers_mips_dsp_linux): Likewise.
10871 (mips_dsp_num_regs): Likewise.
10872 (DSP_BASE, DSP_CONTROL): New fallback macros.
10873 (mips_base_regs): New macro.
10874 (mips_regmap): Use it. Fix the size.
10875 (mips_dsp_regmap): New variable.
10876 (mips_dsp_regset_bitmap): Likewise.
10877 (mips_arch_setup): New function.
10878 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10879 than mips_regmap.
10880 (mips_cannot_store_register): Likewise.
10881 (the_low_target): Update .arch_setup, .num_regs and .regmap
10882 initializers. Add .regset_bitmap initializer.
10883 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10884 initializer.
10885 * linux-bfin-low.c (the_low_target): Likewise.
10886 * linux-cris-low.c (the_low_target): Likewise.
10887 * linux-crisv32-low.c (the_low_target): Likewise.
10888 * linux-ia64-low.c (the_low_target): Likewise.
10889 * linux-m32r-low.c (the_low_target): Likewise.
10890 * linux-m68k-low.c (the_low_target): Likewise.
10891 * linux-ppc-low.c (the_low_target): Likewise.
10892 * linux-s390-low.c (the_low_target): Likewise.
10893 * linux-sh-low.c (the_low_target): Likewise.
10894 * linux-sparc-low.c (the_low_target): Likewise.
10895 * linux-tic6x-low.c (the_low_target): Likewise.
10896 * linux-x86-low.c (the_low_target): Likewise.
10897 * linux-xtensa-low.c (the_low_target): Likewise.
10898 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10899 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10900 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10901 srv_xmlfiles.
10902 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10903 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10904
c03e6ccc
YQ
109052012-02-29 Yao Qi <yao@codesourcery.com>
10906 Pedro Alves <palves@redhat.com>
10907
10908 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10909 `step_over_finished' is true.
10910
644cebc9
PA
109112012-02-27 Pedro Alves <palves@redhat.com>
10912
10913 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10914 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10915
c14d7ab2
PA
109162012-02-27 Pedro Alves <palves@redhat.com>
10917
10918 PR server/9684
10919 * linux-low.c (pid_is_stopped): New.
10920 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10921
412c89dd
LM
109222012-02-25 Luis Machado <lgustavo@codesourcery.com>
10923
10924 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10925 of conditions.
10926
b745defe
MR
109272012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10928
10929 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10930
9f3a5c85
LM
109312012-02-24 Luis Machado <lgustavo@codesourcery>
10932
10933 * server.c (handle_query): Advertise support for target-side
10934 breakpoint condition evaluation.
10935 (process_point_options): New function.
10936 (process_serial_event): When inserting a breakpoint, check for
10937 a target-side condition that should be evaluated.
10938
10939 * mem-break.c: Include regcache.h and ax.h.
10940 (point_cond_list_t): New data structure.
10941 (breakpoint) <cond_list>: New field.
10942 (find_gdb_breakpoint_at): Make non-static.
10943 (delete_gdb_breakpoint_at): Clear any target-side
10944 conditions.
10945 (clear_gdb_breakpoint_conditions): New function.
10946 (add_condition_to_breakpoint): Likewise.
10947 (add_breakpoint_condition): Likewise.
10948 (gdb_condition_true_at_breakpoint): Likewise.
10949 (gdb_breakpoint_here): Return result directly instead
10950 of going through a local variable.
10951
10952 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10953 (clear_gdb_breakpoint_conditions): Likewise.
10954 (add_breakpoint_condition): Likewise.
10955 (gdb_condition_true_at_breakpoint): Likewise.
10956
10957 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10958 (need_step_over_p): Take target-side breakpoint condition into
10959 consideration.
10960
5e1dc496
LM
109612012-02-24 Luis Machado <lgustavo@codesourcery>
10962
10963 * server.h: Include tracepoint.h.
10964 (agent_mem_read, agent_get_trace_state_variable_value,
10965 agent_set_trace_state_variable_value,
10966 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10967 get_set_tsv_func_addr): New prototypes.
10968
10969 * ax.h: New include file.
10970 * ax.c: New source file.
10971
10972 * tracepoint.c: Include ax.h.
10973 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10974 agent_expr, eval_result_type): Move to ax.h.
10975 (parse_agent_expr): Rename to ...
10976 (gdb_parse_agent_expr): ... this, make it non-static and move
10977 to ax.h.
10978 (unparse_agent_expr) Rename to ...
10979 (gdb_unparse_agent_expr): ... this, make it non-static and move
10980 to ax.h.
10981 (eval_agent_expr): Rename to ...
10982 (eval_tracepoint_agent_expr): ... this.
10983 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10984 forward declarations.
10985 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10986 (agent_get_trace_state_variable_value): New function.
10987 (agent_set_trace_state_variable_value): New function.
10988 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10989 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10990 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10991 (condition_true_at_tracepoint): Likewise.
10992 (parse_agent_expr): Rename to ...
10993 (gdb_parse_agent_expr): ... this and move to ax.c.
10994 (unparse_agent_expr): Rename to ...
10995 (gdb_unparse_agent_expr): ... this and move to ax.c.
10996 (gdb_agent_op_name): Move to ax.c.
10997 (eval_agent_expr): Rename to ...
10998 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10999 and move to ax.c.
11000 (eval_tracepoint_agent_expr): New function.
11001 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11002 non-static.
5e1dc496
LM
11003 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11004 ax.c.
11005 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11006 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11007 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11008 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11009 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11010 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11011 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11012 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11013 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11014 (compile_bytecodes): Remove forward declaration.
11015 (is_goto_target): Move to ax.c.
11016 (compile_bytecodes): Move to ax.c and call
11017 agent_get_trace_state_variable_value (...) and
11018 agent_set_trace_state_variable_value (...).
11019
11020 * Makefile.in: Update ax.c and IPA dependencies.
11021
277e4e52
PA
110222012-02-24 Pedro Alves <palves@redhat.com>
11023
11024 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11025 (cmd_bigqtbuffer_circular): ... this. Only handle
11026 'QTBuffer:circular:'.
11027 (handle_tracepoint_general_set): Adjust.
11028
bf4c19f7
YQ
110292012-02-16 Yao Qi <yao@codesourcery.com>
11030
11031 * inferiors.c: Move code to ...
11032 * dll.c: .... here. New.
11033 * server.h: Declare clear_dlls.
11034 * Makefile.in (SFILES): Add dll.c.
11035 (OBS): Add dll.o
11036 (dll.o): New rule.
11037
d73f2619
YQ
110382012-02-11 Yao Qi <yao@codesourcery.com>
11039
11040 * server.c: (handle_monitor_command): Add a new parameter
11041 `own_buf'.
11042 (handle_query): Update caller.
11043
f8255c2a
JB
110442012-02-09 Joel Brobecker <brobecker@adacore.com>
11045
11046 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11047 * configure, config.in: Regenerate.
11048 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11049 is not defined.
11050
da84f473
PA
110512012-02-02 Pedro Alves <palves@redhat.com>
11052
11053 Try SIGKILL first, then PTRACE_KILL.
11054 * linux-low.c (linux_kill_one_lwp): New.
11055 (linux_kill_one_lwp): Rename to ...
11056 (kill_one_lwp_callback): ... this. Use the new
11057 linux_kill_one_lwp.
11058
e886a173
PA
110592012-02-02 Pedro Alves <palves@redhat.com>
11060
11061 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11062 inferior.
11063
be07f1a2
PA
110642012-01-27 Pedro Alves <palves@redhat.com>
11065
11066 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11067 (elf_64_file_p): Make static.
11068 (linux_pid_exe_is_elf_64_file): New.
11069 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11070 Delete declarations.
11071 (linux_pid_exe_is_elf_64_file): Declare.
11072 * linux-x86-low.c (x86_arch_setup): Use
11073 linux_pid_exe_is_elf_64_file.
11074
d8301ad1
JK
110752012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11076
11077 * linux-low.c (linux_wait_for_event_1): Rename to ...
11078 (linux_wait_for_event): ... here and merge it with former
11079 linux_wait_for_event - new variable wait_ptid, use it.
11080 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11081
01b17894
PA
110822012-01-23 Pedro Alves <palves@redhat.com>
11083
11084 * server.c (main): Avoid yet another case of infinite loop while
11085 detaching/killing after a longjmp.
11086
e825046f
JK
110872012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11088
11089 Code cleanup.
11090 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11091
b9e7b9c3
UW
110922012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11093
11094 * hostio.c (handle_readlink): New function.
11095 (handle_vFile): Call it to handle "vFile:readlink" packets.
11096
901f9912
UW
110972012-01-20 Pedro Alves <palves@redhat.com>
11098 Ulrich Weigand <ulrich.weigand@linaro.org>
11099
11100 * server.c (handle_v_requests): Only support vAttach and vRun to
11101 start multiple processes when in extended protocol mode.
11102
fc1ab1a0
PA
111032012-01-17 Pedro Alves <palves@redhat.com>
11104
11105 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11106 memalign plus mprotect to allocate the scratch buffer.
11107
7d5d4e98
PA
111082012-01-13 Pedro Alves <palves@redhat.com>
11109
11110 * server.c (attach_inferior): Clear `cont_thread'.
11111
f128d5e9
PA
111122012-01-13 Pedro Alves <palves@redhat.com>
11113
11114 * server.c (main): Avoid infinite loop while detaching/killing
11115 after a longjmp.
11116
06db92f0
DE
111172012-01-09 Doug Evans <dje@google.com>
11118
11119 * server.c (start_inferior): Set last_ptid in --wrapper case.
11120
32d92999
YQ
111212012-01-06 Yao Qi <yao@codesourcery.com>
11122
11123 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11124 defined.
11125 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11126
5e0a92a9
YQ
111272012-01-04 Yao Qi <yao@codesourcery.com>
11128
11129 * tracepoint.c (cmd_qtdp): Print debug message
11130 for static tracepoint.
11131
ae639e8c
YQ
111322012-01-04 Yao Qi <yao@codesourcery.com>
11133
11134 * tracepoint.c (trace_vdebug): Differentiate debug message
11135 between gdbserver and IPA.
11136
f72429c5
YQ
111372012-01-03 Yao Qi <yao@codesourcery.com>
11138
11139 * tracepoint.c (tracepoint_was_hit): Don't collect for
11140 static tracepoint.
11141
12c3e59c
JB
111422012-01-02 Joel Brobecker <brobecker@adacore.com>
11143
11144 * terminal.h: Reformat copyright header.
11145
67827812
JB
111462012-01-02 Joel Brobecker <brobecker@adacore.com>
11147
11148 * server.c (gdbserver_version): Update copyright year.
11149 * gdbreplay.c (gdbreplay_version): Likewise.
11150
3e52c33d
JK
111512011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11152
11153 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11154
11155 Revert:
11156 2011-12-18 Hui Zhu <teawater@gmail.com>
11157 * linux-low.c (linux_create_inferior): Save return value to ret.
11158
66f1260e
HZ
111592011-12-18 Hui Zhu <teawater@gmail.com>
11160
11161 * linux-low.c (linux_create_inferior): Save return value to ret.
11162
e77616d7
DE
111632011-12-16 Doug Evans <dje@google.com>
11164
e7b06c57
DE
11165 * linux-low.c (linux_create_inferior): If stdio connection,
11166 redirect stdin from /dev/null, stdout to stderr.
11167 * remote-utils.c (remote_is_stdio): New static global.
11168 (remote_connection_is_stdio): New function.
11169 (remote_prepare): Handle stdio connection.
11170 (remote_open): Ditto.
11171 (remote_close): Don't close stdin for stdio connections.
11172 (read_prim,write_prim): New functions. Replace all calls to
11173 read/write to these.
11174 * server.c (main): Watch for "-" argument. Move call to
11175 remote_prepare before start_inferior.
11176 * server.h (STDIO_CONNECTION_NAME): New macro.
11177 (remote_connection_is_stdio): Declare.
11178
e77616d7
DE
11179 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11180 in debugging output.
11181
82067193
YQ
111822011-12-15 Yao Qi <yao@codesourcery.com>
11183
11184 * tracepoint.c: Include sys/syscall.h.
11185 (gdb_ust_thread): Remove preprocessor conditional.
11186
82bfbe7e
PA
111872011-12-14 Pedro Alves <pedro@codesourcery.com>
11188
11189 * linux-low.c (linux_detach_one_lwp): Call
11190 the_low_target.prepare_to_resume before detaching.
11191
712c6575
YQ
111922011-12-14 Yao Qi <yao@codesourcery.com>
11193
11194 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11195 of write.
11196
d54d1edf
YQ
111972011-12-14 Yao Qi <yao@codesourcery.com>
11198
11199 * i386-low.c (i386_low_stopped_data_address): Initialize local
11200 variable `control'.
11201
6210a125
PA
112022011-12-13 Pedro Alves <pedro@codesourcery.com>
11203
11204 PR remote/13492
11205
11206 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11207 DR_CONTROL unless necessary. Extend comments.
11208 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11209 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11210
2ece8244
YQ
112112011-12-13 Yao Qi <yao@codesourcery.com>
11212
11213 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11214 macros.
11215 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11216
784867a5
JK
112172011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11218
11219 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11220 Print new debug message for such case.
11221
6bf36717
JK
112222011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11223
11224 Fix overlapping memcpy.
11225 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11226 the read_inferior_memory transfer.
11227 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11228 write_inferior_memory transfer.
11229 (set_fast_tracepoint_jump): New variable buf. Use it for the
11230 read_inferior_memory and write_inferior_memory transfers.
11231 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11232 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11233 Use it for the write_inferior_memory transfer.
11234 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11235 buffers.
11236
50275556
MR
112372011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11238
11239 * linux-low.c (fetch_register, store_register): Make code
11240 consistent, fix formatting.
11241
7325beb4
MR
112422011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11243
11244 * linux-low.c (usr_store_inferior_registers): Factor out code
11245 to handle individual registers into...
11246 (store_register): ... this new function.
11247
c642a434
UW
112482011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11249
11250 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11251 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11252 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11253 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11254 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11255 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11256 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11257 (srv_xmlfiles): Add new XML files.
11258
11259 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11260 and <sys/uio.h>.
11261 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11262 (init_registers_s390_linux32v1): Add prototype.
11263 (init_registers_s390_linux32v2): Likewise.
11264 (init_registers_s390_linux64v1): Likewise.
11265 (init_registers_s390_linux64v2): Likewise.
11266 (init_registers_s390x_linux64v1): Likewise.
11267 (init_registers_s390x_linux64v2): Likewise.
11268 (s390_num_regs): Increment to 52.
11269 (s390_regmap): Add orig_r2 register.
11270 (s390_num_regs_3264): Increment to 68.
11271 (s390_regmap_3264): Add orig_r2 register.
11272 (s390_collect_ptrace_register): Handle orig_r2 register.
11273 (s390_supply_ptrace_register): Likewise.
11274 (s390_fill_last_break): New function.
11275 (s390_store_last_break): Likewise.
11276 (s390_fill_system_call): New function.
11277 (s390_store_system_call): Likewise.
11278 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11279 register sets.
11280 (s390_check_regset): New function.
11281 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11282 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11283 Update target_regsets for available register sets.
11284
2268b414
JK
112852011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11286 Jan Kratochvil <jan.kratochvil@redhat.com>
11287
11288 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11289 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11290 New.
11291 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11292 * linux-low.h (struct process_info_private): New member r_debug.
11293 * server.c (handle_qxfer_libraries): Call
11294 the_target->qxfer_libraries_svr4.
11295 (handle_qxfer_libraries_svr4): New function.
11296 (qxfer_packets): New entry "libraries-svr4".
11297 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11298 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11299 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11300 PACKET_qXfer_libraries_svr4.
11301
d6db1fab
UW
113022011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11303
11304 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11305 PSW address/mask between 8-byte and 16-byte formats.
11306 (s390_supply_ptrace_register): Likewise.
11307 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11308 basic addressing mode bit.
11309
242f5f1c
SS
113102011-11-24 Stan Shebs <stan@codesourcery.com>
11311
11312 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11313
f196051f
SS
113142011-11-17 Stan Shebs <stan@codesourcery.com>
11315
11316 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11317 (tracing_start_time): New global.
11318 (tracing_stop_time): New global.
11319 (tracing_user_name): New global.
11320 (tracing_notes): New global.
11321 (tracing_stop_note): New global.
11322 (cmd_qtstart): Set traceframe_usage, start_time.
11323 (stop_tracing): Set stop_time.
11324 (cmd_qtstatus): Report additional status.
11325 (cmd_qtp): New function.
11326 (handle_tracepoint_query): Call it.
11327 (cmd_qtnotes): New function.
11328 (handle_tracepoint_general_set): Call it.
11329 (get_timestamp): Rename from tsv_get_timestamp.
11330
405f8e94
SS
113312011-11-14 Stan Shebs <stan@codesourcery.com>
11332 Kwok Cheung Yeung <kcy@codesourcery.com>
11333
11334 * linux-x86-low.c (small_jump_insn): New.
11335 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11336 trampoline and error message, build a trampoline and issue a small
11337 jump instruction to it.
11338 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11339 trampoline and error message.
11340 (x86_get_min_fast_tracepoint_insn_len): New.
11341 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11342 * linux-low.h (struct linux_target_ops): Add arguments to
11343 install_fast_tracepoint_jump_pad operation, add new operation.
11344 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11345 arguments.
11346 (linux_get_min_fast_tracepoint_insn_len): New function.
11347 (linux_target_op): Add new operation.
11348 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11349 (gdb_trampoline_buffer_end): Ditto.
11350 (gdb_trampoline_buffer_error): Ditto.
11351 (struct ipa_sym_addresses): Add fields for new IPA variables.
11352 (symbol_list): Add entries for new IPA variables.
11353 (struct tracepoint): Add fields to hold the address range of the
11354 trampoline used by the tracepoint.
11355 (trampoline_buffer_head): New static variable.
11356 (trampoline_buffer_tail): Ditto.
11357 (claim_trampoline_space): New function.
11358 (have_fast_tracepoint_trampoline_buffer): New function.
11359 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11360 structure.
11361 (install_fast_tracepoint): Ditto, also add error buffer argument.
11362 (cmd_qtminftpilen): New function.
11363 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11364 (fast_tracepoint_from_trampoline_address): New function.
11365 (fast_tracepoint_collecting): Handle trampoline as part of jump
11366 pad space.
11367 (set_trampoline_buffer_space): New function.
11368 (initialize_tracepoint): Initialize new IPA variables.
11369 * target.h (struct target_ops): Add arguments to
11370 install_fast_tracepoint_jump_pad operation, add new
11371 get_min_fast_tracepoint_insn_len operation.
11372 (target_get_min_fast_tracepoint_insn_len): New.
11373 (install_fast_tracepoint_jump_pad): Add arguments.
11374 * server.h (IPA_BUFSIZ): Define.
11375 * linux-i386-ipa.c: Include extra header files.
11376 (initialize_fast_tracepoint_trampoline_buffer): New function.
11377 (initialize_low_tracepoint): Call it.
11378 * server.h (set_trampoline_buffer_space): Declare.
11379 (claim_trampoline_space): Ditto.
11380 (have_fast_tracepoint_trampoline_buffer): Ditto.
11381
1e4d1764
YQ
113822011-11-14 Yao Qi <yao@codesourcery.com>
11383
11384 * server.c (handle_query): Handle InstallInTrace for qSupported.
11385 * tracepoint.c (add_tracepoint): Sort list.
11386 (install_tracepoint, download_tracepoint): New.
11387 (cmd_qtdp): Call them to install and download tracepoints.
11388 (sort_tracepoints): Removed.
11389 (cmd_qtstart): Update.
11390
5c73ff4e
YQ
113912011-11-14 Yao Qi <yao@codesourcery.com>
11392
11393 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11394 * mem-break.h: Declare.
11395 * tracepoint.c (cmd_qtstart): Move some code to ...
11396 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11397 New.
11398 (download_tracepoints): Move some code to ...
11399 (download_tracepoint_1): ... here. New.
11400
86a30030
YQ
114012011-11-08 Yao Qi <yao@codesourcery.com>
11402
11403 * remote-utils.c (relocate_instruction): A comment fix.
11404
8d26e50c
JB
114052011-11-07 Joel Brobecker <brobecker@adacore.com>
11406
11407 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11408 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11409 dr_status_mirror and dr_control_mirror from debug_reg_state.
11410 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11411 (i386_initial_stuff): Remove use of deleted globals.
11412 (i386_get_thread_context, i386_set_thread_context,
11413 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11414 from debug_reg_state.
11415
a59306a3
YQ
114162011-11-05 Yao Qi <yao@codesourcery.com>
11417
11418 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11419 address as TPOINT's.
11420
3065dfb6
SS
114212011-11-02 Stan Shebs <stan@codesourcery.com>
11422
11423 * tracepoint.c (agent_mem_read_string): New function.
11424 (eval_agent_expr): Call it for tracenz.
11425 * server.c (handle_query): Report support for tracenz.
11426
fd0d8c7c
YQ
114272011-11-02 Yao Qi <yao@codesourcery.com>
11428
11429 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11430
609086b1
YQ
114312011-11-02 Yao Qi <yao@codesourcery.com>
11432
11433 * target.h: Fix a typo in comment.
11434
b9fd1791
PA
114352011-10-31 Pedro Alves <pedro@codesourcery.com>
11436
11437 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11438 clobber the breakpoints' shadows with fast tracepoint jumps.
11439 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11440 * target.c (write_inferior_memory): Also pass MYADDR down to
11441 check_mem_write.
11442
03583c20
UW
114432011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11444
11445 * configure.ac: Check support for personality routine.
11446 * configure: Regenerate.
11447 * config.in: Likewise.
11448 * linux-low.c: Include <sys/personality.h>.
11449 Define ADDR_NO_RANDOMIZE if necessary.
11450 (linux_create_inferior): Disable address space randomization when
11451 forking inferior, if requested.
11452 (linux_supports_disable_randomization): New function.
11453 (linux_target_ops): Install it.
11454 * server.h (disable_randomization): Declare.
11455 * server.c (disable_randomization): New global variable.
11456 (handle_general_set): Handle QDisableRandomization.
11457 (handle_query): Likewise for qSupported.
11458 (main): Support --disable-randomization and --no-disable-randomization
11459 command line arguments.
11460 * target.h (struct target_ops): Add supports_disable_randomization.
11461 (target_supports_disable_randomization): New macro.
11462
723b724b
MF
114632011-09-29 Mike Frysinger <vapier@gentoo.org>
11464
11465 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11466 ifdef check.
11467 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11468 [!PT_GETDSBT] (target_loadmap): New definition.
11469 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11470 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11471 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11472 and PT_GETDSBT to LINUX_LOADMAP.
11473 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11474 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11475
55329a5c 114762011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11477
11478 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11479 (arm_linux_hwbp_cap): New static variable.
11480 (arm_linux_get_hwbp_cap): Replace by ...
11481 (arm_linux_init_hwbp_cap): ... this new function.
11482 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11483 (arm_linux_get_hw_watchpoint_count): Likewise.
11484 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11485 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11486 (arm_prepare_to_resume): Use perror_with_name instead of error.
11487
55329a5c 114882011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11489
11490 * linux-arm-low.c: Include <signal.h>.
11491 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11492 (struct arm_linux_hwbp_cap): New data type.
11493 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11494 (struct arm_linux_hw_breakpoint): New data type.
11495 (MAX_BPTS, MAX_WPTS): Define.
11496 (struct arch_process_info, struct arch_lwp_info): New data types.
11497 (arm_linux_get_hwbp_cap): New function.
11498 (arm_linux_get_hw_breakpoint_count): Likewise.
11499 (arm_linux_get_hw_watchpoint_count): Likewise.
11500 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11501 (arm_hwbp_control_initialize): Likewise.
11502 (arm_hwbp_control_is_enabled): Likewise.
11503 (arm_hwbp_control_is_initialized): Likewise.
11504 (arm_hwbp_control_disable): Likewise.
11505 (arm_linux_hw_breakpoint_equal): Likewise.
11506 (arm_linux_hw_point_initialize): Likewise.
11507 (struct update_registers_data): New data structure.
11508 (update_registers_callback: New function.
11509 (arm_insert_point): Likewise.
11510 (arm_remove_point): Likewise.
11511 (arm_stopped_by_watchpoint): Likewise.
11512 (arm_stopped_data_address): Likewise.
11513 (arm_new_process): Likewise.
11514 (arm_new_thread): Likewise.
11515 (arm_prepare_to_resume): Likewise.
11516 (the_low_target): Register arm_insert_point, arm_remove_point,
11517 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11518 arm_new_thread, and arm_prepare_to_resume.
11519
6b9801d4
SS
115202011-09-15 Stan Shebs <stan@codesourcery.com>
11521
11522 * server.h (struct emit_ops): Add compare-goto fields.
11523 * tracepoint.c (gdb_agent_op_sizes): New table.
11524 (emit_eq_goto): New function.
11525 (emit_ne_goto): New function.
11526 (emit_lt_goto): New function.
11527 (emit_le_goto): New function.
11528 (emit_gt_goto): New function.
11529 (emit_ge_goto): New function.
11530 (is_goto_target): New function.
11531 (compile_bytecodes): Recognize special cases of compare-goto
11532 combinations and call specialized emitters for them.
11533 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11534 (amd64_emit_ne_goto): New function.
11535 (amd64_emit_lt_goto): New function.
11536 (amd64_emit_le_goto): New function.
11537 (amd64_emit_gt_goto): New function.
11538 (amd64_emit_ge_goto): New function.
11539 (amd64_emit_ops): Add the new functions.
11540 (i386_emit_eq_goto): New function.
11541 (i386_emit_ne_goto): New function.
11542 (i386_emit_lt_goto): New function.
11543 (i386_emit_le_goto): New function.
11544 (i386_emit_gt_goto): New function.
11545 (i386_emit_ge_goto): New function.
11546 (i386_emit_ops): Add the new functions.
11547
bf15cbda
SS
115482011-09-08 Stan Shebs <stan@codesourcery.com>
11549
11550 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11551 (i386_emit_epilogue): Restore %ebx.
11552
943ca1dd
JZ
115532011-08-31 Jie Zhang <jzhang918@gmail.com>
11554
11555 * server.c (step_thread): Remove definition.
11556 (process_serial_event): Don't handle Hs.
11557 * server.h (step_thread): Remove declaration.
11558 * target.c (set_desired_inferior): Remove use of step_thread.
11559
e3deef73
LM
115602011-08-24 Luis Machado <lgustavo@codesourcery.com>
11561
11562 * linux-low.c: Include linux-procfs.h.
11563 (linux_attach_lwp_1): Update comments.
11564 (linux_attach): Scan for existing threads when attaching to a
11565 process that is the tgid.
11566 * Makefile.in: Update dependencies.
11567
13da1c97
LM
115682011-08-24 Luis Machado <lgustavo@codesourcery.com>
11569
11570 * configure.srv: Add linux-procfs.o dependencies.
11571
881127c9
YQ
115722011-08-14 Yao Qi <yao@codesourcery.com>
11573
11574 * target.h (struct target_ops): Fix indent.
11575 * win32-low.c (win32_target_ops): Fix comment.
11576
58dbd541
YQ
115772011-08-14 Andrew Jenner <andrew@codesourcery.com>
11578 Yao Qi <yao@codesourcery.com>
11579
11580 * Makefile.in (clean): Remove tic6x-*.c files.
11581 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11582 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11583 (tic6x-c64xp-linux.c): Likewise.
11584 * configure.srv: Add support for tic6x-*-uclinux.
11585 * linux-tic6x-low.c: New.
11586 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11587
78d85199
YQ
115882011-08-14 Andrew Stubbs <ams@codesourcery.com>
11589 Yao Qi <yao@codesourcery.com>
11590
11591 * target.h (struct target_ops): Add read_loadmap.
11592 * linux-low.c (struct target_loadseg): New type.
11593 (struct target_loadmap): New type.
11594 (linux_read_loadmap): New function.
11595 (linux_target_ops): Add linux_read_loadmap.
11596 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11597 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11598 to NULL.
78d85199 11599
a959a88d
EZ
116002011-08-05 Eli Zaretskii <eliz@gnu.org>
11601
11602 * win32-low.c: Include <stdint.h>.
11603
1ced966e
PA
116042011-07-22 Pedro Alves <pedro@codesourcery.com>
11605
11606 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11607 to the inferior here.
11608 (i386_remove_aligned_watchpoint): Ditto.
11609 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11610 fit part of the watchpoint in the debug registers.
11611 (i386_update_inferior_debug_regs): New.
11612 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11613 registers, and only update the inferior on success.
11614 (i386_low_remove_watchpoint): Ditto.
11615
d26e3629
KY
116162011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11617
11618 * linux-low.c (compare_ints, unique, list_threads, show_process,
11619 linux_core_of_thread): Delete.
11620 (linux_target_ops): Change linux_core_of_thread to
11621 linux_common_core_of_thread.
11622 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11623 * utils.c (malloc_failure): Change type of argument.
11624 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11625 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11626 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11627 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11628 (IPA_OBJS): Add common-utils-ipa.o.
11629 (ptid_h, linux_osdata_h): New macros.
11630 (server_h): Add common/common-utils.h, common/xml-utils.h,
11631 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11632 common/ptid.h.
11633 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11634 ptid.o, buffer.o): New rules.
11635 (linux-low.o): Add common/linux-osdata.h as a dependency.
11636 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11637 * configure.ac: Add AC_HEADER_DIRENT check.
11638 * config.in: Regenerate.
11639 * configure: Regenerate.
11640 * remote-utils.c (xml_escape_text): Delete.
11641 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11642 buffer_xml_printf): Move to common/buffer.c.
11643 * server.c (main): Remove call to initialize_inferiors.
11644 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11645 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11646 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11647 internal_error, gdb_assert, gdb_assert_fail): Delete.
11648 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11649 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11650 common/buffer.h.
11651 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11652 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11653 initialize_inferiors): Delete.
11654
2275a1a7
PA
116552011-07-20 Pedro Alves <pedro@codesourcery.com>
11656
11657 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11658 symbol error.
11659
0a5b1e09
PA
116602011-05-31 Pedro Alves <pedro@codesourcery.com>
11661
11662 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11663 assertion.
11664 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11665
6938fd34
YQ
116662011-05-26 Yao Qi <yao@codesourcery.com>
11667
11668 * Makefile.in (thread-db.o): Track dependence to
11669 common/gdb_thread_db.h.
11670 * thread-db.c: include gdb_thread_db.h from right place.
11671
b481f9e0
TT
116722011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11673
11674 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11675 __FILE__ and __LINE__ to internal_error.
11676
98a5dd13
DE
116772011-05-13 Doug Evans <dje@google.com>
11678
11679 * thread-db.c (try_thread_db_load_from_sdir): New function.
11680 (try_thread_db_load_from_dir): New function.
11681 (thread_db_load_search): Handle $sdir, ignore $pdir.
11682 Remove trying of system directories if search of
11683 libthread-db-search-path fails, that is now done via $sdir.
11684
d248b706
KY
116852011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11686
11687 * server.c (handle_query): Add EnableDisableTracepoints to the list
11688 of supported features.
43aaf8b6 11689 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11690 tracepoints.
43aaf8b6
PA
11691 (cmd_qtenable_disable): New.
11692 (cmd_qtstart): Install tracepoints even if disabled.
11693 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11694 receiving a QTEnable or QTDisable packet.
11695 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11696 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11697 tracepoints.
11698 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11699
84e578fb
DE
117002011-05-10 Doug Evans <dje@google.com>
11701
11702 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11703
71f55dd8
DE
117042011-05-04 Doug Evans <dje@google.com>
11705
11706 * linux-low.c (linux_join): Skip process lookup.
11707 * spu-low.c (spu_join): Ditto.
11708 * server.c (join_inferiors_callback): Delete.
11709 (process_serial_event): For 'D' packet (detach) call join_inferior
11710 directly.
11711
4d393d60
JM
117122011-05-04 Joseph Myers <joseph@codesourcery.com>
11713
11714 * README: Don't mention xscale*-*-linux*.
11715 * configure.srv (xscale*-*-linux*): Don't handle target.
11716
b00ad6ff
NF
117172011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11718
11719 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11720 casting pointers.
11721 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11722 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11723 (i386_emit_void_call_2): Likewise.
11724
af96c192
YQ
117252011-04-26 Yao Qi <yao@codesourcery.com>
11726
43aaf8b6
PA
11727 * linux-low.c: Move common macros to linux-ptrace.h.
11728 Include linux-ptrace.h.
af96c192
YQ
11729 * Makefile.in (linux_ptrace_h): New.
11730 (linux-low.o): Depends on linux-ptrace.h.
11731
03f2bd59
JK
117322011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11733
11734 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11735 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11736 (remote_prepare): New function with most of the TCP code from ...
11737 (remote_open): ... here. Detect PORT here unconditionally. Move also
11738 setting transport_is_reliable.
11739 * server.c (run_once): New variable.
11740 (gdbserver_usage): Document it.
11741 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11742 the first run if RUN_ONCE.
11743 * server.h (run_once, remote_prepare): New declarations.
11744
7a9dd1b2
TT
117452011-04-19 Tom Tromey <tromey@redhat.com>
11746
11747 * win32-low.c (handle_load_dll): Remove duplicate "the".
11748
81239425
PM
117492011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11750
11751 Remove support for old Cygwin 1.5 versions.
11752 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11753 function to avoid warning.
11754 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11755 warning.
11756
9e0627f1
PM
117572011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11758
11759 * gdbserver/server.h (Macro _): Define it if not available.
11760
588eebee
MS
117612011-03-14 Michael Snyder <msnyder@vmware.com>
11762
348af9f7 11763 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11764
43f70d4c
JB
117652011-03-10 Joel Brobecker <brobecker@adacore.com>
11766
11767 * Makefile.in (maintainer-clean realclean distclean): Remove
11768 "make ... subdir_do" command.
11769
348af9f7
MS
117702011-03-10 Michael Snyder <msnyder@vmware.com>
11771
11772 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11773
11774 * server.c (handle_v_run): Free alloced buffer on early return.
11775
e637a4f5
YQ
117762011-03-09 Yao Qi <yao@codesourcery.com>
11777
11778 Revert:
11779 2011-03-04 Yao Qi <yao@codesourcery.com>
11780
11781 * Makefile.in: Remove GNU make feature --directory.
11782
11783 2011-03-05 Yao Qi <yao@codesourcery.com>
11784
11785 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11786 (subdir_do): New make target. Copied from gdb/Makefile.
11787 (maintainer-clean, realclean, distclean, clean): Call corresponding
11788 make targets in common/Makefile.
11789
11790 2011-02-11 Yao Qi <yao@codesourcery.com>
11791
11792 * configure.ac: Call AC_PROG_RANLIB.
11793 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11794 * configure: Regenerate.
11795
e6edda56
JK
117962011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11797
11798 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11799
e5141119
JB
118002011-03-06 Yao Qi <yao@codesourcery.com>
11801
11802 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11803
64794aa4
JB
118042011-03-05 Yao Qi <yao@codesourcery.com>
11805
11806 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11807 (subdir_do): New make target. Copied from gdb/Makefile.
11808 (maintainer-clean, realclean, distclean, clean): Call corresponding
11809 make targets in common/Makefile.
11810
7a762829
YQ
118112011-03-04 Yao Qi <yao@codesourcery.com>
11812
11813 * Makefile.in: Remove GNU make feature --directory.
11814
348af9f7
MS
118152011-03-04 Michael Snyder <msnyder@vmware.com>
11816
11817 * server.c (queue_stop_reply): Call xmalloc not malloc.
11818
118192011-03-02 Michael Snyder <msnyder@vmware.com>
11820
11821 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11822
9f72fee2
MS
118232011-02-28 Michael Snyder <msnyder@vmware.com>
11824
588eebee
MS
11825 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11826 (cmd_qtframe): Ditto.
11827 (cmd_qtbuffer): Ditto.
11828 (cmd_bigqtbuffer): Ditto.
11829
9f72fee2
MS
11830 * utils.c (decimal2str): Initialize 'width' to nine, then
11831 don't mess with it.
11832
8040bd49
UW
118332011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11834
11835 * hostio.c (require_data): Free *data, not data.
11836
7e52cbd0
JK
118372011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11838
11839 * hostio.c (require_data): Use free, not xfree.
11840
9130f83e
MS
118412011-02-27 Michael Snyder <msnyder@vmware.com>
11842
4b812f4e
MS
11843 * server.c (handle_query): Discard unused value.
11844
9130f83e
MS
11845 * hostio.c (require_data): Free malloc memory before returning
11846 error.
11847
69d37113
MS
118482011-02-26 Michael Snyder <msnyder@vmware.com>
11849
11850 * linux-low.c (list_threads): Call closedir for dirent.
11851
35f5825a
MS
118522011-02-27 Michael Snyder <msnyder@vmware.com>
11853
2a589cef
MS
11854 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11855 a case statement falls through.
11856
0adea5f7
MS
11857 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11858
35f5825a
MS
11859 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11860 in comparison.
11861
238f1c74
MS
118622011-02-26 Michael Snyder <msnyder@vmware.com>
11863
11864 * utils.c (decimal2str): Eliminate dead code and dead param.
11865 (pulongest): Drop dead param from call to decimal2str.
11866 (plongest): Ditto.
11867
633ff500
JB
118682011-02-24 Joel Brobecker <brobecker@adacore.com>
11869
11870 Revert the following patch (not approved yet):
11871 2011-02-21 Hui Zhu <teawater@gmail.com>
11872 * tracepoint.c (tp_printf): New function.
11873 (eval_agent_expr): Handle gdb_agent_op_printf.
11874
f9c6ff72
HZ
118752011-02-21 Hui Zhu <teawater@gmail.com>
11876
11877 * tracepoint.c (tp_printf): New function.
11878 (eval_agent_expr): Handle gdb_agent_op_printf.
11879
94d5e490
TT
118802011-02-18 Tom Tromey <tromey@redhat.com>
11881
11882 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11883 (tracepoint.o): Likewise.
11884 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11885 (gdb_agent_op_names): Likewise.
11886
c7f96d2b
TT
118872011-02-18 Tom Tromey <tromey@redhat.com>
11888
11889 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11890 gdb_agent_op_rot>: New constants.
11891 (gdb_agent_op_names): Add pick and roll.
11892 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11893 cases.
11894
0feedb2c
JK
118952011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11896
11897 * aclocal.m4: Regenerated with aclocal-1.11.1.
11898
b3b9301e
PA
118992011-02-14 Pedro Alves <pedro@codesourcery.com>
11900
11901 * server.c (handle_qxfer_traceframe_info): New.
11902 (qxfer_packets): Register "traceframe-info".
11903 (handle_query): Report support for qXfer:traceframe-info:read+.
11904 * tracepoint.c (match_blocktype): New.
11905 (traceframe_find_block_type): Rename to ...
11906 (traceframe_walk_blocks): ... this. Add callback filter argument,
11907 and use it.
11908 (traceframe_find_block_type): New, reimplemented on top of
11909 traceframe_walk_blocks.
11910 (build_traceframe_info_xml): New.
11911 (traceframe_read_info): New.
11912 * server.h (traceframe_read_info): Declare.
11913
4f3e6fb7
YQ
119142011-02-11 Yao Qi <yao@codesourcery.com>
11915
11916 * configure.ac: Call AC_PROG_RANLIB.
11917 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11918 * configure: Regenerate.
11919
764880b7
PA
119202011-02-07 Pedro Alves <pedro@codesourcery.com>
11921
11922 * server.c (gdb_read_memory): Change return semantics to allow
11923 partial transfers.
11924 (handle_search_memory_1): Adjust.
11925 (process_serial_event) <'m' packet>: Handle partial transfers.
11926 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11927
1c79eb8a
PA
119282011-01-28 Pedro Alves <pedro@codesourcery.com>
11929
11930 * regcache.c (init_register_cache): Initialize
11931 regcache->register_status.
11932 (free_register_cache): Release regcache->register_status.
11933 (regcache_cpy): Copy register_status.
11934 (registers_to_string): Print 'x's for unavailable registers.
11935 (supply_register): Mark the register's status valid or
11936 unavailable, depending on whether a buffer was passed in or not.
11937 (supply_register_zeroed): New.
11938 (supply_regblock): Mark the registers' status valid or
11939 unavailable, depending on whether a buffer was passed in or not.
11940 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11941 (struct regcache): New `register_status' field.
11942 (supply_register_zeroed): Declare.
11943 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11944 supply_register_zeroed, rather than passing a NULL buffer to
11945 supply_register.
11946 * tracepoint.c (fetch_traceframe_registers): Update comment.
11947
85724a0e
PA
119482011-01-28 Pedro Alves <pedro@codesourcery.com>
11949
11950 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11951 buffer explicit.
11952
d08aafef
PA
119532011-01-25 Pedro Alves <pedro@codesourcery.com>
11954
11955 * server.h (decode_xfer_write): Change prototype.
11956 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11957 and don't extract the annex here.
11958 * server.c (decode_xfer_read): Remove `annex' parameter,
11959 and don't extract the annex here.
11960 (decode_xfer): New.
11961 (struct qxfer): New.
11962 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11963 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11964 (handle_qxfer_statictrace): New functions, abstracted out from
11965 handle_query, and made to use the struct qxfer interface.
11966 (handle_threads_qxfer_proper): Rename to ...
11967 (handle_qxfer_threads_proper): ... this.
11968 (handle_threads_qxfer): Rename to ...
11969 (handle_qxfer_threads): ... this. Adjust.
11970 (qxfer_packets): New array.
11971 (handle_qxfer): New function.
11972 (handle_query): Use handle_qxfer.
11973
493e2a69
MS
119742011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11975
11976 * gdbreplay.c: Shorten lines of >= 80 columns.
11977 * linux-low.c: Ditto.
11978 * linux-ppc-low.c: Ditto.
11979 * linux-s390-low.c: Ditto.
11980 * linux-sparc-low.c: Ditto.
11981 * linux-x86-low.c: Ditto.
11982 * linux-xtensa-low.c: Ditto.
11983 * mem-break.c: Ditto.
11984 * nto-low.c: Ditto.
11985 * regcache.h: Ditto.
11986 * remote-utils.c: Ditto.
11987 * server.c: Ditto.
11988 * server.h: Ditto.
11989 * thread-db.c: Ditto.
11990 * tracepoint.c: Ditto.
11991 * utils.c: Ditto.
11992 * win32-low.h: Ditto.
11993
44944448
JB
119942011-01-05 Joel Brobecker <brobecker@adacore.com>
11995
11996 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11997 update.
11998
71ce852c
JB
119992011-01-01 Joel Brobecker <brobecker@adacore.com>
12000
12001 * server.c (gdbserver_version): Update copyright year in version
12002 output.
12003 * gdbreplay.c (gdbreplay_version): Ditto.
12004
eb826dc6
MF
120052010-12-29 Jie Zhang <jie.zhang@analog.com>
12006
12007 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12008 * linux-bfin-low.c: New file.
12009 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12010 PT_DATA_ADDR for BFIN targets.
12011 * Makefile.in (SFILES): Add linux-bfin-low.c.
12012 (clean): Remove reg-bfin.c.
12013 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12014 * README: Mention supported Blackfin targets.
12015
39ab222a
MF
120162010-12-23 Mike Frysinger <vapier@gentoo.org>
12017
12018 * .gitignore: New file.
12019
a1f2ce7d
MF
120202010-11-16 Mike Frysinger <vapier@gentoo.org>
12021
12022 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12023
f474844c
JZ
120242010-10-22 Jie Zhang <jie@codesourcery.com>
12025
12026 * Makefile.in: Add FLAGS_TO_PASS variable.
12027 (install): Remove dependency of install-only and recursively
12028 invoke make for install-only.
12029
f1048712
DE
120302010-10-04 Doug Evans <dje@google.com>
12031
12032 * Makefile.in (uninstall): Use $(DESTDIR).
12033
b53a1623
PA
120342010-09-24 Pedro Alves <pedro@codesourcery.com>
12035
e6ee044d
PA
12036 PR gdb/11842
12037
b53a1623
PA
12038 * linux-x86-low.c (compat_siginfo_from_siginfo)
12039 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12040 si_code is < 0. Check for si_code == SI_TIMER before checking for
12041 si_code < 0.
12042
fa1bd1e4
JB
120432010-09-13 Joel Brobecker <brobecker@adacore.com>
12044
12045 * lynx-i386-low.c: New file.
12046 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12047
47fac8f8
JB
120482010-09-13 Joel Brobecker <brobecker@adacore.com>
12049
12050 * lynx-low.c (ptrace_request_to_str): Remove handling for
12051 request values that have been removed in LynxOS 5.x.
12052
1adfc54d
JB
120532010-09-13 Joel Brobecker <brobecker@adacore.com>
12054
12055 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12056 <ptrace.h>
12057
c2a66c29
NS
120582010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12059
12060 * configure.ac: Add --enable-inprocess-agent option.
12061 * configure: Rebuilt.
12062
32fcada3
YQ
120632010-09-06 Yao Qi <yao@codesourcery.com>
12064
12065 * linux-low.c (linux_kill): Remove unused variable.
12066 (linux_stabilize_threads): Likewise.
12067 * server.c (start_inferior): Likewise.
12068 (queue_stop_reply_callback): Likewise.
12069 * tracepoint.c (do_action_at_tracepoint): Likewise.
12070
0cccb683
YQ
120712010-09-06 Yao Qi <yao@codesourcery.com>
12072
12073 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12074 on return.
12075
423ec54c
JK
120762010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12077
12078 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12079
12ac6819
PA
120802010-09-06 Pedro Alves <pedro@codesourcery.com>
12081
12082 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12083 "$(IPA_DEPFILES)".
12084
8ed54b31
JB
120852010-09-01 Joel Brobecker <brobecker@adacore.com>
12086
12087 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12088 gdbserver/lynx-ppc-low.c: New files.
12089 * Makefile.in (lynx_low_h): New variable.
12090 (lynx-low.o, lynx-ppc-low.o): New rules.
12091 * configure.ac: On LynxOS, link with -lnetinet.
12092 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12093 * configure: regenerate.
12094
bb0116a4
JB
120952010-09-01 Joel Brobecker <brobecker@adacore.com>
12096
12097 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12098 * configure.ac: Add check for vasprintf and vsnprintf.
12099 * configure, config.in: Regenerate.
12100 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12101
a778ab81 121022010-09-01 Joel Brobecker <brobecker@adacore.com>
12103
12104 * gdbreplay.c: Move include of alloca.h up, next to include of
12105 malloc.h.
12106 * server.h: Add include of malloc.h.
12107 * mem-break.c: Remove include of malloc.h.
12108 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12109
8b034a19 121102010-09-01 Joel Brobecker <brobecker@adacore.com>
12111
12112 * Makefile.in (memmem.o): Build with -Wno-error.
12113
121142010-09-01 Joel Brobecker <brobecker@adacore.com>
12115
12116 * utils.c (xsnprintf): Make non-static.
12117 * server.h: Add xsnprintf declaration.
12118 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12119 replace calls to snprintf by calls to xsnprintf throughout.
12120
121212010-09-01 Joel Brobecker <brobecker@adacore.com>
12122
12123 * configure.ac: Add configure check for alloca.
12124 * configure, config.in: Regenerate.
12125 * server.h: Include alloca.h if it exists.
12126 * gdbreplay.c: Include alloca.h if it exists.
12127
1a981360
PA
121282010-08-28 Pedro Alves <pedro@codesourcery.com>
12129
12130 * linux-low.c (__SIGRTMIN): Define if not already defined.
12131 (linux_create_inferior): Check for __ANDROID__ rather than
12132 __SIGRTMIN.
12133 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12134 are already deferred.
12135 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12136 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12137 stopped and already has a pending signal to report.
12138 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12139 a pending signal to report or is moving out of a jump pad.
12140 (linux_init_signals): Check for __ANDROID__ rather than
12141 __SIGRTMIN.
12142
b4d51a55
PA
121432010-08-28 Pedro Alves <pedro@codesourcery.com>
12144
12145 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12146 debug_threads check. Avoid a linear search when not doing debug
12147 output.
12148
ec48365d
PA
121492010-08-27 Pedro Alves <pedro@codesourcery.com>
12150
12151 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12152 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12153 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12154 (process_event): Change local fd's type to gdb_fildes_t.
12155 (create_file_handler): Adjust prototype.
12156 (delete_file_handler): Adjust prototype.
12157 (handle_file_event): Adjust prototype. Use pfildes.
12158 (create_file_event): Adjsut prototype.
12159 * remote-utils.c (remote_desc, listen_desc): Change type to
12160 gdb_fildes_t.
12161 * server.h: New gdb_fildes_t typedef.
12162 [USE_WIN32API]: Include winsock2.h.
12163 (delete_file_handler, add_file_handler): Adjust prototypes.
12164 (pfildes): Declare.
12165 * utils.c (pfildes): New.
12166
854d88f0
PA
121672010-08-27 Pedro Alves <pedro@codesourcery.com>
12168
12169 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12170 * configure: Regenerate.
12171
0146f85b
PA
121722010-08-27 Pedro Alves <pedro@codesourcery.com>
12173
12174 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12175 (linux_done_accessing_memory): ... this.
12176 (linux_target_ops): Adjust.
12177 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12178 * nto-low.c (nto_target_ops): Adjust comment.
12179 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12180 * spu-low.c (spu_target_ops): Adjust comment.
12181 * target.h (target_ops): Rename unprepare_to_access_memory field
12182 to done_accessing_memory.
12183 (unprepare_to_access_memory): Rename to ...
12184 (done_accessing_memory): ... this.
12185
90d74c30
PA
121862010-08-26 Pedro Alves <pedro@codesourcery.com>
12187
12188 * linux-low.c (linux_prepare_to_access_memory): New.
12189 (linux_unprepare_to_access_memory): New.
12190 (linux_target_ops): Install them.
12191 * server.c (read_memory): Rename to ...
12192 (gdb_read_memory): ... this. Use
12193 prepare_to_access_memory/prepare_to_access_memory.
12194 (write_memory): Rename to ...
12195 (gdb_write_memory): ... this. Use
12196 prepare_to_access_memory/prepare_to_access_memory.
12197 (handle_search_memory_1): Adjust.
12198 (process_serial_event): Adjust.
12199 * target.h (struct target_ops): New fields
12200 prepare_to_access_memory and unprepare_to_access_memory.
12201 (prepare_to_access_memory, unprepare_to_access_memory): New.
12202 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12203 prepare_to_access_memory/prepare_to_access_memory.
12204 * nto-low.c (nto_target_ops): Adjust.
12205 * spu-low.c (spu_target_ops): Adjust.
12206 * win32-low.c (win32_target_ops): Adjust.
12207
fd467969
PA
122082010-08-26 Pedro Alves <pedro@codesourcery.com>
12209
12210 * Makefile.in (WARN_CFLAGS): Get it from configure.
12211 (WERROR_CFLAGS): New.
12212 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12213 * configure.ac: Introduce --enable-werror, which adds -Werror to
12214 the compiler command line. Enabled by default. Disable with
12215 --disable-werror. Add -Wdeclaration-after-statement
12216 Wpointer-arith and -Wformat-nonliteral to warning flags.
12217 * configure: Regenerate.
12218
331e2f5f
PA
122192010-08-26 Pedro Alves <pedro@codesourcery.com>
12220
12221 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12222
e581f2b4
PA
122232010-08-26 Pedro Alves <pedro@codesourcery.com>
12224
12225 * gdbreplay.c (remote_error): New.
12226 (gdbchar): New.
12227 (expect): Use gdbchar. Check for error reading from GDB.
12228 Clarify sync error output.
12229 (play): Check for errors writing to GDB.
12230 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12231 * remote-utils.c (getpkt): Check for errors writing to the remote
12232 descriptor.
12233
3c11dd79
PA
122342010-08-25 Pedro Alves <pedro@codesourcery.com>
12235
12236 * linux-low.c (linux_wait_1): Move non-debugging code out of
12237 `debug_threads' control.
12238
d20a8ad9
PA
122392010-08-25 Pedro Alves <pedro@codesourcery.com>
12240
12241 * linux-low.c (linux_wait_1): Don't set last_status here.
12242 * server.c (push_event, queue_stop_reply_callback): Assert we're
12243 not pushing a TARGET_WAITKIND_IGNORE event.
12244 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12245 (myresume, handle_target_event): Set the thread's last_resume_kind
12246 and last_status from the target returned status.
12247
964e4306
PA
122482010-08-25 Pedro Alves <pedro@codesourcery.com>
12249
12250 PR threads/10729
12251
12252 * linux-x86-low.c (update_debug_registers_callback): New.
12253 (i386_dr_low_set_addr): Use it.
12254 (i386_dr_low_get_addr): New.
12255 (i386_dr_low_set_control): Use update_debug_registers_callback.
12256 (i386_dr_low_get_control): New.
12257 (i386_dr_low_get_status): Adjust.
12258 * linux-low.c (linux_stop_lwp): New.
12259 * linux-low.h (linux_stop_lwp): Declare.
12260
12261 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12262 argument instead of a i386_debug_reg_state.
12263 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12264 a i386_debug_reg_state.
12265 (i386_insert_aligned_watchpoint): Adjust.
12266 (i386_remove_aligned_watchpoint): Adjust.
12267 (i386_low_stopped_data_address): Read the debug registers from the
12268 inferior instead of from the mirrors.
12269 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12270 (i386_dr_low_get_addr): Declare.
12271 (i386_dr_low_get_control): Declare.
12272 (i386_dr_low_get_status): Change prototype.
12273
12274 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12275 (i386_dr_low_get_addr): New.
12276 (i386_dr_low_get_control): New.
12277 (i386_dr_low_get_status): Adjust prototype. Return
12278 dr_status_mirror.
12279 (i386_initial_stuff): Clear dr_status_mirror and
12280 dr_control_mirror.
12281 (i386_get_thread_context): Adjust.
12282 (i386_set_thread_context): Adjust.
12283 (i386_thread_added): Adjust.
12284
5f21a75b
PA
122852010-08-24 Pedro Alves <pedro@codesourcery.com>
12286
12287 * linux-low.h (linux_thread_area): Delete declaration.
12288
3e4c1235
TS
122892010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12290
12291 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12292 after its termination.
12293
1971b033
PA
122942010-08-09 Pedro Alves <pedro@codesourcery.com>
12295
12296 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12297 (gdb_wants_all_stopped): Delete.
12298 (linux_wait_1): Don't call them.
12299 * server.c (handle_v_cont): Tag all threads as want-stopped.
12300 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12301 stopped as "client-wants-stopped".
12302
310444ac
PA
123032010-07-31 Pedro Alves <pedro@codesourcery.com>
12304
12305 * Makefile.in (signals_h): New.
12306 (server_h): Depend on it.
12307 (server.o): Don't depend on $(signals_def).
12308 (signals.o): Depend on $(signals_def).
12309
a19cae16
JK
123102010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12311
12312 * Makefile.in (signals_def): New.
12313 (server_h): Append include/gdb/signals.h and signals_def.
12314 (server.o): Append signals_def.
12315
30d50328
JK
123162010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12317
12318 * server.c (handle_target_event): Use target_signal_to_host for
12319 resume_info.sig initialization.
12320 * target.h (struct thread_resume) <sig>: New comment.
12321
5c3216e2
OS
123222010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12323
c6f46ca0
OS
12324 * server.c (handle_query): strcpy() the returned string from paddress()
12325 instead of sprintf().
5c3216e2
OS
12326 * utils.c (paddress): Return phex_nz().
12327
6bd31874
JB
123282010-07-07 Joel Brobecker <brobecker@adacore.com>
12329
12330 * server.c (handle_v_cont): Call mourn_inferior if process
12331 just exited.
12332 (myresume): Likewise.
12333
0fb4aa4b
PA
123342010-07-01 Pedro Alves <pedro@codesourcery.com>
12335
12336 Static tracepoints, and integration with UST.
12337
12338 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12339 * mem-break.c (uninsert_all_breakpoints)
12340 (reinsert_all_breakpoints): New.
12341 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12342 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12343 (gdb_agent_ust_loaded, helper_thread_id)
12344 (gdb_agent_helper_thread_id): New macros.
12345 (struct ipa_sym_addresses): Add addr_ust_loaded,
12346 addr_helper_thread_id, addr_cmd_buf.
12347 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12348 (in_process_agent_loaded_ust): New.
12349 (write_e_ust_not_loaded): New.
12350 (maybe_write_ipa_ust_not_loaded): New.
12351 (struct collect_static_trace_data_action): New.
12352 (enum tracepoint_type) <static_tracepoint>: New.
12353 (struct tracepoint) <handle>: Mention static tracepoints.
12354 (struct static_tracepoint_ctx): New.
12355 (CMD_BUF_SIZE): New.
12356 (add_tracepoint_action): Handle static tracepoint actions.
12357 (unprobe_marker_at): New.
12358 (clear_installed_tracepoints): Handle static tracepoints.
12359 (cmd_qtdp): Handle static tracepoints.
12360 (probe_marker_at): New.
12361 (cmd_qtstart): Handle static tracepoints.
12362 (response_tracepoint): Handle static tracepoints.
12363 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12364 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12365 (get_context_regcache): Handle static tracepoints.
12366 (do_action_at_tracepoint): Handle static tracepoint actions.
12367 (traceframe_find_block_type): Handle static trace data blocks.
12368 (traceframe_read_sdata): New.
12369 (download_tracepoints): Download static tracepoint actions.
12370 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12371 (GDB_PROBE_NAME): New.
12372 (ust_ops): New.
12373 (GET_UST_SYM): New.
12374 (USTF): New.
12375 (dlsym_ust): New.
12376 (ust_marker_to_static_tracepoint): New.
12377 (gdb_probe): New.
12378 (collect_ust_data_at_tracepoint): New.
12379 (gdb_ust_probe): New.
12380 (UNIX_PATH_MAX, SOCK_DIR): New.
12381 (gdb_ust_connect_sync_socket): New.
12382 (resume_thread, stop_thread): New.
12383 (run_inferior_command): New.
12384 (init_named_socket): New.
12385 (gdb_ust_socket_init): New.
12386 (cstr_to_hexstr): New.
12387 (next_st): New.
12388 (first_marker, next_marker): New.
12389 (response_ust_marker): New.
12390 (cmd_qtfstm, cmd_qtsstm): New.
12391 (unprobe_marker_at, probe_marker_at): New.
12392 (cmd_qtstmat, gdb_ust_thread): New.
12393 (gdb_ust_init): New.
12394 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12395 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12396 (ST_REGENTRY): New.
12397 (x86_64_st_collect_regmap): New.
12398 (X86_64_NUM_ST_COLLECT_GREGS): New.
12399 (AMD64_RIP_REGNUM): New.
12400 (supply_static_tracepoint_registers): New.
12401 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12402 (ST_REGENTRY): New.
12403 (i386_st_collect_regmap): New.
12404 (i386_NUM_ST_COLLECT_GREGS): New.
12405 (supply_static_tracepoint_registers): New.
12406 * server.c (handle_query): Handle qXfer:statictrace:read.
12407 <qSupported>: Report support for StaticTracepoints, and
12408 qXfer:statictrace:read features.
12409 * server.h (traceframe_read_sdata)
12410 (supply_static_tracepoint_registers): Declare.
12411 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12412 (unpack_varlen_hex): Include in IPA build.
12413 * Makefile.in (ustlibs, ustinc): New.
12414 (IPA_OBJS): Add remote-utils-ipa.o.
12415 ($(IPA_LIB)): Link -ldl and -lpthread.
12416 (UST_CFLAGS): New.
12417 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12418 * config.in, configure: Regenerate.
12419
9e4344e5
PA
124202010-06-20 Ian Lance Taylor <iant@google.com>
12421 Pedro Alves <pedro@codesourcery.com>
12422
12423 * linux-x86-low.c (always_true): Delete.
12424 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12425 trying to fool the compiler with always_true.
12426
c6beb2cb
PA
124272010-06-20 Pedro Alves <pedro@codesourcery.com>
12428
12429 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12430 conditions in gdbserver.
12431
d2ed6730
UW
124322010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12433
12434 * spu-low.c (spu_read_memory): Wrap around local store limit.
12435 (spu_write_memory): Likewise.
12436
4e29fb54
PA
124372010-06-15 Pedro Alves <pedro@codesourcery.com>
12438
12439 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12440 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12441 LONGEST uses.
12442 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12443 uses.
12444 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12445 uses with LONGEST uses.
12446
6a271cae
PA
124472010-06-14 Stan Shebs <stan@codesourcery.com>
12448 Pedro Alves <pedro@codesourcery.com>
12449
12450 Bytecode compiler.
12451
12452 * linux-x86-low.c: Include limits.h.
12453 (add_insns): New.
12454 (always_true): New.
12455 (EMIT_ASM): New.
12456 (EMIT_ASM32): New.
12457 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12458 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12459 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12460 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12461 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12462 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12463 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12464 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12465 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12466 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12467 (amd64_emit_void_call_2): New.
12468 (amd64_emit_ops): New.
12469 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12470 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12471 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12472 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12473 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12474 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12475 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12476 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12477 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12478 (i386_emit_stack_adjust, i386_emit_int_call_1)
12479 (i386_emit_void_call_2): New.
12480 (i386_emit_ops): New.
12481 (x86_emit_ops): New.
12482 (the_low_target): Install x86_emit_ops.
12483 * server.h (struct emit_ops): New.
12484 (get_raw_reg_func_addr): Declare.
12485 (current_insn_ptr, emit_error): Declare.
12486 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12487 (set_trace_state_variable_value): New defines.
12488 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12489 addr_get_trace_state_variable_value and
12490 addr_set_trace_state_variable_value.
12491 (symbol_list): New fields for get_raw_reg,
12492 get_trace_state_variable_value and set_trace_state_variable_value.
12493 (condfn): New typedef.
12494 (struct tracepoint): New field `compiled_cond'.
12495 (do_action_at_tracepoint): Clear compiled_cond.
12496 (get_trace_state_variable_value, set_trace_state_variable_value):
12497 Export in the IPA.
12498 (condition_true_at_tracepoint): If there's a compiled condition,
12499 run that.
12500 (current_insn_ptr, emit_error): New globals.
12501 (struct bytecode_address): New.
12502 (get_raw_reg_func_addr): New.
12503 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12504 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12505 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12506 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12507 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12508 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12509 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12510 (compile_tracepoint_condition, compile_bytecodes): New.
12511 * target.h (emit_ops): Forward declare.
12512 (struct target_ops): New field emit_ops.
12513 (target_emit_ops): New.
12514 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12515 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12516 * linux-low.c (linux_emit_ops): New.
12517 (linux_target_ops): Install it.
12518 * linux-low.h (struct linux_target_ops): New field emit_ops.
12519
92b72907
UW
125202010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12521
12522 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12523 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12524
fa593d66
PA
125252010-06-01 Pedro Alves <pedro@codesourcery.com>
12526 Stan Shebs <stan@codesourcery.com>
12527
12528 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12529 (all): Depend on $(extra_libraries).
12530 (install-only): Install the IPA.
12531 (IPA_OBJS, IPA_LIB): New.
12532 (clean): Remove the IPA lib.
12533 (IPAGENT_CFLAGS): New.
12534 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12535 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12536 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12537 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12538 * configure.ac: Check for atomic builtins support in the compiler.
12539 (IPA_DEPFILES, extra_libraries): Define.
12540 * configure.srv (ipa_obj): Add description.
12541 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12542 (i[34567]86-*-linux*): Set ipa_obj.
12543 (x86_64-*-linux*): Set ipa_obj.
12544 * linux-low.c (stabilizing_threads): New.
12545 (supports_fast_tracepoints): New.
12546 (linux_detach): Stabilize threads before detaching.
12547 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12548 the lwp is either not stabilizing, or is moving out of a jump pad.
12549 (linux_fast_tracepoint_collecting): New.
12550 (maybe_move_out_of_jump_pad): New.
12551 (enqueue_one_deferred_signal): New.
12552 (dequeue_one_deferred_signal): New.
12553 (linux_wait_for_event_1): If moving out of a jump pad, defer
12554 pending signals to later.
12555 (linux_stabilize_threads): New.
12556 (linux_wait_1): Check if threads need moving out of jump pads, and
12557 do it if so.
12558 (stuck_in_jump_pad_callback): New.
12559 (move_out_of_jump_pad_callback): New.
12560 (lwp_running): New.
12561 (linux_resume_one_lwp): Handle moving out of jump pads.
12562 (linux_set_resume_request): Dequeue deferred signals.
12563 (need_step_over_p): Also step over fast tracepoint jumps.
12564 (start_step_over): Also uninsert fast tracepoint jumps.
12565 (finish_step_over): Also reinsert fast tracepoint jumps.
12566 (linux_install_fast_tracepoint_jump): New.
12567 (linux_target_ops): Install linux_stabilize_threads and
12568 linux_install_fast_tracepoint_jump_pad.
12569 * linux-low.h (linux_target_ops) <get_thread_area,
12570 install_fast_tracepoint_jump_pad>: New fields.
12571 (struct lwp_info) <collecting_fast_tracepoint,
12572 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12573 (linux_get_thread_area): Declare.
12574 * linux-x86-low.c (jump_insn): New.
12575 (x86_get_thread_area): New.
12576 (append_insns): New.
12577 (push_opcode): New.
12578 (amd64_install_fast_tracepoint_jump_pad): New.
12579 (i386_install_fast_tracepoint_jump_pad): New.
12580 (x86_install_fast_tracepoint_jump_pad): New.
12581 (the_low_target): Install x86_get_thread_area and
12582 x86_install_fast_tracepoint_jump_pad.
12583 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12584 (struct fast_tracepoint_jump): New.
12585 (fast_tracepoint_jump_insn): New.
12586 (fast_tracepoint_jump_shadow): New.
12587 (find_fast_tracepoint_jump_at): New.
12588 (fast_tracepoint_jump_here): New.
12589 (delete_fast_tracepoint_jump): New.
12590 (set_fast_tracepoint_jump): New.
12591 (uninsert_fast_tracepoint_jumps_at): New.
12592 (reinsert_fast_tracepoint_jumps_at): New.
12593 (set_breakpoint_at): Use write_inferior_memory.
12594 (uninsert_raw_breakpoint): Use write_inferior_memory.
12595 (check_mem_read): Mask out fast tracepoint jumps.
12596 (check_mem_write): Mask out fast tracepoint jumps.
12597 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12598 (set_fast_tracepoint_jump): Declare.
12599 (delete_fast_tracepoint_jump)
12600 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12601 (reinsert_fast_tracepoint_jumps_at): Declare.
12602 * regcache.c: Don't compile many functions when building the
12603 in-process agent library.
12604 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12605 the register buffer in the heap.
12606 (free_register_cache): If the register buffer isn't owned by the
12607 regcache, don't free it.
12608 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12609 pre-existing register caches.
12610 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12611 type.
12612 (convert_ascii_to_int): : Constify `from' parameter type.
12613 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12614 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12615 the needed buffer in-place.
12616 (relocate_instruction): New.
12617 * server.c (handle_query) <qSymbols>: If the target supports
12618 tracepoints, give it a chance of looking up symbols. Report
12619 support for fast tracepoints.
12620 (handle_status): Stabilize threads.
12621 (process_serial_event): Adjust.
12622 * server.h (struct fast_tracepoint_jump): Forward declare.
12623 (struct process_info) <fast_tracepoint_jumps>: New field.
12624 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12625 (decode_X_packet, decode_M_packet): Adjust.
12626 (relocate_instruction): Declare.
12627 (in_process_agent_loaded): Declare.
12628 (tracepoint_look_up_symbols): Declare.
12629 (struct fast_tpoint_collect_status): Declare.
12630 (fast_tracepoint_collecting): Declare.
12631 (force_unlock_trace_buffer): Declare.
12632 (handle_tracepoint_bkpts): Declare.
12633 (initialize_low_tracepoint)
12634 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12635 * target.h (struct target_ops) <stabilize_threads,
12636 install_fast_tracepoint_jump_pad>: New fields.
12637 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12638 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12639 [HAVE_STDINT_H]: Include stdint.h.
12640 (trace_debug_1): Rename to ...
12641 (trace_vdebug): ... this.
12642 (trace_debug): Rename to ...
12643 (trace_debug_1): ... this. Add `level' parameter.
12644 (trace_debug): New.
12645 (ATTR_USED, ATTR_NOINLINE): New.
12646 (IP_AGENT_EXPORT): New.
12647 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12648 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12649 (about_to_request_buffer_space, trace_buffer_is_full)
12650 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12651 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12652 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12653 (traceframe_write_count, traceframes_created)
12654 (trace_state_variables)
12655 New renaming defines.
12656 (struct ipa_sym_addresses): New.
12657 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12658 (symbol_list): New.
12659 (ipa_sym_addrs): New.
12660 (all_tracepoint_symbols_looked_up): New.
12661 (in_process_agent_loaded): New.
12662 (write_e_ipa_not_loaded): New.
12663 (maybe_write_ipa_not_loaded): New.
12664 (tracepoint_look_up_symbols): New.
12665 (debug_threads) [IN_PROCESS_AGENT]: New.
12666 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12667 (UNKNOWN_SIDE_EFFECTS): New.
12668 (stop_tracing): New.
12669 (flush_trace_buffer): New.
12670 (stop_tracing_bkpt): New.
12671 (flush_trace_buffer_bkpt): New.
12672 (read_inferior_integer): New.
12673 (read_inferior_uinteger): New.
12674 (read_inferior_data_pointer): New.
12675 (write_inferior_data_pointer): New.
12676 (write_inferior_integer): New.
12677 (write_inferior_uinteger): New.
12678 (struct collect_static_trace_data_action): Delete.
12679 (enum tracepoint_type): New.
12680 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12681 <actions_str, step_actions, step_actions_str>: Only include in
12682 GDBserver.
fa593d66
PA
12683 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12684 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12685 (tracepoints): Use IP_AGENT_EXPORT.
12686 (last_tracepoint): Don't include in the IPA.
12687 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12688 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12689 (alloced_trace_state_variables): New.
12690 (trace_state_variables): Use IP_AGENT_EXPORT.
12691 (traceframe_t): Delete unused variable.
12692 (circular_trace_buffer): Don't include in the IPA.
12693 (trace_buffer_start): Delete.
12694 (struct trace_buffer_control): New.
12695 (trace_buffer_free): Delete.
12696 (struct ipa_trace_buffer_control): New.
12697 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12698 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12699 New.
12700 (trace_buffer_ctrl): New.
12701 (TRACE_BUFFER_CTRL_CURR): New.
12702 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12703 Reimplement as macros.
12704 (trace_buffer_wrap): Delete.
12705 (traceframe_write_count, traceframe_read_count)
12706 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12707 (struct tracepoint_hit_ctx) <type>: New field.
12708 (struct fast_tracepoint_ctx): New.
12709 (memory_barrier): New.
12710 (cmpxchg): New.
12711 (record_tracepoint_error): Update atomically in the IPA.
12712 (clear_inferior_trace_buffer): New.
12713 (about_to_request_buffer_space): New.
12714 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12715 updating the same buffer.
12716 (add_tracepoint): Default the tracepoint's type to trap
12717 tracepoint, and orig_size to -1.
12718 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12719 internal variables.
12720 (create_trace_state_variable): New parameter `gdb'. Handle it.
12721 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12722 (cmd_qtdp): Handle fast tracepoints.
12723 (cmd_qtdv): Adjust.
12724 (max_jump_pad_size): New.
12725 (gdb_jump_pad_head): New.
12726 (get_jump_space_head): New.
12727 (claim_jump_space): New.
12728 (sort_tracepoints): New.
12729 (MAX_JUMP_SIZE): New.
12730 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12731 IPA.
12732 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12733 support. Upload fast traceframes, and delete internal IPA
12734 breakpoints.
12735 (stop_tracing_handler): New.
12736 (flush_trace_buffer_handler): New.
12737 (cmd_qtstop): Upload fast tracepoints.
12738 (response_tracepoint): Handle fast tracepoints.
12739 (tracepoint_finished_step): Upload fast traceframes. Set the
12740 tracepoint hit context's tracepoint type.
12741 (handle_tracepoint_bkpts): New.
12742 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12743 type. Add comment about fast tracepoints.
12744 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12745 non-existing action_str field.
12746 (get_context_regcache): Handle fast tracepoints.
12747 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12748 to the regcache.
12749 (fast_tracepoint_from_jump_pad_address): New.
12750 (fast_tracepoint_from_ipa_tpoint_address): New.
12751 (collecting_t): New.
12752 (force_unlock_trace_buffer): New.
12753 (fast_tracepoint_collecting): New.
12754 (collecting): New.
12755 (gdb_collect): New.
12756 (write_inferior_data_ptr): New.
12757 (target_tp_heap): New.
12758 (target_malloc): New.
12759 (download_agent_expr): New.
12760 (UALIGN): New.
12761 (download_tracepoints): New.
12762 (download_trace_state_variables): New.
12763 (upload_fast_traceframes): New.
12764 (IPA_FIRST_TRACEFRAME): New.
12765 (IPA_NEXT_TRACEFRAME_1): New.
12766 (IPA_NEXT_TRACEFRAME): New.
12767 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12768 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12769 (gdb_jump_pad_buffer_end): New.
12770 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12771 (initialize_tracepoint): Adjust.
12772 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12773 buffer. Initialize the low module.
12774 * utils.c (PREFIX, TOOLNAME): New.
12775 (malloc_failure): Use PREFIX.
12776 (error): In the IPA, an error causes an exit.
12777 (fatal, warning): Use PREFIX.
12778 (internal_error): Use TOOLNAME.
12779 (NUMCELLS): Increase to 10.
12780 * configure, config.in: Regenerate.
12781
d149dd1d
PA
127822010-06-01 Pedro Alves <pedro@codesourcery.com>
12783
12784 * server.c (handle_query) <qSupported>: Do two passes over the
12785 qSupported string to avoid nesting strtok.
12786
f6528abd
JK
127872010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12788
12789 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12790 (CDEPS): New.
12791 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12792 -Wl,--dynamic-list.
12793 * configure: Regenerate.
12794 * proc-service.list: New.
12795
ca2a87a0
JK
127962010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12797
12798 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12799 New comment.
12800
363a6e9f
OS
128012010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12802
12803 * gdbreplay.c (remote_open): Check error return from socket() call by
12804 its equality to -1 not by it being negative.
12805 * remote-utils.c (remote_open): Likewise.
12806
d23b6cb1
PA
128072010-05-23 Pedro Alves <pedro@codesourcery.com>
12808
12809 * config.h: Regenerate.
12810
28d3cf85
MK
128112010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12812
12813 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12814 doesn't provide PTRACE_GET_THREAD_AREA.
12815
fea36a59
MK
128162010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12817
12818 * linux-m68k-low.c: Include <asm/ptrace.h>
12819 (ps_get_thread_area): Implement.
12820
24b066ba
DE
128212010-05-03 Doug Evans <dje@google.com>
12822
12823 * event-loop.c (struct callback_event): New struct.
12824 (callback_list): New global.
12825 (append_callback_event, delete_callback_event): New functions.
12826 (process_callback): New function.
12827 (start_event_loop): Call it.
12828 * remote-utils.c (NOT_SCHEDULED): Define.
12829 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12830 moved out of readchar.
12831 (readchar): Rewrite. Call reschedule before returning.
12832 (reset_readchar): New function.
12833 (remote_close): Call it.
12834 (process_remaining, reschedule): New functions.
12835 * server.h (callback_handler_func): New typedef.
12836 (append_callback_event, delete_callback_event): Declare.
12837
9836d6ea
PA
128382010-05-03 Pedro Alves <pedro@codesourcery.com>
12839
12840 * proc-service.c (ps_pglobal_lookup): Use
12841 thread_db_look_up_one_symbol.
12842 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12843 parameter. Use it instead of all_symbols_looked_up.
12844 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12845 field.
12846 (all_symbols_looked_up): Don't declare.
12847 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12848 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12849 field.
12850 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12851 Set all_symbols_looked_up here.
12852 (thread_db_look_up_one_symbol): New.
12853 (thread_db_get_tls_address): Adjust.
12854 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12855 thread_db object on the heap, and tentatively set it in the
12856 process structure.
12857 (thread_db_init): Don't set all_symbols_looked_up here.
12858 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12859
7984d532
PA
128602010-05-03 Pedro Alves <pedro@codesourcery.com>
12861
12862 * linux-low.c (linux_kill, linux_detach): Adjust.
12863 (status_pending_p_callback): Remove redundant statement. Check
12864 for !TARGET_WAITIKIND_IGNORE, instead of
12865 TARGET_WAITKIND_STOPPED.
12866 (handle_tracepoints): Make sure LWP is locked. Adjust.
12867 (linux_wait_for_event_1): Adjust.
12868 (linux_cancel_breakpoints): New.
12869 (unsuspend_one_lwp): New.
12870 (unsuspend_all_lwps): New.
12871 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12872 (send_sigstop_callback): Change return type to int, add new
12873 `except' parameter and handle it.
12874 (suspend_and_send_sigstop_callback): New.
12875 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12876 pass them down. If SUSPEND, also increment the lwp's suspend
12877 count.
12878 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12879 (need_step_over_p): Don't consider suspended LWPs.
12880 (start_step_over): Adjust.
12881 (proceed_one_lwp): Change return type to int, add new `except'
12882 parameter and handle it.
12883 (unsuspend_and_proceed_one_lwp): New.
12884 (proceed_all_lwps): Use find_inferior instead of
12885 for_each_inferior.
12886 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12887 also decrement the suspend count of LWPs. Pass `except' down,
12888 instead of hacking its suspend count.
12889 (linux_pause_all): Add `freeze' parameter. Adjust.
12890 (linux_unpause_all): New.
12891 (linux_target_ops): Install linux_unpause_all.
12892 * server.c (handle_status): Adjust.
12893 * target.h (struct target_ops): New fields `unpause_all' and
12894 `cancel_breakpoints'. Add new parameter to `pause_all'.
12895 (pause_all): Add new `freeze' parameter.
12896 (unpause_all): New.
12897 (cancel_breakpoints): New.
12898 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12899 cancel breakpoints.
12900 (cmd_qtstart): Pause threads.
12901 (stop_tracing): Pause threads, and cancel breakpoints.
12902 * win32-low.c (win32_target_ops): Adjust.
12903
e471f25b
PA
129042010-05-03 Pedro Alves <pedro@codesourcery.com>
12905
12906 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12907 the inferior right away from here...
12908 (linux_wait_1): ... to here, and adjust to check the thread's
12909 last_resume_kind instead of the lwp's step or stop_expected flags.
12910
1915ef4f
PA
129112010-05-02 Pedro Alves <pedro@codesourcery.com>
12912
12913 * README: Use consistent `GDB' and `GDBserver' spellings.
12914
f9e39928
PA
129152010-05-02 Pedro Alves <pedro@codesourcery.com>
12916
12917 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12918 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12919 (linux_detach_one_lwp): Assume the lwp is stopped.
12920 (any_thread_of): Delete.
12921 (linux_detach): Stop all lwps here. Don't blindly delete all
12922 breakpoints.
12923 (delete_lwp_callback): New.
12924 (linux_mourn): Delete all lwps of the process that is gone.
12925 (linux_wait_1): Don't delete the last lwp of the process here.
12926 * mem-break.h (mark_breakpoints_out): Declare.
12927 * mem-break.c (mark_breakpoints_out): New.
12928 (free_all_breakpoints): Use it.
12929 * server.c (handle_target_event): If the process is gone, mark
12930 breakpoints out.
12931 * thread-db.c (struct thread_db) <create_bp>: New field.
12932 (thread_db_enable_reporting): Fix prototype. Store a thread event
12933 breakpoint reference in the thread_db struct.
12934 (thread_db_load_search): Clear the thread_db object.
12935 (try_thread_db_load_1): Ditto.
12936 (switch_to_process): New.
12937 (disable_thread_event_reporting): Use it.
12938 (remove_thread_event_breakpoints): New.
12939 (thread_db_detach, thread_db_mourn): Use it.
12940
1e7fc18c
PA
129412010-05-01 Pedro Alves <pedro@codesourcery.com>
12942
12943 * linux-low.c (linux_enable_event_reporting): New.
12944 (linux_wait_for_event_1, handle_extended_wait): Use it.
12945
02fc4de7
PA
129462010-04-30 Pedro Alves <pedro@codesourcery.com>
12947
12948 * linux-low.c (linux_kill_one_lwp, linux_kill)
12949 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12950 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12951 SIGSTOP even if the LWP is stopped.
12952 (send_sigstop_callback): New.
12953 (stop_all_lwps): Use send_sigstop_callback instead.
12954 (linux_resume_one_thread): Adjust.
12955 (proceed_one_lwp): Still proceed an LWP that the client has
12956 requested to stop, if we haven't reported it as stopped yet. Make
12957 sure that LWPs the client want stopped, have a pending SIGSTOP.
12958
bc3b5632
DE
129592010-04-26 Doug Evans <dje@google.com>
12960
ae1ada35
DE
12961 * server.c (handle_general_set): Make static.
12962
bc3b5632
DE
12963 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12964 Print received char after testing for error/eof instead of before.
12965 (input_interrupt): Tweak comment.
12966
65730243
DE
129672010-04-23 Doug Evans <dje@google.com>
12968
12969 * server.c (start_inferior): Print inferior argv if --debug.
12970
a8ae7dc0
AR
129712010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12972
12973 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12974 * nto-x86-low.c: Include server.h
12975
1c07cc19
PM
129762010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12977
12978 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12979 be consistent with other sources of this directory.
12980 (init_registers_amd64): Correct name of source file of this function
12981 in the comment.
12982
e0a61e09
PM
129832010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12984
12985 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12986 64-bit executables.
12987
54709339
PM
129882010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12989
12990 * win32-i386-low.c: Add 64-bit support.
12991 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12992 (init_registers_amd64): Declare.
12993 (mappings): Add 64-bit version of array.
12994 (init_windows_x86): New function.
12995 (the_low_target): Change init_arch field to init_windows_x86.
12996
e8f0053d
PM
129972010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12998
12999 * win32-low.c: Adapt to support also 64-bit architecture.
13000 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13001 (get_image_name): Use SIZE_T type for local variable `done'.
13002 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13003 (toolhelp_get_dll_name): Idem.
13004 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13005 Use uintptr_t typecast to avoid warning.
13006 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13007 (handle_exception): Use phex_nz to avoid warning.
13008 (win32_wait): Remove unused local variable `process'.
13009
c481e77e
PM
130102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13011
13012 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13013 `amd64-avx.o'.
13014
12ea4b69
PM
130152010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13016
13017 * configure.ac: Use `ws2_32' library for srv_mingw.
13018 * configure: Regenerate.
13019 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13020 * remote-utils.c: Likewise.
13021
f6d1620c
L
130222010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13023
13024 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13025 if __x86_64__ is defined.
13026
8e642873
PM
130272010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13028
13029 * configure: Regenerate.
13030
711e434b
PM
130312010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13032
13033 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13034 * target.h (target_ops): New get_tib_address field.
13035 * win32-low.h (win32_thread_info): Add thread_local_base field.
13036 * win32-low.c (child_add_thread): Add tlb argument.
13037 Set thread_local_base field to TLB.
13038 (get_child_debug_event): Adapt to child_add_thread change.
13039 (win32_get_tib_address): New function.
13040 (win32_target_ops): Set get_tib_address field to
13041 win32_get_tib_address.
13042 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13043
505106cd
PA
130442010-04-12 Pedro Alves <pedro@codesourcery.com>
13045
505106cd
PA
13046 * linux-low.c (linux_mourn): Also remove the process.
13047 * server.c (handle_target_event): Don't remove the process here.
13048 * nto-low.c (nto_mourn): New.
13049 (nto_target_ops): Install it.
13050 * spu-low.c (spu_mourn): New.
13051 (spu_target_ops): Install it.
13052 * win32-low.c (win32_mourn): New.
13053 (win32_target_ops): Install it.
13054
e8470a06
PA
130552010-04-12 Pedro Alves <pedro@codesourcery.com>
13056
13057 * server.h (buffer_xml_printf): Remove redundant `;'.
13058
45ba0d02
PA
130592010-04-12 Pedro Alves <pedro@codesourcery.com>
13060
13061 * regcache.c (set_register_cache): Invalidate regcaches before
13062 changing the register cache layout.
13063 (regcache_invalidate_one): Allow a NULL regcache.
13064 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13065 regcaches before changing the register cache layout or the target
13066 regsets.
13067
59e04013
L
130682010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13069
13070 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13071 variable warning on Linux/x86-64.
13072
8336d594
PA
130732010-04-11 Pedro Alves <pedro@codesourcery.com>
13074
13075 GDBserver disconnected tracing support.
13076
13077 * linux-low.c (linux_remove_process): Delete.
13078 (add_lwp): Don't set last_resume_kind here.
13079 (linux_kill): Use `mourn'.
13080 (linux_detach): Use `thread_db_detach', and `mourn'.
13081 (linux_mourn): New.
13082 (linux_attach_lwp_1): Adjust comment.
13083 (linux_attach): last_resume_kind moved the thread_info; adjust.
13084 (status_pending_p_callback): Adjust.
13085 (linux_wait_for_event_1): Adjust.
13086 (count_events_callback, select_singlestep_lwp_callback)
13087 (select_event_lwp_callback, cancel_breakpoints_callback)
13088 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13089 (proceed_one_lwp): Adjust.
13090 (linux_async): Add debug output.
13091 (linux_thread_stopped): New.
13092 (linux_pause_all): New.
13093 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13094 linux_pause_all.
13095 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13096 (thread_db_free): Delete declaration.
13097 (thread_db_detach, thread_db_mourn): Declare.
13098 * thread-db.c (thread_db_init): Use thread_db_mourn.
13099 (thread_db_free): Delete, split in two.
13100 (disable_thread_event_reporting): New.
13101 (thread_db_detach): New.
13102 (thread_db_mourn): New.
13103
13104 * server.h (struct thread_info) <last_resume_kind>: New field.
13105 <attached>: Add comment.
13106 <gdb_detached>: New field.
13107 (handler_func): Change return type to int.
13108 (handle_serial_event, handle_target_event): Ditto.
13109 (gdb_connected): Declare.
13110 (tracing): Delete.
13111 (disconnected_tracing): Declare.
13112 (stop_tracing): Declare.
13113
13114 * server.c (handle_query) <qSupported>: Report support for
13115 disconnected tracing.
13116 (queue_stop_reply_callback): Account for running threads.
13117 (gdb_wants_thread_stopped): New.
13118 (gdb_wants_all_threads_stopped): New.
13119 (gdb_reattached_process): New.
13120 (handle_status): Clear the `gdb_detached' flag of all processes.
13121 In all-stop, stop all threads.
13122 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13123 (process_serial_event): If the remote connection breaks, or if an
13124 exit was forced with "monitor exit", force an event loop exit.
13125 Handle disconnected tracing on detach.
13126 (handle_serial_event): Adjust.
13127 (handle_target_event): If GDB isn't connected, forward events back
13128 to the inferior, unless the last process exited, in which case,
13129 exit gdbserver. Adjust interface.
13130
13131 * remote-utils.c (remote_open): Don't block in accept. Instead
13132 register an event loop source on the listen socket file
13133 descriptor. Refactor bits into ...
13134 (listen_desc): ... this new global.
13135 (gdb_connected): ... this new function.
13136 (enable_async_notification): ... this new function.
13137 (handle_accept_event): ... this new function.
13138 (remote_close): Clear remote_desc.
13139
13140 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13141
13142 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13143 New fields.
13144 (mourn_inferior): Define.
13145 (target_process_qsupported): Avoid the dangling else problem.
13146 (thread_stopped): Define.
13147 (pause_all): Define.
13148 (target_waitstatus_to_string): Declare.
13149 * target.c (target_waitstatus_to_string): New.
13150
13151 * tracepoint.c (tracing): Make extern.
13152 (disconnected_tracing): New.
13153 (stop_tracing): Make extern. Handle tracing stops due to GDB
13154 disconnecting.
13155 (cmd_qtdisconnected): New.
13156 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13157 (handle_tracepoint_general_set): Handle QTDisconnected.
13158
13159 * event-loop.c (event_handler_func): Change return type to int.
13160 (process_event): Bail out if the event handler wants the event
13161 loop to stop.
13162 (handle_file_event): Ditto.
13163 (start_event_loop): Bail out if the event handler wants the event
13164 loop to stop.
13165
13166 * nto-low.c (nto_target_ops): Adjust.
13167 * spu-low.c (spu_wait): Don't remove the process here.
13168 (spu_target_ops): Adjust.
13169 * win32-low.c (win32_wait): Don't remove the process here.
13170 (win32_target_ops): Adjust.
13171
5d267c4c
PA
131722010-04-11 Pedro Alves <pedro@codesourcery.com>
13173
13174 * regcache.c (realloc_register_cache): Invalidate inferior's
13175 regcache before recreating it.
13176
623ccd72
PA
131772010-04-09 Pedro Alves <pedro@codesourcery.com>
13178
13179 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13180
219f2f23
PA
131812010-04-09 Stan Shebs <stan@codesourcery.com>
13182 Pedro Alves <pedro@codesourcery.com>
13183
13184 * server.h (LONGEST): New.
13185 (struct thread_info) <while_stepping>: New field.
13186 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13187 Declare.
13188 (initialize_tracepoint, handle_tracepoint_general_set)
13189 (handle_tracepoint_query, tracepoint_finished_step)
13190 (tracepoint_was_hit, release_while_stepping_state_list):
13191 (current_traceframe): Declare.
13192 * server.c (handle_general_set): Handle tracepoint packets.
13193 (read_memory): New.
13194 (write_memory): New.
13195 (handle_search_memory_1): Use read_memory.
13196 (handle_query): Report support for conditional tracepoints, trace
13197 state variables, and tracepoint sources. Handle tracepoint
13198 queries.
13199 (main): Initialize the tracepoints module.
13200 (process_serial_event): Handle traceframe reads/writes.
13201
13202 * linux-low.c (handle_tracepoints): New.
13203 (linux_wait_1): Call it.
13204 (linux_resume_one_lwp): Handle while-stepping.
13205 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13206 (linux_target_ops): Install them.
13207 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13208 New field.
13209 * linux-x86-low.c (x86_supports_tracepoints): New.
13210 (the_low_target). Install it.
13211
13212 * mem-break.h (delete_breakpoint): Declare.
13213 * mem-break.c (delete_breakpoint): Make external.
13214
13215 * target.h (struct target_ops): Add `supports_tracepoints',
13216 `read_pc', and `write_pc' fields.
13217 (target_supports_tracepoints): Define.
13218 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13219 (phex_nz): New.
13220
13221 * regcache.h (struct regcache) <registers_owned>: New field.
13222 (init_register_cache, regcache_cpy): Declare.
13223 (regcache_read_pc, regcache_write_pc): Declare.
13224 (register_cache_size): Declare.
13225 (supply_regblock): Declare.
13226 * regcache.c (init_register_cache): New.
13227 (new_register_cache): Use it.
13228 (regcache_cpy): New.
13229 (register_cache_size): New.
13230 (supply_regblock): New.
13231 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13232
219f2f23
PA
13233 * tracepoint.c: New.
13234
13235 * Makefile.in (OBS): Add tracepoint.o.
13236 (tracepoint.o): New rule.
13237
3a13a53b
L
132382010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13239
13240 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13241 (i386-mmx.o): New.
13242 (i386-mmx.c): Likewise.
13243 (i386-mmx-linux.o): Likewise.
13244 (i386-mmx-linux.c): Likewise.
13245
13246 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13247 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13248 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13249 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13250
13251 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13252 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13253 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13254
1570b33e
L
132552010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13256
13257 * Makefile.in (clean): Updated.
13258 (i386-avx.o): New.
13259 (i386-avx.c): Likewise.
13260 (i386-avx-linux.o): Likewise.
13261 (i386-avx-linux.c): Likewise.
13262 (amd64-avx.o): Likewise.
13263 (amd64-avx.c): Likewise.
13264 (amd64-avx-linux.o): Likewise.
13265 (amd64-avx-linux.c): Likewise.
13266
13267 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13268 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13269 (srv_amd64_regobj): Add amd64-avx.o.
13270 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13271 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13272 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13273 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13274 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13275 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13276 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13277
13278 * i387-fp.c: Include "i386-xstate.h".
13279 (i387_xsave): New.
13280 (i387_cache_to_xsave): Likewise.
13281 (i387_xsave_to_cache): Likewise.
13282 (x86_xcr0): Likewise.
13283
13284 * i387-fp.h (i387_cache_to_xsave): Likewise.
13285 (i387_xsave_to_cache): Likewise.
13286 (x86_xcr0): Likewise.
13287
13288 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13289 * linux-crisv32-low.c (target_regsets): Likewise.
13290 * linux-m68k-low.c (target_regsets): Likewise.
13291 * linux-mips-low.c (target_regsets): Likewise.
13292 * linux-ppc-low.c (target_regsets): Likewise.
13293 * linux-s390-low.c (target_regsets): Likewise.
13294 * linux-sh-low.c (target_regsets): Likewise.
13295 * linux-sparc-low.c (target_regsets): Likewise.
13296 * linux-xtensa-low.c (target_regsets): Likewise.
13297
13298 * linux-low.c: Include <sys/uio.h>.
13299 (regsets_fetch_inferior_registers): Support nt_type.
13300 (regsets_store_inferior_registers): Likewise.
13301 (linux_process_qsupported): New.
13302 (linux_target_ops): Add linux_process_qsupported.
13303
13304 * linux-low.h (regset_info): Add nt_type.
13305 (linux_target_ops): Add process_qsupported.
13306
13307 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13308 and <sys/uio.h>.
13309 (init_registers_i386_avx_linux): New.
13310 (init_registers_amd64_avx_linux): Likewise.
13311 (xmltarget_i386_linux_no_xml): Likewise.
13312 (xmltarget_amd64_linux_no_xml): Likewise.
13313 (PTRACE_GETREGSET): Likewise.
13314 (PTRACE_SETREGSET): Likewise.
13315 (x86_fill_xstateregset): Likewise.
13316 (x86_store_xstateregset): Likewise.
13317 (use_xml): Likewise.
13318 (x86_linux_update_xmltarget): Likewise.
13319 (x86_linux_process_qsupported): Likewise.
13320 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13321 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13322 init_registers_i386_linux here. Call
13323 x86_linux_update_xmltarget.
13324 (the_low_target): Add x86_linux_process_qsupported.
13325
13326 * server.c (handle_query): Call target_process_qsupported.
13327
13328 * target.h (target_ops): Add process_qsupported.
13329 (target_process_qsupported): New.
13330
fc7238bb
PA
133312010-04-03 Pedro Alves <pedro@codesourcery.com>
13332
13333 * inferiors.c (add_thread): Set last_status kind to
13334 TARGET_WAITKIND_IGNORE.
13335 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13336 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13337 (linux_wait_1): Move `thread' local definition to block that uses
13338 it. Don't NULL initialize `event_child'.
13339 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13340 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13341 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13342
bdabb078
PA
133432010-04-01 Pedro Alves <pedro@codesourcery.com>
13344
13345 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13346 an extended waitstatus, or by a watchpoint.
13347 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13348 thread was stepping or has been stopped by a watchpoint.
13349
d3bbe7a0
PA
133502010-04-01 Pedro Alves <pedro@codesourcery.com>
13351
13352 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13353 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13354 of another, then delete the previous, and validate all
13355 breakpoints.
13356 (validate_inserted_breakpoint): New.
13357 (delete_disabled_breakpoints): New.
13358 (validate_breakpoints): New.
13359 (check_mem_read): Validate breakpoints before trusting their
13360 shadow. Delete disabled breakpoints.
13361 (check_mem_write): Validate breakpoints before trusting they
13362 should be inserted. Delete disabled breakpoints.
13363 * mem-break.h (validate_breakpoints):
13364 * server.c (handle_query): Validate breakpoints when we see a
13365 qSymbol query.
13366
8b07ae33
PA
133672010-04-01 Pedro Alves <pedro@codesourcery.com>
13368
13369 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13370 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13371 if we could tell there's a GDB breakpoint at stop_pc.
13372 (need_step_over_p): Don't do a step over if we find a GDB
13373 breakpoint at the resume PC.
13374
13375 * mem-break.c (struct raw_breakpoint): New.
13376 (enum bkpt_type): New type `gdb_breakpoint'.
13377 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13378 fields. New field `raw'.
13379 (find_raw_breakpoint_at): New.
13380 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13381 breakpoint instead.
13382 (set_breakpoint_at): Adjust.
13383 (delete_raw_breakpoint): New.
13384 (release_breakpoint): New.
13385 (delete_breakpoint): Rename to...
13386 (delete_breakpoint_1): ... this. Add proc parameter. Use
13387 release_breakpoint. Return ENOENT.
13388 (delete_breakpoint): Reimplement.
13389 (find_breakpoint_at): Delete.
13390 (find_gdb_breakpoint_at): New.
13391 (delete_breakpoint_at): Delete.
13392 (set_gdb_breakpoint_at): New.
13393 (delete_gdb_breakpoint_at): New.
13394 (gdb_breakpoint_here): New.
13395 (set_reinsert_breakpoint): Use release_breakpoint.
13396 (uninsert_breakpoint): Rename to ...
13397 (uninsert_raw_breakpoint): ... this.
13398 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13399 (reinsert_raw_breakpoint): Change parameter type to
13400 raw_breakpoint.
13401 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13402 instead.
13403 (check_breakpoints): Adjust. Use release_breakpoint.
13404 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13405 (breakpoint_inserted_here): Ditto.
13406 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13407 Don't trust the breakpoint's shadow if it is not inserted.
13408 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13409 (delete_all_breakpoints): Adjust.
13410 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13411 use delete_breakpoint_1.
13412
13413 * mem-break.h (breakpoints_supported): Delete declaration.
13414 (set_gdb_breakpoint_at): Declare.
13415 (gdb_breakpoint_here): Declare.
13416 (delete_breakpoint_at): Delete.
13417 (delete_gdb_breakpoint_at): Declare.
13418
13419 * server.h (struct raw_breakpoint): Forward declare.
13420 (struct process_info): New field `raw_breakpoints'.
13421
13422 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13423 breakpoints.
13424
6bf5e0ba
PA
134252010-03-24 Pedro Alves <pedro@codesourcery.com>
13426
13427 * linux-low.c (status_pending_p_callback): Fix comment.
13428 (linux_wait_for_event_1): Move most of the internal breakpoint
13429 handling from here...
13430 (linux_wait_1): ... to here.
13431 (count_events_callback): New.
13432 (select_singlestep_lwp_callback): New.
13433 (select_event_lwp_callback): New.
13434 (cancel_breakpoints_callback): New.
13435 (select_event_lwp): New.
13436 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13437 priority to all LWPs that have had events that should be reported
13438 to the client. Cancel breakpoints when about to reporting the
13439 event to the client, not while stopping lwps. No longer cancel
13440 finished single-steps here.
13441 (cancel_finished_single_step): Delete.
13442 (cancel_finished_single_steps): Delete.
13443
414a389f
PA
134442010-03-24 Pedro Alves <pedro@codesourcery.com>
13445
13446 * mem-break.c (enum bkpt_type): New.
13447 (struct breakpoint): New field `type'.
13448 (set_breakpoint_at): Change return type to struct breakpoint
13449 pointer. Set type to `other_breakpoint' by default.
13450 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13451 in the breakpoint list.
13452 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13453 (reinsert_breakpoint): Rename to ...
13454 (reinsert_raw_breakpoint): ... this.
13455 (reinsert_breakpoints_at): Adjust.
13456 * mem-break.h (struct breakpoint): Declare.
13457 (set_breakpoint_at): Change return type to struct breakpoint
13458 pointer.
13459
2280c721
PA
134602010-03-24 Pedro Alves <pedro@codesourcery.com>
13461
13462 * server.c (handle_query): Assign, not compare.
13463
d50171e4
PA
134642010-03-24 Pedro Alves <pedro@codesourcery.com>
13465
13466 Teach linux gdbserver to step-over-breakpoints.
13467
13468 * linux-low.c (can_hardware_single_step): New.
13469 (supports_breakpoints): New.
13470 (handle_extended_wait): If stopping threads, read the stop pc of
13471 the new cloned LWP.
13472 (get_pc): New.
13473 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13474 low target doesn't support retrieving the PC.
13475 (add_lwp): Set last_resume_kind to resume_continue.
13476 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13477 (linux_attach): Don't clear stop_expected. Set the lwp's
13478 last_resume_kind to resume_stop.
13479 (linux_detach_one_lwp): Don't check for removed breakpoints.
13480 (check_removed_breakpoint): Delete.
13481 (status_pending_p): Rename to ...
13482 (status_pending_p_callback): ... this. Don't check for removed
13483 breakpoints. Don't consider threads that are stopped from GDB's
13484 perspective.
13485 (linux_wait_for_lwp): Always read the stop_pc here.
13486 (cancel_breakpoint): New.
13487 (step_over_bkpt): New global.
13488 (linux_wait_for_event_1): Implement stepping over breakpoints.
13489 (gdb_wants_lwp_stopped): New.
13490 (gdb_wants_all_stopped): New.
13491 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13492 single-step traps here. Store the thread's last reported target
13493 wait status.
13494 (send_sigstop): Don't clear stop_expected. Always set it,
13495 instead.
13496 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13497 (cancel_finished_single_step): New.
13498 (cancel_finished_single_steps): New.
13499 (wait_for_sigstop): Don't cancel finished single-step traps here.
13500 (linux_resume_one_lwp): Don't check for removed breakpoints.
13501 Don't set `step' on non-hardware step archs.
13502 (linux_set_resume_request): Ignore resume_stop requests if already
13503 stopping or stopped. Set the lwp's last_resume_kind.
13504 (resume_status_pending_p): Don't check for removed breakpoints.
13505 (need_step_over_p): New.
13506 (start_step_over): New.
13507 (finish_step_over): New.
13508 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13509 requests. Clear the thread's last reported target waitstatus.
13510 Don't use the `suspended' flag. Don't consider pending breakpoints.
13511 (linux_resume): Start a step-over if necessary.
13512 (proceed_one_lwp): New.
13513 (proceed_all_lwps): New.
13514 (unstop_all_lwps): New.
13515 * linux-low.h (struct lwp_info): Rewrite comment for the
13516 `suspended' flag. Add the `stop_pc' field. Delete the
13517 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13518 Add `'last_resume_kind' and `need_step_over' fields.
13519 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13520 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13521 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13522 (set_raw_breakpoint_at): New.
13523 (set_breakpoint_at): Rewrite to use it.
13524 (reinsert_breakpoint_handler): Delete.
13525 (set_reinsert_breakpoint): New.
13526 (reinsert_breakpoint_by_bp): Delete.
13527 (delete_reinsert_breakpoints): New.
13528 (uninsert_breakpoint): Rewrite.
13529 (uninsert_breakpoints_at): New.
13530 (reinsert_breakpoint): Rewrite.
13531 (reinsert_breakpoints_at): New.
13532 (check_breakpoints): Rewrite.
13533 (breakpoint_here): New.
13534 (breakpoint_inserted_here): New.
13535 (check_mem_read): Adjust.
13536 * mem-break.h (breakpoints_supported, breakpoint_here)
13537 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13538 (reinsert_breakpoint_by_bp): Delete declaration.
13539 (delete_reinsert_breakpoints): Declare.
13540 (reinsert_breakpoint): Delete declaration.
13541 (reinsert_breakpoints_at): Declare.
13542 (uninsert_breakpoint): Delete declaration.
13543 (uninsert_breakpoints_at): Declare.
13544 (check_breakpoints): Adjust prototype.
13545 * server.h: Adjust include order.
13546 (struct thread_info): Declare here. Add a `last_status' field.
13547
30ba68cb
MS
135482010-03-23 Michael Snyder <msnyder@vmware.com>
13549
13550 * server.c (crc32): New function.
13551 (handle_query): Add handling for 'qCRC:' request.
13552
b9a881c2
PA
135532010-03-23 Pedro Alves <pedro@codesourcery.com>
13554
13555 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13556 lwp had been stopped by a watchpoint.
13557
e92d13d5
PA
135582010-03-16 Pedro Alves <pedro@codesourcery.com>
13559
13560 * server.h (internal_error): Declare.
13561 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13562 * utils.c (internal_error): New function.
13563
64daa791
AS
135642010-03-15 Andreas Schwab <schwab@redhat.com>
13565
13566 * configure.srv: Fix typo setting srv_regobj.
13567
f52cd8cd
PA
135682010-03-15 Pedro Alves <pedro@codesourcery.com>
13569
13570 * linux-low.c (fetch_register): Avoid passing a non string literal
13571 format to `error'.
13572 (usr_store_inferior_registers): Ditto.
13573
93ae6fdc
PA
135742010-03-14 Pedro Alves <pedro@codesourcery.com>
13575
13576 * linux-low.c (linux_write_memory): Bail out early if peeking
13577 memory failed.
13578
c3adc08c
PA
135792010-03-14 Pedro Alves <pedro@codesourcery.com>
13580
13581 * linux-low.h (struct lwp_info): New fields
13582 `stopped_by_watchpoint' and `stopped_data_address'.
13583 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13584 here, and cache them in the lwp object.
13585 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13586 directly.
13587 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13588 field.
13589 (linux_stopped_by_watchpoint): Rewrite.
13590 (linux_stopped_data_address): Rewrite.
13591
bce522a2
PA
135922010-03-06 Simo Melenius <simo.melenius@iki.fi>
13593
13594 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13595 switching the current inferior, not before.
13596
90884b2b
L
135972010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13598
13599 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13600 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13601 i386-linux.c and amd64-linux.c.
13602 (reg-i386.o): Removed.
13603 (reg-i386.c): Likewise.
13604 (reg-i386-linux.o): Likewise.
13605 (reg-i386-linux.c): Likewise.
13606 (reg-x86-64.o): Likewise.
13607 (reg-x86-64.c): Likewise.
13608 (reg-x86-64-linux.o): Likewise.
13609 (reg-x86-64-linux.c): Likewise.
13610 (i386.o): New.
13611 (i386.c): Likewise.
13612 (i386-linux.o): Likewise.
13613 (i386-linux.c): Likewise.
13614 (amd64.o): Likewise.
13615 (amd64.c): Likewise.
13616 (amd64-linux.o): Likewise.
13617 (amd64-linux.c): Likewise.
13618
13619 * configure.srv (srv_i386_regobj): New.
13620 (srv_i386_linux_regobj): Likewise.
13621 (srv_amd64_regobj): Likewise.
13622 (srv_amd64_linux_regobj): Likewise.
13623 (srv_i386_32bit_xmlfiles): Likewise.
13624 (srv_i386_64bit_xmlfiles): Likewise.
13625 (srv_i386_xmlfiles): Likewise.
13626 (srv_amd64_xmlfiles): Likewise.
13627 (srv_i386_linux_xmlfiles): Likewise.
13628 (srv_amd64_linux_xmlfiles): Likewise.
13629 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13630 srv_xmlfiles to $srv_i386_xmlfiles.
13631 (i[34567]86-*-mingw32ce*): Likewise.
13632 (i[34567]86-*-mingw*): Likewise.
13633 (i[34567]86-*-nto*): Likewise.
13634 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13635 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13636 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13637 (x86_64-*-linux*): Likewise.
13638
13639 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13640 (init_registers_amd64_linux): New.
13641 (x86_arch_setup): Replace init_registers_x86_64_linux with
13642 init_registers_amd64_linux.
13643
193f13e6
MK
136442010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13645
13646 * configure.ac: Check for libdl. If it is not available link against
13647 static libthread_db.
13648 * configure: Regenerate.
13649
85d721b8
PA
136502010-02-22 Pedro Alves <pedro@codesourcery.com>
13651
13652 PR9605
13653
13654 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13655 handing a read watchpoint.
13656 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13657
6076632b
DE
136582010-02-12 Doug Evans <dje@google.com>
13659
13660 * linux-low.c (linux_supports_tracefork_flag): Document.
13661 (linux_look_up_symbols): Add comment.
13662
3327ccf7
L
136632010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13664
13665 * regcache.c (supply_register): Clear regcache if buf is NULL.
13666
0718675c 136672010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13668 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13669
13670 * inferiors.c (find_inferior): Add function documentation.
13671 (unloaded_dll): Handle the case where the unloaded dll has not
13672 been previously registered in the dll list.
13673
177321bd
DJ
136742010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13675
13676 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13677 (thumb2_breakpoint): New.
13678 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13679
2b009048
DJ
136802010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13681
13682 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13683 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13684 breakpoints.
13685
3be029c7
PA
136862010-01-21 Pedro Alves <pedro@codesourcery.com>
13687
13688 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13689
18f5de3b
JK
136902010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13691
13692 * linux-s390-low.c (s390_collect_ptrace_register)
13693 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13694
3743bb4f
DE
136952010-01-21 Doug Evans <dje@google.com>
13696
14ce3065
DE
13697 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13698 (PTRACE_ARG4_TYPE): New macro.
13699 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13700 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13701 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13702 (usr_store_inferior_registers): Ditto.
13703 (linux_read_memory, linux_write_memory): Ditto.
13704 (linux_test_for_tracefork): Ditto.
13705
3743bb4f
DE
13706 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13707 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13708
8b315be5
PA
137092010-01-21 Pedro Alves <pedro@codesourcery.com>
13710
13711 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13712 target.
13713
85492558
PA
137142010-01-21 Pedro Alves <pedro@codesourcery.com>
13715
13716 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13717 prototype to take a regcache. Adjust.
13718
442ea881
PA
137192010-01-20 Pedro Alves <pedro@codesourcery.com>
13720
13721 * regcache.h (struct thread_info): Forward declare.
13722 (struct regcache): New.
13723 (new_register_cache): Adjust prototype.
13724 (get_thread_regcache): Declare.
13725 (free_register_cache): Adjust prototype.
13726 (registers_to_string, registers_from_string): Ditto.
13727 (supply_register, supply_register_by_name, collect_register)
13728 (collect_register_as_string, collect_register_by_name): Ditto.
13729 * regcache.c (struct inferior_regcache_data): Delete.
13730 (get_regcache): Rename to ...
13731 (get_thread_regcache): ... this. Adjust. Switch inferior before
13732 fetching registers.
13733 (regcache_invalidate_one): Adjust.
13734 (regcache_invalidate): Fix prototype.
13735 (new_register_cache): Return the new register cache.
13736 (free_register_cache): Change prototype.
13737 (realloc_register_cache): Adjust.
13738 (registers_to_string): Change prototype to take a regcache. Adjust.
13739 (registers_from_string): Ditto.
13740 (register_data): Ditto.
13741 (supply_register): Ditto.
13742 (supply_register_by_name): Ditto.
13743 (collect_register): Ditto.
13744 (collect_register_as_string): Ditto.
13745 (collect_register_by_name): Ditto.
13746 * server.c (process_serial_event): Adjust.
13747 * linux-low.h (regset_fill_func, regset_store_func): Change
13748 prototype.
13749 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13750 Change prototype.
13751 * linux-low.c (get_stop_pc): Adjust.
13752 (check_removed_breakpoint): Adjust.
13753 (linux_wait_for_event): Adjust.
13754 (linux_resume_one_lwp): Adjust.
13755 (fetch_register): Add regcache parameter. Adjust.
13756 (usr_store_inferior_registers): Ditto.
13757 (regsets_fetch_inferior_registers): Ditto.
13758 (regsets_store_inferior_registers): Ditto.
13759 (linux_fetch_registers, linux_store_registers): Ditto.
13760 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13761 regcache. Adjust.
43aaf8b6
PA
13762 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13763 Ditto.
442ea881
PA
13764 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13765 prototype to take a regcache.
13766 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13767 * remote-utils.c (convert_ascii_to_int, outreg)
13768 (prepare_resume_reply): Change prototype to take a regcache.
13769 Adjust.
13770 * target.h (struct target_ops) <fetch_registers, store_registers>:
13771 Change prototype to take a regcache.
13772 (fetch_inferior_registers, store_inferior_registers): Change
13773 prototype to take a regcache. Adjust.
13774 * proc-service.c (ps_lgetregs): Adjust.
13775 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13776 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13777 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13778 take a regcache. Adjust.
13779 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13780 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13781 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13782 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13783 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13784 (cris_cannot_fetch_register):
13785 (cris_breakpoint_at): Change prototype to take a regcache.
13786 Adjust.
13787 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13788 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13789 to take a regcache. Adjust.
13790 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13791 Adjust.
13792 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13793 take a regcache. Adjust.
13794 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13795 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13796 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13797 * linux-mips-low.c (mips_get_pc):
13798 (mips_set_pc): Change prototype to take a regcache. Adjust.
13799 (mips_reinsert_addr): Adjust.
13800 (mips_collect_register): Change prototype to take a regcache.
13801 Adjust.
13802 (mips_supply_register):
13803 (mips_collect_register_32bit, mips_supply_register_32bit)
13804 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13805 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13806 * linux-ppc-low.c (ppc_supply_ptrace_register)
13807 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13808 (parse_spufs_run): Adjust.
13809 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13810 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13811 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13812 take a regcache. Adjust.
13813 * linux-s390-low.c (s390_collect_ptrace_register)
13814 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13815 (s390_set_pc): Change prototype to take a regcache. Adjust.
13816 (s390_arch_setup): Adjust.
13817 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13818 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13819 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13820 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13821 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13822 regcache. Adjust.
13823 (sparc_breakpoint_at): Adjust.
13824 * linux-xtensa-low.c (xtensa_fill_gregset):
13825 (xtensa_store_gregset):
13826 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13827 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13828 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13829 prototype to take a regcache. Adjust.
13830 * win32-arm-low.c (arm_fetch_inferior_register)
13831 (arm_store_inferior_register): Change prototype to take a
13832 regcache. Adjust.
13833 * win32-i386-low.c (i386_fetch_inferior_register)
13834 (i386_store_inferior_register): Change prototype to take a
13835 regcache. Adjust.
13836 * win32-low.c (child_fetch_inferior_registers)
13837 (child_store_inferior_registers): Change prototype to take a
13838 regcache. Adjust.
13839 (win32_wait): Adjust.
13840 (win32_fetch_inferior_registers): Change prototype to take a
13841 regcache. Adjust.
13842 (win32_store_inferior_registers): Adjust.
13843 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13844 store_inferior_register>: Change prototype to take a regcache.
13845
60c3d7b0
DE
138462010-01-20 Doug Evans <dje@google.com>
13847
13848 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13849 #ifdef.
13850 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13851 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13852
dc146f7c
VP
138532010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13854
13855 * linux-low.c (linux_core_of_thread): New.
13856 (compare_ints, show_process, list_threads): New.
13857 (linux_qxfer_osdata): Report threads and cores.
13858 (linux_target_op): Register linux_core_of_thread.
13859 * remote-utils.c (prepare_resume_reply): Report the core.
13860 (buffer_xml_printf): Support %d specifier.
13861 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13862 New.
13863 (handle_query): Handle qXfer:threads. Announce availability
13864 thereof.
13865 * target.h (struct target_ops): New field core_of_thread.
13866
7803799a
UW
138672010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13868
13869 * Makefile.in (clean): Remove new generated files.
13870 (reg-s390.o, reg-s390.c): Remove rules.
13871 (reg-s390x.o, reg-s390x.c): Likewise.
13872 (s390-linux32.o, s390-linux32.c): Add rules.
13873 (s390-linux64.o, s390-linux64.c): Likewise.
13874 (s390x-linux64.o, s390x-linux64.c): Likewise.
13875 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13876 * linux-s390-low.c: Include <elf.h>.
13877 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13878 (init_registers_s390): Remove prototype.
13879 (init_registers_s390x): Likewise.
13880 (init_registers_s390_linux32): Add prototype.
13881 (init_registers_s390_linux64): Likewise.
13882 (init_registers_s390x_linux64): Likewise.
13883 (s390_num_regs_3264): New define.
13884 (s390_regmap_3264): New global variable.
13885 (s390_cannot_fetch_register): Remove obsolete check.
13886 (s390_cannot_store_register): Likewise.
13887 (s390_collect_ptrace_register): Handle upper/lower register halves.
13888 (s390_supply_ptrace_register): Likewise.
13889 (s390_fill_gregset): Update to register number changes.
13890 (s390_get_hwcap): New routine.
13891 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13892 Install appropriate regmap and register set.
13893
6e7ffa39
JB
138942010-01-01 Joel Brobecker <brobecker@adacore.com>
13895
13896 * server.c (gdbserver_version): Update copyright year to 2010.
13897 * gdbreplay.c (gdbreplay_version): Likewise.
13898
957f3f49
DE
138992009-12-28 Doug Evans <dje@google.com>
13900
13901 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13902 elf/external.h. Include <elf.h> instead but only if necessary.
13903
ca5c370d
PA
139042009-12-28 Pedro Alves <pedro@codesourcery.com>
13905
13906 * linux-low.c (linux_remove_process): Remove `detaching'
13907 parameter. Don't release/detach from thread_db here.
13908 (linux_kill): Release/detach from thread_db here, ...
13909 (linux_detach): ... and here, before actually detaching.
13910 (linux_wait_1): ... and here, when a process exits.
13911 * thread-db.c (any_thread_of): New.
13912 (thread_db_free): Switch the current inferior to a thread of the
13913 passed in process.
13914
4ee62156
DE
139152009-12-21 Doug Evans <dje@google.com>
13916
d90e6a88
DE
13917 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13918
c5f62d5f
DE
13919 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13920 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13921 warning ifndef __NR_tkill. Move setting of errno there too.
13922 Delete unnecessary resetting of errno after syscall.
13923 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13924
10e86dd7
DE
13925 * configure.ac: Check for dladdr.
13926 * config.in: Regenerate.
13927 * configure: Regenerate.
13928 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13929 (try_thread_db_load): Update.
13930
4ee62156
DE
13931 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13932
00f515da
DE
139332009-12-18 Doug Evans <dje@google.com>
13934
e9464885
DE
13935 * event-loop.c: Include unistd.h if it exists.
13936
07d4f67e
DE
13937 * linux-low.c (my_waitpid): Move definition away from being in
13938 between linux_tracefork_child/linux_test_for_tracefork.
13939
00f515da
DE
13940 * gdb_proc_service.h (psaddr_t): Fix type.
13941 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13942 signature to match glibc.
13943
1de1badb
DE
139442009-12-16 Doug Evans <dje@google.com>
13945
13946 * linux-low.c (linux_read_memory): Fix argument to read.
13947
aeeb81d1
PA
139482009-11-26 Pedro Alves <pedro@codesourcery.com>
13949
13950 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13951 events, don't leave current_inferior pointing at null.
13952
10357975
PA
139532009-11-26 Pedro Alves <pedro@codesourcery.com>
13954
13955 * win32-low.c (LOG): Delete.
13956 (OUTMSG): Output to stderr.
13957 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13958 on compile time LOG macro.
13959 (win32_wait): Fix debug output.
13960
cf6e3471
PA
139612009-11-26 Pedro Alves <pedro@codesourcery.com>
13962
13963 * win32-low.c (win32_add_one_solib): If the dll name is
13964 "ntdll.dll", prepend the system directory to the dll path.
13965
0c85e18e
MK
139662009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13967
13968 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13969
9ac544ce 139702009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13971 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13972
13973 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13974 * configure.ac: Check for __mcoldfire__ and set
13975 gdb_cv_m68k_is_coldfire.
13976 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13977 reg-cf.o and reg-m68k.o.
13978 * configure: Regenerated.
13979
fd7dd3e6
PA
139802009-11-16 Pedro Alves <pedro@codesourcery.com>
13981
13982 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13983 Pass it to thread_db_free.
13984 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13985 proper `detaching' argument to linux_remove_process.
13986 * linux-low.h (thread_db_free): Add `detaching' parameter.
13987 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13988 to thread_db_free.
13989 (thread_db_free): Add `detaching' parameter. Only
13990 call td_ta_clear_event if detaching from process.
13991
75aa492e
MK
139922009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13993
13994 * thread-db.c (thread_db_free): Fix typo.
13995
21e1bee4
PP
139962009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13997
13998 PR gdb/10838
13999 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14000
8838b45e
NS
140012009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14002
14003 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14004 with an i686 compiler.
14005 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14006 needed.
14007 * configure: Rebuilt.
14008
8a35fb51
SL
140092009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14010
14011 PR gdb/10783
14012
14013 * server.c (handle_search_memory_1): Correct read_addr initialization
14014 in loop for searching subsequent chunks.
14015
96f15937
PP
140162009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14017
14018 * configure.ac: New --with-libthread-db option.
14019 * thread-db.c: Allow direct dependence on libthread_db.
14020 (thread_db_free): Adjust.
14021 * config.in: Regenerate.
14022 * configure: Likewise.
889bf7c5 14023
5f7d1694
PP
140242009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14025
14026 PR gdb/10757
14027 * thread-db.c (attach_thread): New function.
14028 (maybe_attach_thread): Return success/failure.
14029 (find_new_threads_callback): Adjust.
889bf7c5
PA
14030 (thread_db_find_new_threads): Loop until no new threads.
14031
88e3b899
PA
140322009-10-13 Pedro Alves <pedro@codesourcery.com>
14033
14034 * proc-service.c (ps_lgetregs): Formatting.
14035
cdbfd419
PP
140362009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14037
14038 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14039 * configure.ac: Adjust.
14040 * linux-low.h (struct process_info_private): Move members to struct
14041 thread_db.
14042 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14043 * linux-low.c (linux_remove_process): Adjust.
14044 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14045 * server.c (handle_query): Move code ...
14046 (handle_monitor_command): ... here. New function.
14047 * target.h (struct target_ops): New member.
14048 * thread-db.c (struct thread_db): New.
14049 (libthread_db_search_path): New variable.
14050 (thread_db_create_event, thread_db_enable_reporting)
14051 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14052 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14053 (try_thread_db_load_1, dladdr_to_soname): New functions.
14054 (try_thread_db_load, thread_db_load_search): New functions.
14055 (thread_db_init): Search for libthread_db.
14056 (thread_db_free): New function.
14057 (thread_db_handle_monitor_command): Likewise.
14058 * config.in: Regenerate.
14059 * configure: Regenerate.
889bf7c5 14060
4168d2d6
UW
140612009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14062
14063 * spu-low.c (spu_kill): Wait for inferior to terminate.
14064 Call clear_inferiors.
14065 (spu_detach): Call clear_inferiors.
14066
81ecdfbb
RW
140672009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14068
14069 * aclocal.m4: Regenerate.
14070 * config.in: Likewise.
14071 * configure: Likewise.
14072
0b9ff2c0
UW
140732009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14074
14075 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14076 (parse_spufs_run): New function.
14077 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14078 (ppc_breakpoint_at): Handle SPU breakpoints.
14079
efcbbd14
UW
140802009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14081
14082 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14083 (SPUFS_MAGIC): Define.
14084 (spu_enumerate_spu_ids): New function.
14085 (linux_qxfer_spu): New function.
14086 (linux_target_ops): Install linux_qxfer_spu.
14087
f4d9bade
UW
140882009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14089
14090 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14091 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14092 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14093 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14094 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14095 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14096 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14097 (init_registers_powerpc_cell32l): Add prototype.
14098 (init_registers_powerpc_cell64l): Likewise.
14099 (ppc_arch_setup): Detect Cell/B.E. architecture.
14100
96e946ca
RW
141012009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14102
14103 * Makefile.in (datarootdir): New variable.
14104
58d6951d
DJ
141052009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14106
14107 * linux-low.c (linux_write_memory): Update debugging output.
14108 * Makefile.in (clean): Add new descriptions.
14109 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14110 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14111 * configure.srv: Add new files for arm*-*-linux*.
14112 * linux-arm-low.c: Add new declarations.
14113 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14114 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14115 (HWCAP_VFPv3D16): New.
14116 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14117 instead of __IWMMXT__.
14118 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14119 (arm_arch_setup): New.
14120 (target_regsets): Remove #ifdef. Add VFP regset.
14121 (the_low_target): Use arm_arch_setup.
14122
12b42a12
DJ
141232009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14124
14125 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14126 the main thread again.
14127
ac8c974e
AR
141282009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14129
14130 Adding Neutrino gdbserver.
14131 * configure: Regenerated.
14132 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14133 * configure.srv (i[34567]86-*-nto*): New target.
14134 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14135 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14136 (nto_comctrl) [__QNX__]: New function.
14137 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14138
4424e0c3 141392009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14140
14141 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14142 srv_tgtobj.
14143
912cf4ba
PA
141442009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14145 Pedro Alves <pedro@codesourcery.com>
14146
14147 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14148 don't support CONTEXT_EXTENDED_REGISTERS.
14149 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14150 (the_low_target): Install them.
14151 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14152 failing with ERROR_PIPE_NOT_CONNECTED.
14153
aa5ca48f
DE
141542009-06-30 Doug Evans <dje@google.com>
14155 Pierre Muller <muller@ics.u-strasbg.fr>
14156
14157 Add h/w watchpoint support to x86-linux, win32-i386.
14158 * Makefile.in (SFILES): Add i386-low.c
14159 (i386_low_h): Define.
14160 (i386-low.o): Add dependencies.
14161 (linux-x86-low.o): Add i386-low.h dependency.
14162 (win32-i386-low.o): Ditto.
14163 * i386-low.c: New file.
14164 * i386-low.h: New file.
14165 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14166 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14167 * linux-low.c (linux_add_process): Initialize arch_private.
14168 (linux_remove_process): Free arch_private.
14169 (add_lwp): Initialize arch_private.
14170 (delete_lwp): Free arch_private.
14171 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14172 provided.
14173 * linux-low.h (process_info_private): New member arch_private.
14174 (lwp_info): New member arch_private.
14175 (linux_target_ops): New members new_process, new_thread,
14176 prepare_to_resume.
14177 (ptid_of): New macro.
14178 * linux-x86-low.c: Include stddef.h, i386-low.h.
14179 (arch_process_info): New struct.
14180 (arch_lwp_info): New struct.
14181 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14182 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14183 (i386_dr_low_get_status): New function.
14184 (x86_insert_point, x86_remove_point): New functions.
14185 (x86_stopped_by_watchpoint): New function.
14186 (x86_stopped_data_address): New function.
14187 (x86_linux_new_process, x86_linux_new_thread): New functions.
14188 (x86_linux_prepare_to_resume): New function.
14189 (the_low_target): Add entries for insert_point, remove_point,
14190 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14191 prepare_to_resume.
14192 * server.c (debug_hw_points): New global.
14193 (monitor_show_help): Document set debug-hw-points.
14194 (handle_query): Process "set debug-hw-points".
14195 * server.h (debug_hw_points): Declare.
14196 (paddress): Declare.
14197 * utils.c (NUMCELLS, CELLSIZE): New macros.
14198 (get_sell, xsnprintf, paddress): New functions.
14199 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14200 remove_point, stopped_by_watchpoint, stopped_data_address.
14201 * win32-i386-low.c: Include i386-low.h.
14202 (debug_reg_state): Replaces dr.
14203 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14204 (i386_dr_low_get_status): New function.
14205 (i386_insert_point, i386_remove_point): New functions.
14206 (i386_stopped_by_watchpoint): New function.
14207 (i386_stopped_data_address): New function.
14208 (i386_initial_stuff): Update.
14209 (get_thread_context,set_thread_context,i386_thread_added): Update.
14210 (the_low_target): Add entries for insert_point,
14211 remove_point, stopped_by_watchpoint, stopped_data_address.
14212 * win32-low.c (win32_insert_watchpoint): New function.
14213 (win32_remove_watchpoint): New function.
14214 (win32_stopped_by_watchpoint): New function.
14215 (win32_stopped_data_address): New function.
14216 (win32_target_ops): Add entries for insert_watchpoint,
14217 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14218 * win32-low.h (win32_target_ops): New members insert_point,
14219 remove_point, stopped_by_watchpoint, stopped_data_address.
14220
d993e290
PA
142212009-06-25 Pedro Alves <pedro@codesourcery.com>
14222
14223 * server.c (process_serial_event): Re-return unsupported, not
14224 error, if the type isn't recognized. Re-allow supporting only
14225 insert or remove packets. Also call require_running for
14226 breakpoints. Add missing break statement to default case. Tidy.
14227 * target.h (struct target_ops): Rename insert_watchpoint to
14228 insert_point, and remove_watchpoint to remove_point.
14229
14230 * linux-low.h (struct linux_target_ops): Likewise.
14231 * linux-low.c (linux_insert_watchpoint): Rename to ...
14232 (linux_insert_point): ... this. Adjust.
14233 (linux_remove_watchpoint): Rename to ...
14234 (linux_remove_point): ... this. Adjust.
14235 (linux_target_ops): Adjust.
14236 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14237 (cris_insert_point): ... this.
14238 (cris_remove_watchpoint): Rename to ...
14239 (cris_remove_point): ... this.
14240 (the_low_target): Adjust.
14241
0f54c268
PM
142422009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14243
14244 * server.c (handle_v_kill): Pass signal_pid to
14245 kill_inferior if multi_process is zero.
14246
c6314022
AR
142472009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14248
14249 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14250 * target.h (target_ops): Comment for *_watchpoint to make it clear
14251 the functions can get types '0' and '1'.
14252
4463ce24
AR
142532009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14254
14255 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14256 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14257 * regcache.c (get_regcache): Likewise.
14258 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14259 * win32-low.c (child_fetch_inferior_registers): Remove check for
14260 regno 0.
14261
cf8fd78b
PA
142622009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14263 Pedro Alves <pedro@codesourcery.com>
14264
14265 * target.h (struct target_ops) <supports_multi_process>: New
14266 callback.
14267 (target_supports_multi_process): New.
14268 * server.c (handle_query): Even if GDB reports support, only
14269 enable multi-process if the target also supports it. Report
14270 multi-process support only if the target backend supports it.
14271 * linux-low.c (linux_supports_multi_process): New function.
14272 (linux_target_ops): Install it as target_supports_multi_process
14273 callback.
14274
47c0c975
DE
142752009-05-24 Doug Evans <dje@google.com>
14276
e09875d4
DE
14277 Global renaming of find_thread_pid to find_thread_ptid.
14278 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14279 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14280 All callers updated.
14281
e27d73f6
DE
14282 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14283 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14284 directly.
14285
47c0c975
DE
14286 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14287 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14288 (linux_resume_one_lwp): Ditto.
14289
2acc282a
DE
142902009-05-23 Doug Evans <dje@google.com>
14291
14292 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14293 from struct inferior_list_entry * to struct lwp_info *.
14294 All callers updated.
14295
9f1036c1
DE
142962009-05-13 Doug Evans <dje@google.com>
14297
14298 * linux-x86-low.c: Don't include assert.h.
14299 (x86_siginfo_fixup): Use fatal, not assert.
14300 (x86_arch_setup): Fix comment.
14301
d0722149
DE
143022009-05-12 Doug Evans <dje@google.com>
14303
14304 Biarch support for i386/amd64 gdbserver.
14305 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14306 Add linux-x86-low.c.
14307 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14308 (linux-x86-low.o): Add.
14309 * linux-x86-64-low.c: Delete.
14310 * linux-i386-low.c: Delete.
14311 * linux-x86-low.c: New file.
14312 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14313 linux-x86-low.o.
14314 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14315 linux-x86-low.o.
14316 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14317 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14318 (linux_child_pid_to_exec_file): New function.
14319 (elf_64_header_p, elf_64_file_p): New functions.
14320 (siginfo_fixup): New function.
14321 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14322 give target a chance to convert layout.
14323 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14324 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14325
fdeb2a12
DE
143262009-05-07 Doug Evans <dje@google.com>
14327
14328 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14329 (regsets_store_inferior_registers): Ditto.
14330
a6dbe5df
PA
143312009-05-06 Pedro Alves <pedro@codesourcery.com>
14332
14333 PR server/10048
14334
14335 * linux-low.c (must_set_ptrace_flags): Delete.
14336 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14337 of the global.
14338 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14339 `lwp->must_set_ptrace_flags' instead.
ba42693b 14340 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14341 (linux_wait_1): ... not here.
14342
5091eb23
DE
143432009-04-30 Doug Evans <dje@google.com>
14344
9f767825
DE
14345 * inferiors.c (started_inferior_callback): New function.
14346 (attached_inferior_callback): New function.
14347 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14348 * server.c (print_started_pid, print_attached_pid): New functions.
14349 (detach_or_kill_for_exit): New function.
14350 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14351 * server.h (have_started_inferiors_p): Declare.
14352 (have_attached_inferiors_p): Declare.
14353
5091eb23
DE
14354 * inferiors.c (remove_process): Fix memory leak, free process.
14355 * linux-low.c (linux_remove_process): New function.
14356 (linux_kill): Call it instead of remove_process.
14357 (linux_detach, linux_wait_1): Ditto.
14358
155c8968
PA
143592009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14360
14361 * configure.srv: Add x86 Windows CE target.
14362
7fe519cb
UW
143632009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14364
14365 * inferiors.c (get_thread_process): Make global.
14366 * server.h (get_thread_process): Add prototype.
14367 * thread-db.c (find_one_thread): Use get_thread_process
14368 instead of current_process.
14369 (thread_db_get_tls_address): Do not crash if called when
14370 thread layer is not yet initialized.
14371
5472f405
UW
143722009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14373
14374 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14375 * spu-low.c (current_tid): Rename to ...
14376 (current_ptid): ... this.
14377 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14378 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14379 ptid_get_lwp (current_ptid) instead of current_tid.
14380 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14381 instead of current_tid. Use find_process_pid to verify pid
14382 argument is valid. Pass proper argument to remove_process.
14383 (spu_thread_alive): Compare current_ptid instead of current_tid.
14384 (spu_resume): Likewise.
14385
55ac2b99
PA
143862009-04-02 Pedro Alves <pedro@codesourcery.com>
14387
14388 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14389 variable.
14390
95954743
PA
143912009-04-01 Pedro Alves <pedro@codesourcery.com>
14392
14393 Implement the multiprocess extensions, and add linux multiprocess
14394 support.
14395
14396 * server.h (ULONGEST): Declare.
14397 (struct ptid, ptid_t): New.
14398 (minus_one_ptid, null_ptid): Declare.
14399 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14400 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14401 (struct inferior_list_entry): Change `id' type from unsigned from
14402 to ptid_t.
14403 (struct sym_cache, struct breakpoint, struct
14404 process_info_private): Forward declare.
14405 (struct process_info): Declare.
14406 (current_process): Declare.
14407 (all_processes): Declare.
14408 (initialize_inferiors): Declare.
14409 (add_thread): Adjust to use ptid_t.
14410 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14411 (add_process, remove_process, find_thread_pid): Declare.
14412 (find_inferior_id): Adjust to use ptid_t.
14413 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14414 (multi_process): Declare.
14415 (push_event): Adjust to use ptid_t.
14416 (read_ptid, write_ptid): Declare.
14417 (prepare_resume_reply): Adjust to use ptid_t.
14418 (clear_symbol_cache): Declare.
14419 * inferiors.c (all_processes): New.
14420 (null_ptid, minus_one_ptid): New.
14421 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14422 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14423 (add_thread): Change unsigned long to ptid. Remove gdb_id
14424 parameter. Adjust.
14425 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14426 (gdb_id_to_thread): Rename to ...
14427 (find_thread_pid): ... this. Change unsigned long to ptid.
14428 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14429 (loaded_dll, pull_pid_from_list): Adjust.
14430 (add_process, remove_process, find_process_pid)
14431 (get_thread_process, current_process, initialize_inferiors): New.
14432 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14433 (struct target_waitstatus) <related_pid>: Ditto.
14434 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14435 return type to int.
14436 (struct target_ops) <join>: Add `pid' argument.
14437 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14438 (struct target_ops) <wait>: Add `ptid' field. Change return type
14439 to ptid.
14440 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14441 (mywait): Add `ptid' argument. Change return type to ptid_t.
14442 (target_pid_to_str): Declare.
14443 * target.c (set_desired_inferior): Adjust to use ptids.
14444 (mywait): Add new `ptid' argument. Adjust.
14445 (target_pid_to_str): New.
14446 * mem-break.h (free_all_breakpoints): Declare.
14447 * mem-break.c (breakpoints): Delelete.
14448 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14449 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14450 to use per-process breakpoint list.
14451 (free_all_breakpoints): New.
14452 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14453 (symbol_cache, all_symbols_looked_up): Delete.
14454 (hexchars): New.
14455 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14456 read_ptid): New.
14457 (prepare_resume_reply): Change ptid argument's type from unsigned
14458 long to ptid_t. Adjust. Implement W;process and X;process.
14459 (free_sym_cache, clear_symbol_cache): New.
14460 (look_up_one_symbol): Adjust to per-process symbol cache. *
14461 * server.c (cont_thread, general_thread, step_thread): Change type
14462 to ptid_t.
14463 (attached): Delete.
14464 (multi_process): New.
14465 (last_ptid): Change type to ptid_t.
14466 (struct vstop_notif) <ptid>: Change type to ptid_t.
14467 (queue_stop_reply, push_event): Change `ptid' argument's type to
14468 ptid_t.
14469 (discard_queued_stop_replies): Add `pid' argument.
14470 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14471 changes. Don't reference the `attached' global.
14472 (attach_inferior): Adjust to mywait interface changes.
14473 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14474 features. Handle and report "multiprocess+". Handle
14475 "qAttached:PID".
14476 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14477 changes.
14478 (handle_v_kill): New.
14479 (handle_v_stopped): Adjust to use target_pid_to_str.
14480 (handle_v_requests): Allow multiple attaches and runs when
14481 multiprocess extensions are in effect. Handle "vKill".
14482 (myresume): Adjust to use ptids.
14483 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14484 (handle_status): Adjust to discard_queued_stop_replies interface
14485 change.
14486 (first_thread_of, kill_inferior_callback)
14487 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14488 (main): Call initialize_inferiors. Adjust to use ptids, killing
14489 and detaching from all inferiors. Handle multiprocess packet
14490 variants.
14491 * linux-low.h: Include gdb_proc_service.h.
14492 (struct process_info_private): New.
14493 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14494 <lwpid_of>: Use ptid_get_lwp.
14495 (get_lwp_thread): Adjust.
14496 (struct lwp_info): Add `dead' member.
14497 (find_lwp_pid): Declare.
14498 * linux-low.c (thread_db_active): Delete.
14499 (new_inferior): Adjust comment.
14500 (inferior_pid): Delete.
14501 (linux_add_process): New.
14502 (handle_extended_wait): Adjust.
14503 (add_lwp): Change unsigned long to ptid.
14504 (linux_create_inferior): Add process to processes table. Adjust
14505 to use ptids. Don't set new_inferior here.
14506 (linux_attach_lwp): Rename to ...
14507 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14508 it. Adjust to use ptids.
14509 (linux_attach_lwp): New.
14510 (linux_attach): Add process to processes table. Don't set
14511 new_inferior here.
14512 (struct counter): New.
14513 (second_thread_of_pid_p, last_thread_of_process_p): New.
14514 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14515 multiple processes.
14516 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14517 processes. Remove process from process table.
14518 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14519 to multiple processes.
14520 (any_thread_of): New.
14521 (linux_detach): Add `pid' argument, and handle it. Remove process
14522 from processes table.
14523 (linux_join): Add `pid' argument. Handle it.
14524 (linux_thread_alive): Change unsighed long argument to ptid_t.
14525 Consider dead lwps as not being alive.
14526 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14527 threads we're not interested in.
14528 (same_lwp, find_lwp_pid): New.
14529 (linux_wait_for_lwp): Change `pid' argument's type from int to
14530 ptid_t. Adjust.
14531 (linux_wait_for_event): Rename to ...
14532 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14533 from int to ptid_t. Adjust.
14534 (linux_wait_for_event): New.
14535 (linux_wait_1): Add `ptid' argument. Change return type to
14536 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14537 that exit from the process table.
14538 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14539 Adjust.
14540 (mark_lwp_dead): New.
14541 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14542 stopping all threads, mark its main lwp as dead.
14543 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14544 ptids.
14545 (fetch_register, usr_store_inferior_registers)
14546 (regsets_fetch_inferior_registers)
14547 (regsets_store_inferior_registers, linux_read_memory)
14548 (linux_write_memory): Inline `inferior_pid'.
14549 (linux_look_up_symbols): Adjust to use per-process
14550 `thread_db_active'.
14551 (linux_request_interrupt): Adjust to use ptids.
14552 (linux_read_auxv): Inline `inferior_pid'.
14553 (initialize_low): Don't reference thread_db_active.
14554 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14555 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14556 (ps_getpid): Return the pid of the current inferior.
14557 * thread-db.c (proc_handle, thread_agent): Delete.
14558 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14559 per-process data.
14560 (find_one_thread): Change argument type to ptid_t. Adjust to
14561 per-process data.
14562 (maybe_attach_thread): Adjust to per-process data and ptids.
14563 (thread_db_find_new_threads): Ditto.
14564 (thread_db_init): Ditto.
14565 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14566 processes table. Adjust to use ptids.
14567 (spu_kill, spu_detach): Adjust interface. Remove process from
14568 processes table.
14569 (spu_join, spu_thread_alive): Adjust interface.
14570 (spu_wait): Adjust interface. Remove process from processes
14571 table. Adjust to use ptids.
14572 * win32-low.c (current_inferior_tid): Delete.
14573 (current_inferior_ptid): New.
14574 (debug_event_ptid): New.
14575 (thread_rec): Take a ptid. Adjust.
14576 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14577 (child_delete_thread): Ditto.
14578 (do_initial_child_stuff): Add `attached' argument. Add process to
14579 processes table.
14580 (child_fetch_inferior_registers, child_store_inferior_registers):
14581 Adjust.
14582 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14583 (win32_attach): Pass 1 to do_initial_child_stuff.
14584 (win32_kill): Adjust interface. Remove process from processes
14585 table.
14586 (win32_detach): Ditto.
14587 (win32_join): Adjust interface.
14588 (win32_thread_alive): Take a ptid.
14589 (win32_resume): Adjust to use ptids.
14590 (get_child_debug_event): Ditto.
14591 (win32_wait): Adjust interface. Remove exiting process from
14592 processes table.
14593
bd99dc85
PA
145942009-04-01 Pedro Alves <pedro@codesourcery.com>
14595
14596 Non-stop mode support.
14597
14598 * server.h (non_stop): Declare.
14599 (gdb_client_data, handler_func): Declare.
14600 (delete_file_handler, add_file_handler, start_event_loop):
14601 Declare.
14602 (handle_serial_event, handle_target_event, push_event)
14603 (putpkt_notif): Declare.
14604 * target.h (enum resume_kind): New.
14605 (struct thread_resume): Replace `step' field by `kind' field.
14606 (TARGET_WNOHANG): Define.
14607 (struct target_ops) <wait>: Add `options' argument.
14608 <supports_non_stop, async, start_non_stop>: New fields.
14609 (target_supports_non_stop, target_async): New.
14610 (start_non_stop): Declare.
14611 (mywait): Add `options' argument.
14612 * target.c (mywait): Add `options' argument. Print child exit
14613 notifications here.
14614 (start_non_stop): New.
14615 * server.c (non_stop, own_buf, mem_buf): New globals.
14616 (struct vstop_notif): New.
14617 (notif_queue): New global.
14618 (queue_stop_reply, push_event, discard_queued_stop_replies)
14619 (send_next_stop_reply): New.
14620 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14621 interface changes.
14622 (attach_inferior): In non-stop mode, don't wait for the target
14623 here.
14624 (handle_general_set): Handle QNonStop.
14625 (handle_query): When handling qC, return the current general
14626 thread, instead of the first thread of the list.
14627 (handle_query): If the backend supports non-stop mode, include
14628 QNonStop+ in the qSupported query response.
14629 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14630 and non-stop mode.
14631 (handle_v_attach, handle_v_run): Handle non-stop mode.
14632 (handle_v_stopped): New.
14633 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14634 (myresume): Adjust to use resume_kind. Handle non-stop.
14635 (queue_stop_reply_callback): New.
14636 (handle_status): Handle non-stop mode.
14637 (main): Clear non_stop flag on reconnection. Use the event-loop.
14638 Refactor serial protocol handling from here ...
14639 (process_serial_event): ... to this new function. When GDB
14640 selects any thread, select one here. In non-stop mode, wait until
14641 GDB acks all pending events before exiting.
14642 (handle_serial_event, handle_target_event): New.
14643 * remote-utils.c (remote_open): Install remote_desc in the event
14644 loop.
14645 (remote_close): Remove remote_desc from the event loop.
14646 (putpkt_binary): Rename to...
14647 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14648 (putpkt_binary): New as wrapper around putpkt_binary_1.
14649 (putpkt_notif): New.
14650 (prepare_resume_reply): In non-stop mode, don't change the
14651 general_thread.
14652 * event-loop.c: New.
14653 * Makefile.in (OBJ): Add event-loop.o.
14654 (event-loop.o): New rule.
14655
14656 * linux-low.h (pid_of): Moved here.
14657 (lwpid_of): New.
14658 (get_lwp_thread): Use lwpid_of.
14659 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14660 * linux-low.c (pid_of): Delete.
14661 (inferior_pid): Use lwpid_of.
14662 (linux_event_pipe): New.
14663 (target_is_async_p): New.
14664 (delete_lwp): New.
14665 (handle_extended_wait): Use lwpid_of.
14666 (add_lwp): Don't set lwpid field.
14667 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14668 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14669 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14670 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14671 first. Adjust to linux_wait_for_event interface changes. Use
14672 lwpid_of.
14673 (linux_detach): Don't delete the main lwp here.
14674 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14675 (status_pending_p): Don't consider explicitly suspended lwps.
14676 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14677 pointer. Add OPTIONS argument. Change return type to int. Use
14678 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14679 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14680 pointer. Add status pointer argument. Return a pid instead of a
14681 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14682 changes. In non-stop mode, don't switch to a random thread.
14683 (linux_wait): Rename to...
14684 (linux_wait_1): ... this. Add target_options argument, and handle
14685 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14686 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14687 clean exit and signal exit code. Don't stop all threads in
14688 non-stop mode. In all-stop mode, only stop all threads when
14689 reporting a stop to GDB. Handle explicit thread stop requests.
14690 (async_file_flush, async_file_mark): New.
14691 (linux_wait): New.
14692 (send_sigstop): Use lwpid_of.
14693 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14694 interface changes. In non-stop mode, don't switch to a random
14695 thread.
14696 (linux_resume_one_lwp): Use lwpid_of.
14697 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14698 (linux_resume_one_thread): ... this. Handle resume_stop. In
14699 non-stop mode, don't look for pending flag in all threads.
14700 (resume_status_pending_p): Don't consider explicitly suspended
14701 threads.
14702 (my_waitpid): Reimplement. Emulate __WALL.
14703 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14704 Use lwpid_of.
14705 (sigchld_handler, linux_supports_non_stop, linux_async)
14706 (linux_start_non_stop): New.
14707 (linux_target_ops): Register linux_supports_non_stop, linux_async
14708 and linux_start_non_stop.
14709 (initialize_low): Install SIGCHLD handler.
14710 * thread-db.c (thread_db_create_event, find_one_thread)
14711 (thread_db_get_tls_address): Use lwpid_of.
14712 * win32-low.c (win32_detach): Adjust to use resume_kind.
14713 (win32_wait): Add `options' argument.
14714 * spu-low.c (spu_resume): Adjust to use resume_kind.
14715 (spu_wait): Add `options' argument.
14716
5b1c542e
PA
147172009-04-01 Pedro Alves <pedro@codesourcery.com>
14718
14719 Decouple target code from remote protocol.
14720
14721 * target.h (enum target_waitkind): New.
14722 (struct target_waitstatus): New.
14723 (struct target_ops) <wait>: Return an unsigned long. Take a
14724 target_waitstatus pointer instead of a char pointer.
14725 (mywait): Likewise.
14726 * target.c (mywait): Change prototype to return an unsigned long.
14727 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14728 * server.h (thread_from_wait, old_thread_from_wait): Delete
14729 declarations.
14730 (prepare_resume_reply): Change prototype to take a
14731 target_waitstatus.
14732 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14733 (last_status, last_ptid): New.
14734 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14735 pid instead of a signal.
14736 (attach_inferior): Remove "status" and "signal" parameters.
14737 Adjust.
14738 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14739 not as an address.
14740 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14741 (handle_v_requests, myresume): Remove "status" and "signal"
14742 parameters. Adjust.
14743 (handle_status): New.
14744 (main): Delete local `status'. Adjust.
14745 * remote-utils.c: Include target.h.
14746 (prepare_resume_reply): Change prototype to take a
14747 target_waitstatus. Adjust.
14748
14749 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14750 interface.
14751 * spu-low.c (spu_wait): Adjust.
14752 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14753 Delete.
14754 (win32_wait): Adjust.
14755
2bd7c093
PA
147562009-04-01 Pedro Alves <pedro@codesourcery.com>
14757
14758 * target.h (struct thread_resume): Delete leave_stopped member.
14759 (struct target_ops): Add a `n' argument to the `resume' callback.
14760 * server.c (start_inferior): Adjust.
14761 (handle_v_cont, myresume): Adjust.
14762 * linux-low.c (check_removed_breakpoint): Adjust to resume
14763 interface change, and to removed leave_stopped field.
14764 (resume_ptr): Delete.
14765 (struct thread_resume_array): New.
14766 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14767 resume interface change.
14768 (linux_continue_one_thread, linux_queue_one_thread)
14769 (resume_status_pending_p): Check if the resume field is NULL
14770 instead of checking the leave_stopped member.
14771 (linux_resume): Adjust to the target resume interface change.
14772 * spu-low.c (spu_resume): Adjust to the target resume interface
14773 change.
14774 * win32-low.c (win32_detach, win32_resume): Ditto.
14775
c35fafde
PA
147762009-04-01 Pedro Alves <pedro@codesourcery.com>
14777
14778 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14779 flag.
14780 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14781 pending.
14782 (linux_continue_one_thread): Only preserve the stepping flag if
14783 there's a pending breakpoint.
14784
0a59d50b
PA
147852009-03-31 Pedro Alves <pedro@codesourcery.com>
14786
14787 * server.c (main): After the inferior having exited, call
14788 remote_close before exiting gdbserver.
14789
f04c6d38
TJB
147902009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14791
14792 Fix size of FPSCR in Power 7 processors.
14793 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14794 (PPC_FEATURE_HAS_DFP): New #define.
14795 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14796 size of the FPSCR.
14797
78e5cee6
PA
147982009-03-23 Pedro Alves <pedro@codesourcery.com>
14799
14800 * server.c (handle_query) Whitespace and formatting.
14801
1b3f6016
PA
148022009-03-22 Pedro Alves <pedro@codesourcery.com>
14803
14804 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14805 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14806 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14807 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14808 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14809 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14810 Makefile.in, configure.ac: Fix whitespace throughout.
14811 * configure: Regenerate.
14812
a07b2135
PA
148132009-03-22 Pedro Alves <pedro@codesourcery.com>
14814
14815 * inferiors.c (find_inferior): Make it safe for the callback
14816 function to delete the currently iterated inferior.
14817
67cc2626
PA
148182009-03-22 Pedro Alves <pedro@codesourcery.com>
14819
14820 * Makefile.in (linuw_low_h): Move higher.
14821 (thread-db.o): Depend on $(linux_low_h).
14822
54a0b537
PA
148232009-03-17 Pedro Alves <pedro@codesourcery.com>
14824
14825 Rename "process" to "lwp" throughout.
14826
14827 * linux-low.c (all_processes): Rename to...
14828 (all_lwps): ... this.
14829 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14830 (add_process): Rename to ...
14831 (add_lwp): ... this. Adjust.
14832 (linux_create_inferior): Adjust.
14833 (linux_attach_lwp): Adjust.
14834 (linux_attach): Adjust.
14835 (linux_kill_one_process): Rename to ...
14836 (linux_kill_one_lwp): ... this. Adjust.
14837 (linux_kill): Adjust.
14838 (linux_detach_one_process): Rename to ...
14839 (linux_detach_one_lwp): ... this. Adjust.
14840 (linux_detach): Adjust.
14841 (check_removed_breakpoint): Adjust.
14842 (status_pending_p): Adjust.
14843 (linux_wait_for_process): Rename to ...
14844 (linux_wait_for_lwp): ... this. Adjust.
14845 (linux_wait_for_event): Adjust.
14846 (send_sigstop): Adjust.
14847 (wait_for_sigstop): Adjust.
14848 (stop_all_processes): Rename to ...
14849 (stop_all_lwps): ... this.
14850 (linux_resume_one_process): Rename to ...
14851 (linux_resume_one_lwp): ... this. Adjust.
14852 (linux_set_resume_request, linux_continue_one_thread)
14853 (linux_queue_one_thread, resume_status_pending_p)
14854 (usr_store_inferior_registers, regsets_store_inferior_registers)
14855 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14856 Adjust.
14857 * linux-low.h (get_process): Rename to ...
14858 (get_lwp): ... this. Adjust.
14859 (get_thread_process): Rename to ...
14860 (get_thread_lwp): ... this. Adjust.
14861 (get_process_thread): Rename to ...
14862 (get_lwp_thread): ... this. Adjust.
14863 (struct process_info): Rename to ...
14864 (struct lwp_info): ... this.
14865 (all_processes): Rename to ...
14866 (all_lwps): ... this.
14867 * proc-service.c (ps_lgetregs): Adjust.
14868 * thread-db.c (thread_db_create_event, find_one_thread)
14869 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14870
0b16c5cf
PA
148712009-03-14 Pedro Alves <pedro@codesourcery.com>
14872
14873 * server.c (handle_query): Handle "qAttached".
14874
32de4b9d
NS
148752009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14876
14877 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14878 GPLv3, update license URL.
14879
2aecd87f
DE
148802009-03-01 Doug Evans <dje@google.com>
14881
93efd302 14882 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14883 (server_h): Add gdb_signals.h.
14884 (signals.o): Update.
14885 * server.h (target_signal_from_host,target_signal_to_host_p)
14886 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14887
86b1f9c5
PM
148882009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14889
14890 * remote-utils.c (getpkt): Also generate remote-debug
14891 information if noack_mode is set.
14892
4aa995e1
PA
148932009-02-06 Pedro Alves <pedro@codesourcery.com>
14894
14895 * server.c (handle_query): Report qXfer:siginfo:read and
14896 qXfer:siginfo:write as supported and handle them.
14897 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14898 * linux-low.c (linux_xfer_siginfo): New.
14899 (linux_target_ops): Set it.
14900
62709adf
PA
149012009-01-26 Pedro Alves <pedro@codesourcery.com>
14902
14903 * server.c (gdbserver_usage): Mention --remote-debug.
14904 (main): Accept '--remote-debug' switch.
14905
aef93bd7
DE
149062009-01-18 Doug Evans <dje@google.com>
14907
14908 * regcache.c (new_register_cache): No need to check result of xcalloc.
14909 * server.c (handle_search_memory): Back out calls to xmalloc,
14910 result is checked and error is returned to user upon failure.
14911 (handle_query): Ditto. Add more checks for result of malloc.
14912 (handle_v_cont): Check result of malloc, report error back to
14913 user upon failure.
14914 (handle_v_run): Ditto. Call freeargv.
14915 * server.h (freeargv): Declare.
14916 * utils.c (freeargv): New fn.
14917
54363045
DE
149182009-01-15 Doug Evans <dje@google.com>
14919
f626972c
DE
14920 * gdbreplay.c (perror_with_name): Make arg const char *.
14921 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14922 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14923 * utils.c (perror_with_name): Make arg const char *.
54363045 14924
18aae699
PA
149252009-01-14 Pedro Alves <pedro@codesourcery.com>
14926
14927 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14928 when handling a EXIT_PROCESS_DEBUG_EVENT.
14929
ff703abe
JB
149302009-01-06 Joel Brobecker <brobecker@adacore.com>
14931
14932 * gdbreplay.c (gdbreplay_version): Update copyright year.
14933 * server.c (gdbserver_version): Likewise.
14934
f21cc1a2 149352009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14936
14937 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14938 (handle_extended_wait): Improve comment.
0e21c1ec 14939
bca929d3
DE
149402008-12-13 Doug Evans <dje@google.com>
14941
14942 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14943 * server.h (ATTR_MALLOC): New macro.
14944 (xmalloc,xcalloc,xstrdup): Declare.
14945 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14946 * inferiors.c: Ditto.
14947 * linux-low.c: Ditto.
14948 * mem-break.c: Ditto.
14949 * regcache.c: Ditto.
14950 * remote-utils.c: Ditto.
14951 * server.c: Ditto.
14952 * target.c: Ditto.
14953 * win32-low.c: Ditto.
14954
97438e3f
DE
149552008-12-12 Doug Evans <dje@google.com>
14956
896c7fbb
DE
14957 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14958 in debugging printf.
14959
97438e3f
DE
14960 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14961
e3b886f8
DE
149622008-12-09 Doug Evans <dje@google.com>
14963
14964 * linux-low.h (struct process_info): Delete member tid, unused.
14965 * thread-db.c (find_one_thread): Update.
14966 (maybe_attach_thread): Update.
14967
07e059b5
VP
149682008-12-02 Pedro Alves <pedro@codesourcery.com>
14969
889bf7c5
PA
14970 * target.h (struct target_ops): Add qxfer_osdata member.
14971 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14972 and dirent.h.
14973 (linux_qxfer_osdata): New functions.
14974 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14975 callback.
14976 * server.c (handle_query): Handle "qXfer:osdata:read:".
14977 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14978 (buffer_xml_printf): New functions.
14979 * server.h (struct buffer): New.
14980 (buffer_grow_str, buffer_grow_str0): New macros.
14981 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14982 (buffer_xml_printf): Declare.
07e059b5 14983
4cab47ab
DE
149842008-11-24 Doug Evans <dje@google.com>
14985
14986 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14987
f142445f
DJ
149882008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14989
14990 * server.c (handle_v_run): Always use the supplied argument list.
14991
d0107bb6 149922008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14993
d0107bb6
BW
14994 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14995 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14996
2c4ad781
TJB
149972008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14998
14999 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15000 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15001 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15002 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15003 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15004 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15005 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15006 XML target descriptions.
15007 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15008 when inferior is running on an ISA 2.05 or later processor. Add
15009 special case to return offset for full 64-bit slot of FPSCR when
15010 in 32-bits.
15011
dfb64f85
DJ
150122008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15013
15014 * Makefile.in (SFILES, clean): Added sparc64 files.
15015 (reg-sparc64.o, reg-sparc64.c): New.
15016 * configure.srv (sparc*-*-linux*): New configuration.
15017 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15018 syscall arguments for SPARC.
15019 (regsets_store_inferior_registers): Likewise.
15020 * linux-sparc-low.c: New file.
15021
66b6e1dd
DE
150222008-10-21 Doug Evans <dje@google.com>
15023
15024 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15025 (READLINE_DIR,READLINE_DEP): Delete.
15026 (INTERNAL_CFLAGS): Update.
15027 (LINTFLAGS): Update.
15028
9b710a42
PA
150292008-10-10 Pedro Alves <pedro@codesourcery.com>
15030
15031 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15032 whole argv from the last run, not just argv[0].
15033
5822d809
PA
150342008-09-08 Pedro Alves <pedro@codesourcery.com>
15035
15036 * regcache.c (new_register_cache): Return NULL if the register
15037 cache size isn't known yet.
15038 (free_register_cache): Avoid dereferencing a NULL regcache.
15039
74aac56f
DJ
150402008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15041
15042 * configure.srv: Merge MIPS and MIPS64.
15043
400b20f5
MR
150442008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15045
15046 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15047
677c5bb1
LM
150482008-08-18 Luis Machado <luisgpm@br.ibm.com>
15049
15050 * Makefile.in: Add required vsx dependencies.
15051
15052 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15053 Declare init_registers_powerpc_vsx32l.
15054 Declare init_registers_powerpc_vsx64l.
15055 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15056 (ppc_arch_setup): Check for VSX in hwcap.
15057 (ppc_fill_vsxregset): New function.
15058 (ppc_store_vsxregset): New function.
15059 Add new VSX entry in regset_info target_regsets.
15060
15061 * configure.srv: Add new VSX dependencies.
15062
a6f3e723
SL
150632008-08-12 Pedro Alves <pedro@codesourcery.com>
15064
15065 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15066 (remote_open): Set or clear transport_is_reliable.
15067 (putpkt_binary): Don't expect acks in noack mode.
15068 (getpkt): Don't send ack/nac in noack mode.
15069 * server.c (handle_general_set): Handle QStartNoAckMode.
15070 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15071 qSupported.
15072 (main): Reset noack_mode on every connection.
15073 * server.h (noack_mode): Declare.
15074
a417dc56
RW
150752008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15076
15077 * Makefile.in (GDBREPLAY_OBS): New variable.
15078 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15079
3221518c
UW
150802008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15081 Daniel Jacobowitz <dan@codesourcery.com>
15082
15083 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15084 (usr_store_inferior_registers): Likewise.
15085 (regsets_store_inferior_registers): Likewise.
15086
ec56be1b
PA
150872008-07-31 Rolf Jansen <rj@surtec.com>
15088 Pedro Alves <pedro@codesourcery.com>
15089
15090 * configure.ac: Check for memmem declaration.
15091 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15092 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15093 (disable_packet_qfThreadInfo): Unconditionally compile.
15094 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15095 * configure, config.in: Regenerate.
15096
2fe5e3ff
DE
150972008-07-28 Doug Kwan <dougkwan@google.com>
15098
15099 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15100 (linux_write_memory): Remove declaration of errno.
15101
836acd6d
UW
151022008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15103
15104 * linux-low.c (handle_extended_wait): Do not use "status"
15105 variable uninitialized.
15106
aeba519e
PA
151072008-07-07 Pedro Alves <pedro@codesourcery.com>
15108
15109 * server.c (handle_v_attach): Inhibit reporting dll changes.
15110
db42f210
PA
151112008-06-27 Pedro Alves <pedro@codesourcery.com>
15112
15113 * remote-utils.c (prepare_resume_reply): If requested, don't
15114 output "thread:TID" in the T stop reply.
15115
15116 * server.c (disable_packet_vCont, disable_packet_Tthread)
15117 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15118 (handle_query): If requested, disable support for qC, qfThreadInfo
15119 and qsThreadInfo.
15120 (handle_v_requests): If requested, disable support for vCont.
15121 (gdbserver_show_disableable): New.
15122 (main): Handle --disable-packet and --disable-packet=LIST.
15123
15124 * server.h (disable_packet_vCont, disable_packet_Tthread)
15125 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15126
8e4c5421
CD
151272008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15128
15129 * server.c (gdbserver_usage): Mention --version.
15130
6e23a804
DJ
151312008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15132
15133 * Makefile.in (gdbreplay.o): New rule.
15134
90aa6a40
JM
151352008-06-06 Joseph Myers <joseph@codesourcery.com>
15136
15137 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15138 message, not gdbserver.
15139
c16158bc 151402008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15141 Nathan Sidwell <nathan@codesourcery.com>
15142 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15143
15144 * acinclude.m4: Include ../../config/acx.m4.
15145 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15146 * configure, config.in: Regenerate.
15147 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15148 * server.c (gdbserver_version): Print PKGVERSION.
15149 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15150 (main): Adjust gdbserver_usage calls.
15151 * gdbreplay.c (version, host_name): Add declarations.
15152 (gdbreplay_version, gdbreplay_usage): New.
15153 (main): Accept --version and --help options.
15154
aeb75bf5
DJ
151552008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15156
15157 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15158 (arm_breakpoint_at): Handle Thumb.
15159 (the_low_target): Add comment.
15160
76b233dd
UW
151612008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15162
15163 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15164
08388c79
DE
151652008-05-09 Doug Evans <dje@google.com>
15166
a3c83fae
DE
15167 * server.h (decode_search_memory_packet): Declare.
15168 * remote-utils.c (decode_search_memory_packet): New fn.
15169 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15170 (handle_search_memory): New fn.
15171 (handle_query): Process qSearch:memory packets.
15172
bb9c3d36
UW
151732008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15174
15175 * regcache.c (registers_length): Remove.
15176 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15177 full register packet.
15178 * regcache.h (registers_length): Remove prototype.
15179 * server.h (PBUFSIZ): Define to 16384.
15180
7284e1be
UW
151812008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15182
15183 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15184 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15185 powerpc-64l.o, and powerpc-altivec64l.o.
15186 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15187 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15188 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15189 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15190 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15191 to srv_xmlfiles.
15192
15193 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15194 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15195 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15196 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15197 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15198 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15199 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15200 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15201 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15202 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15203 (clean): Update.
15204
15205 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15206 (init_registers_powerpc_32l): ... this new prototype.
15207 (init_registers_powerpc_32): Remove, replace by ...
15208 (init_registers_powerpc_altivec32l): ... this new prototype.
15209 (init_registers_powerpc_e500): Remove, replace by ...
15210 (init_registers_powerpc_e500l): ... this new prototype.
15211 (init_registers_ppc64): Remove, replace by ...
15212 (init_registers_powerpc_64l): ... this new prototype.
15213 (init_registers_powerpc_64): Remove, replace by ...
15214 (init_registers_powerpc_altivec64l): ... this new prototype.
15215 (ppc_num_regs): Set to 73.
15216 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15217 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15218 (ppc_cannot_store_register): Handle orig_r3 and trap.
15219 (ppc_arch_setup): Update init_registers_... calls.
15220 (ppc_fill_gregset): Handle orig_r3 and trap.
15221
15222 * inferiors.c (clear_inferiors): Reset current_inferior.
15223
fdc59709
PB
152242008-04-23 Paolo Bonzini <bonzini@gnu.org>
15225
889bf7c5
PA
15226 * acinclude.m4: Add override.m4.
15227 * configure: Regenerate.
fdc59709 15228
c9b2f845
UW
152292008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15230
15231 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15232 initial call to init_register_ppc64.
15233
550512b8
UW
152342008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15235
43aaf8b6
PA
15236 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15237 single powerpc*-*-linux* case.
550512b8
UW
15238 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15239
b6430ec3
UW
152402008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15241
15242 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15243 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15244 from reg_xmlfiles.
15245 * linux-ppc-low.c: Include <elf.h>.
15246 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15247 (ppc_hwcap): New global variable.
15248 (ppc_regmap): Remove __SPE__ #ifdef sections.
15249 (ppc_regmap_e500): New global variable.
15250 (ppc_cannot_store_register): Update __SPE__ special case.
15251 (ppc_get_hwcap): New function.
15252 (ppc_arch_setup): Use it to determine whether inferior supports
15253 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15254 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15255 Do not access registers if target does not support AltiVec.
15256 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15257 Do not access registers if target does not support SPE.
15258 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15259
52fa2412
UW
152602008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15261
15262 * linux-low.c (disabled_regsets, num_regsets): New.
15263 (use_regsets_p): Delete.
15264 (linux_wait_for_process): Clear disabled_regsets.
15265 (regsets_fetch_inferior_registers): Check and set it.
15266 (regsets_store_inferior_registers): Likewise.
15267 (linux_fetch_registers, linux_store_registers): Do not use
15268 use_regsets_p.
15269 (initialize_low): Allocate disabled_regsets.
15270
e28b3332
DJ
152712008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15272
15273 * Makefile.in (LIBOBJS): New.
15274 (OBS): Use LIBOBJS.
15275 (memmem.o): New rule.
15276 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15277 * configure: Regenerated.
15278
4536995d
UW
152792008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15280
15281 * server.c (handle_query): Never return "unsupported" for
15282 qXfer:features:read queries.
15283
221c031f
UW
152842008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15285
15286 * server.c (get_features_xml): Fix inverted condition.
15287 (handle_query): Always support qXfer:feature:read.
15288
ccd213ac
DJ
152892008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15290
15291 * server.c (wrapper_argv): New.
15292 (start_inferior): Handle wrapper_argv. If set, expect an extra
15293 trap.
15294 (gdbserver_usage): Document --wrapper.
15295 (main): Parse --wrapper.
15296
6fe305f7
UW
152972008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15298
15299 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15300 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15301 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15302 (ppc_set_pc): Likewise.
15303 (ppc_arch_setup): New function.
15304 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15305 of collect_register.
889bf7c5 15306 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15307
5b0a002e
UW
153082008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15309
15310 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15311 instead of linux-ppc64-low.o.
15312 * linux-ppc64-low.c: Remove file.
15313 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15314 (linux-ppc64-low.o): Remove rule.
15315
15316 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15317 (init_registers_powerpc_64): Likewise.
15318 (ppc_regmap): Conditionally define depending on __powerpc64__.
15319 (ppc_cannot_store_register): Do not special-case "fpscr" when
15320 compiled on __powerpc64__.
15321 (ppc_collect_ptrace_register): New function.
15322 (ppc_supply_ptrace_register): New function.
15323 (ppc_breakpoint): Change type to "unsigned int".
15324 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15325 (the_low_target): Conditionally provide initializers for the
889bf7c5 15326 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15327 collect_ptrace_register and supply_ptrace_register members.
15328
9b4b61c8
UW
153292008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15330
15331 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15332 * server.c (gdbserver_xmltarget): Define.
15333 (get_features_xml): Use it to replace "target.xml" and arch_string.
15334
15335 * configure.srv: Remove srv_xmltarget. Add XML files that were
15336 mentioned there to srv_xmlfiles instead. Remove conditional tests
15337 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15338 srv_xmlfiles and srv_regobj to include all possible choices.
15339 * configure.ac (srv_xmltarget): Remove.
15340 (srv_xmlfiles): Do not add "target.xml".
15341 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15342 checks for supplementary target information.
15343 * configure: Regenerate.
15344 * Makefile.in (XML_TARGET): Remove.
15345 (target.xml): Remove rule.
15346 (clean): Do not clean up target.xml.
15347 (.PRECIOUS): Do not mention target.xml.
15348
15349 * target.h (struct target_ops): Remove arch_string member.
15350 * linux-low.c (linux_arch_string): Remove.
15351 (linux_target_ops): Remove arch_string initializer.
15352 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15353 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15354 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15355 * spu-low.c (spu_arch_string): Remove.
15356 (spu_target_ops): Remove arch_string initializer.
15357 * win32-low.c (win32_arch_string): Remove.
15358 (win32_target_ops): Remove arch_string initializer.
15359 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15360 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15361 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15362
ee1a7ae4
UW
153632008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15364
15365 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15366 by collect_ptrace_register and supply_ptrace_register hooks.
15367 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15368 instead of checking for the_low_target.left_pad_xfer.
15369 (usr_store_inferior_registers): Use collect_ptrace_register callback
15370 instead of checking for the_low_target.left_pad_xfer.
15371
15372 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15373 (s390_supply_ptrace_register): Likewise.
15374 (s390_fill_gregset): Call s390_collect_ptrace_register.
15375 (the_low_target): Update.
15376
15377 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15378 (ppc_supply_ptrace_register): Likewise.
15379 (the_low_target): Update.
15380
15381 * linux-i386-low.c (the_low_target): Update.
15382 * linux-x86-64-low.c (the_low_target): Update.
15383
d61ddec4
UW
153842008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15385
15386 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15387 reg-s390.o and reg-s390x.o.
15388
15389 * linux-low.c (new_inferior): New global variable.
15390 (linux_create_inferior, linux_attach): Set it.
15391 (linux_wait_for_process): Call the_low_target.arch_setup after the
15392 target has stopped for the first time.
15393 (initialize_low): Do not call the_low_target.arch_setup.
15394
15395 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15396 (s390_set_pc): Likewise.
15397 (s390_arch_setup): New function.
15398 (the_low_target): Use s390_arch_setup as arch_setup routine.
15399
15400 * regcache.c (realloc_register_cache): New function.
15401 (set_register_cache): Call it for each existing regcache.
15402
d05b4ac3
UW
154032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15404
15405 * server.h (init_registers): Remove prototype.
15406
15407 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15408 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15409 instead of init_registers ().
15410 * linux-arm-low.c (init_registers_arm): Add prototype.
15411 (init_registers_arm_with_iwmmxt): Likewise.
15412 (the_low_target): Add initializer for arch_setup field.
15413 * linux-cris-low.c (init_registers_cris): Add prototype.
15414 (the_low_target): Add initializer for arch_setup field.
15415 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15416 (the_low_target): Add initializer for arch_setup field.
15417 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15418 (the_low_target): Add initializer for arch_setup field.
15419 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15420 (the_low_target): Add initializer for arch_setup field.
15421 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15422 (the_low_target): Add initializer for arch_setup field.
15423 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15424 (the_low_target): Add initializer for arch_setup field.
15425 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15426 (init_registers_mips64_linux): Likewise.
15427 (the_low_target): Add initializer for arch_setup field.
15428 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15429 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15430 (the_low_target): Add initializer for arch_setup field.
15431 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15432 (init_registers_powerpc_64): Likewise.
15433 (the_low_target): Add initializer for arch_setup field.
15434 * linux-s390-low.c (init_registers_s390): Add prototype.
15435 (init_registers_s390x): Likewise.
15436 (the_low_target): Add initializer for arch_setup field.
15437 * linux-sh-low.c (init_registers_sh): Add prototype.
15438 (the_low_target): Add initializer for arch_setup field.
15439 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15440 (the_low_target): Add initializer for arch_setup field.
15441 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15442 (the_low_target): Add initializer for arch_setup field.
15443
15444 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15445 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15446 instead of init_registers ().
15447 * win32-arm-low.c (init_registers_arm): Add prototype.
15448 (the_low_target): Add initializer for arch_setup field.
15449 * win32-i386-low.c (init_registers_i386): Add prototype.
15450 (the_low_target): Add initializer for arch_setup field.
15451
15452 * spu-low.c (init_registers_spu): Add prototype.
15453 (initialize_low): Call initialie_registers_spu () instead of
15454 initialize_registers ().
15455
fd96d250
PA
154562008-02-19 Pedro Alves <pedro@codesourcery.com>
15457
15458 * server.c (handle_v_requests): When handling the vRun and vAttach
15459 packets, if already debugging a process, don't kill it. Return an
15460 error instead.
15461
d41b6bb4
DJ
154622008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15463
15464 * server.c (handle_query): Correct length check.
15465
5ac588cf
PA
154662008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15467
15468 * win32-low.c (do_initial_child_stuff): Add process handle
15469 parameter. Set current_process_handle and current_process_id from the
15470 parameters. Clear globals.
15471 (win32_create_inferior): Don't set current_process_handle and
15472 current_process_id here. Instead pass them on the call to
15473 do_initial_child_stuff.
15474 (win32_attach): Likewise.
15475 (win32_clear_inferiors): New.
15476 (win32_kill): Don't close the current process handle or the
15477 current thread handle here. Instead call win32_clear_inferiors.
15478 (win32_detach): Don't open a new handle to the process. Call
15479 win32_clear_inferiors.
15480 (win32_join): Don't rely on current_process_handle; open a new
15481 handle using the process id.
15482 (win32_wait): Call win32_clear_inferiors when the inferior process
15483 has exited.
15484
ecd7ecbc
DJ
154852008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15486
15487 * server.c (monitor_show_help): Add "exit".
15488
1525d545
MG
154892008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15490
ecd7ecbc 15491 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15492 (clean): Add reg-xtensa.c.
15493 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15494 * configure.srv (xtensa*-*-linux*) New target.
15495 * linux-xtensa-low.c: New.
15496 * xtensa-xtregs.c: New.
1525d545 15497
59a016f0
PA
154982008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15499
15500 * hostio.c: Don't include errno.h.
15501 (errno_to_fileio_errno): Move to hostio-errno.
15502 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15503 error number outputting to the target->hostio_last_error callback.
15504 (hostio_packet_error): Use FILEIO_EINVAL directly.
15505 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15506 calls to hostio_error.
15507 * hostio-errno.c: New.
15508 * server.h (hostio_last_error_from_errno): Declare.
15509 * target.h (target_ops): Add hostio_last_error member.
15510 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15511 as hostio_last_error handler.
889bf7c5 15512 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15513 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15514 (wince_hostio_last_error): New functions.
15515 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15516 as hostio_last_error handler.
15517 (win32_target_ops) [!_WIN32_WCE]: Register
15518 hostio_last_error_from_errno as hostio_last_error handler.
15519 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15520 (hostio-errno.o): New rule.
15521 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15522 * configure.srv (srv_hostio_err_objs): New variable. Default to
15523 hostio-errno.o.
15524 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15525 * configure: Regenerate.
15526
2d717e4f
DJ
155272008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15528
15529 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15530 (linux_kill, linux_detach): Clean up the process list.
15531 * remote-utils.c (remote_open): Improve port number parsing.
15532 (putpkt_binary, input_interrupt): Only send interrupts if the target
15533 is running.
15534 * server.c (extended_protocol): Make static.
15535 (attached): Define earlier.
15536 (exit_requested, response_needed, program_argv): New variables.
15537 (target_running): New.
15538 (start_inferior): Clear attached here.
15539 (attach_inferior): Set attached here.
15540 (require_running): Define.
15541 (handle_query): Use require_running and target_running. Implement
15542 "monitor exit".
15543 (handle_v_attach, handle_v_run): New.
15544 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15545 (gdbserver_usage): Update.
15546 (main): Redo argument parsing. Handle --debug and --multi. Handle
15547 --attach along with other options or after the port. Save
15548 program_argv. Support no initial program. Resynchronize
15549 communication with GDB after an error. Handle "monitor exit".
15550 Use require_running and target_running. Always allow the extended
15551 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15552 restart in extended mode.
15553 * README: Refer to the GDB manual. Update --attach usage.
15554
7407e2de
AS
155552007-12-20 Andreas Schwab <schwab@suse.de>
15556
15557 * linux-low.c (STACK_SIZE): Define.
15558 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15559 (linux_test_for_tracefork): Likewise.
15560
b65d95c5
DJ
155612007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15562
15563 * linux-low.c (linux_wait_for_event): Update messages. Do not
15564 reinsert auto-delete breakpoints.
15565 * mem-break.c (struct breakpoint): Change return type of handler to
15566 int.
15567 (set_breakpoint_at): Update handler type.
15568 (reinsert_breakpoint_handler): Return 1 instead of calling
15569 delete_breakpoint.
15570 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15571 setting a new one.
15572 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15573 * mem-break.h (set_breakpoint_at): Update handler type.
15574 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15575 * win32-low.c (auto_delete_breakpoint): New.
15576 (get_child_debug_event): Use it.
15577
4e799345
DJ
155782007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15579
15580 * configure.ac: Check for pread and pwrite.
15581 * hostio.c (handle_pread): Fall back to lseek and read.
15582 (handle_pwrite): Fall back to lseek and write.
15583 * config.in, configure: Regenerated.
15584
27524b67
DJ
155852007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15586
15587 * server.c (myresume): Add own_buf argument.
15588 (main): Update calls.
15589
a20d5e98
DJ
155902007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15591
15592 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15593 * remote-utils.c (remote_open): Do not call disable_async_io.
15594 (block_async_io): Delete.
15595 (unblock_async_io): Make static.
15596 (initialize_async_io): New.
15597 * server.c (handle_v_cont): Handle async I/O here.
15598 (myresume): Likewise. Move other common resume tasks here...
15599 (main): ... from here. Call initialize_async_io. Disable async
15600 I/O before the main loop.
15601 * server.h (initialize_async_io): Declare.
15602 (block_async_io, unblock_async_io): Delete prototypes.
15603 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15604
b79d787e
DJ
156052007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15606
15607 * remote-utils.c (readchar): Allow binary data in received messages.
15608
d97903b2
PA
156092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15610
15611 * win32-low.c (attaching): New global.
15612 (win32_create_inferior): Clear the `attaching' global.
15613 (win32_attach): Set the `attaching' global.
15614 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15615 attaching. Only set a breakpoint at the entry point if not
15616 attaching.
15617
311de423
PA
156182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15619
15620 * server.c (main): Don't report dll events on the initial
15621 connection on attaches.
15622
6c2d16d2
PA
156232007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15624
15625 * server.c (main): Relax numerical bases supported for the pid of
15626 the --attach command line argument.
15627
5ca906e6
PA
156282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15629
15630 * win32-low.c (win32_attach): Call OpenProcess before
15631 DebugActiveProcess, not after. Add last error output to error
15632 call.
15633
9c6c8194
PA
156342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15635
15636 * win32-low.c (win32_get_thread_context)
15637 (win32_set_thread_context): New functions.
15638 (thread_rec): Use win32_get_thread_context.
15639 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15640 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15641 field.
15642
4d5d1aaa
PA
156432007-12-03 Leo Zayas
15644 Pedro Alves <pedro_alves@portugalmail.pt>
15645
15646 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15647 global variables.
15648 (child_add_thread): Minor cleanup.
15649 (child_continue): Resume artificially suspended threads before
15650 calling ContinueDebugEvent.
15651 (suspend_one_thread): New.
15652 (fake_breakpoint_event): New.
15653 (get_child_debug_event): Change return type to int. Check here if
15654 gdb sent an interrupt request. If a soft interrupt was requested,
15655 fake a breakpoint event. Return 0 if there is no event to handle,
15656 and 1 otherwise.
15657 (win32_wait): Don't check here if gdb sent an interrupt request.
15658 Ensure there is a valid event to handle.
15659 (win32_request_interrupt): Add soft interruption method as last
15660 resort.
15661
c436e841
PA
156622007-12-03 Leo Zayas
15663 Pedro Alves <pedro_alves@portugalmail.pt>
15664
15665 * win32-low.h (win32_thread_info): Add descriptions to the
15666 structure members. Replace `suspend_count' counter by a
15667 `suspended' flag.
15668 * win32-low.c (thread_rec): Update condition of when to get the
15669 context from the inferior. Rely on ContextFlags being set if it
15670 has already been retrieved. Only suspend the inferior thread if
15671 we haven't already. Warn if that fails.
15672 (continue_one_thread): s/suspend_count/suspended/. Only call
15673 ResumeThread once. Warn if that fails.
15674
e7b5fa67
PA
156752007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15676
15677 * win32-low.c (win32_wait): Don't read from the inferior when it
15678 has already exited.
15679
a385171d
PA
156802007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15681
15682 * Makefile.in (win32_low_h): New variable.
15683 (win32-low.o): Add dependency on $(win32_low_h).
15684 (win32-arm-low.o, win32-i386-low.o): New rules.
15685
f80c84b3
DJ
156862007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15687
15688 * hostio.c: Correct copyright year.
15689
a6b151f1
DJ
156902007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15691
15692 * Makefile.in (OBS): Add hostio.o.
15693 (hostio.o): New rule.
15694 * server.h (handle_vFile): Declare.
15695 * hostio.c: New file.
15696 * server.c (handle_v_requests): Take packet_len and new_packet_len
15697 for binary packets. Call handle_vFile.
15698 (main): Update call to handle_v_requests.
15699
f9387fc3
DJ
157002007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15701
15702 * linux-low.c: Include <sched.h>.
15703
51c2684e
DJ
157042007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15705
15706 * linux-low.c (linux_tracefork_grandchild): New.
15707 (linux_tracefork_child): Use clone.
15708 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15709
75f83163
JB
157102007-10-31 Joel Brobecker <brobecker@adacore.com>
15711
15712 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15713
da5898ce
DJ
157142007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15715
15716 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15717
24a09b5f
DJ
157182007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15719
15720 * inferiors.c (change_inferior_id): Delete.
15721 (add_pid_to_list, pull_pid_from_list): New.
15722 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15723 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15724 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15725 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15726 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15727 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15728 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15729 (using_threads): Always set to 1.
15730 (handle_extended_wait): New.
15731 (add_process): Do not set TID.
15732 (linux_create_inferior): Set must_set_ptrace_flags.
15733 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15734 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15735 (linux_thread_alive): Rename TID argument to LWPID.
15736 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15737 (linux_wait_for_event): Do not use TID or check using_threads. Update
15738 call to dead_thread_notify. Call handle_extended_wait.
15739 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15740 (send_sigstop): Delete sigstop_sent.
15741 (wait_for_sigstop): Avoid TID.
15742 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15743 (linux_test_for_tracefork): New.
15744 (linux_lookup_signals): Use thread_db_active and
15745 linux_supports_tracefork_flag.
15746 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15747 * linux-low.h (get_process_thread): Avoid TID.
15748 (struct process_ifo): Move thread_known and tid to the end. Remove
15749 sigstop_sent.
15750 (linux_attach_lwp, thread_db_init): Update prototypes.
15751 * server.h (change_inferior_id): Delete prototype.
15752 (add_pid_to_list, pull_pid_from_list): New prototypes.
15753 * thread-db.c (thread_db_use_events): New.
15754 (find_first_thread): Rename to...
15755 (find_one_thread): ...this. Update callers and messages. Do not
15756 call fatal. Check thread_db_use_events. Do not call
15757 change_inferior_id or new_thread_notify.
15758 (maybe_attach_thread): Update. Do not call new_thread_notify.
15759 (thread_db_init): Set thread_db_use_events. Check use_events.
15760 * utils.c (fatal, warning): Correct message prefix.
15761
30ed0a8f
DJ
157622007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15763
15764 * Makefile.in (clean): Remove new files.
15765 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15766 (powerpc-64.o, powerpc-64.c): New rules.
15767 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15768 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15769 with SPE.
15770 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15771 SPE targets.
15772 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15773 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15774 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15775 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15776 (target_regsets): Add AltiVec and SPE register sets.
15777 * configure.ac: Check for AltiVec and SPE.
15778 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15779 (ppc_fill_vrregset, ppc_store_vrregset): New.
15780 (target_regsets): Add AltiVec register set.
15781 * configure: Regenerated.
15782
fd462a61
DJ
157832007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15784
15785 * linux-low.c (O_LARGEFILE): Define.
15786 (linux_read_memory): Use /proc/PID/mem.
15787 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15788 * configure, config.in: Regenerated.
15789
69f223ed
DJ
157902007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15791
15792 * linux-low.c (linux_wait_for_event): Do not pass signals while
15793 single-stepping.
15794
aec18585
PA
157952007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15796
15797 * win32-low.c (create_process): New.
15798 (win32_create_inferior): Use create_process instead of
15799 CreateProcess. If create_process failed retry appending an ".exe"
15800 suffix. Store the GetLastError result immediatelly after
15801 create_process calls and use it on the call to error.
15802
34d86ddd
PA
158032007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15804
15805 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15806
5a0e3bd0
JB
158072007-08-23 Joel Brobecker <brobecker@adacore.com>
15808
15809 * configure.ac: Switch license to GPLv3.
15810
f88c79e6
MS
158112007-08-01 Michael Snyder <msnyder@access-company.com>
15812
15813 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15814
6b3d9b83
PA
158152007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15816
15817 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15818 typedef.
15819 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15820 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15821 CloseToolhelp32Snapshot.
15822 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15823 CloseToolhelp32Snapshot.
15824
c588c53c
MS
158252007-07-27 Michael Snyder <michael.snyder@access-company.com>
15826
15827 * server.c (main): Check for inferior exit before main loop.
15828
aa0403d9
PA
158292007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15830
15831 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15832 instead of on tmp_desc.
15833
255e7678
DJ
158342007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15835 Daniel Jacobowitz <dan@codesourcery.com>
15836
15837 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15838 (add_thread): Minor cleanups.
15839 (clear_inferiors): Move lower in the file. Clear the DLL
15840 list.
15841 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15842 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15843 (xml_escape_text): New.
15844 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15845 for qSupported.
15846 (handle_v_cont): Report errors.
15847 (gdbserver_version): Update.
15848 (main): Correct size of own_buf. Do not report initial DLL events.
15849 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15850 (unloaded_dll, xml_escape_text): New.
15851 * win32-low.c (enum target_waitkind): Update comments.
15852 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15853 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15854 (win32_EnumProcessModules, win32_GetModuleInformation)
15855 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15856 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15857 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15858 (win32_Module32First, win32_Module32Next, load_toolhelp)
15859 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15860 (get_child_debug_event): Handle DLL events.
15861 (win32_wait): Likewise.
15862
0d37add9
DJ
158632007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15864
15865 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15866 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15867
45e2715e
PA
158682007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15869
15870 * win32-low.c (handle_output_debug_string): Ignore event if not
15871 waiting.
15872
c5674cf1
PA
158732007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15874
15875 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15876
2bbe3cc1
DJ
158772007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15878
15879 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15880
ae13219e
DJ
158812007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15882
15883 * inferiors.c (change_inferior_id): Add comment.
15884 * linux-low.c (check_removed_breakpoint): Add an early
15885 prototype. Improve debug output.
15886 (linux_attach): Doc update.
15887 (linux_detach_one_process, linux_detach): Clean up before releasing
15888 each process.
15889 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15890 * linux-low.h (struct process_info): Doc improvement.
15891 * mem-break.c (delete_all_breakpoints): New.
15892 * mem-break.h (delete_all_breakpoints): New prototype.
15893 * thread-db.c (find_first_thread): New.
15894 (thread_db_create_event): Call it instead of
15895 thread_db_find_new_threads. Clean up unused variables.
15896 (maybe_attach_thread): Remove first thread handling.
15897 (thread_db_find_new_threads): Use find_first_thread.
15898 (thread_db_get_tls_address): Likewise.
15899
4105de34
DJ
159002007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15901
15902 * thread-db.c (thread_db_find_new_threads): Add prototype.
15903 (thread_db_create_event): Check for the main thread before adding
15904 a new thread.
15905 (maybe_attach_thread): Only enable event reporting if TID == 0.
15906 (thread_db_get_tls_address): Check for new threads.
15907
2b876972
DJ
159082007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15909
15910 * linux-low.c (linux_create_inferior): Try execv before execvp.
15911 * spu-low.c (spu_create_inferior): Likewise.
15912
7a245884
DJ
159132007-06-13 Mike Frysinger <vapier@gentoo.org>
15914
15915 * linux-low.c (linux_create_inferior): Change execv to execvp.
15916 * spu-low.c (spu_create_inferior): Likewies.
15917
117ce543
DJ
159182007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15919
15920 * Makefile.in (clean): Clean new files instead of deleted ones.
15921 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15922 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15923 rules.
15924 * configure.srv: Specify XML files and new regformats for MIPS and
15925 MIPS64 GNU/Linux.
15926 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15927 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15928 an entry for the restart register.
15929 (mips_cannot_fetch_register, mips_cannot_store_register)
15930 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15931 register names to match the XML descriptions.
15932 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15933 restart register instead of $0.
15934
0e7f50da
UW
159352007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15936 Markus Deuling <deuling@de.ibm.com>
15937
15938 * remote-utils.c (decode_xfer_write): New function.
15939 * server.h (decode_xfer_write): Add prototype.
15940 * server.c (handle_query): Add PACKET_LEN argument. Support
15941 qXfer:spu:read and qXfer:spu:write packets.
15942 (main): Pass packet_len to handle_query.
15943 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15944 * target.h (target_ops): Add qxfer_spu.
15945
374c1d38
UW
159462007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15947
15948 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15949 accessing non-seekable spufs files.
15950
bb63802a
UW
159512007-05-16 Markus Deuling <deuling@de.ibm.com>
15952
889bf7c5 15953 * server.c (handle_query): Add reply for qC packet.
bb63802a 15954
7390519e
PA
159552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15956 Leo Zayas <lerele@champenstudios@com>
15957
15958 * server.h (check_remote_input_interrupt_request): New function.
15959 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15960 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15961 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15962 (check_remote_input_interrupt_request): New function.
15963 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15964 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15965 winapi_GenerateConsoleCtrlEvent): New typedefs.
15966 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15967 to 250 ms.
15968 (win32_wait): Check for remote interrupt request
15969 with check_remote_input_interrupt_request.
15970 (win32_request_interrupt): New function.
15971 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15972
34b34921
PA
159732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15974
15975 * win32-low.c (debug_registers_changed,
15976 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15977 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15978 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15979 (thread_rec): Get context using the low target.
15980 (child_add_thread): Call thread_added on the low target,
15981 which does the same thing.
15982 (regptr): Delete.
15983 (do_initial_child_stuff): Remove debug registers references.
15984 Set context using the low target. Resume threads after
15985 setting the contexts.
15986 (child_continue): Remove dead variable. Remove debug
15987 registers references.
15988 (child_fetch_inferior_registers): Go through the low target.
15989 (do_child_store_inferior_registers): Remove.
15990 (child_store_inferior_registers): Go through the low target.
15991 (win32_resume): Remove debug registers references.
15992 Set context using the low target.
15993 (handle_exception): Change return type to void. Don't record
15994 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15995 first chance exception.
889bf7c5 15996 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15997 goto loop. Always return after waiting for debug event.
15998 (win32_wait): Convert to switch statement. Handle spurious
15999 events.
16000
16001 * win32-i386-low.c (debug_registers_changed,
16002 debug_registers_used): New.
16003 (initial_stuff): Rename to ...
16004 (i386_initial_stuff): ... this. Clear debug registers
16005 state variables.
16006 (store_debug_registers): Delete.
16007 (i386_get_thread_context): New.
16008 (load_debug_registers): Delete.
16009 (i386_set_thread_context): New.
16010 (i386_thread_added): New.
16011 (single_step): Rename to ...
16012 (i386_single_step): ... this.
16013 (do_fetch_inferior_registers): Rename to ...
16014 (i386_fetch_inferior_register): ... this.
16015 (i386_store_inferior_register): New.
16016 (the_low_target): Adapt to new interface.
16017
16018 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16019 (arm_get_thread_context): New.
16020 (arm_set_thread_context): New.
16021 (regptr): New.
16022 (do_fetch_inferior_registers): Rename to ...
16023 (arm_fetch_inferior_register): ... this.
16024 (arm_store_inferior_register): New.
16025 (arm_wince_breakpoint): Reimplement as unsigned long.
16026 (arm_wince_breakpoint_len): Define.
16027 (the_low_target): Adapt to new interface.
16028
16029 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16030 load_debug_registers. Add get_thread_context, set_thread_context,
16031 thread_added and store_inferior_register. Rename
16032 fetch_inferior_registers to fetch_inferior_register.
16033 (regptr): Remove declaration.
16034
dd6953e1
PA
160352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16036
16037 * linux-low.c (linux_detach): Change return type to int. Return 0.
16038 * spu-low.c (spu_detach): Likewise.
16039
444d6139
PA
160402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16041
16042 * target.h (target_ops): Change return type of detach to int.
16043 Add join.
16044 (join_inferior): New.
16045 * server.c (main): Don't skip detach support on mingw32.
16046 If the inferior doesn't support detaching return error.
16047 Call join_inferior instead of using waitpid.
16048 * linux-low.c (linux_join): New.
16049 (linux_target_op): Add linux_join.
16050 * spu-low.c (spu_join): New.
16051 (spu_target_ops): Add spu_join.
16052 * win32-low.c (win32_detach): Adapt to new interface.
16053 Reopen current_process_handle before detaching. Issue a child
16054 resume before detaching.
16055 (win32_join): New.
16056 (win32_target_op): Add win32_join.
16057
1d5315fe
PA
160582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16059
16060 * win32-low.c (win32-attach): Fix return value.
16061 * target.h (target_ops): Describe ATTACH return values.
16062
bf914831
PA
160632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16064
16065 * win32-low.c (GETPROCADDRESS): Define.
16066 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16067 (winapi_DebugSetProcessKillOnExit): Likewise.
16068 (win32_create_inferior): Force usage of ansi CreateProcessA.
16069 (win32_attach): Use GETPROCADDRESS.
16070 (win32_detach): Likewise.
16071
f72f3e60
PA
160722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16073
16074 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16075
ed50f18f
PA
160762007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16077
16078 * win32-low.c: Commit leftover changes from 2007-03-29.
16079
0c2ead7e
DJ
160802007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16081
16082 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16083 fields short instead of int. Add explicit padding.
16084 (i387_cache_to_fsave): Remove unnecessary casts.
16085 (i387_fsave_to_cache): Doc fix.
16086 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16087
73725ff3
DJ
160882007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16089
16090 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16091 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16092
d99f33d8
PA
160932007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16094
16095 * configure.srv (arm*-*-mingw32ce*): Move near the other
16096 arm targets.
16097
68070c10
PA
160982007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16099
2482afc6 16100 * configure.ac: Add errno checking.
68070c10
PA
16101 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16102 sys/file.h and malloc.h.
16103 (AC_CHECK_DECLS): Add perror.
16104 (srv_mingwce): Handle.
2482afc6 16105 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16106 win32-i386-low.o to srv_tgtobj.
16107 (i[34567]86-*-mingw*): Likewise.
16108 (arm*-*-mingw32ce*): Add case.
16109 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16110 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16111 [__MINGW32CE__] (strerror): New function.
16112 [__MINGW32CE__] (errno): Define to GetLastError.
16113 [__MINGW32CE__] (COUNTOF): New macro.
16114 (remote_open): Remove extra close call.
16115 * mem-break.c (delete_breakpoint_at): New function.
16116 * mem-break.h (delete_breakpoint_at): Declare.
16117 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16118 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16119 [USE_WIN32API] (read, write): Add char* casts.
16120 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16121 * server.h: Include wincecompat.h on Windows CE.
16122 [HAVE_ERRNO_H]: Check.
16123 (perror): Declare if not declared.
16124 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16125 (perror_with_name): Remove errno declaration.
16126 * wincecompat.h: New.
16127 * wincecompat.c: New.
16128 * win32-low.h: New.
16129 * win32-arm-low.c: New.
16130 * win32-i386-low.c: New.
16131 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16132 (OUTMSG2): Make it safe.
16133 (_T): New macro.
16134 (COUNTOF): New macro.
16135 (NUM_REGS): Get it from the low target.
16136 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16137 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16138 (thread_rec): Let low target handle debug registers.
16139 (child_add_thread): Likewise.
16140 (child_init_thread_list): Likewise.
16141 (continue_one_thread): Likewise.
16142 (regptr): New.
16143 (do_child_fetch_inferior_registers): Move to ...
16144 * win32-i386-low.c: ... here, and rename to ...
16145 (do_fetch_inferior_registers): ... this.
889bf7c5 16146 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16147 Go through the low target.
16148 (do_child_store_inferior_registers): Use regptr.
16149 (strwinerror): New function.
16150 (win32_create_inferior): Handle Windows CE.
16151 Use strwinerror instead of strerror on Windows error
16152 codes. Add program to the error output.
16153 Don't close the main thread handle on Windows CE.
16154 (win32_attach): Use coredll.dll on Windows CE.
16155 (win32_kill): Close current process and current
16156 thread handles.
16157 (win32_detach): Use coredll.dll on Windows CE.
16158 (win32_resume): Let low target handle debug registers, and
16159 step request.
16160 (handle_exception): Add/Remove initial breakpoint. Avoid
16161 non-existant WSTOPSIG on Windows CE.
16162 (win32_read_inferior_memory): Cast to remove warning.
16163 (win32_arch_string): Go through the low target.
16164 (initialize_low): Call set_breakpoint_data with the low
16165 target's breakpoint.
16166 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16167 FOP_REGNUM, mappings): Move to ...
16168 * win32-i386-low.c: ... here.
16169 * win32-low.c (win32_thread_info): Move to ...
16170 * win32-low.h: ... here.
16171 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16172 win32-arm-low.c and wincecompat.c.
16173 (all:): Add $EXEEXT.
16174 (install-only:): Likewise.
16175 (gdbserver:): Likewise.
16176 (gdbreplay:): Likewise.
16177 * config.in: Regenerate.
16178 * configure: Regenerate.
16179
41093d81
PA
161802007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16181
16182 * win32-low.c: Rename typedef thread_info to
16183 win32_thread_info throughout.
16184
544afa54
PA
161852007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16186
16187 * win32-i386-low.c: Rename to ...
16188 * win32-low.c: ... this.
16189 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16190 * Makefile.in: Likewise.
16191
bce7165d
PA
161922007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16193
16194 * remote-utils.c (monitor_output): Constify msg parameter.
16195 * server.h (monitor_output): Likewise.
16196 * win32-i386-low.c (handle_output_debug_string): New.
16197 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16198 handle_output_debug_string.
16199 (get_child_debug_event): Likewise.
16200
506c7aa0
DJ
162012007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16202
16203 * server.c (main): Correct strtoul check.
16204
42c81e2a
DJ
162052007-03-27 Jon Ringle <jon@ringle.org>
16206
16207 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16208
9453113a
DJ
162092007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16210
16211 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16212
64a69107
DJ
162132007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16214
16215 * terminal.h: Check HAVE_SGTTY_H.
16216
162172007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16218
16219 * remote-utils.c (remote_open): Print out the assigned port number.
16220
c74d0ad8
DJ
162212007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16222
16223 * remote-utils.c (monitor_output): New function.
16224 * server.c (debug_threads): Define here.
16225 (monitor_show_help): New function.
16226 (handle_query): Handle qRcmd.
16227 (main): Do not handle 'd' packet.
16228 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16229 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16230 of debug_threads.
16231
de7c3b4a
PA
162322007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16233
16234 * Makefile.in (EXEEXT): New.
16235 (clean): Use $(EXEEXT).
16236
ef57601b
PA
162372007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16238
16239 * target.h (target_ops): Rename send_signal to request_interrupt,
16240 and remove enum target_signal parameter.
16241 * linux-low.c (linux_request_interrupt): Rename from
16242 linux_send_signal, and always send SIGINT.
16243 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16244 and always send SIGINT.
16245 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16246 of send_signal.
16247 (input_interrupt): Likewise.
16248
820f2bda
PA
162492007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16250
16251 * server.c (get_features_xml): Check if target implemented
16252 arch_string.
16253 * win32-i386-low.c (win32_arch_string): New.
16254 (win32_target_ops): Add win32_arch_string as arch_string member.
16255
ab39bf24
UW
162562007-02-22 Markus Deuling <deuling@de.ibm.com>
16257
16258 * spu-low.c (spu_arch_string): New.
16259 (spu_target_ops): Add spu_arch_string.
16260
61ff6e04
DJ
162612007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16264 * configure.ac: Do not check for terminal.h.
16265 * configure, config.in: Regenerated.
16266
fb1e4ffc
DJ
162672007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16268
16269 * Makefile.in (OBS): Add $(XML_BUILTIN).
16270 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16271 (clean): Update.
16272 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16273 (arm-with-iwmmxt.c): New.
16274 * config.in, configure: Regenerate.
16275 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16276 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16277 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16278 (arm*-*-linux*): Add iWMMXt and regset support.
16279 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16280 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16281 (arm_store_wmmxregset, target_regsets): New.
16282 * server.c (get_features_xml): Take annex argument. Check builtin
16283 XML documents.
16284 (handle_query): Handle multiple annexes.
16285
0f48aa01
DJ
162862007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16287
16288 * remote-utils.c [USE_WIN32API] (read, write): Define.
16289 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16290 write.
16291
23181151
DJ
162922007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16293
16294 * linux-i386-low.c (the_low_target): Set arch_string.
16295 * linux-x86-64-low.c (the_low_target): Likewise.
16296 * linux-low.c (linux_arch_string): New.
16297 (linux_target_ops): Add it.
16298 * linux-low.h (struct linux_target_ops): Add arch_string.
16299 * server.c (write_qxfer_response): Use const void * for DATA.
16300 (get_features_xml): New.
16301 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16302 * target.h (struct target_ops): Add arch_string method.
16303
9d606399
DJ
163042007-01-03 Denis Pilat <denis.pilat@st.com>
16305 Daniel Jacobowitz <dan@codesourcery.com>
16306
16307 * linux-low.c (linux_kill): Handle being called with no threads.
16308 * win32-i386-low.c (win32_kill): Likewise.
16309 (get_child_debug_event): Clear current_process_handle.
16310
163112006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16312 Daniel Jacobowitz <dan@codesourcery.com>
16313
16314 * remote-utils.c (remote_open): Check the type of specified
16315 serial port devices before opening them.
16316 * server.c (main): Kill the inferior if an error occurs during
16317 the first remote_open.
16318
a5e13d24
DJ
163192006-12-05 Markus Deuling <deuling@de.ibm.com>
16320
16321 * README: Update supported targets.
16322
186947f7
DJ
163232006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16324
16325 * Makefile.in (clean): Remove reg-mips64.c.
16326 (reg-mips64.c, reg-mips64.o): New rules.
16327 * configure.srv: Handle mips64. Include regset support for mips.
16328 * linux-mips-low.c (union mips_register): New.
16329 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16330 (mips_breakpoint, mips_breakpoint_at): Use int.
16331 (mips_collect_register, mips_supply_register)
16332 (mips_collect_register_32bit, mips_supply_register_32bit)
16333 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16334 (mips_store_fpregset, target_regsets): New.
16335 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16336
a13e2c95
UW
163372006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16338
16339 * configure.srv: Add target "spu*-*-*".
16340 * Makefile.in (clean): Remove reg-spu.c.
16341 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16342 * spu-low.c: New file.
16343
cb7283db
DJ
163442006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16345
16346 * configure.ac: Correct td_thr_tls_get_addr test.
16347 * configure: Regenerated.
16348
89be2091
DJ
163492006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16350
16351 * linux-low.c (linux_wait_for_event): Reformat. Use the
16352 pass_signals array.
16353 * remote-utils.c (decode_address_to_semicolon): New.
16354 * server.c (pass_signals, handle_general_set): New.
16355 (handle_query): Mention QPassSignals for qSupported.
16356 (main): Call handle_general_set.
16357 * server.h (pass_signals, decode_address_to_semicolon): New.
16358
000ef4f0
DJ
163592006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16360
16361 * server.c (handle_query): Correct error handling for read_auxv.
16362
b7149293
UW
163632005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16364
16365 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16366 and srv_linux_thread_db to yes.
16367 * linux-s390-low.c (s390_fill_gregset): New function.
16368 (target_regsets): Define data structure.
16369
dae5f5cf
DJ
163702006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16371
16372 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16373 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16374 * config.in, configure: Regenerated.
16375 * inferiors.c (gdb_id_to_thread): New function.
16376 (gdb_id_to_thread_id): Use it.
16377 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16378 * linux-low.h (struct process_info): Add th member.
16379 (thread_db_get_tls_address): New prototype.
16380 * remote-utils.c (decode_address): Make non-static.
16381 * server.c (handle_query): Handle qGetTLSAddr.
16382 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16383 * target.h (struct target_ops): Add get_tls_address.
16384 * thread-db.c (maybe_attach_thread): Save the thread handle.
16385 (thread_db_get_tls_address): New.
16386
32ca6d61
DJ
163872006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16388
16389 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16390 (linux_resume_one_process): Take a siginfo_t *. Update all
16391 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16392 (struct pending_signals): Add a siginfo_t.
16393 (linux_wait_for_process): Always set last_status.
16394 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16395 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16396 * linux-low.h (struct process_info): Add last_status.
16397
5ffff7c1
DJ
163982006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16399
16400 * remote-utils.c (try_rle): New function.
16401 (putpkt_binary): Use it.
16402
8695c747
DJ
164032006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16404
16405 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16406 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16407 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16408 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16409 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16410 point registers.
16411
290fadea
RS
164122006-08-08 Richard Sandiford <richard@codesourcery.com>
16413
16414 * server.c (terminal_fd): New variable.
16415 (old_foreground_pgrp): Likewise.
16416 (restore_old_foreground_pgrp): New function.
16417 (start_inferior): Record the terminal file descriptor in terminal_fd
16418 and its original foreground group in old_foreground_pgrp. Register
16419 restore_old_foreground_pgrp with atexit().
16420
9f2e1e63
DJ
164212006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16422
16423 * server.c (handle_query): Correct qPart to qXfer.
16424
b80864fb
DJ
164252006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16426
16427 * configure.ac: Check for more headers which are missing on
16428 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16429 * configure.srv: Add Cygwin and mingw32.
16430 * remote-utils.c: Don't include headers unconditionally which
16431 are missing on mingw32. Include <winsock.h> for mingw32.
16432 (remote_open): Adjust for mingw32 support. Flush
16433 standard error after writing to it.
16434 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16435 (unblock_async_io, enable_async_io, disable_async_io)
16436 (readchar, getpkt): Update for Winsock support.
16437 (prepare_resume_reply): Expect a protocol signal number.
16438 * server.c: Disable <sys/wait.h> on mingw32.
16439 (start_inferior): Adjust for mingw32 support. Flush
16440 standard error after writing to it.
16441 (attach_inferior): Likewise. Use protocol signal
16442 numbers.
16443 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16444 and names.
16445 * win32-i386-low.c: New file.
16446 * Makefile.in (XM_CLIBS): Set.
16447 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16448 (win32-i386-low.o): New dependency rule.
16449 * linux-low.c (linux_wait): Use target signal numbers.
16450 * target.h (struct target_ops): Doc fix.
16451 * server.h (target_signal_to_name): New prototype.
16452 * gdbreplay.c: Don't include headers unconditionally which
16453 are missing on mingw32. Include <winsock.h> for mingw32.
16454 (remote_close, remote_open): Adjust for Winsock support.
16455 * configure, config.in: Regenerated.
16456
0876f84a
DJ
164572006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16458
16459 * server.c (decode_xfer_read, write_qxfer_response): New.
16460 (handle_query): Take a packet length argument. Handle
16461 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16462 the qSupported response.
16463 (main): Update call to handle_query.
16464
01f9e8fa
DJ
164652006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16466
16467 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16468 (putpkt_binary): Renamed from putpkt and adjusted for binary
16469 data.
16470 (putpkt): New wrapper for putpkt_binary.
16471 (readchar): Don't mask off the high bit.
16472 (decode_X_packet): New function.
16473 * server.c (main): Call putpkt_binary if a handler sets the packet
16474 length. Save the length of the incoming packet. Handle 'X'.
16475 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16476
be2a5f71
DJ
164772006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16478
16479 * server.c (handle_query): Handle qSupported.
16480
ea025f5f
DJ
164812006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16482
16483 * remote-utils.c (all_symbols_looked_up): New variable.
16484 (look_up_one_symbol): Check it.
16485 * server.h (look_up_one_symbol): New declaration.
16486 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16487
9308fc88
DJ
164882006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16489
16490 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16491 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16492 (PTRACE_GET_THREAD_AREA): Define.
16493 (ps_get_thread_area): New function.
16494
52fb6437
NS
164952006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16496
16497 * configure.srv (m68k*-*-uclinux*): New target.
16498 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16499 (linux_resume_one_process): Remove extraneous cast.
16500 (linux_read_offsets): New.
16501 (linux_target_op): Add linux_read_offsets on mmuless systems.
16502 * server.c (handle_query): Add qOffsets logic.
16503 * target.h (struct target_ops): Add read_offsets.
16504
21b0f40c
DJ
165052006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16506
16507 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16508 (PTRACE_GET_THREAD_AREA): Define.
16509 (ps_get_thread_area): New function.
16510 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16511 (linux-x86-64-low.o): Update.
16512
0050a760
DJ
165132006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16514
16515 * configure.ac: Remove checks for prfpregset_t.
16516 * gdb_proc_service.h: New file.
16517 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16518 new "gdb_proc_service.h".
16519 * proc-service.c: Likewise.
16520 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16521 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16522 * Makefile.in (gdb_proc_service_h): Updated.
16523 * configure, config.in: Regenerated.
16524
b92a518e
DJ
165252006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16526
16527 * remote-utils.c (prepare_resume_reply): Move declaration
16528 of gdb_id_from_wait to the top of the block.
16529
545587ee
DJ
165302006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16531
16532 * linux-low.c (regsets_store_inferior_registers): Read the regset
16533 from the target before filling it.
16534
9db87ebd
DJ
165352006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16536
16537 * server.c (attach_inferior): Return SIGTRAP for a successful
16538 attach.
16539
dd24457d
DJ
165402006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16541
16542 * Makefile.in (OBS): Add version.o.
16543 (STAGESTUFF): Delete.
16544 (version.o): Add dependencies.
16545 (version.c): Replace rule.
16546 (clean): Remove version.c.
16547 * server.c (gdbserver_version): New.
16548 (gdbserver_usage): Use printf.
16549 (main): Handle --version and --help.
16550 * server.h (version, host_name): Add declarations.
16551
6f0f660e
EZ
165522005-12-23 Eli Zaretskii <eliz@gnu.org>
16553
889bf7c5
PA
16554 * linux-arm-low.c:
16555 * linux-arm-low.c:
16556 * inferiors.c:
16557 * i387-fp.h:
16558 * i387-fp.c:
16559 * gdbreplay.c:
16560 * regcache.c:
16561 * proc-service.c:
16562 * mem-break.h:
16563 * mem-break.c:
16564 * linux-x86-64-low.c:
16565 * linux-sh-low.c:
16566 * linux-s390-low.c:
16567 * linux-ppc64-low.c:
16568 * linux-ppc-low.c:
16569 * linux-mips-low.c:
16570 * linux-m68k-low.c:
16571 * linux-m32r-low.c:
16572 * linux-low.h:
16573 * linux-low.c:
16574 * linux-ia64-low.c:
16575 * linux-i386-low.c:
16576 * linux-crisv32-low.c:
16577 * thread-db.c:
16578 * terminal.h:
16579 * target.h:
16580 * target.c:
16581 * server.h:
16582 * server.c:
16583 * remote-utils.c:
16584 * regcache.h:
16585 * utils.c:
16586 * Makefile.in:
16587 * configure.ac:
6f0f660e
EZ
16588 * gdbserver.1: Add (C) after Copyright. Update the FSF
16589 address.
16590
9d1fb177
DJ
165912005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16592
16593 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16594 (arm_breakpoint_at): Recognize both breakpoints.
16595 (the_low_target): Use the correct breakpoint instruction.
16596
011a70c2
DJ
165972005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16598
16599 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16600 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16601 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16602 (the_low_target): Update.
16603
7fb85e41
AS
166042005-10-25 Andreas Schwab <schwab@suse.de>
16605
16606 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16607
16608 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16609 (ia64_num_regs): Reduce to 462.
16610
3db0444b
DJ
166112005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16612
16613 * acinclude.m4: Correct quoting.
16614 * aclocal.m4: Regenerated.
16615
16616 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16617 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16618 (thread_db_init): Call thread_db_err_str.
16619 * configure.ac: Check for TD_VERSION.
16620 * config.in, configure: Regenerated.
16621
bee0189a
DJ
166222005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16623
16624 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16625
e9d25b98
DJ
166262005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16627
16628 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16629 is not available. Define HAVE_PTRACE_GETREGS if it is.
16630 * config.in, configure: Regenerated.
16631 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16632 * linux-i386-low.c, linux-m68k-low.c: Update to use
16633 HAVE_PTRACE_GETREGS.
16634 * linux-low.c (regsets_fetch_inferior_registers)
16635 (regsets_store_inferior_registers): Only return 0 if we processed
16636 GENERAL_REGS.
16637 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16638 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16639
a06660f7
DJ
166402005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16641
16642 * inferiors.c (struct thread_info): Add gdb_id.
16643 (add_thread): Add gdb_id argument.
16644 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16645 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16646 calls to add_thread.
16647 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16648 * server.c (handle_query): Use thread_to_gdb_id.
16649 (handle_v_cont, main): Use gdb_id_to_thread_id.
16650 * server.h (add_thread): Update prototype.
16651 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16652 prototypes.
16653
5a1f5858
DJ
166542005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16655
16656 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16657 left-padded registers.
16658 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16659 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16660
e122f1f5
SE
166612005-07-01 Steve Ellcey <sje@cup.hp.com>
16662
16663 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16664 * configure: Regenerate.
16665 * config.in: Regenerate.
16666 * server.h (NEED_DECLARATION_STRERROR):
16667 Replace with !HAVE_DECL_STRERROR.
16668
d592fa2f
DJ
166692005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16670
16671 * linux-low.c (linux_wait, linux_send_signal): Don't test
16672 an unsigned long variable for > 0 if it could be MAX_ULONG.
16673 * server.c (myresume): Likewise.
16674 * target.c (set_desired_inferior): Likewise.
16675
ccbd4912
MK
166762005-06-13 Mark Kettenis <kettenis@gnu.org>
16677
16678 * configure.ac: Simplify and improve check for socklen_t.
16679 * configure, config.in: Regenerate.
16680
f450004a
DJ
166812005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16682
16683 * acconfig.h: Remove.
16684 * configure.ac: Add a test for socklen_t. Use three-argument
16685 AC_DEFINE throughout.
16686 * config.in: Regenerated using autoheader 2.59.
16687 * configure: Regenerated.
16688
16689 * gdbreplay.c (socklen_t): Provide a default.
16690 (remote_open): Use socklen_t.
16691 * remote-utils.c (socklen_t): Provide a default.
16692 (remote_open): Use socklen_t.
16693 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16694 unsigned char.
16695
16696 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16697 char for buffers.
16698 * linux-low.c (linux_read_memory, linux_write_memory)
16699 (linux_read_auxv): Likewise.
16700 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16701 (check_mem_write): Likewise.
16702 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16703 Likewise.
16704 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16705 (registers_from_string, register_data): Likewise.
16706 * server.c (handle_query, main): Likewise.
16707 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16708 (decode_M_packet): Likewise.
16709 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16710 * target.h (struct target_ops): Update read_memory, write_memory,
16711 and read_auxv.
16712 (read_inferior_memory, write_inferior_memory): Update.
16713 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16714 to unsigned char *.
16715 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16716 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16717 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16718 linux-s390-low.c, linux-sh-low.c: Update for changes in
16719 read_inferior_memory and the_low_target->breakpoint.
16720
eee84df1
DJ
167212005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16722
16723 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16724 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16725 * configure.srv: Add powerpc64-*-linux*.
16726 * linux-ppc64-low.c: New file.
16727
45b134e5
OF
167282005-05-23 Orjan Friberg <orjanf@axis.com>
16729
16730 * linux-cris-low.c: New file with support for CRIS.
16731 * linux-crisv32-low.c: Ditto for CRISv32.
16732 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16733 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16734 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16735 reg-crisv32.o, and reg-crisv32.c to make rules.
16736 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16737 recognized targets.
16738
48d93c75
UW
167392005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16740
16741 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16742 of sizeof (PTRACE_XFER_TYPE).
16743 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16744
e013ee27
OF
167452005-05-12 Orjan Friberg <orjanf@axis.com>
16746
889bf7c5 16747 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16748 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16749 pointers for hardware watchpoint support.
16750 * linux-low.h (struct linux_target_ops): Ditto.
16751 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16752 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16753 to linux_target_ops.
16754 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16755 reply packet.
16756 * server.c (main): Recognize 'Z' and 'z' packets.
16757
b0ded00b
UW
167582005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16759
16760 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16761 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16762 (the_low_target): Add new members.
16763
8643e2ad
DJ
167642005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16765
16766 * proc-service.c (ps_lgetregs): Search all_processes instead of
16767 all_threads.
16768
fc620387
DJ
167692005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16770
16771 * server.c (start_inferior): Change return type to int.
16772 (attach_inferior): Change sigptr to int *.
16773 (handle_v_cont, handle_v_requests): Change signal to int *.
16774 (main): Change signal to int.
16775
167762005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16777
16778 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16779 * configure.srv: Add m32r*-*-linux*.
16780 * linux-m32r-low.c: New file.
16781
e0e76420
DJ
167822005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16783
16784 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16785
a1928bad
DJ
167862005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16787
16788 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16789 Take unsigned long arguments for PIDs.
16790 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16791 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16792 (wait_for_sigstop, linux_resume_one_process)
16793 (regsets_fetch_inferior_registers, linux_send_signal)
16794 (linux_read_auxv): Likewise. Update the types of variables holding
16795 PIDs. Update format string specifiers.
16796 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16797 * remote-utils.c (prepare_resume_reply): Likewise.
16798 * server.c (cont_thread, general_thread, step_thread)
16799 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16800 unsigned long.
16801 (handle_query): Update format specifiers.
16802 (handle_v_cont, main): Use strtoul for thread IDs.
16803 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16804 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16805 (general_thread, step_thread, thread_from_wait)
16806 (old_thread_from_wait): Update.
16807 * target.h (struct thread_resume): Use unsigned long for THREAD.
16808 (struct target_ops): Use unsigned long for arguments to attach and
16809 thread_alive.
16810
dcdb98d2
DJ
168112005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16812
16813 * acinclude.m4: Include bfd/bfd.m4 directly.
16814 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16815 <agriffis@toolchain.org>.
16816 * aclocal.m4, configure: Regenerated.
16817
bec39cab
AC
168182005-01-07 Andrew Cagney <cagney@gnu.org>
16819
16820 * configure.ac: Rename configure.in, require autoconf 2.59.
16821 * configure: Re-generate.
16822
434c4c77
DJ
168232004-12-08 Daniel Jacobowitz <dan@debian.org>
16824
16825 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16826 LIBS when finished.
16827 * aclocal.m4: Regenerated.
16828 * configure: Regenerated.
16829
db1d3e1b
AS
168302004-11-21 Andreas Schwab <schwab@suse.de>
16831
16832 * linux-m68k-low.c (m68k_num_gregs): Define.
16833 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16834 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16835 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16836 (m68k_breakpoint_at): New. Add to the_low_target.
16837
16838 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16839 srv_linux_thread_db to yes.
16840
43360365
JB
168412004-10-20 Joel Brobecker <brobecker@gnat.com>
16842
16843 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16844 (ARCH_SET_FS): Likewise.
16845 (ARCH_GET_FS): Likewise.
16846 (ARCH_GET_GS): Likewise.
16847
fd500816
DJ
168482004-10-16 Daniel Jacobowitz <dan@debian.org>
16849
16850 * linux-i386-low.c (ps_get_thread_area): New.
16851 * linux-x86-64-low.c (ps_get_thread_area): New.
16852 * linux-low.c: Include <sys/syscall.h>.
16853 (linux_kill_one_process): Don't kill the first thread here.
16854 (linux_kill): Kill the first thread here.
16855 (kill_lwp): New function.
16856 (send_sigstop, linux_send_signal): Use it.
16857 * proc-service.c: Clean up #ifdefs.
16858 (fpregset_info): Delete.
16859 (ps_lgetregs): Update and enable implementation.
16860 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16861 implementations.
16862 * remote-utils.c (struct sym_cache, symbol_cache): New.
16863 (input_interrupt): Print a clearer message.
16864 (async_io_enabled): New variable.
16865 (enable_async_io, disable_async_io): Use it. Update comments.
16866 (look_up_one_symbol): Use the symbol cache.
16867 * thread-db.c (thread_db_look_up_symbols): New function.
16868 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16869
f6de3c42
DJ
168702004-10-16 Daniel Jacobowitz <dan@debian.org>
16871
16872 * configure.in: Test for -rdynamic.
16873 * configure: Regenerated.
16874 * Makefile (INTERNAL_LDFLAGS): New.
16875 (gdbserver, gdbreplay): Use it.
16876
2c0fc042
AC
168772004-09-02 Andrew Cagney <cagney@gnu.org>
16878
16879 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16880
075b3282
DJ
168812004-03-23 Daniel Jacobowitz <drow@mvista.com>
16882
16883 * linux-low.c (linux_wait): Clear all_processes list also.
16884
fa6a77dc
DJ
168852004-03-12 Daniel Jacobowitz <drow@mvista.com>
16886
16887 * linux-low.c: Include <errno.h>. Remove extern declaration of
16888 errno.
16889
6d782a97
DJ
168902004-03-12 Daniel Jacobowitz <drow@mvista.com>
16891
16892 * gdbreplay.c, server.h, utils.c: Update copyright years.
16893
3a7fb99b
DJ
168942004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16895
16896 * server.c (main): Print child status or termination signal from
16897 variable 'signal', not 'sig'.
16898
c3e735a6
DJ
168992004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16900
16901 * linux-low.c (linux_read_memory): Change return type to
16902 int. Check for and return error from ptrace().
16903 * target.c (read_inferior_memory): Change return type to int. Pass
16904 back return status from the_target->read_memory().
16905 * target.h (struct target_ops): Adapt *read_memory() prototype.
16906 Update comment.
16907 (read_inferior_memory): Adapt prototype.
16908 * server.c (main): Return an error packet if
16909 read_inferior_memory() returns an error.
16910
a59d1c82
DJ
169112004-03-04 Daniel Jacobowitz <drow@mvista.com>
16912
16913 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16914 Unify with other clean targets.
16915
dc3f8883
DJ
169162004-02-29 Daniel Jacobowitz <drow@mvista.com>
16917
16918 * server.c (handle_v_cont): Call set_desired_inferior.
16919
89a208da
DJ
169202004-02-29 Daniel Jacobowitz <drow@mvista.com>
16921
16922 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16923
62ea82f5
DJ
169242004-02-29 Daniel Jacobowitz <drow@mvista.com>
16925
16926 * linux-low.c (linux_wait): Unblock async I/O.
16927 (linux_resume): Block and enable async I/O.
16928 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16929 * server.h (block_async_io, unblock_async_io): Add prototypes.
16930
6910d122
DJ
169312004-02-29 Daniel Jacobowitz <drow@mvista.com>
16932
16933 * remote-utils.c (remote_open): Print a status notice after
16934 opening a TCP port.
16935 * server.c (attach_inferior): Print a status notice after
16936 attaching.
16937
169382004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16939
16940 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16941
c89dc5d4
DJ
169422004-02-26 Daniel Jacobowitz <drow@mvista.com>
16943
16944 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16945 error packet.
16946 * server.c, target.h: Update copyright years.
16947
4b8dad4a
RM
169482004-02-25 Roland McGrath <roland@redhat.com>
16949
16950 * target.h (struct target_ops): New member `read_auxv'.
16951 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16952 * linux-low.c (linux_read_auxv): New function.
16953 (linux_target_ops): Initialize `read_auxv' member to that.
16954
d7446758
JB
169552004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16956
16957 Committed by Jim Blandy <jimb@redhat.com>.
16958
16959 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16960 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16961 instead of GPR_SIZE to distiguish s390 and s390x targets.
16962
5544ad89
DJ
169632004-01-31 Daniel Jacobowitz <drow@mvista.com>
16964
16965 * linux-low.c: Update copyright year.
16966 (check_removed_breakpoint): Clear pending_is_breakpoint.
16967 (linux_set_resume_request, linux_queue_one_thread)
16968 (resume_status_pending_p): New functions.
16969 (linux_continue_one_thread): Use process->resume.
16970 (linux_resume): Only resume threads if there are no pending events.
16971 * linux-low.h (struct process_info): Add resume request
16972 pointer.
16973
2a68b70e
DJ
169742004-01-30 Daniel Jacobowitz <drow@mvista.com>
16975
16976 * regcache.c (new_register_cache): Clear the allocated register
16977 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16978
64386c31
DJ
169792003-10-13 Daniel Jacobowitz <drow@mvista.com>
16980
16981 * linux-low.c (linux_resume): Take a struct thread_resume *
16982 argument.
16983 (linux_wait): Update call.
16984 (resume_ptr): New static variable.
16985 (linux_continue_one_thread): Renamed from
16986 linux_continue_one_process. Use resume_ptr.
16987 (linux_resume): Use linux_continue_one_thread.
16988 * server.c (handle_v_cont, handle_v_requests): New functions.
16989 (myresume): New function.
16990 (main): Handle 'v' case.
16991 * target.h (struct thread_resume): New type.
16992 (struct target_ops): Change argument of "resume" to struct
16993 thread_resume *.
16994 (myresume): Delete macro.
16995
c938e9b0
L
169962003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16997
16998 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16999 (uninstall): Support DESTDIR.
17000
7f313d07
BC
17001Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17002
17003 * configure.srv: Add xscale*linux copy of arm*linux entry.
17004
3b2fc2ea
DJ
170052003-07-24 Daniel Jacobowitz <drow@mvista.com>
17006
17007 * linux-arm-low.c (arm_reinsert_addr): New function.
17008 (the_low_target): Add arm_reinsert_addr.
17009
1c0a559e
MK
170102003-07-08 Mark Kettenis <kettenis@gnu.org>
17011
17012 * mem-break.c: Remove whitespace at end of file.
17013
43d5792c
DJ
170142003-06-28 Daniel Jacobowitz <drow@mvista.com>
17015
17016 * configure.in: Check whether we need to prototype strerror.
17017 * server.h: Optionally prototype strerror.
17018 * gdbreplay.c (perror_with_name): Use strerror.
17019 * linux-low.c (linux_attach_lwp): Use strerror.
17020 * utils.c (perror_with_name): Use strerror.
17021 * config.in, configure: Regenerated.
17022
c8a86edf
DJ
170232003-06-28 Daniel Jacobowitz <drow@mvista.com>
17024
17025 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17026 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17027
73d37363
DJ
170282003-06-20 Daniel Jacobowitz <drow@mvista.com>
17029
17030 * Makefile.in (SFILES): Update.
17031 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17032 low-sun3.c: Remove files.
17033
6ad8ae5c
DJ
170342003-06-17 Daniel Jacobowitz <drow@mvista.com>
17035
17036 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17037 (linux_detach_one_process, linux_detach): New functions.
17038 (linux_target_ops): Add linux_detach.
17039 * server.c (main): Handle 'D' packet.
17040 * target.h (struct target_ops): Add "detach" member.
17041 (detach_inferior): Define.
17042
1581182a
MK
170432003-06-13 Mark Kettenis <kettenis@gnu.org>
17044
17045 From Kelley Cook <kelleycook@wideopenwest.com>:
17046 * configure.srv: Accept i[34567]86 variants.
17047
e5379b03
DJ
170482003-06-05 Daniel Jacobowitz <drow@mvista.com>
17049
17050 * linux-low.c (linux_wait_for_event): Correct comment typos.
17051 (linux_resume_one_process): Call check_removed_breakpoint.
17052 (linux_send_signal): New function.
17053 (linux_target_ops): Add linux_send_signal.
17054 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17055 of kill.
17056 * target.h (struct target_ops): Add send_signal.
17057
2ff29de4
JB
170582003-05-29 Jim Blandy <jimb@redhat.com>
17059
17060 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17061 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17062 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17063 away part of the register's value.
17064
254787d4
DJ
170652003-03-26 Daniel Jacobowitz <drow@mvista.com>
17066
17067 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17068 (linux_wait_for_event, linux_init_signals): Likewise.
17069
94e10508
DJ
170702003-03-17 Daniel Jacobowitz <drow@mvista.com>
17071
17072 * configure.in: Check for stdlib.h.
17073 * configure: Regenerated.
17074 * config.in: Regenerated.
17075
4c0711e0
DJ
170762003-01-04 Andreas Schwab <schwab@suse.de>
17077
17078 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17079
ef66e766
AC
170802003-01-02 Andrew Cagney <ac131313@redhat.com>
17081
17082 * Makefile.in: Remove obsolete code.
17083
a1358604
DJ
170842002-11-20 Daniel Jacobowitz <drow@mvista.com>
17085
17086 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17087 defined(PT_FPR0_HI).
17088
23ce3b1c
DJ
170892002-11-17 Stuart Hughes <seh@zee2.com>
17090
17091 * linux-arm-low.c (arm_num_regs): Increase.
17092 (arm_regmap): Include status register.
17093
170942002-11-17 Daniel Jacobowitz <drow@mvista.com>
17095
17096 * linux-low.c (register_addr): Remove incorrect -1 check.
17097
a9fa9f7d
DJ
170982002-08-29 Daniel Jacobowitz <drow@mvista.com>
17099
17100 * linux-low.c (linux_create_inferior): Call setpgid. Return
17101 the new PID.
17102 (unstopped_p, linux_signal_pid): Remove.
17103 (linux_target_ops): Remove linux_signal_pid.
17104 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17105 global instead of target method.
17106 * target.h (struct target_ops): Remove signal_pid. Update comment
17107 for create_inferior.
17108 * server.c (signal_pid): New variable.
17109 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17110 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17111 (attach_inferior): Set signal_pid.
17112
17574093
DJ
171132002-08-23 Daniel Jacobowitz <drow@mvista.com>
17114
17115 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17116
171172002-08-20 Jim Blandy <jimb@redhat.com>
17118
17119 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17120 default for this.
17121
171222002-08-01 Andrew Cagney <cagney@redhat.com>
17123
17124 * Makefile.in: Make chill references obsolete.
17125
171262002-07-24 Kevin Buettner <kevinb@redhat.com>
17127
17128 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17129 * configure: Regenerate.
17130 * config.in: Regenerate.
17131
171322002-07-09 David O'Brien <obrien@FreeBSD.org>
17133
17134 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17135 (perror_with_name, remote_close, remote_open, expect, play): Static.
17136
171372002-07-04 Michal Ludvig <mludvig@suse.cz>
17138
4b8dad4a 17139 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17140 byte offsets instead of an array of indexes.
17141 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17142
171432002-06-13 Daniel Jacobowitz <drow@mvista.com>
17144
17145 * regcache.c: Add comment.
17146
171472002-06-11 Daniel Jacobowitz <drow@mvista.com>
17148
17149 * thread-db.c: New file.
17150 * proc-service.c: New file.
17151 * acinclude.m4: New file.
17152 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17153 proc-service.o, and thread-db.o.
17154 (linux-low.o): Add USE_THREAD_DB.
17155 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17156 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17157 * aclocal.m4: Regenerated.
17158 * config.in: Regenerated.
17159 * configure: Regenerated.
17160 * configure.in: Check for proc_service.h, sys/procfs.h,
17161 thread_db.h, and linux/elf.h headrs.
17162 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17163 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17164 Check for -lthread_db and thread support.
17165 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17166 PowerPC, and SuperH.
17167 * i387-fp.c: Constify arguments.
17168 * i387-fp.h: Likewise.
17169 * inferiors.c: (struct thread_info): Renamed from
17170 `struct inferior_info'. Remove PID member. Use generic inferior
17171 list header. All uses updated.
17172 (inferiors, signal_pid): Removed.
17173 (all_threads): New variable.
17174 (get_thread): Define.
17175 (add_inferior_to_list): New function.
17176 (for_each_inferior): New function.
17177 (change_inferior_id): New function.
17178 (add_inferior): Removed.
17179 (remove_inferior): New function.
17180 (add_thread): New function.
17181 (free_one_thread): New function.
17182 (remove_thread): New function.
17183 (clear_inferiors): Use for_each_inferior and free_one_thread.
17184 (find_inferior): New function.
17185 (find_inferior_id): New function.
17186 (inferior_target_data): Update argument type.
17187 (set_inferior_target_data): Likewise.
17188 (inferior_regcache_data): Likewise.
17189 (set_inferior_regcache_data): Likewise.
17190 * linux-low.c (linux_bp_reinsert): Remove.
17191 (all_processes, stopping_threads, using_thrads)
17192 (struct pending_signals, debug_threads, pid_of): New.
17193 (inferior_pid): Replace with macro.
17194 (struct inferior_linux_data): Remove.
17195 (get_stop_pc, add_process): New functions.
17196 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17197 Use add_process and add_thread.
17198 (linux_attach_lwp): New function, based on old linux_attach. Use
17199 add_process and add_thread. Set stop_expected for new threads.
17200 (linux_attach): New function.
17201 (linux_kill_one_process): New function.
17202 (linux_kill): Kill all LWPs.
17203 (linux_thread_alive): Use find_inferior_id.
17204 (check_removed_breakpoints, status_pending_p): New functions.
17205 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17206 Update. Use WNOHANG. Wait for cloned processes also. Update process
17207 struct for the found process.
17208 (linux_wait_for_event): New function.
17209 (linux_wait): Use it. Support LWPs.
17210 (send_sigstop, wait_for_sigstop, stop_all_processes)
17211 (linux_resume_one_process, linux_continue_one_process): New functions.
17212 (linux_resume): Support LWPs.
17213 (REGISTER_RAW_SIZE): Remove.
17214 (fetch_register): Use register_size instead. Call supply_register.
17215 (usr_store_inferior_registers): Likewise. Call collect_register.
17216 Fix recursive case.
17217 (regsets_fetch_inferior_registers): Improve error message.
17218 (regsets_store_inferior_registers): Add debugging.
17219 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17220 (unstopped_p, linux_signal_pid): New functions.
17221 (linux_target_ops): Add linux_signal_pid.
17222 (linux_init_signals): New function.
17223 (initialize_low): Call it. Initialize using_threads.
17224 * regcache.c (inferior_regcache_data): Add valid
17225 flag.
17226 (get_regcache): Fetch registers lazily. Add fetch argument
17227 and update all callers.
17228 (regcache_invalidate_one, regcache_invalidate): New
17229 functions.
17230 (new_register_cache): Renamed from create_register_cache.
17231 Return the new regcache.
17232 (free_register_cache): Change argument to a void *.
17233 (registers_to_string, registers_from_string): Call get_regcache
17234 with fetch flag set.
17235 (register_data): Make static. Pass fetch flag to get_regcache.
17236 (supply_register): Call get_regcache with fetch flag clear.
17237 (collect_register): Call get_regcache with fetch flag set.
17238 (collect_register_as_string): New function.
17239 * regcache.h: Update.
17240 * remote-utils.c (putpkt): Flush after debug output and use
17241 stderr.
17242 Handle input interrupts while waiting for an ACK.
17243 (input_interrupt): Use signal_pid method.
17244 (getpkt): Flush after debug output and use stderr.
17245 (outreg): Use collect_register_as_string.
17246 (new_thread_notify, dead_thread_notify): New functions.
17247 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17248 and general_thread.
17249 (look_up_one_symbol): Flush after debug output.
17250 * server.c (step_thread, server_waiting): New variables.
17251 (start_inferior): Don't use signal_pid. Update call to mywait.
17252 (attach_inferior): Update call to mywait.
17253 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17254 (main): Don't fetch/store registers explicitly. Use
17255 set_desired_inferior. Support proposed ``Hs'' packet. Update
17256 calls to mywait.
17257 * server.h: Update.
17258 (struct inferior_list, struct_inferior_list_entry): New.
17259 * target.c (set_desired_inferior): New.
17260 (write_inferior_memory): Constify.
17261 (mywait): New function.
17262 * target.h: Update.
17263 (struct target_ops): New signal_pid method.
17264 (mywait): Removed macro, added prototype.
17265
17266 * linux-low.h (regset_func): Removed.
17267 (regset_fill_func, regset_store_func): New.
17268 (enum regset_type): New.
17269 (struct regset_info): Add type field. Use new operation types.
17270 (struct linux_target_ops): stop_pc renamed to get_pc.
17271 Add decr_pc_after_break and breakpoint_at.
17272 (get_process, get_thread_proess, get_process_thread)
17273 (strut process_info, all_processes, linux_attach_lwp)
17274 (thread_db_init): New.
17275
17276 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17277 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17278 (the_low_target): Add new members.
17279 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17280 (i386_store_fpxregset): Constify.
17281 (target_regsets): Add new kind identifier.
17282 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17283 (i386_set_pc): Add debugging.
17284 (i386_breakpoint_at): New function.
17285 (the_low_target): Add new members.
17286 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17287 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17288 (mips_breakpoint_at): New.
17289 (the_low_target): Add new members.
17290 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17291 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17292 (the_low_target): Add new members.
17293 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17294 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17295 (the_low_target): Add new members.
17296 * linux-x86-64-low.c (target_regsets): Add new kind
17297 identifier.
17298
172992002-05-15 Daniel Jacobowitz <drow@mvista.com>
17300
17301 From Martin Pool <mbp@samba.org>:
17302 * server.c (gdbserver_usage): New function.
17303 (main): Call it.
17304
173052002-05-14 Daniel Jacobowitz <drow@mvista.com>
17306
17307 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17308 stop_at -> stop_pc.
17309
173102002-05-04 Andrew Cagney <ac131313@redhat.com>
17311
17312 * Makefile.in: Remove obsolete code.
17313
173142002-04-24 Michal Ludvig <mludvig@suse.cz>
17315
17316 * linux-low.c (regsets_fetch_inferior_registers),
17317 (regsets_store_inferior_registers): Removed cast to int from
17318 ptrace() calls.
17319 * regcache.h: Added declaration of struct inferior_info.
17320
173212002-04-20 Daniel Jacobowitz <drow@mvista.com>
17322
17323 * inferiors.c (struct inferior_info): Add regcache_data.
17324 (add_inferior): Call create_register_cache.
17325 (clear_inferiors): Call free_register_cache.
17326 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17327 * regcache.c (struct inferior_regcache_data): New.
17328 (registers): Remove.
17329 (get_regcache): New function.
17330 (create_register_cache, free_register_cache): New functions.
17331 (set_register_cache): Don't initialize the register cache here.
17332 (registers_to_string, registers_from_string, register_data): Call
17333 get_regcache.
17334 * regcache.h: Add prototypes.
17335 * server.h: Likewise.
17336
173372002-04-20 Daniel Jacobowitz <drow@mvista.com>
17338
17339 * mem-break.c: New file.
17340 * mem-break.h: New file.
17341 * Makefile.in: Add mem-break.o rule; update server.h
17342 dependencies.
17343 * inferiors.c (struct inferior_info): Add target_data
17344 member.
17345 (clear_inferiors): Free target_data member if set.
17346 (inferior_target_data, set_inferior_target_data): New functions.
17347 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17348 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17349 * linux-low.c (linux_bp_reinsert): New variable.
17350 (struct inferior_linux_data): New.
17351 (linux_create_inferior): Use set_inferior_target_data.
17352 (linux_attach): Likewise. Call add_inferior.
17353 (linux_wait_for_one_inferior): New function.
17354 (linux_wait): Call it.
17355 (linux_write_memory): Add const.
17356 (initialize_low): Call set_breakpoint_data.
17357 * linux-low.h (struct linux_target_ops): Add breakpoint
17358 handling members.
17359 * server.c (attach_inferior): Remove extra add_inferior
17360 call.
17361 * server.h: Include mem-break.h. Update inferior.c
17362 prototypes.
17363 * target.c (read_inferior_memory)
17364 (write_inferior_memory): New functions.
17365 * target.h (read_inferior_memory)
17366 (write_inferior_memory): Change macros to prototypes.
17367 (struct target_ops): Update comments. Add const to write_memory
17368 definition.
17369
173702002-04-11 Daniel Jacobowitz <drow@mvista.com>
17371
17372 * linux-low.c (usr_store_inferior_registers): Support
17373 registers which are allowed to fail to store.
17374 * linux-low.h (linux_target_ops): Likewise.
17375 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17376 (ppc_cannot_store_register): FPSCR may not be storable.
17377
173782002-04-09 Daniel Jacobowitz <drow@mvista.com>
17379
17380 * server.h: Include <string.h> if HAVE_STRING_H.
17381 * ChangeLog: Correct paths in last ChangeLog entry.
17382
173832002-04-09 Daniel Jacobowitz <drow@mvista.com>
17384
17385 * linux-low.h: Remove obsolete prototypes.
17386 (struct linux_target_ops): New.
17387 (extern the_low_target): New.
17388 * linux-low.c (num_regs, regmap): Remove declarations.
17389 (register_addr): Use the_low_target explicitly.
17390 (fetch_register): Likewise.
17391 (usr_fetch_inferior_registers): Likewise.
17392 (usr_store_inferior_registers): Likewise.
17393 * linux-arm-low.c (num_regs): Remove.
17394 (arm_num_regs): Define.
17395 (arm_regmap): Renamed from regmap, made static.
17396 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17397 made static.
17398 (arm_cannot_store_register): Renamed from cannot_store_register,
17399 made static.
17400 (the_low_target): New.
17401 * linux-i386-low.c (num_regs): Remove.
17402 (i386_num_regs): Define.
17403 (i386_regmap): Renamed from regmap, made static.
17404 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17405 made static.
17406 (i386_cannot_store_register): Renamed from cannot_store_register,
17407 made static.
17408 (the_low_target): New.
17409 * linux-ia64-low.c (num_regs): Remove.
17410 (ia64_num_regs): Define.
17411 (ia64_regmap): Renamed from regmap, made static.
17412 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17413 made static.
17414 (ia64_cannot_store_register): Renamed from cannot_store_register,
17415 made static.
17416 (the_low_target): New.
17417 * linux-m68k-low.c (num_regs): Remove.
17418 (m68k_num_regs): Define.
17419 (m68k_regmap): Renamed from regmap, made static.
17420 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17421 made static.
17422 (m68k_cannot_store_register): Renamed from cannot_store_register,
17423 made static.
17424 (the_low_target): New.
17425 * linux-mips-low.c (num_regs): Remove.
17426 (mips_num_regs): Define.
17427 (mips_regmap): Renamed from regmap, made static.
17428 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17429 made static.
17430 (mips_cannot_store_register): Renamed from cannot_store_register,
17431 made static.
17432 (the_low_target): New.
17433 * linux-ppc-low.c (num_regs): Remove.
17434 (ppc_num_regs): Define.
17435 (ppc_regmap): Renamed from regmap, made static.
17436 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17437 made static.
17438 (ppc_cannot_store_register): Renamed from cannot_store_register,
17439 made static.
17440 (the_low_target): New.
17441 * linux-s390-low.c (num_regs): Remove.
17442 (s390_num_regs): Define.
17443 (s390_regmap): Renamed from regmap, made static.
17444 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17445 made static.
17446 (s390_cannot_store_register): Renamed from cannot_store_register,
17447 made static.
17448 (the_low_target): New.
17449 * linux-sh-low.c (num_regs): Remove.
17450 (sh_num_regs): Define.
17451 (sh_regmap): Renamed from regmap, made static.
17452 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17453 made static.
17454 (sh_cannot_store_register): Renamed from cannot_store_register,
17455 made static.
17456 (the_low_target): New.
17457 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17458 (the_low_target): New.
17459
174602002-04-09 Daniel Jacobowitz <drow@mvista.com>
17461
17462 * Makefile.in: Add stamp-h target.
17463 * configure.in: Create stamp-h.
17464 * configure: Regenerated.
17465
174662002-04-09 Daniel Jacobowitz <drow@mvista.com>
17467
17468 * inferiors.c: New file.
17469 * target.c: New file.
17470 * target.h: New file.
17471 * Makefile.in: Add target.o and inferiors.o. Update
17472 dependencies.
17473 * linux-low.c (inferior_pid): New static variable,
17474 moved from server.c.
17475 (linux_create_inferior): Renamed from create_inferior.
17476 Call add_inferior. Return 0 on success instead of a PID.
17477 (linux_attach): Renamed from myattach.
17478 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17479 (linux_thread_alive): Renamed from mythread_alive.
17480 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17481 child dies.
17482 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17483 (regsets_store_inferior_registers): Correct error message.
17484 Add missing ``return 0''.
17485 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17486 (linux_store_registers): Renamed from store_inferior_registers.
17487 (linux_read_memory): Renamed from read_inferior_memory.
17488 (linux_write_memory): Renamed from write_inferior_memory.
17489 (linux_target_ops): New structure.
17490 (initialize_low): Call set_target_ops ().
17491 * remote-utils.c (unhexify): New function.
17492 (hexify): New function.
17493 (input_interrupt): Send signals to ``signal_pid''.
17494 * server.c (inferior_pid): Remove.
17495 (start_inferior): Update create_inferior call.
17496 (attach_inferior): Call add_inferior.
17497 (handle_query): New function.
17498 (main): Call handle_query for `q' packets.
17499 * server.h: Include "target.h". Remove obsolete prototypes.
17500 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17501
175022002-04-09 Daniel Jacobowitz <drow@mvista.com>
17503
17504 * Makefile.in: Add WARN_CFLAGS. Update configury
17505 dependencies.
17506 * configure.in: Check for <string.h>
17507 * configure: Regenerate.
17508 * config.in: Regenerate.
17509 * gdbreplay.c: Include needed system headers.
17510 (remote_open): Remove strchr prototype.
17511 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17512 * regcache.c (supply_register): Change buf argument to const void *.
17513 (supply_register_by_name): Likewise.
17514 (collect_register): Change buf argument to void *.
17515 (collect_register_by_name): Likewise.
17516 * regcache.h: Add missing prototypes.
17517 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17518 * server.c (handle_query): New function.
17519 (attached): New static variable, moved out of main.
17520 (main): Quiet longjmp clobber warnings.
17521 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17522 * utils.c (error): Remove NORETURN.
17523 (fatal): Likewise.