]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb: Don't skip prologue for explicit line breakpoints in assembler
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
350fab54
AH
12019-07-04 Alan Hayward <alan.hayward@arm.com>
2
3 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4 defines.
5 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
6
2b40fda7
AH
72019-07-04 Alan Hayward <alan.hayward@arm.com>
8
9 * configure.srv: Remove legacy xml.
10 * linux-aarch64-low.c (initialize_low_arch): Remove
11 initialize_low_tdesc call.
12 * linux-aarch64-tdesc-selftest.c: Remove file.
13 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
14 * linux-x86-low.c (initialize_low_arch): Remove
15 initialize_low_tdesc call.
16 * linux-x86-tdesc-selftest.c: Remove file.
17 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
18
7d10623d
TV
192019-06-20 Tom de Vries <tdevries@suse.de>
20
21 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
22 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
23
8d6a48df
TV
242019-06-19 Tom de Vries <tdevries@suse.de>
25
26 * debug.h (debug_write): Change return type to ssize_t.
27 * debug.c (debug_write): Same.
28
73cc7272
TT
292019-06-14 Tom Tromey <tom@tromey.com>
30
31 * configure.ac: Use new path to gnulib.
32 * configure: Rebuild.
33 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
34 to gnulib.
35
08f10e02
TT
362019-06-11 Tom Tromey <tom@tromey.com>
37
38 * Makefile.in (SFILES): Add alloc.c.
39 (OBS): Add alloc.o.
40 (IPA_OBJS): Add alloc-ipa.o.
41 (alloc-ipa.o): New target.
42 (%.o: ../%.c): New pattern rule.
43
422186a9
TT
442019-06-10 Tom Tromey <tromey@adacore.com>
45
46 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
47 end warning with a newline.
48 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
49 newline.
50 * thread-db.c (attach_thread): Don't end warning with a newline.
51 (thread_db_notice_clone): Likewise.
52 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
53 newline.
54 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
55 end warning with a newline.
56
b02f78f9
PA
572019-06-04 Pedro Alves <palves@redhat.com>
58
59 * server.c (captured_main): Use make_unique_xstrdup.
60
88ed7edb
TT
612019-06-02 Tom Tromey <tom@tromey.com>
62
63 * gdbreplay.c (fromhex): Remove.
64 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
65
33a6bc35
TT
662019-05-29 Tom Tromey <tromey@adacore.com>
67
68 * configure: Rebuild.
69
e90a813d
KB
702019-05-06 Kevin Buettner <kevinb@redhat.com>
71
72 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
73 sign extension code on 32-bit builds.
74
353ea2d1
EZ
752019-05-03 Eli Zaretskii <eliz@gnu.org>
76
77 * remote-utils.c:
78 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
79
b494cdff
TT
802019-04-19 Tom Tromey <tom@tromey.com>
81
82 * server.c (struct vstop_notif): Derive from notif_event.
83 <base>: Remove.
84 (queue_stop_reply): Update.
85 (remove_all_on_match_ptid): Change type. Rewrite.
86 (discard_queued_stop_replies): Rewrite.
87 (in_queued_stop_replies_ptid): Change type.
88 (in_queued_stop_replies): Rewrite.
89 (notif_stop): Update.
90 (queue_stop_reply_callback): Update.
91 (captured_main): Don't call initialize_notif.
92 (push_stop_notification): Update.
93 * notif.c (notif_write_event, handle_notif_ack)
94 (notif_event_enque, notif_push): Update.
95 (notif_event_xfree, initialize_notif): Remove.
96 * notif.h (struct notif_event): Include <list>, not
97 "common/queue.h".
98 (struct notif_server) <queue>: Now a std::list.
99 (notif_event_p): Remove typedef.
100 (initialize_notif): Don't declare.
101 (struct notif_event): Add virtual destructor.
102
a7e559cc
AH
1032019-04-17 Alan Hayward <alan.hayward@arm.com>
104
105 * ax.c (ax_vdebug): Call debug_printf.
106 * debug.c (debug_write): New function.
107 * debug.h (debug_write): New declaration.
108 * linux-low.c (sigchld_handler): Call debug_write.
109
aeb2e706
AH
1102019-04-17 Alan Hayward <alan.hayward@arm.com>
111
112 * debug.c (debug_set_output): New function.
113 (debug_vprintf): Send output to debug_file.
114 (debug_flush): Likewise.
115 * debug.h (debug_set_output): New declaration.
116 * server.c (handle_monitor_command): Add debug-file option.
117 (captured_main): Likewise.
118
c1bc0935
AH
1192019-04-17 Alan Hayward <alan.hayward@arm.com>
120
121 * debug.c (remote_debug): Add definition.
122 * debug.h (remote_debug): Add declaration.
123 * hostio.c (remote_debug): Remove declaration.
124 * remote-utils.c (struct ui_file): Likewise.
125 (remote_debug): Likewise.
126 * remote-utils.h (remote_debug): Likewise,
127 * server.c (remote_debug): Remove definition.
128
3f52fdbc
KB
1292019-04-10 Kevin Buettner <kevinb@redhat.com>
130
131 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
132 when using a 64-bit gdbserver.
133
b0319eaa
TT
1342019-04-09 Tom Tromey <tromey@adacore.com>
135
136 * linux-low.c (select_event_lwp): Use find_thread_in_random.
137
eedc3f4f
TT
1382019-04-08 Tom Tromey <tom@tromey.com>
139
140 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
141 throw.
142 (linux_resume_one_lwp): Likewise.
143
230d2906
TT
1442019-04-08 Tom Tromey <tom@tromey.com>
145
146 * gdbreplay.c: Update.
147 * linux-low.c: Update.
148 * server.c: Update.
149
a70b8144
TT
1502019-04-08 Tom Tromey <tom@tromey.com>
151
152 * server.c: Use C++ exception handling.
153 * linux-low.c: Use C++ exception handling.
154 * gdbreplay.c: Use C++ exception handling.
155
3d6e9d23
TT
1562019-04-08 Tom Tromey <tom@tromey.com>
157
158 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
159 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
160 (captured_main, main): Update.
161 * gdbreplay.c (main): Update.
162
0570503d
PFC
1632019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
164
165 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
166 value in argument pointer, return 1 if the entry is found and 0
167 otherwise. Move comment.
168 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
169 * linux-low.h (linux_get_auxv): Declare.
170 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
171
227a9e65
TT
1722019-04-05 Tom Tromey <tromey@adacore.com>
173
174 * server.c (gdbserver_usage): Use upper-case for metasyntactic
175 variables.
176
69f4c9cc
AH
1772019-03-28 Alan Hayward <alan.hayward@arm.com>
178
179 * linux-low.c (AT_HWCAP2): Add define if not already included.
180
974c89e0
AH
1812019-03-26 Alan Hayward <alan.hayward@arm.com>
182
183 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
184 (aarch64_arch_setup): Call linux_get_hwcap.
185 * linux-arm-low.c (arm_get_hwcap): Remove function.
186 (arm_read_description): Call linux_get_hwcap.
187 * linux-low.c (linux_get_auxv): New function.
188 (linux_get_hwcap): Likewise.
189 (linux_get_hwcap2): Likewise.
190 * linux-low.h (linux_get_hwcap): New declaration.
191 (linux_get_hwcap2): Likewise.
192 * linux-ppc-low.c (ppc_get_auxv): Remove function.
193 (ppc_arch_setup): Call linux_get_hwcap.
194 * linux-s390-low.c (s390_get_hwcap): Remove function.
195 (s390_arch_setup): Call linux_get_hwcap.
196
1ef53e6b
AH
1972019-03-22 Alan Hayward <alan.hayward@arm.com>
198 Jiong Wang <jiong.wang@arm.com>
199
200 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
201 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
202 to fail.
203 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
204
ee4fbcfa
AH
2052019-03-22 Alan Hayward <alan.hayward@arm.com>
206 Jiong Wang <jiong.wang@arm.com>
207
208 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
209 (aarch64_get_hwcap): New function.
210 (aarch64_arch_setup): Read APIA hwcap.
211
6dc0ebde
AH
2122019-03-22 Alan Hayward <alan.hayward@arm.com>
213 Jiong Wang <jiong.wang@arm.com>
214
215 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
216 (initialize_low_tracepoint): Likewise.
217 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
218 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
219 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
220 (aarch64_linux_read_description): Likewise.
221 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
222
1163a4b7
JB
2232019-03-12 John Baldwin <jhb@FreeBSD.org>
224
225 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
226 i386_create_target_description for 'segments' parameter.
227 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
228 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
229 * win32-i386-low.c (i386_arch_setup): Likewise.
230
d3a70e03
TT
2312019-03-12 Tom Tromey <tromey@adacore.com>
232
233 * linux-low.c (iterate_over_lwps): Update.
234
37991b4f
TT
2352019-03-06 Tom Tromey <tom@tromey.com>
236
237 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
238 (captured_main): Use SCOPE_EXIT.
239
45950eb6
SDJ
2402019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
241
242 * configure.srv: Use '$enable_unittest' instead of '$development'
243 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
244 case.
245
43ac54fc
TT
2462019-02-27 Tom Tromey <tromey@adacore.com>
247
248 * gdbreplay.c (logchar): Handle \r\n.
249
df0da8a2
AH
2502019-02-07 Alan Hayward <alan.hayward@arm.com>
251
252 * linux-low.c (linux_attach): Add process before lwp.
253 * server.c (attach_inferior): Check if already attached.
254
1a5c2598
TT
2552019-02-07 Tom Tromey <tom@tromey.com>
256
257 * x86-tdesc.h: Rename include guard.
258 * x86-low.h: Add include guard.
259 * wincecompat.h: Rename include guard.
260 * win32-low.h: Add include guard.
261 * utils.h: Rename include guard.
262 * tracepoint.h: Rename include guard.
263 * tdesc.h: Rename include guard.
264 * target.h: Rename include guard.
265 * server.h: Rename include guard.
266 * remote-utils.h: Rename include guard.
267 * regcache.h: Rename include guard.
268 * nto-low.h: Rename include guard.
269 * notif.h: Add include guard.
270 * mem-break.h: Rename include guard.
271 * lynx-low.h: Add include guard.
272 * linux-x86-tdesc.h: Add include guard.
273 * linux-s390-tdesc.h: Add include guard.
274 * linux-ppc-tdesc-init.h: Add include guard.
275 * linux-low.h: Add include guard.
276 * linux-aarch64-tdesc.h: Add include guard.
277 * linux-aarch32-low.h: Add include guard.
278 * inferiors.h: Rename include guard.
279 * i387-fp.h: Rename include guard.
280 * hostio.h: Rename include guard.
281 * gdbthread.h: Rename include guard.
282 * gdb_proc_service.h: Rename include guard.
283 * event-loop.h: Rename include guard.
284 * dll.h: Rename include guard.
285 * debug.h: Rename include guard.
286 * ax.h: Rename include guard.
287
956cc47c
SN
2882018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
289
290 PR gdb/23985
291 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
292 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
293
a0707f3c
TT
2942019-01-25 Tom Tromey <tom@tromey.com>
295
296 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
297
0747795c
TT
2982019-01-25 Tom Tromey <tom@tromey.com>
299
300 * win32-low.c: Fix common/ includes.
301 * win32-i386-low.c: Fix common/ includes.
302 * tracepoint.c: Fix common/ includes.
303 * thread-db.c: Fix common/ includes.
304 * target.h: Fix common/ includes.
305 * symbol.c: Fix common/ includes.
306 * spu-low.c: Fix common/ includes.
307 * server.h: Fix common/ includes.
308 * server.c: Fix common/ includes.
309 * remote-utils.c: Fix common/ includes.
310 * regcache.h: Fix common/ includes.
311 * regcache.c: Fix common/ includes.
312 * nto-x86-low.c: Fix common/ includes.
313 * notif.h: Fix common/ includes.
314 * mem-break.h: Fix common/ includes.
315 * lynx-low.c: Fix common/ includes.
316 * lynx-i386-low.c: Fix common/ includes.
317 * linux-x86-tdesc-selftest.c: Fix common/ includes.
318 * linux-x86-low.c: Fix common/ includes.
319 * linux-low.c: Fix common/ includes.
320 * inferiors.h: Fix common/ includes.
321 * i387-fp.c: Fix common/ includes.
322 * hostio.c: Fix common/ includes.
323 * hostio-errno.c: Fix common/ includes.
324 * gdbthread.h: Fix common/ includes.
325 * gdbreplay.c: Fix common/ includes.
326 * fork-child.c: Fix common/ includes.
327 * event-loop.c: Fix common/ includes.
328 * ax.c:
329 (enum gdb_agent_op): Fix common/ includes.
330
be6d4f74
TT
3312019-01-21 Tom Tromey <tom@tromey.com>
332
333 * tracepoint.c: Fix includes.
334 * remote-utils.c: Fix includes.
335 * linux-x86-low.c: Fix includes.
336
66d91b39
JB
3372019-01-01 Joel Brobecker <brobecker@adacore.com>
338
339 * gdbreplay.c (gdbreplay_version): Update copyright year in
340 version message.
341 * server.c (gdbserver_version): Likewise.
342
754e3168
AH
3432018-12-05 Alan Hayward <alan.hayward@arm.com>
344
345 * linux-low.c (add_lwp): Switch ordering.
346
d105de22
TT
3472018-11-29 Tom Tromey <tom@tromey.com>
348
349 * win32-low.c (win32_join): Take pid, not process.
350 * target.h (struct target_ops) <join>: Change argument type.
351 (join_inferior): Change argument name.
352 * spu-low.c (spu_join): Take pid, not process.
353 * server.c (handle_detach): Preserve pid before destroying
354 process.
355 * lynx-low.c (lynx_join): Take pid, not process.
356 * linux-low.c (linux_join): Take pid, not process.
357
50138245
AH
3582018-11-23 Alan Hayward <alan.hayward@arm.com>
359
360 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
361 (aarch64_cannot_fetch_register): Likewise.
362 (struct linux_target_ops): Update references.
363
64f57f3d
PFC
3642018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
365
366 * linux-ppc-low.c: Include nat/linux-ptrace.h.
367
8d619c01
EBM
3682018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
369
370 * configure.srv (ipa_ppc_linux_regobj): Add
371 powerpc-isa207-htm-vsx32l-ipa.o and
372 powerpc-isa207-htm-vsx64l-ipa.o.
373 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
374 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
375 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
376 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
377 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
378 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
379 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
380 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
381 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
382 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
383 (init_registers_powerpc_isa207_htm_vsx32l)
384 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
385 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
386 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
387 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
388 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
389 (ppc_store_tm_ctarregset): New functions.
390 (ppc_regsets): Add entries for HTM regsets.
391 (ppc_arch_setup): Set htm in features struct when needed. Set
392 sizes for the HTM regsets.
393 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
394 (initialize_low_arch): Call
395 init_registers_powerpc_isa207_htm_vsx32l and
396 init_registers_powerpc_isa207_htm_vsx64l.
397 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
398 PPC_TDESC_ISA207_HTM_VSX.
399 (initialize_low_tracepoint): Call
400 init_registers_powerpc_isa207_htm_vsx32l and
401 init_registers_powerpc_isa207_htm_vsx64l.
402
232bfb86
EBM
4032018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
404
405 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
406 rs6000/power-linux-pmu.xml to srv_xmlfiles.
407 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
408 (ppc_store_pmuregset): New functions.
409 (ppc_regsets): Add entries for ebb and pmu regsets.
410 (ppc_arch_setup): Set isa207 in features struct if the ebb and
411 pmu regsets are available. Set sizes for these regsets.
412
f2cf6173
EBM
4132018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
414
415 * configure.srv (ipa_ppc_linux_regobj): Add
416 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
417 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
418 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
419 rs6000/powerpc-isa207-vsx32l.xml, and
420 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
421 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
422 <PPC_TDESC_ISA207_VSX>: New enum value.
423 (init_registers_powerpc_isa207_vsx32l): Declare.
424 (init_registers_powerpc_isa207_vsx64l): Declare.
425 * linux-ppc-low.c (ppc_fill_tarregset): New function.
426 (ppc_store_tarregset): New function.
427 (ppc_regsets): Add entry for the TAR regset.
428 (ppc_arch_setup): Set isa207 in features struct when needed. Set
429 size for the TAR regsets.
430 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
431 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
432 and init_registers_powerpc_isa207_vsx64l.
433 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
434 (initialize_low_tracepoint): Call
435 init_registers_powerpc_isa207_vsx32l and
436 init_registers_powerpc_isa207_vsx64l.
437
7ca18ed6
EBM
4382018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
439 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
440
441 * configure.srv (ipa_ppc_linux_regobj): Add
442 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
443 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
444 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
445 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
446 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
447 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
448 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
449 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
450 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
451 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
452 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
453 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
454 (ppc_hwcap): Add comment.
455 (ppc_hwcap2): New global.
456 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
457 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
458 (ppc_regsets): Add entries for the DSCR and PPR regsets.
459 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
460 when needed. Set sizes for the the DSCR and PPR regsets.
461 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
462 (initialize_low_arch): Call
463 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
464 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
465 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
466 PPC_TDESC_ISA205_PPR_DSCR_VSX.
467 (initialize_low_tracepoint): Call
468 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
469 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
470
5c849b22
PFC
4712018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
472
473 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
474
8ecfd7bd
SDJ
4752018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
476 Simon Marchi <simark@simark.ca>
477
478 * acinclude.m4: Include "../selftest.m4".
479 * configure: Regenerate.
480 * configure.ac: Use "GDB_AC_SELFTEST".
481 * configure.srv: Use "$enable_unittests" instead of
482 "$development" when checking whether unit tests have been
483 enabled.
484 * server.c (captured_main): Update message informing that
485 selftests have been disabled.
486
96643e35
TT
4872018-10-04 Tom Tromey <tom@tromey.com>
488
489 * configure: Rebuild.
490
da4ae14a
TT
4912018-10-04 Tom Tromey <tom@tromey.com>
492
493 * server.c (handle_status): Rename inner "thread".
494 (process_serial_event): Declare "res" in 'm' case.
495 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
496 (iterate_over_lwps): Rename inner "thread".
497 (linux_qxfer_libraries_svr4): Rename inner "len".
498 * gdbthread.h (find_thread_in_random): Rename inner "thread".
499
7c619dbd
GB
5002018-10-01 Gary Benson <gbenson@redhat.com>
501
502 * gdb_proc_service.h: Moved common code to
503 common/gdb_proc_service.h.
504
3795e814
GB
5052018-10-01 Gary Benson <gbenson@redhat.com>
506
507 * gdb_proc_service.h: Synchronize comments and whitespace with
508 GDB's version of this file.
509
49b036f1
TT
5102018-09-25 Tom Tromey <tom@tromey.com>
511
512 * configure: Rebuild.
513 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
514
8ff03f0b
SM
5152018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
516
517 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
518 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
519 ($(IPA_LIB)): Sort IPA_OBJS.
520
a1cd91dc
SM
5212018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
522
523 * Makefile.in: Remove references to $(ADD_DEPS).
524
752312ba
TT
5252018-09-16 Tom Tromey <tom@tromey.com>
526
527 * remote-utils.c (remote_open): Use GNU style for metasyntactic
528 variables.
529 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
530 variables.
531
f1628857
TT
5322018-09-05 Tom Tromey <tom@tromey.com>
533
534 * configure: Rebuild.
535
ad202fcc
SM
5362018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
537
538 PR build/23399
539 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
540
d3d8724a
TT
5412018-08-27 Tom Tromey <tom@tromey.com>
542
543 PR build/23087:
544 * configure: Rebuild.
545
b4f183d2
TT
5462018-08-27 Tom Tromey <tom@tromey.com>
547
548 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
549 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
550 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
551 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
552 (s390x_emit_stack_adjust): Add casts to unsigned char.
553
4e2aa472
SM
5542018-08-22 Simon Marchi <simon.marchi@ericsson.com>
555
556 PR gdb/23374
557 PR gdb/23375
558 * server.h (struct client_state) <disable_randomization>:
559 Initialize to 1.
560
cf4088a9
SM
5612018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
562
563 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
564 variable.
565 (mips_supply_ptrace_register): Likewise.
566
a0de763e
TT
5672018-07-22 Tom Tromey <tom@tromey.com>
568
569 * configure: Rebuild.
570
b0a7723d
TT
5712018-07-22 Tom Tromey <tom@tromey.com>
572
573 * win32-low.c (win32_create_inferior): Remove unused variables.
574 * gdbreplay.c (remote_open): Remove unused variable.
575 * remote-utils.c (remote_prepare): Remove unused variable.
576 * x86-tdesc.h (X86_TDESC_H): Define.
577 (amd64_expedite_regs): Define conditionally.
578 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
579 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
580 * remote-utils.c (readchar): Remove unused variable.
581
a780ef4f
PA
5822018-07-13 Pedro Alves <palves@redhat.com>
583
584 * linux-low.c (linux_kill): Change parameter to process_info
585 pointer instead of pid. Adjust.
586 * lynx-low.c (lynx_kill): Likewise.
587 * nto-low.c (nto_kill): Likewise.
588 * spu-low.c (spu_kill): Likewise.
589 * win32-low.c (win32_kill): Likewise.
590 * server.c (handle_v_kill, kill_inferior_callback)
591 (detach_or_kill_for_exit): Adjust.
592 * target.c (kill_inferior): Change parameter to process_info
593 pointer instead of pid. Adjust.
594 * target.h (struct target_ops) <kill>: Change parameter to
595 process_info pointer instead of pid. Adjust all implementations
596 and callers.
597 (kill_inferior): Likewise.
598
ef2ddb33
PA
5992018-07-13 Pedro Alves <palves@redhat.com>
600
601 * linux-low.c (linux_detach, linux_join): Change parameter to
602 process_info pointer instead of pid. Adjust.
603 * lynx-low.c (lynx_detach, lynx_join): Likewise.
604 * nto-low.c (nto_detach): Likewise.
605 * spu-low.c (spu_detach, spu_join): Likewise.
606 * win32-low.c (win32_detach, win32_join): Likewise.
607 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
608 * target.h (struct target_ops) <detach, join>: Change parameter to
609 process_info pointer instead of pid. Adjust all implementations
610 and callers.
611 (detach_inferior, join_inferior): Rename 'pid' parameter to
612 'proc'.
613
c7ab0aef
SDJ
6142018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
615 Jan Kratochvil <jan.kratochvil@redhat.com>
616 Paul Fertser <fercerpav@gmail.com>
617 Tsutomu Seki <sekiriki@gmail.com>
618
619 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
620 (OBS): Add 'common/netstuff.o'.
621 (GDBREPLAY_OBS): Likewise.
622 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
623 (remote_open): Implement support for IPv6
624 connections.
625 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
626 and 'wspiapi.h'.
627 (handle_accept_event): Accept connections from IPv6 sources.
628 (remote_prepare): Handle IPv6-style hostnames; implement
629 support for IPv6 connections.
630 (remote_open): Implement support for printing connections from
631 IPv6 sources.
632
31445d10
PA
6332018-07-11 Pedro Alves <palves@redhat.com>
634
635 PR gdb/23377
636 * mem-break.c (any_persistent_commands): Add process_info
637 parameter and use it instead of relying on the current process.
638 Change return type to bool.
639 * mem-break.h (any_persistent_commands): Add process_info
640 parameter and change return type to bool.
641 * server.c (handle_detach): Remove require_running_or_return call.
642 Look up the process_info for the process we're about to detach.
643 If not found, return back error to GDB. Adjust
644 any_persistent_commands call to pass down a process pointer.
645
cb197132
PA
6462018-07-11 Pedro Alves <palves@redhat.com>
647
648 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
649 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
650 instead of collect_register_by_name.
651 * regcache.c (regcache_raw_get_unsigned_by_name): New.
652 * regcache.h (regcache_raw_get_unsigned_by_name): New.
653
1b919490
VB
6542018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
655 Pedro Alves <palves@redhat.com>
656
657 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
658
d7e15655
TT
6592018-07-03 Tom Tromey <tom@tromey.com>
660
661 * linux-low.c: Update.
662 * lynx-low.c: Update.
663 * mem-break.c: Update.
664 * nto-low.c: Update.
665 * remote-utils.c: Update.
666 * server.c: Update.
667 * spu-low.c: Update.
668 * target.c: Update.
669 * win32-low.c: Update.
670
26a57c92
TT
6712018-07-03 Tom Tromey <tom@tromey.com>
672
673 * server.c: Update.
674
0e998d96
TT
6752018-07-03 Tom Tromey <tom@tromey.com>
676
677 * linux-low.c: Update.
678
cc6bcb54
TT
6792018-07-03 Tom Tromey <tom@tromey.com>
680
681 * target.c: Update.
682
e38504b3
TT
6832018-07-03 Tom Tromey <tom@tromey.com>
684
685 * linux-low.c: Update.
686 * linux-mips-low.c: Update.
687 * lynx-low.c: Update.
688 * nto-low.c: Update.
689 * remote-utils.c: Update.
690 * server.c: Update.
691 * spu-low.c: Update.
692 * target.c: Update.
693 * thread-db.c: Update.
694
e99b03dc
TT
6952018-07-03 Tom Tromey <tom@tromey.com>
696
697 * linux-low.c: Update.
698 * linux-mips-low.c: Update.
699 * lynx-low.c: Update.
700 * mem-break.c: Update.
701 * nto-low.c: Update.
702 * remote-utils.c: Update.
703 * server.c: Update.
704 * spu-low.c: Update.
705 * target.c: Update.
706 * tracepoint.c: Update.
707
f2907e49
TT
7082018-07-03 Tom Tromey <tom@tromey.com>
709
710 * linux-low.c: Update.
711 * linux-ppc-low.c: Update.
712 * linux-x86-low.c: Update.
713 * proc-service.c: Update.
714 * server.c: Update.
715 * spu-low.c: Update.
716 * thread-db.c: Update.
717 * win32-low.c: Update.
718
fd79271b
TT
7192018-07-03 Tom Tromey <tom@tromey.com>
720
721 * linux-low.c: Update.
722 * lynx-low.c: Update.
723 * nto-low.c: Update.
724 * remote-utils.c: Update.
725 * spu-low.c: Update.
726 * thread-db.c: Update.
727 * win32-low.c: Update.
728
c0867626
SDJ
7292018-06-29 Joel Brobecker <brobecker@adacore.com>
730
731 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
732 parameter in call to 'amd64_create_target_description'.
733
2512d7ef
JK
7342018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
735
736 * x86-tdesc.h: Remove executable permission flag.
737
d0ac1c44
SM
7382018-06-19 Simon Marchi <simon.marchi@ericsson.com>
739
740 * configure.ac: Remove AC_PREREQ, add missing quoting.
741 * configure: Re-generate.
742 * config.in: Re-generate.
743 * aclocal.m4: Re-generate.
744
c4eb05ff
SM
7452018-06-18 Simon Marchi <simon.marchi@ericsson.com>
746
747 * tracepoint.h (current_traceframe): Remove declaration.
748
02895270
AH
7492018-06-18 Alan Hayward <alan.hayward@arm.com>
750
751 * linux-aarch64-low.c (is_sve_tdesc): New function.
752 (aarch64_sve_regs_copy_to_regcache): Likewise.
753 (aarch64_sve_regs_copy_from_regcache): Likewise.
754 (aarch64_regs_info): Add SVE checks.
755 (initialize_low_arch): Initialize SVE.
756
e9902bfc
AH
7572018-06-18 Alan Hayward <alan.hayward@arm.com>
758
759 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
760
fefa175e
AH
7612018-06-11 Alan Hayward <alan.hayward@arm.com>
762
763 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
764 (initialize_low_tracepoint): Likewise
765 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
766 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
767 param.
768 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
769 checks.
770 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
771
b91ad3ff
AH
7722018-06-11 Alan Hayward <alan.hayward@arm.com>
773
774 * server.h (PBUFSIZ): Increase size
775
f868386e
AH
7762018-06-11 Alan Hayward <alan.hayward@arm.com>
777
778 * regcache.c (regcache::raw_compare): New function.
779 * regcache.h (regcache::raw_compare): New declaration.
780
9c861883
AH
7812018-06-11 Alan Hayward <alan.hayward@arm.com>
782
783 * regcache.c (new_register_cache): Use new.
784 (free_register_cache): Use delete.
785 (register_data): Use const.
786 (supply_register): Move body inside regcache.
787 (regcache::raw_supply): New override function.
788 (collect_register): Move body inside regcache.
789 (regcache::raw_collect): New override function.
790 (regcache::get_register_status): New override function.
791 * regcache.h (struct regcache): Inherit from reg_buffer_common.
792
40591844
TT
7932018-06-09 Tom Tromey <tom@tromey.com>
794
795 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
796 declare queue.
797 (event_queue): Use std::queue.
798 (gdb_event_xfree): Remove.
799 (initialize_event_loop, process_event, wait_for_event): Update.
800
6341380d
SC
8012018-06-08 Stan Cox <scox@redhat.com>
802
803 * win32-low.c (win32_create_inferior): last_ptid and last_status
804 moved to client_state.
805
03349c93
PA
8062018-06-08 Pedro Alves <palves@redhat.com>
807
808 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
809 common/common-exceptions.o, common/common-utils.o,
810 common/errors.o, common/print-utils.o and utils.o.
811 * gdbreplay.c: Include "common-defs.h" instead of the two
812 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
813 string.h or alloca.h.
814 (perror_with_name): Delete.
815 (remote_open): Use xstrdup instead of strdup.
816 (main): Rename to ...
817 (captured_main): ... this.
818 (main): New.
819
8dcc53b3
TT
8202018-06-08 Tom Tromey <tom@tromey.com>
821
822 * linux-low.c (linux_low_read_btrace): Update.
823
c12a5089
SC
8242018-06-04 Stan Cox <scox@redhat.com>
825
826 * server.h (struct client_state): New.
827 * server.c (cont_thread, general_thread, multi_process)
828 (report_fork_events, report_vfork_events, report_exec_events)
829 (report_thread_events, swbreak_feature, hwbreak_feature)
830 (vCont_supported, disable_randomization, pass_signals)
831 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
832 Moved to client_state.
833 * remote-utils.c (remote_debug, noack_mode)
834 (transport_is_reliable): Moved to client_state.
835 * tracepoint.c (current_traceframe): Moved to client_state.
836
837 Update all callers.
838 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
839 linux-low.c, remote-utils.h, target.c: Use client_state.
840
122394f1
AH
8412018-05-31 Alan Hayward <alan.hayward@arm.com>
842
843 * configure.srv: Add new c/h file.
844
95228a0d
AH
8452018-05-31 Alan Hayward <alan.hayward@arm.com>
846
847 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
848 null VQ.
849
d8dab6c3
MR
8502018-05-25 Maciej W. Rozycki <macro@mips.com>
851
852 * gdb.arch/mips-fpregset-core.exp: New test.
853 * gdb.arch/mips-fpregset-core.c: New test source.
854
81e25b7c
EK
8552018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
856
857 PR server/23198
858 * hostio.c (require_int): Do not report overflow for integers
859 between 0xfffffff and 0x7fffffff.
860
7e947ad3
MR
8612018-05-22 Maciej W. Rozycki <macro@mips.com>
862
863 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
864 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
865 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
866 functions.
867 (the_low_target): Wire them.
868
1d75a658
PFC
8692018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
870
871 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
872 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
873 mode. Call collect_register_by_name with vscr using
874 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
875 (ppc_store_vrregset): Add and set vscr_offset variable as in
876 ppc_fill_vrregset. Call supply_register_by_name with vscr using
877 vscr_offset.
878
d078308a
PFC
8792018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
880
881 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
882 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
883 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
884
7273b5fc
PFC
8852018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
886
887 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
888 (ppc_store_vsxregset): Likewise.
889 (ppc_fill_vrregset): Likewise.
890 (ppc_store_vrregset): Likewise.
891 (ppc_fill_evrregset): Likewise.
892 (ppc_store_evrregset): Likewise.
893 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
894 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
895 needed.
896
2e077f5e
PFC
8972018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
898
899 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
900 wordsize of the inferior. Call ppc_linux_target_wordsize.
901
bd64614e
PFC
9022018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
903
904 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
905 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
906 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
907 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
908 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
909 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
910 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
911 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
912 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
913 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
914 (tdesc_powerpc_e500l): Remove.
915 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
916 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
917 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
918 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
919 linux-ppc-tdesc.h.
920 (ppc_arch_setup): Remove target description matching code. Fill a
921 ppc_linux_features struct and call ppc_linux_match_description
922 with it.
923
75d74cca
MR
9242018-05-22 Maciej W. Rozycki <macro@mips.com>
925
926 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
927 width of the requested register exceeds the width of the
928 `ptrace' data type.
929 (mips_cannot_store_register): Likewise.
930
e4439e43
MR
9312018-05-21 Maciej W. Rozycki <macro@mips.com>
932
933 * linux-mips-low.c (mips_fetch_register): New function. Update
934 preceding comment.
935 (mips_store_gregset): Supply 0 rather than $restart for $zero.
936 (the_low_target): Wire `mips_fetch_register'.
937
55271bf9
JB
9382018-05-10 Joel Brobecker <brobecker@adacore.com>
939
940 * lynx-i386-low.c (LYNXOS_178): New macro.
941 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
942 the layout on LynxOS-178.
943 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
944 handle floating point registers that are not supported by
945 LynxOS-178.
946
1a34f210
TT
9472018-05-10 Tom Tromey <tom@tromey.com>
948
949 * configure: Rebuild.
950
190852c8
JB
9512018-05-10 Joel Brobecker <brobecker@adacore.com>
952
953 PR server/23158:
954 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
955 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
956 Use it to set the expedite_regs field in the given tdesc.
957 * x86-tdesc.h: New file.
958 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
959 Adjust following the addition of the new expedite_regs parameter
960 to init_target_desc.
961 * linux-tic6x-low.c (tic6x_read_description): Likewise.
962 * linux-x86-tdesc.c: #include "x86-tdesc.h".
963 (i386_linux_read_description, amd64_linux_read_description):
964 Adjust following the addition of the new expedite_regs parameter
965 to init_target_desc.
966 * lynx-i386-low.c: #include "x86-tdesc.h".
967 (lynx_i386_arch_setup): Adjust following the addition of the new
968 expedite_regs parameter to init_target_desc.
969 * nto-x86-low.c: #include "x86-tdesc.h".
970 (nto_x86_arch_setup): Adjust following the addition of the new
971 expedite_regs parameter to init_target_desc.
972 * win32-i386-low.c: #include "x86-tdesc.h".
973 (i386_arch_setup): Adjust following the addition of the new
974 expedite_regs parameter to init_target_desc.
975
7dbac825
JB
9762018-05-10 Joel Brobecker <brobecker@adacore.com>
977
978 PR server/23158:
979 * win32-low.c (win32_create_inferior): Add call to my_wait
980 setting last_status global.
981
906994d9
JB
9822018-05-10 Joel Brobecker <brobecker@adacore.com>
983
984 PR server/23158:
985 * win32-low.c (create_process): Only call gdb_tilde_expand if
986 inferior_cwd is not NULL.
987
8ee22052
AB
9882018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
989
990 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
991 registers to the cache if their values have changed.
992 (i387_xsave_to_cache): Provide default values for x87 control
993 registers when these features are available, but disabled.
994 * regcache.c (supply_register_by_name_zeroed): New function.
995 * regcache.h (supply_register_by_name_zeroed): Declare new
996 function.
997
aff689d3
TT
9982018-05-07 Tom Tromey <tom@tromey.com>
999
1000 * configure: Rebuild.
1001
85e26832
TT
10022018-05-04 Tom Tromey <tom@tromey.com>
1003
1004 * configure: Rebuild.
1005
a3b60e45
JK
10062018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1007 Pedro Alves <palves@redhat.com>
1008
1009 * linux-aarch64-low.c (aarch64_stopped_data_address):
1010 Likewise.
1011
632e107b
TT
10122018-04-27 Tom Tromey <tom@tromey.com>
1013
1014 * configure: Rebuild.
1015
458412c3
TT
10162018-04-23 Tom Tromey <tom@tromey.com>
1017
1018 * configure: Rebuild.
1019
f31c089e
SM
10202018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1021
1022 * Makefile.in (depcomp): Add "..".
1023 (all_deps_files): New and use it.
1024
b319b098
AH
10252018-04-18 Alan Hayward <alan.hayward@arm.com>
1026
1027 * configure.srv (aarch64*-*-linux*): Don't include xml.
1028 (i[34567]86-*-cygwin*): Likewise.
1029 (i[34567]86-*-linux*): Likewise.
1030 (i[34567]86-*-lynxos*): Likewise.
1031 (i[34567]86-*-mingw32ce*): Likewise.
1032 (i[34567]86-*-mingw*): Likewise.
1033 (i[34567]86-*-nto*): Likewise.
1034 (tic6x-*-uclinux): Likewise.
1035 (x86_64-*-linux*): Likewise.
1036 (x86_64-*-mingw*): Likewise.
1037 (x86_64-*-cygwin*): Likewise.
1038
3b74854b
AH
10392018-04-18 Alan Hayward <alan.hayward@arm.com>
1040
1041 * tdesc.c: Remove xml parameter.
1042
e98577a9
AH
10432018-04-18 Alan Hayward <alan.hayward@arm.com>
1044
1045 * server.c (get_features_xml): Remove cast.
1046 * tdesc.c (void target_desc::accept): Fill in function.
1047 (tdesc_get_features_xml): Remove old xml creation.
1048 (print_xml_feature::visit_pre): Add xml vistor.
1049 * tdesc.h (struct target_desc): Make xmltarget mutable.
1050 (tdesc_get_features_xml): Remove declaration.
1051
d278f585
AH
10522018-04-18 Alan Hayward <alan.hayward@arm.com>
1053
1054 * tdesc.c (tdesc_architecture_name): Add new function.
1055 (tdesc_osabi_name): Likewise.
1056 (tdesc_get_features_xml): Use new functions.
1057
eee8a18d
AH
10582018-04-18 Alan Hayward <alan.hayward@arm.com>
1059
1060 * tdesc.c (tdesc_create_flags): Remove.
1061 (tdesc_add_flag): Likewise.
1062 (tdesc_named_type): Likewise.
1063 (tdesc_create_union): Likewise.
1064 (tdesc_create_struct): Likewise.
1065 (tdesc_create_vector): Likewise.
1066 (tdesc_add_bitfield): Likewise.
1067 (tdesc_add_field): Likewise.
1068 (tdesc_set_struct_size): Likewise.
1069
82ec9bc7
AH
10702018-04-18 Alan Hayward <alan.hayward@arm.com>
1071
1072 * tdesc.c (~target_desc): Remove implictly deleted items.
1073 (init_target_desc): Iterate all features.
1074 (tdesc_get_features_xml): Use vector.
1075 (tdesc_create_feature): Create feature.
1076 * tdesc.h (tdesc_feature) Remove
1077 (target_desc): Add features.
1078
ea3e7d71
AH
10792018-04-18 Alan Hayward <alan.hayward@arm.com>
1080
1081 * Makefile.in: Add common/tdesc.c
1082 * tdesc.c (init_target_desc): init all reg_defs from register
1083 vector.
1084 (tdesc_create_reg): Create tdesc_reg.
1085 * tdesc.h (tdesc_feature): Add register vector.
1086
17d08cd4
SM
10872018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1088
1089 * tdesc.h (struct target_desc) <features>: Change type to
1090 std::vector<std::string>.
1091 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1092 changes.
1093 (tdesc_get_features_xml): Likewise.
1094 (tdesc_create_feature): Likewise.
1095
5cd3e386
AH
10962018-03-26 Alan Hayward <alan.hayward@arm.com>
1097
1098 * regcache.c (find_register_by_number): Return a ref.
1099 (find_regno): Use references.
1100 (register_size): Likewise.
1101 (register_data): Likewise.
1102 * tdesc.c (target_desc::~target_desc): Remove free calls.
1103 (target_desc::operator==): Use std::vector compare.
1104 (init_target_desc): Use reference.
1105 (tdesc_create_reg): Use reg constructors.
1106 * tdesc.h (struct target_desc): Replace pointer with object.
1107
dff7492c
AH
11082018-03-23 Alan Hayward <alan.hayward@arm.com>
1109
1110 * regcache.c (find_register_by_number): Make static.
1111 (find_regno): Use find_register_by_number
1112 * regcache.h (struct reg): Remove declaration.
1113
d80e5242
AH
11142018-03-23 Alan Hayward <alan.hayward@arm.com>
1115
1116 * tdesc.c (target_desc::~target_desc): Move to here.
1117 (target_desc::operator==): Likewise.
1118 * tdesc.h (target_desc::~target_desc): Move from here.
1119 (target_desc::operator==): Likewise.
1120
f69c5afb
AA
11212018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1122
1123 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1124
ce29f843
AA
11252018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1126
1127 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1128 S390_TDESC_GS.
1129 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1130 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1131 and init_registers_s390_gs_linux64.
1132
c49bd90b
AA
11332018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1134
1135 * linux-s390-low.c (s390_fill_gs): Remove function.
1136 (s390_fill_gsbc): Remove function.
1137 (s390_regsets): Set fill functions for the guarded storage regsets
1138 to NULL.
1139
7edb9bd3
AA
11402018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1141
1142 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1143 the word size. Add comment.
1144 (s390_get_wordsize): New function.
1145 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1146 pswm with it. Instead, use s390_get_wordsize to determine the
1147 word size first and derive the correct tdesc from that directly.
1148
39be3c7e
SM
11492018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1150
1151 * Makefile.in: Include silent-rules.mk.
1152 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1153 (COMPILE): Add ECHO_CXX.
1154 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1155 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1156 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1157 (version-generated.c): Add ECHO_GEN.
1158 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1159 (IPAGENT_COMPILE): Add ECHO_CXX.
1160 (%-generated.c): Add ECHO_REGDAT.
1161
3ae9ce5d
TT
11622018-03-14 Tom Tromey <tom@tromey.com>
1163
1164 PR cli/14977:
1165 * ax.c (ax_printf): Special case for NULL.
1166
e6a58aa8
SM
11672018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1168
1169 * linux-low.c (linux_qxfer_libraries_svr4): Use
1170 xml_escape_text_append.
1171
f6e8a41e
SM
11722018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1173
1174 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1175
b9671caf
SM
11762018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1177
1178 * server.c (handle_general_set): Remove unnecessary xstrdup.
1179
e80aaf61
SM
11802018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1181
1182 * server.c (parse_debug_format_options): Adjust to
1183 delim_string_to_char_ptr_vec changes.
1184 * thread-db.c (thread_db_load_search): Adjust to
1185 dirnames_to_char_ptr_vec changes.
1186
b1223e78
MM
11872018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1188
1189 * target.h (target_enable_btrace, target_disable_btrace)
1190 (target_read_btrace, target_read_btrace_conf): Turn macro into
1191 inline function. Throw error if target method is not defined.
1192 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1193 check for btrace target method. Be prepared to handle exceptions
1194 from btrace target methods.
1195
81561546
SDJ
11962018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1197
1198 * server.c (captured_main): Change order of error message printed
1199 when the current working directory cannot be found.
1200
25e3c82c
SDJ
12012018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1202
1203 * server.c: Include "filenames.h" and "pathstuff.h".
1204 (program_name): Delete variable.
1205 (program_path): New anonymous class.
1206 (get_exec_wrapper): Use "program_path" instead of
1207 "program_name".
1208 (handle_v_run): Likewise.
1209 (captured_main): Likewise.
1210 (process_serial_event): Likewise.
1211
b4987c95
SDJ
12122018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1213
1214 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1215 (OBJS): Add "pathstuff.o".
1216 * server.c (current_directory): New global variable.
1217 (captured_main): Initialize "current_directory".
1218
f46cd62a
AH
12192018-02-26 Alan Hayward <alan.hayward@arm.com>
1220
1221 * tdesc.c: Use common/tdesc.h.
1222 * tdesc.h: Likewise.
1223
a543c5ca
AH
12242018-02-20 Alan Hayward <alan.hayward@arm.com>
1225 Simon Marchi <simon.marchi@ericsson.com>
1226
1227 * Makefile.in: Switch order of make rules.
1228
b5884fa7
AH
12292018-02-19 Alan Hayward <alan.hayward@arm.com>
1230
1231 * Makefile.in: Add common directory in build.
1232 * configure.ac: Add common reference.
1233 * configure: Regenerate.
1234
de6242d3
MM
12352018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1236
1237 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1238 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1239 * spu-low.c (spu_target_ops): Likewise.
1240 * win32-low.c (win32_target_ops): Likewise.
1241 * server.c (supported_btrace_packets): Report packets unconditionally.
1242 * target.h (target_ops) <supports_btrace>: Remove.
1243 (target_supports_btrace): Remove.
1244
9ee23a85
MM
12452018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1246
1247 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1248 (handle_btrace_disable): Change return type to void. Use exceptions
1249 to report errors.
1250 (handle_btrace_general_set): Catch exception and copy message to
1251 return message.
1252
8ce47547
TT
12532018-02-08 Tom Tromey <tom@tromey.com>
1254
1255 * linux-low.c (install_software_single_step_breakpoints): Use
1256 make_scoped_restore.
1257 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1258 (do_restore_current_thread_cleanup): Remove.
1259 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1260 declare.
1261
45dd3607
TT
12622018-02-08 Tom Tromey <tom@tromey.com>
1263
1264 * mem-break.c (set_raw_breakpoint_at): Use
1265 gdb::unique_xmalloc_ptr.
1266
e671cd59
PA
12672018-01-30 Pedro Alves <palves@redhat.com>
1268
1269 PR gdb/13211
1270 * target.c (target_terminal::terminal_state): Rename to ...
1271 (target_terminal::m_terminal_state): ... this.
1272
a0aad537
JC
12732018-01-19 James Clarke <jrtc27@jrtc27.com>
1274
1275 * linux-low.c (handle_extended_wait): Surround call to
1276 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1277
4d9b86e1
SM
12782018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1281 linux_ptrace_attach_fail_reason_string now returning an
1282 std::string.
1283 (linux_attach): Likewise.
1284 * thread-db.c (attach_thread): Likewise.
1285
f517c180
EA
12862018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1287
1288 PR gdb/21559
1289 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1290 checking for fs_base/gs_base fields in struct user_regs_struct.
1291 * configure: Regenerate.
1292
9a70f35c
YQ
12932018-01-16 Yao Qi <yao.qi@linaro.org>
1294
1295 PR gdb/18749
1296 * linux-low.c (fetch_register): Call supply_register instead of
1297 error.
1298
605fd3c6
YQ
12992018-01-08 Yao Qi <yao.qi@linaro.org>
1300 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * Makefile.in (OBS): Remove selftest.o.
1303 * configure.ac: Set srv_selftest_objs if $development is true.
1304 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1305 * configure: Re-generated.
1306 * server.c (captured_main): Wrap variable selftest_filter with
1307 GDB_SELF_TEST.
1308
2cc05030
SM
13092018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1310
1311 * server.c (parse_debug_format_options): Return std::string.
1312 (handle_monitor_command, captured_main): Adjust.
1313
e379cee6
PA
13142018-01-05 Pedro Alves <palves@redhat.com>
1315
1316 PR gdb/18653
1317 * server.c (captured_main): Pass quiet=false to
1318 save_original_signals_state.
1319
82e1e79a
JB
13202018-01-01 Joel Brobecker <brobecker@adacore.com>
1321
1322 * gdbreplay.c (gdbreplay_version): Update copyright year in
1323 version message.
1324 * server.c (gdbserver_version): Likewise.
1325
8e481c3b
TT
13262017-12-08 Tom Tromey <tom@tromey.com>
1327
1328 * ax.c (ax_printf): Update.
1329
a8806230
YQ
13302017-12-07 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1333 aarch64_linux_read_description.
1334 * linux-amd64-ipa.c (idx2mask): New array.
1335 (get_ipa_tdesc): Move idx2mask out.
1336 (initialize_low_tracepoint): Initialize target descriptions.
1337 * linux-i386-ipa.c (idx2mask): New array.
1338 (get_ipa_tdesc): Move idx2mask out.
1339 (initialize_low_tracepoint): Initialize target descriptions.
1340
d4a0e8b5
SM
13412017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1342
1343 * tdesc.c (struct tdesc_type): Change return type.
1344 (tdesc_add_flag): Change parameter type.
1345 (tdesc_add_bitfield): Likewise.
1346 (tdesc_add_field): Likewise.
1347 (tdesc_set_struct_size): Likewise.
1348
798a7429
SM
13492017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1350
1351 * regcache.c (registers_to_string): Remove unused variable.
1352
c0e15c9b
SM
13532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1354
1355 * inferiors.c (for_each_inferior_with_data): Remove.
1356 * inferiors.h (for_each_inferior_with_data): Remove.
1357 * server.c (handle_qxfer_threads_worker): Change parameter type.
1358 (handle_qxfer_threads_proper): Use for_each_thread.
1359
f0045347
SM
13602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1361
1362 * inferiors.c (for_each_inferior): Remove.
1363 (clear_inferiors): Use for_each_thread.
1364 * inferiors.h (for_each_inferior): Remove.
1365 * linux-low.c (linux_wait_for_event_filtered): Use
1366 for_each_thread.
1367 (linux_stabilize_threads): Likewise.
1368 * regcache.c (regcache_release): Likewise.
1369 * server.c (gdb_wants_all_threads_stopped): Likewise.
1370 (clear_pending_status_callback): Remove.
1371 (handle_status): Use for_each_thread.
1372 (captured_main): Likewise.
1373 * win32-low.c (child_init_thread_list): Likewise.
1374 (win32_clear_inferiors): Likewise.
1375 (fake_breakpoint_event): Likewise.
1376
9521758b
SM
13772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1378
1379 * inferiors.h (find_inferior): Remove.
1380 * inferiors.c (find_inferior): Remove.
1381
8f86d7aa
SM
13822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1383
1384 * linux-low.c (resume_status_pending_p): Update comment.
1385 (need_step_over_p): Update comment.
1386
e2b44075
SM
13872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1388
1389 * linux-low.c (proceed_one_lwp): Return void, change parameter
1390 type.
1391 (unsuspend_and_proceed_one_lwp): Likewise.
1392 (proceed_all_lwps): Use for_each_thread.
1393 (unstop_all_lwps): Likewise.
1394
c80825ff
SM
13952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1396
1397 * linux-low.c (linux_resume_one_thread): Return void, take
1398 parameter directly.
1399 (linux_resume): Use for_each_thread.
1400
df3e4dbe
SM
14012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1402
1403 * linux-low.c (send_sigstop_callback): Return void, change
1404 parameter type. Rename to...
1405 (send_sigstop): ... this.
1406 (suspend_and_send_sigstop_callback): Return void, change parameter
1407 type. Rename to...
1408 (suspend_and_send_sigstop): ... this.
1409 (stop_all_lwps): Use for_each_thread.
1410
5a6b0a41
SM
14112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1412
1413 * linux-low.c (lwp_running): Return bool, remove unused
1414 argument.
1415 (linux_stabilize_threads): Use find_thread.
1416
39a64da5
SM
14172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1418
1419 * linux-low.c (select_singlestep_lwp_callback): Remove.
1420 (count_events_callback): Remove.
1421 (select_event_lwp_callback): Remove.
1422 (select_event_lwp): Use find_thread/for_each_thread.
1423
a1385b7b
SM
14242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1425
1426 * linux-low.c (not_stopped_callback): Return bool, take filter
1427 argument directly.
1428 (linux_wait_for_event_filtered): Use find_thread.
1429 (linux_wait_1): Likewise.
1430
454296a2
SM
14312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1432
1433 * linux-low.c (same_lwp): Remove.
1434 (find_lwp_pid): Use find_thread.
1435
6b2a85da
SM
14362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1437
1438 * linux-low.c (delete_lwp_callback): Remove.
1439 (linux_mourn): Use for_each_thread.
1440
798a38e8
SM
14412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1442
1443 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1444 args parameter, don't check for pid.
1445 (linux_detach): Use for_each_thread.
1446
e4eb0dec
SM
14472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1448
1449 * linux-low.c (struct counter): Remove.
1450 (second_thread_of_pid_p): Remove.
1451 (last_thread_of_process_p): Use find_thread.
1452
83e1b6c1
SM
14532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1454
1455 * inferiors.c (find_inferior_in_random): Remove.
1456 * inferiors.h (find_inferior_in_random): Remove.
1457 * linux-low.c (status_pending_p_callback): Return bool, accept
1458 parameter ptid directly.
1459 (linux_wait_for_event_filtered): Use find_thread_in_random.
1460 (linux_wait_1): Likewise.
1461
8dc7b443
SM
14622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1463
1464 * inferiors.c (find_inferior_id): Remove.
1465 (find_thread_ptid): Move implemention from find_inferior_id to
1466 here.
1467 * inferiors.h (find_inferior_id): Remove.
1468 * server.c (handle_status): Use find_thread_ptid.
1469 (process_serial_event): Likewise.
1470 * thread-db.c (find_one_thread): Likewise.
1471 (thread_db_thread_handle): Likewise.
1472 * win32-low.c (thread_rec): Likewise.
1473 (child_delete_thread): Likewise.
1474 (win32_thread_alive): Likewise.
1475 (get_child_debug_event): Likewise.
1476
da25033c
SM
14772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1478
1479 * linux-mips-low.c (update_watch_registers_callback): Return
1480 void, remove pid_p parameter, don't check for pid.
1481 (mips_insert_point, mips_remove_point): Use for_each_thread.
1482
c91bb56b
SM
14832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1484
1485 * lynx.low (lynx_delete_thread_callback): Remove.
1486 (lynx_mourn): Use for_each_thread.
1487
634a3254
SM
14882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1489
1490 * regcache.c (regcache_invalidate_one): Remove.
1491 (regcache_invalidate_pid): use for_each_thread.
1492
41272101
TT
14932017-11-26 Tom Tromey <tom@tromey.com>
1494
1495 * linux-low.c (linux_create_inferior): Update.
1496
f5291a6f
UW
14972017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1498
1499 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1500
6654d750
AH
15012017-11-24 Alan Hayward <alan.hayward@arm.com>
1502
1503 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1504 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1505 * linux-aarch64-tdesc-selftest.c: New file.
1506 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1507
15082017-11-24 Alan Hayward <alan.hayward@arm.com>
1509
1510 * configure.srv: Add new file.
1511 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1512 * linux-aarch64-tdesc-selftest.c: New file.
1513 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1514
49bdb7ee
AH
15152017-11-24 Alan Hayward <alan.hayward@arm.com>
1516
1517 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1518 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1519 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1520
d6d7ce56
AH
15212017-11-24 Alan Hayward <alan.hayward@arm.com>
1522
1523 * configure.srv: Add new files.
1524 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1525 aarch64_linux_read_description.
1526 * linux-aarch64-low.c (aarch64_linux_read_description):
1527 Merge with aarch64_arch_setup.
1528 (aarch64_arch_setup): Call aarch64_linux_read_description.
1529 * linux-aarch64-tdesc.c: New file.
1530 * linux-aarch64-tdesc.h: New file.
1531
506fe5f4
YQ
15322017-11-24 Yao Qi <yao.qi@linaro.org>
1533
1534 * configure.srv: Set $srv_regobj for tic6x-linux.
1535 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1536 (tic6x_read_description): Move some code to tic6x_arch_setup.
1537 (tic6x_tdesc_test): New function.
1538 (initialize_low_arch): Call selftests::register_test.
1539
29f9a567
YQ
15402017-11-22 Yao Qi <yao.qi@linaro.org>
1541
1542 * remote-utils.c (prepare_resume_reply): Use memcpy.
1543
578290ec
SM
15442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1545
1546 * linux-low.c (kill_one_lwp_callback): Return void, take
1547 argument directly, don't filter on pid.
1548 (linux_kill): Use for_each_thread.
1549
eca55aec
SM
15502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1551
1552 * linux-low.c (need_step_over_p): Return bool, remove dummy
1553 argument.
1554 (linux_resume, proceed_all_lwps): Use find_thread.
1555
25c28b4d
SM
15562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1557
1558 * linux-low.c (resume_status_pending_p): Return bool, remove
1559 flag_p argument.
1560 (linux_resume): Use find_thread.
1561
5fdda392
SM
15622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1563
1564 * linux-low.c (struct thread_resume_array): Remove.
1565 (linux_set_resume_request): Return void, take arguments
1566 directly.
1567 (linux_resume): Use for_each_thread.
1568
fcb056a5
SM
15692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1570
1571 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1572 return bool, remove data argument.
1573 (linux_stabilize_threads): Use find_thread.
1574
139720c5
SM
15752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1576
1577 * linux-low.c (unsuspend_one_lwp): Remove.
1578 (unsuspend_all_lwps): Use for_each_thread, inline code from
1579 unsuspend_one_lwp.
1580
6d1e5673
SM
15812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1582
1583 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1584 * linux-low.c (struct iterate_over_lwps_args): Remove.
1585 (iterate_over_lwps_filter): Remove.
1586 (iterate_over_lwps): Use find_thread.
1587
bbf550d5
SM
15882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1589
1590 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1591 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1592 code from reset_lwp_ptrace_options_callback.
1593
00192f77
SM
15942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1595
1596 * linux-arm-low.c (struct update_registers_data): Remove.
1597 (update_registers_callback): Return void, take arguments
1598 directly, don't check thread's pid.
1599 (arm_insert_point, arm_remove_point): Use for_each_thread.
1600
2bee2b6c
SM
16012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1602
1603 * win32-low.c (continue_one_thread): Return void, take argument
1604 directly.
1605 (child_continue): Use for_each_thread.
1606
0b360f19
SM
16072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1608
1609 * win32-i386-low.c (update_debug_registers_callback): Rename
1610 to ...
1611 (update_debug_registers): ... this, return void, remove pid_p arg.
1612 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1613
f27866ba
SM
16142017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1615
1616 * inferiors.h (struct process_info): Add constructor, initialize
1617 fields..
1618 <syscalls_to_catch>: Change type to std::vector<int>.
1619 * inferiors.c (add_process): Allocate process_info with new.
1620 (remove_process): Free process_info with delete.
1621 * linux-low.c (handle_extended_wait): Adjust.
1622 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1623 * server.c (handle_general_set): Adjust.
1624
e849ea89
PA
16252017-11-16 Pedro Alves <palves@redhat.com>
1626
1627 * remote-utils.c (remote_close): Block SIGIO signals instead of
1628 uninstalling the SIGIO handler.
1629
1d0aa65c
AH
16302017-11-16 Alan Hayward <alan.hayward@arm.com>
1631
1632 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1633
3491a34c
YQ
16342017-11-16 Yao Qi <yao.qi@linaro.org>
1635
1636 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1637 (tic6x_store_gregset): Likewise.
1638 (tic6x_usrregs_info): Move it up.
1639
a602f924
AH
16402017-11-15 Alan Hayward <alan.hayward@arm.com>
1641
1642 * Makefile.in: Update arch rules.
1643 * configure.srv: Explicitly mark arch/ files.
1644
5616b6c3
AS
16452017-11-13 Andreas Schwab <schwab@suse.de>
1646
1647 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1648 function.
1649 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1650
d1928160
PA
16512017-11-06 Pedro Alves <palves@redhat.com>
1652
1653 * config.in, configure: Regenerate.
1654
bac608e7
SM
16552017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1656
1657 * target.c (struct thread_search): Remove.
1658 (thread_search_callback): Remove.
1659 (prepare_to_access_memory): Use for_each_thread instead of
1660 find_inferior. Inline code from thread_search_callback.
1661
eaddb425
SM
16622017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1663
1664 * server.c (struct visit_actioned_threads_data): Remove.
1665 (visit_actioned_threads): Change prototype to take arguments
1666 directly.
1667 (resume): Use find_thread instead of find_inferior.
1668
99078d34
SM
16692017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1670
1671 * server.c (queue_stop_reply_callback): Change prototype, return
1672 void.
1673 (find_status_pending_thread_callback): Remove.
1674 (handle_status): Replace find_inferior with find_thread and
1675 for_each_thread.
1676
cc628f3d
AH
16772017-10-25 Alan Hayward <alan.hayward@arm.com>
1678
1679 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1680 with REGNO.
1681 (aarch64_store_gregset): Likewise.
1682 (aarch64_fill_fpregset): Likewise.
1683 (aarch64_store_fpregset): Likewise.
1684
4d3bb80e
SM
16852017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1686
1687 * gdbthread.h (find_thread, for_each_thread): New functions.
1688 * inferiors.c (thread_of_pid): Remove.
1689 (find_any_thread_of_pid): Use find_thread.
1690 * linux-low.c (num_lwps): Use for_each_thread.
1691
7a7cdfa0
YQ
16922017-10-17 Yao Qi <yao.qi@linaro.org>
1693
1694 * Makefile.in: Remove one rule.
1695 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1696
e675d170
YQ
16972017-10-17 Yao Qi <yao.qi@linaro.org>
1698
1699 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1700 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1701
7eb4e0f9
YQ
17022017-10-17 Yao Qi <yao.qi@linaro.org>
1703
1704 * configure.srv: Rename arm.o with arch/arm.o.
1705
60d6cfc9
YQ
17062017-10-17 Yao Qi <yao.qi@linaro.org>
1707
1708 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1709 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1710 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1711 (arch-i386.o, arch-amd64.o): Remove rules.
1712 (arch/%.o): New rule.
1713 Update POSTCOMPILE and COMPILE.pre.
1714 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1715 * configure: Re-generated.
1716 * configure.srv: Replace arch-i386.o with arch/i386.o.
1717 Replace arch-amd64.o with arch/amd64.o.
1718
5bfda255
YQ
17192017-10-16 Yao Qi <yao.qi@linaro.org>
1720
1721 * configure: Regenerated.
1722
9c80ecd6
SM
17232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1724
1725 * inferiors.h: (struct inferior_list): Remove.
1726 (struct inferior_list_entry); Remove.
1727 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1728 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1729 get_first_inferior): Remove.
1730 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1731 find_inferior_id, find_inferior_in_random): Change signature.
1732 * inferiors.c (all_threads): Change type to
1733 std::list<thread_info *>.
1734 (get_thread): Remove macro.
1735 (find_inferior, find_inferior_id): Change signature, implement
1736 using find_thread.
1737 (find_inferior_in_random): Change signature, implement using
1738 find_thread_in_random.
1739 (for_each_inferior, for_each_inferior_with_data): Change
1740 signature, implement using for_each_thread.
1741 (add_inferior_to_list, remove_inferior): Remove.
1742 (add_thread, get_first_thread, thread_of_pid,
1743 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1744 (get_first_inferior, one_inferior_p, clear_inferior_list):
1745 Remove.
1746 (clear_inferiors, get_thread_process): Update.
1747 * gdbthread.h: Include <list>.
1748 (struct thread_info) <entry>: Remove field.
1749 <id>: New field.
1750 (all_threads): Change type to std::list<thread_info *>.
1751 (get_first_inferior): Add doc.
1752 (find_thread, for_each_thread, find_thread_in_random): New
1753 functions.
1754 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1755 * linux-arm-low.c (update_registers_callback): Update.
1756 * linux-low.c (second_thread_of_pid_p): Update.
1757 (kill_one_lwp_callback, linux_detach_lwp_callback,
1758 delete_lwp_callback, status_pending_p_callback, same_lwp,
1759 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1760 iterate_over_lwps, not_stopped_callback,
1761 resume_stopped_resumed_lwps, count_events_callback,
1762 select_singlestep_lwp_callback, select_event_lwp_callback,
1763 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1764 suspend_and_send_sigstop_callback, wait_for_sigstop,
1765 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1766 lwp_running, linux_set_resume_request, resume_status_pending_p,
1767 need_step_over_p, start_step_over, linux_resume_one_thread,
1768 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1769 reset_lwp_ptrace_options_callback): Update.
1770 * linux-mips-low.c (update_watch_registers_callback): Update.
1771 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1772 Update.
1773 (free_register_cache_thread_one): Remove.
1774 (regcache_release): Update.
1775 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1776 handle_qxfer_threads_worker): Update.
1777 (handle_query): Update, use list iterator.
1778 (visit_actioned_threads, handle_pending_status,
1779 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1780 clear_pending_status_callback, set_pending_status_callback,
1781 find_status_pending_thread_callback, handle_status,
1782 process_serial_event): Update.
1783 * target.c (thread_search_callback): Update.
1784 * thread-db.c (thread_db_get_tls_address): Update.
1785 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1786 Update.
1787 * win32-i386-low.c (update_debug_registers_callback): Update.
1788 * win32-low.c (delete_thread_info, child_delete_thread,
1789 continue_one_thread, suspend_one_thread,
1790 get_child_debug_event): Adjust.
1791
9179355e
SM
17922017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1793
1794 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1795 * inferiors.h: Include <list>.
1796 (struct process_info) <entry>: Remove field.
1797 <pid>: New field.
1798 (pid_of): Change macro to function.
1799 (ptid_of, lwpid_of): Remove macro.
1800 (all_processes): Change type to std::list<process_info *>.
1801 (ALL_PROCESSES): Remove macro.
1802 (for_each_process, find_process): New function.
1803 * inferiors.c (all_processes): Change type to
1804 std::list<process_info *>.
1805 (find_thread_process): Adjust.
1806 (add_process): Likewise.
1807 (remove_process): Likewise.
1808 (find_process_pid): Likewise.
1809 (get_first_process): Likewise.
1810 (started_inferior_callback): Remove.
1811 (have_started_inferiors_p): Adjust.
1812 (attached_inferior_callback): Remove.
1813 (have_attached_inferiors_p): Adjust.
1814 * linux-low.c (check_zombie_leaders): Likewise.
1815 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1816 (x86_linux_update_xmltarget): Adjust.
1817 * server.c (handle_query): Likewise.
1818 (gdb_reattached_process): Remove.
1819 (handle_status): Adjust.
1820 (kill_inferior_callback): Likewise.
1821 (detach_or_kill_inferior): Remove.
1822 (print_started_pid): Likewise.
1823 (print_attached_pid): Likewise.
1824 (detach_or_kill_for_exit): Update.
1825 (process_serial_event): Likewise.
1826 * linux-arm-low.c (arm_new_fork): Likewise.
1827
c9cb8905
SM
18282017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1829
1830 * dll.h: Include <list>.
1831 (struct dll_info): Add constructor.
1832 <entry>: Remove field.
1833 (all_dlls): Change type to std::list<dll_info>.
1834 * dll.c: Include <algorithm>.
1835 (get_dll): Remove macro.
1836 (all_dlls): Change type to std::list<dll_info *>.
1837 (free_one_dll): Remove.
1838 (match_dll): Likewise.
1839 (loaded_dll): Adjust.
1840 (unloaded_dll): Adjust to all_dlls type change, use
1841 std::find_if. Inline code from match_dll.
1842 (clear_dlls): Adjust to all_dlls type change.
1843 * server.c (emit_dll_description): Remove.
1844 (handle_qxfer_libraries): Adjust to all_dlls type change,
1845 integrate emit_dll_description's functionality.
1846
04ec7890
SM
18472017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1848
1849 * linux-low.h (struct linux_target_ops) <delete_process>: New
1850 field.
1851 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1852 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1853 (struct linux_target_ops): Add delete_process callback.
1854 * linux-arm-low.c (arm_delete_process): New.
1855 (struct linux_target_ops): Add delete_process callback.
1856 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1857 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1858 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1859 * linux-mips-low.c (mips_linux_delete_process): New.
1860 (struct linux_target_ops): Add delete_process callback.
1861 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1862 * linux-s390-low.c (struct linux_target_ops): Likewise.
1863 * linux-sh-low.c (struct linux_target_ops): Likewise.
1864 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1865 * linux-tile-low.c (struct linux_target_ops): Likewise.
1866 * linux-x86-low.c (x86_linux_delete_process): New.
1867 (struct linux_target_ops): Add delete_process callback.
1868 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1869
466eecee
SM
18702017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1871
1872 * linux-aarch64-low.c (the_low_target): Add thread delete
1873 callback.
1874 * linux-arm-low.c (arm_delete_thread): New function.
1875 (the_low_target): Add thread delete callback.
1876 * linux-bfin-low.c (the_low_target): Likewise.
1877 * linux-crisv32-low.c (the_low_target): Likewise.
1878 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1879 set.
1880 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1881 field.
1882 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1883 * linux-mips-low.c (mips_linux_delete_thread): New function.
1884 (the_low_target): Add thread delete callback.
1885 * linux-ppc-low.c (the_low_target): Likewise.
1886 * linux-s390-low.c (the_low_target): Likewise.
1887 * linux-sh-low.c (the_low_target): Likewise.
1888 * linux-tic6x-low.c (the_low_target): Likewise.
1889 * linux-tile-low.c (the_low_target): Likewise.
1890 * linux-x86-low.c (the_low_target): Likewise.
1891 * linux-xtensa-low.c (the_low_target): Likewise.
1892
b79f7801
YZ
18932017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1894
1895 * win32-low.c: Include "common-inferior.h".
1896
bc3b087d
SDJ
18972017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1898
1899 * inferiors.c (set_inferior_cwd): New function.
1900 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1901 (handle_query): Inform that QSetWorkingDir is supported.
1902 * win32-low.c (create_process): Pass the inferior's cwd to
1903 CreateProcess.
1904
d092c5a2
SDJ
19052017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1906
1907 * inferiors.c (current_inferior_cwd): New global variable.
1908 (get_inferior_cwd): New function.
1909 * inferiors.h (struct process_info) <cwd>: New field.
1910
7da0a886
SDJ
19112017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1912
1913 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1914 (OBS): Add gdb_tilde_expand.o.
1915
289a6840
SM
19162017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1917
1918 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1919 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1920
256642e8
PA
19212017-09-29 Pedro Alves <palves@redhat.com>
1922
1923 * ax.c (gdb_parse_agent_expr): Constify.
1924 * ax.h (gdb_parse_agent_expr): Constify.
1925 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1926 Constify.
1927 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1928 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1929 * remote-utils.h (read_ptid): Constify.
1930 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1931 (process_point_options, process_serial_event): Constify.
1932 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1933 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1934 (cmd_qtbuffer): Constify.
1935
5b9ca4d4
PA
19362017-09-29 Pedro Alves <palves@redhat.com>
1937
1938 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1939 fails.
1940
94c207e0
PA
19412017-09-29 Pedro Alves <palves@redhat.com>
1942
1943 * linux-low.c (handle_extended_wait): Pass parent thread instead
1944 of process to thread_db_notice_clone.
1945 * linux-low.h (thread_db_notice_clone): Replace parent process
1946 parameter with parent thread parameter.
1947 * thread-db.c (find_one_thread): Add comment.
1948 (thread_db_notice_clone): Replace parent process parameter with
1949 parent thread parameter. Temporarily switch to the parent thread.
1950
75352e28
SDJ
19512017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1952
1953 * gdbthread.h: Include "common-gdbthread.h".
1954 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1955 "if" when validating the ptid.
1956 * remote-utils.c: Include "gdbthread.h".
1957 (prepare_resume_reply): Use "switch_to_thread".
1958 * target.c (done_accessing_memory): Likewise.
1959
ad339634
AA
19602017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1961
1962 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1963 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1964 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1965 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1966 s390x-gs-linux64-ipa.o to ipa_obj.
1967 * linux-s390-low.c (HWCAP_S390_GS): New define.
1968 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1969 New functions.
1970 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1971 (s390_arch_setup): Check for guarded-storage support and choose
1972 appropriate tdesc.
1973 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1974 init_registers_s390x_gs_linux64.
1975 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1976 enum value.
1977 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1978 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1979
cc4d742f
SM
19802017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1983
f6327dcb
KB
19842017-09-21 Kevin Buettner <kevinb@redhat.com>
1985
1986 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1987 (thread_db_thread_handle): Declare.
1988 * linux-low.c (linux_target_ops): Initialize thread_handle.
1989 * server.c (handle_qxfer_threads_worker): Add support for
1990 "handle" attribute.
1991 * target.h (struct target_ops): Add new function pointer,
1992 thread_handle.
1993 (target_thread_handle): Define.
1994 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1995 field in lwp.
1996 (thread_db_thread_handle): New function.
1997
86299109
KB
19982017-09-21 Kevin Buettner <kevinb@redhat.com>
1999
2000 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2001 * linux-low.h (thread_db_notice_clone): Declare.
2002 * thread-db.c (thread_db_notice_clone): New function.
2003
f557a88a
PA
20042017-09-21 Pedro Alves <palves@redhat.com>
2005
2006 * server.c (gdb_read_memory, handle_status, process_serial_event)
2007 (handle_serial_event, handle_target_event): Adjust to
2008 set_desired_thread prototype change.
2009 * target.c (set_desired_thread): Remove 'use_general' parameter
2010 and adjust.
2011 * target.h (set_desired_thread): Remove 'use_general' parameter.
2012
223ffa71
TT
20132017-09-20 Tom Tromey <tom@tromey.com>
2014
2015 * target.c (target_terminal::terminal_state): Define.
2016 (target_terminal::init): Rename from target_terminal_init.
2017 (target_terminal::inferior): Rename from
2018 target_terminal_inferior.
2019 (target_terminal::ours): Rename from target_terminal_ours.
2020 (target_terminal::ours_for_output, target_terminal::info): New.
2021
04fd3ba9
SM
20222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2023
2024 * server.c (accumulate_file_name_length): Remove.
2025 (emit_dll_description): Adjust to std::string change.
2026 (handle_qxfer_libraries): Use std::string to hold document.
2027
5e187554
SM
20282017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2031 return type of xml_escape_text.
2032 * server.c (emit_dll_description): Likewise.
2033
1526853e
SM
20342017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2035
2036 * server.c (captured_main): Accept argument for --selftest.
2037 Update run_tests call.
2038 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2039 when registering selftests.
2040
c4dfafab
SDJ
20412017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2042
2043 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2044 instead of "VEC" for "target_desc.reg_defs".
2045 (regcache_cpy): Likewise.
2046 (registers_to_string): Likewise.
2047 (registers_from_string): Likewise.
2048 (find_regno): Likewise.
2049 (supply_regblock): Likewise.
2050 (regcache_raw_read_unsigned): Likewise.
2051 * tdesc.c (init_target_desc): Likewise.
2052 (tdesc_create_reg): Likewise.
2053 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2054 (struct target_desc) <reg_defs>: Convert to "std::vector".
2055 (target_desc): Do not initialize "reg_defs".
2056 (~target_desc): Update code to use "std::vector" instead of "VEC"
2057 for "target_desc.reg_defs".
2058 (operator==): Likewise.
2059
124aceb4
SM
20602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2061
2062 * inferiors.h (thread_to_gdb_id): Remove.
2063 * inferiors.c (thread_to_gdb_id): Remove.
2064 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2065 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2066 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2067 Likewise.
2068 * nto-low.c (nto_fetch_registers, nto_store_registers,
2069 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2070
96cde54f
SM
20712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2072
2073 * inferiors.h (gdb_id_to_thread_id): Remove.
2074 * inferiors.c (gdb_id_to_thread_id): Remove.
2075 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2076 removal. Move pid declaration closer to where it's used.
2077
e8ca139e
SM
20782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2079
2080 * server.c (handle_detach): New function.
2081 (process_serial_event): Move code out, call handle_detach.
2082
f8a4e119
SM
20832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2084
2085 * server.c (require_running): Rename to ...
2086 (require_running_or_return): ... this ...
2087 (require_running_or_break): ... and this.
2088 (handle_query, process_serial_event): Adjust.
2089
0eb0a407
SM
20902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2091
2092 * linux-low.c (linux_set_resume_request): Remove unused
2093 variables.
2094
785922a5
SM
20952017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2096
2097 * server.c (first_thread_of): Remove.
2098 (process_serial_event): Replace usage of first_thread_of with
2099 find_any_thread_of_pid.
2100 * tracepoint.c (same_process_p): Remove.
2101 (gdb_agent_about_to_close): Replace usage of same_process_p with
2102 find_any_thread_of_pid.
2103 * linux-x86-low.c (same_process_callback): Remove.
2104 (x86_arch_setup_process_callback): Replace usage of
2105 same_process_callback with find_any_thread_of_pid.
2106 * thread-db.c (any_thread_of): Remove.
2107 (switch_to_process): Replace usage of any_thread_of with
2108 find_any_thread_of_pid.
2109 * inferiors.c (thread_pid_matches_callback): Remove.
2110 (find_thread_process): Adjust to use find_any_thread_of_pid.
2111
a059f00c
SDJ
21122017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2113
2114 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2115 with "!VEC_empty".
a059f00c 2116
cc397f3a
SDJ
21172017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2118
2119 * linux-low.c (handle_extended_wait): Use
2120 "allocate_target_description" instead of "XNEW".
2121 * linux-x86-low.c (initialize_low_arch): Likewise.
2122
22916b07
YQ
21232017-09-05 Yao Qi <yao.qi@linaro.org>
2124
2125 * configure.srv (srv_i386_regobj): Remove.
2126 (srv_amd64_regobj): Remove.
2127 (srv_regobj): Set it to "" for x86 non-linux targets.
2128 * linux-x86-tdesc.c (i386_linux_read_description):
2129 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2130 (init_registers_i386): Remove the declaration.
2131 (tdesc_i386): Remove the declaration.
2132 (lynx_i386_arch_setup): Call i386_create_target_description.
2133 * nto-x86-low.c: Likewise.
2134 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2135 [!__x86_64__]: include arch/i386.h.
2136 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2137
38602d55
YQ
21382017-09-05 Yao Qi <yao.qi@linaro.org>
2139
2140 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2141 i386/amd64-XXX-linux from it.
2142
44b886ff
YQ
21432017-09-05 Yao Qi <yao.qi@linaro.org>
2144
2145 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2146 false.
2147 (ipa_amd64_linux_regobj): Remove.
2148 (ipa_x32_linux_regobj): Remove.
2149
b4570e4b
YQ
21502017-09-05 Yao Qi <yao.qi@linaro.org>
2151
2152 * Makefile.in (arch-amd64.o): New rule.
2153 * configure.srv: Append arch-amd64.o.
2154 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2155 (get_ipa_tdesc): Call amd64_linux_read_description.
2156 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2157 and init_registers_amd64_XXX.
2158 * linux-x86-low.c (x86_linux_read_description): Call
2159 amd64_linux_read_description.
2160 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2161 (initialize_low_arch): Don't call init_registers_x32_XXX and
2162 init_registers_amd64_XXX.
2163 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2164 and tdesc_amd64_XXX.
2165 [__x86_64__] (amd64_tdesc_test): New function.
2166 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2167 and init_registers_amd64_XXX.
2168 * linux-x86-tdesc.c: Include arch/amd64.h.
2169 (xcr0_to_tdesc_idx): New function.
2170 (i386_linux_read_description): New function.
2171 (amd64_get_ipa_tdesc_idx): New function.
2172 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2173 (amd64_get_ipa_tdesc): Declare.
2174
d1f28ea2
YQ
21752017-09-05 Yao Qi <yao.qi@linaro.org>
2176
2177 * configure.srv (srv_i386_linux_xmlfiles): Remove
2178 i386/i386-XXX-linux.xml from it.
2179
25a93583
YQ
21802017-09-05 Yao Qi <yao.qi@linaro.org>
2181
2182 * configure.srv: Set srv_i386_linux_regobj empty if $development
2183 is false.
2184 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2185 initialize_low_tdesc.
2186 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2187 with #if initialize_low_tdesc.
2188 * linux-x86-tdesc-selftest.c: New file.
2189 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2190
5f035c07
YQ
21912017-09-05 Yao Qi <yao.qi@linaro.org>
2192
2193 * Makefile.in (arch-i386.o): New rule.
2194 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2195 (x86_64-*-linux*): Likewise.
2196 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2197 include arch/i386.h.
2198 (i386_linux_read_description): Remove code and call
2199 i386_create_target_description.
2200 * tdesc.c (allocate_target_description): New function.
2201 * tdesc.h (set_tdesc_architecture): Remove declaration.
2202 (set_tdesc_osabi): Likewise.
2203
0abe8a89
YQ
22042017-09-05 Yao Qi <yao.qi@linaro.org>
2205
2206 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2207 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2208 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2209 .xmltarget.
2210 * server.c (get_features_xml): Call tdesc_get_features_xml.
2211 * tdesc.c (set_tdesc_architecture): New function.
2212 (set_tdesc_osabi): New function.
2213 (tdesc_get_features_xml): New function.
2214 (tdesc_create_feature): Add an argument.
2215 * tdesc.h (struct target_desc) <features>: New field.
2216 <arch, osabi>: New field.
2217 (~target_desc): xfree features, arch, and osabi.
2218 (target_desc::oerator==): Don't compare .xmltarget.
2219 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2220 (set_tdesc_osabi): Likewise.
2221 (tdesc_get_features_xml): Likewise.
2222
0a188386
YQ
22232017-09-05 Yao Qi <yao.qi@linaro.org>
2224
2225 * linux-x86-tdesc.c: Include selftest.h.
2226 (i386_tdesc_test): New function.
2227 (initialize_low_tdesc): Call selftests::register_test.
2228 * tdesc.h: Include regdef.h.
2229 (target_desc): Override operator == and !=.
2230
f49ff000
YQ
22312017-09-05 Yao Qi <yao.qi@linaro.org>
2232
2233 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2234 (ipa_obj): Likewise.
2235 * linux-i386-ipa.c: Include common/x86-xstate.h
2236 (get_ipa_tdesc): Call i386_linux_read_description.
2237 (initialize_low_tracepoint): Don't call init_registers_XXX
2238 functions, call initialize_low_tdesc instead.
2239 * linux-x86-low.c (x86_linux_read_description): Call
2240 i386_linux_read_description.
2241 (initialize_low_arch): Don't call init_registers_i386_XXX
2242 functions, call initialize_low_tdesc.
2243 * linux-x86-tdesc.c: New file.
2244 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2245 (i386_get_ipa_tdesc_idx): Declare.
2246 (i386_get_ipa_tdesc): Declare.
2247 (initialize_low_tdesc): Declare.
2248
2b68ef2f
YQ
22492017-09-05 Yao Qi <yao.qi@linaro.org>
2250
2251 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2252 instead of 0.
2253
f7000548
YQ
22542017-09-05 Yao Qi <yao.qi@linaro.org>
2255
2256 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2257 * regcache.c (get_thread_regcache): Use VEC_length.
2258 (init_register_cache): Likewise.
2259 (regcache_cpy): Likewise.
2260 (registers_to_string): Iterate reg_defs via VEC_iterate.
2261 (find_regno): Likewise.
2262 (find_register_by_number): Use VEC_index.
2263 (register_size): Call find_register_by_number.
2264 (register_data): Call find_register_by_number.
2265 (supply_regblock): Use VEC_length.
2266 (regcache_raw_read_unsigned): Likewise.
2267 * tdesc.c (init_target_desc): Iterate reg_defs via
2268 VEC_iterate.
2269 (default_description): Update initializer.
2270 (copy_target_description): Don't update field num_registers.
2271 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2272 <num_registers>: Remove.
2273
50a421ac
SM
22742017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2275
2276 * Makefile.in (.SECONDARY): Define target.
2277
23fdd69e
SM
22782017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2279
2280 * linux-low.c (linux_wait_1): Adjust.
2281 * server.c (queue_stop_reply_callback): Adjust.
2282
0a2dde4a
SDJ
22832017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2284
2285 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2286 QEnvironmentUnset and QEnvironmentReset packets.
2287 (handle_query): Inform remote that QEnvironmentHexEncoded,
2288 QEnvironmentUnset and QEnvironmentReset are supported.
2289
6afd337d
SM
22902017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2291
2292 * inferiors.h (inferior_target_data): Rename to ...
2293 (thread_target_data): ... this.
2294 (inferior_regcache_data): Rename to ...
2295 (thread_regcache_data): ... this.
2296 (set_inferior_regcache_data): Rename to ...
2297 (set_thread_regcache_data): ... this.
2298 * inferiors.c (inferior_target_data): Rename to ...
2299 (thread_target_data): ... this.
2300 (inferior_regcache_data): Rename to ...
2301 (thread_regcache_data): ... this.
2302 (set_inferior_regcache_data): Rename to ...
2303 (set_thread_regcache_data): ... this.
2304 (free_one_thread): Update.
2305 * linux-low.h (get_thread_lwp): Update.
2306 * regcache.c (get_thread_regcache): Update.
2307 (regcache_invalidate_thread): Update.
2308 (free_register_cache_thread): Update.
2309 * win32-i386-low.c (update_debug_registers_callback): Update.
2310 (win32_get_current_dr): Update.
2311 * win32-low.c (thread_rec): Update.
2312 (delete_thread_info): Update.
2313 (continue_one_thread): Update.
2314 (suspend_one_thread): Update.
2315
a160cc46
SM
23162017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2317
2318 * inferiors.c (set_inferior_target_data): Remove.
2319 * inferiors.h (set_inferior_target_data): Remove.
2320
6d580b63
YQ
23212017-08-18 Yao Qi <yao.qi@linaro.org>
2322
2323 * Makefile.in (OBS): Add selftest.o.
2324 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2325 * configure, config.in: Re-generated.
2326 * server.c: Include common/sefltest.h.
2327 (captured_main): Handle option --selftest.
2328
f5a29eb0
YQ
23292017-08-09 Yao Qi <yao.qi@linaro.org>
2330
2331 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2332 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2333 i386-avx-mpx.o and i386-mmx.o.
2334 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2335 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2336 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2337 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2338 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2339 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2340 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2341 i386/amd64-avx-mpx.xml.
2342
57757c2f
YQ
23432017-08-09 Yao Qi <yao.qi@linaro.org>
2344
2345 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2346 and x32-avx-avx512.o.
2347 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2348 i386/x32-avx-avx512.xml.
2349
229d26fc
SM
23502017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2351
2352 * tracepoint.h (enum class fast_tpoint_collect_result): New
2353 enumeration.
2354 (fast_tracepoint_collecting): Change return type to
2355 fast_tpoint_collect_result.
2356 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2357 * linux-low.h: Include tracepoint.h.
2358 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2359 fast_tpoint_collect_result.
2360 * linux-low.c (handle_tracepoints): Adjust.
2361 (linux_fast_tracepoint_collecting): Change return type to
2362 fast_tpoint_collect_result.
2363 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2364 linux_wait_1, stuck_in_jump_pad_callback,
2365 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2366 proceed_one_lwp): Adjust to type change.
2367
2e1e43e1
YQ
23682017-07-10 Yao Qi <yao.qi@linaro.org>
2369
2370 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2371
adc764e7
YQ
23722017-06-29 Yao Qi <yao.qi@linaro.org>
2373
2374 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2375 Remove.
2376 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2377
a206891a
SM
23782017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2379
2380 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2381
9a6c7d9c
SDJ
23822017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2383
2384 * linux-low.c (linux_create_inferior): Adjust code to access the
2385 environment information via 'gdb_environ' class.
2386 * lynx-low.c (lynx_create_inferior): Likewise.
2387 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2388 (get_environ): Return a pointer to 'our_environ'.
2389 (captured_main): Initialize 'our_environ'.
2390 * server.h (get_environ): Adjust prototype.
2391 * spu-low.c (spu_create_inferior): Adjust code to access the
2392 environment information via 'gdb_environ' class.
2393
ae3e2ccf
SM
23942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2395
2396 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2397 usage of "register" keyword.
2398
3e019bdc
SM
23992017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2400
2401 * configure: Re-generate.
2402
8465943a
SM
24032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2404
2405 * configure: Re-generate.
2406
cf0dd6f0
SM
24072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2408
2409 * Makefile.in (COMPILE.pre): Add "-x c++".
2410
9845682b
SDJ
24112017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2412
2413 * fork-child.c: Conditionally include <signal.h>.
2414
aefd8b33
SDJ
24152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2416
2417 * server.c (handle_general_set): Handle new packet
2418 "QStartupWithShell".
2419 (handle_query): Add "QStartupWithShell" to the list of supported
2420 packets.
2421 (gdbserver_usage): Add help text explaining the
2422 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2423 options.
2424 (captured_main): Recognize and act upon the presence of the new
2425 CLI options.
2426
2090129c
SDJ
24272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2428 Pedro Alves <palves@redhat.com>
2429
2430 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2431 * configure: Regenerate.
2432 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2433 "fork-inferior.o".
2434 (i[34567]86-*-lynxos*): Likewise.
2435 (spu*-*-*): Likewise.
2436 * fork-child.c: New file.
2437 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2438 and "environ.h".
2439 (linux_ptrace_fun): New function.
2440 (linux_create_inferior): Adjust function prototype to reflect
2441 change on "target.h". Adjust function code to use
2442 "fork_inferior".
2443 (linux_request_interrupt): Delete "signal_pid".
2444 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2445 (lynx_ptrace_fun): New function.
2446 (lynx_create_inferior): Adjust function prototype to reflect
2447 change on "target.h". Adjust function code to use
2448 "fork_inferior".
2449 * nto-low.c (nto_create_inferior): Adjust function prototype and
2450 code to reflect change on "target.h". Update comments.
2451 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2452 "common-terminal.h" and "environ.h".
2453 (terminal_fd): Moved to fork-child.c.
2454 (old_foreground_pgrp): Likewise.
2455 (restore_old_foreground_pgrp): Likewise.
2456 (last_status): Make it global.
2457 (last_ptid): Likewise.
2458 (our_environ): New variable.
2459 (startup_with_shell): Likewise.
2460 (program_name): Likewise.
2461 (program_argv): Rename to...
2462 (program_args): ...this.
2463 (wrapper_argv): New variable.
2464 (start_inferior): Delete function.
2465 (get_exec_wrapper): New function.
2466 (get_exec_file): Likewise.
2467 (get_environ): Likewise.
2468 (prefork_hook): Likewise.
2469 (post_fork_inferior): Likewise.
2470 (postfork_hook): Likewise.
2471 (postfork_child_hook): Likewise.
2472 (handle_v_run): Update code to deal with arguments coming from the
2473 remote host. Update calls from "start_inferior" to
2474 "create_inferior".
2475 (captured_main): Likewise. Initialize environment variable. Call
2476 "have_job_control".
2477 * server.h (post_fork_inferior): New prototype.
2478 (get_environ): Likewise.
2479 (last_status): Declare.
2480 (last_ptid): Likewise.
2481 (signal_pid): Likewise.
2482 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2483 (spu_ptrace_fun): New function.
2484 (spu_create_inferior): Adjust function prototype to reflect change
2485 on "target.h". Adjust function code to use "fork_inferior".
2486 * target.c (target_terminal_init): New function.
2487 (target_terminal_inferior): Likewise.
2488 (target_terminal_ours): Likewise.
2489 * target.h: Include <vector>.
2490 (struct target_ops) <create_inferior>: Update prototype.
2491 (create_inferior): Update macro.
2492 * utils.c (gdb_flush_out_err): New function.
2493 * win32-low.c (win32_create_inferior): Adjust function prototype
2494 and code to reflect change on "target.h".
2495
043a4934
SDJ
24962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2497
2498 * inferiors.c (switch_to_thread): New function.
2499
15652511
SDJ
25002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2501
2502 * Makefile.in (SFILE): Add "common/job-control.c".
2503 (OBS): Add "job-control.o".
2504
21ea5acd
SDJ
25052017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2506
2507 * Makefile: Remove "@host_makefile_frag@".
2508
e13cb306
PA
25092017-05-05 Pedro Alves <palves@redhat.com>
2510
2511 * configure: Regenerate.
2512
c94fee56
SDJ
25132017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2514
2515 * configure: Regenerate.
2516
a0ff9e1a
SM
25172017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2518
2519 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2520 software_single_step change of return type to
2521 std::vector<CORE_ADDR>.
2522 * linux-low.c (install_software_single_step_breakpoints):
2523 Likewise.
2524 * linux-low.h (install_software_single_step_breakpoints):
2525 Likewise.
2526
be628ab8
SDJ
25272017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2528
2529 * remote-utils.c: Include "gdb_termios.h" instead of
2530 "terminal.h".
2531 * terminal.h: Delete file.
2532
7c5ded6a
SDJ
25332017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2534
2535 * server.c: Include <vector>.
2536 <program_argv, wrapper_argv>: Convert to std::vector.
2537 (start_inferior): Rewrite function to use C++.
2538 (handle_v_run): Likewise. Update code that calculates the argv
2539 based on the vRun packet; use C++.
2540 (captured_main): Likewise.
2541
436252de
SM
25422017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2543
2544 * server.c (handle_v_cont): Initialize thread_resume::thread
2545 with null_ptid.
2546
9bf2a700
PA
25472017-04-05 Pedro Alves <palves@redhat.com>
2548
2549 * configure: Regenerate.
2550
a121b7c1
PA
25512017-04-05 Pedro Alves <palves@redhat.com>
2552
2553 * gdbreplay.c (sync_error): Constify.
2554 * linux-x86-low.c (push_opcode): Constify.
2555
21c8a587
PA
25562017-04-05 Pedro Alves <palves@redhat.com>
2557
2558 * win32-low.c (get_child_debug_event)
2559 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2560 Report TARGET_WAITKIND_SPURIOUS instead.
2561
fb32b4f7
PA
25622017-04-05 Pedro Alves <palves@redhat.com>
2563
e79be6e5
SM
2564 * remote-utils.c (remote_prepare, remote_open): Constify.
2565 * remote-utils.h (remote_prepare, remote_open): Constify.
2566 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2567
65dd1e59
SM
25682017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2569
2570 * Makefile.in (clean): Clear .deps.
2571
8fa5b777
SM
25722017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2573
2574 * .gitignore: Remove generated files, replace with wildcard.
2575 * (clean): Replace removal of generated files with wildcard.
2576 (version.c): Replace with...
2577 (version-generated.c): ...this.
2578 (xml-builtin.c): Replace with...
2579 (xml-builtin-generated.c): ...this.
2580 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2581 (%.c: *regformats*): Replace with...
2582 (%-generated.c: *regformats*): ...this.
2583
a12e714b
MF
25842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2585
2586 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2587 (xtensa_fill_gregset): Call collect_register_by_name for
2588 threadptr register.
2589 (xtensa_store_gregset): Call supply_register_by_name for
2590 threadptr register.
2591
1a09b50a
MF
25922017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2593
2594 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2595 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2596 (xtensa_store_gregset): Call supply_register for all registers in
2597 a0_regnum..a0_regnum + C0_NREGS range.
2598
1a01e7c6
SM
25992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2600
2601 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2602 (ax-ipa.o: ax.c): Remove.
2603 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2604 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2605 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2606 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2607 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2608
36bc18a8
SM
26092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2610
2611 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2612 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2613 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2614 (errors-ipa.o: ../common/errors.c): Remove.
2615 (format-ipa.o: ../common/format.c): Remove.
2616 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2617
a8ebe3d5
SM
26182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2619
2620 * Makefile.in (%-ipa.o: %.c): New rule.
2621 (tracepoint-ipa.o: tracepoint.c): Remove.
2622 (utils-ipa.o: utils.c): Remove.
2623 (remote-utils-ipa.o: remote-utils.c): Remove.
2624 (regcache-ipa.o: regcache.c): Remove.
2625 (i386-linux-ipa.o: i386-linux.c): Remove.
2626 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2627 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2628 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2629 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2630 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2631 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2632 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2633 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2634 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2635 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2636 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2637 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2638 (aarch64-ipa.o: aarch64.c): Remove.
2639 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2640 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2641 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2642 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2643 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2644 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2645 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2646 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2647 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2648 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2649 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2650 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2651 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2652 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2653 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2654 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2655 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2656 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2657 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2658 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2659 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2660 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2661 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2662 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2663 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2664 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2665 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2666 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2667 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2668 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2669 (tdesc-ipa.o: tdesc.c): Remove.
2670 (x32-linux-ipa.o: x32-linux.c): Remove.
2671 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2672 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2673
50cfacb7
SM
26742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2675
2676 * Makefile.in (%.o: ../arch/%.c): New rule.
2677 (arm.o: ../arch/arm.c): Remove.
2678 (arm-linux.o: ../arch/arm-linux.c): Remove.
2679 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2680 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2681
c5a22423
SM
26822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2683
2684 * Makefile.in (%.o: ../nat/%.c): New rule.
2685 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2686 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2687 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2688 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2689 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2690 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2691 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2692 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2693 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2694 (linux-personality.o: ../nat/linux-personality.c): Remove.
2695 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2696 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2697 (x86-linux.o: ../nat/x86-linux.c): Remove.
2698 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2699 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2700
6bda016b
SM
27012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2702
2703 * Makefile.in (%.o: ../common/%.c): New rule.
2704 (signals.o: ../common/signals.c): Remove.
2705 (print-utils.o: ../common/print-utils.c): Remove.
2706 (rsp-low.o: ../common/rsp-low.c): Remove.
2707 (common-utils.o: ../common/common-utils.c): Remove.
2708 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2709 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2710 (vec.o: ../common/vec.c): Remove.
2711 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2712 (xml-utils.o: ../common/xml-utils.c): Remove.
2713 (ptid.o: ../common/ptid.c): Remove.
2714 (buffer.o: ../common/buffer.c): Remove.
2715 (format.o: ../common/format.c): Remove.
2716 (filestuff.o: ../common/filestuff.c): Remove.
2717 (agent.o: ../common/agent.c): Remove.
2718 (errors.o: ../common/errors.c): Remove.
2719 (environ.o: ../common/environ.c): Remove.
2720 (common-debug.o: ../common/common-debug.c): Remove.
2721 (cleanups.o: ../common/cleanups.c): Remove.
2722 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2723 (fileio.o: ../common/fileio.c): Remove.
2724 (common-regcache.o: ../common/common-regcache.c): Remove.
2725 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2726 (new-op.o: ../common/new-op.c): Remove.
2727 (btrace-common.o: ../common/btrace-common.c): Remove.
2728
21122961
SM
27292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2730
2731 * Makefile.in (%.o: ../target/%.c): New rule.
2732 (waitstatus.o: ../target/waitstatus.c): Remove.
2733
c362e621
SM
27342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2735
2736 * Makefile.in
2737 (%.c: ../regformats/%.dat,
2738 (%.c: ../regformats/arm/%.dat,
2739 (%.c: ../regformats/i386/%.dat,
2740 (%.c: ../regformats/rs6000/%.dat): New rules.
2741 (aarch64.c): Remove.
2742 (reg-arm.c): Remove.
2743 (arm-with-iwmmxt.c): Remove.
2744 (arm-with-vfpv2.c): Remove.
2745 (arm-with-vfpv3.c): Remove.
2746 (arm-with-neon.c): Remove.
2747 (reg-bfin.c): Remove.
2748 (reg-cris.c): Remove.
2749 (reg-crisv32.c): Remove.
2750 (i386.c): Remove.
2751 (i386-linux.c): Remove.
2752 (i386-avx.c): Remove.
2753 (i386-avx-linux.c): Remove.
2754 (i386-avx-avx512.c): Remove.
2755 (i386-avx-avx512-linux.c): Remove.
2756 (i386-mpx.c): Remove.
2757 (i386-mpx-linux.c): Remove.
2758 (i386-avx-mpx-avx512-pku.c): Remove.
2759 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2760 (i386-avx-mpx.c): Remove.
2761 (i386-avx-mpx-linux.c): Remove.
2762 (i386-mmx.c): Remove.
2763 (i386-mmx-linux.c): Remove.
2764 (reg-ia64.c): Remove.
2765 (reg-m32r.c): Remove.
2766 (reg-m68k.c): Remove.
2767 (reg-cf.c): Remove.
2768 (mips-linux.c): Remove.
2769 (mips-dsp-linux.c): Remove.
2770 (mips64-linux.c): Remove.
2771 (mips64-dsp-linux.c): Remove.
2772 (nios2-linux.c): Remove.
2773 (powerpc-32.c): Remove.
2774 (powerpc-32l.c): Remove.
2775 (powerpc-altivec32l.c): Remove.
2776 (powerpc-cell32l.c): Remove.
2777 (powerpc-vsx32l.c): Remove.
2778 (powerpc-isa205-32l.c): Remove.
2779 (powerpc-isa205-altivec32l.c): Remove.
2780 (powerpc-isa205-vsx32l.c): Remove.
2781 (powerpc-e500l.c): Remove.
2782 (powerpc-64l.c): Remove.
2783 (powerpc-altivec64l.c): Remove.
2784 (powerpc-cell64l.c): Remove.
2785 (powerpc-vsx64l.c): Remove.
2786 (powerpc-isa205-64l.c): Remove.
2787 (powerpc-isa205-altivec64l.c): Remove.
2788 (powerpc-isa205-vsx64l.c): Remove.
2789 (s390-linux32.c): Remove.
2790 (s390-linux32v1.c): Remove.
2791 (s390-linux32v2.c): Remove.
2792 (s390-linux64.c): Remove.
2793 (s390-linux64v1.c): Remove.
2794 (s390-linux64v2.c): Remove.
2795 (s390-te-linux64.c): Remove.
2796 (s390-vx-linux64.c): Remove.
2797 (s390-tevx-linux64.c): Remove.
2798 (s390x-linux64.c): Remove.
2799 (s390x-linux64v1.c): Remove.
2800 (s390x-linux64v2.c): Remove.
2801 (s390x-te-linux64.c): Remove.
2802 (s390x-vx-linux64.c): Remove.
2803 (s390x-tevx-linux64.c): Remove.
2804 (tic6x-c64xp-linux.c): Remove.
2805 (tic6x-c64x-linux.c): Remove.
2806 (tic6x-c62x-linux.c): Remove.
2807 (reg-sh.c): Remove.
2808 (reg-sparc64.c): Remove.
2809 (reg-spu.c): Remove.
2810 (amd64.c): Remove.
2811 (amd64-linux.c): Remove.
2812 (amd64-avx.c): Remove.
2813 (amd64-avx-linux.c): Remove.
2814 (amd64-avx-avx512.c): Remove.
2815 (amd64-avx-avx512-linux.c): Remove.
2816 (amd64-mpx.c): Remove.
2817 (amd64-mpx-linux.c): Remove.
2818 (amd64-avx-mpx-avx512-pku.c): Remove.
2819 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2820 (amd64-avx-mpx.c): Remove.
2821 (amd64-avx-mpx-linux.c): Remove.
2822 (x32.c): Remove.
2823 (x32-linux.c): Remove.
2824 (x32-avx.c): Remove.
2825 (x32-avx-linux.c): Remove.
2826 (x32-avx-avx512.c): Remove.
2827 (x32-avx-avx512-linux.c): Remove.
2828 (reg-xtensa.c): Remove.
2829 (reg-tilegx.c): Remove.
2830 (reg-tilegx32.c): Remove.
2831
1672e0d9
SDJ
28322017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2833
2834 * Makefile.in (SFILES): Add "common/environ.c".
2835 (OBJS): Add "common/environ.h".
2836
239b6d10
WT
28372017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2838
2839 * configure.ac: Check if the fs_base and gs_base members of
2840 `struct user_regs_struct' exist.
2841 * config.in: Regenerated.
2842 * configure: Likewise.
2843
694b382c
AT
28442017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2845
2846 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2847 target_read_memory.
2848 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2849 (get_next_pcs_syscall_next_pc): Likewise.
2850
7dc53023
LM
28512016-12-23 Luis Machado <lgustavo@codesourcery.com>
2852
2853 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2854 * nto-x86-low.c: Likewise.
2855
ad02e4fe
SM
28562016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2857
2858 * Makefile.in: Include disable-implicit-rules.mk.
2859
dcb07cfa
PA
28602016-11-23 Pedro Alves <palves@redhat.com>
2861
2862 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2863 (debug_vprintf): Use std::chrono::steady_clock instead of
2864 gettimeofday. Use '.' instead of ':'.
2865 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2866 (get_timestamp): Use std::chrono::steady_clock instead of
2867 gettimeofday.
2868
8629c02c
SM
28692016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2870
2871 * Makefile.in: Fix whitespace formatting.
2872
b593ecca
SM
28732016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2874
2875 * Makefile.in (SFILES, OBS): Flatten list and order
2876 alphabetically.
2877
9986ba08
PA
28782016-11-23 Pedro Alves <palves@redhat.com>
2879
2880 * event-loop.c (handle_file_event): Use warning.
2881 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2882 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2883 Use warning.
2884
4eefa7bc
PA
28852016-11-23 Pedro Alves <palves@redhat.com>
2886
2887 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2888 output.
2889 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2890 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2891 debug_printf and debug_flush for debug output.
2892 * server.c (handle_general_set): Likewise.
2893 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2894 output.
2895
5443506e
SM
28962016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2897
2898 * Makefile.in (.c.o): Replace rule with ...
2899 (%.o: %.c): ... this one.
2900
3b165252
SM
29012016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2902
2903 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2904 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2905 make.
2906 * configure.ac: Remove checks for the make program.
2907 * configure: Re-generate.
2908
0bcda685
PA
29092016-10-28 Pedro Alves <palves@redhat.com>
2910
2911 * Makefile.in (CXX_DIALECT): Get from configure.
2912 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2913 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2914 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2915 * config.in: Regenerate.
2916 * configure: Regenerate.
2917
c3805894
YQ
29182016-10-27 Yao Qi <yao.qi@linaro.org>
2919
2920 * linux-low.c (linux_supports_range_stepping): Return true if
2921 can_software_single_step return true.
2922
89342618
YQ
29232016-10-27 Yao Qi <yao.qi@linaro.org>
2924
2925 * inferiors.c (find_inferior_in_random): New function.
2926 * inferiors.h (find_inferior_in_random): Declare.
2927 * linux-low.c (linux_wait_for_event_filtered): Call
2928 find_inferior_in_random instead of find_inferior.
2929
e3652c84
YQ
29302016-10-27 Yao Qi <yao.qi@linaro.org>
2931
2932 * linux-low.c (linux_wait_1): If single-step breakpoints are
2933 inserted, remove them.
2934
5a04c4cf
PA
29352016-10-26 Pedro Alves <palves@redhat.com>
2936
2937 * linux-low.c (handle_extended_wait): Link parent/child fork
2938 threads.
2939 (linux_wait_1): Unlink them.
2940 (linux_set_resume_request): Ignore resume requests for
2941 already-resumed and unhandled fork child threads.
2942 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2943 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2944 New functions.
2945 (handle_v_requests) <vCont>: Don't call require_running.
2946 * server.h (in_queued_stop_replies): New declaration.
2947
cb93dc7f
YQ
29482016-10-24 Yao Qi <yao.qi@linaro.org>
2949
2950 PR server/20733
2951 * linux-aarch64-low.c (append_insns): Cast the return value to
2952 'uint32_t *'.
2953
a1078bea
YQ
29542016-10-10 Yao Qi <yao.qi@linaro.org>
2955
2956 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2957
1fb77080
SDJ
29582016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2959
2960 * target.c (target_supports_multi_process): New function, moved
2961 from...
2962 * target.h (target_supports_multi_process): ... here. Remove
2963 macro.
2964
39b5a3b9
TT
29652016-10-05 Tom Tromey <tom@tromey.com>
2966
2967 PR remote/20655:
2968 * tracepoint.c (handle_tracepoint_bkpts): Check
2969 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2970
c1d0b70a
YQ
29712016-10-05 Yao Qi <yao.qi@linaro.org>
2972
2973 * configure.srv: Update the path of arm-*.xml files.
2974
0a69eedb
YQ
29752016-10-05 Terry Guo <terry.guo@arm.com>
2976 Yao Qi <yao.qi@linaro.org>
2977
2978 * Makefile.in: Adjust the path of rules.
2979 * configure.srv: Update the path of xml files.
2980 * regformats/arm-with-iwmmxt.dat: Regenerated.
2981 * regformats/arm-with-neon.dat: Likewise.
2982 * regformats/arm-with-vfpv2.dat: Likewise.
2983 * regformats/arm-with-vfpv3.dat Likewise.
2984
17e16485
YQ
29852016-09-30 Yao Qi <yao.qi@linaro.org>
2986
2987 PR gdbserver/20627
2988 * target.c (target_stop_and_wait): Don't call
2989 target_continue_no_signal, use resume_stop instead.
2990
edeeb602
YQ
29912016-09-26 Yao Qi <yao.qi@linaro.org>
2992
2993 * linux-low.c (linux_wait_1): Call debug_exit.
2994
503b1c39
PA
29952016-09-23 Pedro Alves <palves@redhat.com>
2996
2997 * Makefile.in (SFILES): Add common/new-op.c.
2998 (OBS): Add common/new-op.o.
2999 (new-op.o): New rule.
3000
74172ecf
SM
30012016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3002
3003 * .gitinore: Ignore more files.
3004
fc6cda2e
YQ
30052016-09-21 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3008 23.
3009
bc1e6c81
SDJ
30102016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3011
3012 * server.c (start_inferior): Call target_mourn_inferior instead of
3013 mourn_inferior; pass ptid_t argument to it.
3014 (resume): Likewise.
3015 (handle_target_event): Likewise.
3016 * target.c (target_mourn_inferior): New function.
3017 * target.h (mourn_inferior): Delete macro.
3018
0e00e962
AA
30192016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3020
3021 * linux-low.c (lwp_is_stepping): New function.
3022
1d8cb77d
CL
30232016-09-06 Carl Love <cel@us.ibm.com>
3024
3025 * server.c (start_inferior): Fixed comment, requested comment change
3026 didn't get updated correctly. Removed reference to ptrace () call as
3027 it is only true on Linux systems.
3028
7313bced
CL
30292016-09-06 Carl Love <cel@us.ibm.com>
3030
3031 * server.c (start_inferior): Do not call
3032 function target_post_create_inferior () if the
3033 inferior process has already exited.
3034
cf6de44d
PA
30352016-09-05 Pedro Alves <palves@redhat.com>
3036
3037 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3038 (COMPILE.pre, CC_LD): Use CXX directly.
3039 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3040 * acinclude.m4: Don't include build-with-cxx.m4.
3041 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3042 * configure: Regenerate.
3043
c1da6748
AT
30442016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3045
3046 PR gdb/19495
3047 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3048 call writing data to own_buf.
3049
f2b9e3df
SDJ
30502016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3051
3052 * target.c (mywait): Call target_wait instead of
3053 the_target->wait.
3054 (target_wait): New function.
3055
049a8570
SDJ
30562016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3057
3058 * server.c (start_inferior): New variable 'ptid'. Replace calls
3059 to the_target->resume by target_continue{,_no_signal}, depending
3060 on the case.
3061 * target.c (target_stop_and_wait): Call target_continue_no_signal
3062 instead of the_target->resume.
3063 (target_continue): New function.
3064
3aa5cfa0
AT
30652016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3066
3067 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3068
754653a7
AZ
30692016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3070
3071 PR server/20491
3072 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3073 ps_prochandle.
3074 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3075 * linux-arm-low.c (ps_get_thread_area): Likewise.
3076 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3077 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3078 * linux-mips-low.c (ps_get_thread_area): Likewise.
3079 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3080 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3081 * linux-x86-low.c (ps_get_thread_area): Likewise.
3082 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3083
ed036b40
PA
30842016-08-19 Pedro Alves <palves@redhat.com>
3085
3086 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3087
c8ef42ee
PA
30882016-08-19 Pedro Alves <palves@redhat.com>
3089
3090 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3091 comment. Use memcpy instead of casting through unsigned long.
3092
9c235a72
PA
30932016-08-19 Pedro Alves <palves@redhat.com>
3094
3095 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3096 allocating around 0x80000000.
3097
201506da
PA
30982016-08-19 Pedro Alves <palves@redhat.com>
3099
3100 PR gdb/20415
3101 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3102 (x32-avx512-linux-ipa.o): New rules.
3103 * configure.ac (x86_64-*-linux*): New x32 check.
3104 * configure.srv (ipa_x32_linux_regobj): New.
3105 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3106 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3107 descriptions.
3108 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3109 descriptions.
3110 * configure: Regenerate.
3111
f348d89a
PA
31122016-08-09 Pedro Alves <palves@redhat.com>
3113
3114 PR gdb/18653
3115 * Makefile.in (OBS): Add signals-state-save-restore.o.
3116 (signals-state-save-restore.o): New rule.
3117 * config.in: Regenerate.
3118 * configure: Regenerate.
3119 * linux-low.c: Include "signals-state-save-restore.h".
3120 (linux_create_inferior): Call
3121 restore_original_signals_state.
3122 * server.c: Include "dispositions-save-restore.h".
3123 (captured_main): Call save_original_signals_state.
3124
1baf5149
PA
31252016-08-05 Pedro Alves <palves@redhat.com>
3126
3127 * configure: Regenerate.
3128
fcd4a73d
YQ
31292016-08-04 Yao Qi <yao.qi@linaro.org>
3130
3131 * linux-low.c (regsets_fetch_inferior_registers): Check
3132 errno is ESRCH or not.
3133
979659d0
YQ
31342016-08-02 Yao Qi <yao.qi@linaro.org>
3135
3136 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3137 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3138 (thread_db_load_search): Update.
3139 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3140 td_ta_set_event and td_ta_event_getmsg.
3141
6598661d
PA
31422016-07-26 Pedro Alves <palves@redhat.com>
3143
3144 PR server/20414
3145 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3146 of unsigned long for 64-bit registers and use uint32_t instead of
3147 unsigned int for 32-bit registers.
3148
9cf12d57
PA
31492016-07-26 Pedro Alves <palves@redhat.com>
3150
3151 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3152 to 'ptrace'.
3153
305450ed
TT
31542016-07-21 Tom Tromey <tom@tromey.com>
3155
3156 * configure: Rebuild.
3157
2583da7c
YQ
31582016-07-21 Yao Qi <yao.qi@linaro.org>
3159
3160 * mem-break.c (find_gdb_breakpoint): Cast bp to
3161 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3162
21536b36
YQ
31632016-07-21 Yao Qi <yao.qi@linaro.org>
3164
3165 * server.c (handle_v_requests): Support s and S actions
3166 if target_supports_software_single_step return true.
3167
8901d193
YQ
31682016-07-21 Yao Qi <yao.qi@linaro.org>
3169
3170 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3171 is resume_step, call maybe_hw_step.
3172 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3173 and unstop them.
3174 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3175 breakpoints or not.
3176 (proceed_one_lwp): If resume request is resume_step, install
3177 reinsert breakpoints and call maybe_hw_step.
3178
0e9a339e
YQ
31792016-07-21 Yao Qi <yao.qi@linaro.org>
3180
3181 * linux-low.c (proceed_one_lwp): Declare.
3182 (linux_resume_one_thread): Remove local variable 'step'.
3183 Lift code enqueue signal. Call proceed_one_lwp instead of
3184 linux_resume_one_lwp.
3185
4281b351
YQ
31862016-07-21 Yao Qi <yao.qi@linaro.org>
3187
3188 * linux-low.c (linux_resume_one_thread): Call
3189 enqueue_pending_signal.
3190
984a2c04
YQ
31912016-07-21 Yao Qi <yao.qi@linaro.org>
3192
3193 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3194 * inferiors.c (do_restore_current_thread_cleanup): New function.
3195 (make_cleanup_restore_current_thread): Likewise.
3196 * linux-low.c (install_software_single_step_breakpoints): Call
3197 make_cleanup_restore_current_thread. Switch current_thread to
3198 thread.
3199
bec903c9
YQ
32002016-07-21 Yao Qi <yao.qi@linaro.org>
3201
3202 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3203 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3204 (clone_one_breakpoint): Likewise.
3205 (delete_reinsert_breakpoints): Change parameter to thread.
3206 Callers updated.
3207 (has_reinsert_breakpoints): Likewise.
3208 (uninsert_reinsert_breakpoints): Likewise.
3209 (reinsert_reinsert_breakpoints): Likewise.
3210 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3211 (delete_reinsert_breakpoints): Likewise.
3212 (reinsert_reinsert_breakpoints): Likewise.
3213 (uninsert_reinsert_breakpoints): Likewise.
3214 (has_reinsert_breakpoints): Likewise.
3215
63c40ec7
YQ
32162016-07-21 Yao Qi <yao.qi@linaro.org>
3217
3218 * inferiors.c (get_thread_process): Make parameter const.
3219 * inferiors.h (get_thread_process): Update declaration.
3220 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3221 Add new parameters child_thread and parent_thread. Callers
3222 updated.
3223 * mem-break.h (clone_all_breakpoints): Update declaration.
3224
9aa76cd0
YQ
32252016-07-21 Yao Qi <yao.qi@linaro.org>
3226
3227 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3228 <command_list, handler>: Remove.
3229 (struct gdb_breakpoint): New.
3230 (struct other_breakpoint): New.
3231 (struct reinsert_breakpoint): New.
3232 (is_gdb_breakpoint): New function.
3233 (any_persistent_commands): Update command_list if
3234 is_gdb_breakpoint returns true.
3235 (set_breakpoint): Create breakpoints according to their types.
3236 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3237 (set_gdb_breakpoint_1): Likewise.
3238 (set_gdb_breakpoint): Likewise.
3239 (clear_breakpoint_conditions): Change parameter type to
3240 'struct gdb_breakpoint *'.
3241 (clear_breakpoint_commands): Likewise.
3242 (clear_breakpoint_conditions_and_commands): Likewise.
3243 (add_condition_to_breakpoint): Likewise.
3244 (add_breakpoint_condition): Likewise.
3245 (add_commands_to_breakpoint): Likewise.
3246 (check_breakpoints): Check other_breakpoint.
3247 (clone_one_breakpoint): Clone breakpopint according to its type.
3248 * mem-break.h (struct gdb_breakpoint): Declare.
3249 (set_gdb_breakpoint): Update declaration.
3250 (clear_breakpoint_conditions_and_commands): Likewise.
3251 (add_breakpoint_condition): Likewise.
3252 (add_breakpoint_commands): Likewise.
3253 * server.c (process_point_options): Change parameter type to
3254 'struct gdb_breakpoint *'.
3255
811f8301
YQ
32562016-07-21 Yao Qi <yao.qi@linaro.org>
3257
3258 * mem-break.c (set_breakpoint_at): Rename it to ...
3259 (set_breakpoint_type_at): ... it.
3260 (set_breakpoint_at): Call set_breakpoint_type_at.
3261 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3262 * mem-break.h (set_breakpoint_at): Update comments.
3263
b1c51e36
CLT
32642016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3265
3266 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3267 to buf parameter.
3268 (nios2_store_gregset): Likewise.
3269
ced2dffb
PA
32702016-07-01 Pedro Alves <palves@redhat.com>
3271 Antoine Tremblay <antoine.tremblay@ericsson.com>
3272
3273 * linux-low.c: Change interface to take the target lwp_info
3274 pointer directly and return void. Handle detaching from a zombie
3275 thread.
3276 (linux_detach_lwp_callback): New function.
3277 (linux_detach): Detach from the leader thread after detaching from
3278 the clone threads.
3279
2ac09a5b
YQ
32802016-06-28 Yao Qi <yao.qi@linaro.org>
3281
3282 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3283 for variable new_offset.
3284 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3285 (aarch64_ftrace_insn_reloc_cb): Likewise.
3286 (aarch64_ftrace_insn_reloc_tb): Likewise.
3287 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3288 PRIx64 instead of PRIx32.
3289
79e7fd4f
YQ
32902016-06-28 Yao Qi <yao.qi@linaro.org>
3291
3292 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3293 (the_low_target): Install arm_get_syscall_trapinfo.
3294
061fc021
YQ
32952016-06-28 Yao Qi <yao.qi@linaro.org>
3296
3297 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3298 function.
3299 (the_low_target): Install aarch64_get_syscall_trapinfo.
3300
4cc32bec
YQ
33012016-06-28 Yao Qi <yao.qi@linaro.org>
3302
3303 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3304 Callers updated.
3305 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3306 Remove parameter sysno.
3307 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3308 sysret.
3309
782c1122
AA
33102016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3311
3312 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3313 (s390_emit_ne_goto): Likewise.
3314 (s390_emit_lt_goto): Likewise.
3315 (s390_emit_le_goto): Likewise.
3316 (s390_emit_gt_goto): Likewise.
3317 (s390_emit_ge_goto): Likewise.
3318 (s390x_emit_eq_goto): Likewise.
3319 (s390x_emit_ne_goto): Likewise.
3320 (s390x_emit_lt_goto): Likewise.
3321 (s390x_emit_le_goto): Likewise.
3322 (s390x_emit_gt_goto): Likewise.
3323 (s390x_emit_ge_goto): Likewise.
3324 (s390_emit_ops_impl): Mark variable static.
3325 (s390x_emit_ops): Likewise.
3326
2e7b624b
YQ
33272016-06-17 Yao Qi <yao.qi@linaro.org>
3328
3329 * linux-low.c (handle_extended_wait): Call
3330 uninsert_reinsert_breakpoints for the parent process. Remove
3331 reinsert breakpoints from the child process. Reinsert them to
3332 the parent process when vfork is done.
3333 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3334 (reinsert_reinsert_breakpoints): New function.
3335 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3336 (reinsert_reinsert_breakpoints): Declare.
3337
8a81c5d7
YQ
33382016-06-17 Yao Qi <yao.qi@linaro.org>
3339
3340 * linux-low.c (handle_extended_wait): If the parent is doing
3341 step-over, remove the reinsert breakpoints from the forked child.
3342
f50bf8e5
YQ
33432016-06-17 Yao Qi <yao.qi@linaro.org>
3344
3345 * linux-low.c (unsuspend_all_lwps): Declare.
3346 (linux_low_filter_event): If thread exited, call finish_step_over.
3347 If step-over is finished, unsuspend other threads.
3348
8376a3cb
YQ
33492016-06-17 Yao Qi <yao.qi@linaro.org>
3350
3351 * linux-low.c (linux_resume_one_lwp_throw): Assert
3352 has_reinsert_breakpoints returns false.
3353 * mem-break.c (delete_disabled_breakpoints): Assert
3354 bp type isn't reinsert_breakpoint.
3355
f79b145d
YQ
33562016-06-17 Yao Qi <yao.qi@linaro.org>
3357
3358 * linux-low.c (maybe_hw_step): New function.
3359 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3360 (finish_step_over): Switch current_thread to lwp temporarily,
3361 and assert has_reinsert_breakpoints returns true.
3362 (proceed_one_lwp): Call maybe_hw_step.
3363 * mem-break.c (has_reinsert_breakpoints): New function.
3364 * mem-break.h (has_reinsert_breakpoints): Declare.
3365
0ae534d2
JT
33662016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3367
3368 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3369
fcdad592
YQ
33702016-05-17 Yao Qi <yao.qi@linaro.org>
3371
3372 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3373 instead of find_inferior.
3374
9e784964
YQ
33752016-05-05 Yao Qi <yao.qi@linaro.org>
3376
3377 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3378 Initialize res to zero.
3379
cf2ebb6e
YQ
33802016-05-05 Yao Qi <yao.qi@linaro.org>
3381
3382 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3383 to uint32_t.
3384
c1aebf87
UW
33852016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3386
3387 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3388 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3389 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3390
35fd2deb 33912016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3392 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3393
3394 * tracepoint.c (write_inferior_int8): New function.
3395 (cmd_qtenable_disable): Write enable flag using
3396 write_inferior_int8.
3397
484b3c32
YQ
33982016-04-25 Yao Qi <yao.qi@linaro.org>
3399
3400 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3401 (need_step_over_p): Return zero if the LWP has pending signals
3402 can be delivered on software single step target.
3403
85ba7d86
YQ
34042016-04-25 Yao Qi <yao.qi@linaro.org>
3405
3406 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3407 return instead of error.
3408
3539aa13
YQ
34092016-04-22 Yao Qi <yao.qi@linaro.org>
3410
3411 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3412 to 23.
3413
5b061e98
YQ
34142016-04-22 Yao Qi <yao.qi@linaro.org>
3415
3416 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3417 signal when stepping over breakpoint with software single
3418 step.
3419
3451269c
PA
34202016-04-21 Pedro Alves <palves@redhat.com>
3421
3422 * linux-s390-low.c (s390_collect_ptrace_register)
3423 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3424 add casts.
3425 (s390_check_regset): Use void * instead of gdb_byte *.
3426
a2358508
PA
34272016-04-20 Pedro Alves <palves@redhat.com>
3428
3429 * configure: Renegerate.
3430
6885166d
YQ
34312016-04-20 Yao Qi <yao.qi@linaro.org>
3432
3433 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3434 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3435 number 16.
3436 (arm_store_gregset): Likewise.
3437
2b863f51
WT
34382016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3439
3440 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3441 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3442 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3443 (amd64-avx-mpx-linux.c): New rules.
3444 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3445 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3446 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3447 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3448 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3449 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3450 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3451 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3452 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3453 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3454 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3455 * linux-x86-low.c (x86_linux_read_description): Add case for
3456 X86_XSTATE_AVX_MPX_MASK.
3457 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3458 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3459 init_registers_i386_avx_mpx_linux.
3460 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3461 (initialize_low_tracepoint): Call
3462 init_registers_i386_avx_mpx_linux.
3463 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3464 (initialize_low_tracepoint): Call
3465 init_registers_amd64_avx_mpx_linux.
3466 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3467 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3468 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3469 declarations.
3470
9b30624b
PA
34712016-04-18 Pedro Alves <palves@redhat.com>
3472
3473 * configure: Regenerate.
3474
45e3745e
AT
34752016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3476
3477 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3478 (aarch64_emit_sub): Likewise.
3479
2afc13ff
PA
34802016-04-12 Pedro Alves <palves@redhat.com>
3481
3482 * utils.c (prepare_to_throw_exception): Delete.
3483
6e774b13
SM
34842016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3485
3486 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3487
4dca19f8
MK
34882016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3489
3490 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3491
d0a9981f
MK
34922016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3493
3494 * linux-aarch64-ipa.c: Add <elf.h> include.
3495 * linux-ppc-ipa.c: Add <elf.h> include.
3496 * linux-s390-ipa.c: Add <elf.h> include.
3497
252db07e
MK
34982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3499
3500 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3501 (get_raw_reg_ptr): Likewise.
3502 (get_trace_state_variable_value_ptr): Likewise.
3503 (set_trace_state_variable_value_ptr): Likewise.
3504 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3505 char *.
3506
14e2b6d9
MK
35072016-03-31 Wei-cheng Wang <cole945@gmail.com>
3508 Marcin Kościelnicki <koriakin@0x04.net>
3509
3510 PR/17221
3511 * linux-ppc-low.c (emit_insns): New function.
3512 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3513 (ppc_emit_prologue): New function.
3514 (ppc_emit_epilogue): New function.
3515 (ppc_emit_add): New function.
3516 (ppc_emit_sub): New function.
3517 (ppc_emit_mul): New function.
3518 (ppc_emit_lsh): New function.
3519 (ppc_emit_rsh_signed): New function.
3520 (ppc_emit_rsh_unsigned): New function.
3521 (ppc_emit_ext): New function.
3522 (ppc_emit_zero_ext): New function.
3523 (ppc_emit_log_not): New function.
3524 (ppc_emit_bit_and): New function.
3525 (ppc_emit_bit_or): New function.
3526 (ppc_emit_bit_xor): New function.
3527 (ppc_emit_bit_not): New function.
3528 (ppc_emit_equal): New function.
3529 (ppc_emit_less_signed): New function.
3530 (ppc_emit_less_unsigned): New function.
3531 (ppc_emit_ref): New function.
3532 (ppc_emit_const): New function.
3533 (ppc_emit_reg): New function.
3534 (ppc_emit_pop): New function.
3535 (ppc_emit_stack_flush): New function.
3536 (ppc_emit_swap): New function.
3537 (ppc_emit_stack_adjust): New function.
3538 (ppc_emit_call): New function.
3539 (ppc_emit_int_call_1): New function.
3540 (ppc_emit_void_call_2): New function.
3541 (ppc_emit_if_goto): New function.
3542 (ppc_emit_goto): New function.
3543 (ppc_emit_eq_goto): New function.
3544 (ppc_emit_ne_goto): New function.
3545 (ppc_emit_lt_goto): New function.
3546 (ppc_emit_le_goto): New function.
3547 (ppc_emit_gt_goto): New function.
3548 (ppc_emit_ge_goto): New function.
3549 (ppc_write_goto_address): New function.
3550 (ppc_emit_ops_impl): New static variable.
3551 (ppc64v1_emit_prologue): New function.
3552 (ppc64v2_emit_prologue): New function.
3553 (ppc64_emit_epilogue): New function.
3554 (ppc64_emit_add): New function.
3555 (ppc64_emit_sub): New function.
3556 (ppc64_emit_mul): New function.
3557 (ppc64_emit_lsh): New function.
3558 (ppc64_emit_rsh_signed): New function.
3559 (ppc64_emit_rsh_unsigned): New function.
3560 (ppc64_emit_ext): New function.
3561 (ppc64_emit_zero_ext): New function.
3562 (ppc64_emit_log_not): New function.
3563 (ppc64_emit_bit_and): New function.
3564 (ppc64_emit_bit_or): New function.
3565 (ppc64_emit_bit_xor): New function.
3566 (ppc64_emit_bit_not): New function.
3567 (ppc64_emit_equal): New function.
3568 (ppc64_emit_less_signed): New function.
3569 (ppc64_emit_less_unsigned): New function.
3570 (ppc64_emit_ref): New function.
3571 (ppc64_emit_const): New function.
3572 (ppc64v1_emit_reg): New function.
3573 (ppc64v2_emit_reg): New function.
3574 (ppc64_emit_pop): New function.
3575 (ppc64_emit_stack_flush): New function.
3576 (ppc64_emit_swap): New function.
3577 (ppc64v1_emit_call): New function.
3578 (ppc64v2_emit_call): New function.
3579 (ppc64v1_emit_int_call_1): New function.
3580 (ppc64v2_emit_int_call_1): New function.
3581 (ppc64v1_emit_void_call_2): New function.
3582 (ppc64v2_emit_void_call_2): New function.
3583 (ppc64_emit_if_goto): New function.
3584 (ppc64_emit_eq_goto): New function.
3585 (ppc64_emit_ne_goto): New function.
3586 (ppc64_emit_lt_goto): New function.
3587 (ppc64_emit_le_goto): New function.
3588 (ppc64_emit_gt_goto): New function.
3589 (ppc64_emit_ge_goto): New function.
3590 (ppc64v1_emit_ops_impl): New static variable.
3591 (ppc64v2_emit_ops_impl): New static variable.
3592 (ppc_emit_ops): New function.
3593 (linux_low_target): Wire in ppc_emit_ops.
3594
a2174ba4
MK
35952016-03-31 Wei-cheng Wang <cole945@gmail.com>
3596 Marcin Kościelnicki <koriakin@0x04.net>
3597
3598 PR/17221
3599 * Makefile.in: Add powerpc-*-ipa.o
3600 * configure.srv: Add ipa_obj for powerpc*-linux.
3601 * linux-ppc-ipa.c: New file.
3602 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3603 includes.
3604 (PPC_FIELD): New macro.
3605 (PPC_SEXT): New macro.
3606 (PPC_OP6): New macro.
3607 (PPC_BO): New macro.
3608 (PPC_LI): New macro.
3609 (PPC_BD): New macro.
3610 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3611 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3612 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3613 (ppc_get_thread_area): New function.
3614 (is_elfv2_inferior): New function.
3615 (gen_ds_form): New function.
3616 (GEN_STD): New macro.
3617 (GEN_STDU): New macro.
3618 (GEN_LD): New macro.
3619 (GEN_LDU): New macro.
3620 (gen_d_form): New function.
3621 (GEN_ADDI): New macro.
3622 (GEN_ADDIS): New macro.
3623 (GEN_LI): New macro.
3624 (GEN_LIS): New macro.
3625 (GEN_ORI): New macro.
3626 (GEN_ORIS): New macro.
3627 (GEN_LWZ): New macro.
3628 (GEN_STW): New macro.
3629 (GEN_STWU): New macro.
3630 (gen_xfx_form): New function.
3631 (GEN_MFSPR): New macro.
3632 (GEN_MTSPR): New macro.
3633 (GEN_MFCR): New macro.
3634 (GEN_MTCR): New macro.
3635 (GEN_SYNC): New macro.
3636 (GEN_LWSYNC): New macro.
3637 (gen_x_form): New function.
3638 (GEN_OR): New macro.
3639 (GEN_MR): New macro.
3640 (GEN_LWARX): New macro.
3641 (GEN_STWCX): New macro.
3642 (GEN_CMPW): New macro.
3643 (gen_md_form): New function.
3644 (GEN_RLDICL): New macro.
3645 (GEN_RLDICR): New macro.
3646 (gen_i_form): New function.
3647 (GEN_B): New macro.
3648 (GEN_BL): New macro.
3649 (gen_b_form): New function.
3650 (GEN_BNE): New macro.
3651 (GEN_LOAD): New macro.
3652 (GEN_STORE): New macro.
3653 (gen_limm): New function.
3654 (gen_atomic_xchg): New function.
3655 (gen_call): New function.
3656 (ppc_relocate_instruction): New function.
3657 (ppc_install_fast_tracepoint_jump_pad): New function.
3658 (ppc_get_min_fast_tracepoint_insn_len): New function.
3659 (ppc_get_ipa_tdesc_idx): New function.
3660 (the_low_target): Wire in the new functions.
3661 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3662 tdescs.
3663 * linux-ppc-tdesc.h: New file.
3664
a13c4696
MK
36652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3666
3667 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3668 (alloc_jump_pad_buffer): New function.
3669 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3670 (alloc_jump_pad_buffer): New function.
3671 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3672 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3673 (alloc_jump_pad_buffer): New function.
3674 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3675 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3676 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3677 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3678
1cda1512
MK
36792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3680
3681 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3682 * linux-amd64-ipa.c: Likewise.
3683 * linux-i386-ipa.c: Likewise.
3684 * linux-s390-ipa.c: Likewise.
3685 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3686 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3687 set_trace_state_variable_value_ptr.
3688 (struct ipa_sym_addresses): Likewise.
3689 (symbol_list): Likewise.
3690 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3691 accessing gdb_collect directly.
3692 (gdb_collect_ptr_type): New typedef.
3693 (get_raw_reg_ptr_type): New typedef.
3694 (get_trace_state_variable_value_ptr_type): New typedef.
3695 (set_trace_state_variable_value_ptr_type): New typedef.
3696 (gdb_collect_ptr): New global.
3697 (get_raw_reg_ptr): New global.
3698 (get_trace_state_variable_value_ptr): New global.
3699 (set_trace_state_variable_value_ptr): New global.
3700 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3701 accessing get_raw_reg directly.
3702 (get_get_tsv_func_addr): Likewise for
3703 get_trace_state_variable_value_ptr.
3704 (get_set_tsv_func_addr): Likewise for
3705 set_trace_state_variable_value_ptr.
3706 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3707
72fb5488
SM
37082016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3709
3710 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3711
28170b88
MK
37122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3713
3714 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3715 packets.
3716 (relocate_instruction): Remove own_buf.
3717 * server.c (own_buf): Make global.
3718 (handle_v_requests): Make global.
3719 * server.h (own_buf): New declaration.
3720 (handle_v_requests): New prototype.
3721
f39e8743
MK
37222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3723
3724 PR 18377
3725 * linux-s390-low.c (add_insns): New function.
3726 (s390_emit_prologue): New function.
3727 (s390_emit_epilogue): New function.
3728 (s390_emit_add): New function.
3729 (s390_emit_sub): New function.
3730 (s390_emit_mul): New function.
3731 (s390_emit_lsh): New function.
3732 (s390_emit_rsh_signed): New function.
3733 (s390_emit_rsh_unsigned): New function.
3734 (s390_emit_ext): New function.
3735 (s390_emit_log_not): New function.
3736 (s390_emit_bit_and): New function.
3737 (s390_emit_bit_or): New function.
3738 (s390_emit_bit_xor): New function.
3739 (s390_emit_bit_not): New function.
3740 (s390_emit_equal): New function.
3741 (s390_emit_less_signed): New function.
3742 (s390_emit_less_unsigned): New function.
3743 (s390_emit_ref): New function.
3744 (s390_emit_if_goto): New function.
3745 (s390_emit_goto): New function.
3746 (s390_write_goto_address): New function.
3747 (s390_emit_litpool): New function.
3748 (s390_emit_const): New function.
3749 (s390_emit_call): New function.
3750 (s390_emit_reg): New function.
3751 (s390_emit_pop): New function.
3752 (s390_emit_stack_flush): New function.
3753 (s390_emit_zero_ext): New function.
3754 (s390_emit_swap): New function.
3755 (s390_emit_stack_adjust): New function.
3756 (s390_emit_set_r2): New function.
3757 (s390_emit_int_call_1): New function.
3758 (s390_emit_void_call_2): New function.
3759 (s390_emit_eq_goto): New function.
3760 (s390_emit_ne_goto): New function.
3761 (s390_emit_lt_goto): New function.
3762 (s390_emit_le_goto): New function.
3763 (s390_emit_gt_goto): New function.
3764 (s390_emit_ge_goto): New function.
3765 (s390x_emit_prologue): New function.
3766 (s390x_emit_epilogue): New function.
3767 (s390x_emit_add): New function.
3768 (s390x_emit_sub): New function.
3769 (s390x_emit_mul): New function.
3770 (s390x_emit_lsh): New function.
3771 (s390x_emit_rsh_signed): New function.
3772 (s390x_emit_rsh_unsigned): New function.
3773 (s390x_emit_ext): New function.
3774 (s390x_emit_log_not): New function.
3775 (s390x_emit_bit_and): New function.
3776 (s390x_emit_bit_or): New function.
3777 (s390x_emit_bit_xor): New function.
3778 (s390x_emit_bit_not): New function.
3779 (s390x_emit_equal): New function.
3780 (s390x_emit_less_signed): New function.
3781 (s390x_emit_less_unsigned): New function.
3782 (s390x_emit_ref): New function.
3783 (s390x_emit_if_goto): New function.
3784 (s390x_emit_const): New function.
3785 (s390x_emit_call): New function.
3786 (s390x_emit_reg): New function.
3787 (s390x_emit_pop): New function.
3788 (s390x_emit_stack_flush): New function.
3789 (s390x_emit_zero_ext): New function.
3790 (s390x_emit_swap): New function.
3791 (s390x_emit_stack_adjust): New function.
3792 (s390x_emit_int_call_1): New function.
3793 (s390x_emit_void_call_2): New function.
3794 (s390x_emit_eq_goto): New function.
3795 (s390x_emit_ne_goto): New function.
3796 (s390x_emit_lt_goto): New function.
3797 (s390x_emit_le_goto): New function.
3798 (s390x_emit_gt_goto): New function.
3799 (s390x_emit_ge_goto): New function.
3800 (s390_emit_ops): New function.
3801 (struct linux_target_ops): Fill in emit_ops hook.
3802
abd9baf9
MK
38032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3804
3805 PR 18377
3806 * Makefile.in: Add s390 IPA files.
3807 * configure.srv: Build IPA for s390.
3808 * linux-s390-ipa.c: New file.
3809 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3810 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3811 (tdesc_s390_linux32): Likewise.
3812 (init_registers_s390_linux32v1): Likewise.
3813 (tdesc_s390_linux32v1): Likewise.
3814 (init_registers_s390_linux32v2): Likewise.
3815 (tdesc_s390_linux32v2): Likewise.
3816 (init_registers_s390_linux64): Likewise.
3817 (tdesc_s390_linux64): Likewise.
3818 (init_registers_s390_linux64v1): Likewise.
3819 (tdesc_s390_linux64v1): Likewise.
3820 (init_registers_s390_linux64v2): Likewise.
3821 (tdesc_s390_linux64v2): Likewise.
3822 (init_registers_s390_te_linux64): Likewise.
3823 (tdesc_s390_te_linux64): Likewise.
3824 (init_registers_s390_vx_linux64): Likewise.
3825 (tdesc_s390_vx_linux64): Likewise.
3826 (init_registers_s390_tevx_linux64): Likewise.
3827 (tdesc_s390_tevx_linux64): Likewise.
3828 (init_registers_s390x_linux64): Likewise.
3829 (tdesc_s390x_linux64): Likewise.
3830 (init_registers_s390x_linux64v1): Likewise.
3831 (tdesc_s390x_linux64v1): Likewise.
3832 (init_registers_s390x_linux64v2): Likewise.
3833 (tdesc_s390x_linux64v2): Likewise.
3834 (init_registers_s390x_te_linux64): Likewise.
3835 (tdesc_s390x_te_linux64): Likewise.
3836 (init_registers_s390x_vx_linux64): Likewise.
3837 (tdesc_s390x_vx_linux64): Likewise.
3838 (init_registers_s390x_tevx_linux64): Likewise.
3839 (tdesc_s390x_tevx_linux64): Likewise.
3840 (have_hwcap_s390_vx): New static variable.
3841 (s390_arch_setup): Fill have_hwcap_s390_vx.
3842 (s390_get_thread_area): New function.
3843 (s390_ft_entry_gpr_esa): New const.
3844 (s390_ft_entry_gpr_zarch): New const.
3845 (s390_ft_entry_misc): New const.
3846 (s390_ft_entry_fr): New const.
3847 (s390_ft_entry_vr): New const.
3848 (s390_ft_main_31): New const.
3849 (s390_ft_main_64): New const.
3850 (s390_ft_exit_fr): New const.
3851 (s390_ft_exit_vr): New const.
3852 (s390_ft_exit_misc): New const.
3853 (s390_ft_exit_gpr_esa): New const.
3854 (s390_ft_exit_gpr_zarch): New const.
3855 (append_insns): New function.
3856 (s390_relocate_instruction): New function.
3857 (s390_install_fast_tracepoint_jump_pad): New function.
3858 (s390_get_min_fast_tracepoint_insn_len): New function.
3859 (s390_get_ipa_tdesc_idx): New function.
3860 (struct linux_target_ops): Wire in the above functions.
3861 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3862 * linux-s390-tdesc.h: New file.
3863
a4105d04
MK
38642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3865
3866 * linux-s390-low.c (s390_supports_tracepoints): New function.
3867 (struct linux_target_ops): Fill supports_tracepoints hook.
3868
35ac8b3e
YQ
38692016-03-18 Yao Qi <yao.qi@linaro.org>
3870
3871 * linux-low.c (lwp_signal_can_be_delivered): New function.
3872 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3873
94610ec4
YQ
38742016-03-18 Yao Qi <yao.qi@linaro.org>
3875
3876 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3877 0 if signal is enqueued. Remove 'signal' from one debugging
3878 message. Move one debugging message to some lines below.
3879 Remove code setting 'signal' to 0.
3880
80aea927
YQ
38812016-03-18 Yao Qi <yao.qi@linaro.org>
3882
3883 * linux-low.c (linux_low_filter_event): Remove redundant
3884 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3885
b04fd3be
MK
38862016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3887
3888 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3889 (struct linux_target_ops): Wire in the above.
3890
c40c8d4b
YQ
38912016-03-03 Yao Qi <yao.qi@linaro.org>
3892
3893 * linux-low.c: Update comments to start_step_over.
3894
0f8288ae
YQ
38952016-03-03 Yao Qi <yao.qi@linaro.org>
3896
3897 PR server/19736
3898 * linux-low.c (handle_extended_wait): Set child suspended
3899 if event_lwp->bp_reinsert isn't zero.
3900
fdbd04a8
YQ
39012016-03-02 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3904 enqueue_pending_signal.
3905
6896a8fa
MK
39062016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3907
3908 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3909 is actually loaded.
3910
ab503087
MK
39112016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3912
3913 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3914 (s390_regmap_3264) [!__s390x__]: New global.
3915 (s390_collect_ptrace_register): Skip map entries containing -1.
3916 (s390_supply_ptrace_register): Ditto.
3917 (s390_fill_gprs_high): New function.
3918 (s390_store_gprs_high): New function.
3919 (s390_regsets): Add NT_S390_HIGH_GPRS.
3920 (s390_get_hwcap): Enable on 31-bit.
3921 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3922 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3923 Detect NT_S390_HIGH_GPRS.
3924 (s390_usrregs_info_3264): Enable on 31-bit.
3925 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3926 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3927
ae91f625
MK
39282016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3929
3930 PR gdb/13808
3931 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3932 * configure.srv: Ditto.
3933 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3934 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3935 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3936 (init_registers_amd64_linux): Remove prototype.
3937 (tdesc_amd64_linux): Remove declaration.
3938 (get_ipa_tdesc): New function.
3939 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3940 initialize remaining tdescs.
3941 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3942 (init_registers_i386_linux): Remove prototype.
3943 (tdesc_i386_linux): Remove declaration.
3944 (get_ipa_tdesc): New function.
3945 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3946 initialize remaining tdescs.
3947 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3948 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3949 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3950 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3951 (x86_get_ipa_tdesc_idx): New function.
3952 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3953 * linux-x86-tdesc.h: New file.
3954 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3955 (target_get_ipa_tdesc_idx): New macro.
3956 * tracepoint.c (ipa_tdesc_idx): New macro.
3957 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3958 (symbol_list): Add ipa_tdesc_idx.
3959 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3960 (ipa_tdesc): Remove.
3961 (ipa_tdesc_idx): New variable.
3962 (get_context_regcache): Use get_ipa_tdesc.
3963 (gdb_collect): Ditto.
3964 (gdb_probe): Ditto.
3965 * tracepoint.h (get_ipa_tdesc): New prototype.
3966 (ipa_tdesc): Remove.
3967
e7ad2f14
PA
39682016-02-24 Pedro Alves <palves@redhat.com>
3969
3970 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3971 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3972 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3973 Factor out common code between the USE_SIGTRAP_SIGINFO and
3974 !USE_SIGTRAP_SIGINFO blocks.
3975 (linux_low_filter_event): Call save_stop_reason instead of
3976 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3977 Update comments.
3978 (linux_wait_1): Update comments.
3979
657f9cde
WW
39802016-02-24 Wei-cheng Wang <cole945@gmail.com>
3981
3982 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3983 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3984 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3985 ppc_insert_point, ppc_remove_point.
3986
b00b61e1
MK
39872016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3988
3989 * linux-s390-low.c (s390_supports_z_point_type): New function.
3990 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3991
553cb527
YQ
39922016-02-16 Yao Qi <yao.qi@linaro.org>
3993
3994 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3995 PC. Get pc from regcache_read_pc.
3996
a5652c21
YQ
39972016-02-12 Yao Qi <yao.qi@linaro.org>
3998
3999 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4000 or linux_get_pc_32bit.
4001 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4002
ed443b61
YQ
40032016-02-12 Yao Qi <yao.qi@linaro.org>
4004
4005 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4006 arm_linux_get_next_pcs_fixup.
4007
020ecd38
MK
40082016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4009
4010 * tracepoint.c (x_tracepoint_action_download): Change
4011 write_inferior_data_ptr to write_inferior_data_pointer.
4012 (cmd_qtstart): Likewise.
4013 (write_inferior_data_ptr): Remove.
4014 (download_agent_expr): Change write_inferior_data_ptr to
4015 write_inferior_data_pointer.
4016 (download_tracepoint_1): Likewise.
4017 (download_tracepoint): Likewise.
4018 (download_trace_state_variables): Likewise.
4019
7cae9051
WW
40202016-02-11 Wei-cheng Wang <cole945@gmail.com>
4021 Marcin Kościelnicki <koriakin@0x04.net>
4022
4023 * tracepoint.c (struct tracepoint_action_ops): Remove.
4024 (struct tracepoint_action): Remove ops.
4025 (m_tracepoint_action_download, r_tracepoint_action_download)
4026 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4027 size and offset accordingly.
4028 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4029 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4030 (tracepoint_action_send, tracepoint_action_download): New functions.
4031 Helpers for trace action handlers.
4032 (add_tracepoint_action): Remove setup actions ops.
4033 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4034
9f6a71b4
YQ
40352016-02-10 Yao Qi <yao.qi@linaro.org>
4036
4037 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4038
1e94266c
SM
40392016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4040
4041 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4042 to AC_OUTPUT.
4043 * configure: Regenerate.
4044
8adce034
SM
40452016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4046
4047 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4048 void * to gdb_byte *.
4049 * linux-low.c (siginfo_fixup): Likewise.
4050 (linux_xfer_siginfo): Likewise.
4051 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4052 Likewise.
4053 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4054
93813b37
WT
40552016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4056
4057 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4058 to srv_tgtobj.
4059 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4060 to srv_tgtobj.
4061 * linux-x86-low.c [__x86_64__]: Include
4062 "nat/amd64-linux-siginfo.h".
4063 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4064 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4065 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4066 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4067 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4068 (cpt_si_fd, si_timerid, si_overrun): Move from
4069 nat/amd64-linux-siginfo.c.
4070 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4071
8424cc97
SM
40722016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4073
4074 * server.c (skip_to_semicolon): Remove.
4075 (process_point_options): Use strchrnul instead of
4076 skip_to_semicolon.
4077
4d18591b
YQ
40782016-01-26 Yao Qi <yao.qi@linaro.org>
4079
4080 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4081 * linux-low.c (install_software_single_step_breakpoints): Don't
4082 call regcache_read_pc.
4083 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4084 argument pc.
4085
d8020970
YQ
40862016-01-26 Yao Qi <yao.qi@linaro.org>
4087
4088 * linux-low.c (install_software_single_step_breakpoints): Call
4089 regcache_read_pc instead of get_pc.
4090
8b207339
YQ
40912016-01-26 Yao Qi <yao.qi@linaro.org>
4092
4093 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4094 (unblock_async_io): Rename to ...
4095 (block_unblock_async_io): ... it. New function.
4096 (enable_async_io): Don't install SIGIO handler. Unblock it
4097 instead.
4098 (disable_async_io): Don't ignore SIGIO. Block it instead.
4099 (initialize_async_io): Install SIGIO handler. Don't call
4100 unblock_async_io.
4101
18879fef
YQ
41022016-01-26 Yao Qi <yao.qi@linaro.org>
4103
4104 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4105 first character is '\003', call *the_target->request_interrupt.
4106
a0f8e08a
YQ
41072016-01-25 Yao Qi <yao.qi@linaro.org>
4108
4109 * remote-utils.c (new_thread_notify): Remove.
4110 (dead_thread_notify): Likewise.
4111 * remote-utils.h (new_thread_notify): Remove declaration.
4112 (dead_thread_notify): Likewise.
4113
cc5fd9ab
MK
41142016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4115
4116 * gdb.trace/pending.exp: Fix expected message on continue.
4117
99e8eb11
MK
41182016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4119
4120 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4121 it works properly on big-endian machines where sizeof (CORE_ADDR)
4122 != sizeof (void *).
4123
a994041d
PA
41242016-01-21 Pedro Alves <palves@redhat.com>
4125
4126 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4127 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4128 * configure: Regenerate.
4129
f7a6a40d
YQ
41302016-01-21 Yao Qi <yao.qi@linaro.org>
4131
4132 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4133 is_thumb and set it according to CPSR saved on the stack.
4134 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4135 arm_sigreturn_next_pc.
4136
6f69e520
YQ
41372016-01-18 Yao Qi <yao.qi@linaro.org>
4138
4139 * linux-low.c (linux_set_pc_64bit): New function.
4140 (linux_get_pc_64bit): New function.
4141 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4142 Declare.
4143 * linux-sparc-low.c (debug_threads): Remove declaration.
4144 (sparc_get_pc): Remove.
4145 (the_low_target): Use linux_get_pc_64bit instead of
4146 sparc_get_pc.
4147 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4148 (the_low_target): Use linux_get_pc_64bit and
4149 linux_set_pc_64bit.
4150
276d4552
YQ
41512016-01-18 Yao Qi <yao.qi@linaro.org>
4152
4153 * linux-arm-low.c (debug_threads): Remove declaration.
4154 (arm_get_pc, arm_set_pc): Remove.
4155 (the_low_target): Use linux_get_pc_32bit and
4156 linux_set_pc_32bit.
4157 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4158 (the_low_target): Use linux_get_pc_32bit and
4159 linux_set_pc_32bit.
4160 * linux-cris-low.c (debug_threads): Remove declaration.
4161 (cris_get_pc, cris_set_pc,): Remove.
4162 (the_low_target): Use linux_get_pc_32bit and
4163 linux_set_pc_32bit.
4164 * linux-crisv32-low.c (debug_threads): Remove declaration.
4165 (cris_get_pc, cris_set_pc): Remove.
4166 (the_low_target): Use linux_get_pc_32bit and
4167 linux_set_pc_32bit.
4168 * linux-low.c: Include inttypes.h.
4169 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4170 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4171 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4172 (the_low_target): Use linux_get_pc_32bit and
4173 linux_set_pc_32bit.
4174 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4175 (the_low_target): Use linux_get_pc_32bit and
4176 linux_set_pc_32bit.
4177 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4178 (the_low_target): Use linux_get_pc_32bit and
4179 linux_set_pc_32bit.
4180 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4181 (the_low_target): Use linux_get_pc_32bit and
4182 linux_set_pc_32bit.
4183 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4184 (the_low_target): Use linux_get_pc_32bit and
4185 linux_set_pc_32bit.
4186
eb0edac8
GB
41872016-01-18 Gary Benson <gbenson@redhat.com>
4188
4189 * configure.ac (AC_FUNC_FORK): New check.
4190 * config.in: Regenerate.
4191 * configure: Likewise.
4192
1b451dda
YQ
41932016-01-14 Yao Qi <yao.qi@linaro.org>
4194
4195 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4196 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4197 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4198 arm_get_next_pcs_ctor.
4199
82075af2
JS
42002016-01-12 Josh Stone <jistone@redhat.com>
4201 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4202
4203 * inferiors.h: Include "gdb_vecs.h".
4204 (struct process_info): Add syscalls_to_catch.
4205 * inferiors.c (remove_process): Free syscalls_to_catch.
4206 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4207 syscall_return stops.
4208 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4209 * server.c (handle_general_set): Handle QCatchSyscalls.
4210 (handle_query): Report support for QCatchSyscalls.
4211 * target.h (struct target_ops): Add supports_catch_syscall.
4212 (target_supports_catch_syscall): New macro.
4213 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4214 (struct lwp_info): Add syscall_state.
4215 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4216 Maintain syscall_state and syscalls_to_catch across exec.
4217 (get_syscall_trapinfo): New function, proxy to the_low_target.
4218 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4219 (linux_low_filter_event): Toggle syscall_state entry/return for
4220 syscall traps, and set it ignored for all others.
4221 (gdb_catching_syscalls_p): New function.
4222 (gdb_catch_this_syscall_p): New function.
4223 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4224 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4225 (linux_supports_catch_syscall): New function.
4226 (linux_target_ops): Install it.
4227 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4228 (the_low_target): Install it.
4229
8f13a3ce
MF
42302016-01-12 Mike Frysinger <vapier@gentoo.org>
4231
4232 * acinclude.m4: Include new ../warning.m4 file.
4233 * configure: Regenerated.
4234 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4235
5b3da067
MF
42362016-01-12 Mike Frysinger <vapier@gentoo.org>
4237
4238 * ax.c (is_goto_target): Mark static.
4239 * linux-low.c (register_addr): Likewise.
4240 (linux_fetch_registers, linux_store_registers): Likewise.
4241 * mem-break.c (any_persistent_commands): Fix old prototype.
4242 (add_commands_to_breakpoint): Mark static.
4243 * regcache.c (find_register_by_name): Delete unused func.
4244 * remote-utils.c (hex_or_minus_one): Mark static.
4245 * server.c (monitor_show_help): Mark static.
4246 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4247 handle_v_requests): Likewise.
4248
bc504a31
PA
42492016-01-12 Pedro Alves <palves@redhat.com>
4250
4251 Remove use of the registered trademark symbol throughout.
4252
5a0dd67a
YQ
42532016-01-08 Yao Qi <yao.qi@linaro.org>
4254
4255 * remote-utils.c (getpkt): If c is '\003', call target hook
4256 request_interrupt.
4257
b2ca446f
YQ
42582016-01-06 Yao Qi <yao.qi@linaro.org>
4259
4260 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4261 linux-aarch32-low.c.
4262 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4263 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4264 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4265 (thumb2_breakpoint): Declare.
4266 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4267 linux-aarch32-low.h.
4268 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4269 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4270 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4271
edd88788
JB
42722016-01-01 Joel Brobecker <brobecker@adacore.com>
4273
4274 * gdbreplay.c (gdbreplay_version): Change copyright year in
4275 version message.
4276 * server.c (gdbserver_version): Likewise.
4277
65da7f14
PP
42782015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4279
4280 * server.c (crc32_table): Delete.
4281 (crc32): Use libiberty's xcrc32 function.
4282
4abd5ed2
JB
42832015-12-22 Joel Brobecker <brobecker@adacore.com>
4284
4285 * lynx-low.c (lynx_delete_thread_callback): New function.
4286 (lynx_mourn): Properly delete our process and all of its
4287 threads. Remove call to clear_inferiors.
4288
0e50fe5c
JB
42892015-12-22 Joel Brobecker <brobecker@adacore.com>
4290
4291 * target.c (thread_search_callback): Add check that
4292 the thread_stopped target callback is not NULL before
4293 calling it.
4294
35adc03f
YQ
42952015-12-21 Yao Qi <yao.qi@linaro.org>
4296
4297 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4298 arm breakpoint.
4299
bd2b2909
AT
43002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4301
4302 * server.c (handle_query): Call target_supports_software_single_step.
4303
7fe5e27e
AT
43042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4305
4306 * linux-low.c (single_step): New function.
4307 (linux_resume_one_lwp_throw): Call single_step.
4308 (start_step_over): Likewise.
4309
d9311bfa
AT
43102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4311
4312 * Makefile.in (SFILES): Append arch/arm-linux.c,
4313 arch/arm-get-next-pcs.c.
4314 (arm-linux.o): New rule.
4315 (arm-get-next-pcs.o): New rule.
4316 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4317 arm-linux.o.
4318 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4319 to linux-aarch32-low.c.
4320 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4321 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4322 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4323 (thumb2_breakpoint_len): Likewise.
4324 (arm_is_thumb_mode): Make non-static.
4325 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4326 from linux-aarch32-low.c.
4327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4328 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4329 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4330 (thumb2_breakpoint_len): Likewise.
4331 (arm_is_thumb_mode): New declaration.
4332 * linux-arm-low.c: Include arch/arm-linux.h
4333 aarch/arm-get-next-pcs.h, sys/syscall.h.
4334 (get_next_pcs_ops): New struct.
4335 (get_next_pcs_addr_bits_remove): New function.
4336 (get_next_pcs_is_thumb): New function.
4337 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4338 (arm_sigreturn_next_pc): Likewise.
4339 (get_next_pcs_syscall_next_pc): Likewise.
4340 (arm_gdbserver_get_next_pcs): Likewise.
4341 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4342 Initialize.
4343 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4344 * server.h: Include gdb_vecs.h.
4345
68ce2059
AT
43462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4347
4348 * Makefile.in (SFILES): Append common/common-regcache.c.
4349 (OBS): Append common-regcache.o.
4350 (common-regcache.o): New rule.
4351 * regcache.c (init_register_cache): Initialize cache to
4352 REG_UNAVAILABLE.
4353 (regcache_raw_read_unsigned): New function.
4354 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4355 register_status enum.
4356
fa5308bd
AT
43572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4358
4359 * linux-aarch64-low.c (the_low_targets): Rename
4360 breakpoint_reinsert_addr to get_next_pcs.
4361 * linux-arm-low.c (the_low_targets): Likewise.
4362 * linux-bfin-low.c (the_low_targets): Likewise.
4363 * linux-cris-low.c (the_low_targets): Likewise.
4364 * linux-crisv32-low.c (the_low_targets): Likewise.
4365 * linux-low.c (can_software_single_step): Likewise.
4366 (install_software_single_step_breakpoints): New function.
4367 (start_step_over): Use install_software_single_step_breakpoints.
4368 * linux-low.h: New CORE_ADDR vector.
4369 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4370 get_next_pcs.
4371 * linux-mips-low.c (the_low_targets): Likewise.
4372 * linux-nios2-low.c (the_low_targets): Likewise.
4373 * linux-sparc-low.c (the_low_targets): Likewise.
4374
4a6ed09b
PA
43752015-12-17 Pedro Alves <palves@redhat.com>
4376
4377 * linux-low.c (linux_kill_one_lwp): Remove references to
4378 LinuxThreads.
4379 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4380 to 'kill'.
4381 (linux_init_signals): Delete.
4382 (initialize_low): Adjust.
4383 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4384
7544db95
PA
43852015-12-16 Pedro Alves <palves@redhat.com>
4386
4387 * configure.ac (compiler warning flags): When testing a
4388 -Wno-foo option, check whether -Wfoo works instead.
4389 * configure: Regenerate.
4390
8020350c
DB
43912015-12-11 Don Breazeal <donb@codesourcery.com>
4392
4393 * server.c (process_serial_event): Don't exit from gdbserver
4394 in remote mode if there are still active inferiors.
4395
db91f502
YQ
43962015-12-11 Yao Qi <yao.qi@linaro.org>
4397
4398 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4399 arm_breakpoint_at if the process is 32-bit.
4400
b37a6290
YQ
44012015-12-11 Yao Qi <yao.qi@linaro.org>
4402
4403 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4404 arm breakpoint.
4405
17b1509a
YQ
44062015-12-07 Yao Qi <yao.qi@linaro.org>
4407
4408 * configure.srv: Append arm.o to srv_tgtobj for
4409 aarch64*-*-linux* target.
4410 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4411 from linux-arm-low.c.
4412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4413 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4414 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4415 (thumb2_breakpoint_len): Likewise.
4416 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4417 (arm_breakpoint_kinds): Likewise.
4418 (arm_breakpoint_kind_from_pc): Likewise.
4419 (arm_sw_breakpoint_from_kind): Likewise.
4420 (arm_breakpoint_kind_from_current_state): Likewise.
4421 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4422 (arm_sw_breakpoint_from_kind): Declare.
4423 (arm_breakpoint_kind_from_current_state): Declare.
4424 (arm_breakpoint_at): Declare.
4425 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4426 arm_sw_breakpoint_from_kind if process is 32-bit.
4427 (aarch64_breakpoint_kind_from_pc): New function.
4428 (aarch64_breakpoint_kind_from_current_state): New function.
4429 (the_low_target): Initialize fields breakpoint_kind_from_pc
4430 and breakpoint_kind_from_current_state.
4431 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4432 linux-aarch32-low.c.
4433 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4434 (arm_breakpoint, arm_breakpoint_len): Likewise.
4435 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4436 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4437 (arm_is_thumb_mode): Likewise.
4438 (arm_breakpoint_at): Likewise.
4439 (arm_breakpoint_kind_from_pc): Likewise.
4440 (arm_sw_breakpoint_from_kind): Likewise.
4441 (arm_breakpoint_kind_from_current_state): Likewise.
4442
4443 Revert:
4444 2015-08-04 Yao Qi <yao.qi@linaro.org>
4445
4446 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4447 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4448 * server.c (extended_protocol): Remove "static".
4449 * server.h (extended_protocol): Declare it.
4450
ece66d65
JS
44512015-12-04 Josh Stone <jistone@redhat.com>
4452
4453 * target.h (struct target_ops) <arch_setup>: Rename to ...
4454 (struct target_ops) <post_create_inferior>: ... this.
4455 (target_arch_setup): Rename to ...
4456 (target_post_create_inferior): ... this, calling post_create_inferior.
4457 * server.c (start_inferior): Update target_arch_setup calls to
4458 target_post_create_inferior.
4459 * linux-low.c (linux_low_ptrace_options): Forward declare.
4460 (linux_arch_setup): Update its comment for general use.
4461 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4462 (struct linux_target_ops): Use linux_post_create_inferior.
4463 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4464 to post_create_inferior.
4465 * nto-low.c (struct nto_target_ops): Likewise.
4466 * spu-low.c (struct spu_target_ops): Likewise.
4467 * win32-low.c (struct win32_target_ops): Likewise.
4468
e58c48b4
AT
44692015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4470
4471 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4472
fbec8956
AT
44732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4474
4475 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4476 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4477 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4478 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4479 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4480 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4481 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4482 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4483 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4484 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4485 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4486 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4487
9b4c5f87
AT
44882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4489
4490 * linux-low.c (linux_look_up_symbols): Don't call
4491 linux_supports_traceclone.
4492 * linux-low.h (thread_db_init): Remove use_events argument.
4493 * thread-db.c (thread_db_use_event): Remove global variable.
4494 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4495 (struct thread_db) <td_create_bp>: Remove field.
4496 (thread_db_create_event): Remove function.
4497 (thread_db_enable_reporting): Likewise.
4498 (find_one_thread): Don't check for thread_db_use_events.
4499 (attach_thread): Likewise.
4500 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4501 (try_thread_db_load_1): Don't check for thread_db_use_events.
4502 (thread_db_init): Remove use_events argument and thread events
4503 handling.
4504 (remove_thread_event_breakpoints): Remove function.
4505 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4506
7d00775e
AT
45072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4508
4509 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4510 New function.
4511 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4512 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4513 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4514 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4515 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4516 Initialize.
4517 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4518 New function.
4519 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4520 * linux-low.c (can_hardware_single_step): Use
4521 supports_hardware_single_step.
4522 (can_software_single_step): New function.
4523 (start_step_over): Call can_software_single_step.
4524 (linux_supports_hardware_single_step): New function.
4525 (struct target_ops) <supports_software_single_step>: Initialize.
4526 * linux-low.h (struct linux_target_ops)
4527 <supports_hardware_single_step>: Initialize.
4528 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4529 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4530 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4531 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4532 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4533 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4534 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4535 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4536 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4537 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4538 Initialize.
4539 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4540 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4541 Initialize.
4542 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4543 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4544 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4545 New function.
4546 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4547 * target.h (struct target_ops): <supports_software_single_step>:
4548 New field.
4549 (target_supports_software_single_step): New macro.
4550
2d97cd35
AT
45512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4552
4553 * linux-low.c (linux_wait_1): Fix pc advance condition.
4554 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4555 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4556
769ef81f
AT
45572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4558
4559 * linux-arm-low.c (arm_is_thumb_mode): New function.
4560 (arm_breakpoint_at): Use arm_is_thumb_mode.
4561 (arm_breakpoint_kind_from_current_state): New function.
4562 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4563 Initialize.
4564 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4565 (linux_breakpoint_kind_from_current_state): New function.
4566 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4567 * linux-low.h (struct linux_target_ops)
4568 <breakpoint_kind_from_current_state>: New field.
4569 * target.h (struct target_ops): Likewise.
4570 (target_breakpoint_kind_from_current_state): New macro.
4571
1bebeeca
PA
45722015-11-30 Pedro Alves <palves@redhat.com>
4573
4574 * linux-low.c (linux_resume): Wake up the event loop before
4575 returning.
4576
a67a9fae
PA
45772015-11-30 Pedro Alves <palves@redhat.com>
4578
4579 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4580 check.
4581 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4582 to -1.
4583 * target.c (struct thread_search): New structure.
4584 (thread_search_callback): New function.
4585 (prev_general_thread): New global.
4586 (prepare_to_access_memory, done_accessing_memory): New functions.
4587 * target.h (prepare_to_access_memory, done_accessing_memory):
4588 Replace macros with function declarations.
4589
f2faf941
PA
45902015-11-30 Pedro Alves <palves@redhat.com>
4591
4592 PR 14618
4593 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4594 report TARGET_WAITKIND_NO_RESUMED.
4595 * remote-utils.c (prepare_resume_reply): Handle
4596 TARGET_WAITKIND_NO_RESUMED.
4597 * server.c (report_no_resumed): New global.
4598 (handle_query) <qSupported>: Handle "no-resumed+". Report
4599 "no-resumed+" support.
4600 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4601 return error if the client doesn't support no-resumed events.
4602 (push_stop_notification): New function.
4603 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4604 events if the client supports them.
4605
a681f9c9
PA
46062015-11-30 Pedro Alves <palves@redhat.com>
4607
4608 * linux-low.c (thread_still_has_status_pending_p): Don't check
4609 vCont;t here.
4610 (lwp_resumed): New function.
4611 (status_pending_p_callback): Return early if the LWP is not
4612 supposed to be resumed.
4613
65706a29
PA
46142015-11-30 Pedro Alves <palves@redhat.com>
4615
4616 * linux-low.c (handle_extended_wait): Assert that the LWP's
4617 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4618 thread create events, leave the new child's status pending.
4619 (linux_low_filter_event): If GDB wants to hear about thread exit
4620 events, leave the LWP marked dead and don't delete it.
4621 (linux_wait_for_event_filtered): Don't check for thread exit.
4622 (filter_exit_event): New function.
4623 (linux_wait_1): Use it, when returning an exit event.
4624 (linux_resume_one_lwp_throw): Assert that the LWP's
4625 waitstatus is TARGET_WAITKIND_IGNORE.
4626 * remote-utils.c (prepare_resume_reply): Handle
4627 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4628 * server.c (report_thread_events): New global.
4629 (handle_general_set): Handle QThreadEvents.
4630 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4631 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4632 TARGET_WAITKIND_THREAD_EXITED.
4633 * server.h (report_thread_events): Declare.
4634
56cf4bed
PA
46352015-11-30 Pedro Alves <palves@redhat.com>
4636
4637 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4638 the thread's last_resume_kind was resume_stop.
4639
500c1d85
PA
46402015-11-30 Pedro Alves <palves@redhat.com>
4641
4642 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4643 before returning.
4644
de979965
PA
46452015-11-30 Pedro Alves <palves@redhat.com>
4646
4647 * server.c (handle_v_requests): Handle vCtrlC.
4648
34c65914
PA
46492015-11-30 Pedro Alves <palves@redhat.com>
4650
4651 * gdbthread.h (find_any_thread_of_pid): Declare.
4652 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4653 functions.
4654 * server.c (handle_query): If current_thread is NULL, look for
4655 another thread of the selected process.
4656
79efa585 46572015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4658 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4659
4660 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4661 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4662 name in reply.
4663 * target.h (struct target_ops) <thread_name>: New field.
4664 (target_thread_name): New macro.
4665
80d82c19
JB
46662015-11-23 Joel Brobecker <brobecker@adacore.com>
4667
4668 * regcache.h (regcache_invalidate_pid): Add declaration.
4669 * regcache.c (regcache_invalidate_pid): New function, extracted
4670 from regcache_invalidate.
4671 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4672 Add trivial documentation comment.
4673 * lynx-low.c: Use regcache_invalidate_pid instead of
4674 regcache_invalidate.
4675
64da5dd5
JB
46762015-11-23 Joel Brobecker <brobecker@adacore.com>
4677
4678 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4679 and Elf64_auxv_t if the target is Android.
4680
37ce4055
DE
46812015-11-22 Doug Evans <xdje42@gmail.com>
4682
4683 * target.h: #include <sys/types.h>.
4684
06e03fff
PA
46852015-11-19 Pedro Alves <palves@redhat.com>
4686
4687 * linux-low.c (linux_process_qsupported): Change prototype.
4688 Adjust.
4689 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4690 Change prototype.
4691 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4692 and adjust to loop over all features.
4693 * server.c (handle_query) <qSupported>: Adjust to call
4694 target_process_qsupported once, passing it a vector of unprocessed
4695 features.
4696 * target.h (struct target_ops) <process_qsupported>: Change
4697 prototype.
4698 (target_process_qsupported): Adjust.
4699
9a084706
PA
47002015-11-19 Pedro Alves <palves@redhat.com>
4701
4702 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4703 mode.
4704 * configure: Regenerate.
4705
dad44a1f
PA
47062015-11-19 Pedro Alves <palves@redhat.com>
4707
4708 * configure: Regenerate.
4709
231c0592
YQ
47102015-11-19 Yao Qi <yao.qi@linaro.org>
4711
4712 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4713 type to uint32_t.
4714
6c1c9a8b
YQ
47152015-11-19 Yao Qi <yao.qi@linaro.org>
4716
4717 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4718 (struct aarch64_operand): Move enum out.
4719
9caa3311
YQ
47202015-11-19 Yao Qi <yao.qi@linaro.org>
4721
4722 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4723 struct user_fpsimd_state *.
4724 (aarch64_store_fpregset): Likewise.
4725
6a69a054
YQ
47262015-11-19 Yao Qi <yao.qi@linaro.org>
4727
4728 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4729 struct user_pt_regs *.
4730 (aarch64_store_gregset): Likewise.
4731
1798301e
PA
47322015-11-18 Pedro Alves <palves@redhat.com>
4733
4734 * Makefile.in (all_object_files): Add $IPA_OBJS.
4735
ce7715e2
PA
47362015-11-17 Pedro Alves <palves@redhat.com>
4737
4738 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4739 GDB_SIGNAL_0 and gdb_signal_to_string.
4740
c0879059
PA
47412015-11-17 Pedro Alves <palves@redhat.com>
4742
4743 * win32-low.c (handle_output_debug_string): Remove parameter.
4744 (win32_kill): Remove our_status local and adjust call to
4745 handle_output_debug_string.
4746 (get_child_debug_event): Adjust call to
4747 handle_output_debug_string.
4748
1996e237
SM
47492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4750
4751 * linux-mips-low.c (mips_fill_gregset): Add cast.
4752 (mips_store_gregset): Likewise.
4753 (mips_fill_fpregset): Likewise.
4754 (mips_store_fpregset): Likewise.
4755
cbec665b
SM
47562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4757
4758 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4759 priv.
4760
eb3e3c67
SM
47612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4762
4763 * linux-mips-low.c (mips_linux_new_thread): Change type of
4764 watch_type to enum target_hw_bp_type.
4765
171de4b8
SM
47662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4767
4768 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4769 Change return type to arm_hwbp_type.
4770
04248ead
SM
47712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4772
4773 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4774 (arm_store_gregset): Likewise.
4775 * linux-arm-low.c (arm_get_hwcap): Likewise.
4776 (arm_read_description): Likewise.
4777
04b3479c
SM
47782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4779
4780 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4781
2bc84e8a
SM
47822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4783
4784 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4785 (ppc_fill_vsxregset): Likewise.
4786 (ppc_store_vsxregset): Likewise.
4787 (ppc_fill_vrregset): Likewise.
4788 (ppc_store_vrregset): Likewise.
4789 (ppc_fill_evrregset): Likewise.
4790 (ppc_store_evrregset): Likewise.
4791
e6c5bb05
SM
47922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4793
4794 * linux-ppc-low.c (ppc_usrregs_info): Remove
4795 forward-declaration.
4796 (ppc_arch_setup): Move lower in file.
4797
7ea45d72
SM
47982015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4799
4800 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4801 (ps_pdwrite): Likewise.
4802
69291610
HW
48032015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4804
4805 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4806 to after assert checks.
4807
b42945fd
SM
48082015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4809
4810 * proc-service.c (ps_pdread): Add/adjust casts.
4811 (ps_pdwrite): Add/adjust casts.
4812
d6f85c84
SM
48132015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4814
4815 * server.c (handle_search_memory_1): Cast return value of
4816 memmem.
4817
f98cd059
SM
48182015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4819
4820 * server.c (write_qxfer_response): Change type of data to
4821 gdb_byte *.
4822
d2412fa5
PA
48232015-10-29 Pedro Alves <palves@redhat.com>
4824
4825 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4826
c17414a2
PA
48272015-10-29 Pedro Alves <palves@redhat.com>
4828
4829 * tracepoint.c (clear_installed_tracepoints): Add casts.
4830
e053fbc4
PA
48312015-10-29 Pedro Alves <palves@redhat.com>
4832
4833 * server.c (handle_v_cont, process_serial_event): Add enum
4834 gdb_signal casts to signal parsing code.
4835
add67df8
PA
48362015-10-29 Pedro Alves <palves@redhat.com>
4837
4838 * linux-low.h (NULL_REGSET): Define.
4839 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4840 * linux-arm-low.c (arm_regsets): Likewise.
4841 * linux-crisv32-low.c (cris_regsets): Likewise.
4842 * linux-m68k-low.c (m68k_regsets): Likewise.
4843 * linux-mips-low.c (mips_regsets): Likewise.
4844 * linux-nios2-low.c (nios2_regsets): Likewise.
4845 * linux-ppc-low.c (ppc_regsets): Likewise.
4846 * linux-s390-low.c (s390_regsets): Likewise.
4847 * linux-sh-low.c (sh_regsets): Likewise.
4848 * linux-sparc-low.c (sparc_regsets): Likewise.
4849 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4850 * linux-tile-low.c (tile_regsets): Likewise.
4851 * linux-x86-low.c (x86_regsets): Likewise.
4852 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4853
50bc912a
PA
48542015-10-29 Pedro Alves <palves@redhat.com>
4855
4856 * linux-low.h (NULL_REGSET): Define.
4857 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4858 * linux-arm-low.c (arm_regsets): Likewise.
4859 * linux-crisv32-low.c (cris_regsets): Likewise.
4860 * linux-m68k-low.c (m68k_regsets): Likewise.
4861 * linux-mips-low.c (mips_regsets): Likewise.
4862 * linux-nios2-low.c (nios2_regsets): Likewise.
4863 * linux-ppc-low.c (ppc_regsets): Likewise.
4864 * linux-s390-low.c (s390_regsets): Likewise.
4865 * linux-sh-low.c (sh_regsets): Likewise.
4866 * linux-sparc-low.c (sparc_regsets): Likewise.
4867 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4868 * linux-tile-low.c (tile_regsets): Likewise.
4869 * linux-x86-low.c (x86_regsets): Likewise.
4870 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4871
682b2546
DE
48722015-10-26 Doug Evans <dje@google.com>
4873
4874 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4875
963843d4
DE
48762015-10-26 Doug Evans <dje@google.com>
4877
4878 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4879
d41401ac
DE
48802015-10-26 Doug Evans <dje@google.com>
4881
4882 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4883 for debug_printf.
4884 (attach_thread, find_new_threads_callback): Ditto.
4885
3db28855
AT
48862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4887
4888 * mem-break.h (set_breakpoint_data): Remove.
4889
fb78e89c
AT
48902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4891
4892 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4893 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4894 (initialize_low): Remove set_breakpoint_data call.
4895 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4896 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4897 (initialize_low): Remove set_breakpoint_data call.
4898 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4899 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4900 (initialize_low): Remove set_breakpoint_data call.
4901
2e6ee069
AT
49022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4903
4904 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4905 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4906 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4907 * target.h (target_breakpoint_kind_from_pc): New macro.
4908
1652a986
AT
49092015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4910
4911 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4912 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4913 the default breakpoint kind.
4914
abeead09
AT
49152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4916
4917 * linux-arm-low.c (arm_supports_z_point_type): Add software
4918 breakpoint support.
4919
b0b4b501
AT
49202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4921
4922 * linux-arm-low.c: Refactor breakpoint definitions.
4923 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4924 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4925
8689682c
AT
49262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4927
4928 * Makefile.in: Add arm.c/o.
4929 * configure.srv: Likewise.
4930 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4931 (arm_breakpoint_kind_from_pc): New function.
4932 (arm_sw_breakpoint_from_kind): Return proper kind.
4933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4934
27165294
AT
49352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4936
4937 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4938 removal.
4939 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4940 (struct raw_breakpoint) <size>: Remove.
4941 (struct raw_breakpoint) <kind>: Add.
4942 (bp_size): New function.
4943 (bp_opcode): Likewise.
4944 (find_raw_breakpoint_at): Adjust for kind.
4945 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4946 (remove_memory_breakpoint): Adjust for kind call bp_size.
4947 (set_raw_breakpoint_at): Adjust for kind.
4948 (set_breakpoint): Likewise.
4949 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4950 (delete_raw_breakpoint): Adjust for kind.
4951 (delete_breakpoint): Likewise.
4952 (find_gdb_breakpoint): Likewise.
4953 (set_gdb_breakpoint_1): Likewise.
4954 (set_gdb_breakpoint): Likewise.
4955 (delete_gdb_breakpoint_1): Likewise.
4956 (delete_gdb_breakpoint): Likewise.
4957 (uninsert_raw_breakpoint): Likewise.
4958 (reinsert_raw_breakpoint): Likewise.
4959 (set_breakpoint_data): Remove.
4960 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4961 (check_mem_read): Adjust for kind call bp_size.
4962 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4963 (clone_one_breakpoint): Adjust for kind.
4964 * mem-break.h (set_gdb_breakpoint): Likewise.
4965 (delete_gdb_breakpoint): Likewise.
4966 * server.c (process_serial_event): Likewise.
4967
dd373349
AT
49682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4969
4970 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4971 (struct linux_target_ops) <breakpoint>: Remove.
4972 (struct linux_target_ops) <breakpoint_len>: Remove.
4973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4975 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4976 (arm_sw_breakpoint_from_kind): New function.
4977 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4978 (struct linux_target_ops) <breakpoint>: Remove.
4979 (struct linux_target_ops) <breakpoint_len>: Remove.
4980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4982 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4983 (struct linux_target_ops) <breakpoint>: Remove.
4984 (struct linux_target_ops) <breakpoint_len>: Remove.
4985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4987 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4988 (struct linux_target_ops) <breakpoint>: Remove.
4989 (struct linux_target_ops) <breakpoint_len>: Remove.
4990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4992 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4993 and sw_breakpoint_from_kind to increment the pc.
4994 (linux_breakpoint_kind_from_pc): New function.
4995 (linux_sw_breakpoint_from_kind): New function.
4996 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4997 (initialize_low): Call breakpoint_kind_from_pc and
4998 sw_breakpoint_from_kind to replace breakpoint_data/len.
4999 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5000 New field.
5001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5002 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5003 (struct linux_target_ops) <breakpoint>: Remove.
5004 (struct linux_target_ops) <breakpoint_len>: Remove.
5005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5007 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5008 (struct linux_target_ops) <breakpoint>: Remove.
5009 (struct linux_target_ops) <breakpoint_len>: Remove.
5010 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5011 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5012 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5013 (struct linux_target_ops) <breakpoint>: Remove.
5014 (struct linux_target_ops) <breakpoint_len>: Remove.
5015 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5016 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5017 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5018 (struct linux_target_ops) <breakpoint>: Remove.
5019 (struct linux_target_ops) <breakpoint_len>: Remove.
5020 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5021 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5022 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5023 (struct linux_target_ops) <breakpoint>: Remove.
5024 (struct linux_target_ops) <breakpoint_len>: Remove.
5025 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5026 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5027 * linux-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5033 (struct linux_target_ops) <breakpoint>: Remove.
5034 (struct linux_target_ops) <breakpoint_len>: Remove.
5035 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5036 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5037 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5038 (struct linux_target_ops) <breakpoint>: Remove.
5039 (struct linux_target_ops) <breakpoint_len>: Remove.
5040 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5041 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5042 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5043 (struct linux_target_ops) <breakpoint>: Remove.
5044 (struct linux_target_ops) <breakpoint_len>: Remove.
5045 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5046 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5047 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5048 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5049 (struct linux_target_ops) <breakpoint>: Remove.
5050 (struct linux_target_ops) <breakpoint_len>: Remove.
5051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5053 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5054 (struct linux_target_ops) <breakpoint>: Remove.
5055 (struct linux_target_ops) <breakpoint_len>: Remove.
5056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5058
4cd98a19
AT
50592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5060
5061 * linux-cris-low.c (cris_get_pc): Remove void arg.
5062
774ee6d2
AR
50632015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5064
5065 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5066 variable name.
5067
833dcd29
AR
50682015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5069
5070 * inferiors.c (thread_pid_matches_callback): New function.
5071 (find_thread_process): New function.
5072 (remove_thread): Reset current_thread.
5073 (remove_process): Assert threads have been removed first.
5074
8d689ee5
YQ
50752015-10-15 Yao Qi <yao.qi@linaro.org>
5076
5077 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5078 if it is 3.
5079 (aarch64_remove_point): Likewise.
5080 * regcache.c (regcache_register_size): New function.
5081
1c2e1515
YQ
50822015-10-12 Yao Qi <yao.qi@linaro.org>
5083
5084 * linux-aarch64-low.c: Update all callers as emit_load_store
5085 is renamed to aarch64_emit_load_store.
5086
e1c587c3
YQ
50872015-10-12 Yao Qi <yao.qi@linaro.org>
5088
5089 * linux-aarch64-low.c: Update all callers of function renaming
5090 from emit_insn to aarch64_emit_insn.
5091
b6542f81
YQ
50922015-10-12 Yao Qi <yao.qi@linaro.org>
5093
5094 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5095 arch/aarch64-insn.h.
5096 (struct aarch64_memory_operand): Likewise.
5097 (ENCODE): Likewise.
5098 (emit_insn): Move to arch/aarch64-insn.c.
5099 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5100 (emit_load_store): Move to arch/aarch64-insn.c.
5101 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5102 (can_encode_int32): Remove.
5103
246994ce
YQ
51042015-10-12 Yao Qi <yao.qi@linaro.org>
5105
5106 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5107 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5108 (aarch64_relocate_instruction): Likewise.
5109 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5110 (struct aarch64_insn_visitor): Likewise.
5111
0badd99f
YQ
51122015-10-12 Yao Qi <yao.qi@linaro.org>
5113
5114 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5115 (struct aarch64_insn_visitor): New.
5116 (struct aarch64_insn_relocation_data): New.
5117 (aarch64_ftrace_insn_reloc_b): New function.
5118 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5119 (aarch64_ftrace_insn_reloc_cb): Likewise.
5120 (aarch64_ftrace_insn_reloc_tb): Likewise.
5121 (aarch64_ftrace_insn_reloc_adr): Likewise.
5122 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5123 (aarch64_ftrace_insn_reloc_others): Likewise.
5124 (visitor): New.
5125 (aarch64_relocate_instruction): Use visitor.
5126
dfaffe9d
YQ
51272015-10-12 Yao Qi <yao.qi@linaro.org>
5128
5129 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5130 int. Add argument buf.
5131 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5132 aarch64_relocate_instruction.
5133
70b439f0
YQ
51342015-10-12 Yao Qi <yao.qi@linaro.org>
5135
5136 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5137 argument insn. Remove local variable insn. Don't call
5138 target_read_uint32.
5139 (aarch64_install_fast_tracepoint_jump_pad): Call
5140 target_read_uint32.
5141
7781c06f
YQ
51422015-09-30 Yao Qi <yao.qi@linaro.org>
5143
5144 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5145 (emit_load_store_pair): Likewise.
5146
9a3c8263
SM
51472015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5148
5149 * dll.c (match_dll): Add cast(s).
5150 (unloaded_dll): Likewise.
5151 * linux-low.c (second_thread_of_pid_p): Likewise.
5152 (delete_lwp_callback): Likewise.
5153 (count_events_callback): Likewise.
5154 (select_event_lwp_callback): Likewise.
5155 (linux_set_resume_request): Likewise.
5156 * server.c (accumulate_file_name_length): Likewise.
5157 (emit_dll_description): Likewise.
5158 (handle_qxfer_threads_worker): Likewise.
5159 (visit_actioned_threads): Likewise.
5160 * thread-db.c (any_thread_of): Likewise.
5161 * tracepoint.c (same_process_p): Likewise.
5162 (match_blocktype): Likewise.
5163 (build_traceframe_info_xml): Likewise.
5164
224c3ddb
SM
51652015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5166
5167 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5168 assignment.
5169 (gdb_unparse_agent_expr): Likewise.
5170 * hostio.c (require_data): Likewise.
5171 (handle_pread): Likewise.
5172 * linux-low.c (disable_regset): Likewise.
5173 (fetch_register): Likewise.
5174 (store_register): Likewise.
5175 (get_dynamic): Likewise.
5176 (linux_qxfer_libraries_svr4): Likewise.
5177 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5178 (set_fast_tracepoint_jump): Likewise.
5179 (uninsert_fast_tracepoint_jumps_at): Likewise.
5180 (reinsert_fast_tracepoint_jumps_at): Likewise.
5181 (validate_inserted_breakpoint): Likewise.
5182 (clone_agent_expr): Likewise.
5183 * regcache.c (init_register_cache): Likewise.
5184 * remote-utils.c (putpkt_binary_1): Likewise.
5185 (decode_M_packet): Likewise.
5186 (decode_X_packet): Likewise.
5187 (look_up_one_symbol): Likewise.
5188 (relocate_instruction): Likewise.
5189 (monitor_output): Likewise.
5190 * server.c (handle_search_memory): Likewise.
5191 (handle_qxfer_exec_file): Likewise.
5192 (handle_qxfer_libraries): Likewise.
5193 (handle_qxfer): Likewise.
5194 (handle_query): Likewise.
5195 (handle_v_cont): Likewise.
5196 (handle_v_run): Likewise.
5197 (captured_main): Likewise.
5198 * target.c (write_inferior_memory): Likewise.
5199 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5200 * tracepoint.c (init_trace_buffer): Likewise.
5201 (add_tracepoint_action): Likewise.
5202 (add_traceframe): Likewise.
5203 (add_traceframe_block): Likewise.
5204 (cmd_qtdpsrc): Likewise.
5205 (cmd_qtdv): Likewise.
5206 (cmd_qtstatus): Likewise.
5207 (response_source): Likewise.
5208 (response_tsv): Likewise.
5209 (cmd_qtnotes): Likewise.
5210 (gdb_collect): Likewise.
5211 (initialize_tracepoint): Likewise.
5212
afbe19f8
PL
52132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5214
5215 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5216 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5217 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5218 <NOP>: New.
5219 (enum aarch64_condition_codes): New enum.
5220 (w0): New static global.
5221 (fp): Likewise.
5222 (lr): Likewise.
5223 (struct aarch64_memory_operand) <type>: New
5224 MEMORY_OPERAND_POSTINDEX type.
5225 (postindex_memory_operand): New helper function.
5226 (emit_ret): New function.
5227 (emit_load_store_pair): New function, factored out of emit_stp
5228 with support for MEMORY_OPERAND_POSTINDEX.
5229 (emit_stp): Rewrite using emit_load_store_pair.
5230 (emit_ldp): New function.
5231 (emit_load_store): Likewise.
5232 (emit_ldr): Mention post-index instruction in comment.
5233 (emit_ldrh): New function.
5234 (emit_ldrb): New function.
5235 (emit_ldrsw): Mention post-index instruction in comment.
5236 (emit_str): Likewise.
5237 (emit_subs): New function.
5238 (emit_cmp): Likewise.
5239 (emit_and): Likewise.
5240 (emit_orr): Likewise.
5241 (emit_orn): Likewise.
5242 (emit_eor): Likewise.
5243 (emit_mvn): Likewise.
5244 (emit_lslv): Likewise.
5245 (emit_lsrv): Likewise.
5246 (emit_asrv): Likewise.
5247 (emit_mul): Likewise.
5248 (emit_sbfm): Likewise.
5249 (emit_sbfx): Likewise.
5250 (emit_ubfm): Likewise.
5251 (emit_ubfx): Likewise.
5252 (emit_csinc): Likewise.
5253 (emit_cset): Likewise.
5254 (emit_nop): Likewise.
5255 (emit_ops_insns): New helper function.
5256 (emit_pop): Likewise.
5257 (emit_push): Likewise.
5258 (aarch64_emit_prologue): New function.
5259 (aarch64_emit_epilogue): Likewise.
5260 (aarch64_emit_add): Likewise.
5261 (aarch64_emit_sub): Likewise.
5262 (aarch64_emit_mul): Likewise.
5263 (aarch64_emit_lsh): Likewise.
5264 (aarch64_emit_rsh_signed): Likewise.
5265 (aarch64_emit_rsh_unsigned): Likewise.
5266 (aarch64_emit_ext): Likewise.
5267 (aarch64_emit_log_not): Likewise.
5268 (aarch64_emit_bit_and): Likewise.
5269 (aarch64_emit_bit_or): Likewise.
5270 (aarch64_emit_bit_xor): Likewise.
5271 (aarch64_emit_bit_not): Likewise.
5272 (aarch64_emit_equal): Likewise.
5273 (aarch64_emit_less_signed): Likewise.
5274 (aarch64_emit_less_unsigned): Likewise.
5275 (aarch64_emit_ref): Likewise.
5276 (aarch64_emit_if_goto): Likewise.
5277 (aarch64_emit_goto): Likewise.
5278 (aarch64_write_goto_address): Likewise.
5279 (aarch64_emit_const): Likewise.
5280 (aarch64_emit_call): Likewise.
5281 (aarch64_emit_reg): Likewise.
5282 (aarch64_emit_pop): Likewise.
5283 (aarch64_emit_stack_flush): Likewise.
5284 (aarch64_emit_zero_ext): Likewise.
5285 (aarch64_emit_swap): Likewise.
5286 (aarch64_emit_stack_adjust): Likewise.
5287 (aarch64_emit_int_call_1): Likewise.
5288 (aarch64_emit_void_call_2): Likewise.
5289 (aarch64_emit_eq_goto): Likewise.
5290 (aarch64_emit_ne_goto): Likewise.
5291 (aarch64_emit_lt_goto): Likewise.
5292 (aarch64_emit_le_goto): Likewise.
5293 (aarch64_emit_gt_goto): Likewise.
5294 (aarch64_emit_ge_got): Likewise.
5295 (aarch64_emit_ops_impl): New static global variable.
5296 (aarch64_emit_ops): New target function, return
5297 &aarch64_emit_ops_impl.
5298 (struct linux_target_ops): Install it.
5299
bb903df0
PL
53002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5301
5302 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5303 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5304 aarch64-ipa.o.
5305 * linux-aarch64-ipa.c: New file.
5306 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5307 and endian.h.
5308 (aarch64_get_thread_area): New target method.
5309 (extract_signed_bitfield): New helper function.
5310 (aarch64_decode_ldr_literal): New function.
5311 (enum aarch64_opcodes): New enum.
5312 (struct aarch64_register): New struct.
5313 (struct aarch64_operand): New struct.
5314 (x0): New static global.
5315 (x1): Likewise.
5316 (x2): Likewise.
5317 (x3): Likewise.
5318 (x4): Likewise.
5319 (w2): Likewise.
5320 (ip0): Likewise.
5321 (sp): Likewise.
5322 (xzr): Likewise.
5323 (aarch64_register): New helper function.
5324 (register_operand): Likewise.
5325 (immediate_operand): Likewise.
5326 (struct aarch64_memory_operand): New struct.
5327 (offset_memory_operand): New helper function.
5328 (preindex_memory_operand): Likewise.
5329 (enum aarch64_system_control_registers): New enum.
5330 (ENCODE): New macro.
5331 (emit_insn): New helper function.
5332 (emit_b): New function.
5333 (emit_bcond): Likewise.
5334 (emit_cb): Likewise.
5335 (emit_tb): Likewise.
5336 (emit_blr): Likewise.
5337 (emit_stp): Likewise.
5338 (emit_ldp_q_offset): Likewise.
5339 (emit_stp_q_offset): Likewise.
5340 (emit_load_store): Likewise.
5341 (emit_ldr): Likewise.
5342 (emit_ldrsw): Likewise.
5343 (emit_str): Likewise.
5344 (emit_ldaxr): Likewise.
5345 (emit_stxr): Likewise.
5346 (emit_stlr): Likewise.
5347 (emit_data_processing_reg): Likewise.
5348 (emit_data_processing): Likewise.
5349 (emit_add): Likewise.
5350 (emit_sub): Likewise.
5351 (emit_mov): Likewise.
5352 (emit_movk): Likewise.
5353 (emit_mov_addr): Likewise.
5354 (emit_mrs): Likewise.
5355 (emit_msr): Likewise.
5356 (emit_sevl): Likewise.
5357 (emit_wfe): Likewise.
5358 (append_insns): Likewise.
5359 (can_encode_int32_in): New helper function.
5360 (aarch64_relocate_instruction): New function.
5361 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5362 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5363 (struct linux_target_ops): Install aarch64_get_thread_area,
5364 aarch64_install_fast_tracepoint_jump_pad and
5365 aarch64_get_min_fast_tracepoint_insn_len.
5366
787749ea
PL
53672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5368
5369 * Makefile.in (aarch64-insn.o): New rule.
5370 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5371
9812b2e6
YQ
53722015-09-21 Yao Qi <yao.qi@linaro.org>
5373
5374 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5375
18fe412b
YQ
53762015-09-21 Yao Qi <yao.qi@linaro.org>
5377
5378 * tracepoint.c (max_jump_pad_size): Remove.
5379
a0cc84cd
YQ
53802015-09-18 Yao Qi <yao.qi@linaro.org>
5381
5382 * linux-aarch64-low.c: Don't include sys/uio.h.
5383 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5384
d78908cf
WW
53852015-09-16 Wei-cheng Wang <cole945@gmail.com>
5386
5387 * tracepoint.c (eval_result_type): Change prototype.
5388 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5389
d57e0d50
PA
53902015-09-15 Pedro Alves <palves@redhat.com>
5391
5392 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5393 Check whether to report exec events instead of checking whether
5394 multiprocess is enabled.
5395
5a676acc
PA
53962015-09-15 Pedro Alves <palves@redhat.com>
5397
5398 PR remote/18965
5399 * remote-utils.c (prepare_resume_reply): Merge
5400 TARGET_WAITKIND_VFORK_DONE switch case with the
5401 TARGET_WAITKIND_FORKED case.
5402
7c5d0fad
YQ
54032015-09-15 Yao Qi <yao.qi@linaro.org>
5404
5405 * server.c (handle_query): Check string comparison using
5406 "else if" instead of "if".
5407
750ce8d1
YQ
54082015-09-15 Yao Qi <yao.qi@linaro.org>
5409
5410 * server.c (vCont_supported): New global variable.
5411 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5412 matches. Append ";vContSupported+" to own_buf.
5413 (handle_v_requests): Append ";s;S" to own_buf if target supports
5414 hardware single step or vCont_supported is false.
5415 (capture_main): Set vCont_supported to zero.
5416
70b90b91
YQ
54172015-09-15 Yao Qi <yao.qi@linaro.org>
5418
5419 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5420 it to ...
5421 (linux_supports_hardware_single_step): ... New function.
5422 (linux_target_ops): Update.
5423 * lynx-low.c (lynx_target_ops): Set field
5424 supports_hardware_single_step to target_can_do_hardware_single_step.
5425 * nto-low.c (nto_target_ops): Likewise.
5426 * spu-low.c (spu_target_ops): Likewise.
5427 * win32-low.c (win32_target_ops): Likewise.
5428 * target.c (target_can_do_hardware_single_step): New function.
5429 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5430 Remove. <supports_hardware_single_step>: New field.
5431 (target_supports_conditional_breakpoints): Remove.
5432 (target_supports_hardware_single_step): New macro.
5433 (target_can_do_hardware_single_step): Declare.
5434 * server.c (handle_query): Use target_supports_hardware_single_step
5435 instead of target_supports_conditional_breakpoints.
5436
ade90bde
YQ
54372015-09-15 Yao Qi <yao.qi@linaro.org>
5438
5439 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5440 function.
5441 (struct linux_target_ops the_low_target): Install
5442 aarch64_linux_siginfo_fixup.
5443
94585166
DB
54442015-09-11 Don Breazeal <donb@codesourcery.com>
5445 Luis Machado <lgustavo@codesourcery.com>
5446
5447 * linux-low.c (linux_mourn): Static declaration.
5448 (linux_arch_setup): Move in front of
5449 handle_extended_wait.
5450 (linux_arch_setup_thread): New function.
5451 (handle_extended_wait): Handle exec events. Call
5452 linux_arch_setup_thread. Make event_lwp argument a
5453 pointer-to-a-pointer.
5454 (check_zombie_leaders): Do not check stopped threads.
5455 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5456 (linux_low_filter_event): Add lwp and thread for exec'ing
5457 non-leader thread if leader thread has been deleted.
5458 Refactor code into linux_arch_setup_thread and call it.
5459 Pass child lwp pointer by reference to handle_extended_wait.
5460 (linux_wait_for_event_filtered): Update comment.
5461 (linux_wait_1): Prevent clobbering exec event status.
5462 (linux_supports_exec_events): New function.
5463 (linux_target_ops) <supports_exec_events>: Initialize new member.
5464 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5465 new member.
5466 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5467 * server.c (report_exec_events): New global variable.
5468 (handle_query): Handle qSupported query for exec-events feature.
5469 (captured_main): Initialize report_exec_events.
5470 * server.h (report_exec_events): Declare new global variable.
5471 * target.h (struct target_ops) <supports_exec_events>: New
5472 member.
5473 (target_supports_exec_events): New macro.
5474 * win32-low.c (win32_target_ops) <supports_exec_events>:
5475 Initialize new member.
5476
0568462b
MM
54772015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5478
5479 * linux-low.c (linux_low_enable_btrace): Remove.
5480 (linux_target_ops): Replace linux_low_enable_btrace with
5481 linux_enable_btrace.
5482
39edd165
YQ
54832015-09-03 Yao Qi <yao.qi@linaro.org>
5484
5485 * linux-aarch64-low.c (aarch64_insert_point): Call
5486 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5487 returns true.
5488
1db33b5a
UW
54892015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5490
5491 * linux-low.c (check_stopped_by_breakpoint): Use
5492 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5493
ab290430
PA
54942015-08-27 Pedro Alves <palves@redhat.com>
5495
5496 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5497
8d749320
SM
54982015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5499
6711b7f8
SM
5500 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5501 the XNEW-family equivalent.
8d749320
SM
5502 (compile_bytecodes): Likewise.
5503 * dll.c (loaded_dll): Likewise.
5504 * event-loop.c (append_callback_event): Likewise.
5505 (create_file_handler): Likewise.
5506 (create_file_event): Likewise.
5507 * hostio.c (handle_open): Likewise.
5508 * inferiors.c (add_thread): Likewise.
5509 (add_process): Likewise.
5510 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5511 * linux-arm-low.c (arm_new_process): Likewise.
5512 (arm_new_thread): Likewise.
5513 * linux-low.c (add_to_pid_list): Likewise.
5514 (linux_add_process): Likewise.
5515 (handle_extended_wait): Likewise.
5516 (add_lwp): Likewise.
5517 (enqueue_one_deferred_signal): Likewise.
5518 (enqueue_pending_signal): Likewise.
5519 (linux_resume_one_lwp_throw): Likewise.
5520 (linux_resume_one_thread): Likewise.
5521 (linux_read_memory): Likewise.
5522 (linux_write_memory): Likewise.
5523 * linux-mips-low.c (mips_linux_new_process): Likewise.
5524 (mips_linux_new_thread): Likewise.
5525 (mips_add_watchpoint): Likewise.
5526 * linux-x86-low.c (initialize_low_arch): Likewise.
5527 * lynx-low.c (lynx_add_process): Likewise.
5528 * mem-break.c (set_raw_breakpoint_at): Likewise.
5529 (set_breakpoint): Likewise.
5530 (add_condition_to_breakpoint): Likewise.
5531 (add_commands_to_breakpoint): Likewise.
5532 (clone_agent_expr): Likewise.
5533 (clone_one_breakpoint): Likewise.
5534 * regcache.c (new_register_cache): Likewise.
5535 * remote-utils.c (look_up_one_symbol): Likewise.
5536 * server.c (queue_stop_reply): Likewise.
5537 (start_inferior): Likewise.
5538 (queue_stop_reply_callback): Likewise.
5539 (handle_target_event): Likewise.
5540 * spu-low.c (fetch_ppc_memory): Likewise.
5541 (store_ppc_memory): Likewise.
5542 * target.c (set_target_ops): Likewise.
5543 * thread-db.c (thread_db_load_search): Likewise.
5544 (try_thread_db_load_1): Likewise.
5545 * tracepoint.c (add_tracepoint): Likewise.
5546 (add_tracepoint_action): Likewise.
5547 (create_trace_state_variable): Likewise.
5548 (cmd_qtdpsrc): Likewise.
5549 (cmd_qtro): Likewise.
5550 (add_while_stepping_state): Likewise.
5551 * win32-low.c (child_add_thread): Likewise.
5552 (get_image_name): Likewise.
5553
ed8b7b42
YQ
55542015-08-25 Yao Qi <yao.qi@linaro.org>
5555
5556 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5557
db3cb7cb
YQ
55582015-08-25 Yao Qi <yao.qi@linaro.org>
5559
5560 * Makefile.in (aarch64-linux.o): New rule.
5561 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5562 srv_tgtobj.
5563 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5564 (aarch64_init_debug_reg_state): Make it extern.
5565 (aarch64_linux_prepare_to_resume): Remove.
5566
f6011a1c
YQ
55672015-08-25 Yao Qi <yao.qi@linaro.org>
5568
5569 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5570 lwp_arch_private_info and ptid_of_lwp.
5571
88e2cf7e
YQ
55722015-08-25 Yao Qi <yao.qi@linaro.org>
5573
5574 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5575 Find proc_info by find_process_pid. All callers updated.
5576
5e35436e
YQ
55772015-08-25 Yao Qi <yao.qi@linaro.org>
5578
5579 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5580 Remove.
5581 (debug_reg_change_callback): Remove.
5582 (aarch64_notify_debug_reg_change): Remove.
5583
4a8a7965
YQ
55842015-08-25 Yao Qi <yao.qi@linaro.org>
5585
5586 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5587 Call current_lwp_ptid.
5588
32a271ee
YQ
55892015-08-25 Yao Qi <yao.qi@linaro.org>
5590
5591 * linux-aarch64-low.c (debug_reg_change_callback): Use
5592 debug_printf.
5593
0d51c8d7
YQ
55942015-08-25 Yao Qi <yao.qi@linaro.org>
5595
5596 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5597
31a43dd5
YQ
55982015-08-25 Yao Qi <yao.qi@linaro.org>
5599
5600 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5601
8ee52567
YQ
56022015-08-25 Yao Qi <yao.qi@linaro.org>
5603
5604 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5605 the code.
5606
ff3f0f45
YQ
56072015-08-25 Yao Qi <yao.qi@linaro.org>
5608
5609 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5610 Remove.
5611 (debug_reg_change_callback): Remove argument entry and add argument
5612 lwp. Remove local variable thread. Don't print thread id in the
5613 debugging output. Don't check whether pid of thread equals to pid.
5614 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5615 iterate_over_lwps instead find_inferior.
5616
3d40fbb5
PA
56172015-08-24 Pedro Alves <palves@redhat.com>
5618
5619 * inferiors.c (get_first_process): New function.
5620 * inferiors.h (get_first_process): New declaration.
5621 * remote-utils.c (read_ptid): Default to the first process in the
5622 list, instead of to the current thread's process.
5623
438e1e42
PA
56242015-08-24 Pedro Alves <palves@redhat.com>
5625
5626 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5627 * event-loop.c: Likewise.
5628 * remote-utils.c: Likewise.
5629 * tracepoint.c: Likewise.
5630
a8c6d4fc
PA
56312015-08-24 Pedro Alves <palves@redhat.com>
5632
5633 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5634 ptid_get_lwp.
5635
99b0bb12
PA
56362015-08-21 Pedro Alves <palves@redhat.com>
5637
5638 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5639 instead of literal 1.
5640
f8904751
PA
56412015-08-21 Pedro Alves <palves@redhat.com>
5642
5643 * tdesc.c (default_description): Explicitly zero-initialize.
5644
465a859e
PA
56452015-08-21 Pedro Alves <palves@redhat.com>
5646
5647 PR gdb/18749
5648 * inferiors.c (remove_thread): Discard any pending stop reply for
5649 this thread.
5650 * server.c (remove_all_on_match_pid): Rename to ...
5651 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5652 instead of a pid.
5653 (discard_queued_stop_replies): Change parameter to a ptid. Now
5654 extern.
5655 (handle_v_kill, kill_inferior_callback, captured_main)
5656 (process_serial_event): Adjust.
5657 * server.h (discard_queued_stop_replies): Declare.
5658
f0db101d
PA
56592015-08-21 Pedro Alves <palves@redhat.com>
5660
5661 * linux-low.c (wait_for_sigstop): Always switch to no thread
5662 selected if the previously current thread dies.
5663 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5664 process instead of the current thread's.
5665 * remote-utils.c (input_interrupt): Don't check if there's no
5666 current thread.
5667 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5668 current thread to the general thread fails, error out.
5669 (handle_qxfer_auxv, handle_qxfer_libraries)
5670 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5671 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5672 (handle_query): Check if there's a thread selected instead of
5673 checking whether there's any thread in the thread list.
5674 (handle_qxfer_threads, handle_qxfer_btrace)
5675 (handle_qxfer_btrace_conf): Don't error out early if there's no
5676 thread in the thread list.
5677 (handle_v_cont, myresume): Don't set the current thread to the
5678 continue thread.
5679 (process_serial_event) <Hg handling>: Also set thread_id if the
5680 previous general thread is still alive.
5681 (process_serial_event) <g/G handling>: If setting the current
5682 thread to the general thread fails, error out.
5683 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5684 thread's lwp instead of the current thread's.
5685 * target.c (set_desired_thread): If the desired thread was not
5686 found, leave the current thread pointing to NULL. Return an int
5687 (boolean) indicating success.
5688 * target.h (set_desired_thread): Change return type to int.
5689
40045d91
MF
56902015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5691
5692 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5693 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5694 #includes.
5695 (ps_get_thread_area): New function.
5696
45face3b
GB
56972015-08-19 Gary Benson <gbenson@redhat.com>
5698
5699 * hostio.c (handle_pread): Do not attempt to read more data
5700 than hostio_reply_with_data can fit in a packet.
5701
16d5f642
JB
57022015-08-18 Joel Brobecker <brobecker@adacore.com>
5703
5704 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5705
a738da3a
MF
57062015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5707
5708 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5709
33ebda9d
PA
57102015-08-06 Pedro Alves <palves@redhat.com>
5711
5712 * tracepoint.c (expr_eval_result): Now an int.
5713
a44892be
PA
57142015-08-06 Pedro Alves <palves@redhat.com>
5715
5716 * gdbthread.h (struct regcache): Forward declare.
5717 (struct thread_info) <regcache_data>: Now a struct regcache
5718 pointer.
5719 * inferiors.c (inferior_regcache_data)
5720 (set_inferior_regcache_data): Now work with struct regcache
5721 pointers.
5722 * inferiors.h (struct regcache): Forward declare.
5723 (inferior_regcache_data, set_inferior_regcache_data): Now work
5724 with struct regcache pointers.
5725 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5726 (free_register_cache_thread): Remove struct regcache pointer
5727 casts.
5728
608a1e46
PA
57292015-08-06 Pedro Alves <palves@redhat.com>
5730
5731 * server.c (captured_main): On error, print the exception message
5732 to stderr, and if run_once is set, throw a quit.
5733
f0ce0d3a
PA
57342015-08-06 Pedro Alves <palves@redhat.com>
5735
5736 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5737 the current thread.
5738
bf47e248
PA
57392015-08-06 Pedro Alves <palves@redhat.com>
5740
5741 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5742 reading beyond the passed in buffer length.
5743
b6b9ffcc
PL
57442015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5745
5746 * tracepoint.c (symbol_list) <required>: Remove.
5747
863d01bd
PA
57482015-08-06 Pedro Alves <palves@redhat.com>
5749
5750 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5751 count if stopping and suspending threads.
5752 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5753 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5754 (linux_detach): Complete an ongoing step-over.
5755 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5756 throughout.
5757 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5758 (linux_wait_1): If passing a signal to the inferior after
5759 finishing a step-over, unsuspend and re-resume all lwps. If we
5760 see a single-step event but the thread should be continuing, don't
5761 pass the trap to gdb.
5762 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5763 internal_error instead of gdb_assert.
5764 (enqueue_pending_signal): New function.
5765 (check_ptrace_stopped_lwp_gone): Add debug output.
5766 (start_step_over): Use internal_error instead of gdb_assert.
5767 (complete_ongoing_step_over): New function.
5768 (linux_resume_one_thread): Don't resume a suspended thread.
5769 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5770 it stepping.
5771
00db26fa
PA
57722015-08-06 Pedro Alves <palves@redhat.com>
5773
5774 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5775 (linux_thread_alive): Use lwp_is_marked_dead.
5776 (extended_event_reported): Delete.
5777 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5778 instead of extended_event_reported.
5779 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5780 as well.
5781 (lwp_is_marked_dead): New function.
5782 (lwp_running): Use lwp_is_marked_dead.
5783 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5784 comment.
5785
ad071a30
PA
57862015-08-06 Pedro Alves <palves@redhat.com>
5787
5788 * linux-low.c (linux_wait_1): Move fork event output out of the
5789 !report_to_gdb check. Pass event_child->waitstatus to
5790 target_waitstatus_to_string instead of ourstatus.
5791
524b57e6
YQ
57922015-08-04 Yao Qi <yao.qi@linaro.org>
5793
5794 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5795 if current_thread is 32 bit.
5796
6085d6f6
YQ
57972015-08-04 Yao Qi <yao.qi@linaro.org>
5798
5799 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5800 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5801 * server.c (extended_protocol): Remove "static".
5802 * server.h (extended_protocol): Declare it.
5803
8a7e4587
YQ
58042015-08-04 Yao Qi <yao.qi@linaro.org>
5805
5806 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5807 both aarch64 and aarch32.
5808 (aarch64_set_pc): Likewise.
5809
3b53ae99
YQ
58102015-08-04 Yao Qi <yao.qi@linaro.org>
5811
5812 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5813 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5814 arm-with-neon.xml to srv_xmlfiles.
5815 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5816 (is_64bit_tdesc): New function.
5817 (aarch64_linux_read_description): New function.
5818 (aarch64_arch_setup): Call aarch64_linux_read_description.
5819 (regs_info): Rename to regs_info_aarch64.
5820 (aarch64_regs_info): Return right regs_info.
5821 (initialize_low_arch): Call initialize_low_arch_aarch32.
5822
bd9e6534
YQ
58232015-08-04 Yao Qi <yao.qi@linaro.org>
5824
5825 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5826 * linux-aarch32-low.c: New file.
5827 * linux-aarch32-low.h: New file.
5828 * linux-arm-low.c (arm_fill_gregset): Move it to
5829 linux-aarch32-low.c.
5830 (arm_store_gregset): Likewise.
5831 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5832 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5833 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5834 (regs_info): Rename to regs_info_arm.
5835 (arm_regs_info): Return regs_info_aarch32 if
5836 have_ptrace_getregset is 1 and target description is
5837 arm_with_neon or arm_with_vfpv3.
5838 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5839 Call initialize_low_arch_aarch32 instead.
5840
ded48a5e
YQ
58412015-08-04 Yao Qi <yao.qi@linaro.org>
5842
5843 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5844 * linux-low.c: ... here.
5845 * linux-low.h (have_ptrace_getregset): Declare it.
5846
96e9210f
PA
58472015-08-04 Pedro Alves <palves@redhat.com>
5848
5849 * thread-db.c (struct thread_db): Use new typedefs.
5850 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5851 CHK calls.
5852 (disable_thread_event_reporting): Cast result of dlsym to
5853 destination function pointer type.
5854 (thread_db_mourn): Use td_ta_delete_ftype.
5855
af60a1ef
SL
58562015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5857
5858 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5859 arch variant.
5860 (CDX_BREAKPOINT): Define for R2.
5861 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5862 (the_low_target): Add comments.
5863
e8b41681
YQ
58642015-07-30 Yao Qi <yao.qi@linaro.org>
5865
5866 * linux-arm-low.c (arm_hwcap): Remove it.
5867 (arm_read_description): New local variable arm_hwcap. Don't
5868 set arm_hwcap to zero.
5869
89abb039
YQ
58702015-07-30 Yao Qi <yao.qi@linaro.org>
5871
5872 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5873 Use regcache->tdesc instead.
5874 (arm_store_wmmxregset): Likewise.
5875 (arm_fill_vfpregset): Likewise.
5876 (arm_store_vfpregset): Likewise.
5877
deca266c
YQ
58782015-07-30 Yao Qi <yao.qi@linaro.org>
5879
5880 * linux-arm-low.c: Include arch/arm.h.
5881 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5882 (arm_store_gregset): Likewise.
5883
aa58a496
SM
58842015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5885
5886 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5887 ptrace's 4th parameter.
5888
50904b25
YQ
58892015-07-27 Yao Qi <yao.qi@linaro.org>
5890
5891 * configure.srv (case aarch64*-*-linux*): Don't set
5892 srv_linux_usrregs.
5893
5826e159
PA
58942015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5895
5896 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5897 sys/ptrace.h.
5898 * linux-arm-low.c: Likewise.
5899 * linux-cris-low.c: Likewise.
5900 * linux-crisv32-low.c: Likewise.
5901 * linux-low.c: Likewise.
5902 * linux-m68k-low.c: Likewise.
5903 * linux-mips-low.c: Likewise.
5904 * linux-nios2-low.c: Likewise.
5905 * linux-s390-low.c: Likewise.
5906 * linux-sparc-low.c: Likewise.
5907 * linux-tic6x-low.c: Likewise.
5908 * linux-tile-low.c: Likewise.
5909 * linux-x86-low.c: Likewise.
5910
54019719
PA
59112015-07-24 Pedro Alves <palves@redhat.com>
5912
5913 * config.in: Regenerate.
5914 * configure: Regenerate.
5915
eb7aa561
PA
59162015-07-24 Pedro Alves <palves@redhat.com>
5917
5918 * acinclude.m4: Include ../ptrace.m4.
5919 * configure.ac: Call GDB_AC_PTRACE.
5920 * config.in, configure: Regenerate.
5921
55d7b841
YQ
59222015-07-24 Yao Qi <yao.qi@linaro.org>
5923
5924 * linux-low.c (linux_create_inferior): Remove setting to
5925 proc->priv->new_inferior.
5926 (linux_attach): Likewise.
5927 (linux_low_filter_event): Likewise.
5928 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5929
c06cbd92
YQ
59302015-07-24 Yao Qi <yao.qi@linaro.org>
5931
5932 * linux-low.c (linux_arch_setup): New function.
5933 (linux_low_filter_event): If proc->tdesc is NULL and
5934 proc->attached is true, call the_low_target.arch_setup.
5935 Otherwise, keep status pending, and return.
5936 (linux_resume_one_lwp_throw): Don't call get_pc if
5937 thread->while_stepping isn't NULL. Don't call
5938 get_thread_regcache if proc->tdesc is NULL.
5939 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5940 (linux_target_ops): Install arch_setup.
5941 * server.c (start_inferior): Call the_target->arch_setup.
5942 * target.h (struct target_ops) <arch_setup>: New field.
5943 (target_arch_setup): New marco.
5944 * lynx-low.c (lynx_target_ops): Update.
5945 * nto-low.c (nto_target_ops): Update.
5946 * spu-low.c (spu_target_ops): Update.
5947 * win32-low.c (win32_target_ops): Update.
5948
5ae3ebba
YQ
59492015-07-24 Yao Qi <yao.qi@linaro.org>
5950
5951 * linux-low.c (linux_add_process): Don't set
5952 proc->priv->new_inferior.
5953 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5954 (linux_attach): Likewise.
5955
eb97750b
YQ
59562015-07-24 Yao Qi <yao.qi@linaro.org>
5957
5958 * server.c (start_inferior): Code refactor.
5959
51aee833
YQ
59602015-07-24 Yao Qi <yao.qi@linaro.org>
5961
5962 * server.c (process_serial_event): Set general_thread.
5963
af1b22f3
YQ
59642015-07-21 Yao Qi <yao.qi@linaro.org>
5965
5966 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5967 aarch64_linux_get_debug_reg_capacity.
5968
554717a3
YQ
59692015-07-17 Yao Qi <yao.qi@linaro.org>
5970
5971 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5972 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5973 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5974 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5975 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5976 (AARCH64_HWP_ALIGNMENT): Likewise.
5977 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5978 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5979 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5980 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5981 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5982 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5983 (struct aarch64_debug_reg_state): Likewise.
5984 (struct arch_lwp_info): Likewise.
5985 (aarch64_align_watchpoint): Likewise.
5986 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5987 (aarch64_watchpoint_length): Likewise.
5988 (aarch64_point_encode_ctrl_reg): Likewise
5989 (aarch64_point_is_aligned): Likewise.
5990 (aarch64_align_watchpoint): Likewise.
5991 (aarch64_linux_set_debug_regs):
5992 (aarch64_dr_state_insert_one_point): Likewise.
5993 (aarch64_dr_state_remove_one_point): Likewise.
5994 (aarch64_handle_breakpoint): Likewise.
5995 (aarch64_handle_aligned_watchpoint): Likewise.
5996 (aarch64_handle_unaligned_watchpoint): Likewise.
5997 (aarch64_handle_watchpoint): Likewise.
5998
c67ca4de
YQ
59992015-07-17 Yao Qi <yao.qi@linaro.org>
6000
6001 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6002 and don't aarch64_get_debug_reg_state. All callers update.
6003 (aarch64_handle_aligned_watchpoint): Likewise.
6004 (aarch64_handle_unaligned_watchpoint): Likewise.
6005 (aarch64_handle_watchpoint): Likewise.
6006 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6007 (aarch64_remove_point): Likewise.
6008
25abf979
YQ
60092015-07-17 Yao Qi <yao.qi@linaro.org>
6010
6011 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6012 debug_printf.
6013 (aarch64_handle_unaligned_watchpoint): Likewise.
6014
db1ff28b
JK
60152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6016
6017 Revert the previous 3 commits:
6018 Move gdb_regex* to common/
6019 Move linux_find_memory_regions_full & co.
6020 gdbserver build-id attribute generator
6021
700ca40f
JK
60222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6023 Jan Kratochvil <jan.kratochvil@redhat.com>
6024
6025 gdbserver build-id attribute generator.
6026 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6027 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6028 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6029 (find_phdr): New.
6030 (get_dynamic): Use find_pdhr to traverse program headers.
6031 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6032 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6033 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6034 (get_hex_build_id): New.
6035 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6036 to reply XML document.
6037
9904185c
JK
60382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6039 Jan Kratochvil <jan.kratochvil@redhat.com>
6040
6041 * target.c: Include target/target-utils.h and fcntl.h.
6042 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6043 (target_fileio_read_stralloc): New functions.
6044
6e5b4429
JK
60452015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6046
6047 * Makefile.in (OBS): Add gdb_regex.o.
6048 (gdb_regex.o): New.
6049 * config.in: Rebuilt.
6050 * configure: Rebuilt.
6051
ddc98fbf
JK
60522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6053 Jan Kratochvil <jan.kratochvil@redhat.com>
6054
6055 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6056 * Makefile.in (OBS): Add target-utils.o.
6057 (linux-maps.o, target-utils.o): New.
6058 * configure.srv (srv_linux_obj): Add linux-maps.o.
6059
e57bb7a0
PL
60602015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6061
6062 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6063 function, return 1.
6064 (the_low_target): Install it.
6065
586b02a9
PA
60662015-07-14 Pedro Alves <palves@redhat.com>
6067
6068 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6069 Instead, ignore ECHILD, and throw an error for other errnos.
6070
58c1b36c
PA
60712015-07-10 Pedro Alves <palves@redhat.com>
6072
6073 * event-loop.c (struct callback_event) <data>: Change type to
6074 gdb_client_data instance instead of gdb_client_data pointer.
6075 (append_callback_event): Adjust.
6076
421530db
PL
60772015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6078
6079 * linux-aarch64-low.c: Add comments for each linux_target_ops
6080 method. Remove comments already covered in target_ops and
6081 linux_target_ops definitions.
6082 (the_low_target): Add comments for each unimplemented method.
6083
c2d65f38
YQ
60842015-07-09 Yao Qi <yao.qi@linaro.org>
6085
6086 * linux-aarch64-low.c (aarch64_regmap): Remove.
6087 (aarch64_usrregs_info): Remove.
6088 (regs_info): Set field usrregs to NULL.
6089
b20a6524
MM
60902015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6091
6092 * linux-low.c: Include "rsp-low.h"
6093 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6094 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6095 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6096 (handle_btrace_enable_pt): New.
6097 (handle_btrace_general_set): Support "pt".
6098 (handle_btrace_conf_general_set): Support "pt:size".
6099
96c97461
PL
61002015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6101
6102 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6103 Z_PACKET_SW_BP.
6104
37d66942
PL
61052015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6106
6107 * linux-aarch64-low.c: Remove comment about endianness.
6108 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6109 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6110 memcmp.
6111
dc06243f
GB
61122015-06-24 Gary Benson <gbenson@redhat.com>
6113
6114 * linux-i386-ipa.c (stdint.h): Do not include.
6115 * lynx-i386-low.c (stdint.h): Likewise.
6116 * lynx-ppc-low.c (stdint.h): Likewise.
6117 * mem-break.c (stdint.h): Likewise.
6118 * thread-db.c (stdint.h): Likewise.
6119 * tracepoint.c (stdint.h): Likewise.
6120 * win32-low.c (stdint.h): Likewise.
6121
124e13d9
SM
61222015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6123
6124 * server.c (write_qxfer_response): Update call to
6125 remote_escape_output.
6126
909c2cda
JK
61272015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6128 Jan Kratochvil <jan.kratochvil@redhat.com>
6129
6130 Merge multiple hex conversions.
6131 * gdbreplay.c (tohex): Rename to 'fromhex'.
6132 (logchar): Use fromhex.
6133
24c05f46
JK
61342015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6135
6136 * server.c (handle_qxfer_libraries): Set `version' attribute for
6137 <library-list>.
6138
14d2069a
GB
61392015-06-10 Gary Benson <gbenson@redhat.com>
6140
6141 * target.h (struct target_ops) <multifs_open>: New field.
6142 <multifs_unlink>: Likewise.
6143 <multifs_readlink>: Likewise.
6144 * linux-low.c (nat/linux-namespaces.h): New include.
6145 (linux_target_ops): Initialize the_target->multifs_open,
6146 the_target->multifs_unlink and the_target->multifs_readlink.
6147 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6148 * hostio.c (hostio_fs_pid): New static variable.
6149 (hostio_handle_new_gdb_connection): New function.
6150 (handle_setfs): Likewise.
6151 (handle_open): Use the_target->multifs_open as appropriate.
6152 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6153 (handle_readlink): Use the_target->multifs_readlink as
6154 appropriate.
6155 (handle_vFile): Handle vFile:setfs packets.
6156 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6157 after target_handle_new_gdb_connection.
6158
4b8b5e72
GB
61592015-06-10 Gary Benson <gbenson@redhat.com>
6160
6161 * configure.ac (AC_CHECK_FUNCS): Add setns.
6162 * config.in: Regenerate.
6163 * configure: Likewise.
6164 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6165 (linux-namespaces.o): New rule.
6166 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6167
3ac2e371
GB
61682015-06-09 Gary Benson <gbenson@redhat.com>
6169
6170 * hostio.c (handle_open): Process mode argument with
6171 fileio_to_host_mode.
6172
ca9b78ce
YQ
61732015-06-01 Yao Qi <yao.qi@linaro.org>
6174
6175 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6176 * linux-x86-low.c: Likewise.
6177
bfacd19d
DB
61782015-05-28 Don Breazeal <donb@codesourcery.com>
6179
6180 * linux-low.c (handle_extended_wait): Initialize
6181 thread_info.last_resume_kind for new fork children.
6182
452003ef
PA
61832015-05-15 Pedro Alves <palves@redhat.com>
6184
6185 * target.h (target_handle_new_gdb_connection): Rewrite using if
6186 wrapped in do/while.
6187
1041a03c
JB
61882015-05-14 Joel Brobecker <brobecker@adacore.com>
6189
6190 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6191 * configure, config.in: Regenerate.
6192 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6193 Declare typedef.
6194
c269dbdb
DB
61952015-05-12 Don Breazeal <donb@codesourcery.com>
6196
6197 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6198 PTRACE_EVENT_VFORK_DONE.
6199 (linux_low_ptrace_options, extended_event_reported): Add vfork
6200 events.
6201 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6202 and "vforkdone" for RSP 'T' Stop Reply Packet.
6203 * server.h (report_vfork_events): Declare
6204 global variable.
6205
3a8a0396
DB
62062015-05-12 Don Breazeal <donb@codesourcery.com>
6207
6208 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6209 (the_low_target) <new_fork>: Initialize new member.
6210 * linux-arm-low.c (arm_new_fork): New function.
6211 (the_low_target) <new_fork>: Initialize new member.
6212 * linux-low.c (handle_extended_wait): Call new target function
6213 new_fork.
6214 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6215 * linux-mips-low.c (mips_add_watchpoint): New function
6216 extracted from mips_insert_point.
6217 (the_low_target) <new_fork>: Initialize new member.
6218 (mips_linux_new_fork): New function.
6219 (mips_insert_point): Call mips_add_watchpoint.
6220 * linux-x86-low.c (x86_linux_new_fork): New function.
6221 (the_low_target) <new_fork>: Initialize new member.
6222
de0d863e
DB
62232015-05-12 Don Breazeal <donb@codesourcery.com>
6224
6225 * linux-low.c (handle_extended_wait): Implement return value,
6226 rename argument 'event_child' to 'event_lwp', handle
6227 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6228 (linux_low_ptrace_options): New function.
6229 (linux_low_filter_event): Call linux_low_ptrace_options,
6230 use different argument fo linux_enable_event_reporting,
6231 use return value from handle_extended_wait.
6232 (extended_event_reported): New function.
6233 (linux_wait_1): Call extended_event_reported and set
6234 status to report fork events.
6235 (linux_write_memory): Add pid to debug message.
6236 (reset_lwp_ptrace_options_callback): New function.
6237 (linux_handle_new_gdb_connection): New function.
6238 (linux_target_ops): Initialize new structure member.
6239 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6240 * lynx-low.c: Initialize new structure member.
6241 * remote-utils.c (prepare_resume_reply): Implement stop reason
6242 "fork" for "T" stop message.
6243 * server.c (handle_query): Call handle_new_gdb_connection.
6244 * server.h (report_fork_events): Declare global flag.
6245 * target.h (struct target_ops) <handle_new_gdb_connection>:
6246 New member.
6247 (target_handle_new_gdb_connection): New macro.
6248 * win32-low.c: Initialize new structure member.
6249
ddcbc397
DB
62502015-05-12 Don Breazeal <donb@codesourcery.com>
6251
6252 * mem-break.c (APPEND_TO_LIST): Define macro.
6253 (clone_agent_expr): New function.
6254 (clone_one_breakpoint): New function.
6255 (clone_all_breakpoints): New function.
6256 * mem-break.h: Declare new functions.
6257
89245bc0
DB
62582015-05-12 Don Breazeal <donb@codesourcery.com>
6259
6260 * linux-low.c (linux_supports_fork_events): New function.
6261 (linux_supports_vfork_events): New function.
6262 (linux_target_ops): Initialize new structure members.
6263 (initialize_low): Call linux_check_ptrace_features.
6264 * lynx-low.c (lynx_target_ops): Initialize new structure
6265 members.
6266 * server.c (report_fork_events, report_vfork_events):
6267 New global flags.
6268 (handle_query): Add new features to qSupported packet and
6269 response.
6270 (captured_main): Initialize new global variables.
6271 * target.h (struct target_ops) <supports_fork_events>:
6272 New member.
6273 <supports_vfork_events>: New member.
6274 (target_supports_fork_events): New macro.
6275 (target_supports_vfork_events): New macro.
6276 * win32-low.c (win32_target_ops): Initialize new structure
6277 members.
6278
835205d0
GB
62792015-05-12 Gary Benson <gbenson@redhat.com>
6280
6281 * server.c (handle_qxfer_exec_file): Use current process
6282 if annex is empty.
6283
21e94bd9
SL
62842015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6285
6286 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6287 Remove HAVE_PTRACE_GETREGS conditionals.
6288 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6289 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6290
45614f15
YQ
62912015-05-08 Yao Qi <yao.qi@linaro.org>
6292
6293 * linux-low.c (linux_supports_conditional_breakpoints): New
6294 function.
6295 (linux_target_ops): Install new target method.
6296 * lynx-low.c (lynx_target_ops): Install NULL hook for
6297 supports_conditional_breakpoints.
6298 * nto-low.c (nto_target_ops): Likewise.
6299 * spu-low.c (spu_target_ops): Likewise.
6300 * win32-low.c (win32_target_ops): Likewise.
6301 * server.c (handle_query): Check
6302 target_supports_conditional_breakpoints.
6303 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6304 New field.
6305 (target_supports_conditional_breakpoints): New macro.
6306
80ad801e
PA
63072015-05-06 Pedro Alves <palves@redhat.com>
6308
6309 PR server/18081
6310 * server.c (start_inferior): If the process exits, mourn it.
6311
819843c7
GB
63122015-04-21 Gary Benson <gbenson@redhat.com>
6313
6314 * hostio.c (fileio_open_flags_to_host): Factored out to
6315 fileio_to_host_openflags in common/fileio.c. Single use
6316 updated.
6317
a2d5a9d7
MF
63182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6319
6320 * linux-xtensa-low.c (xtensa_fill_gregset)
6321 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6322 XCHAL_HAVE_LOOP.
6323
deb44829
MF
63242015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6325
6326 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6327 (regs_info): Replace usrregs pointer with NULL.
6328
e57f1de3
GB
63292015-04-17 Gary Benson <gbenson@redhat.com>
6330
6331 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6332 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6333 * server.c (handle_qxfer_exec_file): New function.
6334 (qxfer_packets): Add exec-file entry.
6335 (handle_query): Report qXfer:exec-file:read as supported packet.
6336
62828379
RN
63372015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6338
6339 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6340
b88bb450
GB
63412015-04-09 Gary Benson <gbenson@redhat.com>
6342
6343 * hostio-errno.c (errno_to_fileio_error): Remove function.
6344 Update caller to use remote_fileio_to_fio_error.
6345
c8f4bfdd
YQ
63462015-04-09 Yao Qi <yao.qi@linaro.org>
6347
6348 * linux-low.c (linux_insert_point): Call
6349 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6350 (linux_remove_point): Call remove_memory_breakpoint if type is
6351 raw_bkpt_type_sw.
6352 * linux-x86-low.c (x86_insert_point): Don't call
6353 insert_memory_breakpoint.
6354 (x86_remove_point): Don't call remove_memory_breakpoint.
6355
41f98f02
PA
63562015-04-01 Pedro Alves <palves@redhat.com>
6357 Cleber Rosa <crosa@redhat.com>
6358
6359 * server.c (gdbserver_usage): Reorganize and extend the usage
6360 message.
6361
2bf6fb9d
PA
63622015-03-24 Pedro Alves <palves@redhat.com>
6363
6364 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6365 output. Also dump TRAP_TRACE.
6366 (linux_low_filter_event): In debug output, distinguish a
6367 resume_stop SIGSTOP from a delayed SIGSTOP.
6368
369f6daa
GB
63692015-03-24 Gary Benson <gbenson@redhat.com>
6370
6371 * linux-x86-low.c (x86_linux_new_thread): Moved to
6372 nat/x86-linux.c.
6373 (x86_linux_prepare_to_resume): Likewise.
6374
8e5d4070
GB
63752015-03-24 Gary Benson <gbenson@redhat.com>
6376
6377 * Makefile.in (x86-linux-dregs.o): New rule.
6378 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6379 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6380 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6381 (x86_linux_dr_get): Likewise.
6382 (x86_linux_dr_set): Likewise.
6383 (update_debug_registers_callback): Likewise.
6384 (x86_linux_dr_set_addr): Likewise.
6385 (x86_linux_dr_get_addr): Likewise.
6386 (x86_linux_dr_set_control): Likewise.
6387 (x86_linux_dr_get_control): Likewise.
6388 (x86_linux_dr_get_status): Likewise.
6389 (x86_linux_update_debug_registers): Likewise.
6390
2b95d440
GB
63912015-03-24 Gary Benson <gbenson@redhat.com>
6392
6393 * linux-x86-low.c (x86_linux_update_debug_registers):
6394 New function, factored out from...
6395 (x86_linux_prepare_to_resume): ...this.
6396
14b0bc68
GB
63972015-03-24 Gary Benson <gbenson@redhat.com>
6398
6399 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6400 (x86_linux_dr_set): Likewise.
6401 (update_debug_registers_callback): Likewise.
6402 (x86_linux_dr_set_addr): Likewise.
6403 (x86_linux_dr_get_addr): Likewise.
6404 (x86_linux_dr_set_control): Likewise.
6405 (x86_linux_dr_get_control): Likewise.
6406 (x86_linux_dr_get_status): Likewise.
6407 (x86_linux_prepare_to_resume): Likewise.
6408
5dfe6ca8
GB
64092015-03-24 Gary Benson <gbenson@redhat.com>
6410
6411 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6412 Use perror_with_name. Pass string through gettext.
6413 (x86_linux_dr_set): Likewise.
6414
d33472ad
GB
64152015-03-24 Gary Benson <gbenson@redhat.com>
6416
6417 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6418 (x86_linux_dr_set_addr): ...this.
6419 (x86_dr_low_get_addr): Rename to...
6420 (x86_linux_dr_get_addr): ...this.
6421 (x86_dr_low_set_control): Rename to...
6422 (x86_linux_dr_set_control): ...this.
6423 (x86_dr_low_get_control): Rename to...
6424 (x86_linux_dr_get_control): ...this.
6425 (x86_dr_low_get_status): Rename to...
6426 (x86_linux_dr_get_status): ...this.
6427 (x86_dr_low): Update with new function names.
6428
4b134ca1
GB
64292015-03-24 Gary Benson <gbenson@redhat.com>
6430
6431 * Makefile.in (x86-linux.o): New rule.
6432 * configure.srv: Add x86-linux.o to relevant targets.
6433 * linux-low.c (lwp_set_arch_private_info): New function.
6434 (lwp_arch_private_info): Likewise.
6435 * linux-x86-low.c: Include nat/x86-linux.h.
6436 (arch_lwp_info): Removed structure.
6437 (update_debug_registers_callback):
6438 Use lwp_set_debug_registers_changed.
6439 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6440 and lwp_set_debug_registers_changed.
6441 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6442
34c703da
GB
64432015-03-24 Gary Benson <gbenson@redhat.com>
6444
6445 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6446 * linux-arm-low.c (arm_new_thread): Likewise.
6447 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6448 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6449 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6450 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6451
cff068da
GB
64522015-03-24 Gary Benson <gbenson@redhat.com>
6453
6454 * linux-low.c (ptid_of_lwp): New function.
6455 (lwp_is_stopped): Likewise.
6456 (lwp_stop_reason): Likewise.
6457 * linux-x86-low.c (update_debug_registers_callback):
6458 Use lwp_is_stopped.
6459 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6460 lwp_stop_reason.
6461
b2f7c7e8
GB
64622015-03-24 Gary Benson <gbenson@redhat.com>
6463
6464 * linux-low.h (linux_stop_lwp): Remove declaration.
6465
6d4ee8c6
GB
64662015-03-24 Gary Benson <gbenson@redhat.com>
6467
6468 * linux-low.h: Include nat/linux-nat.h.
6469 * linux-low.c (iterate_over_lwps_args): New structure.
6470 (iterate_over_lwps_filter): New function.
6471 (iterate_over_lwps): Likewise.
6472 * linux-x86-low.c (update_debug_registers_callback):
6473 Update signature to what iterate_over_lwps expects.
6474 Remove PID check that iterate_over_lwps now performs.
6475 (x86_dr_low_set_addr): Use iterate_over_lwps.
6476 (x86_dr_low_set_control): Likewise.
6477
70a0bb6b
GB
64782015-03-24 Gary Benson <gbenson@redhat.com>
6479
6480 * linux-x86-low.c (x86_debug_reg_state): New function.
6481 (x86_linux_prepare_to_resume): Use the above.
6482
7b669087
GB
64832015-03-24 Gary Benson <gbenson@redhat.com>
6484
6485 * linux-low.c (current_lwp_ptid): New function.
6486 * linux-x86-low.c: Include nat/linux-nat.h.
6487 (x86_dr_low_get_addr): Use current_lwp_ptid.
6488 (x86_dr_low_get_control): Likewise.
6489 (x86_dr_low_get_status): Likewise.
6490
eef49a3d
PA
64912015-03-20 Pedro Alves <palves@redhat.com>
6492
6493 * tracepoint.c (cmd_qtstatus): Make "str" const.
6494
b2333d22
PA
64952015-03-20 Pedro Alves <palves@redhat.com>
6496
6497 * server.c (handle_general_set): Make "req_str" const.
6498
23f238d3
PA
64992015-03-19 Pedro Alves <palves@redhat.com>
6500
6501 * linux-low.c (linux_resume_one_lwp): Rename to ...
6502 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6503 instead call perror_with_name.
6504 (check_ptrace_stopped_lwp_gone): New function.
6505 (linux_resume_one_lwp): Reimplement as wrapper around
6506 linux_resume_one_lwp_throw that swallows errors if the LWP is
6507 gone.
6508
91baf43f
PA
65092015-03-19 Pedro Alves <palves@redhat.com>
6510
6511 * linux-low.c (count_events_callback, select_event_lwp_callback):
6512 No longer check whether the thread has resume_stop as last resume
6513 kind.
6514
8bf3b159
PA
65152015-03-19 Pedro Alves <palves@redhat.com>
6516
6517 * linux-low.c (count_events_callback, select_event_lwp_callback):
6518 Use the lwp's status_pending_p field, not the thread's.
6519
b90fc188
PA
65202015-03-19 Pedro Alves <palves@redhat.com>
6521
6522 * linux-low.c (select_event_lwp_callback): Update comments to
6523 no longer mention SIGTRAP.
6524
464b0089
GB
65252015-03-18 Gary Benson <gbenson@redhat.com>
6526
6527 * server.c (handle_query): Do not report vFile:fstat as supported.
6528
aa9e327f
GB
65292015-03-11 Gary Benson <gbenson@redhat.com>
6530
6531 * hostio.c (sys/types.h): New include.
6532 (sys/stat.h): Likewise.
6533 (common-remote-fileio.h): Likewise.
6534 (handle_fstat): New function.
6535 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6536
791c0056
GB
65372015-03-11 Gary Benson <gbenson@redhat.com>
6538
6539 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6540 struct stat.st_blocks and struct stat.st_blksize.
6541 * configure: Regenerate.
6542 * config.in: Likewise.
6543 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6544 (OBS): Add common-remote-fileio.o.
6545 (common-remote-fileio.o): New rule.
6546
9a9df970
PA
65472015-03-09 Pedro Alves <palves@redhat.com>
6548
6549 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6550 'struct sockaddr' pointer in 'accept' call.
6551
9eb1356e
PA
65522015-03-09 Pedro Alves <palves@redhat.com>
6553
6554 Revert:
6555 2015-03-07 Pedro Alves <palves@redhat.com>
6556 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6557 or <winsock2.h> here. Instead include "gdb_socket.h".
6558 (remote_open): Use union gdb_sockaddr_u.
6559 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6560 or <winsock2.h> here. Instead include "gdb_socket.h".
6561 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6562 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6563 or <sys/un.h>.
6564 (init_named_socket, gdb_agent_helper_thread): Use union
6565 gdb_sockaddr_u.
6566
aac331e4
PA
65672015-03-07 Pedro Alves <palves@redhat.com>
6568
6569 * configure.ac (build_warnings): Move
6570 -Wdeclaration-after-statement to the C-specific set.
6571 * configure: Regenerate.
6572
366c75fc
PA
65732015-03-07 Pedro Alves <palves@redhat.com>
6574
6575 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6576 or <winsock2.h> here. Instead include "gdb_socket.h".
6577 (remote_open): Use union gdb_sockaddr_u.
6578 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6579 or <winsock2.h> here. Instead include "gdb_socket.h".
6580 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6581 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6582 or <sys/un.h>.
6583 (init_named_socket, gdb_agent_helper_thread): Use union
6584 gdb_sockaddr_u.
6585
492d29ea
PA
65862015-03-07 Pedro Alves <palves@redhat.com>
6587
6588 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6589 instead.
6590
60a191ed
YQ
65912015-03-06 Yao Qi <yao.qi@linaro.org>
6592
6593 * linux-aarch64-low.c (aarch64_insert_point): Use
6594 show_debug_regs as a boolean.
6595 (aarch64_remove_point): Likewise.
6596
f5771b1d
PA
65972015-03-05 Pedro Alves <palves@redhat.com>
6598
6599 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6600 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6601 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6602 * nto-low.c (nto_target_ops): Likewise.
6603 * spu-low.c (spu_target_ops): Likewise.
6604 * win32-low.c (win32_target_ops): Likewise.
6605
3e572f71
PA
66062015-03-04 Pedro Alves <palves@redhat.com>
6607
72f4393d 6608 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6609 Decide whether a breakpoint triggered based on the SIGTRAP's
6610 siginfo.si_code.
72f4393d
L
6611 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6612 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6613 (linux_low_filter_event): Check for breakpoints before checking
6614 watchpoints.
6615 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6616 siginfo.si_code.
72f4393d
L
6617 (linux_stopped_by_sw_breakpoint)
6618 (linux_supports_stopped_by_sw_breakpoint)
6619 (linux_stopped_by_hw_breakpoint)
6620 (linux_supports_stopped_by_hw_breakpoint): New functions.
6621 (linux_target_ops): Install new target methods.
3e572f71 6622
1ec68e26
PA
66232015-03-04 Pedro Alves <palves@redhat.com>
6624
6625 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6626 * server.c (swbreak_feature, hwbreak_feature): New globals.
6627 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6628 (captured_main): Clear swbreak_feature and hwbreak_feature.
6629 * server.h (swbreak_feature, hwbreak_feature): Declare.
6630 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6631 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6632 supports_stopped_by_hw_breakpoint>: New fields.
6633 (target_supports_stopped_by_sw_breakpoint)
6634 (target_stopped_by_sw_breakpoint)
6635 (target_supports_stopped_by_hw_breakpoint)
6636 (target_stopped_by_hw_breakpoint): Declare.
6637
15c66dd6
PA
66382015-03-04 Pedro Alves <palves@redhat.com>
6639
6640 enum lwp_stop_reason -> enum target_stop_reason
6641 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6642 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6643 (linux_wait_1, stuck_in_jump_pad_callback)
6644 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6645 (linux_stopped_by_watchpoint):
6646 * linux-low.h (enum lwp_stop_reason): Delete.
6647 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6648 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6649
98fc70d6
YQ
66502015-03-04 Yao Qi <yao.qi@linaro.org>
6651
6652 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6653
dd2ac174
GB
66542015-03-03 Gary Benson <gbenson@redhat.com>
6655
6656 * hostio.c (handle_vFile): Fix prefix lengths.
6657
d68e53f4
MM
66582015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6659
6660 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6661 ptr_bits.
6662
bf2d68ab
AA
66632015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6664
6665 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6666 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6667 (clean): Add "rm -f" for above C files.
6668 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6669 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6670 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6671 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6672 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6673 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6674 (init_registers_s390x_vx_linux64)
6675 (init_registers_s390x_tevx_linux64)
6676 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6677 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6678 declarations.
6679 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6680 (s390_store_vxrs_high): New functions.
6681 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6682 NT_S390_VXRS_HIGH.
6683 (s390_arch_setup): Add logic for selecting one of the new target
6684 descriptions. Activate the new vector regsets if applicable.
6685 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6686 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6687 and init_registers_s390x_tevx_linux64.
6688
c966a859
PA
66892015-03-01 Pedro Alves <palves@redhat.com>
6690
6691 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6692 parameter.
6693
4180215b
PA
66942015-02-27 Pedro Alves <palves@redhat.com>
6695
6696 * linux-x86-low.c (u_debugreg_offset): New function.
6697 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6698
749bab01
PA
66992015-02-27 Pedro Alves <palves@redhat.com>
6700
6701 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6702 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6703 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6704 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6705 (ps_lsetfpregs, ps_getpid)
6706 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6707 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6708 (ps_lsetxregs, ps_plog): Declare.
6709
3c14e5a3
PA
67102015-02-27 Pedro Alves <palves@redhat.com>
6711
6712 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6713 IP_AGENT_EXPORT_FUNC.
6714 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6715 IP_AGENT_EXPORT_FUNC.
6716 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6717 (IP_AGENT_EXPORT): Delete.
6718 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6719 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6720 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6721 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6722 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6723 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6724 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6725 (traceframe_read_count, traceframe_write_count)
6726 (traceframes_created, trace_state_variables, get_raw_reg)
6727 (get_trace_state_variable_value, set_trace_state_variable_value)
6728 (ust_loaded, helper_thread_id, cmd_buf): Use
6729 IPA_SYM_EXPORTED_NAME.
6730 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6731 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6732 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6733 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6734 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6735 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6736 EXTERN_C_PUSH/EXTERN_C_POP.
6737 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6738 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6739 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6740 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6741 (traceframe_write_count, traceframe_read_count)
6742 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6743 (about_to_request_buffer_space, get_trace_state_variable_value)
6744 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6745 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6746 EXTERN_C_PUSH/EXTERN_C_POP.
6747 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6748 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6749 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6750 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6751 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6752 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6753 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6754 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6755 Define.
6756 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6757 (IP_AGENT_EXPORT_VAR_DECL): Define.
6758 (tracing): Declare.
6759 (gdb_agent_get_raw_reg): Declare.
6760
fe978cb0
PA
67612015-02-27 Tom Tromey <tromey@redhat.com>
6762 Pedro Alves <palves@redhat.com>
6763
6764 Rename symbols whose names are reserved C++ keywords throughout.
6765
3bc3d82a
PA
67662015-02-27 Pedro Alves <palves@redhat.com>
6767
6768 * Makefile.in (COMPILER): New, get it from autoconf.
6769 (CXX): Get from autoconf instead.
6770 (COMPILE.pre): Use COMPILER.
6771 (CC-LD): Rename to ...
6772 (CC_LD): ... this. Use COMPILER.
6773 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6774 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6775 * acinclude.m4: Include build-with-cxx.m4.
6776 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6777 Disable -Werror by default if building in C++ mode.
6778 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6779 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6780 the C++ compiler. Save/restore CXXFLAGS too.
6781 * configure: Regenerate.
6782
07697489
PA
67832015-02-27 Pedro Alves <palves@redhat.com>
6784
6785 * acinclude.m4: Include libiberty.m4.
6786 * configure.ac: Call libiberty_INIT.
6787 * config.in, configure: Regenerate.
6788
9beb7c4e
PA
67892015-02-26 Pedro Alves <palves@redhat.com>
6790
6791 * linux-low.c (linux_wait_1): When incrementing the PC past a
6792 program breakpoint always use the_low_target.breakpoint_len as
6793 increment, rather than the maximum between that and
6794 the_low_target.decr_pc_after_break.
6795
8090aef2
PA
67962015-02-23 Pedro Alves <palves@redhat.com>
6797
6798 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6799 thread was doing a step-over; always adjust the PC if
6800 we stepped over a permanent breakpoint.
6801 (linux_wait_1): If we stepped over breakpoint that was on top of a
6802 permanent breakpoint, manually advance the PC past it.
6803
bc9540e8
PA
68042015-02-23 Pedro Alves <palves@redhat.com>
6805
6806 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6807 modes.
6808 (x86_fill_gregset, x86_store_gregset): Use it when handling
6809 $orig_eax.
6810
2db9a427
PA
68112015-02-20 Pedro Alves <palves@redhat.com>
6812
6813 * thread-db.c: Include "nat/linux-procfs.h".
6814 (thread_db_init): Skip listing new threads if the kernel supports
6815 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6816
afa8d396
PA
68172015-02-20 Pedro Alves <palves@redhat.com>
6818
6819 * linux-low.c (status_pending_p_callback): Use ptid_match.
6820
c9587f88
AT
68212015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6822
6823 PR breakpoints/16812
6824 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6825 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6826 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6827
b05ec7a5
AT
68282015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6829
6830 PR breakpoints/15956
6831 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6832
d33501a5
MM
68332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6834
6835 * linux-low.c (linux_low_btrace_conf): Print size.
6836 * server.c (handle_btrace_conf_general_set): New.
6837 (hanle_general_set): Call handle_btrace_conf_general_set.
6838 (handle_query): Report Qbtrace-conf:bts:size as supported.
6839
f4abbc16
MM
68402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6841
6842 * linux-low.c (linux_low_enable_btrace): Update parameters.
6843 (linux_low_btrace_conf): New.
6844 (linux_target_ops)<to_btrace_conf>: Initialize.
6845 * server.c (current_btrace_conf): New.
6846 (handle_btrace_enable): Rename to ...
6847 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6848 to target_enable_btrace. Update comment. Update users.
6849 (handle_qxfer_btrace_conf): New.
6850 (qxfer_packets): Add btrace-conf entry.
6851 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6852 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6853 (target_ops)<read_btrace_conf>: New.
6854 (target_enable_btrace): Update parameters.
6855 (target_read_btrace_conf): New.
6856
043c3577
MM
68572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6858
6859 * server.c (handle_btrace_general_set): Remove call to
6860 target_supports_btrace.
6861 (supported_btrace_packets): New.
6862 (handle_query): Call supported_btrace_packets.
6863 * target.h: include btrace-common.h.
6864 (btrace_target_info): Removed.
6865 (supports_btrace, target_supports_btrace): Update parameters.
6866
734b0e4b
MM
68672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6868
6869 * Makefile.in (SFILES): Add common/btrace-common.c.
6870 (OBS): Add common/btrace-common.o.
6871 (btrace-common.o): Add build rules.
6872 * linux-low: Include btrace-common.h.
6873 (linux_low_read_btrace): Use struct btrace_data. Call
6874 btrace_data_init and btrace_data_fini.
6875
d6c146e9
PA
68762015-02-06 Pedro Alves <palves@redhat.com>
6877
6878 * thread-db.c (find_new_threads_callback): Add debug output.
6879
20ba1ce6
PA
68802015-02-04 Pedro Alves <palves@redhat.com>
6881
6882 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6883 (resume_stopped_resumed_lwps): New function.
6884 (linux_wait_for_event_filtered): Use it.
6885
8cc73a39
SDJ
68862015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6887
6888 * Makefile.in (SFILES): Add linux-personality.c.
6889 (linux-personality.o): New rule.
6890 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6891 list of objects to be built.
6892 * linux-low.c: Include nat/linux-personality.h.
6893 (linux_create_inferior): Remove code to disable address space
6894 randomization (moved to ../nat/linux-personality.c). Create
6895 cleanup to disable address space randomization.
6896
fb23d554
SDJ
68972015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6898
6899 * Makefile.in (posix-strerror.o): New rule.
6900 (mingw-strerror.o): Likewise.
6901 * configure: Regenerated.
6902 * configure.ac: Source file ../common/common.host. Initialize new
6903 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6904
cdf43629
YQ
69052015-01-14 Yao Qi <yao@codesourcery.com>
6906
6907 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6908 (ppc-linux.o): New rule.
6909 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6910 * configure.ac: AC_CHECK_FUNCS(getauxval).
6911 * config.in: Re-generated.
6912 * configure: Re-generated.
6913 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6914 ppc64_64bit_inferior_p
6915
514c5338
YQ
69162015-01-14 Yao Qi <yao@codesourcery.com>
6917
6918 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6919 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6920 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6921 (PT_ORIG_R3, PT_TRAP): Likewise.
6922 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6923 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6924 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6925
3368c1e5
JB
69262015-01-10 Joel Brobecker <brobecker@adacore.com>
6927
6928 * i387-fp.c (i387_cache_to_xsave): In look over
6929 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6930 zmmh_low_space field by use of zmmh_high_space.
6931
582511be
PA
69322015-01-09 Pedro Alves <palves@redhat.com>
6933
6934 * linux-low.c (step_over_bkpt): Move higher up in the file.
6935 (handle_extended_wait): Don't store the stop_pc here.
6936 (get_stop_pc): Adjust comments and rename to ...
6937 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6938 stopped for a software breakpoint or hardware breakpoint.
6939 (thread_still_has_status_pending_p): New function.
6940 (status_pending_p_callback): Use
6941 thread_still_has_status_pending_p. If the event is no longer
6942 interesting, resume the LWP.
6943 (handle_tracepoints): Add assert.
6944 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6945 (wstatus_maybe_breakpoint): New function.
6946 (cancel_breakpoint): Delete function.
6947 (check_stopped_by_watchpoint): New function, factored out from
6948 linux_low_filter_event.
6949 (lp_status_maybe_breakpoint): Delete function.
6950 (linux_low_filter_event): Remove filter_ptid argument.
6951 Leave thread group exits pending here. Store the LWP's stop PC.
6952 Always leave events pending.
6953 (linux_wait_for_event_filtered): Pull all events out of the
6954 kernel, and leave them all pending.
6955 (count_events_callback, select_event_lwp_callback): Consider all
6956 events.
6957 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6958 (select_event_lwp): Only give preference to the stepping LWP in
6959 all-stop mode. Adjust comments.
6960 (ignore_event): New function.
6961 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6962 references to cancel_breakpoints. Adjust to renames. Also give
6963 equal priority to all LWPs that have had events in non-stop mode.
6964 If reporting a software breakpoint event, unadjust the LWP's PC.
6965 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6966 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6967 Adjust.
6968 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6969 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6970 (linux_stopped_by_watchpoint): Adjust.
6971 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6972 * linux-low.h (enum lwp_stop_reason): New.
6973 (struct lwp_info) <stop_pc>: Adjust comment.
6974 <stopped_by_watchpoint>: Delete field.
6975 <stop_reason>: New field.
6976 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6977 * mem-break.c (software_breakpoint_inserted_here)
6978 (hardware_breakpoint_inserted_here): New function.
6979 * mem-break.h (software_breakpoint_inserted_here)
6980 (hardware_breakpoint_inserted_here): Declare.
6981 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6982 (cancel_breakpoints): Delete.
6983 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6984 (upload_fast_traceframes): Remove references to
6985 cancel_breakpoints.
6986
a33e3959
PA
69872015-01-09 Pedro Alves <palves@redhat.com>
6988
6989 * thread-db.c (find_new_threads_callback): Ignore thread if the
6990 kernel thread ID is -1.
6991
8784d563
PA
69922015-01-09 Pedro Alves <palves@redhat.com>
6993
6994 * linux-low.c (linux_attach_fail_reason_string): Move to
6995 nat/linux-ptrace.c, and rename.
6996 (linux_attach_lwp): Update comment.
6997 (attach_proc_task_lwp_callback): New function.
6998 (linux_attach): Adjust to rename and use
6999 linux_proc_attach_tgid_threads.
7000 (linux_attach_fail_reason_string): Delete declaration.
7001
76f2b779
JB
70022015-01-01 Joel Brobecker <brobecker@adacore.com>
7003
7004 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7005 * server.c (gdbserver_version): Likewise.
7006
fafcc06a
SDJ
70072014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7008
7009 * remote-utils.c: Include ctype.h.
7010 (input_interrupt): Explicitly handle the case when the char
7011 received is the NUL byte. Improve the printing of non-ASCII
7012 characters.
7013
beed38b8
JB
70142014-12-16 Joel Brobecker <brobecker@adacore.com>
7015
7016 * linux-low.c (linux_low_filter_event): Update call to
7017 linux_enable_event_reporting following the addition of
7018 a new parameter to that function.
7019
bf330350
CU
70202014-12-16 Catalin Udma <catalin.udma@freescale.com>
7021
7022 PR server/17457
7023 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7024 (AARCH64_FPCR_REGNO): Likewise.
7025 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7026 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7027 (aarch64_store_fpregset): Likewise.
7028
5227d625
JB
70292014-12-15 Joel Brobecker <brobecker@adacore.com>
7030
7031 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7032 Remove FIXME comment about assumption about N.
7033
f93b65a0
JB
70342014-12-13 Joel Brobecker <brobecker@adacore.com>
7035
7036 * configure.ac: If large-file support is disabled in GDBserver,
7037 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7038 * configure: Regenerate.
7039
e5a9158d
AA
70402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7041
7042 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7043 warning upon ENODATA from ptrace.
7044 * linux-s390-low.c (s390_store_tdb): New.
7045 (s390_regsets): Add regset for NT_S390_TDB.
7046
feea5f36
AA
70472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7048
7049 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7050 without a fill_function.
7051 * linux-s390-low.c (s390_fill_last_break): Remove.
7052 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7053 (s390_arch_setup): Use regset's size instead of fill_function for
7054 loop end condition.
7055
098dbe61
AA
70562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7057
7058 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7059 the regset's store function when ptrace returned an error.
7060 * regcache.c (get_thread_regcache): Invalidate register cache
7061 before fetching inferior's registers.
7062
28eef672
AA
70632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7064
7065 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7066 while-loop as for-loop.
7067 (regsets_store_inferior_registers): Likewise.
7068
bdca27a2
YQ
70692014-11-28 Yao Qi <yao@codesourcery.com>
7070
7071 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7072 * config.in, configure: Re-generate.
7073 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7074 is defined.
7075
9c232dda
YQ
70762014-11-21 Yao Qi <yao@codesourcery.com>
7077
7078 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7079 (AC_CHECK_HEADERS): Remove malloc.h.
7080 * configure: Re-generated.
7081 * config.in: Re-generated.
7082 * server.h: Don't include alloca.h and malloc.h.
7083 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7084 Don't include malloc.h.
7085
43968415
JB
70862014-11-17 Joel Brobecker <brobecker@adacore.com>
7087
7088 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7089 corresponding ERRNO check in same block.
7090
40e91bc7
PA
70912014-11-12 Pedro Alves <palves@redhat.com>
7092
7093 * server.c (cont_thread): Update comment.
7094 (start_inferior, attach_inferior): No longer clear cont_thread.
7095 (handle_v_cont): No longer set cont_thread.
7096 (captured_main): Clear cont_thread each time a GDB connects.
7097
c2c118cf
PA
70982014-11-12 Pedro Alves <palves@redhat.com>
7099
7100 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7101 thread, and don't resume all threads if the Hc thread has exited.
7102
78708b7c
PA
71032014-11-12 Pedro Alves <palves@redhat.com>
7104
7105 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7106 the process group instead of to a specific LWP.
7107
a2abc7de
PA
71082014-10-15 Pedro Alves <palves@redhat.com>
7109
7110 PR server/17487
7111 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7112 parameter.
7113 (arm_set_thread_context): Delete.
7114 (the_low_target): Adjust.
7115 * win32-i386-low.c (debug_registers_changed)
7116 (debug_registers_used): Delete.
7117 (update_debug_registers_callback): New function.
7118 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7119 needing to update their debug registers.
7120 (win32_get_current_dr): New function.
7121 (x86_dr_low_get_addr, x86_dr_low_get_control)
7122 (x86_dr_low_get_status): Fetch the debug register from the thread
7123 record's context.
7124 (i386_initial_stuff): Adjust.
7125 (i386_get_thread_context): Remove current_event parameter. Don't
7126 clear debug_registers_changed nor copy DR values to
7127 debug_reg_state.
7128 (i386_set_thread_context): Delete.
7129 (i386_prepare_to_resume): New function.
7130 (i386_thread_added): Mark the thread as needing to update irs
7131 debug registers.
7132 (the_low_target): Remove i386_set_thread_context and install
7133 i386_prepare_to_resume.
7134 * win32-low.c (win32_get_thread_context): Adjust.
7135 (win32_set_thread_context): Use SetThreadContext
7136 directly.
7137 (win32_prepare_to_resume): New function.
7138 (win32_require_context): New function, factored out from ...
7139 (thread_rec): ... this.
7140 (continue_one_thread): Call win32_prepare_to_resume on each thread
7141 we're about to continue.
7142 (win32_resume): Call win32_prepare_to_resume on the event thread.
7143 * win32-low.h (struct win32_thread_info)
7144 <debug_registers_changed>: New field.
7145 (struct win32_target_ops): Change prototype of set_thread_context,
7146 delete set_thread_context and add prepare_to_resume.
7147 (win32_require_context): New declaration.
7148
a442d071
GB
71492014-10-08 Gary Benson <gbenson@redhat.com>
7150
7151 * server.h: Do not include common-exceptions.h.
7152
6f1947e8
GB
71532014-10-08 Gary Benson <gbenson@redhat.com>
7154
7155 * server.h: Do not include cleanups.h.
7156
63b434a4
JH
71572014-09-30 James Hogan <james.hogan@imgtec.com>
7158
7159 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7160 mips64-dsp-linux.c.
7161
c4d9ceb6
YQ
71622014-09-23 Yao Qi <yao@codesourcery.com>
7163
7164 * linux-low.c (lp_status_maybe_breakpoint): New function.
7165 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7166 (count_events_callback): Likewise.
7167 (select_event_lwp_callback): Likewise.
7168 (cancel_breakpoints_callback): Likewise.
7169
89a5711c
DB
71702014-09-19 Don Breazeal <donb@codesourcery.com>
7171
7172 * linux-low.c (handle_extended_wait): Call
7173 linux_ptrace_get_extended_event.
7174 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7175 linux_is_extended_waitstatus.
7176
bffc0964
JB
71772014-09-16 Joel Brobecker <brobecker@adacore.com>
7178
7179 * Makefile.in (CPPFLAGS): Define.
7180 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7181 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7182
0bfdf32f
GB
71832014-09-16 Gary Benson <gbenson@redhat.com>
7184
7185 * inferiors.h (current_inferior): Renamed as...
7186 (current_thread): New variable. All uses updated.
7187 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7188 (maybe_move_out_of_jump_pad): Likewise.
7189 (cancel_breakpoint): Likewise.
7190 (linux_low_filter_event): Likewise.
7191 (wait_for_sigstop): Likewise.
7192 (linux_resume_one_lwp): Likewise.
7193 (need_step_over_p): Likewise.
7194 (start_step_over): Likewise.
7195 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7196 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7197 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7198 and save_inferior as saved_thread.
7199 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7200 saved_thread.
7201 (regcache_invalidate_thread): Likewise.
7202 * remote-utils.c (prepare_resume_reply): Likewise.
7203 * thread-db.c (thread_db_get_tls_address): Likewise.
7204 (disable_thread_event_reporting): Likewise.
7205 (remove_thread_event_breakpoints): Likewise.
7206 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7207 as saved_thread.
7208 * target.h (set_desired_inferior): Renamed as...
7209 (set_desired_thread): New declaration. All uses updated.
7210 * server.c (myresume): Updated comment to reference thread instead
7211 of inferior.
7212 (handle_serial_event): Likewise.
7213 (handle_target_event): Likewise.
7214
361c8ade
GB
72152014-09-12 Tom Tromey <tromey@redhat.com>
7216 Gary Benson <gbenson@redhat.com>
7217
7218 * regcache.h: Include common-regcache.h.
7219 (regcache_read_pc): Don't declare.
7220 * regcache.c (get_thread_regcache_for_ptid): New function.
7221
bd9269f7
GB
72222014-09-11 Tom Tromey <tromey@redhat.com>
7223 Gary Benson <gbenson@redhat.com>
7224
7225 * symbol.c: New file.
7226 * Makefile.in (SFILES): Add symbol.c.
7227 (OBS): Add symbol.o.
7228
f8c1d06b
GB
72292014-09-11 Gary Benson <gbenson@redhat.com>
7230
7231 * target.c (target_stop_ptid, target_continue_ptid): New
7232 functions.
7233
721ec300
GB
72342014-09-11 Tom Tromey <tromey@redhat.com>
7235 Gary Benson <gbenson@redhat.com>
7236
7237 * target.h: Include target/target.h.
7238 * target.c (target_read_memory, target_read_uint32)
7239 (target_write_memory): New functions.
7240
c5e92cca
GB
72412014-09-11 Gary Benson <gbenson@redhat.com>
7242
7243 * server.h (debug_hw_points): Don't declare.
7244 * server.c (debug_hw_points): Don't define. Replace all uses
7245 with show_debug_regs.
7246 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7247 all uses with show_debug_regs.
7248
2e4bb98a
EBM
72492014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7250
7251 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7252 endianness into account.
7253 (ppc_supply_ptrace_register): Likewise.
7254
ac740bc7
JH
72552014-09-03 James Hogan <james.hogan@imgtec.com>
7256
7257 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7258 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7259
97ea6506
GB
72602014-09-03 Gary Benson <gbenson@redhat.com>
7261
7262 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7263 ALL_DEBUG_ADDRESS_REGISTERS.
7264
df7e5265
GB
72652014-09-02 Gary Benson <gbenson@redhat.com>
7266
7267 * i386-low.h: Renamed as...
7268 * x86-low.h: New file. All type, function and variable name
7269 prefixes changed from "i386_" to "x86_". All references updated.
7270 * i386-low.c: Renamed as...
7271 * x86-low.c: New file. All type, function and variable name
7272 prefixes changed from "i386_" to "x86_". All references updated.
7273
ed859da7
GB
72742014-09-02 Gary Benson <gbenson@redhat.com>
7275
7276 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7277 (x86_linux_new_thread): Likewise.
7278
860789c7
GB
72792014-08-29 Gary Benson <gbenson@redhat.com>
7280
7281 * server.h (setjmp.h): Do not include.
7282 (toplevel): Do not declare.
7283 (common-exceptions.h): Include.
7284 (cleanups.h): Likewise.
7285 * server.c (toplevel): Do not define.
7286 (exit_code): New static global.
7287 (detach_or_kill_for_exit_cleanup): New function.
7288 (main): New function. Original main renamed to...
7289 (captured_main): New function.
7290 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7291
ff55e1b5
GB
72922014-08-29 Gary Benson <gbenson@redhat.com>
7293
7294 * Makefile.in (SFILES): Add common/common-exceptions.c.
7295 (OBS): Add common-exceptions.o.
7296 (common-exceptions.o): New rule.
7297 * utils.c (prepare_to_throw_exception): New function.
7298
e9bcb658
GB
72992014-08-29 Gary Benson <gbenson@redhat.com>
7300
7301 * config.in: Regenerate.
7302 * configure: Likewise.
7303
e3180625
GB
73042014-08-29 Gary Benson <gbenson@redhat.com>
7305
7306 * Makefile.in (SFILES): Add common/cleanups.c.
7307 (OBS): cleanups.o.
7308 (cleanups.o): New rule.
7309
e3d6ba5d
GB
73102014-08-29 Gary Benson <gbenson@redhat.com>
7311
7312 * utils.c (internal_vwarning): New function.
7313
7096e886
GB
73142014-08-28 Gary Benson <gbenson@redhat.com>
7315
7316 * utils.h (fatal): Remove declaration.
7317 * utils.c (fatal): Remove function.
7318
14ce3192
GB
73192014-08-28 Gary Benson <gbenson@redhat.com>
7320
7321 * tracepoint.c (gdb_agent_init): Replace fatal with
7322 perror_with_name.
7323 (initialize_tracepoint): Likewise.
7324
50278d59
GB
73252014-08-28 Gary Benson <gbenson@redhat.com>
7326
7327 * remote-utils.c (remote_prepare): Replace fatal with error.
7328
aa96c426
GB
73292014-08-28 Gary Benson <gbenson@redhat.com>
7330
7331 * linux-low.c (linux_async): Replace fatal with warning.
7332 Tidy up and return.
7333 (linux_start_non_stop): Return -1 if linux_async failed.
7334
f7160e97
GB
73352014-08-28 Gary Benson <gbenson@redhat.com>
7336
7337 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7338 gdb_assert.
7339 (i386_dr_low_get_addr): Remove vague comment.
7340 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7341 gdb_assert.
7342
38e08fca
GB
73432014-08-28 Gary Benson <gbenson@redhat.com>
7344
7345 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7346 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7347 internal_error.
7348 (linux_resume_one_lwp): Likewise.
7349 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7350 gdb_assert.
7351 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7352 with internal_error.
7353 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7354 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7355 (find_register_by_name): Replace fatal with internal_error.
7356 (find_regno): Likewise.
7357 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7358 * thread-db.c (thread_db_create_event): Likewise.
7359 (thread_db_load_search): Likewise.
7360 (try_thread_db_load_1): Likewise.
7361 * tracepoint.c (get_jump_space_head): Replace fatal with
7362 internal_error.
7363 (claim_trampoline_space): Likewise.
7364 (have_fast_tracepoint_trampoline_buffer): Likewise.
7365 (cmd_qtstart): Likewise.
7366 (stop_tracing): Likewise.
7367 (fast_tracepoint_collecting): Likewise.
7368 (target_malloc): Likewise.
7369 (download_tracepoint): Likewise.
7370 (download_trace_state_variables): Replace check with gdb_assert.
7371 (upload_fast_traceframes): Replace fatal with internal_error.
7372
34abf635
GB
73732014-08-19 Tom Tromey <tromey@redhat.com>
7374 Gary Benson <gbenson@redhat.com>
7375
7376 * Makefile.in (SFILES): Add common/common-debug.c.
7377 (OBS): Add common-debug.o.
7378 (common-debug.o): New rule.
7379 * debug.h (debug_printf): Don't declare.
7380 * debug.c (debug_printf): Renamed and rewritten as...
7381 (debug_vprintf): New function.
7382
f6e94d78
GB
73832014-08-19 Gary Benson <gbenson@redhat.com>
7384
7385 * utils.h: Do not include print-utils.h.
7386
9239eeab
GB
73872014-08-19 Tom Tromey <tromey@redhat.com>
7388 Gary Benson <gbenson@redhat.com>
7389
7390 * server.h: Add static assertion.
7391 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7392
ef87c8bb
GB
73932014-08-19 Tom Tromey <tromey@redhat.com>
7394 Gary Benson <gbenson@redhat.com>
7395
7396 * Makefile.in (SFILES): Add common/errors.c.
7397 (OBS): Add errors.o.
7398 (IPA_OBS): Add errors-ipa.o.
7399 (errors.o): New rule.
7400 (errors-ipa.o): Likewise.
7401 * utils.h (perror_with_name, error, warning): Don't declare.
7402 * utils.c (warning): Renamed and rewritten as...
7403 (vwarning): New function.
7404 (error): Renamed and rewritten as...
7405 (verror): New function.
7406 (internal_error): Renamed and rewritten as...
7407 (internal_verror): New function.
7408
bb974a24
GB
74092014-08-07 Gary Benson <gbenson@redhat.com>
7410
7411 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7412 * configure: Regenerate.
7413 * config.in: Likewise.
7414 * server.h: Do not include errno.h.
7415 * event-loop.c: Likewise.
7416 * hostio-errno.c: Likewise.
7417 * linux-low.c: Likewise.
7418 * remote-utils.c: Likewise.
7419 * spu-low.c: Likewise.
7420 * utils.c: Likewise.
7421 * gdbreplay.c: Unconditionally include errno.h.
7422
6d3d12eb
GB
74232014-08-07 Gary Benson <gbenson@redhat.com>
7424
7425 * server.h: Do not include string.h.
7426 * event-loop.c: Likewise.
7427 * linux-low.c: Likewise.
7428 * regcache.c: Likewise.
7429 * remote-utils.c: Likewise.
7430 * spu-low.c: Likewise.
7431 * utils.c: Likewise.
7432
dccbb609
GB
74332014-08-07 Gary Benson <gbenson@redhat.com>
7434
7435 * server.h: Do not include gdb_assert.h.
7436
e76df0d0
GB
74372014-08-07 Gary Benson <gbenson@redhat.com>
7438
7439 * server.h: Do not include common-utils.h.
7440
4cb9c816
GB
74412014-08-07 Gary Benson <gbenson@redhat.com>
7442
7443 * server.h: Do not include ptid.h.
7444 * notif.h: Likewise.
7445
3995eeee
GB
74462014-08-07 Gary Benson <gbenson@redhat.com>
7447
7448 * server.h: Do not include gdb_locale.h.
7449
cb9f1a9b
GB
74502014-08-07 Gary Benson <gbenson@redhat.com>
7451
7452 * server.h: Do not include gdb/signals.h.
7453 * win32-low.c: Likewise.
7454
a5fceff8
GB
74552014-08-07 Gary Benson <gbenson@redhat.com>
7456
7457 * server.h: Do not include pathmax.h.
7458
b9391142
GB
74592014-08-07 Gary Benson <gbenson@redhat.com>
7460
7461 * server.h: Do not include libiberty.h.
7462 * linux-bfin-low.c: Likewise.
7463
0e443c87
GB
74642014-08-07 Gary Benson <gbenson@redhat.com>
7465
7466 * server.h: Do not include ansidecl.h.
7467
8ebb3f56
GB
74682014-08-07 Gary Benson <gbenson@redhat.com>
7469
7470 * linux-x86-low.c: Do not include stddef.h.
7471 * lynx-ppc-low.c: Likewise.
7472 * tracepoint.c: Likewise.
7473
8980bdf6
GB
74742014-08-07 Gary Benson <gbenson@redhat.com>
7475
7476 * server.h: Do not include stdarg.h.
7477 * nto-low.c: Likewise.
7478
d7096f71
GB
74792014-08-07 Gary Benson <gbenson@redhat.com>
7480
7481 * server.h: Do not include stdlib.h.
7482 * inferiors.c: Likewise.
7483 * linux-low.c: Likewise.
7484 * regcache.c: Likewise.
7485 * spu-low.c: Likewise.
7486 * tracepoint.c: Likewise.
7487 * utils.c: Likewise.
7488
d02f550d
GB
74892014-08-07 Gary Benson <gbenson@redhat.com>
7490
7491 * server.h: Do not include stdio.h.
7492 * linux-low.c: Likewise.
7493 * remote-utils.c: Likewise.
7494 * spu-low.c: Likewise.
7495 * utils.c: Likewise.
7496 * wincecompat.c: Likewise.
7497
87f6c4e3
GB
74982014-08-06 Gary Benson <gbenson@redhat.com>
7499
7500 * regcache.c (init_register_cache): Move conditionals inside if.
7501
7089dca4
GB
75022014-08-06 Gary Benson <gbenson@redhat.com>
7503
7504 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7505
462f517e
GB
75062014-07-31 Gary Benson <gbenson@redhat.com>
7507
7508 * ax.h: Do not include server.h.
7509 * gdbthread.h: Likewise.
7510 * lynx-low.h: Likewise.
7511 * notif.h: Likewise.
7512
976411d6
GB
75132014-07-30 Gary Benson <gbenson@redhat.com>
7514
7515 * server.h: Include common-defs.h.
7516 Do not include config.h or build-gnulib-gdbserver/config.h.
7517
d41f6d8e
GB
75182014-07-30 Gary Benson <gbenson@redhat.com>
7519
7520 * hostio-errno.c: Move server.h to top of includes list.
7521 * inferiors.c: Likewise.
7522 * linux-x86-low.c: Likewise.
7523 * notif.c: Include server.h.
7524
314c6a35
TT
75252014-07-24 Tom Tromey <tromey@redhat.com>
7526 Gary Benson <gbenson@redhat.com>
7527
7528 * server.h (CORE_ADDR): Now unsigned.
7529
69ff6be5
PA
75302014-07-16 Pedro Alves <palves@redhat.com>
7531
7532 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7533
ce9e3fe7
PA
75342014-07-15 Pedro Alves <palves@redhat.com>
7535
7536 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7537 copy.
7538
e76126e8
PA
75392014-07-11 Pedro Alves <palves@redhat.com>
7540
7541 * linux-low.c (kill_wait_lwp): New function, based on
7542 kill_one_lwp_callback, but use my_waitpid directly.
7543 (kill_one_lwp_callback, linux_kill): Use it.
7544
8e9db26e
PA
75452014-06-23 Pedro Alves <palves@redhat.com>
7546
7547 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7548 before setting DR0..DR3.
7549
698b3e08
GB
75502014-06-20 Gary Benson <gbenson@redhat.com>
7551
7552 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7553 * configure: Regenerated.
7554 * config.in: Likewise.
7555
125f8a3d
GB
75562014-06-20 Gary Benson <gbenson@redhat.com>
7557
7558 * Makefile.in (SFILES): Update locations for files moved
7559 from common to nat.
7560 (object file files): Reordered.
7561
42995dbd
GB
75622014-06-20 Gary Benson <gbenson@redhat.com>
7563
7564 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7565 (i386_dr_low_set_addr): Likewise.
7566 (i386_dr_low_get_addr): Likewise.
7567 (i386_dr_low_can_set_control): Likewise.
7568 (i386_dr_low_set_control): Likewise.
7569 (i386_dr_low_get_control): Likewise.
7570 (i386_dr_low_get_status): Likewise.
7571 (i386_get_debug_register_length): Likewise.
7572 * linux-x86-low.c (i386_dr_low_set_addr):
7573 Changed signature. Made static.
7574 (i386_dr_low_get_addr): Likewise.
7575 (i386_dr_low_set_control): Likewise.
7576 (i386_dr_low_get_control): Likewise.
7577 (i386_dr_low_get_status): Likewise.
7578 (i386_dr_low): New global variable.
7579 * win32-i386-low.c (i386_dr_low_set_addr):
7580 Changed signature. Made static.
7581 (i386_dr_low_get_addr): Likewise.
7582 (i386_dr_low_set_control): Likewise.
7583 (i386_dr_low_get_control): Likewise.
7584 (i386_dr_low_get_status): Likewise.
7585 (i386_dr_low): New global variable.
7586
e1d2394b
MS
75872014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7588
7589 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7590 * Makefile.in (AR, AR_FLAGS): Define.
7591 * configure: Regenerate.
7592
3a8ee006
GB
75932014-06-19 Gary Benson <gbenson@redhat.com>
7594
7595 * Makefile.in (i386-dregs.o): New rule.
7596 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7597 * i386-low.c (target.h): Remove include.
7598 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7599 (DR_CONTROL_SHIFT): Likewise.
7600 (DR_CONTROL_SIZE): Likewise.
7601 (DR_RW_EXECUTE): Likewise.
7602 (DR_RW_WRITE): Likewise.
7603 (DR_RW_READ): Likewise.
7604 (DR_RW_IORW): Likewise.
7605 (DR_LEN_1): Likewise.
7606 (DR_LEN_2): Likewise.
7607 (DR_LEN_4): Likewise.
7608 (DR_LEN_8): Likewise.
7609 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7610 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7611 (DR_ENABLE_SIZE): Likewise.
7612 (DR_LOCAL_SLOWDOWN): Likewise.
7613 (DR_GLOBAL_SLOWDOWN): Likewise.
7614 (DR_CONTROL_RESERVED): Likewise.
7615 (I386_DR_CONTROL_MASK): Likewise.
7616 (I386_DR_VACANT): Likewise.
7617 (I386_DR_LOCAL_ENABLE): Likewise.
7618 (I386_DR_GLOBAL_ENABLE): Likewise.
7619 (I386_DR_DISABLE): Likewise.
7620 (I386_DR_SET_RW_LEN): Likewise.
7621 (I386_DR_GET_RW_LEN): Likewise.
7622 (I386_DR_WATCH_HIT): Likewise.
7623 (i386_wp_op_t): Likewise.
7624 (i386_show_dr): Likewise.
7625 (i386_length_and_rw_bits): Likewise.
7626 (i386_insert_aligned_watchpoint): Likewise.
7627 (i386_remove_aligned_watchpoint): Likewise.
7628 (i386_handle_nonaligned_watchpoint): Likewise.
7629 i386_update_inferior_debug_regs(): Likewise.
7630 (i386_dr_insert_watchpoint): Likewise.
7631 (i386_dr_remove_watchpoint): Likewise.
7632 (i386_dr_region_ok_for_watchpoint): Likewise.
7633 (i386_dr_stopped_data_address): Likewise.
7634 (i386_dr_stopped_by_watchpoint): Likewise.
7635
8f26655c
GB
76362014-06-19 Gary Benson <gbenson@redhat.com>
7637
7638 * i386-low.c (i386_dr_show): Renamed to
7639 i386_show_dr and made static. All uses updated.
7640 (i386_dr_length_and_rw_bits): Renamed to
7641 i386_length_and_rw_bits and made static.
7642 All uses updated.
7643 (i386_dr_insert_aligned_watchpoint): Renamed to
7644 i386_insert_aligned_watchpoint and made static.
7645 All uses updated.
7646 (i386_dr_remove_aligned_watchpoint): Renamed to
7647 i386_remove_aligned_watchpoint and made static.
7648 All uses updated.
7649 (i386_dr_update_inferior_debug_regs): Renamed to
7650 i386_update_inferior_debug_regs and made static.
7651 All uses updated.
7652
b9228891
GB
76532014-06-18 Gary Benson <gbenson@redhat.com>
7654
5171def3
GB
7655 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7656 (i386_dr_low_can_set_control): Likewise.
7657 (i386_get_debug_register_length): Likewise.
7658 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7659 (i386_dr_low_can_set_control): Likewise.
7660 (i386_get_debug_register_length): Likewise.
7661
76622014-06-17 Gary Benson <gbenson@redhat.com>
7663
b9228891
GB
7664 * i386-low.h (i386-dregs.h): New include.
7665 (DR_FIRSTADDR): Now in i386-dregs.h.
7666 (DR_LASTADDR): Likewise.
7667 (DR_NADDR): Likewise.
7668 (DR_STATUS): Likewise.
7669 (DR_CONTROL): Likewise.
7670 (i386_debug_reg_state): Likewise.
7671 (i386_dr_insert_watchpoint): Likewise.
7672 (i386_dr_remove_watchpoint): Likewise.
7673 (i386_dr_region_ok_for_watchpoint): Likewise.
7674 (i386_dr_stopped_data_address): Likewise.
7675 (i386_dr_stopped_by_watchpoint): Likewise.
7676 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7677
4be83cc2
GB
76782014-06-18 Gary Benson <gbenson@redhat.com>
7679
7680 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7681 i386_dr_insert_watchpoint.
7682 (i386_low_remove_watchpoint): Renamed to
7683 i386_dr_remove_watchpoint.
7684 (i386_low_region_ok_for_watchpoint): Renamed to
7685 i386_dr_region_ok_for_watchpoint.
7686 (i386_low_stopped_data_address): Renamed to
7687 i386_dr_stopped_data_address.
7688 (i386_low_stopped_by_watchpoint): Renamed to
7689 i386_dr_stopped_by_watchpoint.
7690 * i386-low.c (i386_show_dr): Renamed to
7691 i386_dr_show and made nonstatic. All uses updated.
7692 (i386_length_and_rw_bits): Renamed to
7693 i386_dr_length_and_rw_bits and made nonstatic.
7694 All uses updated.
7695 (i386_insert_aligned_watchpoint): Renamed to
7696 i386_dr_insert_aligned_watchpoint and made nonstatic.
7697 All uses updated.
7698 (i386_remove_aligned_watchpoint): Renamed to
7699 i386_dr_remove_aligned_watchpoint and made nonstatic.
7700 All uses updated.
7701 (i386_update_inferior_debug_regs): Renamed to
7702 i386_dr_update_inferior_debug_regs and made nonstatic.
7703 All uses updated.
7704 (i386_low_insert_watchpoint): Renamed to
7705 i386_dr_insert_watchpoint. All uses updated.
7706 (i386_low_remove_watchpoint): Renamed to
7707 i386_dr_remove_watchpoint. All uses updated.
7708 (i386_low_region_ok_for_watchpoint): Renamed to
7709 i386_dr_region_ok_for_watchpoint. All uses updated.
7710 (i386_low_stopped_data_address): Renamed to
7711 i386_dr_stopped_data_address. All uses updated.
7712 (i386_low_stopped_by_watchpoint): Renamed to
7713 i386_dr_stopped_by_watchpoint. All uses updated.
7714
131aa0d4
GB
77152014-06-18 Gary Benson <gbenson@redhat.com>
7716
7717 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7718 (i386_dr_low_can_set_control): Likewise.
7719 (i386_insert_aligned_watchpoint): New check.
7720
d9305f7f
GB
77212014-06-18 Gary Benson <gbenson@redhat.com>
7722
7723 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7724 Renamed to state.
7725
e927c9fc
GB
77262014-06-18 Gary Benson <gbenson@redhat.com>
7727
7728 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7729 instead of fatal and error.
7730 (i386_handle_nonaligned_watchpoint): Likewise.
7731
1b6d4134
GB
77322014-06-18 Gary Benson <gbenson@redhat.com>
7733
7734 * i386-low.c (i386_get_debug_register_length): New macro.
7735 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7736 (i386_show_dr): Use debug_printf instead of fprintf. Use
7737 phex to format values.
7738
6e62758f
GB
77392014-06-18 Gary Benson <gbenson@redhat.com>
7740
7741 * i386-low.h: Comment changes.
7742 * i386-low.c: Likewise.
7743
fc6e2f03
GB
77442014-06-18 Gary Benson <gbenson@redhat.com>
7745
7746 * i386-low.c: Whitespace changes.
7747
f9d1eeed
TT
77482014-06-12 Tom Tromey <tromey@redhat.com>
7749
7750 * utils.c (freeargv): Remove.
7751
0b04e523
TT
77522014-06-12 Tom Tromey <tromey@redhat.com>
7753
7754 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7755 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7756 (parse_debug_format_options): Likewise.
7757 (gdbserver_usage): Likewise.
7758 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7759 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7760 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7761 against libiberty.
7762 ($(LIBGNU)): Depend on libiberty.
7763 (all-lib): Recurse into all subdirs.
7764 (install-only): Invoke "install" target in subdirs.
7765 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7766 targets.
7767 * configure: Rebuild.
7768 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7769 for vasprintf, vsnprintf, or gettimeofday.
7770 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7771 srv_tgtobj.
7772
270c9937
JB
77732014-06-05 Joel Brobecker <brobecker@adacore.com>
7774
7775 * development.sh: Delete.
7776 * Makefile.in (config.status): Adjust dependency on development.sh.
7777 * configure.ac: Adjust development.sh source call.
7778 * configure: Regenerate.
7779
0a261ed8
PA
77802014-06-02 Pedro Alves <palves@redhat.com>
7781
7782 * ax.c (gdb_free_agent_expr): New function.
7783 * ax.h (gdb_free_agent_expr): New declaration.
7784 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7785 list.
7786 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7787 static.
7788 (clear_breakpoint_conditions_and_commands): New function.
7789 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7790 (clear_breakpoint_conditions_and_commands): New declaration.
7791
e9dae05e
RR
77922014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7793
7794 * linux-aarch64-low.c (asm/ptrace.h): Include.
7795
5876f503
JK
77962014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7797
7798 Fix TLS access for -static -pthread.
7799 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7800 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7801 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7802
802e8e6d
PA
78032014-05-20 Pedro Alves <palves@redhat.com>
7804
7805 * linux-aarch64-low.c (aarch64_insert_point)
7806 (aarch64_remove_point): No longer check whether the type is
7807 supported here. Adjust to new interface.
7808 (the_low_target): Install aarch64_supports_z_point_type as
7809 supports_z_point_type method.
7810 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7811 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7812 instead of a Z packet char. Adjust.
7813 (arm_supports_z_point_type): New function.
7814 (arm_insert_point, arm_remove_point): Adjust to new interface.
7815 (the_low_target): Install arm_supports_z_point_type.
7816 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7817 (cris_insert_point, cris_remove_point): Adjust to new interface.
7818 Don't check whether the type is supported here.
7819 (the_low_target): Install cris_supports_z_point_type.
7820 * linux-low.c (linux_supports_z_point_type): New function.
7821 (linux_insert_point, linux_remove_point): Adjust to new interface.
7822 * linux-low.h (struct linux_target_ops) <insert_point,
7823 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7824 raw_breakpoint pointer parameter.
7825 <supports_z_point_type>: New method.
7826 * linux-mips-low.c (mips_supports_z_point_type): New function.
7827 (mips_insert_point, mips_remove_point): Adjust to new interface.
7828 Use mips_supports_z_point_type.
7829 (the_low_target): Install mips_supports_z_point_type.
7830 * linux-ppc-low.c (the_low_target): Install NULL as
7831 supports_z_point_type method.
7832 * linux-s390-low.c (the_low_target): Install NULL as
7833 supports_z_point_type method.
7834 * linux-sparc-low.c (the_low_target): Install NULL as
7835 supports_z_point_type method.
7836 * linux-x86-low.c (x86_supports_z_point_type): New function.
7837 (x86_insert_point): Adjust to new insert_point interface. Use
7838 insert_memory_breakpoint. Adjust to new
7839 i386_low_insert_watchpoint interface.
7840 (x86_remove_point): Adjust to remove_point interface. Use
7841 remove_memory_breakpoint. Adjust to new
7842 i386_low_remove_watchpoint interface.
7843 (the_low_target): Install x86_supports_z_point_type.
7844 * lynx-low.c (lynx_target_ops): Install NULL as
7845 supports_z_point_type callback.
7846 * nto-low.c (nto_supports_z_point_type): New.
7847 (nto_insert_point, nto_remove_point): Adjust to new interface.
7848 (nto_target_ops): Install nto_supports_z_point_type.
7849 * mem-break.c: Adjust intro comment.
7850 (struct raw_breakpoint) <raw_type, size>: New fields.
7851 <inserted>: Update comment.
7852 <shlib_disabled>: Delete field.
7853 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7854 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7855 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7856 (raw_bkpt_type_to_target_hw_bp_type): New function.
7857 (find_enabled_raw_code_breakpoint_at): New function.
7858 (find_raw_breakpoint_at): New type and size parameters. Use them.
7859 (insert_memory_breakpoint): New function, based off
7860 set_raw_breakpoint_at.
7861 (remove_memory_breakpoint): New function.
7862 (set_raw_breakpoint_at): Reimplement.
7863 (set_breakpoint): New, based on set_breakpoint_at.
7864 (set_breakpoint_at): Reimplement.
7865 (delete_raw_breakpoint): Go through the_target->remove_point
7866 instead of assuming memory breakpoints.
7867 (find_gdb_breakpoint_at): Delete.
7868 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7869 (find_gdb_breakpoint): New function.
7870 (set_gdb_breakpoint_at): Delete.
7871 (z_type_supported): New function.
7872 (set_gdb_breakpoint_1): New function, loosely based off
7873 set_gdb_breakpoint_at.
7874 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7875 (delete_gdb_breakpoint_at): Delete.
7876 (delete_gdb_breakpoint_1): New function, loosely based off
7877 delete_gdb_breakpoint_at.
7878 (delete_gdb_breakpoint): New function.
7879 (clear_gdb_breakpoint_conditions): Rename to ...
7880 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7881 breakpoint.
7882 (add_condition_to_breakpoint): Make static.
7883 (add_breakpoint_condition): Take a struct breakpoint pointer
7884 instead of an address. Adjust.
7885 (gdb_condition_true_at_breakpoint): Rename to ...
7886 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7887 z_type parameter.
7888 (gdb_condition_true_at_breakpoint): Reimplement.
7889 (add_breakpoint_commands): Take a struct breakpoint pointer
7890 instead of an address. Adjust.
7891 (gdb_no_commands_at_breakpoint): Rename to ...
7892 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7893 parameter. Return true if no breakpoint was found. Change debug
7894 output.
7895 (gdb_no_commands_at_breakpoint): Reimplement.
7896 (run_breakpoint_commands): Rename to ...
7897 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7898 and change return type to boolean.
7899 (run_breakpoint_commands): New function.
7900 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7901 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7902 breakpoint. Go through the_target->remove_point instead of
7903 assuming memory breakpoint.
7904 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7905 software and hardware breakpoints.
7906 (reinsert_raw_breakpoint): Go through the_target->insert_point
7907 instead of assuming memory breakpoint.
7908 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7909 software and hardware breakpoints.
7910 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7911 Check both software and hardware breakpoints.
7912 (validate_inserted_breakpoint): Assert the breakpoint is a
7913 software breakpoint. Set the inserted flag to -1 instead of
7914 setting shlib_disabled.
7915 (delete_disabled_breakpoints): Adjust.
7916 (validate_breakpoints): Only validate software breakpoints.
7917 Adjust to inserted flag change.
7918 (check_mem_read, check_mem_write): Skip breakpoint types other
7919 than software breakpoints. Adjust to inserted flag change.
7920 * mem-break.h (enum raw_bkpt_type): New enum.
7921 (raw_breakpoint, struct process_info): Forward declare.
7922 (Z_packet_to_target_hw_bp_type): Delete declaration.
7923 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7924 (set_gdb_breakpoint, delete_gdb_breakpoint)
7925 (clear_breakpoint_conditions): New declarations.
7926 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7927 (breakpoint_inserted_here): Update comment.
7928 (add_breakpoint_condition, add_breakpoint_commands): Replace
7929 address parameter with a breakpoint pointer parameter.
7930 (gdb_breakpoint_here): Update comment.
7931 (delete_gdb_breakpoint_at): Delete.
7932 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7933 * server.c (process_point_options): Take a struct breakpoint
7934 pointer instead of an address. Adjust.
7935 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7936 delete_gdb_breakpoint.
7937 * spu-low.c (spu_target_ops): Install NULL as
7938 supports_z_point_type method.
7939 * target.h: Include mem-break.h.
7940 (struct target_ops) <prepare_to_access_memory>: Update comment.
7941 <supports_z_point_type>: New field.
7942 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7943 instead of a char. Also take a raw breakpoint pointer.
7944 * win32-arm-low.c (the_low_target): Install NULL as
7945 supports_z_point_type.
7946 * win32-i386-low.c (i386_supports_z_point_type): New function.
7947 (i386_insert_point, i386_remove_point): Adjust to new interface.
7948 (the_low_target): Install i386_supports_z_point_type.
7949 * win32-low.c (win32_supports_z_point_type): New function.
7950 (win32_insert_point, win32_remove_point): Adjust to new interface.
7951 (win32_target_ops): Install win32_supports_z_point_type.
7952 * win32-low.h (struct win32_target_ops):
7953 <supports_z_point_type>: New method.
7954 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7955 instead of a char. Also take a raw breakpoint pointer.
7956
932539e3
PA
79572014-05-20 Pedro Alves <palves@redhat.com>
7958
7959 * mem-break.h: Include break-common.h.
7960 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7961 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7962 (Z_packet_to_target_hw_bp_type): New declaration.
7963 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7964 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7965 (Z_PACKET_ACCESS_WP): Delete macros.
7966 (Z_packet_to_hw_type): Delete function.
7967 * i386-low.h: Don't include break-common.h here.
7968 (Z_packet_to_hw_type): Delete declaration.
7969 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7970 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7971 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7972 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7973 * linux-aarch64-low.c: Don't include break-common.h here.
7974 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7975 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7976 (Z_packet_to_target_hw_bp_type): Delete function.
7977 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7978 function.
7979 (mips_insert_point, mips_remove_point): Use
7980 Z_packet_to_target_hw_bp_type.
7981
4ff0d3d8
PA
79822014-05-20 Pedro Alves <palves@redhat.com>
7983
7984 * linux-aarch64-low.c: Include break-common.h.
7985 (enum target_point_type): Delete.
7986 (Z_packet_to_point_type): Rename to ...
7987 (Z_packet_to_target_hw_bp_type): ... this, and return a
7988 target_hw_bp_type instead.
7989 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7990 instead of an enum target_point_type.
7991 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7992 breakpoint type.
7993 (aarch64_dr_state_insert_one_point)
7994 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7995 (aarch64_handle_aligned_watchpoint)
7996 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7997 Take an enum target_hw_bp_type instead of an enum
7998 target_point_type.
7999 (aarch64_supports_z_point_type): New function.
8000 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8001 use Z_packet_to_target_hw_bp_type.
8002
786dc519
JB
80032014-05-20 Joel Brobecker <brobecker@adacore.com>
8004
8005 * configure.ac: Only use -Werror by default when DEVELOPMENT
8006 is true.
8007 * configure: Regenerate.
8008
9e0aa64f
JK
80092014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8010
8011 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8012 * linux-x86-low.c (X86_64_USER_REGS): New.
8013 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8014
2b577b92
YQ
80152014-04-28 Yao Qi <yao@codesourcery.com>
8016
8017 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8018 name.
8019
94611da2
PA
80202014-04-25 Pedro Alves <palves@redhat.com>
8021
8022 PR server/16255
8023 * linux-low.c (linux_attach_fail_reason_string): New function.
8024 (linux_attach_lwp): Delete.
8025 (linux_attach_lwp_1): Rename to ...
8026 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8027 argument. Remove "initial" parameter. Return int instead of
8028 void. Don't error or warn here.
8029 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8030 failure to attach to the tgid. Call warning when failing to
8031 attach to an lwp.
8032 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8033 argument. Remove "initial" parameter. Return int instead of
8034 void. Don't error or warn here.
8035 (linux_attach_fail_reason_string): New declaration.
8036 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8037 interface change. Use linux_attach_fail_reason_string.
8038
01f9f808
MS
80392014-04-24 Michael Sturm <michael.sturm@mintel.com>
8040 Walfred Tedeschi <walfred.tedeschi@intel.com>
8041
8042 * Makefile.in: Added rules to handle new files
8043 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8044 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8045 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8046 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8047 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8048 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8049 x32-avx512-linux.o.
8050 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8051 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8052 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8053 i386/x32-avx512.xml.
8054 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8055 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8056 i386/x32-avx512-linux.xml.
8057 * i387-fp.c (num_avx512_k_registers): New constant for number
8058 of K registers.
8059 (num_avx512_zmmh_low_registers): New constant for number of
8060 lower ZMM registers (0-15).
8061 (num_avx512_zmmh_high_registers): New constant for number of
8062 higher ZMM registers (16-31).
8063 (num_avx512_ymmh_registers): New contant for number of higher
8064 YMM registers (ymm16-31 added by avx521 on x86_64).
8065 (num_avx512_xmm_registers): New constant for number of higher
8066 XMM registers (xmm16-31 added by AVX512 on x86_64).
8067 (struct i387_xsave): Add space for AVX512 registers.
8068 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8069 Add code to handle AVX512 registers.
8070 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8071 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8072 prototypei from generated file.
8073 (tdesc_amd64_avx512_linux): Likewise.
8074 (init_registers_x32_avx512_linux): Likewise.
8075 (tdesc_x32_avx512_linux): Likewise.
8076 (init_registers_i386_avx512_linux): Likewise.
8077 (tdesc_i386_avx512_linux): Likewise.
8078 (x86_64_regmap): Add AVX512 registers.
8079 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8080 mask.
8081 (initialize_low_arch): Add code to initialize AVX512 registers.
8082
51aa91f9
PA
80832014-04-23 Pedro Alves <palves@redhat.com>
8084
8085 * mem-break.c (find_gdb_breakpoint_at): Make static.
8086 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8087
a4165e94
PA
80882014-04-23 Pedro Alves <palves@redhat.com>
8089
8090 * i386-low.c: Don't include break-common.h here.
8091 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8092 prototype to take target_hw_bp_type as argument instead of a Z
8093 packet char.
8094 * i386-low.h: Include break-common.h here.
8095 (Z_packet_to_hw_type): Declare.
8096 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8097 prototypes.
8098 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8099 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8100 (x86_remove_point): Convert the packet number to a
8101 target_hw_bp_type before calling i386_low_remove_watchpoint.
8102 * win32-i386-low.c (i386_insert_point): Convert the packet number
8103 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8104 (i386_remove_point): Convert the packet number to a
8105 target_hw_bp_type before calling i386_low_remove_watchpoint.
8106
b8acf843
PA
81072014-04-23 Pedro Alves <palves@redhat.com>
8108
8109 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8110
d708bcd1
PA
81112014-04-10 Pedro Alves <palves@redhat.com>
8112
8113 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8114 Check if the condition or command is NULL before checking if the
8115 breakpoint is known. On success, return true.
8116 * mem-break.h (add_breakpoint_condition): Document return.
8117 (add_breakpoint_commands): Add describing comment.
8118 * server.c (skip_to_semicolon): New function.
8119 (process_point_options): Use it.
8120
2eec7d5b
PA
81212014-04-09 Pedro Alves <palves@redhat.com>
8122
8123 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8124 to lwpid_of.
8125
fa96cb38
PA
81262014-02-27 Pedro Alves <palves@redhat.com>
8127
8128 PR 12702
8129 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8130 macros.
8131 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8132 output.
8133 (last_thread_of_process_p): Take a PID argument instead of a
8134 thread pointer.
8135 (linux_wait_for_lwp): Delete.
8136 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8137 functions.
8138 (linux_low_filter_event): New function, party factored out from
8139 linux_wait_for_event.
8140 (linux_wait_for_event): Rename to ...
8141 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8142 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8143 sigsuspend. Check for zombie leaders.
8144 (linux_wait_for_event): Reimplement as wrapper around
8145 linux_wait_for_event_filtered.
8146 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8147 a normal or signal exit is seen, it's the whole process exiting.
8148 (wait_for_sigstop): No longer a for_each_inferior callback.
8149 Rewrite on top of linux_wait_for_event_filtered.
8150 (stop_all_lwps): Call wait_for_sigstop directly.
8151 * server.c (resume, handle_target_event): Handle
8152 TARGET_WAITKIND_NO_RESUMED.
8153
d763de10
JB
81542014-02-26 Joel Brobecker <brobecker@adacore.com>
8155
8156 * win32-low.c (psapi_get_dll_name,
8157 * win32_CreateToolhelp32Snapshot): Delete.
8158 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8159 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8160 Delete.
8161 (handle_load_dll): Add function description.
8162 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8163
850a0f76
JB
81642014-02-26 Joel Brobecker <brobecker@adacore.com>
8165
8166 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8167 Add comment.
8168 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8169 base address when calling win32_add_one_solib.
8170 (handle_load_dll): Delete local variable load_addr.
8171 Remove 0x1000 offset applied to DLL base address when calling
8172 win32_add_one_solib.
8173 (handle_unload_dll): Add comment.
8174
f25b3fc3
JB
81752014-02-26 Joel Brobecker <brobecker@adacore.com>
8176
8177 * win32-low.c (win32_add_all_dlls): Renames
8178 win32_ensure_ntdll_loaded. Rewrite function documentation.
8179 Adjust implementation to always load all DLLs.
8180 Add 0x1000 offset to DLL base address when calling
8181 win32_add_one_solib.
8182 (child_initialization_done): New static global.
8183 (do_initial_child_stuff): Set child_initialization_done to
8184 zero during child initialization, and 1 after. Replace call
8185 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8186 Add comment.
8187 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8188 (handle_unload_dll): Add function documentation.
8189 (get_child_debug_event): Ignore load and unload DLL events
8190 during child initialization.
8191
d86d4aaf
DE
81922014-02-20 Doug Evans <dje@google.com>
8193
3bc32da3 8194 Remove global all_lwps.
d86d4aaf
DE
8195 * inferiors.h (ptid_of): Move here from linux-low.h.
8196 (pid_of, lwpid_of): Ditto.
8197 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8198 parameter is a struct thread_info * now.
8199 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8200 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8201 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8202 directly.
8203 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8204 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8205 * linux-arm-low.c (update_registers_callback): Update, "entry"
8206 parameter is a struct thread_info * now.
8207 Fetch lwpid from current_inferior directly.
8208 (arm_insert_point): Pass &all_threads to find_inferior instead of
8209 &all_lwps.
8210 (arm_remove_point): Ditto.
8211 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8212 (arm_prepare_to_resume): Fetch pid from thread.
8213 (arm_read_description): Fetch lwpid from current_inferior directly.
8214 * linux-low.c (all_lwps): Delete.
8215 (delete_lwp): Delete call to remove_inferior.
8216 (handle_extended_wait): Fetch lwpid from thread.
8217 (add_lwp): Don't set lwp->entry.id. Remove call to
8218 add_inferior_to_list.
8219 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8220 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8221 (kill_one_lwp_callback): Ditto.
8222 (linux_kill): Don't dereference NULL pointer.
8223 Fetch ptid,lwpid from thread.
8224 (get_detach_signal): Fetch ptid from thread.
8225 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8226 Simplify call to regcache_invalidate_thread.
8227 (delete_lwp_callback): Update, "entry" parameter is a
8228 struct thread_info * now. Fetch pid from thread.
8229 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8230 (status_pending_p_callback): Update, "entry" parameter is a
8231 struct thread_info * now. Fetch ptid from thread.
8232 (find_lwp_pid): Update, "entry" parameter is a
8233 struct thread_info * now.
8234 (linux_wait_for_lwp): Fetch pid from thread.
8235 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8236 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8237 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8238 (dequeue_one_deferred_signal): Ditto.
8239 (cancel_breakpoint): Fetch ptid from current_inferior.
8240 (linux_wait_for_event): Pass &all_threads to find_inferior,
8241 not &all_lwps. Fetch ptid, lwpid from thread.
8242 (count_events_callback): Update, "entry" parameter is a
8243 struct thread_info * now.
8244 (select_singlestep_lwp_callback): Ditto.
8245 (select_event_lwp_callback): Ditto.
8246 (cancel_breakpoints_callback): Ditto.
8247 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8248 not &all_lwps.
8249 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8250 (unsuspend_one_lwp): Update, "entry" parameter is a
8251 struct thread_info * now.
8252 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8253 not &all_lwps.
8254 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8255 Fetch lwpid from thread, not lwp.
8256 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8257 Pass &all_threads to find_inferior, not &all_lwps.
8258 (send_sigstop): Fetch lwpid from thread, not lwp.
8259 (send_sigstop_callback): Update, "entry" parameter is a
8260 struct thread_info * now.
8261 (suspend_and_send_sigstop_callback): Ditto.
8262 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8263 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8264 struct thread_info * now.
8265 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8266 from thread, lwp.
8267 (lwp_running): Update, "entry" parameter is a
8268 struct thread_info * now.
8269 (stop_all_lwps): Fetch ptid from thread.
8270 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8271 (linux_resume_one_lwp): Fetch lwpid from thread.
8272 (linux_set_resume_request): Update, "entry" parameter is a
8273 struct thread_info * now. Fetch pid, lwpid from thread.
8274 (resume_status_pending_p): Update, "entry" parameter is a
8275 struct thread_info * now.
8276 (need_step_over_p): Ditto. Fetch lwpid from thread.
8277 (start_step_over): Fetch lwpid from thread.
8278 (linux_resume_one_thread): Update, "entry" parameter is a
8279 struct thread_info * now. Fetch lwpid from thread.
8280 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8281 (proceed_one_lwp): Update, "entry" parameter is a
8282 struct thread_info * now. Fetch lwpid from thread.
8283 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8284 struct thread_info * now.
8285 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8286 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8287 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8288 directly.
8289 (regsets_store_inferior_registers): Ditto.
8290 (fetch_register, store_register): Ditto.
8291 (linux_read_memory, linux_write_memory): Ditto.
8292 (linux_request_interrupt): Ditto.
8293 (linux_read_auxv): Ditto.
8294 (linux_xfer_siginfo): Ditto.
8295 (linux_qxfer_spu): Ditto.
8296 (linux_qxfer_libraries_svr4): Ditto.
8297 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8298 moved to inferiors.h.
8299 (get_lwp): Delete.
8300 (get_thread_lwp): Update.
8301 (struct lwp_info): Delete member "entry". Simplify comment for
8302 member "thread".
8303 (all_lwps): Delete.
8304 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8305 current_inferior directly.
8306 (update_watch_registers_callback): Update, "entry" parameter is a
8307 struct thread_info * now. Fetch pid from thread.
8308 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8309 (mips_insert_point): Fetch lwpid from current_inferior.
8310 Pass &all_threads to find_inferior, not &all_lwps.
8311 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8312 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8313 directly.
8314 (mips_stopped_data_address): Ditto.
8315 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8316 directly.
8317 * linux-tile-low.c (tile_arch_setup): Ditto.
8318 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8319 (update_debug_registers_callback): Update, "entry" parameter is a
8320 struct thread_info * now. Fetch pid from thread.
8321 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8322 Pass &all_threads to find_inferior, not &all_lwps.
8323 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8324 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8325 Pass &all_threads to find_inferior, not &all_lwps.
8326 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8327 (i386_dr_low_get_status): Ditto.
8328 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8329 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8330 (x86_linux_read_description): Ditto.
8331 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8332
3b8361aa
DE
83332014-02-20 Doug Evans <dje@google.com>
8334
8335 * inferiors.c (get_first_inferior): Fix buglet.
8336
f7667f0d
DE
83372014-02-19 Doug Evans <dje@google.com>
8338
8339 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8340 * inferiors.c (add_thread): Change result type to struct thread_info *.
8341 All callers updated.
8342 (add_lwp): Call add_thread here instead of in callers.
8343 All callers updated.
8344 * linux-low.h (get_lwp_thread): Rewrite.
8345 (struct lwp_info): New member "thread".
8346
b3312d80
DE
83472014-02-19 Doug Evans <dje@google.com>
8348
8349 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8350 All callers updated.
8351
ecc6f45c
DE
83522014-02-19 Doug Evans <dje@google.com>
8353
8354 * inferiors.c (add_thread): Fix whitespace.
8355
649ebbca
DE
83562014-02-19 Doug Evans <dje@google.com>
8357
8358 * dll.c (clear_dlls): Replace accessing list implemention details
8359 with API function.
8360 * gdbthread.h (get_first_thread): Declare.
8361 * inferiors.c (for_each_inferior_with_data): New function.
8362 (get_first_thread): New function.
8363 (find_thread_ptid): Simplify.
8364 (get_first_inferior): New function.
8365 (clear_list): Delete.
8366 (one_inferior_p): New function.
8367 (clear_inferior_list): New function.
8368 (clear_inferiors): Update.
8369 * inferiors.h (for_each_inferior_with_data): Declare.
8370 (clear_inferior_list): Declare.
8371 (one_inferior_p): Declare.
8372 (get_first_inferior): Declare.
8373 * linux-low.c (linux_wait_for_event): Replace accessing list
8374 implemention details with API function.
8375 * server.c (target_running): Ditto.
8376 (accumulate_file_name_length): New function.
8377 (emit_dll_description): New function.
8378 (handle_qxfer_libraries): Replace accessing list implemention
8379 details with API function.
8380 (handle_qxfer_threads_worker): New function.
8381 (handle_qxfer_threads_proper): Replace accessing list implemention
8382 details with API function.
8383 (handle_query): Ditto.
8384 (visit_actioned_threads_callback_ftype): New typedef.
8385 (visit_actioned_threads_data): New struct.
8386 (visit_actioned_threads): Rewrite to be find_inferior callback.
8387 (resume): Call find_inferior.
8388 (handle_status): Replace accessing list implemention
8389 details with API function.
8390 (process_serial_event): Replace accessing list implemention details
8391 with API function.
8392 * target.c (set_desired_inferior): Replace accessing list implemention
8393 details with API function.
8394 * tracepoint.c (same_process_p): New function.
8395 (gdb_agent_about_to_close): Replace accessing list implemention
8396 details with API function.
8397 * win32-low.c (child_delete_thread): Replace accessing list
8398 implemention details with API function.
8399 (match_dll_by_basename): New function.
8400 (dll_is_loaded_by_basename): New function.
8401 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8402 details call to dll_is_loaded_by_basename.
8403
80894984
DE
84042014-02-19 Doug Evans <dje@google.com>
8405
8406 * dll.h (struct dll_info): Add comment.
8407 * gdbthread.h (struct thread_info): Add comment.
8408 (current_ptid): Simplify.
8409 * inferiors.c (add_process): Update.
8410 (remove_process): Update.
8411 * inferiors.h (struct process_info): Rename member "head" to "entry".
8412 * linux-low.c (delete_lwp): Update.
8413 (add_lwp): Update.
8414 (last_thread_of_process_p): Update.
8415 (kill_one_lwp_callback, linux_kill): Update.
8416 (status_pending_p_callback): Update.
8417 (wait_for_sigstop): Update. Simplify read of ptid.
8418 (start_step_over): Update.
8419 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8420 (get_lwp_thread): Update.
8421 (struct lwp_info): Rename member "head" to "entry".
8422 * regcache.h (inferior_list_entry): Delete.
8423 * server.c (kill_inferior_callback): Update.
8424 (detach_or_kill_inferior_callback): Update.
8425 (print_started_pid): Update.
8426 (print_attached_pid): Update.
8427 (process_serial_event): Simplify read of ptid.
8428 * thread-db.c (thread_db_create_event): Update.
8429 (thread_db_get_tls_address): Update.
8430 * win32-low.c (current_inferior_ptid): Simplify.
8431
46917d26
TT
84322014-02-19 Tom Tromey <tromey@redhat.com>
8433
8434 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8435 argument.
8436 (target_supports_btrace): Update.
8437
0759a81e
YQ
84382014-02-14 Yao Qi <yao@codesourcery.com>
8439
8440 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8441 (rsp-low-ipa.o): New target.
8442
a7191e8b
TT
84432014-02-12 Tom Tromey <tromey@redhat.com>
8444
8445 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8446 convert_ascii_to_int.
8447 * regcache.c (registers_to_string): Likewise.
8448 * remote-utils.c (decode_M_packet): Likewise.
8449 * server.c (process_serial_event): Likewise.
8450
ff0e980e
TT
84512014-02-12 Tom Tromey <tromey@redhat.com>
8452
8453 * server.c (handle_query, handle_v_run): Use hex2bin, not
8454 unhexify.
8455 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8456
e9371aff
TT
84572014-02-12 Tom Tromey <tromey@redhat.com>
8458
8459 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8460 convert_int_to_ascii.
8461 * regcache.c (registers_to_string, collect_register_as_string):
8462 Likewise.
8463 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8464 Likewise.
8465 * server.c (process_serial_event): Likewise.
8466 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8467 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8468
971dc0b8
TT
84692014-02-12 Tom Tromey <tromey@redhat.com>
8470
8471 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8472 bin2hex, not hexify.
8473 * tracepoint.c (cmd_qtstatus): Likewise.
8474
0a822afb
TT
84752014-02-12 Tom Tromey <tromey@redhat.com>
8476
8477 * remote-utils.c (monitor_output): Pass explicit length to
8478 hexify.
8479
9c3d6531
TT
84802014-02-12 Tom Tromey <tromey@redhat.com>
8481
8482 * tracepoint.c: Include rsp-low.h.
8483 * server.c: Include rsp-low.h.
8484 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8485 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8486 declare.
8487 * remote-utils.c: Include rsp-low.h.
8488 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8489 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8490 (convert_int_to_ascii, convert_ascii_to_int): Move to
8491 common/rsp-low.c.
8492 * regcache.c: Include rsp-low.h.
8493 * ax.c: Include rsp-low.h.
8494 * Makefile.in (SFILES): Add common/rsp-low.c.
8495 (OBS): Add rsp-low.o.
8496 (rsp-low.o): New target.
8497
01fd3ea5
TT
84982014-02-12 Tom Tromey <tromey@redhat.com>
8499
8500 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8501 Include print-utils.h.
8502 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8503 (plongest, thirty_two, phex_nz): Remove.
8504 * Makefile.in (SFILES): Add common/print-utils.c.
8505 (OBS): Add print-utils.o.
8506 (print-utils-ipa.o): New target.
8507 (print-utils.o): New target.
8508 (IPA_OBJS): Add print-utils-ipa.o.
8509
e99dc820
TT
85102014-02-06 Tom Tromey <tromey@redhat.com>
8511
8512 * Makefile.in (SFILES): Fix indentation.
8513
ee1e2d4f
DE
85142014-02-05 Doug Evans <dje@google.com>
8515
8516 * linux-low.c (linux_wait_for_event): Improve comment.
8517 (linux_wait_1): Keep current_inferior in sync with event_child.
8518
f5a02773
DE
85192014-01-22 Doug Evans <dje@google.com>
8520
8521 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8522
87ce2a04
DE
85232014-01-22 Doug Evans <dje@google.com>
8524
8525 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8526 * configure: Regenerate.
8527 * config.in: Regenerate.
8528 * Makefile.in (SFILES): Add debug.c.
8529 (OBS): Add debug.o.
8530 * debug.c: New file.
8531 * debug.h: New file.
8532 * linux-aarch64-low.c (*): Update all debugging printfs to use
8533 debug_printf instead of fprintf.
8534 * linux-arm-low.c (*): Ditto.
8535 * linux-cris-low.c (*): Ditto.
8536 * linux-crisv32-low.c (*): Ditto.
8537 * linux-m32r-low.c (*): Ditto.
8538 * linux-sparc-low.c (*): Ditto.
8539 * linux-x86.c (*): Ditto.
8540 * linux-low.c (*): Ditto.
8541 (linux_wait_1): Add calls to debug_enter, debug_exit.
8542 (linux_wait): Remove redundant debugging printf.
8543 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8544 (linux_resume, unstop_all_lwps): Ditto.
8545 * mem-break.c (*): Update all debugging printfs to use
8546 debug_printf instead of fprintf.
8547 * remote-utils.c (*): Ditto.
8548 * thread-db.c (*): Ditto.
8549 * server.c #include <ctype.h>, "gdb_vecs.h".
8550 (debug_threads): Moved to debug.c.
8551 (*): Update all debugging printfs to use debug_printf instead of
8552 fprintf.
8553 (start_inferior): Replace call to fflush with call to debug_flush.
8554 (monitor_show_help): Mention set debug-format.
8555 (parse_debug_format_options): New function.
8556 (handle_monitor_command): Handle "monitor set debug-format".
8557 (gdbserver_usage): Mention --debug-format.
8558 (main): Parse --debug-format.
8559 * server.h (debug_threads): Declaration moved to debug.h.
8560 #include "debug.h".
8561 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8562 trace_debug_1 that uses debug_printf.
8563 (tracepoint_look_up_symbols): Update all debugging printfs to use
8564 debug_printf instead of fprintf.
8565
e671835b
BS
85662014-01-20 Baruch Siach <baruch@tkos.co.il>
8567
8568 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8569 sys/ptrace.h.
8570
b5737fa9
PA
85712014-01-17 Pedro Alves <palves@redhat.com>
8572
ea38d2a9 8573 PR build/16445
c7faa97a
PA
8574 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8575 defined after including gdb_proc_service.h.
b5737fa9 8576
40ed484e
DE
85772014-01-16 Doug Evans <dje@google.com>
8578
8579 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8580 (match_dll): Use it.
8581
969c39fb
MM
85822014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8583
8584 * target.h (target_ops) <read_btrace>: Change parameters and
8585 return type to allow error reporting.
8586 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8587 trace reading errors on.
8588 * linux-low.c (linux_low_read_btrace): Pass trace reading
8589 errors on.
8590 (linux_low_disable_btrace): New.
8591
ab7f45ba
DE
85922014-01-15 Doug Evans <dje@google.com>
8593
8594 * inferiors.c (thread_id_to_gdb_id): Delete.
8595 * inferiors.h (thread_id_to_gdb_id): Delete.
8596
66af0f44
EZ
85972014-01-13 Eli Zaretskii <eliz@gnu.org>
8598
8599 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8600 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8601 versions.
8602
9939e131
PA
86032014-01-08 Pedro Alves <palves@redhat.com>
8604
8605 * server.c (handle_status): Don't discard previous queued stop
8606 replies or thread's pending status here.
8607 (main) <disconnection>: Do it here instead.
8608
b7ea362b
PA
86092014-01-08 Pedro Alves <palves@redhat.com>
8610
8611 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8612 * server.c (visit_actioned_threads, handle_pending_status): New
8613 function.
8614 (handle_v_cont): Factor out parts to ...
8615 (resume): ... this new function. If in all-stop, and a thread
8616 being resumed has a pending status, report it without actually
8617 resuming.
8618 (myresume): Adjust to use the new 'resume' function.
8619 (clear_pending_status_callback, set_pending_status_callback)
8620 (find_status_pending_thread_callback): New functions.
8621 (handle_status): Handle the case of multiple threads having
8622 interesting statuses to report. Report threads' real last signal
8623 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8624 with an interesting thread to report the status for, instead of
8625 always reporting the status of the first thread.
8626
28498c42
JB
86272014-01-01 Joel Brobecker <brobecker@adacore.com>
8628
8629 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8630 * gdbreplay.c (gdbreplay_version): Likewise.
8631
f45c82da
YZ
86322013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8633
8634 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8635 iov.iov_len with the real length in use.
8636
379a5e2d
JB
86372013-12-13 Joel Brobecker <brobecker@adacore.com>
8638
8639 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8640 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8641 for all targets that use win32-low.c.
8642 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8643 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8644
4210d83e
PA
86452013-12-13 Pedro Alves <palves@redhat.com>
8646
8647 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8648 if equal to TARGET_WAITKIND_LOADED.
8649 * win32-low.c (cached_status): New static global.
8650 (win32_wait): Add declaration.
8651 (do_initial_child_stuff): Flush all initial pending debug events
8652 up to the initial breakpoint.
8653 (win32_wait): If CACHED_STATUS was set, return that instead
8654 of doing a real wait. Remove the code resuming the execution
8655 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8656 during the initial phase. Also remove the code changing
8657 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8658 TARGET_WAITKIND_STOPPED.
8659
e7f0d979
YQ
86602013-12-11 Yao Qi <yao@codesourcery.com>
8661
8662 * notif.c (handle_notif_ack): Return 0 if no notification
8663 matches.
8664
ebcf782c
DE
86652013-11-20 Doug Evans <dje@google.com>
8666
8667 * linux-low.c (linux_set_resume_request): Fix comment.
8668
20ad9378
DE
86692013-11-20 Doug Evans <dje@google.com>
8670
8671 * linux-low.c (resume_status_pending_p): Tweak comment.
8672
a196ebeb
WT
86732013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8674
8675 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8676 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8677 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8678 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8679 (srv_amd64_regobj): Add amd64-mpx.o.
8680 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8681 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8682 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8683 * i387-fp.c (num_pl_bnd_register) Added constant.
8684 (num_pl_bnd_cfg_registers) Added constant.
8685 (struct i387_xsave) Added reserved area and MPX fields.
8686 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8687 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8688 function.
8689 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8690 (init_registers_amd64_mpx_linux): Declare new function.
8691 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8692 (x86_64_regmap): Add MPX registers.
8693 (x86_linux_read_description): Add MPX case.
8694 (initialize_low_arch): Initialize MPX targets.
8695
0080a2f6
TT
86962013-11-18 Tom Tromey <tromey@redhat.com>
8697
8698 * configure: Rebuild.
8699 * configure.ac: Don't check for stdlib.h.
8700 * gdbreplay.c: Unconditionally include stdlib.h.
8701
2978b111
TT
87022013-11-18 Tom Tromey <tromey@redhat.com>
8703
8704 * config.in: Rebuild.
8705 * configure: Rebuild.
8706 * configure.ac: Don't use AC_HEADER_DIRENT.
8707
a3d08894
TT
87082013-11-18 Tom Tromey <tromey@redhat.com>
8709
8710 * server.h: Don't check HAVE_STRING_H.
8711 * gdbreplay.c: Don't check HAVE_STRING_H.
8712 * configure: Rebuild.
8713
0a5dd17d
TT
87142013-11-18 Tom Tromey <tromey@redhat.com>
8715
8716 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8717 LIBGNU.
8718
1bd2f0ba
TT
87192013-11-08 Tom Tromey <tromey@redhat.com>
8720
8721 * configure, config.in: Rebuild.
8722 * configure.ac: Remove unused configury.
8723
3266f10b
TT
87242013-11-08 Tom Tromey <tromey@redhat.com>
8725
8726 * acinclude.m4: Include common.m4, codeset.m4.
8727 * configure, config.in: Rebuild.
8728 * configure.ac: Use GDB_AC_COMMON.
8729
6682d959
AA
87302013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8731
8732 * linux-s390-low.c (HWCAP_S390_TE): New define.
8733 (s390_arch_setup): Consider the TE field in the HWCAP for
8734 determining 'have_regset_tdb'.
8735
fd0a4d76
SDJ
87362013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8737
8738 PR gdb/16014
8739 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8740 call to sizeof.
8741
1a3d890b
PA
87422013-10-02 Pedro Alves <palves@redhat.com>
8743
8744 * server.c (process_serial_event): Don't output "GDBserver
8745 exiting" if GDB is connected through stdio.
8746 * target.c (mywait): Likewise, be silent if GDB is connected
8747 through stdio.
8748
97ad4581
JB
87492013-10-01 Joel Brobecker <brobecker@adacore.com>
8750
8751 * lynx-low.c (lynx_add_threads_after_attach): New function.
8752 (lynx_attach): Remove call to add_thread. Add call to
8753 lynx_add_threads_after_attach instead.
8754
5b4e221c
MF
87552013-09-28 Mike Frysinger <vapier@gentoo.org>
8756
8757 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8758 * config.in, configure: Regenerated.
8759
ee47b2f8
YQ
87602013-09-18 Yao Qi <yao@codesourcery.com>
8761
8762 PR server/15959
8763 * server.c (start_inferior): Clear 'resume_info'.
8764
d6707650 87652013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8766
d6707650
JW
8767 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8768 for each register.
8769
9243dd0e 87702013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8771
9243dd0e
JW
8772 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8773 linux-tile-low.o to srv_tgtobj.
8774
c623a6ef
WN
87752013-09-16 Will Newton <will.newton@linaro.org>
8776
8777 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8778 out regs.
8779
fb71d39e
PA
87802013-09-06 Pedro Alves <palves@redhat.com>
8781
8782 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8783 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8784 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8785 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8786 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8787 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8788
8e7e9910
PA
87892013-09-06 Pedro Alves <palves@redhat.com>
8790
8791 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8792 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8793
7c3a12ca
PA
87942013-09-06 Pedro Alves <palves@redhat.com>
8795
8796 * linux-amd64-ipa.c: Include tracepoint.h.
8797 * linux-i386-ipa.c: Include tracepoint.h.
8798
8eb3d7b6
RW
87992013-09-06 Ricard Wanderlof <ricardw@axis.com>
8800
8801 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8802 (ps_get_thread_area): New function.
8803
eddddb9d
RW
88042013-09-06 Ricard Wanderlof <ricardw@axis.com>
8805
8806 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8807 (initialize_low_arch): Call init_registers_crisv32 rather than
8808 init_register_crisv32.
8809
533b0600
PA
88102013-09-05 Pedro Alves <palves@redhat.com>
8811
8812 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8813 to ...
8814 * hostio.h: ... this new file.
8815 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8816 win32-low.c: Include hostio.h.
8817
0ce3d3b5
PA
88182013-09-05 Pedro Alves <palves@redhat.com>
8819
8820 * server.h (gdb_client_data, handler_func, callback_handler_func)
8821 (delete_file_handler, add_file_handler, append_callback_event)
8822 (delete_callback_event, start_event_loop, initialize_event_loop):
8823 Move to event-loop.h and include it.
8824 * event-loop.h: New file.
8825
799cdc37
PA
88262013-09-05 Pedro Alves <palves@redhat.com>
8827
8828 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8829 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8830 (loaded_dll, unloaded_dll): Move to ...
8831 * dll.h: ... this new file.
8832 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8833
6a6bbd9d
PA
88342013-09-05 Pedro Alves <palves@redhat.com>
8835
8836 * server.h (current_process, get_thread_process, all_processes)
8837 (add_inferior_to_list, for_each_inferior, current_inferior)
8838 (remove_inferior, add_process, remove_process, find_process_pid)
8839 (have_started_inferiors_p, have_attached_inferiors_p)
8840 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8841 (clear_inferiors, find_inferior, find_inferior_id)
8842 (inferior_target_data, set_inferior_target_data)
8843 (inferior_regcache_data, set_inferior_regcache_data): Move to
8844 inferiors.h, and include it.
8845 * inferiors.h: New file.
8846
f699aaba
PA
88472013-09-05 Pedro Alves <palves@redhat.com>
8848
8849 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8850 Move ...
72f4393d 8851 * ax.h: ... here.
f699aaba 8852
c144c7a0
PA
88532013-09-05 Pedro Alves <palves@redhat.com>
8854
8855 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8856 tracepoint.h.
8857 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8858 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8859 (handle_tracepoint_general_set, handle_tracepoint_query)
8860 (tracepoint_finished_step, tracepoint_was_hit)
8861 (release_while_stepping_state_list, current_traceframe)
8862 (in_readonly_region, traceframe_read_mem)
8863 (fetch_traceframe_registers, traceframe_read_sdata)
8864 (traceframe_read_info, struct fast_tpoint_collect_status)
8865 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8866 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8867 (supply_fast_tracepoint_registers)
8868 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8869 (ipa_tdesc, claim_trampoline_space)
8870 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8871 (agent_mem_read, agent_get_trace_state_variable_value)
8872 (agent_set_trace_state_variable_value, agent_tsv_read)
8873 (agent_mem_read_string, get_raw_reg_func_addr)
8874 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8875 * tracepoint.h: ... this new file.
8876
ff42e6ab
PA
88772013-09-05 Pedro Alves <palves@redhat.com>
8878
8879 * server.h (perror_with_name, error, fatal, warning, paddress)
8880 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8881 include it.
8882 * utils.h: New file.
8883
541af0f4
PA
88842013-09-05 Pedro Alves <palves@redhat.com>
8885
8886 * server.h (remote_debug, noack_mode, transport_is_reliable)
8887 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8888 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8889 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8890 (write_enn, initialize_async_io, enable_async_io)
8891 (disable_async_io, check_remote_input_interrupt_request)
8892 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8893 (dead_thread_notify, prepare_resume_reply)
8894 (decode_address_to_semicolon, decode_address, decode_m_packet)
8895 (decode_M_packet, decode_X_packet, decode_xfer_write)
8896 (decode_search_memory_packet, unhexify, hexify)
8897 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8898 (look_up_one_symbol, relocate_instruction)
8899 (monitor_output): Move to remote-utils.h, and include it.
8900 * remote-utils.h: New file.
8901
eebdf26b
PA
89022013-09-05 Pedro Alves <palves@redhat.com>
8903
8904 * server.h (_): Delete.
8905
3aafd2ff
PA
89062013-09-02 Pedro Alves <palves@redhat.com>
8907
8908 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8909 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8910 allocated.
8911 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8912
cee83bcb
PM
89132013-09-02 Pierre Muller <muller@sourceware.org>
8914
8915 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8916 or WriteProcessMemory complete successfully and handle
8917 ERROR_PARTIAL_COPY error.
8918
9a13b2fa
PA
89192013-09-02 Pedro Alves <palves@redhat.com>
8920
8921 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8922 error instead of EIO.
8923
602e3198
JK
89242013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8925
8926 PR server/15604
8927 * linux-low.c: Include filestuff.h.
8928 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8929 * lynx-low.c: Include filestuff.h.
8930 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8931 * server.c: Include filestuff.h.
8932 (main): Call notice_open_fds.
8933 * spu-low.c: Include filestuff.h.
8934 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8935
96d7229d
LM
89362013-08-22 Luis Machado <lgustavo@codesourcery.com>
8937
8938 * Makefile.in: Explain why ../target and ../nat are not
8939 listed as include file search paths.
8940 (linux-waitpid.o): New object file rule.
8941 * configure.srv (srv_native_linux_obj): New variable.
8942 Replace all occurrences of linux native object files with
8943 $srv_native_linux_obj.
8944 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8945 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8946 (linux_enable_event_reporting): Remove declaration.
8947 (my_waitpid): Moved to common/linux-waitpid.c.
8948 (linux_wait_for_event): Pass ptid when calling
8949 linux_enable_event_reporting.
8950 (linux_supports_tracefork_flag): Remove.
8951 (linux_enable_event_reporting): Likewise.
8952 (linux_tracefork_grandchild): Remove.
8953 (STACK_SIZE): Moved to common/linux-ptrace.c.
8954 (linux_tracefork_child): Remove.
8955 (linux_test_for_tracefork): Remove.
8956 (linux_look_up_symbols): Call linux_supports_traceclone.
8957 (initialize_low): Remove call to linux_test_for_tracefork.
8958 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8959 common/linux-ptrace.h.
8960 (PTRACE_TYPE_ARG4): Likewise.
8961 Include linux-ptrace.h.
8962
32940073
PA
89632013-08-21 Pedro Alves <palves@redhat.com>
8964
8965 * config.in: Renegerate.
8966
33b60d58 89672013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8968
33b60d58
LM
8969 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8970 (SFILES): Remove $(srcdir)/common/target-common.c and
8971 add $(srcdir)/target/waitstatus.c.
8972 (OBS): Remove target-common.o and add waitstatus.o.
8973 (server_h): Remove $(srcdir)/../common/target-common.h and
8974 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8975 and $(srcdir)/../target/waitstatus.h.
8976 (target-common.o): Remove.
8977 (waitstatus.o): New target object file.
8978 * target.h: Do not include target-common.h and
8979 include target/resume.h, target/wait.h and
8980 target/waitstatus.h.
8981
b8e1b30e
LM
89822013-08-13 Luis Machado <lgustavo@codesourcery.com>
8983
8984 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8985 to PTRACE_TYPE_ARG3.
8986 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8987 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8988 PTRACE_TYPE_ARG4.
8989 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8990 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8991
7a60ad40
YQ
89922013-07-27 Jie Zhang <jie@codesourcery.com>
8993 Daniel Jacobowitz <dan@codesourcery.com>
8994 Yao Qi <yao@codesourcery.com>
8995
8996 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8997 (mips-linux-watch.o): New rule.
8998 (mips_linux_watch_h): New variable.
8999 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9000 srv_tgtobj.
9001 * linux-mips-low.c: Include mips-linux-watch.h.
9002 (struct arch_process_info, struct arch_lwp_info): New.
9003 (update_watch_registers_callback): New function.
9004 (mips_linux_new_process, mips_linux_new_thread) New functions.
9005 (mips_linux_prepare_to_resume, mips_insert_point): New
9006 functions.
9007 (mips_remove_point, mips_stopped_by_watchpoint): New
9008 functions.
9009 (rsp_bp_type_to_target_hw_bp_type): New function.
9010 (mips_stopped_data_address): New function.
9011 (the_low_target): Add watchpoint support functions.
9012
de6f69ad
YQ
90132013-07-27 Yao Qi <yao@codesourcery.com>
9014
9015 * i386-low.c: Include break-common.h.
9016 (enum target_hw_bp_type): Remove.
9017
3360c0bf
LM
90182013-07-24 Luis Machado <lgustavo@codesourcery.com>
9019
9020 * Makefile.in (SFILES): /common/target-common.c.
9021 (OBS): Add target-common.o.
9022 (server_h): Add $(srcdir)/../common/target-common.h.
9023 (target-common.o): New target.
9024 * server.c (queue_stop_reply_callback): Free
9025 status string after use.
9026 * target.c (target_waitstatus_to_string): Remove.
9027 * target.h: Include target-common.h.
9028 (resume_kind): Likewise.
9029 (target_waitkind): Likewise.
9030 (target_waitstatus): Likewise.
9031 (TARGET_WNOHANG): Likewise.
9032
bd885420
YQ
90332013-07-04 Yao Qi <yao@codesourcery.com>
9034
9035 * Makefile.in (host_alias): Use @host_noncanonical@.
9036 (target_alias): Use @target_noncanonical@.
9037 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9038 ACX_NONCANONICAL_HOST.
9039 * configure: Regenerated.
9040
9041 Revert:
9042 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9043
9044 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9045 * configure: Rebuild.
9046 * Makefile.in (version_host, version_target): Get from configure.
9047 (version.c): Use $(version_host) and $(version_target).
9048
17ef446e
PA
90492013-07-03 Pedro Alves <palves@redhat.com>
9050
9051 * Makefile.in (config.status): Depend on development.sh.
9052 * acinclude.m4: Include libmcheck.m4.
9053 * configure: Regenerate.
9054
7a9a7487
MG
90552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9056
9057 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9058 attribute inside the parentheses.
9059 (winapi_DebugSetProcessKillOnExit): Ditto.
9060 (winapi_DebugBreakProcess): Ditto.
9061 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9062
49b64de6
MG
90632013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9064
9065 * notif.h (notif_event): Add a dummy member to avoid compiler
9066 errors.
9067
d5749ee7
PA
90682013-07-01 Pedro Alves <palves@redhat.com>
9069
9070 * hostio.c (HOSTIO_PATH_MAX): Define.
9071 (require_filename, handle_open, handle_unlink, handle_readlink):
9072 Use it.
9073
d8d2a3ee
PA
90742013-07-01 Pedro Alves <palves@redhat.com>
9075
9076 * server.h: Include "pathmax.h".
9077 * linux-low.c: Don't include sys/param.h.
9078 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9079 MAXPATHLEN.
9080 * win32-low.c: Don't include sys/param.h.
9081 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9082
bc7dea8d
PA
90832013-07-01 Pedro Alves <palves@redhat.com>
9084
9085 * event-loop.c: Don't check HAVE_UNISTD_H before including
9086 <unistd.h>.
9087 * gdbreplay.c: Likewise.
9088 * remote-utils.c: Likewise.
9089 * server.c: Likewise.
9090 * configure.ac: Don't check for unistd.h.
9091 * configure: Regenerate.
9092
d6c2da54
TT
90932013-06-28 Tom Tromey <tromey@redhat.com>
9094
9095 * Makefile.in (version.c): Use version.in, not
9096 common/version.in.
9097
257b6bec
MG
90982013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9099
9100 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9101 * configure: Rebuild.
9102 * Makefile.in (version_host, version_target): Get from configure.
9103 (version.c): Use $(version_host) and $(version_target).
9104
86ebe149
DK
91052013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9106
9107 Fix trace-status to output user name without trailing colon.
9108 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9109
f30aa5af
DK
91102013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9111
9112 Fix trace-status to output proper start-time and stop-time.
9113 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9114 output start time and stop time in hex as gdb expects.
9115
28a93511
YQ
91162013-06-26 Pedro Alves <pedro@codesourcery.com>
9117
9118 * tracepoint.c (build_traceframe_info_xml): Output trace state
9119 variables present in the trace buffer.
9120
01208463
TT
91212013-06-24 Tom Tromey <tromey@redhat.com>
9122
9123 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9124 create-version.sh.
9125 (version.o): Remove.
9126 * gdbreplay.c: Include version.h.
9127 (version, host_name): Don't declare.
9128 * server.h: Include version.h.
9129 (version, host_name): Don't declare.
9130
760256f9
PA
91312013-06-12 Pedro Alves <palves@redhat.com>
9132
9133 * linux-x86-low.c (linux_is_elf64): Delete global.
9134 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9135 with local linux_pid_exe_is_elf_64_file use.
9136
030031ee
PA
91372013-06-11 Pedro Alves <palves@redhat.com>
9138
9139 * linux-low.c (regset_disabled, disable_regset): New functions.
9140 (regsets_fetch_inferior_registers)
9141 (regsets_store_inferior_registers): Use them.
9142 (initialize_regsets_info); Don't allocate the disabled_regsets
9143 array here.
9144 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9145 comment.
9146
5da6eb0a
PA
91472013-06-11 Pedro Alves <palves@redhat.com>
9148
9149 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9150 xmalloc.
9151
7e5aaa09
PA
91522013-06-11 Pedro Alves <palves@redhat.com>
9153
9154 * linux-x86-low.c (initialize_low_arch): Call
9155 init_registers_x32_avx_linux.
9156
d878444c
JK
91572013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9158
9159 Fix compatibility with Android Bionic.
9160 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9161 it is not empty.
9162
3aee8918
PA
91632013-06-07 Pedro Alves <palves@redhat.com>
9164
5f2b57b5 9165 PR server/14823
3aee8918
PA
9166 * Makefile.in (OBS): Add tdesc.o.
9167 (IPA_OBJS): Add tdesc-ipa.o.
9168 (tdesc-ipa.o): New rule.
9169 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9170 interface.
9171 * linux-low.c (new_inferior): Delete.
9172 (disabled_regsets, num_regsets): Delete.
9173 (linux_add_process): Adjust to set the new per-process
9174 new_inferior flag.
9175 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9176 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9177 was a stop. When calling arch_setup, switch the current inferior
9178 to the thread that got an event.
9179 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9180 (regsets_fetch_inferior_registers)
9181 (regsets_store_inferior_registers): New regsets_info parameter.
9182 Adjust to use it.
9183 (linux_register_in_regsets): New regs_info parameter. Adjust to
9184 use it.
9185 (register_addr, fetch_register, store_register): New usrregs_info
9186 parameter. Adjust to use it.
9187 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9188 parameter regs_info. Adjust to use it.
9189 (linux_fetch_registers): Get the current inferior's regs_info, and
9190 adjust to use it.
9191 (linux_store_registers): Ditto.
9192 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9193 (initialize_low): Don't initialize the target_regsets here. Call
9194 initialize_low_arch.
9195 * linux-low.h (target_regsets): Delete declaration.
9196 (struct regsets_info): New.
9197 (struct usrregs_info): New.
9198 (struct regs_info): New.
9199 (struct process_info_private) <new_inferior>: New field.
9200 (struct linux_target_ops): Delete the num_regs, regmap, and
9201 regset_bitmap fields. New field regs_info.
9202 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9203 * i387-fp.c (num_xmm_registers): Delete.
9204 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9205 calls to new interface.
9206 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9207 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9208 Infer the number of xmm registers from the regcache's target
9209 description.
9210 * i387-fp.h (num_xmm_registers): Delete.
9211 * inferiors.c (add_thread): Don't install the thread's regcache
9212 here.
9213 * proc-service.c (gregset_info): Fetch the current inferior's
9214 regs_info. Adjust to use it.
9215 * regcache.c: Include tdesc.h.
9216 (register_bytes, reg_defs, num_registers)
9217 (gdbserver_expedite_regs): Delete.
9218 (get_thread_regcache): If the thread doesn't have a regcache yet,
9219 create one, instead of aborting gdbserver.
9220 (regcache_invalidate_one): Rename to ...
9221 (regcache_invalidate_thread): ... this.
9222 (regcache_invalidate_one): New.
9223 (regcache_invalidate): Only invalidate registers of the current
9224 process.
9225 (init_register_cache): Add target_desc parameter, and use it.
9226 (new_register_cache): Ditto. Assert the target description has a
9227 non zero registers_size.
9228 (regcache_cpy): Add assertions. Adjust.
9229 (realloc_register_cache, set_register_cache): Delete.
9230 (registers_to_string, registers_from_string): Adjust.
9231 (find_register_by_name, find_regno, find_register_by_number)
9232 (register_cache_size): Add target_desc parameter, and use it.
9233 (free_register_cache_thread, free_register_cache_thread_one)
9234 (regcache_release, register_cache_size): New.
9235 (register_size): Add target_desc parameter, and use it.
9236 (register_data, supply_register, supply_register_zeroed)
9237 (supply_regblock, supply_register_by_name, collect_register)
9238 (collect_register_as_string, collect_register_by_name): Adjust.
9239 * regcache.h (struct target_desc): Forward declare.
9240 (struct regcache) <tdesc>: New field.
9241 (init_register_cache, new_register_cache): Add target_desc
9242 parameter.
9243 (regcache_invalidate_thread): Declare.
9244 (regcache_invalidate_one): Delete declaration.
9245 (regcache_release): Declare.
9246 (find_register_by_number, register_cache_size, register_size)
9247 (find_regno): Add target_desc parameter.
9248 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9249 declarations.
9250 * remote-utils.c: Include tdesc.h.
9251 (outreg, prepare_resume_reply): Adjust.
9252 * server.c: Include tdesc.h.
9253 (gdbserver_xmltarget): Delete declaration.
9254 (get_features_xml, process_serial_event): Adjust.
9255 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9256 declare.
9257 (struct process_info) <tdesc>: New field.
9258 (ipa_tdesc): Declare.
9259 * tdesc.c: New file.
9260 * tdesc.h: New file.
9261 * tracepoint.c: Include tdesc.h.
9262 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9263 (get_context_regcache): Adjust to pass ipa_tdesc down.
9264 (do_action_at_tracepoint): Adjust to get the register cache size
9265 from the context regcache's description.
9266 (traceframe_walk_blocks): Adjust to get the register cache size
9267 from the current trace frame's description.
9268 (traceframe_get_pc): Adjust to get current trace frame's
9269 description and pass it down.
9270 (gdb_collect): Adjust to get the register cache size from the
9271 IPA's description.
9272 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9273 (gdbserver_xmltarget): Delete.
9274 (initialize_low_tracepoint): Set the ipa's target description.
9275 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9276 (initialize_low_tracepoint): Set the ipa's target description.
9277 * linux-x86-low.c: Include tdesc.h.
9278 [__x86_64__] (is_64bit_tdesc): New.
9279 (ps_get_thread_area, x86_get_thread_area): Use it.
9280 (i386_cannot_store_register): Rename to ...
9281 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9282 (i386_cannot_fetch_register): Rename to ...
9283 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9284 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9285 to new interface.
9286 (target_regsets): Rename to ...
9287 (x86_regsets): ... this.
9288 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9289 interface.
9290 (x86_siginfo_fixup): Use is_64bit_tdesc.
9291 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9292 (tdesc_x32_avx_linux, tdesc_x32_linux)
9293 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9294 Declare.
9295 (x86_linux_update_xmltarget): Delete.
9296 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9297 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9298 (AMD64_LINUX_USER64_CS): New.
9299 (x86_linux_read_description): New, based on
9300 x86_linux_update_xmltarget.
9301 (same_process_callback): New.
9302 (x86_arch_setup_process_callback): New.
9303 (x86_linux_update_xmltarget): New.
9304 (x86_regsets_info): New.
9305 (amd64_linux_regs_info): New.
9306 (i386_linux_usrregs_info): New.
9307 (i386_linux_regs_info): New.
9308 (x86_linux_regs_info): New.
9309 (x86_arch_setup): Reimplement.
9310 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9311 (x86_emit_ops): Ditto.
9312 (the_low_target): Adjust. Install x86_linux_regs_info,
9313 x86_cannot_fetch_register, and x86_cannot_store_register.
9314 (initialize_low_arch): New.
9315 * linux-ia64-low.c (tdesc_ia64): Declare.
9316 (ia64_fetch_register): Adjust.
9317 (ia64_usrregs_info, regs_info): New globals.
9318 (ia64_regs_info): New function.
9319 (the_low_target): Adjust.
9320 (initialize_low_arch): New function.
9321 * linux-sparc-low.c (tdesc_sparc64): Declare.
9322 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9323 Adjust.
9324 (sparc_arch_setup): New function.
9325 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9326 (the_low_target): Adjust.
9327 (initialize_low_arch): New function.
9328 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9329 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9330 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9331 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9332 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9333 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9334 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9335 (tdesc_powerpc_isa205_vsx64l): Declare.
9336 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9337 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9338 (ppc_set_pc, ppc_get_hwcap): Adjust.
9339 (ppc_usrregs_info): Forward declare.
9340 (!__powerpc64__) ppc_regmap_adjusted: New global.
9341 (ppc_arch_setup): Adjust to the current process'es target
9342 description.
9343 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9344 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9345 (ppc_store_evrregset): Adjust.
9346 (target_regsets): Rename to ...
9347 (ppc_regsets): ... this, and make static.
9348 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9349 (ppc_regs_info): New function.
9350 (the_low_target): Adjust.
9351 (initialize_low_arch): New function.
9352 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9353 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9354 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9355 (tdesc_s390x_linux64v2): Declare.
9356 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9357 (s390_fill_gregset, s390_store_last_break): Adjust.
9358 (target_regsets): Rename to ...
9359 (s390_regsets): ... this, and make static.
9360 (s390_get_pc, s390_set_pc): Adjust.
9361 (s390_get_hwcap): New target_desc parameter, and use it.
9362 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9363 (s390_arch_setup): Adjust to set the current process'es target
9364 description. Don't adjust the regmap.
9365 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9366 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9367 (regs_info_3264): New globals.
9368 (s390_regs_info): New function.
9369 (the_low_target): Adjust.
9370 (initialize_low_arch): New function.
9371 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9372 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9373 [__mips64] (init_registers_mips_linux)
9374 (init_registers_mips_dsp_linux): Delete defines.
9375 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9376 (have_dsp): New global.
9377 (mips_read_description): New, based on mips_arch_setup.
9378 (mips_arch_setup): Reimplement.
9379 (get_usrregs_info): New function.
9380 (mips_cannot_fetch_register, mips_cannot_store_register)
9381 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9382 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9383 (target_regsets): Rename to ...
9384 (mips_regsets): ... this, and make static.
9385 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9386 (dsp_regs_info, regs_info): New globals.
9387 (mips_regs_info): New function.
9388 (the_low_target): Adjust.
9389 (initialize_low_arch): New function.
9390 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9391 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9392 Declare.
9393 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9394 (arm_read_description): New, with bits factored from
9395 arm_arch_setup.
9396 (arm_arch_setup): Reimplement.
9397 (target_regsets): Rename to ...
9398 (arm_regsets): ... this, and make static.
9399 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9400 (arm_regs_info): New function.
9401 (the_low_target): Adjust.
9402 (initialize_low_arch): New function.
9403 * linux-m68k-low.c (tdesc_m68k): Declare.
9404 (target_regsets): Rename to ...
9405 (m68k_regsets): ... this, and make static.
9406 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9407 (m68k_regs_info): New function.
9408 (m68k_arch_setup): New function.
9409 (the_low_target): Adjust.
9410 (initialize_low_arch): New function.
9411 * linux-sh-low.c (tdesc_sharch): Declare.
9412 (target_regsets): Rename to ...
9413 (sh_regsets): ... this, and make static.
9414 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9415 (sh_regs_info, sh_arch_setup): New functions.
9416 (the_low_target): Adjust.
9417 (initialize_low_arch): New function.
9418 * linux-bfin-low.c (tdesc_bfin): Declare.
9419 (bfin_arch_setup): New function.
9420 (bfin_usrregs_info, regs_info): New globals.
9421 (bfin_regs_info): New function.
9422 (the_low_target): Adjust.
9423 (initialize_low_arch): New function.
9424 * linux-cris-low.c (tdesc_cris): Declare.
9425 (cris_arch_setup): New function.
9426 (cris_usrregs_info, regs_info): New globals.
9427 (cris_regs_info): New function.
9428 (the_low_target): Adjust.
9429 (initialize_low_arch): New function.
9430 * linux-cris-low.c (tdesc_crisv32): Declare.
9431 (cris_arch_setup): New function.
9432 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9433 (cris_regs_info): New function.
9434 (the_low_target): Adjust.
9435 (initialize_low_arch): New function.
9436 * linux-m32r-low.c (tdesc_m32r): Declare.
9437 (m32r_arch_setup): New function.
9438 (m32r_usrregs_info, regs_info): New globals.
9439 (m32r_regs_info): Adjust.
9440 (initialize_low_arch): New function.
9441 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9442 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9443 (tic6x_usrregs_info): Forward declare.
9444 (tic6x_read_description): New function, based on ...
9445 (tic6x_arch_setup): ... this. Reimplement.
9446 (target_regsets): Rename to ...
9447 (tic6x_regsets): ... this, and make static.
9448 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9449 (tic6x_regs_info): New function.
9450 (the_low_target): Adjust.
9451 (initialize_low_arch): New function.
9452 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9453 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9454 (target_regsets): Rename to ...
9455 (xtensa_regsets): ... this, and make static.
9456 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9457 globals.
9458 (xtensa_arch_setup, xtensa_regs_info): New functions.
9459 (the_low_target): Adjust.
9460 (initialize_low_arch): New function.
9461 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9462 (nios2_arch_setup): Set the current process'es tdesc.
9463 (target_regsets): Rename to ...
9464 (nios2_regsets): ... this.
9465 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9466 (nios2_regs_info): New function.
9467 (the_low_target): Adjust.
9468 (initialize_low_arch): New function.
a261b8f5
PA
9469 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9470 (aarch64_arch_setup): Set the current process'es tdesc.
9471 (target_regsets): Rename to ...
9472 (aarch64_regsets): ... this.
9473 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9474 (aarch64_regs_info): New function.
9475 (the_low_target): Adjust.
9476 (initialize_low_arch): New function.
3aee8918
PA
9477 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9478 globals.
9479 (target_regsets): Rename to ...
9480 (tile_regsets): ... this.
9481 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9482 (tile_regs_info): New function.
9483 (tile_arch_setup): Set the current process'es tdesc.
9484 (the_low_target): Adjust.
9485 (initialize_low_arch): New function.
9486 * spu-low.c (tdesc_spu): Declare.
9487 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9488 * win32-arm-low.c (tdesc_arm): Declare.
9489 (arm_arch_setup): New function.
9490 (the_low_target): Install arm_arch_setup instead of
9491 init_registers_arm.
9492 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9493 (init_windows_x86): Rename to ...
9494 (i386_arch_setup): ... this. Set `win32_tdesc'.
9495 (the_low_target): Adjust.
9496 * win32-low.c (win32_tdesc): New global.
9497 (child_add_thread): Don't create the thread cache here.
9498 (do_initial_child_stuff): Set the new process'es tdesc.
9499 * win32-low.h (struct target_desc): Forward declare.
9500 (win32_tdesc): Declare.
9501 * lynx-i386-low.c (tdesc_i386): Declare global.
9502 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9503 * lynx-low.c (lynx_tdesc): New global.
9504 (lynx_add_process): Set the new process'es tdesc.
9505 * lynx-low.h (struct target_desc): Forward declare.
9506 (lynx_tdesc): Declare global.
9507 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9508 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9509 * nto-low.c (nto_tdesc): New global.
9510 (do_attach): Set the new process'es tdesc.
9511 * nto-low.h (struct target_desc): Forward declare.
9512 (nto_tdesc): Declare.
9513 * nto-x86-low.c (tdesc_i386): Declare.
9514 (nto_x86_arch_setup): Set `nto_tdesc'.
9515
b1fbec62
GB
95162013-06-04 Gary Benson <gbenson@redhat.com>
9517
9518 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9519 to qSupported response when appropriate.
9520 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9521 with nonzero-length annex.
9522 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9523 arguments supplied in annex.
9524
d1ec4ce7
DE
95252013-05-31 Doug Evans <dje@google.com>
9526
ac44adcb 9527 PR server/15594
d1ec4ce7
DE
9528 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9529 64 bits in 64-cross-32 environment.
9530
9b25f2d3
PA
95312013-05-28 Pedro Alves <palves@redhat.com>
9532
9533 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9534 (aarch64-without-fpu.c): Delete rule.
9535 * configure.srv (aarch64*-*-linux*): Remove references to
9536 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9537 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9538 declaration.
9539
6740dc9c
PA
95402013-05-24 Pedro Alves <palves@redhat.com>
9541
9542 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9543 instead of strchr/decode_address. Error if the range isn't split
9544 with a ','. Don't assume there's be a ':' in the action.
9545
c2d6af84
PA
95462013-05-23 Yao Qi <yao@codesourcery.com>
9547 Pedro Alves <palves@redhat.com>
9548
9549 * linux-low.c (lwp_in_step_range): New function.
9550 (linux_wait_1): If the thread was range stepping and stopped
9551 outside the stepping range, report the stop to GDB. Otherwise,
9552 continue stepping. Add range stepping debug output.
9553 (linux_set_resume_request): Copy the step range from the resume
9554 request to the lwp.
9555 (linux_supports_range_stepping): New.
9556 (linux_target_ops) <supports_range_stepping>: Set to
9557 linux_supports_range_stepping.
9558 * linux-low.h (struct linux_target_ops)
9559 <supports_range_stepping>: New field.
9560 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9561 * linux-x86-low.c (x86_supports_range_stepping): New.
9562 (the_low_target) <supports_range_stepping>: Set to
9563 x86_supports_range_stepping.
9564 * server.c (handle_v_cont): Handle 'r' action.
9565 (handle_v_requests): Append ";r" if the target supports range
9566 stepping.
9567 * target.h (struct thread_resume) <step_range_start,
9568 step_range_end>: New fields.
9569 (struct target_ops) <supports_range_stepping>:
9570 New field.
9571 (target_supports_range_stepping): New macro.
9572
58794e1a
JB
95732013-05-17 Joel Brobecker <brobecker@adacore.com>
9574
9575 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9576 confusion in comment.
9577
d631c5a7
JB
95782013-05-17 Joel Brobecker <brobecker@adacore.com>
9579
9580 * lynx-low.c (struct process_info_private): New type.
9581 (lynx_add_process): New function.
9582 (lynx_create_inferior, lynx_attach): Replace calls to
9583 add_process by calls to lynx_add_process.
9584 (lynx_resume): If PTID is null, then try using
9585 current_process()->private->last_wait_event_ptid.
9586 Add comments.
9587 (lynx_clear_inferiors): Delete. The contents of that function
9588 has been inlined in lynx_mourn;
9589 (lynx_wait_1): Save the ptid in the process's private data.
9590 (lynx_mourn): Free the process' private data. Replace call
9591 to lynx_clear_inferiors by call to clear_inferiors.
9592
96f7a20f
YQ
95932013-05-17 Yao Qi <yao@codesourcery.com>
9594
9595 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9596 the right place.
9597
db0dfaa0
LM
95982013-05-16 Luis Machado <lgustavo@codesourcery.com>
9599
9600 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9601 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9602 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9603 PT_TEXT_END_ADDR guards. Update comments.
9604 (linux_target_op) <read_offsets>: Conditionally define to
9605 linux_read_offsets if the target is UCLIBC and if it defines
9606 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9607
68f5f838
SL
96082013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9609 Andrew Jenner <andrew@codesourcery.com>
9610
9611 * Makefile.in (SFILES): Add linux-nios2-low.c.
9612 (clean): Add action to delete nios2-linux.c.
9613 (nios2-linux.c): New rule.
9614 * configure.srv: Add nios2*-*-linux*.
9615 * linux-nios2-low.c: New.
9616
1ebff1fd
HAQ
96172013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9618
9619 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9620
f6150862
HZ
96212013-04-25 Hui Zhu <hui@codesourcery.com>
9622
9623 PR gdb/15186
f6150862
HZ
9624 * ax.c (ax_printf): Add fflush.
9625
614c279d
TT
96262013-04-22 Tom Tromey <tromey@redhat.com>
9627
9628 * Makefile.in (SFILES): Add filestuff.c.
9629 (OBS): Add filestuff.o.
9630 (filestuff.o): New target.
9631 * config.in, configure: Rebuild.
9632 * configure.ac: Check for fdwalk, pipe2.
9633
7d4e5717
PA
96342013-04-17 Pedro Alves <palves@redhat.com>
9635
9636 * configure.ac (USE_THREAD_DB): Delete variable.
9637 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9638 Don't AC_SUBST USE_THREAD_DB.
9639 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9640 * config.in, configure: Regenerate.
9641
d5c93e41
PA
96422013-04-16 Pedro Alves <palves@redhat.com>
9643
9644 * linux-low.h (struct lwp_info) <thread_known>: Move under
9645 the USE_THREAD_DB #ifdef.
9646
04f5fe89
PA
96472013-04-16 Pedro Alves <palves@redhat.com>
9648
9649 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9650 (linux-low.o): Delete rule.
9651 * linux-low.h: Always include "gdb_thread_db.h" instead of
9652 conditionally including thread_db.h.
9653 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9654 HAVE_THREAD_DB_H.
9655
480b27bf
JK
96562013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9657
9658 * Makefile.in (install-only): Fix make install regression.
9659
43662968
JK
96602013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9661
9662 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9663 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9664 installation.
9665 * gdbserver.1: Remove.
9666
3e74e146
PA
96672013-03-22 Pedro Alves <palves@redhat.com>
9668
9669 * linux-low.c (handle_extended_wait): Don't call
9670 linux_enable_event_reporting.
9671
a8347a2a
TT
96722013-03-15 Tony Theodore <tonyt@logyst.com>
9673
9674 PR build/9098:
9675 * Makefile.in (SHELL): Use @SHELL@.
9676
eeb56fa7
SDJ
96772013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9678
9679 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9680 compiler warning.
9681
4fa7e2ff
JB
96822013-03-13 Joel Brobecker <brobecker@adacore.com>
9683
9684 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9685 Remove extraneous NULL element.
9686
8ddb1965
YQ
96872013-03-13 Yao Qi <yao@codesourcery.com>
9688
9689 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9690 'V' block in trace frame.
9691
9accd112
MM
96922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9693
9694 * target.h (struct target_ops): Add btrace ops.
9695 (target_supports_btrace): New macro.
9696 (target_enable_btrace): New macro.
9697 (target_disable_btrace): New macro.
9698 (target_read_btrace): New macro.
9699 * gdbthread.h (struct thread_info): Add btrace field.
9700 * server.c: Include btrace-common.h.
9701 (handle_btrace_general_set): New function.
9702 (handle_btrace_enable): New function.
9703 (handle_btrace_disable): New function.
9704 (handle_general_set): Call handle_btrace_general_set.
9705 (handle_qxfer_btrace): New function.
9706 (struct qxfer qxfer_packets[]): Add btrace entry.
9707 * inferiors.c (remove_thread): Disable btrace.
9708 * linux-low: Include linux-btrace.h.
9709 (linux_low_enable_btrace): New function.
9710 (linux_low_read_btrace): New function.
9711 (linux_target_ops): Add btrace ops.
9712 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9713 Add srv_linux_btrace=yes.
9714 (x86_64-*-linux*): Add linux-btrace.o.
9715 Add srv_linux_btrace=yes.
9716 * configure.ac: Define HAVE_LINUX_BTRACE.
9717 * config.in: Regenerated.
9718 * configure: Regenerated.
9719
5cc22e4c
MM
97202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9721
9722 * server.c (handle_qxfer): Preserve error message if -3 is
9723 returned.
9724 (qxfer): Document the -3 return value.
9725
7c97f91e
MM
97262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9727
9728 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9729 (linux_btrace_h): New variable.
9730 (linux-btrace.o): New rule.
9731
be9a119c 97322013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9733 Hafiz Abid Qadeer <abidh@codesourcery.com>
9734
9735 * tracepoint.c (trace_buffer_size): New global.
9736 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9737 (init_trace_buffer): Change to one-argument function. Allocate
9738 trace buffer memory.
9739 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9740 handle QTBuffer:size packet.
9741 (cmd_bigqtbuffer_size): New function.
9742 (initialize_tracepoint): Call init_trace_buffer with
9743 DEFAULT_TRACE_BUFFER_SIZE.
9744 * server.c (handle_query): Add QTBuffer:size in the
9745 supported packets.
9746
e64f7499
YQ
97472013-03-07 Yao Qi <yao@codesourcery.com>
9748
9749 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9750 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9751 of -1.
9752 (cmd_qtsp): Adjust condition. Do post increment.
9753 Set cur_action and cur_step_action back to 0.
9754
f0ae6fc3
PA
97552013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9756
9757 PR server/15236
9758 * linux-low.c (linux_write_memory): Return early success if LEN is
9759 zero.
9760
b5b0b0af
CV
97612013-03-05 Corinna Vinschen <vinschen@redhat.de>
9762
334ad4a8 9763 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9764
589bc927
TT
97652013-02-28 Tom Tromey <tromey@redhat.com>
9766
9767 * configure.ac: Invoke AC_SYS_LARGEFILE.
9768 * configure, config.in: Rebuild.
9769
dfe07582
CV
97702013-02-28 Corinna Vinschen <vinschen@redhat.com>
9771
9772 * win32-low.c: Throughout, fix format strings and casts of
9773 printf-like functions to avoid type related warnings on all
9774 platforms.
9775 (get_child_debug_event): Print dwDebugEventCode as hex since
9776 that's how it's usually documented.
9777
736cd585
YQ
97782013-02-28 Yao Qi <yao@codesourcery.com>
9779
9780 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9781 pulongest.
9782
e1f58301
JW
97832013-02-27 Jiong Wang <jiwang@tilera.com>
9784
9785 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9786 (reg-tilegx32.c): New rule.
9787 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9788 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9789 different register info initializer according to elf class.
9790 (init_registers_tilgx32): New function. The tilegx32 register info
9791 initializer.
9792 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9793 (tile_store_gregset): Likewise.
9794
d171ca78
YQ
97952013-02-27 Yao Qi <yao@codesourcery.com>
9796
9797 * server.c (process_point_options): Print debug message when
9798 debug_threads is true.
9799
282bbdf3
YQ
98002013-02-26 Yao Qi <yao@codesourcery.com>
9801
9802 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9803
aca22551
PA
98042013-02-19 Pedro Alves <palves@redhat.com>
9805 Kai Tietz <ktietz@redhat.com>
9806
9807 PR gdb/15161
9808
9809 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9810 instead of strtoul to extract address from packet.
9811 (process_serial_event) <'z'>: Likewise.
9812
4f3cee1c
YQ
98132013-02-18 Yao Qi <yao@codesourcery.com>
9814
9815 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9816
8e1d55a3
PA
98172013-02-14 Pedro Alves <palves@redhat.com>
9818
9819 Plug memory leak.
9820
9821 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9822 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9823
458820da
PA
98242013-02-14 Pedro Alves <palves@redhat.com>
9825
9826 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9827
baea0dae
PA
98282013-02-14 Pedro Alves <palves@redhat.com>
9829
9830 * tracepoint.c (save_string): Delete.
9831 (add_tracepoint_action): Use savestring instead of save_string.
9832
0b1afbb3
PA
98332013-02-12 Pedro Alves <palves@redhat.com>
9834
9835 * linux-xtensa-low.c: Ditto.
9836 * xtensa-xtregs.c: Ditto.
9837
8a4ac37e
PA
98382013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9839
9840 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9841 thread_db.
9842
148de6bb
MS
98432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9844
9845 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9846 aarch64_num_wp_regs and aarch64_num_bp_regs to
9847 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9848
55fac6e0
MS
98492013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9850
9851 * linux-aarch64-low.c (ps_get_thread_area): Replace
9852 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9853
176eb98c
MS
98542013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9855 Marcus Shawcroft <marcus.shawcroft@arm.com>
9856 Nigel Stephens <nigel.stephens@arm.com>
9857 Yufeng Zhang <yufeng.zhang@arm.com>
9858
9859 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9860 (aarch64.c, aarch64-without-fpu.c): New targets.
9861 * configure.srv (aarch64*-*-linux*): New.
9862 * linux-aarch64-low.c: New file.
9863
56f7af9c
MS
98642013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9865
43aaf8b6 9866 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9867 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9868 (dequeue_one_deferred_signal, linux_resume_one_thread)
9869 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9870 (linux_tracefork_grandchild, linux_test_for_tracefork)
9871 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9872 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9873 where the argument is 0.
9874
60f662b0
YQ
98752013-01-25 Yao Qi <yao@codesourcery.com>
9876
9877 * event-loop.c: Include "queue.h".
9878 (gdb_event_p): New typedef.
9879 (struct gdb_event) <next_event>: Remove.
9880 (event_queue): Change to QUEUE(gdb_event_p).
9881 (async_queue_event): Remove.
9882 (gdb_event_xfree): New.
9883 (initialize_event_loop): New.
9884 (process_event): Use API from QUEUE.
9885 (wait_for_event): Likewise.
9886 * server.c (main): Call initialize_event_loop.
9887 * server.h (initialize_event_loop): Declare.
9888
5ae4861a
YQ
98892013-01-18 Yao Qi <yao@codesourcery.com>
9890
9891 * ax.h (struct eval_agent_expr_context): New.
9892 (gdb_eval_agent_expr): Update declaration.
9893 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9894 TFRAME. Add new argument CTX.
9895 * server.h (struct eval_agent_expr_context): Declare.
9896 (agent_mem_read, agent_tsv_read): Update declaration.
9897 (agent_mem_read_string): Likewise.
9898 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9899 (add_traceframe_block): Add new argument TPOINT.
9900 Increase TPOINT->traceframe_usage.
9901 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9902 eval_tracepoint_agent_expr.
9903 (condition_true_at_tracepoint): Likewise.
9904 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9905 (agent_mem_read_string, agent_tsv_read): Likewise.
9906
85e00e85
YQ
99072013-01-16 Yao Qi <yao@codesourcery.com>
9908
9909 * linux-low.c (linux_resume_one_lwp): Don't check
9910 'lwp->bp_reinsert != 0'.
9911
4039cf45
JB
99122013-01-07 Joel Brobecker <brobecker@adacore.com>
9913 Pedro Alves <palves@redhat.com>
9914
9915 * lynx-low.c (ptrace_request_to_str): Define a temporary
9916 macro and use it to simplify this function's implementation.
9917
9044dee2
JB
99182013-01-07 Joel Brobecker <brobecker@adacore.com>
9919
9920 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9921 sets errno.
9922
e6352c8f
JB
99232013-01-07 Joel Brobecker <brobecker@adacore.com>
9924
9925 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9926
50681a27
JB
99272013-01-07 Joel Brobecker <brobecker@adacore.com>
9928
9929 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9930
3f6e77ef
JB
99312013-01-07 Joel Brobecker <brobecker@adacore.com>
9932
9933 * lynx-low.c (lynx_resume): Use the resume_info parameter
9934 to determine the ptid for the lynx_ptrace call, unless
9935 it is equal to minus_one_ptid, in which case we use the
9936 ptid of the current_inferior.
9937 (lynx_wait_1): After having received a thread create/exit
9938 event, resume the inferior's execution using the signaling
9939 thread's ptid, rather than the old ptid.
9940
7fda33ae
JB
99412013-01-07 Joel Brobecker <brobecker@adacore.com>
9942
9943 * lynx-low.c (lynx_resume): Delete variable ret.
9944
b9786c74
JB
99452013-01-01 Joel Brobecker <brobecker@adacore.com>
9946
9947 * gdbreplay.c (gdbreplay_version): Update copyright year.
9948 * server.c (gdbserver_version): Likewise.
9949
8b93d60f
JB
99502012-12-17 Joel Brobecker <brobecker@adacore.com>
9951
9952 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9953 new thread.
9954
037335a7
JB
99552012-12-17 Joel Brobecker <brobecker@adacore.com>
9956
9957 * lynx-low.c (ptrace_request_to_str): Add handling for
9958 PTRACE_GETTRACESIG.
9959
52d4cbd8
JB
99602012-12-17 Joel Brobecker <brobecker@adacore.com>
9961
9962 * lynx-low.c (lynx_attach): Delete variable new_process.
9963
ab8f6ca9
JB
99642012-12-17 Joel Brobecker <brobecker@adacore.com>
9965
9966 * lynx-low.c (lynx_create_inferior): Delete variable
9967 new_process.
9968
78cbc024
JB
99692012-12-17 Joel Brobecker <brobecker@adacore.com>
9970
9971 * lynx-low.c (ptrace_request_to_str): Do not handle
9972 PTRACE_GETTHREADLIST if this macro does not exist.
9973
14a00470
YQ
99742012-12-15 Yao Qi <yao@codesourcery.com>
9975
9976 * Makefile.in (OBS): Add notif.o.
9977 * notif.c, notif.h: New.
9978 * server.c: Include "notif.h".
9979 (struct vstop_notif) <next>: Remove.
9980 <base>: New field.
9981 (queue_stop_reply): Update.
9982 (push_event, send_next_stop_reply): Remove.
9983 (discard_queued_stop_replies): Update.
9984 (notif_stop): New variable.
9985 (handle_v_stopped): Remove.
9986 (handle_v_requests): Don't call handle_v_stopped. Call
9987 handle_ack_notif instead.
9988 (queue_stop_reply_callback): Call notif_event_enque instead
9989 of queue_stop_reply.
9990 (handle_status): Don't call send_next_stop_reply, call
9991 notif_write_event instead.
9992 (kill_inferior_callback): Likewise.
9993 (detach_or_kill_inferior_callback): Likewise.
9994 (main): Call initialize_notif.
9995 (process_serial_event): Call QUEUE_is_empty.
9996 (handle_target_event): Call notif_push instead of push event.
9997 * server.h (push_event): Remove declaration.
9998
61c125b9
TT
99992012-12-10 Tom Tromey <tromey@redhat.com>
10000
10001 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10002 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10003 macros.
10004 (.c.o): Rewrite.
10005 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10006 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10007 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10008 (amd64-linux-ipa.o, ax.o): Rewrite.
10009 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10010 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10011 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10012 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10013 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10014 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10015 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10016 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10017 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10018 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10019 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10020 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10021 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10022 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10023 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10024 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10025 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10026 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10027 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10028 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10029 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10030 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10031 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10032 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10033 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10034 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10035 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10036 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10037 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10038 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10039 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10040 (reg-tilegx.o): Remove.
10041 (all_object_files): New macro.
10042 Include .deps files.
10043 * aclocal.m4, configure: Rebuild.
10044 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10045 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10046 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10047
e90e9ad9
TT
100482012-12-05 Tom Tromey <tromey@redhat.com>
10049
10050 PR gdb/14917:
10051 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10052
02d403bf 100532012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10054
10055 * configure.ac: Check for linux/perf_event.h.
10056 * config.in: Regenerated.
10057 * configure: Regenerated.
10058
0270a750
PA
100592012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10060
10061 * hostio.c (handle_readlink): Decrease buffer size
10062 parameter passed to readlink by one byte.
10063
8c29b58e
YQ
100642012-11-26 Yao Qi <yao@codesourcery.com>
10065
10066 * configure.ac (build_warnings): Append '-Wempty-body'.
10067 * configure: Regenerated.
10068 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10069 body.
10070
8bdce1ff
PM
100712012-11-15 Pierre Muller <muller@sourceware.org>
10072
10073 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10074 * config.in: Regenerate.
10075 * configure: Regenerate.
10076 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10077 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10078 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10079 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10080 header.
10081 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10082 instead of <sys/wait.h> header.
10083 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10084
02d403bf 100852012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10086
10087 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10088 (various make rules): Remove -DGDBSERVER
10089
fbd5db48
YQ
100902012-11-09 Yao Qi <yao@codesourcery.com>
10091
10092 * spu-low.c (current_ptid): Move it to ..
10093 * gdbthread.h: ... here. New.
10094 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10095 * server.c (myresume, process_serial_event): Likewise.
10096 * thread-db.c (thread_db_find_new_threads): Likewise.
10097 * tracepoint.c (run_inferior_command): Likewise.
10098
b3dc46ff
AB
100992012-10-01 Andrew Burgess <aburgess@broadcom.com>
10100
10101 * server.c (handle_search_memory_1): Include access length in
10102 warning message.
10103
07c04788
HPN
101042012-09-05 Michael Brandt <michael.brandt@axis.com>
10105
10106 * linux-crisv32-low.c: Fix compile errors.
10107
918d227b
YQ
101082012-09-04 Yao Qi <yao@codesourcery.com>
10109
10110 * tracepoint.c (cmd_qtsv): Adjust debug message.
10111 Don't check CUR_TPOINT.
10112
18c1b81a
YQ
101132012-08-28 Yao Qi <yao@codesourcery.com>
10114
10115 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10116 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10117 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10118 Remove declarations of xmalloc, xreallloc, xstrdup and
10119 freeargv.
10120 * Makefile.in (libiberty_h): New.
10121 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10122 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10123
dc82f37b
YQ
101242012-08-23 Yao Qi <yao@codesourcery.com>
10125
10126 * server.h: Remove declaration of 'xsnprintf'.
10127
406b1477
KS
101282012-08-22 Keith Seitz <keiths@redhat.com>
10129
10130 * server.h: Include build-gnulib-gbserver/config.h.
10131 * gdbreplay.c: Likewise.
10132
e6712ff1
DE
101332012-08-08 Doug Evans <dje@google.com>
10134
10135 * Makefile.in (SFILES): Add gdb_vecs.c.
10136 (OBS): Add gdb_vecs.o.
10137 (gdb_vecs_h, host_defs_h): New variables.
10138 (thread-db.o): Add $(gdb_vecs_h) dependency.
10139 (gdb_vecs.o): New rule.
10140 * thread-db.c: #include "gdb_vecs.h".
10141 (thread_db_load_search): Use a vector to iterate over path elements.
10142 Handle text appearing after "$pdir".
10143
10144 * configure.ac: Add check for strstr.
10145 * config.in: Regenerate.
10146 * configure: Regenerate.
10147
7c3270ae
UW
101482012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10149
10150 * hostio.c (handle_pread): If pread fails, fall back to attempting
10151 lseek/read.
10152 (handle_pwrite): Likewise for pwrite.
10153
b62e2b27
UW
101542012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10155
10156 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10157 between unsupported TYPE and unimplementable ADDR/LEN combination.
10158 (arm_insert_point): Act on new return value.
10159
78a99e91
PA
101602012-07-31 Pedro Alves <palves@redhat.com>
10161
10162 * server.c (process_point_options): Only skip tokens if we find
10163 one that is unrecognized. Don't treat 'X' specially while
10164 skipping unrecognized tokens.
10165
fcf303ab
UW
101662012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10167
10168 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10169 to 4-byte-align HW breakpoint addresses for Thumb.
10170
7255706c
YQ
101712012-07-27 Yao Qi <yao@codesourcery.com>
10172
10173 PR remote/14161.
10174
10175 * server.h: Declare gdb_agent_about_to_close.
10176 * target.c (kill_inferior): Include "agent.h".
10177 New. Send command 'kill'.
10178 * target.h (kill_inferior): Removed macro.
10179 * tracepoint.c (gdb_agent_about_to_close): New.
10180 (gdb_agent_helper_thread): Handle command 'close'.
10181 Wait endlessly until the inferior stops.
10182 Install gdb_agent_remove_socket to atexit hook.
10183 (agent_socket_name): New static variable.
10184 (gdb_agent_socket_init): Replace local variable 'name' with
10185 'agent_socket_name'.
10186 (gdb_agent_remove_socket): New.
10187
5a3f286f
YQ
101882012-07-27 Yao Qi <yao@codesourcery.com>
10189
10190 * server.c (process_point_options): Stop at 'X' when parsing.
10191
961bd387
ME
101922012-07-19 Michael Eager <eager@eagercon.com>
10193
a261b8f5 10194 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10195 to hw_execute.
10196 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10197 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10198 hardware breakpoint.
10199
aa7c7447
JK
102002012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10201
10202 * gdbserver/linux-low.c (initialize_low): Call
10203 linux_ptrace_init_warnings.
10204
7f216e7c
DE
102052012-07-02 Doug Evans <dje@google.com>
10206
10207 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10208 pointer to int.
10209
d3ce09f5
SS
102102012-07-02 Stan Shebs <stan@codesourcery.com>
10211
10212 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10213 (ax.o): Add it to build rule.
10214 (ax-ipa.o): Ditto.
10215 (OBS): Add format.o.
10216 (IPA_OBS): Add format.o.
10217 * server.c (handle_query): Claim support for breakpoint commands.
10218 (process_point_options): Add command case.
10219 (process_serial_event): Leave running if there are printfs in
10220 effect.
10221 * mem-break.h (any_persistent_commands): Declare.
10222 (add_breakpoint_commands): Declare.
10223 (gdb_no_commands_at_breakpoint): Declare.
10224 (run_breakpoint_commands): Declare.
10225 * mem-break.c (struct point_command_list): New struct.
10226 (struct breakpoint): New field command_list.
10227 (any_persistent_commands): New function.
10228 (add_commands_to_breakpoint): New function.
10229 (add_breakpoint_commands): New function.
10230 (gdb_no_commands_at_breakpoint): New function.
10231 (run_breakpoint_commands): New function.
10232 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10233 locally.
10234 * ax.c: Include format.h.
10235 (ax_printf): New function.
10236 (gdb_eval_agent_expr): Add printf opcode.
10237
2f8f6aed
YQ
102382012-06-13 Yao Qi <yao@codesourcery.com>
10239
10240 * server.c (start_inferior): Remove duplicated writes to fields
10241 'last_resume_kind' and 'last_status' of 'current_inferior'.
10242
0c9070b3
YQ
102432012-06-12 Yao Qi <yao@codesourcery.com>
10244 Pedro Alves <palves@redhat.com>
10245
10246 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10247 comment.
10248 * server.c (handle_v_cont): Extend comment.
10249
c52daf70
YQ
102502012-06-11 Yao Qi <yao@codesourcery.com>
10251
10252 * linux-low.c (linux_attach): Add 'static'.
10253
d38bbb0a
YQ
102542012-06-06 Yao Qi <yao@codesourcery.com>
10255
10256 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10257
89dc0afd
JK
102582012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10259
10260 Fix gcc -flto compilation warning.
10261 * server.c (main): Make variable multi_mode and attach volatile.
10262
75f62ce7
TJB
102632012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10264
10265 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10266 if the platform doesn't know about it.
10267
65f479b6
PA
102682012-05-30 Jeff Kenton <jkenton@tilera.com>
10269
10270 * Makefile.in (SFILES): Add linux-tile-low.c.
10271 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10272 * configure.srv: Handle tilegx-*-linux*.
10273 * linux-tile-low.c: New file.
10274
0c5bf5a9
JK
102752012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10276
10277 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10278
a493e3e2
PA
102792012-05-24 Pedro Alves <palves@redhat.com>
10280
10281 PR gdb/7205
10282
43aaf8b6 10283 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10284
2ea28649
PA
102852012-05-24 Pedro Alves <palves@redhat.com>
10286
10287 PR gdb/7205
10288
10289 Replace target_signal with gdb_signal throughout.
10290
8d409d16
MR
102912012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10292
10293 * linux-low.c (linux_store_registers): Avoid the copying sequence
10294 when no data has been retrieved by ptrace.
10295
23512c01
MGD
102962012-05-22 Will Deacon <will.deacon@arm.com>
10297
10298 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10299 Include asm/ptrace.h.
10300 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10301 already defined.
10302
4934b29e
MR
103032012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10304
10305 * linux-low.c (linux_store_registers): Don't re-retrieve data
10306 with ptrace that has already been obtained from /proc. Always
10307 copy any data retrieved with ptrace to the buffer supplied.
10308
bde24c0a
PA
103092012-05-11 Yao Qi <yao@codesourcery.com>
10310 Pedro Alves <palves@redhat.com>
10311
10312 * linux-low.c (enum stopping_threads_kind): New.
10313 (stopping_threads): Change type to `enum stopping_threads_kind'.
10314 (handle_extended_wait): If stopping and suspending threads, leave
10315 the new_lwp suspended too.
10316 (linux_wait_for_event): Adjust.
10317 (stop_all_lwps): Set `stopping_threads' to
10318 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10319 whether we're suspending threads or just stopping them. Assert no
10320 recursion happens.
10321
623b6bdf
YQ
103222012-04-29 Yao Qi <yao@codesourcery.com>
10323
10324 * server.h: Move some code to ...
10325 * gdbthread.h: ... here. New.
10326 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10327 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10328 (nto-low.o, win32-low.o): Likewise.
10329 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10330 * regcache.c, remote-utils.c, server.c: Likewise.
10331 * target.c, tracepoint.c, win32-low.c: Likewise.
10332
f15f9948
TJB
103332012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10334
10335 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10336 (PTRACE_ARG4_TYPE): Likewise.
10337 (PTRACE_XFER_TYPE): Likewise.
10338 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10339 ptrace to PTRACE_ARG3_TYPE.
10340 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10341 (PTRACE_ARG4_TYPE): Likewise.
10342 (PTRACE_XFER_TYPE): Likewise.
10343 (linux_detach_one_lwp): Cast fourth argument of
10344 ptrace to long then PTRACE_ARG4_TYPE.
10345 (regsets_fetch_inferior_registers): Cast third argument of
10346 ptrace to long then PTRACE_ARG3_TYPE.
10347 (regsets_store_inferior_registers): Likewise.
10348
38ea300a
PA
103492012-04-20 Pedro Alves <palves@redhat.com>
10350
10351 * configure: Regenerate.
10352
c971b7fa
PA
103532012-04-19 Pedro Alves <palves@redhat.com>
10354
43aaf8b6 10355 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10356 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10357 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10358 (all, install-only, uninstall, clean-info, all-lib, clean): No
10359 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10360 (maintainer-clean realclean distclean): Use subdir_do.
10361 (subdir_do): New.
10362 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10363 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10364 * acinclude.m4: Include acx_configure_dir.m4.
10365 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10366 calls. Call AC_PROG_RANLIB. Configure gnulib using
10367 ACX_CONFIGURE_DIR.
10368 (GNULIB): New.
10369 (GNULIB_STDINT_H): Adjust.
10370 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10371 * gdbreplay.c: Include build-gnulib/config.h.
10372 * server.h: Likewise.
10373 * aclocal.m4: Regenerate.
10374 * config.in: Regenerate.
10375 * configure: Regenerate.
c971b7fa 10376
809277f8
PA
103772012-04-19 Pedro Alves <palves@redhat.com>
10378
10379 * Makefile.in (LIBGNU, INCGNU): Adjust.
10380 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10381 (all, install-only, uninstall, clean-info, all-lib, clean)
10382 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10383 * configure.ac: Adjust AC_OUTPUT output.
10384 * aclocal.m4: Regenerate.
10385 * configure: Regenerate.
10386
fd9bb8b8
PA
103872012-04-19 Pedro Alves <palves@redhat.com>
10388
10389 * Makefile.in (generated_files): New.
10390 (server_h): Remove the explicit dependency on config.h, and depend
10391 on $generated_files.
10392
1c298c66
PA
103932012-04-19 Pedro Alves <palves@redhat.com>
10394
10395 * Makefile.in (INCGNU): Add -Ignulib.
10396
57c4b50b
PA
103972012-04-19 Pedro Alves <palves@redhat.com>
10398
10399 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10400 (INCGNU): ... this, and spell out -I here.
10401 (GNULIB_LIB): Rename to ...
10402 (LIBGNU): ... this.
10403 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10404
1030e047
PA
104052012-04-19 Pedro Alves <palves@redhat.com>
10406
10407 * config.in: Regenerate.
10408
447d4319
PA
104092012-04-19 Pedro Alves <palves@redhat.com>
10410
10411 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10412 * server.h (memmem): Remove declaration.
10413 * config.in: Regenerate.
10414 * configure: Regenerate.
10415
aad9eab9
YQ
104162012-04-19 Yao Qi <yao@codesourcery.com>
10417
10418 * Makefile.in (SFILES): Add common/vec.c.
10419 (OBS): Add vec.o.
10420 (vec.o): New rule.
10421
3e10640f
YQ
104222012-04-19 Yao Qi <yao@codesourcery.com>
10423
10424 * remote-utils.c (prepare_resume_reply): Replace with macro
10425 target_core_of_thread.
10426 * server.c (handle_qxfer_threads_proper): Likewise.
10427 * target.h (traget_core_of_thread): New macro.
10428
71622373
PA
104292012-04-18 Pedro Alves <palves@redhat.com>
10430
10431 * aclocal.m4: Regenerate.
10432 * configure: Regenerate.
10433
80d26939
YQ
104342012-04-16 Yao Qi <yao@codesourcery.com>
10435
10436 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10437 duplicated on address.
10438
42476b70
YQ
104392012-04-16 Yao Qi <yao@codesourcery.com>
10440
10441 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10442 (struct tracepoint_action_ops) <send>: New field.
10443 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10444 (agent_expr_send, x_tracepoint_action_send): New.
10445 (l_tracepoint_action_send): New.
10446 (cmd_qtdp): Download and install tracepoint
10447 according to `use_agent'.
10448 (run_inferior_command): Add one more parameter `len'.
10449 Update callers.
10450 (tracepoint_send_agent): New.
10451 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10452
7bc83639
YQ
104532012-04-16 Yao Qi <yao@codesourcery.com>
10454
10455 * tracepoint.c (download_tracepoints): Moved to ...
10456 (cmd_qtstart): ... here.
10457
5f18041e
YQ
104582012-04-14 Yao Qi <yao@codesourcery.com>
10459
10460 * tracepoint.c: Include inttypes.h.
10461 (struct collect_memory_action): Use sized types.
10462 (struct tracepoint): Likewise.
10463 (cmd_qtdp, stop_tracing): Update print specifiers.
10464 (cmd_qtp, response_tracepoint): Likewise.
10465 (collect_data_at_tracepoint): Likewise.
10466 (collect_data_at_step): Likewise.
10467
55a8c076
YQ
104682012-04-14 Yao Qi <yao@codesourcery.com>
10469
10470 Import gnulib module inttypes.
10471 * aclocal.m4, config.in, configure: Regenerated.
10472
dc750257
YQ
104732012-04-14 Yao Qi <yao@codesourcery.com>
10474
10475 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10476 Makefile and config.status at last.
10477
0ab5faf9
YQ
104782012-04-13 Yao Qi <yao@codesourcery.com>
10479
10480 * tracepoint.c: Include stdint.h unconditionally.
10481
18f5fd81
TJB
104822012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10483
10484 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10485 on BFD_HAVE_SYS_PROCFS_TYPE.
10486 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10487 * configure: Regenerate.
10488 * config.in: Likewise.
10489
4d47af5c
L
104902012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10491
10492 * Makefile.in (clean): Also remove x32.c x32-linux.c
10493 x32-avx.c x32-avx-linux.c.
10494 (x32.o): New target.
10495 (x32.c): Likewise.
10496 (x32-linux.o): Likewise.
10497 (x32-linux.c): Likewise.
10498 (x32-avx.o): Likewise.
10499 (x32-avx.c): Likewise.
10500 (x32-avx-linux.o): Likewise.
10501 (x32-avx-linux.c): Likewise.
10502
10503 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10504 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10505 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10506 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10507 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10508 i386/x32-avx-linux.xml.
10509
10510 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10511 (init_registers_x32_avx_linux): Likwise.
10512 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10513 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10514
ecedbe58
PA
105152012-04-13 Pedro Alves <palves@redhat.com>
10516
10517 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10518 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10519 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10520 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10521 the sub-make.
10522
c92b5177
L
105232012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10524
10525 * linux-x86-low.c (compat_x32_clock_t): New.
10526 (compat_x32_siginfo_t): Likewise.
10527 (compat_x32_siginfo_from_siginfo): Likewise.
10528 (siginfo_from_compat_x32_siginfo): Likewise.
10529 (linux_is_elf64): Likewise.
10530 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10531 and siginfo_from_compat_x32_siginfo for x32.
10532 (x86_arch_setup): Set linux_is_elf64.
10533
214d508e
L
105342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10535
10536 PR gdb/13969
10537 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10538 e_machine field.
10539 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10540 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10541 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10542 compatible with process.
10543
c9a1864a
YQ
105442012-04-12 Yao Qi <yao@codesourcery.com>
10545
10546 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10547 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10548 (install-only, install-info, clean): Handle sub dir gnulib.
10549 (all-lib, am--refresh): New targets.
10550 (memmem.o): Remove target.
10551 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10552 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10553 (AC_REPLACE_FUNCS): Remove memmem.
10554 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10555 (AC_OUTPUT): Generate Makefile in gnulib/.
10556 * aclocal.m4, config.in, configure: Regenerated.
10557
367ba2c2
MR
105582012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10559
10560 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10561
9d236627
PA
105622012-04-05 Pedro Alves <palves@redhat.com>
10563
10564 -Werror=strict-aliasing
10565
10566 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10567 pointer.
10568
111217b3
PA
105692012-04-04 Pedro Alves <palves@redhat.com>
10570
10571 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10572 (sparc_store_gregset_from_stack, sparc_store_gregset)
10573 (sparc_breakpoint_at): Fix formatting.
10574
8365dcf5
TJB
105752012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10576
10577 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10578 are available.
10579 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10580 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10581 * config.in: Regenerate.
10582 * configure: Likewise.
10583
689cc2ae
PA
105842012-03-29 Pedro Alves <palves@redhat.com>
10585
10586 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10587 Correct ptrace arguments.
10588
c14dfd32
PA
105892012-03-28 Pedro Alves <palves@redhat.com>
10590
10591 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10592 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10593 (IA64_FR1_REGNUM): New defines.
10594 (ia64_fetch_register): New.
10595 (the_low_target): Install it.
10596 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10597 field.
10598 * linux-low.c (linux_fetch_registers): Try the
10599 the_low_target.fetch_register hook first.
10600
10601 * linux-arm-low.c (the_low_target): Adjust.
10602 * linux-bfin-low.c (the_low_target): Adjust.
10603 * linux-cris-low.c (the_low_target): Adjust.
10604 * linux-crisv32-low.c (the_low_target): Adjust.
10605 * linux-m32r-low.c (the_low_target): Adjust.
10606 * linux-m68k-low.c (the_low_target): Adjust.
10607 * linux-mips-low.c (the_low_target): Adjust.
10608 * linux-ppc-low.c (the_low_target): Adjust.
10609 * linux-s390-low.c (the_low_target): Adjust.
10610 * linux-sh-low.c (the_low_target): Adjust.
10611 * linux-sparc-low.c (the_low_target): Adjust.
10612 * linux-tic6x-low.c (the_low_target): Adjust.
10613 * linux-x86-low.c (the_low_target): Adjust.
10614 * linux-xtensa-low.c (the_low_target): Adjust.
10615
63c88e13
PA
106162012-03-26 Pedro Alves <palves@redhat.com>
10617
10618 * server.c (handle_qxfer_libraries): Don't bail early if
10619 the_target->qxfer_libraries_svr4 is not NULL.
10620
fb723180
PA
106212012-03-26 Pedro Alves <palves@redhat.com>
10622
10623 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10624
0afae3cf
PA
106252012-03-23 Pedro Alves <palves@redhat.com>
10626
10627 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10628 "library-list-svr4" element's start tag when the the DSO list is
10629 empty.
10630
485f1ee4
PA
106312012-03-23 Pedro Alves <palves@redhat.com>
10632
10633 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10634 a variable whose type size is the same as the inferior's pointer
10635 size.
10636
a5362b9a
TS
106372012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10638
10639 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10640 struct siginfo.
10641 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10642 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10643 * linux-low.h: Include <signal.h>.
10644 (struct siginfo): Remove forward declaration.
10645 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10646 struct siginfo.
10647
d226c142
MF
106482012-03-21 Mike Frysinger <vapier@gentoo.org>
10649
10650 * .gitignore: Ignore more files.
10651
122f36ef
PA
106522012-03-19 Pedro Alves <palves@redhat.com>
10653 Jan Kratochvil <jan.kratochvil@redhat.com>
10654
10655 * server.c (cont_thread, general_thread): Add describing comments.
10656 (start_inferior): Clear `cont_thread'.
10657 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10658 of a process.
10659
fc3e5175
YQ
106602012-03-15 Yao Qi <yao@codesourcery.com>
10661
10662 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10663 handling to ...
10664 (cmd_qtdp): ... here.
10665
8d0d92cd
YQ
106662012-03-15 Yao Qi <yao@codesourcery.com>
10667
10668 * tracepoint.c (struct tracepoint_action_ops): New.
10669 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10670 (m_tracepoint_action_download): New.
10671 (r_tracepoint_action_download): New.
10672 (x_tracepoint_action_download): New.
10673 (l_tracepoint_action_download): New.
10674 (add_tracepoint_action): Install `action->ops' according type.
10675 (download_tracepoint_1): Move code `download' function pointer
10676 of various tracepoint_action_ops.
10677
87b0bb13
JK
106782012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10679
10680 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10681 linux_ptrace_attach_warnings.
10682
5f572dec
JK
106832012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10684
10685 * Makefile.in (linux-ptrace.o): New.
10686 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10687 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10688 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10689 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10690 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10691 of these targets.
10692 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10693
f4647387
YQ
106942012-03-08 Yao Qi <yao@codesourcery.com>
10695 Pedro Alves <palves@redhat.com>
10696
10697 Fix PR server/13392.
10698 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10699 offset of JMP insn.
10700 * tracepoint.c (remove_tracepoint): New.
10701 (cmd_qtdp): Call remove_tracepoint when failed to install.
10702
9b224c5e
PA
107032012-03-07 Pedro Alves <palves@redhat.com>
10704
10705 * linux-low.c (get_detach_signal): New.
10706 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10707 Pass on pending signals to PTRACE_DETACH. Check the result of the
10708 ptrace call.
10709 * server.c (program_signals, program_signals_p): New.
10710 (handle_general_set): Handle QProgramSignals.
10711 * server.h (program_signals, program_signals_p): Declare.
10712
e237a7e2
JK
107132012-03-05 Pedro Alves <palves@redhat.com>
10714 Jan Kratochvil <jan.kratochvil@redhat.com>
10715
10716 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10717 New comment why.
10718
5808517f
YQ
107192012-03-03 Yao Qi <yao@codesourcery.com>
10720
10721 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10722 agent_look_up_symbols.
10723
58b4daa5
YQ
107242012-03-03 Yao Qi <yao@codesourcery.com>
10725
10726 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10727 (linux-x86-low.o): Likewise.
10728 * server.h: Remove in_process_agent_loaded.
10729 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10730 common/agent.c.
10731 Update callers.
10732
8ffcbaaf
YQ
107332012-03-03 Yao Qi <yao@codesourcery.com>
10734
10735 * tracepoint.c (gdb_agent_capability): New global.
10736 (in_process_agent_loaded_ust): Renamed to
10737 `in_process_agent_supports_ust'.
10738 Update callers.
10739 (in_process_agent_supports_ust): Call agent_capability_check.
10740 (clear_installed_tracepoints): Assert that agent supports
10741 agent.
10742
d1feda86
YQ
107432012-03-03 Yao Qi <yao@codesourcery.com>
10744
10745 * linux-low.c (linux_supports_agent): New.
10746 (linux_target_ops): Initialize field `supports_agent' with
10747 linux_supports_agent.
10748 * target.h (struct target_ops) <supports_agent>: New.
10749 (target_supports_agent): New macro.
10750 * server.c (handle_general_set): Handle packet 'QAgent'.
10751 (handle_query): Send `QAgent+'.
10752 * Makefile.in (server.o): Depends on agent.h.
10753
2fa291ac
YQ
107542012-03-03 Yao Qi <yao@codesourcery.com>
10755
10756 * Makefile.in (OBS): Add agent.o.
10757 Add new rule for agent.o.
10758 Track dependence of tracepoint.c on agent.h.
10759 * tracepoint.c (run_inferior_command_1):
10760 (run_inferior_command): Call agent_run_command.
10761 (gdb_ust_connect_sync_socket): Deleted. Move it to
10762 common/agent.c.
10763 (resume_thread, stop_thread): Likewise.
10764 (gdb_ust_socket_init): Renamed to ...
10765 (gdb_agent_socket_init): ... New.
10766 (gdb_ust_thread): Renamed to ...
10767 (gdb_agent_helper_thread): ... New.
10768 (gdb_ust_init): Move some code to ...
10769 (gdb_agent_init): ... here. New.
10770 [HAVE_UST]: Call gdb_ust_init.
10771 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10772 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10773 * config.in, configure: Regenerated.
10774
05044653
PA
107752012-03-02 Pedro Alves <palves@redhat.com>
10776
10777 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10778 * linux-low.c (struct simple_pid_list): New.
10779 (stopped_pids): New a struct simple_pid_list pointer.
10780 (add_to_pid_list, pull_pid_from_list): New.
10781 (handle_extended_wait): Don't assume the first signal new children
10782 report is SIGSTOP. Adjust call to pull_pid_from_list.
10783 (linux_wait_for_lwp): Adjust.
10784
8d00225b
YQ
107852012-03-02 Yao Qi <yao@codesourcery.com>
10786
10787 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10788 debug log.
10789
19560ba5
YQ
107902012-03-02 Yao Qi <yao@codesourcery.com>
10791
10792 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10793 `stop_pc' and `tpoint'. Update caller.
10794
1faeff08
MR
107952012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10796
10797 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10798 * linux-low.c (use_linux_regsets): New macro.
10799 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10800 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10801 (linux_register_in_regsets): New function.
10802 (usr_fetch_inferior_registers): Skip registers covered by
10803 regsets.
10804 (usr_store_inferior_registers): Likewise.
10805 (usr_fetch_inferior_registers): New macro.
10806 (usr_store_inferior_registers): Likewise.
10807 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10808 (linux_store_registers): Likewise.
10809 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10810 prototype.
10811 (init_registers_mips64_dsp_linux): Likewise.
10812 (init_registers_mips_linux): New macro.
10813 (init_registers_mips_dsp_linux): Likewise.
10814 (mips_dsp_num_regs): Likewise.
10815 (DSP_BASE, DSP_CONTROL): New fallback macros.
10816 (mips_base_regs): New macro.
10817 (mips_regmap): Use it. Fix the size.
10818 (mips_dsp_regmap): New variable.
10819 (mips_dsp_regset_bitmap): Likewise.
10820 (mips_arch_setup): New function.
10821 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10822 than mips_regmap.
10823 (mips_cannot_store_register): Likewise.
10824 (the_low_target): Update .arch_setup, .num_regs and .regmap
10825 initializers. Add .regset_bitmap initializer.
10826 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10827 initializer.
10828 * linux-bfin-low.c (the_low_target): Likewise.
10829 * linux-cris-low.c (the_low_target): Likewise.
10830 * linux-crisv32-low.c (the_low_target): Likewise.
10831 * linux-ia64-low.c (the_low_target): Likewise.
10832 * linux-m32r-low.c (the_low_target): Likewise.
10833 * linux-m68k-low.c (the_low_target): Likewise.
10834 * linux-ppc-low.c (the_low_target): Likewise.
10835 * linux-s390-low.c (the_low_target): Likewise.
10836 * linux-sh-low.c (the_low_target): Likewise.
10837 * linux-sparc-low.c (the_low_target): Likewise.
10838 * linux-tic6x-low.c (the_low_target): Likewise.
10839 * linux-x86-low.c (the_low_target): Likewise.
10840 * linux-xtensa-low.c (the_low_target): Likewise.
10841 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10842 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10843 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10844 srv_xmlfiles.
10845 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10846 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10847
c03e6ccc
YQ
108482012-02-29 Yao Qi <yao@codesourcery.com>
10849 Pedro Alves <palves@redhat.com>
10850
10851 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10852 `step_over_finished' is true.
10853
644cebc9
PA
108542012-02-27 Pedro Alves <palves@redhat.com>
10855
10856 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10857 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10858
c14d7ab2
PA
108592012-02-27 Pedro Alves <palves@redhat.com>
10860
10861 PR server/9684
10862 * linux-low.c (pid_is_stopped): New.
10863 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10864
412c89dd
LM
108652012-02-25 Luis Machado <lgustavo@codesourcery.com>
10866
10867 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10868 of conditions.
10869
b745defe
MR
108702012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10871
10872 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10873
9f3a5c85
LM
108742012-02-24 Luis Machado <lgustavo@codesourcery>
10875
10876 * server.c (handle_query): Advertise support for target-side
10877 breakpoint condition evaluation.
10878 (process_point_options): New function.
10879 (process_serial_event): When inserting a breakpoint, check for
10880 a target-side condition that should be evaluated.
10881
10882 * mem-break.c: Include regcache.h and ax.h.
10883 (point_cond_list_t): New data structure.
10884 (breakpoint) <cond_list>: New field.
10885 (find_gdb_breakpoint_at): Make non-static.
10886 (delete_gdb_breakpoint_at): Clear any target-side
10887 conditions.
10888 (clear_gdb_breakpoint_conditions): New function.
10889 (add_condition_to_breakpoint): Likewise.
10890 (add_breakpoint_condition): Likewise.
10891 (gdb_condition_true_at_breakpoint): Likewise.
10892 (gdb_breakpoint_here): Return result directly instead
10893 of going through a local variable.
10894
10895 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10896 (clear_gdb_breakpoint_conditions): Likewise.
10897 (add_breakpoint_condition): Likewise.
10898 (gdb_condition_true_at_breakpoint): Likewise.
10899
10900 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10901 (need_step_over_p): Take target-side breakpoint condition into
10902 consideration.
10903
5e1dc496
LM
109042012-02-24 Luis Machado <lgustavo@codesourcery>
10905
10906 * server.h: Include tracepoint.h.
10907 (agent_mem_read, agent_get_trace_state_variable_value,
10908 agent_set_trace_state_variable_value,
10909 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10910 get_set_tsv_func_addr): New prototypes.
10911
10912 * ax.h: New include file.
10913 * ax.c: New source file.
10914
10915 * tracepoint.c: Include ax.h.
10916 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10917 agent_expr, eval_result_type): Move to ax.h.
10918 (parse_agent_expr): Rename to ...
10919 (gdb_parse_agent_expr): ... this, make it non-static and move
10920 to ax.h.
10921 (unparse_agent_expr) Rename to ...
10922 (gdb_unparse_agent_expr): ... this, make it non-static and move
10923 to ax.h.
10924 (eval_agent_expr): Rename to ...
10925 (eval_tracepoint_agent_expr): ... this.
10926 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10927 forward declarations.
10928 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10929 (agent_get_trace_state_variable_value): New function.
10930 (agent_set_trace_state_variable_value): New function.
10931 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10932 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10933 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10934 (condition_true_at_tracepoint): Likewise.
10935 (parse_agent_expr): Rename to ...
10936 (gdb_parse_agent_expr): ... this and move to ax.c.
10937 (unparse_agent_expr): Rename to ...
10938 (gdb_unparse_agent_expr): ... this and move to ax.c.
10939 (gdb_agent_op_name): Move to ax.c.
10940 (eval_agent_expr): Rename to ...
10941 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10942 and move to ax.c.
10943 (eval_tracepoint_agent_expr): New function.
10944 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10945 non-static.
5e1dc496
LM
10946 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10947 ax.c.
10948 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10949 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10950 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10951 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10952 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10953 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10954 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10955 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10956 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10957 (compile_bytecodes): Remove forward declaration.
10958 (is_goto_target): Move to ax.c.
10959 (compile_bytecodes): Move to ax.c and call
10960 agent_get_trace_state_variable_value (...) and
10961 agent_set_trace_state_variable_value (...).
10962
10963 * Makefile.in: Update ax.c and IPA dependencies.
10964
277e4e52
PA
109652012-02-24 Pedro Alves <palves@redhat.com>
10966
10967 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10968 (cmd_bigqtbuffer_circular): ... this. Only handle
10969 'QTBuffer:circular:'.
10970 (handle_tracepoint_general_set): Adjust.
10971
bf4c19f7
YQ
109722012-02-16 Yao Qi <yao@codesourcery.com>
10973
10974 * inferiors.c: Move code to ...
10975 * dll.c: .... here. New.
10976 * server.h: Declare clear_dlls.
10977 * Makefile.in (SFILES): Add dll.c.
10978 (OBS): Add dll.o
10979 (dll.o): New rule.
10980
d73f2619
YQ
109812012-02-11 Yao Qi <yao@codesourcery.com>
10982
10983 * server.c: (handle_monitor_command): Add a new parameter
10984 `own_buf'.
10985 (handle_query): Update caller.
10986
f8255c2a
JB
109872012-02-09 Joel Brobecker <brobecker@adacore.com>
10988
10989 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10990 * configure, config.in: Regenerate.
10991 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10992 is not defined.
10993
da84f473
PA
109942012-02-02 Pedro Alves <palves@redhat.com>
10995
10996 Try SIGKILL first, then PTRACE_KILL.
10997 * linux-low.c (linux_kill_one_lwp): New.
10998 (linux_kill_one_lwp): Rename to ...
10999 (kill_one_lwp_callback): ... this. Use the new
11000 linux_kill_one_lwp.
11001
e886a173
PA
110022012-02-02 Pedro Alves <palves@redhat.com>
11003
11004 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11005 inferior.
11006
be07f1a2
PA
110072012-01-27 Pedro Alves <palves@redhat.com>
11008
11009 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11010 (elf_64_file_p): Make static.
11011 (linux_pid_exe_is_elf_64_file): New.
11012 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11013 Delete declarations.
11014 (linux_pid_exe_is_elf_64_file): Declare.
11015 * linux-x86-low.c (x86_arch_setup): Use
11016 linux_pid_exe_is_elf_64_file.
11017
d8301ad1
JK
110182012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11019
11020 * linux-low.c (linux_wait_for_event_1): Rename to ...
11021 (linux_wait_for_event): ... here and merge it with former
11022 linux_wait_for_event - new variable wait_ptid, use it.
11023 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11024
01b17894
PA
110252012-01-23 Pedro Alves <palves@redhat.com>
11026
11027 * server.c (main): Avoid yet another case of infinite loop while
11028 detaching/killing after a longjmp.
11029
e825046f
JK
110302012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11031
11032 Code cleanup.
11033 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11034
b9e7b9c3
UW
110352012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11036
11037 * hostio.c (handle_readlink): New function.
11038 (handle_vFile): Call it to handle "vFile:readlink" packets.
11039
901f9912
UW
110402012-01-20 Pedro Alves <palves@redhat.com>
11041 Ulrich Weigand <ulrich.weigand@linaro.org>
11042
11043 * server.c (handle_v_requests): Only support vAttach and vRun to
11044 start multiple processes when in extended protocol mode.
11045
fc1ab1a0
PA
110462012-01-17 Pedro Alves <palves@redhat.com>
11047
11048 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11049 memalign plus mprotect to allocate the scratch buffer.
11050
7d5d4e98
PA
110512012-01-13 Pedro Alves <palves@redhat.com>
11052
11053 * server.c (attach_inferior): Clear `cont_thread'.
11054
f128d5e9
PA
110552012-01-13 Pedro Alves <palves@redhat.com>
11056
11057 * server.c (main): Avoid infinite loop while detaching/killing
11058 after a longjmp.
11059
06db92f0
DE
110602012-01-09 Doug Evans <dje@google.com>
11061
11062 * server.c (start_inferior): Set last_ptid in --wrapper case.
11063
32d92999
YQ
110642012-01-06 Yao Qi <yao@codesourcery.com>
11065
11066 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11067 defined.
11068 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11069
5e0a92a9
YQ
110702012-01-04 Yao Qi <yao@codesourcery.com>
11071
11072 * tracepoint.c (cmd_qtdp): Print debug message
11073 for static tracepoint.
11074
ae639e8c
YQ
110752012-01-04 Yao Qi <yao@codesourcery.com>
11076
11077 * tracepoint.c (trace_vdebug): Differentiate debug message
11078 between gdbserver and IPA.
11079
f72429c5
YQ
110802012-01-03 Yao Qi <yao@codesourcery.com>
11081
11082 * tracepoint.c (tracepoint_was_hit): Don't collect for
11083 static tracepoint.
11084
12c3e59c
JB
110852012-01-02 Joel Brobecker <brobecker@adacore.com>
11086
11087 * terminal.h: Reformat copyright header.
11088
67827812
JB
110892012-01-02 Joel Brobecker <brobecker@adacore.com>
11090
11091 * server.c (gdbserver_version): Update copyright year.
11092 * gdbreplay.c (gdbreplay_version): Likewise.
11093
3e52c33d
JK
110942011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11095
11096 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11097
11098 Revert:
11099 2011-12-18 Hui Zhu <teawater@gmail.com>
11100 * linux-low.c (linux_create_inferior): Save return value to ret.
11101
66f1260e
HZ
111022011-12-18 Hui Zhu <teawater@gmail.com>
11103
11104 * linux-low.c (linux_create_inferior): Save return value to ret.
11105
e77616d7
DE
111062011-12-16 Doug Evans <dje@google.com>
11107
e7b06c57
DE
11108 * linux-low.c (linux_create_inferior): If stdio connection,
11109 redirect stdin from /dev/null, stdout to stderr.
11110 * remote-utils.c (remote_is_stdio): New static global.
11111 (remote_connection_is_stdio): New function.
11112 (remote_prepare): Handle stdio connection.
11113 (remote_open): Ditto.
11114 (remote_close): Don't close stdin for stdio connections.
11115 (read_prim,write_prim): New functions. Replace all calls to
11116 read/write to these.
11117 * server.c (main): Watch for "-" argument. Move call to
11118 remote_prepare before start_inferior.
11119 * server.h (STDIO_CONNECTION_NAME): New macro.
11120 (remote_connection_is_stdio): Declare.
11121
e77616d7
DE
11122 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11123 in debugging output.
11124
82067193
YQ
111252011-12-15 Yao Qi <yao@codesourcery.com>
11126
11127 * tracepoint.c: Include sys/syscall.h.
11128 (gdb_ust_thread): Remove preprocessor conditional.
11129
82bfbe7e
PA
111302011-12-14 Pedro Alves <pedro@codesourcery.com>
11131
11132 * linux-low.c (linux_detach_one_lwp): Call
11133 the_low_target.prepare_to_resume before detaching.
11134
712c6575
YQ
111352011-12-14 Yao Qi <yao@codesourcery.com>
11136
11137 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11138 of write.
11139
d54d1edf
YQ
111402011-12-14 Yao Qi <yao@codesourcery.com>
11141
11142 * i386-low.c (i386_low_stopped_data_address): Initialize local
11143 variable `control'.
11144
6210a125
PA
111452011-12-13 Pedro Alves <pedro@codesourcery.com>
11146
11147 PR remote/13492
11148
11149 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11150 DR_CONTROL unless necessary. Extend comments.
11151 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11152 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11153
2ece8244
YQ
111542011-12-13 Yao Qi <yao@codesourcery.com>
11155
11156 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11157 macros.
11158 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11159
784867a5
JK
111602011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11161
11162 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11163 Print new debug message for such case.
11164
6bf36717
JK
111652011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11166
11167 Fix overlapping memcpy.
11168 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11169 the read_inferior_memory transfer.
11170 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11171 write_inferior_memory transfer.
11172 (set_fast_tracepoint_jump): New variable buf. Use it for the
11173 read_inferior_memory and write_inferior_memory transfers.
11174 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11175 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11176 Use it for the write_inferior_memory transfer.
11177 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11178 buffers.
11179
50275556
MR
111802011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11181
11182 * linux-low.c (fetch_register, store_register): Make code
11183 consistent, fix formatting.
11184
7325beb4
MR
111852011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11186
11187 * linux-low.c (usr_store_inferior_registers): Factor out code
11188 to handle individual registers into...
11189 (store_register): ... this new function.
11190
c642a434
UW
111912011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11192
11193 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11194 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11195 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11196 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11197 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11198 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11199 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11200 (srv_xmlfiles): Add new XML files.
11201
11202 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11203 and <sys/uio.h>.
11204 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11205 (init_registers_s390_linux32v1): Add prototype.
11206 (init_registers_s390_linux32v2): Likewise.
11207 (init_registers_s390_linux64v1): Likewise.
11208 (init_registers_s390_linux64v2): Likewise.
11209 (init_registers_s390x_linux64v1): Likewise.
11210 (init_registers_s390x_linux64v2): Likewise.
11211 (s390_num_regs): Increment to 52.
11212 (s390_regmap): Add orig_r2 register.
11213 (s390_num_regs_3264): Increment to 68.
11214 (s390_regmap_3264): Add orig_r2 register.
11215 (s390_collect_ptrace_register): Handle orig_r2 register.
11216 (s390_supply_ptrace_register): Likewise.
11217 (s390_fill_last_break): New function.
11218 (s390_store_last_break): Likewise.
11219 (s390_fill_system_call): New function.
11220 (s390_store_system_call): Likewise.
11221 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11222 register sets.
11223 (s390_check_regset): New function.
11224 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11225 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11226 Update target_regsets for available register sets.
11227
2268b414
JK
112282011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11229 Jan Kratochvil <jan.kratochvil@redhat.com>
11230
11231 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11232 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11233 New.
11234 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11235 * linux-low.h (struct process_info_private): New member r_debug.
11236 * server.c (handle_qxfer_libraries): Call
11237 the_target->qxfer_libraries_svr4.
11238 (handle_qxfer_libraries_svr4): New function.
11239 (qxfer_packets): New entry "libraries-svr4".
11240 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11241 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11242 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11243 PACKET_qXfer_libraries_svr4.
11244
d6db1fab
UW
112452011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11246
11247 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11248 PSW address/mask between 8-byte and 16-byte formats.
11249 (s390_supply_ptrace_register): Likewise.
11250 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11251 basic addressing mode bit.
11252
242f5f1c
SS
112532011-11-24 Stan Shebs <stan@codesourcery.com>
11254
11255 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11256
f196051f
SS
112572011-11-17 Stan Shebs <stan@codesourcery.com>
11258
11259 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11260 (tracing_start_time): New global.
11261 (tracing_stop_time): New global.
11262 (tracing_user_name): New global.
11263 (tracing_notes): New global.
11264 (tracing_stop_note): New global.
11265 (cmd_qtstart): Set traceframe_usage, start_time.
11266 (stop_tracing): Set stop_time.
11267 (cmd_qtstatus): Report additional status.
11268 (cmd_qtp): New function.
11269 (handle_tracepoint_query): Call it.
11270 (cmd_qtnotes): New function.
11271 (handle_tracepoint_general_set): Call it.
11272 (get_timestamp): Rename from tsv_get_timestamp.
11273
405f8e94
SS
112742011-11-14 Stan Shebs <stan@codesourcery.com>
11275 Kwok Cheung Yeung <kcy@codesourcery.com>
11276
11277 * linux-x86-low.c (small_jump_insn): New.
11278 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11279 trampoline and error message, build a trampoline and issue a small
11280 jump instruction to it.
11281 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11282 trampoline and error message.
11283 (x86_get_min_fast_tracepoint_insn_len): New.
11284 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11285 * linux-low.h (struct linux_target_ops): Add arguments to
11286 install_fast_tracepoint_jump_pad operation, add new operation.
11287 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11288 arguments.
11289 (linux_get_min_fast_tracepoint_insn_len): New function.
11290 (linux_target_op): Add new operation.
11291 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11292 (gdb_trampoline_buffer_end): Ditto.
11293 (gdb_trampoline_buffer_error): Ditto.
11294 (struct ipa_sym_addresses): Add fields for new IPA variables.
11295 (symbol_list): Add entries for new IPA variables.
11296 (struct tracepoint): Add fields to hold the address range of the
11297 trampoline used by the tracepoint.
11298 (trampoline_buffer_head): New static variable.
11299 (trampoline_buffer_tail): Ditto.
11300 (claim_trampoline_space): New function.
11301 (have_fast_tracepoint_trampoline_buffer): New function.
11302 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11303 structure.
11304 (install_fast_tracepoint): Ditto, also add error buffer argument.
11305 (cmd_qtminftpilen): New function.
11306 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11307 (fast_tracepoint_from_trampoline_address): New function.
11308 (fast_tracepoint_collecting): Handle trampoline as part of jump
11309 pad space.
11310 (set_trampoline_buffer_space): New function.
11311 (initialize_tracepoint): Initialize new IPA variables.
11312 * target.h (struct target_ops): Add arguments to
11313 install_fast_tracepoint_jump_pad operation, add new
11314 get_min_fast_tracepoint_insn_len operation.
11315 (target_get_min_fast_tracepoint_insn_len): New.
11316 (install_fast_tracepoint_jump_pad): Add arguments.
11317 * server.h (IPA_BUFSIZ): Define.
11318 * linux-i386-ipa.c: Include extra header files.
11319 (initialize_fast_tracepoint_trampoline_buffer): New function.
11320 (initialize_low_tracepoint): Call it.
11321 * server.h (set_trampoline_buffer_space): Declare.
11322 (claim_trampoline_space): Ditto.
11323 (have_fast_tracepoint_trampoline_buffer): Ditto.
11324
1e4d1764
YQ
113252011-11-14 Yao Qi <yao@codesourcery.com>
11326
11327 * server.c (handle_query): Handle InstallInTrace for qSupported.
11328 * tracepoint.c (add_tracepoint): Sort list.
11329 (install_tracepoint, download_tracepoint): New.
11330 (cmd_qtdp): Call them to install and download tracepoints.
11331 (sort_tracepoints): Removed.
11332 (cmd_qtstart): Update.
11333
5c73ff4e
YQ
113342011-11-14 Yao Qi <yao@codesourcery.com>
11335
11336 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11337 * mem-break.h: Declare.
11338 * tracepoint.c (cmd_qtstart): Move some code to ...
11339 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11340 New.
11341 (download_tracepoints): Move some code to ...
11342 (download_tracepoint_1): ... here. New.
11343
86a30030
YQ
113442011-11-08 Yao Qi <yao@codesourcery.com>
11345
11346 * remote-utils.c (relocate_instruction): A comment fix.
11347
8d26e50c
JB
113482011-11-07 Joel Brobecker <brobecker@adacore.com>
11349
11350 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11351 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11352 dr_status_mirror and dr_control_mirror from debug_reg_state.
11353 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11354 (i386_initial_stuff): Remove use of deleted globals.
11355 (i386_get_thread_context, i386_set_thread_context,
11356 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11357 from debug_reg_state.
11358
a59306a3
YQ
113592011-11-05 Yao Qi <yao@codesourcery.com>
11360
11361 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11362 address as TPOINT's.
11363
3065dfb6
SS
113642011-11-02 Stan Shebs <stan@codesourcery.com>
11365
11366 * tracepoint.c (agent_mem_read_string): New function.
11367 (eval_agent_expr): Call it for tracenz.
11368 * server.c (handle_query): Report support for tracenz.
11369
fd0d8c7c
YQ
113702011-11-02 Yao Qi <yao@codesourcery.com>
11371
11372 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11373
609086b1
YQ
113742011-11-02 Yao Qi <yao@codesourcery.com>
11375
11376 * target.h: Fix a typo in comment.
11377
b9fd1791
PA
113782011-10-31 Pedro Alves <pedro@codesourcery.com>
11379
11380 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11381 clobber the breakpoints' shadows with fast tracepoint jumps.
11382 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11383 * target.c (write_inferior_memory): Also pass MYADDR down to
11384 check_mem_write.
11385
03583c20
UW
113862011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11387
11388 * configure.ac: Check support for personality routine.
11389 * configure: Regenerate.
11390 * config.in: Likewise.
11391 * linux-low.c: Include <sys/personality.h>.
11392 Define ADDR_NO_RANDOMIZE if necessary.
11393 (linux_create_inferior): Disable address space randomization when
11394 forking inferior, if requested.
11395 (linux_supports_disable_randomization): New function.
11396 (linux_target_ops): Install it.
11397 * server.h (disable_randomization): Declare.
11398 * server.c (disable_randomization): New global variable.
11399 (handle_general_set): Handle QDisableRandomization.
11400 (handle_query): Likewise for qSupported.
11401 (main): Support --disable-randomization and --no-disable-randomization
11402 command line arguments.
11403 * target.h (struct target_ops): Add supports_disable_randomization.
11404 (target_supports_disable_randomization): New macro.
11405
723b724b
MF
114062011-09-29 Mike Frysinger <vapier@gentoo.org>
11407
11408 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11409 ifdef check.
11410 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11411 [!PT_GETDSBT] (target_loadmap): New definition.
11412 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11413 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11414 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11415 and PT_GETDSBT to LINUX_LOADMAP.
11416 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11417 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11418
55329a5c 114192011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11420
11421 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11422 (arm_linux_hwbp_cap): New static variable.
11423 (arm_linux_get_hwbp_cap): Replace by ...
11424 (arm_linux_init_hwbp_cap): ... this new function.
11425 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11426 (arm_linux_get_hw_watchpoint_count): Likewise.
11427 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11428 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11429 (arm_prepare_to_resume): Use perror_with_name instead of error.
11430
55329a5c 114312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11432
11433 * linux-arm-low.c: Include <signal.h>.
11434 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11435 (struct arm_linux_hwbp_cap): New data type.
11436 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11437 (struct arm_linux_hw_breakpoint): New data type.
11438 (MAX_BPTS, MAX_WPTS): Define.
11439 (struct arch_process_info, struct arch_lwp_info): New data types.
11440 (arm_linux_get_hwbp_cap): New function.
11441 (arm_linux_get_hw_breakpoint_count): Likewise.
11442 (arm_linux_get_hw_watchpoint_count): Likewise.
11443 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11444 (arm_hwbp_control_initialize): Likewise.
11445 (arm_hwbp_control_is_enabled): Likewise.
11446 (arm_hwbp_control_is_initialized): Likewise.
11447 (arm_hwbp_control_disable): Likewise.
11448 (arm_linux_hw_breakpoint_equal): Likewise.
11449 (arm_linux_hw_point_initialize): Likewise.
11450 (struct update_registers_data): New data structure.
11451 (update_registers_callback: New function.
11452 (arm_insert_point): Likewise.
11453 (arm_remove_point): Likewise.
11454 (arm_stopped_by_watchpoint): Likewise.
11455 (arm_stopped_data_address): Likewise.
11456 (arm_new_process): Likewise.
11457 (arm_new_thread): Likewise.
11458 (arm_prepare_to_resume): Likewise.
11459 (the_low_target): Register arm_insert_point, arm_remove_point,
11460 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11461 arm_new_thread, and arm_prepare_to_resume.
11462
6b9801d4
SS
114632011-09-15 Stan Shebs <stan@codesourcery.com>
11464
11465 * server.h (struct emit_ops): Add compare-goto fields.
11466 * tracepoint.c (gdb_agent_op_sizes): New table.
11467 (emit_eq_goto): New function.
11468 (emit_ne_goto): New function.
11469 (emit_lt_goto): New function.
11470 (emit_le_goto): New function.
11471 (emit_gt_goto): New function.
11472 (emit_ge_goto): New function.
11473 (is_goto_target): New function.
11474 (compile_bytecodes): Recognize special cases of compare-goto
11475 combinations and call specialized emitters for them.
11476 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11477 (amd64_emit_ne_goto): New function.
11478 (amd64_emit_lt_goto): New function.
11479 (amd64_emit_le_goto): New function.
11480 (amd64_emit_gt_goto): New function.
11481 (amd64_emit_ge_goto): New function.
11482 (amd64_emit_ops): Add the new functions.
11483 (i386_emit_eq_goto): New function.
11484 (i386_emit_ne_goto): New function.
11485 (i386_emit_lt_goto): New function.
11486 (i386_emit_le_goto): New function.
11487 (i386_emit_gt_goto): New function.
11488 (i386_emit_ge_goto): New function.
11489 (i386_emit_ops): Add the new functions.
11490
bf15cbda
SS
114912011-09-08 Stan Shebs <stan@codesourcery.com>
11492
11493 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11494 (i386_emit_epilogue): Restore %ebx.
11495
943ca1dd
JZ
114962011-08-31 Jie Zhang <jzhang918@gmail.com>
11497
11498 * server.c (step_thread): Remove definition.
11499 (process_serial_event): Don't handle Hs.
11500 * server.h (step_thread): Remove declaration.
11501 * target.c (set_desired_inferior): Remove use of step_thread.
11502
e3deef73
LM
115032011-08-24 Luis Machado <lgustavo@codesourcery.com>
11504
11505 * linux-low.c: Include linux-procfs.h.
11506 (linux_attach_lwp_1): Update comments.
11507 (linux_attach): Scan for existing threads when attaching to a
11508 process that is the tgid.
11509 * Makefile.in: Update dependencies.
11510
13da1c97
LM
115112011-08-24 Luis Machado <lgustavo@codesourcery.com>
11512
11513 * configure.srv: Add linux-procfs.o dependencies.
11514
881127c9
YQ
115152011-08-14 Yao Qi <yao@codesourcery.com>
11516
11517 * target.h (struct target_ops): Fix indent.
11518 * win32-low.c (win32_target_ops): Fix comment.
11519
58dbd541
YQ
115202011-08-14 Andrew Jenner <andrew@codesourcery.com>
11521 Yao Qi <yao@codesourcery.com>
11522
11523 * Makefile.in (clean): Remove tic6x-*.c files.
11524 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11525 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11526 (tic6x-c64xp-linux.c): Likewise.
11527 * configure.srv: Add support for tic6x-*-uclinux.
11528 * linux-tic6x-low.c: New.
11529 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11530
78d85199
YQ
115312011-08-14 Andrew Stubbs <ams@codesourcery.com>
11532 Yao Qi <yao@codesourcery.com>
11533
11534 * target.h (struct target_ops): Add read_loadmap.
11535 * linux-low.c (struct target_loadseg): New type.
11536 (struct target_loadmap): New type.
11537 (linux_read_loadmap): New function.
11538 (linux_target_ops): Add linux_read_loadmap.
11539 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11540 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11541 to NULL.
78d85199 11542
a959a88d
EZ
115432011-08-05 Eli Zaretskii <eliz@gnu.org>
11544
11545 * win32-low.c: Include <stdint.h>.
11546
1ced966e
PA
115472011-07-22 Pedro Alves <pedro@codesourcery.com>
11548
11549 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11550 to the inferior here.
11551 (i386_remove_aligned_watchpoint): Ditto.
11552 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11553 fit part of the watchpoint in the debug registers.
11554 (i386_update_inferior_debug_regs): New.
11555 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11556 registers, and only update the inferior on success.
11557 (i386_low_remove_watchpoint): Ditto.
11558
d26e3629
KY
115592011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11560
11561 * linux-low.c (compare_ints, unique, list_threads, show_process,
11562 linux_core_of_thread): Delete.
11563 (linux_target_ops): Change linux_core_of_thread to
11564 linux_common_core_of_thread.
11565 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11566 * utils.c (malloc_failure): Change type of argument.
11567 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11568 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11569 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11570 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11571 (IPA_OBJS): Add common-utils-ipa.o.
11572 (ptid_h, linux_osdata_h): New macros.
11573 (server_h): Add common/common-utils.h, common/xml-utils.h,
11574 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11575 common/ptid.h.
11576 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11577 ptid.o, buffer.o): New rules.
11578 (linux-low.o): Add common/linux-osdata.h as a dependency.
11579 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11580 * configure.ac: Add AC_HEADER_DIRENT check.
11581 * config.in: Regenerate.
11582 * configure: Regenerate.
11583 * remote-utils.c (xml_escape_text): Delete.
11584 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11585 buffer_xml_printf): Move to common/buffer.c.
11586 * server.c (main): Remove call to initialize_inferiors.
11587 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11588 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11589 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11590 internal_error, gdb_assert, gdb_assert_fail): Delete.
11591 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11592 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11593 common/buffer.h.
11594 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11595 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11596 initialize_inferiors): Delete.
11597
2275a1a7
PA
115982011-07-20 Pedro Alves <pedro@codesourcery.com>
11599
11600 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11601 symbol error.
11602
0a5b1e09
PA
116032011-05-31 Pedro Alves <pedro@codesourcery.com>
11604
11605 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11606 assertion.
11607 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11608
6938fd34
YQ
116092011-05-26 Yao Qi <yao@codesourcery.com>
11610
11611 * Makefile.in (thread-db.o): Track dependence to
11612 common/gdb_thread_db.h.
11613 * thread-db.c: include gdb_thread_db.h from right place.
11614
b481f9e0
TT
116152011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11616
11617 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11618 __FILE__ and __LINE__ to internal_error.
11619
98a5dd13
DE
116202011-05-13 Doug Evans <dje@google.com>
11621
11622 * thread-db.c (try_thread_db_load_from_sdir): New function.
11623 (try_thread_db_load_from_dir): New function.
11624 (thread_db_load_search): Handle $sdir, ignore $pdir.
11625 Remove trying of system directories if search of
11626 libthread-db-search-path fails, that is now done via $sdir.
11627
d248b706
KY
116282011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11629
11630 * server.c (handle_query): Add EnableDisableTracepoints to the list
11631 of supported features.
43aaf8b6 11632 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11633 tracepoints.
43aaf8b6
PA
11634 (cmd_qtenable_disable): New.
11635 (cmd_qtstart): Install tracepoints even if disabled.
11636 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11637 receiving a QTEnable or QTDisable packet.
11638 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11639 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11640 tracepoints.
11641 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11642
84e578fb
DE
116432011-05-10 Doug Evans <dje@google.com>
11644
11645 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11646
71f55dd8
DE
116472011-05-04 Doug Evans <dje@google.com>
11648
11649 * linux-low.c (linux_join): Skip process lookup.
11650 * spu-low.c (spu_join): Ditto.
11651 * server.c (join_inferiors_callback): Delete.
11652 (process_serial_event): For 'D' packet (detach) call join_inferior
11653 directly.
11654
4d393d60
JM
116552011-05-04 Joseph Myers <joseph@codesourcery.com>
11656
11657 * README: Don't mention xscale*-*-linux*.
11658 * configure.srv (xscale*-*-linux*): Don't handle target.
11659
b00ad6ff
NF
116602011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11661
11662 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11663 casting pointers.
11664 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11665 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11666 (i386_emit_void_call_2): Likewise.
11667
af96c192
YQ
116682011-04-26 Yao Qi <yao@codesourcery.com>
11669
43aaf8b6
PA
11670 * linux-low.c: Move common macros to linux-ptrace.h.
11671 Include linux-ptrace.h.
af96c192
YQ
11672 * Makefile.in (linux_ptrace_h): New.
11673 (linux-low.o): Depends on linux-ptrace.h.
11674
03f2bd59
JK
116752011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11676
11677 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11678 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11679 (remote_prepare): New function with most of the TCP code from ...
11680 (remote_open): ... here. Detect PORT here unconditionally. Move also
11681 setting transport_is_reliable.
11682 * server.c (run_once): New variable.
11683 (gdbserver_usage): Document it.
11684 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11685 the first run if RUN_ONCE.
11686 * server.h (run_once, remote_prepare): New declarations.
11687
7a9dd1b2
TT
116882011-04-19 Tom Tromey <tromey@redhat.com>
11689
11690 * win32-low.c (handle_load_dll): Remove duplicate "the".
11691
81239425
PM
116922011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11693
11694 Remove support for old Cygwin 1.5 versions.
11695 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11696 function to avoid warning.
11697 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11698 warning.
11699
9e0627f1
PM
117002011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11701
11702 * gdbserver/server.h (Macro _): Define it if not available.
11703
588eebee
MS
117042011-03-14 Michael Snyder <msnyder@vmware.com>
11705
348af9f7 11706 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11707
43f70d4c
JB
117082011-03-10 Joel Brobecker <brobecker@adacore.com>
11709
11710 * Makefile.in (maintainer-clean realclean distclean): Remove
11711 "make ... subdir_do" command.
11712
348af9f7
MS
117132011-03-10 Michael Snyder <msnyder@vmware.com>
11714
11715 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11716
11717 * server.c (handle_v_run): Free alloced buffer on early return.
11718
e637a4f5
YQ
117192011-03-09 Yao Qi <yao@codesourcery.com>
11720
11721 Revert:
11722 2011-03-04 Yao Qi <yao@codesourcery.com>
11723
11724 * Makefile.in: Remove GNU make feature --directory.
11725
11726 2011-03-05 Yao Qi <yao@codesourcery.com>
11727
11728 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11729 (subdir_do): New make target. Copied from gdb/Makefile.
11730 (maintainer-clean, realclean, distclean, clean): Call corresponding
11731 make targets in common/Makefile.
11732
11733 2011-02-11 Yao Qi <yao@codesourcery.com>
11734
11735 * configure.ac: Call AC_PROG_RANLIB.
11736 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11737 * configure: Regenerate.
11738
e6edda56
JK
117392011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11740
11741 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11742
e5141119
JB
117432011-03-06 Yao Qi <yao@codesourcery.com>
11744
11745 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11746
64794aa4
JB
117472011-03-05 Yao Qi <yao@codesourcery.com>
11748
11749 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11750 (subdir_do): New make target. Copied from gdb/Makefile.
11751 (maintainer-clean, realclean, distclean, clean): Call corresponding
11752 make targets in common/Makefile.
11753
7a762829
YQ
117542011-03-04 Yao Qi <yao@codesourcery.com>
11755
11756 * Makefile.in: Remove GNU make feature --directory.
11757
348af9f7
MS
117582011-03-04 Michael Snyder <msnyder@vmware.com>
11759
11760 * server.c (queue_stop_reply): Call xmalloc not malloc.
11761
117622011-03-02 Michael Snyder <msnyder@vmware.com>
11763
11764 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11765
9f72fee2
MS
117662011-02-28 Michael Snyder <msnyder@vmware.com>
11767
588eebee
MS
11768 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11769 (cmd_qtframe): Ditto.
11770 (cmd_qtbuffer): Ditto.
11771 (cmd_bigqtbuffer): Ditto.
11772
9f72fee2
MS
11773 * utils.c (decimal2str): Initialize 'width' to nine, then
11774 don't mess with it.
11775
8040bd49
UW
117762011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11777
11778 * hostio.c (require_data): Free *data, not data.
11779
7e52cbd0
JK
117802011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11781
11782 * hostio.c (require_data): Use free, not xfree.
11783
9130f83e
MS
117842011-02-27 Michael Snyder <msnyder@vmware.com>
11785
4b812f4e
MS
11786 * server.c (handle_query): Discard unused value.
11787
9130f83e
MS
11788 * hostio.c (require_data): Free malloc memory before returning
11789 error.
11790
69d37113
MS
117912011-02-26 Michael Snyder <msnyder@vmware.com>
11792
11793 * linux-low.c (list_threads): Call closedir for dirent.
11794
35f5825a
MS
117952011-02-27 Michael Snyder <msnyder@vmware.com>
11796
2a589cef
MS
11797 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11798 a case statement falls through.
11799
0adea5f7
MS
11800 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11801
35f5825a
MS
11802 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11803 in comparison.
11804
238f1c74
MS
118052011-02-26 Michael Snyder <msnyder@vmware.com>
11806
11807 * utils.c (decimal2str): Eliminate dead code and dead param.
11808 (pulongest): Drop dead param from call to decimal2str.
11809 (plongest): Ditto.
11810
633ff500
JB
118112011-02-24 Joel Brobecker <brobecker@adacore.com>
11812
11813 Revert the following patch (not approved yet):
11814 2011-02-21 Hui Zhu <teawater@gmail.com>
11815 * tracepoint.c (tp_printf): New function.
11816 (eval_agent_expr): Handle gdb_agent_op_printf.
11817
f9c6ff72
HZ
118182011-02-21 Hui Zhu <teawater@gmail.com>
11819
11820 * tracepoint.c (tp_printf): New function.
11821 (eval_agent_expr): Handle gdb_agent_op_printf.
11822
94d5e490
TT
118232011-02-18 Tom Tromey <tromey@redhat.com>
11824
11825 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11826 (tracepoint.o): Likewise.
11827 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11828 (gdb_agent_op_names): Likewise.
11829
c7f96d2b
TT
118302011-02-18 Tom Tromey <tromey@redhat.com>
11831
11832 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11833 gdb_agent_op_rot>: New constants.
11834 (gdb_agent_op_names): Add pick and roll.
11835 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11836 cases.
11837
0feedb2c
JK
118382011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11839
11840 * aclocal.m4: Regenerated with aclocal-1.11.1.
11841
b3b9301e
PA
118422011-02-14 Pedro Alves <pedro@codesourcery.com>
11843
11844 * server.c (handle_qxfer_traceframe_info): New.
11845 (qxfer_packets): Register "traceframe-info".
11846 (handle_query): Report support for qXfer:traceframe-info:read+.
11847 * tracepoint.c (match_blocktype): New.
11848 (traceframe_find_block_type): Rename to ...
11849 (traceframe_walk_blocks): ... this. Add callback filter argument,
11850 and use it.
11851 (traceframe_find_block_type): New, reimplemented on top of
11852 traceframe_walk_blocks.
11853 (build_traceframe_info_xml): New.
11854 (traceframe_read_info): New.
11855 * server.h (traceframe_read_info): Declare.
11856
4f3e6fb7
YQ
118572011-02-11 Yao Qi <yao@codesourcery.com>
11858
11859 * configure.ac: Call AC_PROG_RANLIB.
11860 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11861 * configure: Regenerate.
11862
764880b7
PA
118632011-02-07 Pedro Alves <pedro@codesourcery.com>
11864
11865 * server.c (gdb_read_memory): Change return semantics to allow
11866 partial transfers.
11867 (handle_search_memory_1): Adjust.
11868 (process_serial_event) <'m' packet>: Handle partial transfers.
11869 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11870
1c79eb8a
PA
118712011-01-28 Pedro Alves <pedro@codesourcery.com>
11872
11873 * regcache.c (init_register_cache): Initialize
11874 regcache->register_status.
11875 (free_register_cache): Release regcache->register_status.
11876 (regcache_cpy): Copy register_status.
11877 (registers_to_string): Print 'x's for unavailable registers.
11878 (supply_register): Mark the register's status valid or
11879 unavailable, depending on whether a buffer was passed in or not.
11880 (supply_register_zeroed): New.
11881 (supply_regblock): Mark the registers' status valid or
11882 unavailable, depending on whether a buffer was passed in or not.
11883 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11884 (struct regcache): New `register_status' field.
11885 (supply_register_zeroed): Declare.
11886 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11887 supply_register_zeroed, rather than passing a NULL buffer to
11888 supply_register.
11889 * tracepoint.c (fetch_traceframe_registers): Update comment.
11890
85724a0e
PA
118912011-01-28 Pedro Alves <pedro@codesourcery.com>
11892
11893 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11894 buffer explicit.
11895
d08aafef
PA
118962011-01-25 Pedro Alves <pedro@codesourcery.com>
11897
11898 * server.h (decode_xfer_write): Change prototype.
11899 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11900 and don't extract the annex here.
11901 * server.c (decode_xfer_read): Remove `annex' parameter,
11902 and don't extract the annex here.
11903 (decode_xfer): New.
11904 (struct qxfer): New.
11905 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11906 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11907 (handle_qxfer_statictrace): New functions, abstracted out from
11908 handle_query, and made to use the struct qxfer interface.
11909 (handle_threads_qxfer_proper): Rename to ...
11910 (handle_qxfer_threads_proper): ... this.
11911 (handle_threads_qxfer): Rename to ...
11912 (handle_qxfer_threads): ... this. Adjust.
11913 (qxfer_packets): New array.
11914 (handle_qxfer): New function.
11915 (handle_query): Use handle_qxfer.
11916
493e2a69
MS
119172011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11918
11919 * gdbreplay.c: Shorten lines of >= 80 columns.
11920 * linux-low.c: Ditto.
11921 * linux-ppc-low.c: Ditto.
11922 * linux-s390-low.c: Ditto.
11923 * linux-sparc-low.c: Ditto.
11924 * linux-x86-low.c: Ditto.
11925 * linux-xtensa-low.c: Ditto.
11926 * mem-break.c: Ditto.
11927 * nto-low.c: Ditto.
11928 * regcache.h: Ditto.
11929 * remote-utils.c: Ditto.
11930 * server.c: Ditto.
11931 * server.h: Ditto.
11932 * thread-db.c: Ditto.
11933 * tracepoint.c: Ditto.
11934 * utils.c: Ditto.
11935 * win32-low.h: Ditto.
11936
44944448
JB
119372011-01-05 Joel Brobecker <brobecker@adacore.com>
11938
11939 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11940 update.
11941
71ce852c
JB
119422011-01-01 Joel Brobecker <brobecker@adacore.com>
11943
11944 * server.c (gdbserver_version): Update copyright year in version
11945 output.
11946 * gdbreplay.c (gdbreplay_version): Ditto.
11947
eb826dc6
MF
119482010-12-29 Jie Zhang <jie.zhang@analog.com>
11949
11950 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11951 * linux-bfin-low.c: New file.
11952 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11953 PT_DATA_ADDR for BFIN targets.
11954 * Makefile.in (SFILES): Add linux-bfin-low.c.
11955 (clean): Remove reg-bfin.c.
11956 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11957 * README: Mention supported Blackfin targets.
11958
39ab222a
MF
119592010-12-23 Mike Frysinger <vapier@gentoo.org>
11960
11961 * .gitignore: New file.
11962
a1f2ce7d
MF
119632010-11-16 Mike Frysinger <vapier@gentoo.org>
11964
11965 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11966
f474844c
JZ
119672010-10-22 Jie Zhang <jie@codesourcery.com>
11968
11969 * Makefile.in: Add FLAGS_TO_PASS variable.
11970 (install): Remove dependency of install-only and recursively
11971 invoke make for install-only.
11972
f1048712
DE
119732010-10-04 Doug Evans <dje@google.com>
11974
11975 * Makefile.in (uninstall): Use $(DESTDIR).
11976
b53a1623
PA
119772010-09-24 Pedro Alves <pedro@codesourcery.com>
11978
e6ee044d
PA
11979 PR gdb/11842
11980
b53a1623
PA
11981 * linux-x86-low.c (compat_siginfo_from_siginfo)
11982 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11983 si_code is < 0. Check for si_code == SI_TIMER before checking for
11984 si_code < 0.
11985
fa1bd1e4
JB
119862010-09-13 Joel Brobecker <brobecker@adacore.com>
11987
11988 * lynx-i386-low.c: New file.
11989 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11990
47fac8f8
JB
119912010-09-13 Joel Brobecker <brobecker@adacore.com>
11992
11993 * lynx-low.c (ptrace_request_to_str): Remove handling for
11994 request values that have been removed in LynxOS 5.x.
11995
1adfc54d
JB
119962010-09-13 Joel Brobecker <brobecker@adacore.com>
11997
11998 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11999 <ptrace.h>
12000
c2a66c29
NS
120012010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12002
12003 * configure.ac: Add --enable-inprocess-agent option.
12004 * configure: Rebuilt.
12005
32fcada3
YQ
120062010-09-06 Yao Qi <yao@codesourcery.com>
12007
12008 * linux-low.c (linux_kill): Remove unused variable.
12009 (linux_stabilize_threads): Likewise.
12010 * server.c (start_inferior): Likewise.
12011 (queue_stop_reply_callback): Likewise.
12012 * tracepoint.c (do_action_at_tracepoint): Likewise.
12013
0cccb683
YQ
120142010-09-06 Yao Qi <yao@codesourcery.com>
12015
12016 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12017 on return.
12018
423ec54c
JK
120192010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12020
12021 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12022
12ac6819
PA
120232010-09-06 Pedro Alves <pedro@codesourcery.com>
12024
12025 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12026 "$(IPA_DEPFILES)".
12027
8ed54b31
JB
120282010-09-01 Joel Brobecker <brobecker@adacore.com>
12029
12030 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12031 gdbserver/lynx-ppc-low.c: New files.
12032 * Makefile.in (lynx_low_h): New variable.
12033 (lynx-low.o, lynx-ppc-low.o): New rules.
12034 * configure.ac: On LynxOS, link with -lnetinet.
12035 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12036 * configure: regenerate.
12037
bb0116a4
JB
120382010-09-01 Joel Brobecker <brobecker@adacore.com>
12039
12040 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12041 * configure.ac: Add check for vasprintf and vsnprintf.
12042 * configure, config.in: Regenerate.
12043 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12044
a778ab81 120452010-09-01 Joel Brobecker <brobecker@adacore.com>
12046
12047 * gdbreplay.c: Move include of alloca.h up, next to include of
12048 malloc.h.
12049 * server.h: Add include of malloc.h.
12050 * mem-break.c: Remove include of malloc.h.
12051 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12052
8b034a19 120532010-09-01 Joel Brobecker <brobecker@adacore.com>
12054
12055 * Makefile.in (memmem.o): Build with -Wno-error.
12056
120572010-09-01 Joel Brobecker <brobecker@adacore.com>
12058
12059 * utils.c (xsnprintf): Make non-static.
12060 * server.h: Add xsnprintf declaration.
12061 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12062 replace calls to snprintf by calls to xsnprintf throughout.
12063
120642010-09-01 Joel Brobecker <brobecker@adacore.com>
12065
12066 * configure.ac: Add configure check for alloca.
12067 * configure, config.in: Regenerate.
12068 * server.h: Include alloca.h if it exists.
12069 * gdbreplay.c: Include alloca.h if it exists.
12070
1a981360
PA
120712010-08-28 Pedro Alves <pedro@codesourcery.com>
12072
12073 * linux-low.c (__SIGRTMIN): Define if not already defined.
12074 (linux_create_inferior): Check for __ANDROID__ rather than
12075 __SIGRTMIN.
12076 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12077 are already deferred.
12078 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12079 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12080 stopped and already has a pending signal to report.
12081 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12082 a pending signal to report or is moving out of a jump pad.
12083 (linux_init_signals): Check for __ANDROID__ rather than
12084 __SIGRTMIN.
12085
b4d51a55
PA
120862010-08-28 Pedro Alves <pedro@codesourcery.com>
12087
12088 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12089 debug_threads check. Avoid a linear search when not doing debug
12090 output.
12091
ec48365d
PA
120922010-08-27 Pedro Alves <pedro@codesourcery.com>
12093
12094 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12095 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12096 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12097 (process_event): Change local fd's type to gdb_fildes_t.
12098 (create_file_handler): Adjust prototype.
12099 (delete_file_handler): Adjust prototype.
12100 (handle_file_event): Adjust prototype. Use pfildes.
12101 (create_file_event): Adjsut prototype.
12102 * remote-utils.c (remote_desc, listen_desc): Change type to
12103 gdb_fildes_t.
12104 * server.h: New gdb_fildes_t typedef.
12105 [USE_WIN32API]: Include winsock2.h.
12106 (delete_file_handler, add_file_handler): Adjust prototypes.
12107 (pfildes): Declare.
12108 * utils.c (pfildes): New.
12109
854d88f0
PA
121102010-08-27 Pedro Alves <pedro@codesourcery.com>
12111
12112 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12113 * configure: Regenerate.
12114
0146f85b
PA
121152010-08-27 Pedro Alves <pedro@codesourcery.com>
12116
12117 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12118 (linux_done_accessing_memory): ... this.
12119 (linux_target_ops): Adjust.
12120 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12121 * nto-low.c (nto_target_ops): Adjust comment.
12122 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12123 * spu-low.c (spu_target_ops): Adjust comment.
12124 * target.h (target_ops): Rename unprepare_to_access_memory field
12125 to done_accessing_memory.
12126 (unprepare_to_access_memory): Rename to ...
12127 (done_accessing_memory): ... this.
12128
90d74c30
PA
121292010-08-26 Pedro Alves <pedro@codesourcery.com>
12130
12131 * linux-low.c (linux_prepare_to_access_memory): New.
12132 (linux_unprepare_to_access_memory): New.
12133 (linux_target_ops): Install them.
12134 * server.c (read_memory): Rename to ...
12135 (gdb_read_memory): ... this. Use
12136 prepare_to_access_memory/prepare_to_access_memory.
12137 (write_memory): Rename to ...
12138 (gdb_write_memory): ... this. Use
12139 prepare_to_access_memory/prepare_to_access_memory.
12140 (handle_search_memory_1): Adjust.
12141 (process_serial_event): Adjust.
12142 * target.h (struct target_ops): New fields
12143 prepare_to_access_memory and unprepare_to_access_memory.
12144 (prepare_to_access_memory, unprepare_to_access_memory): New.
12145 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12146 prepare_to_access_memory/prepare_to_access_memory.
12147 * nto-low.c (nto_target_ops): Adjust.
12148 * spu-low.c (spu_target_ops): Adjust.
12149 * win32-low.c (win32_target_ops): Adjust.
12150
fd467969
PA
121512010-08-26 Pedro Alves <pedro@codesourcery.com>
12152
12153 * Makefile.in (WARN_CFLAGS): Get it from configure.
12154 (WERROR_CFLAGS): New.
12155 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12156 * configure.ac: Introduce --enable-werror, which adds -Werror to
12157 the compiler command line. Enabled by default. Disable with
12158 --disable-werror. Add -Wdeclaration-after-statement
12159 Wpointer-arith and -Wformat-nonliteral to warning flags.
12160 * configure: Regenerate.
12161
331e2f5f
PA
121622010-08-26 Pedro Alves <pedro@codesourcery.com>
12163
12164 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12165
e581f2b4
PA
121662010-08-26 Pedro Alves <pedro@codesourcery.com>
12167
12168 * gdbreplay.c (remote_error): New.
12169 (gdbchar): New.
12170 (expect): Use gdbchar. Check for error reading from GDB.
12171 Clarify sync error output.
12172 (play): Check for errors writing to GDB.
12173 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12174 * remote-utils.c (getpkt): Check for errors writing to the remote
12175 descriptor.
12176
3c11dd79
PA
121772010-08-25 Pedro Alves <pedro@codesourcery.com>
12178
12179 * linux-low.c (linux_wait_1): Move non-debugging code out of
12180 `debug_threads' control.
12181
d20a8ad9
PA
121822010-08-25 Pedro Alves <pedro@codesourcery.com>
12183
12184 * linux-low.c (linux_wait_1): Don't set last_status here.
12185 * server.c (push_event, queue_stop_reply_callback): Assert we're
12186 not pushing a TARGET_WAITKIND_IGNORE event.
12187 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12188 (myresume, handle_target_event): Set the thread's last_resume_kind
12189 and last_status from the target returned status.
12190
964e4306
PA
121912010-08-25 Pedro Alves <pedro@codesourcery.com>
12192
12193 PR threads/10729
12194
12195 * linux-x86-low.c (update_debug_registers_callback): New.
12196 (i386_dr_low_set_addr): Use it.
12197 (i386_dr_low_get_addr): New.
12198 (i386_dr_low_set_control): Use update_debug_registers_callback.
12199 (i386_dr_low_get_control): New.
12200 (i386_dr_low_get_status): Adjust.
12201 * linux-low.c (linux_stop_lwp): New.
12202 * linux-low.h (linux_stop_lwp): Declare.
12203
12204 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12205 argument instead of a i386_debug_reg_state.
12206 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12207 a i386_debug_reg_state.
12208 (i386_insert_aligned_watchpoint): Adjust.
12209 (i386_remove_aligned_watchpoint): Adjust.
12210 (i386_low_stopped_data_address): Read the debug registers from the
12211 inferior instead of from the mirrors.
12212 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12213 (i386_dr_low_get_addr): Declare.
12214 (i386_dr_low_get_control): Declare.
12215 (i386_dr_low_get_status): Change prototype.
12216
12217 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12218 (i386_dr_low_get_addr): New.
12219 (i386_dr_low_get_control): New.
12220 (i386_dr_low_get_status): Adjust prototype. Return
12221 dr_status_mirror.
12222 (i386_initial_stuff): Clear dr_status_mirror and
12223 dr_control_mirror.
12224 (i386_get_thread_context): Adjust.
12225 (i386_set_thread_context): Adjust.
12226 (i386_thread_added): Adjust.
12227
5f21a75b
PA
122282010-08-24 Pedro Alves <pedro@codesourcery.com>
12229
12230 * linux-low.h (linux_thread_area): Delete declaration.
12231
3e4c1235
TS
122322010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12233
12234 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12235 after its termination.
12236
1971b033
PA
122372010-08-09 Pedro Alves <pedro@codesourcery.com>
12238
12239 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12240 (gdb_wants_all_stopped): Delete.
12241 (linux_wait_1): Don't call them.
12242 * server.c (handle_v_cont): Tag all threads as want-stopped.
12243 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12244 stopped as "client-wants-stopped".
12245
310444ac
PA
122462010-07-31 Pedro Alves <pedro@codesourcery.com>
12247
12248 * Makefile.in (signals_h): New.
12249 (server_h): Depend on it.
12250 (server.o): Don't depend on $(signals_def).
12251 (signals.o): Depend on $(signals_def).
12252
a19cae16
JK
122532010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12254
12255 * Makefile.in (signals_def): New.
12256 (server_h): Append include/gdb/signals.h and signals_def.
12257 (server.o): Append signals_def.
12258
30d50328
JK
122592010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12260
12261 * server.c (handle_target_event): Use target_signal_to_host for
12262 resume_info.sig initialization.
12263 * target.h (struct thread_resume) <sig>: New comment.
12264
5c3216e2
OS
122652010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12266
c6f46ca0
OS
12267 * server.c (handle_query): strcpy() the returned string from paddress()
12268 instead of sprintf().
5c3216e2
OS
12269 * utils.c (paddress): Return phex_nz().
12270
6bd31874
JB
122712010-07-07 Joel Brobecker <brobecker@adacore.com>
12272
12273 * server.c (handle_v_cont): Call mourn_inferior if process
12274 just exited.
12275 (myresume): Likewise.
12276
0fb4aa4b
PA
122772010-07-01 Pedro Alves <pedro@codesourcery.com>
12278
12279 Static tracepoints, and integration with UST.
12280
12281 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12282 * mem-break.c (uninsert_all_breakpoints)
12283 (reinsert_all_breakpoints): New.
12284 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12285 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12286 (gdb_agent_ust_loaded, helper_thread_id)
12287 (gdb_agent_helper_thread_id): New macros.
12288 (struct ipa_sym_addresses): Add addr_ust_loaded,
12289 addr_helper_thread_id, addr_cmd_buf.
12290 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12291 (in_process_agent_loaded_ust): New.
12292 (write_e_ust_not_loaded): New.
12293 (maybe_write_ipa_ust_not_loaded): New.
12294 (struct collect_static_trace_data_action): New.
12295 (enum tracepoint_type) <static_tracepoint>: New.
12296 (struct tracepoint) <handle>: Mention static tracepoints.
12297 (struct static_tracepoint_ctx): New.
12298 (CMD_BUF_SIZE): New.
12299 (add_tracepoint_action): Handle static tracepoint actions.
12300 (unprobe_marker_at): New.
12301 (clear_installed_tracepoints): Handle static tracepoints.
12302 (cmd_qtdp): Handle static tracepoints.
12303 (probe_marker_at): New.
12304 (cmd_qtstart): Handle static tracepoints.
12305 (response_tracepoint): Handle static tracepoints.
12306 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12307 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12308 (get_context_regcache): Handle static tracepoints.
12309 (do_action_at_tracepoint): Handle static tracepoint actions.
12310 (traceframe_find_block_type): Handle static trace data blocks.
12311 (traceframe_read_sdata): New.
12312 (download_tracepoints): Download static tracepoint actions.
12313 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12314 (GDB_PROBE_NAME): New.
12315 (ust_ops): New.
12316 (GET_UST_SYM): New.
12317 (USTF): New.
12318 (dlsym_ust): New.
12319 (ust_marker_to_static_tracepoint): New.
12320 (gdb_probe): New.
12321 (collect_ust_data_at_tracepoint): New.
12322 (gdb_ust_probe): New.
12323 (UNIX_PATH_MAX, SOCK_DIR): New.
12324 (gdb_ust_connect_sync_socket): New.
12325 (resume_thread, stop_thread): New.
12326 (run_inferior_command): New.
12327 (init_named_socket): New.
12328 (gdb_ust_socket_init): New.
12329 (cstr_to_hexstr): New.
12330 (next_st): New.
12331 (first_marker, next_marker): New.
12332 (response_ust_marker): New.
12333 (cmd_qtfstm, cmd_qtsstm): New.
12334 (unprobe_marker_at, probe_marker_at): New.
12335 (cmd_qtstmat, gdb_ust_thread): New.
12336 (gdb_ust_init): New.
12337 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12338 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12339 (ST_REGENTRY): New.
12340 (x86_64_st_collect_regmap): New.
12341 (X86_64_NUM_ST_COLLECT_GREGS): New.
12342 (AMD64_RIP_REGNUM): New.
12343 (supply_static_tracepoint_registers): New.
12344 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12345 (ST_REGENTRY): New.
12346 (i386_st_collect_regmap): New.
12347 (i386_NUM_ST_COLLECT_GREGS): New.
12348 (supply_static_tracepoint_registers): New.
12349 * server.c (handle_query): Handle qXfer:statictrace:read.
12350 <qSupported>: Report support for StaticTracepoints, and
12351 qXfer:statictrace:read features.
12352 * server.h (traceframe_read_sdata)
12353 (supply_static_tracepoint_registers): Declare.
12354 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12355 (unpack_varlen_hex): Include in IPA build.
12356 * Makefile.in (ustlibs, ustinc): New.
12357 (IPA_OBJS): Add remote-utils-ipa.o.
12358 ($(IPA_LIB)): Link -ldl and -lpthread.
12359 (UST_CFLAGS): New.
12360 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12361 * config.in, configure: Regenerate.
12362
9e4344e5
PA
123632010-06-20 Ian Lance Taylor <iant@google.com>
12364 Pedro Alves <pedro@codesourcery.com>
12365
12366 * linux-x86-low.c (always_true): Delete.
12367 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12368 trying to fool the compiler with always_true.
12369
c6beb2cb
PA
123702010-06-20 Pedro Alves <pedro@codesourcery.com>
12371
12372 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12373 conditions in gdbserver.
12374
d2ed6730
UW
123752010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12376
12377 * spu-low.c (spu_read_memory): Wrap around local store limit.
12378 (spu_write_memory): Likewise.
12379
4e29fb54
PA
123802010-06-15 Pedro Alves <pedro@codesourcery.com>
12381
12382 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12383 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12384 LONGEST uses.
12385 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12386 uses.
12387 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12388 uses with LONGEST uses.
12389
6a271cae
PA
123902010-06-14 Stan Shebs <stan@codesourcery.com>
12391 Pedro Alves <pedro@codesourcery.com>
12392
12393 Bytecode compiler.
12394
12395 * linux-x86-low.c: Include limits.h.
12396 (add_insns): New.
12397 (always_true): New.
12398 (EMIT_ASM): New.
12399 (EMIT_ASM32): New.
12400 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12401 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12402 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12403 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12404 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12405 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12406 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12407 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12408 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12409 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12410 (amd64_emit_void_call_2): New.
12411 (amd64_emit_ops): New.
12412 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12413 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12414 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12415 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12416 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12417 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12418 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12419 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12420 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12421 (i386_emit_stack_adjust, i386_emit_int_call_1)
12422 (i386_emit_void_call_2): New.
12423 (i386_emit_ops): New.
12424 (x86_emit_ops): New.
12425 (the_low_target): Install x86_emit_ops.
12426 * server.h (struct emit_ops): New.
12427 (get_raw_reg_func_addr): Declare.
12428 (current_insn_ptr, emit_error): Declare.
12429 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12430 (set_trace_state_variable_value): New defines.
12431 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12432 addr_get_trace_state_variable_value and
12433 addr_set_trace_state_variable_value.
12434 (symbol_list): New fields for get_raw_reg,
12435 get_trace_state_variable_value and set_trace_state_variable_value.
12436 (condfn): New typedef.
12437 (struct tracepoint): New field `compiled_cond'.
12438 (do_action_at_tracepoint): Clear compiled_cond.
12439 (get_trace_state_variable_value, set_trace_state_variable_value):
12440 Export in the IPA.
12441 (condition_true_at_tracepoint): If there's a compiled condition,
12442 run that.
12443 (current_insn_ptr, emit_error): New globals.
12444 (struct bytecode_address): New.
12445 (get_raw_reg_func_addr): New.
12446 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12447 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12448 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12449 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12450 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12451 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12452 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12453 (compile_tracepoint_condition, compile_bytecodes): New.
12454 * target.h (emit_ops): Forward declare.
12455 (struct target_ops): New field emit_ops.
12456 (target_emit_ops): New.
12457 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12458 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12459 * linux-low.c (linux_emit_ops): New.
12460 (linux_target_ops): Install it.
12461 * linux-low.h (struct linux_target_ops): New field emit_ops.
12462
92b72907
UW
124632010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12464
12465 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12466 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12467
fa593d66
PA
124682010-06-01 Pedro Alves <pedro@codesourcery.com>
12469 Stan Shebs <stan@codesourcery.com>
12470
12471 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12472 (all): Depend on $(extra_libraries).
12473 (install-only): Install the IPA.
12474 (IPA_OBJS, IPA_LIB): New.
12475 (clean): Remove the IPA lib.
12476 (IPAGENT_CFLAGS): New.
12477 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12478 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12479 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12480 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12481 * configure.ac: Check for atomic builtins support in the compiler.
12482 (IPA_DEPFILES, extra_libraries): Define.
12483 * configure.srv (ipa_obj): Add description.
12484 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12485 (i[34567]86-*-linux*): Set ipa_obj.
12486 (x86_64-*-linux*): Set ipa_obj.
12487 * linux-low.c (stabilizing_threads): New.
12488 (supports_fast_tracepoints): New.
12489 (linux_detach): Stabilize threads before detaching.
12490 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12491 the lwp is either not stabilizing, or is moving out of a jump pad.
12492 (linux_fast_tracepoint_collecting): New.
12493 (maybe_move_out_of_jump_pad): New.
12494 (enqueue_one_deferred_signal): New.
12495 (dequeue_one_deferred_signal): New.
12496 (linux_wait_for_event_1): If moving out of a jump pad, defer
12497 pending signals to later.
12498 (linux_stabilize_threads): New.
12499 (linux_wait_1): Check if threads need moving out of jump pads, and
12500 do it if so.
12501 (stuck_in_jump_pad_callback): New.
12502 (move_out_of_jump_pad_callback): New.
12503 (lwp_running): New.
12504 (linux_resume_one_lwp): Handle moving out of jump pads.
12505 (linux_set_resume_request): Dequeue deferred signals.
12506 (need_step_over_p): Also step over fast tracepoint jumps.
12507 (start_step_over): Also uninsert fast tracepoint jumps.
12508 (finish_step_over): Also reinsert fast tracepoint jumps.
12509 (linux_install_fast_tracepoint_jump): New.
12510 (linux_target_ops): Install linux_stabilize_threads and
12511 linux_install_fast_tracepoint_jump_pad.
12512 * linux-low.h (linux_target_ops) <get_thread_area,
12513 install_fast_tracepoint_jump_pad>: New fields.
12514 (struct lwp_info) <collecting_fast_tracepoint,
12515 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12516 (linux_get_thread_area): Declare.
12517 * linux-x86-low.c (jump_insn): New.
12518 (x86_get_thread_area): New.
12519 (append_insns): New.
12520 (push_opcode): New.
12521 (amd64_install_fast_tracepoint_jump_pad): New.
12522 (i386_install_fast_tracepoint_jump_pad): New.
12523 (x86_install_fast_tracepoint_jump_pad): New.
12524 (the_low_target): Install x86_get_thread_area and
12525 x86_install_fast_tracepoint_jump_pad.
12526 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12527 (struct fast_tracepoint_jump): New.
12528 (fast_tracepoint_jump_insn): New.
12529 (fast_tracepoint_jump_shadow): New.
12530 (find_fast_tracepoint_jump_at): New.
12531 (fast_tracepoint_jump_here): New.
12532 (delete_fast_tracepoint_jump): New.
12533 (set_fast_tracepoint_jump): New.
12534 (uninsert_fast_tracepoint_jumps_at): New.
12535 (reinsert_fast_tracepoint_jumps_at): New.
12536 (set_breakpoint_at): Use write_inferior_memory.
12537 (uninsert_raw_breakpoint): Use write_inferior_memory.
12538 (check_mem_read): Mask out fast tracepoint jumps.
12539 (check_mem_write): Mask out fast tracepoint jumps.
12540 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12541 (set_fast_tracepoint_jump): Declare.
12542 (delete_fast_tracepoint_jump)
12543 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12544 (reinsert_fast_tracepoint_jumps_at): Declare.
12545 * regcache.c: Don't compile many functions when building the
12546 in-process agent library.
12547 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12548 the register buffer in the heap.
12549 (free_register_cache): If the register buffer isn't owned by the
12550 regcache, don't free it.
12551 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12552 pre-existing register caches.
12553 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12554 type.
12555 (convert_ascii_to_int): : Constify `from' parameter type.
12556 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12557 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12558 the needed buffer in-place.
12559 (relocate_instruction): New.
12560 * server.c (handle_query) <qSymbols>: If the target supports
12561 tracepoints, give it a chance of looking up symbols. Report
12562 support for fast tracepoints.
12563 (handle_status): Stabilize threads.
12564 (process_serial_event): Adjust.
12565 * server.h (struct fast_tracepoint_jump): Forward declare.
12566 (struct process_info) <fast_tracepoint_jumps>: New field.
12567 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12568 (decode_X_packet, decode_M_packet): Adjust.
12569 (relocate_instruction): Declare.
12570 (in_process_agent_loaded): Declare.
12571 (tracepoint_look_up_symbols): Declare.
12572 (struct fast_tpoint_collect_status): Declare.
12573 (fast_tracepoint_collecting): Declare.
12574 (force_unlock_trace_buffer): Declare.
12575 (handle_tracepoint_bkpts): Declare.
12576 (initialize_low_tracepoint)
12577 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12578 * target.h (struct target_ops) <stabilize_threads,
12579 install_fast_tracepoint_jump_pad>: New fields.
12580 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12581 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12582 [HAVE_STDINT_H]: Include stdint.h.
12583 (trace_debug_1): Rename to ...
12584 (trace_vdebug): ... this.
12585 (trace_debug): Rename to ...
12586 (trace_debug_1): ... this. Add `level' parameter.
12587 (trace_debug): New.
12588 (ATTR_USED, ATTR_NOINLINE): New.
12589 (IP_AGENT_EXPORT): New.
12590 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12591 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12592 (about_to_request_buffer_space, trace_buffer_is_full)
12593 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12594 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12595 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12596 (traceframe_write_count, traceframes_created)
12597 (trace_state_variables)
12598 New renaming defines.
12599 (struct ipa_sym_addresses): New.
12600 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12601 (symbol_list): New.
12602 (ipa_sym_addrs): New.
12603 (all_tracepoint_symbols_looked_up): New.
12604 (in_process_agent_loaded): New.
12605 (write_e_ipa_not_loaded): New.
12606 (maybe_write_ipa_not_loaded): New.
12607 (tracepoint_look_up_symbols): New.
12608 (debug_threads) [IN_PROCESS_AGENT]: New.
12609 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12610 (UNKNOWN_SIDE_EFFECTS): New.
12611 (stop_tracing): New.
12612 (flush_trace_buffer): New.
12613 (stop_tracing_bkpt): New.
12614 (flush_trace_buffer_bkpt): New.
12615 (read_inferior_integer): New.
12616 (read_inferior_uinteger): New.
12617 (read_inferior_data_pointer): New.
12618 (write_inferior_data_pointer): New.
12619 (write_inferior_integer): New.
12620 (write_inferior_uinteger): New.
12621 (struct collect_static_trace_data_action): Delete.
12622 (enum tracepoint_type): New.
12623 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12624 <actions_str, step_actions, step_actions_str>: Only include in
12625 GDBserver.
fa593d66
PA
12626 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12627 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12628 (tracepoints): Use IP_AGENT_EXPORT.
12629 (last_tracepoint): Don't include in the IPA.
12630 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12631 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12632 (alloced_trace_state_variables): New.
12633 (trace_state_variables): Use IP_AGENT_EXPORT.
12634 (traceframe_t): Delete unused variable.
12635 (circular_trace_buffer): Don't include in the IPA.
12636 (trace_buffer_start): Delete.
12637 (struct trace_buffer_control): New.
12638 (trace_buffer_free): Delete.
12639 (struct ipa_trace_buffer_control): New.
12640 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12641 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12642 New.
12643 (trace_buffer_ctrl): New.
12644 (TRACE_BUFFER_CTRL_CURR): New.
12645 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12646 Reimplement as macros.
12647 (trace_buffer_wrap): Delete.
12648 (traceframe_write_count, traceframe_read_count)
12649 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12650 (struct tracepoint_hit_ctx) <type>: New field.
12651 (struct fast_tracepoint_ctx): New.
12652 (memory_barrier): New.
12653 (cmpxchg): New.
12654 (record_tracepoint_error): Update atomically in the IPA.
12655 (clear_inferior_trace_buffer): New.
12656 (about_to_request_buffer_space): New.
12657 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12658 updating the same buffer.
12659 (add_tracepoint): Default the tracepoint's type to trap
12660 tracepoint, and orig_size to -1.
12661 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12662 internal variables.
12663 (create_trace_state_variable): New parameter `gdb'. Handle it.
12664 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12665 (cmd_qtdp): Handle fast tracepoints.
12666 (cmd_qtdv): Adjust.
12667 (max_jump_pad_size): New.
12668 (gdb_jump_pad_head): New.
12669 (get_jump_space_head): New.
12670 (claim_jump_space): New.
12671 (sort_tracepoints): New.
12672 (MAX_JUMP_SIZE): New.
12673 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12674 IPA.
12675 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12676 support. Upload fast traceframes, and delete internal IPA
12677 breakpoints.
12678 (stop_tracing_handler): New.
12679 (flush_trace_buffer_handler): New.
12680 (cmd_qtstop): Upload fast tracepoints.
12681 (response_tracepoint): Handle fast tracepoints.
12682 (tracepoint_finished_step): Upload fast traceframes. Set the
12683 tracepoint hit context's tracepoint type.
12684 (handle_tracepoint_bkpts): New.
12685 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12686 type. Add comment about fast tracepoints.
12687 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12688 non-existing action_str field.
12689 (get_context_regcache): Handle fast tracepoints.
12690 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12691 to the regcache.
12692 (fast_tracepoint_from_jump_pad_address): New.
12693 (fast_tracepoint_from_ipa_tpoint_address): New.
12694 (collecting_t): New.
12695 (force_unlock_trace_buffer): New.
12696 (fast_tracepoint_collecting): New.
12697 (collecting): New.
12698 (gdb_collect): New.
12699 (write_inferior_data_ptr): New.
12700 (target_tp_heap): New.
12701 (target_malloc): New.
12702 (download_agent_expr): New.
12703 (UALIGN): New.
12704 (download_tracepoints): New.
12705 (download_trace_state_variables): New.
12706 (upload_fast_traceframes): New.
12707 (IPA_FIRST_TRACEFRAME): New.
12708 (IPA_NEXT_TRACEFRAME_1): New.
12709 (IPA_NEXT_TRACEFRAME): New.
12710 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12711 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12712 (gdb_jump_pad_buffer_end): New.
12713 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12714 (initialize_tracepoint): Adjust.
12715 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12716 buffer. Initialize the low module.
12717 * utils.c (PREFIX, TOOLNAME): New.
12718 (malloc_failure): Use PREFIX.
12719 (error): In the IPA, an error causes an exit.
12720 (fatal, warning): Use PREFIX.
12721 (internal_error): Use TOOLNAME.
12722 (NUMCELLS): Increase to 10.
12723 * configure, config.in: Regenerate.
12724
d149dd1d
PA
127252010-06-01 Pedro Alves <pedro@codesourcery.com>
12726
12727 * server.c (handle_query) <qSupported>: Do two passes over the
12728 qSupported string to avoid nesting strtok.
12729
f6528abd
JK
127302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12731
12732 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12733 (CDEPS): New.
12734 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12735 -Wl,--dynamic-list.
12736 * configure: Regenerate.
12737 * proc-service.list: New.
12738
ca2a87a0
JK
127392010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12740
12741 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12742 New comment.
12743
363a6e9f
OS
127442010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12745
12746 * gdbreplay.c (remote_open): Check error return from socket() call by
12747 its equality to -1 not by it being negative.
12748 * remote-utils.c (remote_open): Likewise.
12749
d23b6cb1
PA
127502010-05-23 Pedro Alves <pedro@codesourcery.com>
12751
12752 * config.h: Regenerate.
12753
28d3cf85
MK
127542010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12755
12756 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12757 doesn't provide PTRACE_GET_THREAD_AREA.
12758
fea36a59
MK
127592010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12760
12761 * linux-m68k-low.c: Include <asm/ptrace.h>
12762 (ps_get_thread_area): Implement.
12763
24b066ba
DE
127642010-05-03 Doug Evans <dje@google.com>
12765
12766 * event-loop.c (struct callback_event): New struct.
12767 (callback_list): New global.
12768 (append_callback_event, delete_callback_event): New functions.
12769 (process_callback): New function.
12770 (start_event_loop): Call it.
12771 * remote-utils.c (NOT_SCHEDULED): Define.
12772 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12773 moved out of readchar.
12774 (readchar): Rewrite. Call reschedule before returning.
12775 (reset_readchar): New function.
12776 (remote_close): Call it.
12777 (process_remaining, reschedule): New functions.
12778 * server.h (callback_handler_func): New typedef.
12779 (append_callback_event, delete_callback_event): Declare.
12780
9836d6ea
PA
127812010-05-03 Pedro Alves <pedro@codesourcery.com>
12782
12783 * proc-service.c (ps_pglobal_lookup): Use
12784 thread_db_look_up_one_symbol.
12785 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12786 parameter. Use it instead of all_symbols_looked_up.
12787 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12788 field.
12789 (all_symbols_looked_up): Don't declare.
12790 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12791 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12792 field.
12793 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12794 Set all_symbols_looked_up here.
12795 (thread_db_look_up_one_symbol): New.
12796 (thread_db_get_tls_address): Adjust.
12797 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12798 thread_db object on the heap, and tentatively set it in the
12799 process structure.
12800 (thread_db_init): Don't set all_symbols_looked_up here.
12801 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12802
7984d532
PA
128032010-05-03 Pedro Alves <pedro@codesourcery.com>
12804
12805 * linux-low.c (linux_kill, linux_detach): Adjust.
12806 (status_pending_p_callback): Remove redundant statement. Check
12807 for !TARGET_WAITIKIND_IGNORE, instead of
12808 TARGET_WAITKIND_STOPPED.
12809 (handle_tracepoints): Make sure LWP is locked. Adjust.
12810 (linux_wait_for_event_1): Adjust.
12811 (linux_cancel_breakpoints): New.
12812 (unsuspend_one_lwp): New.
12813 (unsuspend_all_lwps): New.
12814 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12815 (send_sigstop_callback): Change return type to int, add new
12816 `except' parameter and handle it.
12817 (suspend_and_send_sigstop_callback): New.
12818 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12819 pass them down. If SUSPEND, also increment the lwp's suspend
12820 count.
12821 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12822 (need_step_over_p): Don't consider suspended LWPs.
12823 (start_step_over): Adjust.
12824 (proceed_one_lwp): Change return type to int, add new `except'
12825 parameter and handle it.
12826 (unsuspend_and_proceed_one_lwp): New.
12827 (proceed_all_lwps): Use find_inferior instead of
12828 for_each_inferior.
12829 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12830 also decrement the suspend count of LWPs. Pass `except' down,
12831 instead of hacking its suspend count.
12832 (linux_pause_all): Add `freeze' parameter. Adjust.
12833 (linux_unpause_all): New.
12834 (linux_target_ops): Install linux_unpause_all.
12835 * server.c (handle_status): Adjust.
12836 * target.h (struct target_ops): New fields `unpause_all' and
12837 `cancel_breakpoints'. Add new parameter to `pause_all'.
12838 (pause_all): Add new `freeze' parameter.
12839 (unpause_all): New.
12840 (cancel_breakpoints): New.
12841 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12842 cancel breakpoints.
12843 (cmd_qtstart): Pause threads.
12844 (stop_tracing): Pause threads, and cancel breakpoints.
12845 * win32-low.c (win32_target_ops): Adjust.
12846
e471f25b
PA
128472010-05-03 Pedro Alves <pedro@codesourcery.com>
12848
12849 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12850 the inferior right away from here...
12851 (linux_wait_1): ... to here, and adjust to check the thread's
12852 last_resume_kind instead of the lwp's step or stop_expected flags.
12853
1915ef4f
PA
128542010-05-02 Pedro Alves <pedro@codesourcery.com>
12855
12856 * README: Use consistent `GDB' and `GDBserver' spellings.
12857
f9e39928
PA
128582010-05-02 Pedro Alves <pedro@codesourcery.com>
12859
12860 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12861 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12862 (linux_detach_one_lwp): Assume the lwp is stopped.
12863 (any_thread_of): Delete.
12864 (linux_detach): Stop all lwps here. Don't blindly delete all
12865 breakpoints.
12866 (delete_lwp_callback): New.
12867 (linux_mourn): Delete all lwps of the process that is gone.
12868 (linux_wait_1): Don't delete the last lwp of the process here.
12869 * mem-break.h (mark_breakpoints_out): Declare.
12870 * mem-break.c (mark_breakpoints_out): New.
12871 (free_all_breakpoints): Use it.
12872 * server.c (handle_target_event): If the process is gone, mark
12873 breakpoints out.
12874 * thread-db.c (struct thread_db) <create_bp>: New field.
12875 (thread_db_enable_reporting): Fix prototype. Store a thread event
12876 breakpoint reference in the thread_db struct.
12877 (thread_db_load_search): Clear the thread_db object.
12878 (try_thread_db_load_1): Ditto.
12879 (switch_to_process): New.
12880 (disable_thread_event_reporting): Use it.
12881 (remove_thread_event_breakpoints): New.
12882 (thread_db_detach, thread_db_mourn): Use it.
12883
1e7fc18c
PA
128842010-05-01 Pedro Alves <pedro@codesourcery.com>
12885
12886 * linux-low.c (linux_enable_event_reporting): New.
12887 (linux_wait_for_event_1, handle_extended_wait): Use it.
12888
02fc4de7
PA
128892010-04-30 Pedro Alves <pedro@codesourcery.com>
12890
12891 * linux-low.c (linux_kill_one_lwp, linux_kill)
12892 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12893 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12894 SIGSTOP even if the LWP is stopped.
12895 (send_sigstop_callback): New.
12896 (stop_all_lwps): Use send_sigstop_callback instead.
12897 (linux_resume_one_thread): Adjust.
12898 (proceed_one_lwp): Still proceed an LWP that the client has
12899 requested to stop, if we haven't reported it as stopped yet. Make
12900 sure that LWPs the client want stopped, have a pending SIGSTOP.
12901
bc3b5632
DE
129022010-04-26 Doug Evans <dje@google.com>
12903
ae1ada35
DE
12904 * server.c (handle_general_set): Make static.
12905
bc3b5632
DE
12906 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12907 Print received char after testing for error/eof instead of before.
12908 (input_interrupt): Tweak comment.
12909
65730243
DE
129102010-04-23 Doug Evans <dje@google.com>
12911
12912 * server.c (start_inferior): Print inferior argv if --debug.
12913
a8ae7dc0
AR
129142010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12915
12916 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12917 * nto-x86-low.c: Include server.h
12918
1c07cc19
PM
129192010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12920
12921 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12922 be consistent with other sources of this directory.
12923 (init_registers_amd64): Correct name of source file of this function
12924 in the comment.
12925
e0a61e09
PM
129262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12927
12928 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12929 64-bit executables.
12930
54709339
PM
129312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12932
12933 * win32-i386-low.c: Add 64-bit support.
12934 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12935 (init_registers_amd64): Declare.
12936 (mappings): Add 64-bit version of array.
12937 (init_windows_x86): New function.
12938 (the_low_target): Change init_arch field to init_windows_x86.
12939
e8f0053d
PM
129402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12941
12942 * win32-low.c: Adapt to support also 64-bit architecture.
12943 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12944 (get_image_name): Use SIZE_T type for local variable `done'.
12945 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12946 (toolhelp_get_dll_name): Idem.
12947 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12948 Use uintptr_t typecast to avoid warning.
12949 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12950 (handle_exception): Use phex_nz to avoid warning.
12951 (win32_wait): Remove unused local variable `process'.
12952
c481e77e
PM
129532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12954
12955 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12956 `amd64-avx.o'.
12957
12ea4b69
PM
129582010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12959
12960 * configure.ac: Use `ws2_32' library for srv_mingw.
12961 * configure: Regenerate.
12962 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12963 * remote-utils.c: Likewise.
12964
f6d1620c
L
129652010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12966
12967 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12968 if __x86_64__ is defined.
12969
8e642873
PM
129702010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12971
12972 * configure: Regenerate.
12973
711e434b
PM
129742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12975
12976 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12977 * target.h (target_ops): New get_tib_address field.
12978 * win32-low.h (win32_thread_info): Add thread_local_base field.
12979 * win32-low.c (child_add_thread): Add tlb argument.
12980 Set thread_local_base field to TLB.
12981 (get_child_debug_event): Adapt to child_add_thread change.
12982 (win32_get_tib_address): New function.
12983 (win32_target_ops): Set get_tib_address field to
12984 win32_get_tib_address.
12985 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12986
505106cd
PA
129872010-04-12 Pedro Alves <pedro@codesourcery.com>
12988
505106cd
PA
12989 * linux-low.c (linux_mourn): Also remove the process.
12990 * server.c (handle_target_event): Don't remove the process here.
12991 * nto-low.c (nto_mourn): New.
12992 (nto_target_ops): Install it.
12993 * spu-low.c (spu_mourn): New.
12994 (spu_target_ops): Install it.
12995 * win32-low.c (win32_mourn): New.
12996 (win32_target_ops): Install it.
12997
e8470a06
PA
129982010-04-12 Pedro Alves <pedro@codesourcery.com>
12999
13000 * server.h (buffer_xml_printf): Remove redundant `;'.
13001
45ba0d02
PA
130022010-04-12 Pedro Alves <pedro@codesourcery.com>
13003
13004 * regcache.c (set_register_cache): Invalidate regcaches before
13005 changing the register cache layout.
13006 (regcache_invalidate_one): Allow a NULL regcache.
13007 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13008 regcaches before changing the register cache layout or the target
13009 regsets.
13010
59e04013
L
130112010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13012
13013 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13014 variable warning on Linux/x86-64.
13015
8336d594
PA
130162010-04-11 Pedro Alves <pedro@codesourcery.com>
13017
13018 GDBserver disconnected tracing support.
13019
13020 * linux-low.c (linux_remove_process): Delete.
13021 (add_lwp): Don't set last_resume_kind here.
13022 (linux_kill): Use `mourn'.
13023 (linux_detach): Use `thread_db_detach', and `mourn'.
13024 (linux_mourn): New.
13025 (linux_attach_lwp_1): Adjust comment.
13026 (linux_attach): last_resume_kind moved the thread_info; adjust.
13027 (status_pending_p_callback): Adjust.
13028 (linux_wait_for_event_1): Adjust.
13029 (count_events_callback, select_singlestep_lwp_callback)
13030 (select_event_lwp_callback, cancel_breakpoints_callback)
13031 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13032 (proceed_one_lwp): Adjust.
13033 (linux_async): Add debug output.
13034 (linux_thread_stopped): New.
13035 (linux_pause_all): New.
13036 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13037 linux_pause_all.
13038 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13039 (thread_db_free): Delete declaration.
13040 (thread_db_detach, thread_db_mourn): Declare.
13041 * thread-db.c (thread_db_init): Use thread_db_mourn.
13042 (thread_db_free): Delete, split in two.
13043 (disable_thread_event_reporting): New.
13044 (thread_db_detach): New.
13045 (thread_db_mourn): New.
13046
13047 * server.h (struct thread_info) <last_resume_kind>: New field.
13048 <attached>: Add comment.
13049 <gdb_detached>: New field.
13050 (handler_func): Change return type to int.
13051 (handle_serial_event, handle_target_event): Ditto.
13052 (gdb_connected): Declare.
13053 (tracing): Delete.
13054 (disconnected_tracing): Declare.
13055 (stop_tracing): Declare.
13056
13057 * server.c (handle_query) <qSupported>: Report support for
13058 disconnected tracing.
13059 (queue_stop_reply_callback): Account for running threads.
13060 (gdb_wants_thread_stopped): New.
13061 (gdb_wants_all_threads_stopped): New.
13062 (gdb_reattached_process): New.
13063 (handle_status): Clear the `gdb_detached' flag of all processes.
13064 In all-stop, stop all threads.
13065 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13066 (process_serial_event): If the remote connection breaks, or if an
13067 exit was forced with "monitor exit", force an event loop exit.
13068 Handle disconnected tracing on detach.
13069 (handle_serial_event): Adjust.
13070 (handle_target_event): If GDB isn't connected, forward events back
13071 to the inferior, unless the last process exited, in which case,
13072 exit gdbserver. Adjust interface.
13073
13074 * remote-utils.c (remote_open): Don't block in accept. Instead
13075 register an event loop source on the listen socket file
13076 descriptor. Refactor bits into ...
13077 (listen_desc): ... this new global.
13078 (gdb_connected): ... this new function.
13079 (enable_async_notification): ... this new function.
13080 (handle_accept_event): ... this new function.
13081 (remote_close): Clear remote_desc.
13082
13083 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13084
13085 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13086 New fields.
13087 (mourn_inferior): Define.
13088 (target_process_qsupported): Avoid the dangling else problem.
13089 (thread_stopped): Define.
13090 (pause_all): Define.
13091 (target_waitstatus_to_string): Declare.
13092 * target.c (target_waitstatus_to_string): New.
13093
13094 * tracepoint.c (tracing): Make extern.
13095 (disconnected_tracing): New.
13096 (stop_tracing): Make extern. Handle tracing stops due to GDB
13097 disconnecting.
13098 (cmd_qtdisconnected): New.
13099 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13100 (handle_tracepoint_general_set): Handle QTDisconnected.
13101
13102 * event-loop.c (event_handler_func): Change return type to int.
13103 (process_event): Bail out if the event handler wants the event
13104 loop to stop.
13105 (handle_file_event): Ditto.
13106 (start_event_loop): Bail out if the event handler wants the event
13107 loop to stop.
13108
13109 * nto-low.c (nto_target_ops): Adjust.
13110 * spu-low.c (spu_wait): Don't remove the process here.
13111 (spu_target_ops): Adjust.
13112 * win32-low.c (win32_wait): Don't remove the process here.
13113 (win32_target_ops): Adjust.
13114
5d267c4c
PA
131152010-04-11 Pedro Alves <pedro@codesourcery.com>
13116
13117 * regcache.c (realloc_register_cache): Invalidate inferior's
13118 regcache before recreating it.
13119
623ccd72
PA
131202010-04-09 Pedro Alves <pedro@codesourcery.com>
13121
13122 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13123
219f2f23
PA
131242010-04-09 Stan Shebs <stan@codesourcery.com>
13125 Pedro Alves <pedro@codesourcery.com>
13126
13127 * server.h (LONGEST): New.
13128 (struct thread_info) <while_stepping>: New field.
13129 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13130 Declare.
13131 (initialize_tracepoint, handle_tracepoint_general_set)
13132 (handle_tracepoint_query, tracepoint_finished_step)
13133 (tracepoint_was_hit, release_while_stepping_state_list):
13134 (current_traceframe): Declare.
13135 * server.c (handle_general_set): Handle tracepoint packets.
13136 (read_memory): New.
13137 (write_memory): New.
13138 (handle_search_memory_1): Use read_memory.
13139 (handle_query): Report support for conditional tracepoints, trace
13140 state variables, and tracepoint sources. Handle tracepoint
13141 queries.
13142 (main): Initialize the tracepoints module.
13143 (process_serial_event): Handle traceframe reads/writes.
13144
13145 * linux-low.c (handle_tracepoints): New.
13146 (linux_wait_1): Call it.
13147 (linux_resume_one_lwp): Handle while-stepping.
13148 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13149 (linux_target_ops): Install them.
13150 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13151 New field.
13152 * linux-x86-low.c (x86_supports_tracepoints): New.
13153 (the_low_target). Install it.
13154
13155 * mem-break.h (delete_breakpoint): Declare.
13156 * mem-break.c (delete_breakpoint): Make external.
13157
13158 * target.h (struct target_ops): Add `supports_tracepoints',
13159 `read_pc', and `write_pc' fields.
13160 (target_supports_tracepoints): Define.
13161 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13162 (phex_nz): New.
13163
13164 * regcache.h (struct regcache) <registers_owned>: New field.
13165 (init_register_cache, regcache_cpy): Declare.
13166 (regcache_read_pc, regcache_write_pc): Declare.
13167 (register_cache_size): Declare.
13168 (supply_regblock): Declare.
13169 * regcache.c (init_register_cache): New.
13170 (new_register_cache): Use it.
13171 (regcache_cpy): New.
13172 (register_cache_size): New.
13173 (supply_regblock): New.
13174 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13175
219f2f23
PA
13176 * tracepoint.c: New.
13177
13178 * Makefile.in (OBS): Add tracepoint.o.
13179 (tracepoint.o): New rule.
13180
3a13a53b
L
131812010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13182
13183 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13184 (i386-mmx.o): New.
13185 (i386-mmx.c): Likewise.
13186 (i386-mmx-linux.o): Likewise.
13187 (i386-mmx-linux.c): Likewise.
13188
13189 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13190 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13191 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13192 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13193
13194 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13195 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13196 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13197
1570b33e
L
131982010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13199
13200 * Makefile.in (clean): Updated.
13201 (i386-avx.o): New.
13202 (i386-avx.c): Likewise.
13203 (i386-avx-linux.o): Likewise.
13204 (i386-avx-linux.c): Likewise.
13205 (amd64-avx.o): Likewise.
13206 (amd64-avx.c): Likewise.
13207 (amd64-avx-linux.o): Likewise.
13208 (amd64-avx-linux.c): Likewise.
13209
13210 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13211 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13212 (srv_amd64_regobj): Add amd64-avx.o.
13213 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13214 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13215 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13216 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13217 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13218 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13219 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13220
13221 * i387-fp.c: Include "i386-xstate.h".
13222 (i387_xsave): New.
13223 (i387_cache_to_xsave): Likewise.
13224 (i387_xsave_to_cache): Likewise.
13225 (x86_xcr0): Likewise.
13226
13227 * i387-fp.h (i387_cache_to_xsave): Likewise.
13228 (i387_xsave_to_cache): Likewise.
13229 (x86_xcr0): Likewise.
13230
13231 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13232 * linux-crisv32-low.c (target_regsets): Likewise.
13233 * linux-m68k-low.c (target_regsets): Likewise.
13234 * linux-mips-low.c (target_regsets): Likewise.
13235 * linux-ppc-low.c (target_regsets): Likewise.
13236 * linux-s390-low.c (target_regsets): Likewise.
13237 * linux-sh-low.c (target_regsets): Likewise.
13238 * linux-sparc-low.c (target_regsets): Likewise.
13239 * linux-xtensa-low.c (target_regsets): Likewise.
13240
13241 * linux-low.c: Include <sys/uio.h>.
13242 (regsets_fetch_inferior_registers): Support nt_type.
13243 (regsets_store_inferior_registers): Likewise.
13244 (linux_process_qsupported): New.
13245 (linux_target_ops): Add linux_process_qsupported.
13246
13247 * linux-low.h (regset_info): Add nt_type.
13248 (linux_target_ops): Add process_qsupported.
13249
13250 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13251 and <sys/uio.h>.
13252 (init_registers_i386_avx_linux): New.
13253 (init_registers_amd64_avx_linux): Likewise.
13254 (xmltarget_i386_linux_no_xml): Likewise.
13255 (xmltarget_amd64_linux_no_xml): Likewise.
13256 (PTRACE_GETREGSET): Likewise.
13257 (PTRACE_SETREGSET): Likewise.
13258 (x86_fill_xstateregset): Likewise.
13259 (x86_store_xstateregset): Likewise.
13260 (use_xml): Likewise.
13261 (x86_linux_update_xmltarget): Likewise.
13262 (x86_linux_process_qsupported): Likewise.
13263 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13264 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13265 init_registers_i386_linux here. Call
13266 x86_linux_update_xmltarget.
13267 (the_low_target): Add x86_linux_process_qsupported.
13268
13269 * server.c (handle_query): Call target_process_qsupported.
13270
13271 * target.h (target_ops): Add process_qsupported.
13272 (target_process_qsupported): New.
13273
fc7238bb
PA
132742010-04-03 Pedro Alves <pedro@codesourcery.com>
13275
13276 * inferiors.c (add_thread): Set last_status kind to
13277 TARGET_WAITKIND_IGNORE.
13278 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13279 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13280 (linux_wait_1): Move `thread' local definition to block that uses
13281 it. Don't NULL initialize `event_child'.
13282 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13283 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13284 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13285
bdabb078
PA
132862010-04-01 Pedro Alves <pedro@codesourcery.com>
13287
13288 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13289 an extended waitstatus, or by a watchpoint.
13290 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13291 thread was stepping or has been stopped by a watchpoint.
13292
d3bbe7a0
PA
132932010-04-01 Pedro Alves <pedro@codesourcery.com>
13294
13295 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13296 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13297 of another, then delete the previous, and validate all
13298 breakpoints.
13299 (validate_inserted_breakpoint): New.
13300 (delete_disabled_breakpoints): New.
13301 (validate_breakpoints): New.
13302 (check_mem_read): Validate breakpoints before trusting their
13303 shadow. Delete disabled breakpoints.
13304 (check_mem_write): Validate breakpoints before trusting they
13305 should be inserted. Delete disabled breakpoints.
13306 * mem-break.h (validate_breakpoints):
13307 * server.c (handle_query): Validate breakpoints when we see a
13308 qSymbol query.
13309
8b07ae33
PA
133102010-04-01 Pedro Alves <pedro@codesourcery.com>
13311
13312 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13313 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13314 if we could tell there's a GDB breakpoint at stop_pc.
13315 (need_step_over_p): Don't do a step over if we find a GDB
13316 breakpoint at the resume PC.
13317
13318 * mem-break.c (struct raw_breakpoint): New.
13319 (enum bkpt_type): New type `gdb_breakpoint'.
13320 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13321 fields. New field `raw'.
13322 (find_raw_breakpoint_at): New.
13323 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13324 breakpoint instead.
13325 (set_breakpoint_at): Adjust.
13326 (delete_raw_breakpoint): New.
13327 (release_breakpoint): New.
13328 (delete_breakpoint): Rename to...
13329 (delete_breakpoint_1): ... this. Add proc parameter. Use
13330 release_breakpoint. Return ENOENT.
13331 (delete_breakpoint): Reimplement.
13332 (find_breakpoint_at): Delete.
13333 (find_gdb_breakpoint_at): New.
13334 (delete_breakpoint_at): Delete.
13335 (set_gdb_breakpoint_at): New.
13336 (delete_gdb_breakpoint_at): New.
13337 (gdb_breakpoint_here): New.
13338 (set_reinsert_breakpoint): Use release_breakpoint.
13339 (uninsert_breakpoint): Rename to ...
13340 (uninsert_raw_breakpoint): ... this.
13341 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13342 (reinsert_raw_breakpoint): Change parameter type to
13343 raw_breakpoint.
13344 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13345 instead.
13346 (check_breakpoints): Adjust. Use release_breakpoint.
13347 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13348 (breakpoint_inserted_here): Ditto.
13349 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13350 Don't trust the breakpoint's shadow if it is not inserted.
13351 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13352 (delete_all_breakpoints): Adjust.
13353 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13354 use delete_breakpoint_1.
13355
13356 * mem-break.h (breakpoints_supported): Delete declaration.
13357 (set_gdb_breakpoint_at): Declare.
13358 (gdb_breakpoint_here): Declare.
13359 (delete_breakpoint_at): Delete.
13360 (delete_gdb_breakpoint_at): Declare.
13361
13362 * server.h (struct raw_breakpoint): Forward declare.
13363 (struct process_info): New field `raw_breakpoints'.
13364
13365 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13366 breakpoints.
13367
6bf5e0ba
PA
133682010-03-24 Pedro Alves <pedro@codesourcery.com>
13369
13370 * linux-low.c (status_pending_p_callback): Fix comment.
13371 (linux_wait_for_event_1): Move most of the internal breakpoint
13372 handling from here...
13373 (linux_wait_1): ... to here.
13374 (count_events_callback): New.
13375 (select_singlestep_lwp_callback): New.
13376 (select_event_lwp_callback): New.
13377 (cancel_breakpoints_callback): New.
13378 (select_event_lwp): New.
13379 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13380 priority to all LWPs that have had events that should be reported
13381 to the client. Cancel breakpoints when about to reporting the
13382 event to the client, not while stopping lwps. No longer cancel
13383 finished single-steps here.
13384 (cancel_finished_single_step): Delete.
13385 (cancel_finished_single_steps): Delete.
13386
414a389f
PA
133872010-03-24 Pedro Alves <pedro@codesourcery.com>
13388
13389 * mem-break.c (enum bkpt_type): New.
13390 (struct breakpoint): New field `type'.
13391 (set_breakpoint_at): Change return type to struct breakpoint
13392 pointer. Set type to `other_breakpoint' by default.
13393 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13394 in the breakpoint list.
13395 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13396 (reinsert_breakpoint): Rename to ...
13397 (reinsert_raw_breakpoint): ... this.
13398 (reinsert_breakpoints_at): Adjust.
13399 * mem-break.h (struct breakpoint): Declare.
13400 (set_breakpoint_at): Change return type to struct breakpoint
13401 pointer.
13402
2280c721
PA
134032010-03-24 Pedro Alves <pedro@codesourcery.com>
13404
13405 * server.c (handle_query): Assign, not compare.
13406
d50171e4
PA
134072010-03-24 Pedro Alves <pedro@codesourcery.com>
13408
13409 Teach linux gdbserver to step-over-breakpoints.
13410
13411 * linux-low.c (can_hardware_single_step): New.
13412 (supports_breakpoints): New.
13413 (handle_extended_wait): If stopping threads, read the stop pc of
13414 the new cloned LWP.
13415 (get_pc): New.
13416 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13417 low target doesn't support retrieving the PC.
13418 (add_lwp): Set last_resume_kind to resume_continue.
13419 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13420 (linux_attach): Don't clear stop_expected. Set the lwp's
13421 last_resume_kind to resume_stop.
13422 (linux_detach_one_lwp): Don't check for removed breakpoints.
13423 (check_removed_breakpoint): Delete.
13424 (status_pending_p): Rename to ...
13425 (status_pending_p_callback): ... this. Don't check for removed
13426 breakpoints. Don't consider threads that are stopped from GDB's
13427 perspective.
13428 (linux_wait_for_lwp): Always read the stop_pc here.
13429 (cancel_breakpoint): New.
13430 (step_over_bkpt): New global.
13431 (linux_wait_for_event_1): Implement stepping over breakpoints.
13432 (gdb_wants_lwp_stopped): New.
13433 (gdb_wants_all_stopped): New.
13434 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13435 single-step traps here. Store the thread's last reported target
13436 wait status.
13437 (send_sigstop): Don't clear stop_expected. Always set it,
13438 instead.
13439 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13440 (cancel_finished_single_step): New.
13441 (cancel_finished_single_steps): New.
13442 (wait_for_sigstop): Don't cancel finished single-step traps here.
13443 (linux_resume_one_lwp): Don't check for removed breakpoints.
13444 Don't set `step' on non-hardware step archs.
13445 (linux_set_resume_request): Ignore resume_stop requests if already
13446 stopping or stopped. Set the lwp's last_resume_kind.
13447 (resume_status_pending_p): Don't check for removed breakpoints.
13448 (need_step_over_p): New.
13449 (start_step_over): New.
13450 (finish_step_over): New.
13451 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13452 requests. Clear the thread's last reported target waitstatus.
13453 Don't use the `suspended' flag. Don't consider pending breakpoints.
13454 (linux_resume): Start a step-over if necessary.
13455 (proceed_one_lwp): New.
13456 (proceed_all_lwps): New.
13457 (unstop_all_lwps): New.
13458 * linux-low.h (struct lwp_info): Rewrite comment for the
13459 `suspended' flag. Add the `stop_pc' field. Delete the
13460 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13461 Add `'last_resume_kind' and `need_step_over' fields.
13462 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13463 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13464 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13465 (set_raw_breakpoint_at): New.
13466 (set_breakpoint_at): Rewrite to use it.
13467 (reinsert_breakpoint_handler): Delete.
13468 (set_reinsert_breakpoint): New.
13469 (reinsert_breakpoint_by_bp): Delete.
13470 (delete_reinsert_breakpoints): New.
13471 (uninsert_breakpoint): Rewrite.
13472 (uninsert_breakpoints_at): New.
13473 (reinsert_breakpoint): Rewrite.
13474 (reinsert_breakpoints_at): New.
13475 (check_breakpoints): Rewrite.
13476 (breakpoint_here): New.
13477 (breakpoint_inserted_here): New.
13478 (check_mem_read): Adjust.
13479 * mem-break.h (breakpoints_supported, breakpoint_here)
13480 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13481 (reinsert_breakpoint_by_bp): Delete declaration.
13482 (delete_reinsert_breakpoints): Declare.
13483 (reinsert_breakpoint): Delete declaration.
13484 (reinsert_breakpoints_at): Declare.
13485 (uninsert_breakpoint): Delete declaration.
13486 (uninsert_breakpoints_at): Declare.
13487 (check_breakpoints): Adjust prototype.
13488 * server.h: Adjust include order.
13489 (struct thread_info): Declare here. Add a `last_status' field.
13490
30ba68cb
MS
134912010-03-23 Michael Snyder <msnyder@vmware.com>
13492
13493 * server.c (crc32): New function.
13494 (handle_query): Add handling for 'qCRC:' request.
13495
b9a881c2
PA
134962010-03-23 Pedro Alves <pedro@codesourcery.com>
13497
13498 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13499 lwp had been stopped by a watchpoint.
13500
e92d13d5
PA
135012010-03-16 Pedro Alves <pedro@codesourcery.com>
13502
13503 * server.h (internal_error): Declare.
13504 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13505 * utils.c (internal_error): New function.
13506
64daa791
AS
135072010-03-15 Andreas Schwab <schwab@redhat.com>
13508
13509 * configure.srv: Fix typo setting srv_regobj.
13510
f52cd8cd
PA
135112010-03-15 Pedro Alves <pedro@codesourcery.com>
13512
13513 * linux-low.c (fetch_register): Avoid passing a non string literal
13514 format to `error'.
13515 (usr_store_inferior_registers): Ditto.
13516
93ae6fdc
PA
135172010-03-14 Pedro Alves <pedro@codesourcery.com>
13518
13519 * linux-low.c (linux_write_memory): Bail out early if peeking
13520 memory failed.
13521
c3adc08c
PA
135222010-03-14 Pedro Alves <pedro@codesourcery.com>
13523
13524 * linux-low.h (struct lwp_info): New fields
13525 `stopped_by_watchpoint' and `stopped_data_address'.
13526 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13527 here, and cache them in the lwp object.
13528 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13529 directly.
13530 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13531 field.
13532 (linux_stopped_by_watchpoint): Rewrite.
13533 (linux_stopped_data_address): Rewrite.
13534
bce522a2
PA
135352010-03-06 Simo Melenius <simo.melenius@iki.fi>
13536
13537 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13538 switching the current inferior, not before.
13539
90884b2b
L
135402010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13541
13542 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13543 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13544 i386-linux.c and amd64-linux.c.
13545 (reg-i386.o): Removed.
13546 (reg-i386.c): Likewise.
13547 (reg-i386-linux.o): Likewise.
13548 (reg-i386-linux.c): Likewise.
13549 (reg-x86-64.o): Likewise.
13550 (reg-x86-64.c): Likewise.
13551 (reg-x86-64-linux.o): Likewise.
13552 (reg-x86-64-linux.c): Likewise.
13553 (i386.o): New.
13554 (i386.c): Likewise.
13555 (i386-linux.o): Likewise.
13556 (i386-linux.c): Likewise.
13557 (amd64.o): Likewise.
13558 (amd64.c): Likewise.
13559 (amd64-linux.o): Likewise.
13560 (amd64-linux.c): Likewise.
13561
13562 * configure.srv (srv_i386_regobj): New.
13563 (srv_i386_linux_regobj): Likewise.
13564 (srv_amd64_regobj): Likewise.
13565 (srv_amd64_linux_regobj): Likewise.
13566 (srv_i386_32bit_xmlfiles): Likewise.
13567 (srv_i386_64bit_xmlfiles): Likewise.
13568 (srv_i386_xmlfiles): Likewise.
13569 (srv_amd64_xmlfiles): Likewise.
13570 (srv_i386_linux_xmlfiles): Likewise.
13571 (srv_amd64_linux_xmlfiles): Likewise.
13572 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13573 srv_xmlfiles to $srv_i386_xmlfiles.
13574 (i[34567]86-*-mingw32ce*): Likewise.
13575 (i[34567]86-*-mingw*): Likewise.
13576 (i[34567]86-*-nto*): Likewise.
13577 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13578 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13579 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13580 (x86_64-*-linux*): Likewise.
13581
13582 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13583 (init_registers_amd64_linux): New.
13584 (x86_arch_setup): Replace init_registers_x86_64_linux with
13585 init_registers_amd64_linux.
13586
193f13e6
MK
135872010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13588
13589 * configure.ac: Check for libdl. If it is not available link against
13590 static libthread_db.
13591 * configure: Regenerate.
13592
85d721b8
PA
135932010-02-22 Pedro Alves <pedro@codesourcery.com>
13594
13595 PR9605
13596
13597 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13598 handing a read watchpoint.
13599 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13600
6076632b
DE
136012010-02-12 Doug Evans <dje@google.com>
13602
13603 * linux-low.c (linux_supports_tracefork_flag): Document.
13604 (linux_look_up_symbols): Add comment.
13605
3327ccf7
L
136062010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13607
13608 * regcache.c (supply_register): Clear regcache if buf is NULL.
13609
0718675c 136102010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13611 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13612
13613 * inferiors.c (find_inferior): Add function documentation.
13614 (unloaded_dll): Handle the case where the unloaded dll has not
13615 been previously registered in the dll list.
13616
177321bd
DJ
136172010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13618
13619 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13620 (thumb2_breakpoint): New.
13621 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13622
2b009048
DJ
136232010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13624
13625 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13626 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13627 breakpoints.
13628
3be029c7
PA
136292010-01-21 Pedro Alves <pedro@codesourcery.com>
13630
13631 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13632
18f5de3b
JK
136332010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13634
13635 * linux-s390-low.c (s390_collect_ptrace_register)
13636 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13637
3743bb4f
DE
136382010-01-21 Doug Evans <dje@google.com>
13639
14ce3065
DE
13640 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13641 (PTRACE_ARG4_TYPE): New macro.
13642 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13643 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13644 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13645 (usr_store_inferior_registers): Ditto.
13646 (linux_read_memory, linux_write_memory): Ditto.
13647 (linux_test_for_tracefork): Ditto.
13648
3743bb4f
DE
13649 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13650 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13651
8b315be5
PA
136522010-01-21 Pedro Alves <pedro@codesourcery.com>
13653
13654 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13655 target.
13656
85492558
PA
136572010-01-21 Pedro Alves <pedro@codesourcery.com>
13658
13659 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13660 prototype to take a regcache. Adjust.
13661
442ea881
PA
136622010-01-20 Pedro Alves <pedro@codesourcery.com>
13663
13664 * regcache.h (struct thread_info): Forward declare.
13665 (struct regcache): New.
13666 (new_register_cache): Adjust prototype.
13667 (get_thread_regcache): Declare.
13668 (free_register_cache): Adjust prototype.
13669 (registers_to_string, registers_from_string): Ditto.
13670 (supply_register, supply_register_by_name, collect_register)
13671 (collect_register_as_string, collect_register_by_name): Ditto.
13672 * regcache.c (struct inferior_regcache_data): Delete.
13673 (get_regcache): Rename to ...
13674 (get_thread_regcache): ... this. Adjust. Switch inferior before
13675 fetching registers.
13676 (regcache_invalidate_one): Adjust.
13677 (regcache_invalidate): Fix prototype.
13678 (new_register_cache): Return the new register cache.
13679 (free_register_cache): Change prototype.
13680 (realloc_register_cache): Adjust.
13681 (registers_to_string): Change prototype to take a regcache. Adjust.
13682 (registers_from_string): Ditto.
13683 (register_data): Ditto.
13684 (supply_register): Ditto.
13685 (supply_register_by_name): Ditto.
13686 (collect_register): Ditto.
13687 (collect_register_as_string): Ditto.
13688 (collect_register_by_name): Ditto.
13689 * server.c (process_serial_event): Adjust.
13690 * linux-low.h (regset_fill_func, regset_store_func): Change
13691 prototype.
13692 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13693 Change prototype.
13694 * linux-low.c (get_stop_pc): Adjust.
13695 (check_removed_breakpoint): Adjust.
13696 (linux_wait_for_event): Adjust.
13697 (linux_resume_one_lwp): Adjust.
13698 (fetch_register): Add regcache parameter. Adjust.
13699 (usr_store_inferior_registers): Ditto.
13700 (regsets_fetch_inferior_registers): Ditto.
13701 (regsets_store_inferior_registers): Ditto.
13702 (linux_fetch_registers, linux_store_registers): Ditto.
13703 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13704 regcache. Adjust.
43aaf8b6
PA
13705 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13706 Ditto.
442ea881
PA
13707 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13708 prototype to take a regcache.
13709 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13710 * remote-utils.c (convert_ascii_to_int, outreg)
13711 (prepare_resume_reply): Change prototype to take a regcache.
13712 Adjust.
13713 * target.h (struct target_ops) <fetch_registers, store_registers>:
13714 Change prototype to take a regcache.
13715 (fetch_inferior_registers, store_inferior_registers): Change
13716 prototype to take a regcache. Adjust.
13717 * proc-service.c (ps_lgetregs): Adjust.
13718 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13719 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13720 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13721 take a regcache. Adjust.
13722 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13723 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13724 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13725 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13726 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13727 (cris_cannot_fetch_register):
13728 (cris_breakpoint_at): Change prototype to take a regcache.
13729 Adjust.
13730 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13731 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13732 to take a regcache. Adjust.
13733 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13734 Adjust.
13735 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13736 take a regcache. Adjust.
13737 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13738 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13739 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13740 * linux-mips-low.c (mips_get_pc):
13741 (mips_set_pc): Change prototype to take a regcache. Adjust.
13742 (mips_reinsert_addr): Adjust.
13743 (mips_collect_register): Change prototype to take a regcache.
13744 Adjust.
13745 (mips_supply_register):
13746 (mips_collect_register_32bit, mips_supply_register_32bit)
13747 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13748 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13749 * linux-ppc-low.c (ppc_supply_ptrace_register)
13750 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13751 (parse_spufs_run): Adjust.
13752 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13753 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13754 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13755 take a regcache. Adjust.
13756 * linux-s390-low.c (s390_collect_ptrace_register)
13757 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13758 (s390_set_pc): Change prototype to take a regcache. Adjust.
13759 (s390_arch_setup): Adjust.
13760 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13761 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13762 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13763 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13764 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13765 regcache. Adjust.
13766 (sparc_breakpoint_at): Adjust.
13767 * linux-xtensa-low.c (xtensa_fill_gregset):
13768 (xtensa_store_gregset):
13769 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13770 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13771 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13772 prototype to take a regcache. Adjust.
13773 * win32-arm-low.c (arm_fetch_inferior_register)
13774 (arm_store_inferior_register): Change prototype to take a
13775 regcache. Adjust.
13776 * win32-i386-low.c (i386_fetch_inferior_register)
13777 (i386_store_inferior_register): Change prototype to take a
13778 regcache. Adjust.
13779 * win32-low.c (child_fetch_inferior_registers)
13780 (child_store_inferior_registers): Change prototype to take a
13781 regcache. Adjust.
13782 (win32_wait): Adjust.
13783 (win32_fetch_inferior_registers): Change prototype to take a
13784 regcache. Adjust.
13785 (win32_store_inferior_registers): Adjust.
13786 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13787 store_inferior_register>: Change prototype to take a regcache.
13788
60c3d7b0
DE
137892010-01-20 Doug Evans <dje@google.com>
13790
13791 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13792 #ifdef.
13793 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13794 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13795
dc146f7c
VP
137962010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13797
13798 * linux-low.c (linux_core_of_thread): New.
13799 (compare_ints, show_process, list_threads): New.
13800 (linux_qxfer_osdata): Report threads and cores.
13801 (linux_target_op): Register linux_core_of_thread.
13802 * remote-utils.c (prepare_resume_reply): Report the core.
13803 (buffer_xml_printf): Support %d specifier.
13804 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13805 New.
13806 (handle_query): Handle qXfer:threads. Announce availability
13807 thereof.
13808 * target.h (struct target_ops): New field core_of_thread.
13809
7803799a
UW
138102010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13811
13812 * Makefile.in (clean): Remove new generated files.
13813 (reg-s390.o, reg-s390.c): Remove rules.
13814 (reg-s390x.o, reg-s390x.c): Likewise.
13815 (s390-linux32.o, s390-linux32.c): Add rules.
13816 (s390-linux64.o, s390-linux64.c): Likewise.
13817 (s390x-linux64.o, s390x-linux64.c): Likewise.
13818 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13819 * linux-s390-low.c: Include <elf.h>.
13820 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13821 (init_registers_s390): Remove prototype.
13822 (init_registers_s390x): Likewise.
13823 (init_registers_s390_linux32): Add prototype.
13824 (init_registers_s390_linux64): Likewise.
13825 (init_registers_s390x_linux64): Likewise.
13826 (s390_num_regs_3264): New define.
13827 (s390_regmap_3264): New global variable.
13828 (s390_cannot_fetch_register): Remove obsolete check.
13829 (s390_cannot_store_register): Likewise.
13830 (s390_collect_ptrace_register): Handle upper/lower register halves.
13831 (s390_supply_ptrace_register): Likewise.
13832 (s390_fill_gregset): Update to register number changes.
13833 (s390_get_hwcap): New routine.
13834 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13835 Install appropriate regmap and register set.
13836
6e7ffa39
JB
138372010-01-01 Joel Brobecker <brobecker@adacore.com>
13838
13839 * server.c (gdbserver_version): Update copyright year to 2010.
13840 * gdbreplay.c (gdbreplay_version): Likewise.
13841
957f3f49
DE
138422009-12-28 Doug Evans <dje@google.com>
13843
13844 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13845 elf/external.h. Include <elf.h> instead but only if necessary.
13846
ca5c370d
PA
138472009-12-28 Pedro Alves <pedro@codesourcery.com>
13848
13849 * linux-low.c (linux_remove_process): Remove `detaching'
13850 parameter. Don't release/detach from thread_db here.
13851 (linux_kill): Release/detach from thread_db here, ...
13852 (linux_detach): ... and here, before actually detaching.
13853 (linux_wait_1): ... and here, when a process exits.
13854 * thread-db.c (any_thread_of): New.
13855 (thread_db_free): Switch the current inferior to a thread of the
13856 passed in process.
13857
4ee62156
DE
138582009-12-21 Doug Evans <dje@google.com>
13859
d90e6a88
DE
13860 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13861
c5f62d5f
DE
13862 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13863 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13864 warning ifndef __NR_tkill. Move setting of errno there too.
13865 Delete unnecessary resetting of errno after syscall.
13866 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13867
10e86dd7
DE
13868 * configure.ac: Check for dladdr.
13869 * config.in: Regenerate.
13870 * configure: Regenerate.
13871 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13872 (try_thread_db_load): Update.
13873
4ee62156
DE
13874 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13875
00f515da
DE
138762009-12-18 Doug Evans <dje@google.com>
13877
e9464885
DE
13878 * event-loop.c: Include unistd.h if it exists.
13879
07d4f67e
DE
13880 * linux-low.c (my_waitpid): Move definition away from being in
13881 between linux_tracefork_child/linux_test_for_tracefork.
13882
00f515da
DE
13883 * gdb_proc_service.h (psaddr_t): Fix type.
13884 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13885 signature to match glibc.
13886
1de1badb
DE
138872009-12-16 Doug Evans <dje@google.com>
13888
13889 * linux-low.c (linux_read_memory): Fix argument to read.
13890
aeeb81d1
PA
138912009-11-26 Pedro Alves <pedro@codesourcery.com>
13892
13893 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13894 events, don't leave current_inferior pointing at null.
13895
10357975
PA
138962009-11-26 Pedro Alves <pedro@codesourcery.com>
13897
13898 * win32-low.c (LOG): Delete.
13899 (OUTMSG): Output to stderr.
13900 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13901 on compile time LOG macro.
13902 (win32_wait): Fix debug output.
13903
cf6e3471
PA
139042009-11-26 Pedro Alves <pedro@codesourcery.com>
13905
13906 * win32-low.c (win32_add_one_solib): If the dll name is
13907 "ntdll.dll", prepend the system directory to the dll path.
13908
0c85e18e
MK
139092009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13910
13911 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13912
9ac544ce 139132009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13914 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13915
13916 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13917 * configure.ac: Check for __mcoldfire__ and set
13918 gdb_cv_m68k_is_coldfire.
13919 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13920 reg-cf.o and reg-m68k.o.
13921 * configure: Regenerated.
13922
fd7dd3e6
PA
139232009-11-16 Pedro Alves <pedro@codesourcery.com>
13924
13925 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13926 Pass it to thread_db_free.
13927 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13928 proper `detaching' argument to linux_remove_process.
13929 * linux-low.h (thread_db_free): Add `detaching' parameter.
13930 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13931 to thread_db_free.
13932 (thread_db_free): Add `detaching' parameter. Only
13933 call td_ta_clear_event if detaching from process.
13934
75aa492e
MK
139352009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13936
13937 * thread-db.c (thread_db_free): Fix typo.
13938
21e1bee4
PP
139392009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13940
13941 PR gdb/10838
13942 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13943
8838b45e
NS
139442009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13945
13946 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13947 with an i686 compiler.
13948 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13949 needed.
13950 * configure: Rebuilt.
13951
8a35fb51
SL
139522009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13953
13954 PR gdb/10783
13955
13956 * server.c (handle_search_memory_1): Correct read_addr initialization
13957 in loop for searching subsequent chunks.
13958
96f15937
PP
139592009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13960
13961 * configure.ac: New --with-libthread-db option.
13962 * thread-db.c: Allow direct dependence on libthread_db.
13963 (thread_db_free): Adjust.
13964 * config.in: Regenerate.
13965 * configure: Likewise.
889bf7c5 13966
5f7d1694
PP
139672009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13968
13969 PR gdb/10757
13970 * thread-db.c (attach_thread): New function.
13971 (maybe_attach_thread): Return success/failure.
13972 (find_new_threads_callback): Adjust.
889bf7c5
PA
13973 (thread_db_find_new_threads): Loop until no new threads.
13974
88e3b899
PA
139752009-10-13 Pedro Alves <pedro@codesourcery.com>
13976
13977 * proc-service.c (ps_lgetregs): Formatting.
13978
cdbfd419
PP
139792009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13980
13981 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13982 * configure.ac: Adjust.
13983 * linux-low.h (struct process_info_private): Move members to struct
13984 thread_db.
13985 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13986 * linux-low.c (linux_remove_process): Adjust.
13987 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13988 * server.c (handle_query): Move code ...
13989 (handle_monitor_command): ... here. New function.
13990 * target.h (struct target_ops): New member.
13991 * thread-db.c (struct thread_db): New.
13992 (libthread_db_search_path): New variable.
13993 (thread_db_create_event, thread_db_enable_reporting)
13994 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13995 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13996 (try_thread_db_load_1, dladdr_to_soname): New functions.
13997 (try_thread_db_load, thread_db_load_search): New functions.
13998 (thread_db_init): Search for libthread_db.
13999 (thread_db_free): New function.
14000 (thread_db_handle_monitor_command): Likewise.
14001 * config.in: Regenerate.
14002 * configure: Regenerate.
889bf7c5 14003
4168d2d6
UW
140042009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14005
14006 * spu-low.c (spu_kill): Wait for inferior to terminate.
14007 Call clear_inferiors.
14008 (spu_detach): Call clear_inferiors.
14009
81ecdfbb
RW
140102009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14011
14012 * aclocal.m4: Regenerate.
14013 * config.in: Likewise.
14014 * configure: Likewise.
14015
0b9ff2c0
UW
140162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14017
14018 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14019 (parse_spufs_run): New function.
14020 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14021 (ppc_breakpoint_at): Handle SPU breakpoints.
14022
efcbbd14
UW
140232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14024
14025 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14026 (SPUFS_MAGIC): Define.
14027 (spu_enumerate_spu_ids): New function.
14028 (linux_qxfer_spu): New function.
14029 (linux_target_ops): Install linux_qxfer_spu.
14030
f4d9bade
UW
140312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14032
14033 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14034 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14035 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14036 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14037 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14038 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14039 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14040 (init_registers_powerpc_cell32l): Add prototype.
14041 (init_registers_powerpc_cell64l): Likewise.
14042 (ppc_arch_setup): Detect Cell/B.E. architecture.
14043
96e946ca
RW
140442009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14045
14046 * Makefile.in (datarootdir): New variable.
14047
58d6951d
DJ
140482009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14049
14050 * linux-low.c (linux_write_memory): Update debugging output.
14051 * Makefile.in (clean): Add new descriptions.
14052 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14053 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14054 * configure.srv: Add new files for arm*-*-linux*.
14055 * linux-arm-low.c: Add new declarations.
14056 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14057 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14058 (HWCAP_VFPv3D16): New.
14059 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14060 instead of __IWMMXT__.
14061 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14062 (arm_arch_setup): New.
14063 (target_regsets): Remove #ifdef. Add VFP regset.
14064 (the_low_target): Use arm_arch_setup.
14065
12b42a12
DJ
140662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14067
14068 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14069 the main thread again.
14070
ac8c974e
AR
140712009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14072
14073 Adding Neutrino gdbserver.
14074 * configure: Regenerated.
14075 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14076 * configure.srv (i[34567]86-*-nto*): New target.
14077 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14078 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14079 (nto_comctrl) [__QNX__]: New function.
14080 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14081
4424e0c3 140822009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14083
14084 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14085 srv_tgtobj.
14086
912cf4ba
PA
140872009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14088 Pedro Alves <pedro@codesourcery.com>
14089
14090 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14091 don't support CONTEXT_EXTENDED_REGISTERS.
14092 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14093 (the_low_target): Install them.
14094 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14095 failing with ERROR_PIPE_NOT_CONNECTED.
14096
aa5ca48f
DE
140972009-06-30 Doug Evans <dje@google.com>
14098 Pierre Muller <muller@ics.u-strasbg.fr>
14099
14100 Add h/w watchpoint support to x86-linux, win32-i386.
14101 * Makefile.in (SFILES): Add i386-low.c
14102 (i386_low_h): Define.
14103 (i386-low.o): Add dependencies.
14104 (linux-x86-low.o): Add i386-low.h dependency.
14105 (win32-i386-low.o): Ditto.
14106 * i386-low.c: New file.
14107 * i386-low.h: New file.
14108 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14109 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14110 * linux-low.c (linux_add_process): Initialize arch_private.
14111 (linux_remove_process): Free arch_private.
14112 (add_lwp): Initialize arch_private.
14113 (delete_lwp): Free arch_private.
14114 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14115 provided.
14116 * linux-low.h (process_info_private): New member arch_private.
14117 (lwp_info): New member arch_private.
14118 (linux_target_ops): New members new_process, new_thread,
14119 prepare_to_resume.
14120 (ptid_of): New macro.
14121 * linux-x86-low.c: Include stddef.h, i386-low.h.
14122 (arch_process_info): New struct.
14123 (arch_lwp_info): New struct.
14124 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14125 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14126 (i386_dr_low_get_status): New function.
14127 (x86_insert_point, x86_remove_point): New functions.
14128 (x86_stopped_by_watchpoint): New function.
14129 (x86_stopped_data_address): New function.
14130 (x86_linux_new_process, x86_linux_new_thread): New functions.
14131 (x86_linux_prepare_to_resume): New function.
14132 (the_low_target): Add entries for insert_point, remove_point,
14133 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14134 prepare_to_resume.
14135 * server.c (debug_hw_points): New global.
14136 (monitor_show_help): Document set debug-hw-points.
14137 (handle_query): Process "set debug-hw-points".
14138 * server.h (debug_hw_points): Declare.
14139 (paddress): Declare.
14140 * utils.c (NUMCELLS, CELLSIZE): New macros.
14141 (get_sell, xsnprintf, paddress): New functions.
14142 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14143 remove_point, stopped_by_watchpoint, stopped_data_address.
14144 * win32-i386-low.c: Include i386-low.h.
14145 (debug_reg_state): Replaces dr.
14146 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14147 (i386_dr_low_get_status): New function.
14148 (i386_insert_point, i386_remove_point): New functions.
14149 (i386_stopped_by_watchpoint): New function.
14150 (i386_stopped_data_address): New function.
14151 (i386_initial_stuff): Update.
14152 (get_thread_context,set_thread_context,i386_thread_added): Update.
14153 (the_low_target): Add entries for insert_point,
14154 remove_point, stopped_by_watchpoint, stopped_data_address.
14155 * win32-low.c (win32_insert_watchpoint): New function.
14156 (win32_remove_watchpoint): New function.
14157 (win32_stopped_by_watchpoint): New function.
14158 (win32_stopped_data_address): New function.
14159 (win32_target_ops): Add entries for insert_watchpoint,
14160 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14161 * win32-low.h (win32_target_ops): New members insert_point,
14162 remove_point, stopped_by_watchpoint, stopped_data_address.
14163
d993e290
PA
141642009-06-25 Pedro Alves <pedro@codesourcery.com>
14165
14166 * server.c (process_serial_event): Re-return unsupported, not
14167 error, if the type isn't recognized. Re-allow supporting only
14168 insert or remove packets. Also call require_running for
14169 breakpoints. Add missing break statement to default case. Tidy.
14170 * target.h (struct target_ops): Rename insert_watchpoint to
14171 insert_point, and remove_watchpoint to remove_point.
14172
14173 * linux-low.h (struct linux_target_ops): Likewise.
14174 * linux-low.c (linux_insert_watchpoint): Rename to ...
14175 (linux_insert_point): ... this. Adjust.
14176 (linux_remove_watchpoint): Rename to ...
14177 (linux_remove_point): ... this. Adjust.
14178 (linux_target_ops): Adjust.
14179 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14180 (cris_insert_point): ... this.
14181 (cris_remove_watchpoint): Rename to ...
14182 (cris_remove_point): ... this.
14183 (the_low_target): Adjust.
14184
0f54c268
PM
141852009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14186
14187 * server.c (handle_v_kill): Pass signal_pid to
14188 kill_inferior if multi_process is zero.
14189
c6314022
AR
141902009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14191
14192 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14193 * target.h (target_ops): Comment for *_watchpoint to make it clear
14194 the functions can get types '0' and '1'.
14195
4463ce24
AR
141962009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14197
14198 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14199 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14200 * regcache.c (get_regcache): Likewise.
14201 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14202 * win32-low.c (child_fetch_inferior_registers): Remove check for
14203 regno 0.
14204
cf8fd78b
PA
142052009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14206 Pedro Alves <pedro@codesourcery.com>
14207
14208 * target.h (struct target_ops) <supports_multi_process>: New
14209 callback.
14210 (target_supports_multi_process): New.
14211 * server.c (handle_query): Even if GDB reports support, only
14212 enable multi-process if the target also supports it. Report
14213 multi-process support only if the target backend supports it.
14214 * linux-low.c (linux_supports_multi_process): New function.
14215 (linux_target_ops): Install it as target_supports_multi_process
14216 callback.
14217
47c0c975
DE
142182009-05-24 Doug Evans <dje@google.com>
14219
e09875d4
DE
14220 Global renaming of find_thread_pid to find_thread_ptid.
14221 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14222 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14223 All callers updated.
14224
e27d73f6
DE
14225 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14226 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14227 directly.
14228
47c0c975
DE
14229 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14230 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14231 (linux_resume_one_lwp): Ditto.
14232
2acc282a
DE
142332009-05-23 Doug Evans <dje@google.com>
14234
14235 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14236 from struct inferior_list_entry * to struct lwp_info *.
14237 All callers updated.
14238
9f1036c1
DE
142392009-05-13 Doug Evans <dje@google.com>
14240
14241 * linux-x86-low.c: Don't include assert.h.
14242 (x86_siginfo_fixup): Use fatal, not assert.
14243 (x86_arch_setup): Fix comment.
14244
d0722149
DE
142452009-05-12 Doug Evans <dje@google.com>
14246
14247 Biarch support for i386/amd64 gdbserver.
14248 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14249 Add linux-x86-low.c.
14250 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14251 (linux-x86-low.o): Add.
14252 * linux-x86-64-low.c: Delete.
14253 * linux-i386-low.c: Delete.
14254 * linux-x86-low.c: New file.
14255 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14256 linux-x86-low.o.
14257 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14258 linux-x86-low.o.
14259 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14260 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14261 (linux_child_pid_to_exec_file): New function.
14262 (elf_64_header_p, elf_64_file_p): New functions.
14263 (siginfo_fixup): New function.
14264 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14265 give target a chance to convert layout.
14266 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14267 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14268
fdeb2a12
DE
142692009-05-07 Doug Evans <dje@google.com>
14270
14271 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14272 (regsets_store_inferior_registers): Ditto.
14273
a6dbe5df
PA
142742009-05-06 Pedro Alves <pedro@codesourcery.com>
14275
14276 PR server/10048
14277
14278 * linux-low.c (must_set_ptrace_flags): Delete.
14279 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14280 of the global.
14281 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14282 `lwp->must_set_ptrace_flags' instead.
ba42693b 14283 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14284 (linux_wait_1): ... not here.
14285
5091eb23
DE
142862009-04-30 Doug Evans <dje@google.com>
14287
9f767825
DE
14288 * inferiors.c (started_inferior_callback): New function.
14289 (attached_inferior_callback): New function.
14290 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14291 * server.c (print_started_pid, print_attached_pid): New functions.
14292 (detach_or_kill_for_exit): New function.
14293 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14294 * server.h (have_started_inferiors_p): Declare.
14295 (have_attached_inferiors_p): Declare.
14296
5091eb23
DE
14297 * inferiors.c (remove_process): Fix memory leak, free process.
14298 * linux-low.c (linux_remove_process): New function.
14299 (linux_kill): Call it instead of remove_process.
14300 (linux_detach, linux_wait_1): Ditto.
14301
155c8968
PA
143022009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14303
14304 * configure.srv: Add x86 Windows CE target.
14305
7fe519cb
UW
143062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14307
14308 * inferiors.c (get_thread_process): Make global.
14309 * server.h (get_thread_process): Add prototype.
14310 * thread-db.c (find_one_thread): Use get_thread_process
14311 instead of current_process.
14312 (thread_db_get_tls_address): Do not crash if called when
14313 thread layer is not yet initialized.
14314
5472f405
UW
143152009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14316
14317 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14318 * spu-low.c (current_tid): Rename to ...
14319 (current_ptid): ... this.
14320 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14321 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14322 ptid_get_lwp (current_ptid) instead of current_tid.
14323 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14324 instead of current_tid. Use find_process_pid to verify pid
14325 argument is valid. Pass proper argument to remove_process.
14326 (spu_thread_alive): Compare current_ptid instead of current_tid.
14327 (spu_resume): Likewise.
14328
55ac2b99
PA
143292009-04-02 Pedro Alves <pedro@codesourcery.com>
14330
14331 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14332 variable.
14333
95954743
PA
143342009-04-01 Pedro Alves <pedro@codesourcery.com>
14335
14336 Implement the multiprocess extensions, and add linux multiprocess
14337 support.
14338
14339 * server.h (ULONGEST): Declare.
14340 (struct ptid, ptid_t): New.
14341 (minus_one_ptid, null_ptid): Declare.
14342 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14343 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14344 (struct inferior_list_entry): Change `id' type from unsigned from
14345 to ptid_t.
14346 (struct sym_cache, struct breakpoint, struct
14347 process_info_private): Forward declare.
14348 (struct process_info): Declare.
14349 (current_process): Declare.
14350 (all_processes): Declare.
14351 (initialize_inferiors): Declare.
14352 (add_thread): Adjust to use ptid_t.
14353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14354 (add_process, remove_process, find_thread_pid): Declare.
14355 (find_inferior_id): Adjust to use ptid_t.
14356 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14357 (multi_process): Declare.
14358 (push_event): Adjust to use ptid_t.
14359 (read_ptid, write_ptid): Declare.
14360 (prepare_resume_reply): Adjust to use ptid_t.
14361 (clear_symbol_cache): Declare.
14362 * inferiors.c (all_processes): New.
14363 (null_ptid, minus_one_ptid): New.
14364 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14365 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14366 (add_thread): Change unsigned long to ptid. Remove gdb_id
14367 parameter. Adjust.
14368 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14369 (gdb_id_to_thread): Rename to ...
14370 (find_thread_pid): ... this. Change unsigned long to ptid.
14371 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14372 (loaded_dll, pull_pid_from_list): Adjust.
14373 (add_process, remove_process, find_process_pid)
14374 (get_thread_process, current_process, initialize_inferiors): New.
14375 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14376 (struct target_waitstatus) <related_pid>: Ditto.
14377 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14378 return type to int.
14379 (struct target_ops) <join>: Add `pid' argument.
14380 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14381 (struct target_ops) <wait>: Add `ptid' field. Change return type
14382 to ptid.
14383 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14384 (mywait): Add `ptid' argument. Change return type to ptid_t.
14385 (target_pid_to_str): Declare.
14386 * target.c (set_desired_inferior): Adjust to use ptids.
14387 (mywait): Add new `ptid' argument. Adjust.
14388 (target_pid_to_str): New.
14389 * mem-break.h (free_all_breakpoints): Declare.
14390 * mem-break.c (breakpoints): Delelete.
14391 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14392 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14393 to use per-process breakpoint list.
14394 (free_all_breakpoints): New.
14395 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14396 (symbol_cache, all_symbols_looked_up): Delete.
14397 (hexchars): New.
14398 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14399 read_ptid): New.
14400 (prepare_resume_reply): Change ptid argument's type from unsigned
14401 long to ptid_t. Adjust. Implement W;process and X;process.
14402 (free_sym_cache, clear_symbol_cache): New.
14403 (look_up_one_symbol): Adjust to per-process symbol cache. *
14404 * server.c (cont_thread, general_thread, step_thread): Change type
14405 to ptid_t.
14406 (attached): Delete.
14407 (multi_process): New.
14408 (last_ptid): Change type to ptid_t.
14409 (struct vstop_notif) <ptid>: Change type to ptid_t.
14410 (queue_stop_reply, push_event): Change `ptid' argument's type to
14411 ptid_t.
14412 (discard_queued_stop_replies): Add `pid' argument.
14413 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14414 changes. Don't reference the `attached' global.
14415 (attach_inferior): Adjust to mywait interface changes.
14416 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14417 features. Handle and report "multiprocess+". Handle
14418 "qAttached:PID".
14419 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14420 changes.
14421 (handle_v_kill): New.
14422 (handle_v_stopped): Adjust to use target_pid_to_str.
14423 (handle_v_requests): Allow multiple attaches and runs when
14424 multiprocess extensions are in effect. Handle "vKill".
14425 (myresume): Adjust to use ptids.
14426 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14427 (handle_status): Adjust to discard_queued_stop_replies interface
14428 change.
14429 (first_thread_of, kill_inferior_callback)
14430 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14431 (main): Call initialize_inferiors. Adjust to use ptids, killing
14432 and detaching from all inferiors. Handle multiprocess packet
14433 variants.
14434 * linux-low.h: Include gdb_proc_service.h.
14435 (struct process_info_private): New.
14436 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14437 <lwpid_of>: Use ptid_get_lwp.
14438 (get_lwp_thread): Adjust.
14439 (struct lwp_info): Add `dead' member.
14440 (find_lwp_pid): Declare.
14441 * linux-low.c (thread_db_active): Delete.
14442 (new_inferior): Adjust comment.
14443 (inferior_pid): Delete.
14444 (linux_add_process): New.
14445 (handle_extended_wait): Adjust.
14446 (add_lwp): Change unsigned long to ptid.
14447 (linux_create_inferior): Add process to processes table. Adjust
14448 to use ptids. Don't set new_inferior here.
14449 (linux_attach_lwp): Rename to ...
14450 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14451 it. Adjust to use ptids.
14452 (linux_attach_lwp): New.
14453 (linux_attach): Add process to processes table. Don't set
14454 new_inferior here.
14455 (struct counter): New.
14456 (second_thread_of_pid_p, last_thread_of_process_p): New.
14457 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14458 multiple processes.
14459 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14460 processes. Remove process from process table.
14461 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14462 to multiple processes.
14463 (any_thread_of): New.
14464 (linux_detach): Add `pid' argument, and handle it. Remove process
14465 from processes table.
14466 (linux_join): Add `pid' argument. Handle it.
14467 (linux_thread_alive): Change unsighed long argument to ptid_t.
14468 Consider dead lwps as not being alive.
14469 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14470 threads we're not interested in.
14471 (same_lwp, find_lwp_pid): New.
14472 (linux_wait_for_lwp): Change `pid' argument's type from int to
14473 ptid_t. Adjust.
14474 (linux_wait_for_event): Rename to ...
14475 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14476 from int to ptid_t. Adjust.
14477 (linux_wait_for_event): New.
14478 (linux_wait_1): Add `ptid' argument. Change return type to
14479 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14480 that exit from the process table.
14481 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14482 Adjust.
14483 (mark_lwp_dead): New.
14484 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14485 stopping all threads, mark its main lwp as dead.
14486 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14487 ptids.
14488 (fetch_register, usr_store_inferior_registers)
14489 (regsets_fetch_inferior_registers)
14490 (regsets_store_inferior_registers, linux_read_memory)
14491 (linux_write_memory): Inline `inferior_pid'.
14492 (linux_look_up_symbols): Adjust to use per-process
14493 `thread_db_active'.
14494 (linux_request_interrupt): Adjust to use ptids.
14495 (linux_read_auxv): Inline `inferior_pid'.
14496 (initialize_low): Don't reference thread_db_active.
14497 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14498 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14499 (ps_getpid): Return the pid of the current inferior.
14500 * thread-db.c (proc_handle, thread_agent): Delete.
14501 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14502 per-process data.
14503 (find_one_thread): Change argument type to ptid_t. Adjust to
14504 per-process data.
14505 (maybe_attach_thread): Adjust to per-process data and ptids.
14506 (thread_db_find_new_threads): Ditto.
14507 (thread_db_init): Ditto.
14508 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14509 processes table. Adjust to use ptids.
14510 (spu_kill, spu_detach): Adjust interface. Remove process from
14511 processes table.
14512 (spu_join, spu_thread_alive): Adjust interface.
14513 (spu_wait): Adjust interface. Remove process from processes
14514 table. Adjust to use ptids.
14515 * win32-low.c (current_inferior_tid): Delete.
14516 (current_inferior_ptid): New.
14517 (debug_event_ptid): New.
14518 (thread_rec): Take a ptid. Adjust.
14519 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14520 (child_delete_thread): Ditto.
14521 (do_initial_child_stuff): Add `attached' argument. Add process to
14522 processes table.
14523 (child_fetch_inferior_registers, child_store_inferior_registers):
14524 Adjust.
14525 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14526 (win32_attach): Pass 1 to do_initial_child_stuff.
14527 (win32_kill): Adjust interface. Remove process from processes
14528 table.
14529 (win32_detach): Ditto.
14530 (win32_join): Adjust interface.
14531 (win32_thread_alive): Take a ptid.
14532 (win32_resume): Adjust to use ptids.
14533 (get_child_debug_event): Ditto.
14534 (win32_wait): Adjust interface. Remove exiting process from
14535 processes table.
14536
bd99dc85
PA
145372009-04-01 Pedro Alves <pedro@codesourcery.com>
14538
14539 Non-stop mode support.
14540
14541 * server.h (non_stop): Declare.
14542 (gdb_client_data, handler_func): Declare.
14543 (delete_file_handler, add_file_handler, start_event_loop):
14544 Declare.
14545 (handle_serial_event, handle_target_event, push_event)
14546 (putpkt_notif): Declare.
14547 * target.h (enum resume_kind): New.
14548 (struct thread_resume): Replace `step' field by `kind' field.
14549 (TARGET_WNOHANG): Define.
14550 (struct target_ops) <wait>: Add `options' argument.
14551 <supports_non_stop, async, start_non_stop>: New fields.
14552 (target_supports_non_stop, target_async): New.
14553 (start_non_stop): Declare.
14554 (mywait): Add `options' argument.
14555 * target.c (mywait): Add `options' argument. Print child exit
14556 notifications here.
14557 (start_non_stop): New.
14558 * server.c (non_stop, own_buf, mem_buf): New globals.
14559 (struct vstop_notif): New.
14560 (notif_queue): New global.
14561 (queue_stop_reply, push_event, discard_queued_stop_replies)
14562 (send_next_stop_reply): New.
14563 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14564 interface changes.
14565 (attach_inferior): In non-stop mode, don't wait for the target
14566 here.
14567 (handle_general_set): Handle QNonStop.
14568 (handle_query): When handling qC, return the current general
14569 thread, instead of the first thread of the list.
14570 (handle_query): If the backend supports non-stop mode, include
14571 QNonStop+ in the qSupported query response.
14572 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14573 and non-stop mode.
14574 (handle_v_attach, handle_v_run): Handle non-stop mode.
14575 (handle_v_stopped): New.
14576 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14577 (myresume): Adjust to use resume_kind. Handle non-stop.
14578 (queue_stop_reply_callback): New.
14579 (handle_status): Handle non-stop mode.
14580 (main): Clear non_stop flag on reconnection. Use the event-loop.
14581 Refactor serial protocol handling from here ...
14582 (process_serial_event): ... to this new function. When GDB
14583 selects any thread, select one here. In non-stop mode, wait until
14584 GDB acks all pending events before exiting.
14585 (handle_serial_event, handle_target_event): New.
14586 * remote-utils.c (remote_open): Install remote_desc in the event
14587 loop.
14588 (remote_close): Remove remote_desc from the event loop.
14589 (putpkt_binary): Rename to...
14590 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14591 (putpkt_binary): New as wrapper around putpkt_binary_1.
14592 (putpkt_notif): New.
14593 (prepare_resume_reply): In non-stop mode, don't change the
14594 general_thread.
14595 * event-loop.c: New.
14596 * Makefile.in (OBJ): Add event-loop.o.
14597 (event-loop.o): New rule.
14598
14599 * linux-low.h (pid_of): Moved here.
14600 (lwpid_of): New.
14601 (get_lwp_thread): Use lwpid_of.
14602 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14603 * linux-low.c (pid_of): Delete.
14604 (inferior_pid): Use lwpid_of.
14605 (linux_event_pipe): New.
14606 (target_is_async_p): New.
14607 (delete_lwp): New.
14608 (handle_extended_wait): Use lwpid_of.
14609 (add_lwp): Don't set lwpid field.
14610 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14611 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14612 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14613 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14614 first. Adjust to linux_wait_for_event interface changes. Use
14615 lwpid_of.
14616 (linux_detach): Don't delete the main lwp here.
14617 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14618 (status_pending_p): Don't consider explicitly suspended lwps.
14619 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14620 pointer. Add OPTIONS argument. Change return type to int. Use
14621 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14622 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14623 pointer. Add status pointer argument. Return a pid instead of a
14624 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14625 changes. In non-stop mode, don't switch to a random thread.
14626 (linux_wait): Rename to...
14627 (linux_wait_1): ... this. Add target_options argument, and handle
14628 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14629 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14630 clean exit and signal exit code. Don't stop all threads in
14631 non-stop mode. In all-stop mode, only stop all threads when
14632 reporting a stop to GDB. Handle explicit thread stop requests.
14633 (async_file_flush, async_file_mark): New.
14634 (linux_wait): New.
14635 (send_sigstop): Use lwpid_of.
14636 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14637 interface changes. In non-stop mode, don't switch to a random
14638 thread.
14639 (linux_resume_one_lwp): Use lwpid_of.
14640 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14641 (linux_resume_one_thread): ... this. Handle resume_stop. In
14642 non-stop mode, don't look for pending flag in all threads.
14643 (resume_status_pending_p): Don't consider explicitly suspended
14644 threads.
14645 (my_waitpid): Reimplement. Emulate __WALL.
14646 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14647 Use lwpid_of.
14648 (sigchld_handler, linux_supports_non_stop, linux_async)
14649 (linux_start_non_stop): New.
14650 (linux_target_ops): Register linux_supports_non_stop, linux_async
14651 and linux_start_non_stop.
14652 (initialize_low): Install SIGCHLD handler.
14653 * thread-db.c (thread_db_create_event, find_one_thread)
14654 (thread_db_get_tls_address): Use lwpid_of.
14655 * win32-low.c (win32_detach): Adjust to use resume_kind.
14656 (win32_wait): Add `options' argument.
14657 * spu-low.c (spu_resume): Adjust to use resume_kind.
14658 (spu_wait): Add `options' argument.
14659
5b1c542e
PA
146602009-04-01 Pedro Alves <pedro@codesourcery.com>
14661
14662 Decouple target code from remote protocol.
14663
14664 * target.h (enum target_waitkind): New.
14665 (struct target_waitstatus): New.
14666 (struct target_ops) <wait>: Return an unsigned long. Take a
14667 target_waitstatus pointer instead of a char pointer.
14668 (mywait): Likewise.
14669 * target.c (mywait): Change prototype to return an unsigned long.
14670 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14671 * server.h (thread_from_wait, old_thread_from_wait): Delete
14672 declarations.
14673 (prepare_resume_reply): Change prototype to take a
14674 target_waitstatus.
14675 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14676 (last_status, last_ptid): New.
14677 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14678 pid instead of a signal.
14679 (attach_inferior): Remove "status" and "signal" parameters.
14680 Adjust.
14681 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14682 not as an address.
14683 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14684 (handle_v_requests, myresume): Remove "status" and "signal"
14685 parameters. Adjust.
14686 (handle_status): New.
14687 (main): Delete local `status'. Adjust.
14688 * remote-utils.c: Include target.h.
14689 (prepare_resume_reply): Change prototype to take a
14690 target_waitstatus. Adjust.
14691
14692 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14693 interface.
14694 * spu-low.c (spu_wait): Adjust.
14695 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14696 Delete.
14697 (win32_wait): Adjust.
14698
2bd7c093
PA
146992009-04-01 Pedro Alves <pedro@codesourcery.com>
14700
14701 * target.h (struct thread_resume): Delete leave_stopped member.
14702 (struct target_ops): Add a `n' argument to the `resume' callback.
14703 * server.c (start_inferior): Adjust.
14704 (handle_v_cont, myresume): Adjust.
14705 * linux-low.c (check_removed_breakpoint): Adjust to resume
14706 interface change, and to removed leave_stopped field.
14707 (resume_ptr): Delete.
14708 (struct thread_resume_array): New.
14709 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14710 resume interface change.
14711 (linux_continue_one_thread, linux_queue_one_thread)
14712 (resume_status_pending_p): Check if the resume field is NULL
14713 instead of checking the leave_stopped member.
14714 (linux_resume): Adjust to the target resume interface change.
14715 * spu-low.c (spu_resume): Adjust to the target resume interface
14716 change.
14717 * win32-low.c (win32_detach, win32_resume): Ditto.
14718
c35fafde
PA
147192009-04-01 Pedro Alves <pedro@codesourcery.com>
14720
14721 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14722 flag.
14723 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14724 pending.
14725 (linux_continue_one_thread): Only preserve the stepping flag if
14726 there's a pending breakpoint.
14727
0a59d50b
PA
147282009-03-31 Pedro Alves <pedro@codesourcery.com>
14729
14730 * server.c (main): After the inferior having exited, call
14731 remote_close before exiting gdbserver.
14732
f04c6d38
TJB
147332009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14734
14735 Fix size of FPSCR in Power 7 processors.
14736 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14737 (PPC_FEATURE_HAS_DFP): New #define.
14738 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14739 size of the FPSCR.
14740
78e5cee6
PA
147412009-03-23 Pedro Alves <pedro@codesourcery.com>
14742
14743 * server.c (handle_query) Whitespace and formatting.
14744
1b3f6016
PA
147452009-03-22 Pedro Alves <pedro@codesourcery.com>
14746
14747 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14748 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14749 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14750 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14751 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14752 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14753 Makefile.in, configure.ac: Fix whitespace throughout.
14754 * configure: Regenerate.
14755
a07b2135
PA
147562009-03-22 Pedro Alves <pedro@codesourcery.com>
14757
14758 * inferiors.c (find_inferior): Make it safe for the callback
14759 function to delete the currently iterated inferior.
14760
67cc2626
PA
147612009-03-22 Pedro Alves <pedro@codesourcery.com>
14762
14763 * Makefile.in (linuw_low_h): Move higher.
14764 (thread-db.o): Depend on $(linux_low_h).
14765
54a0b537
PA
147662009-03-17 Pedro Alves <pedro@codesourcery.com>
14767
14768 Rename "process" to "lwp" throughout.
14769
14770 * linux-low.c (all_processes): Rename to...
14771 (all_lwps): ... this.
14772 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14773 (add_process): Rename to ...
14774 (add_lwp): ... this. Adjust.
14775 (linux_create_inferior): Adjust.
14776 (linux_attach_lwp): Adjust.
14777 (linux_attach): Adjust.
14778 (linux_kill_one_process): Rename to ...
14779 (linux_kill_one_lwp): ... this. Adjust.
14780 (linux_kill): Adjust.
14781 (linux_detach_one_process): Rename to ...
14782 (linux_detach_one_lwp): ... this. Adjust.
14783 (linux_detach): Adjust.
14784 (check_removed_breakpoint): Adjust.
14785 (status_pending_p): Adjust.
14786 (linux_wait_for_process): Rename to ...
14787 (linux_wait_for_lwp): ... this. Adjust.
14788 (linux_wait_for_event): Adjust.
14789 (send_sigstop): Adjust.
14790 (wait_for_sigstop): Adjust.
14791 (stop_all_processes): Rename to ...
14792 (stop_all_lwps): ... this.
14793 (linux_resume_one_process): Rename to ...
14794 (linux_resume_one_lwp): ... this. Adjust.
14795 (linux_set_resume_request, linux_continue_one_thread)
14796 (linux_queue_one_thread, resume_status_pending_p)
14797 (usr_store_inferior_registers, regsets_store_inferior_registers)
14798 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14799 Adjust.
14800 * linux-low.h (get_process): Rename to ...
14801 (get_lwp): ... this. Adjust.
14802 (get_thread_process): Rename to ...
14803 (get_thread_lwp): ... this. Adjust.
14804 (get_process_thread): Rename to ...
14805 (get_lwp_thread): ... this. Adjust.
14806 (struct process_info): Rename to ...
14807 (struct lwp_info): ... this.
14808 (all_processes): Rename to ...
14809 (all_lwps): ... this.
14810 * proc-service.c (ps_lgetregs): Adjust.
14811 * thread-db.c (thread_db_create_event, find_one_thread)
14812 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14813
0b16c5cf
PA
148142009-03-14 Pedro Alves <pedro@codesourcery.com>
14815
14816 * server.c (handle_query): Handle "qAttached".
14817
32de4b9d
NS
148182009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14819
14820 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14821 GPLv3, update license URL.
14822
2aecd87f
DE
148232009-03-01 Doug Evans <dje@google.com>
14824
93efd302 14825 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14826 (server_h): Add gdb_signals.h.
14827 (signals.o): Update.
14828 * server.h (target_signal_from_host,target_signal_to_host_p)
14829 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14830
86b1f9c5
PM
148312009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14832
14833 * remote-utils.c (getpkt): Also generate remote-debug
14834 information if noack_mode is set.
14835
4aa995e1
PA
148362009-02-06 Pedro Alves <pedro@codesourcery.com>
14837
14838 * server.c (handle_query): Report qXfer:siginfo:read and
14839 qXfer:siginfo:write as supported and handle them.
14840 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14841 * linux-low.c (linux_xfer_siginfo): New.
14842 (linux_target_ops): Set it.
14843
62709adf
PA
148442009-01-26 Pedro Alves <pedro@codesourcery.com>
14845
14846 * server.c (gdbserver_usage): Mention --remote-debug.
14847 (main): Accept '--remote-debug' switch.
14848
aef93bd7
DE
148492009-01-18 Doug Evans <dje@google.com>
14850
14851 * regcache.c (new_register_cache): No need to check result of xcalloc.
14852 * server.c (handle_search_memory): Back out calls to xmalloc,
14853 result is checked and error is returned to user upon failure.
14854 (handle_query): Ditto. Add more checks for result of malloc.
14855 (handle_v_cont): Check result of malloc, report error back to
14856 user upon failure.
14857 (handle_v_run): Ditto. Call freeargv.
14858 * server.h (freeargv): Declare.
14859 * utils.c (freeargv): New fn.
14860
54363045
DE
148612009-01-15 Doug Evans <dje@google.com>
14862
f626972c
DE
14863 * gdbreplay.c (perror_with_name): Make arg const char *.
14864 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14865 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14866 * utils.c (perror_with_name): Make arg const char *.
54363045 14867
18aae699
PA
148682009-01-14 Pedro Alves <pedro@codesourcery.com>
14869
14870 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14871 when handling a EXIT_PROCESS_DEBUG_EVENT.
14872
ff703abe
JB
148732009-01-06 Joel Brobecker <brobecker@adacore.com>
14874
14875 * gdbreplay.c (gdbreplay_version): Update copyright year.
14876 * server.c (gdbserver_version): Likewise.
14877
f21cc1a2 148782009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14879
14880 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14881 (handle_extended_wait): Improve comment.
0e21c1ec 14882
bca929d3
DE
148832008-12-13 Doug Evans <dje@google.com>
14884
14885 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14886 * server.h (ATTR_MALLOC): New macro.
14887 (xmalloc,xcalloc,xstrdup): Declare.
14888 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14889 * inferiors.c: Ditto.
14890 * linux-low.c: Ditto.
14891 * mem-break.c: Ditto.
14892 * regcache.c: Ditto.
14893 * remote-utils.c: Ditto.
14894 * server.c: Ditto.
14895 * target.c: Ditto.
14896 * win32-low.c: Ditto.
14897
97438e3f
DE
148982008-12-12 Doug Evans <dje@google.com>
14899
896c7fbb
DE
14900 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14901 in debugging printf.
14902
97438e3f
DE
14903 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14904
e3b886f8
DE
149052008-12-09 Doug Evans <dje@google.com>
14906
14907 * linux-low.h (struct process_info): Delete member tid, unused.
14908 * thread-db.c (find_one_thread): Update.
14909 (maybe_attach_thread): Update.
14910
07e059b5
VP
149112008-12-02 Pedro Alves <pedro@codesourcery.com>
14912
889bf7c5
PA
14913 * target.h (struct target_ops): Add qxfer_osdata member.
14914 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14915 and dirent.h.
14916 (linux_qxfer_osdata): New functions.
14917 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14918 callback.
14919 * server.c (handle_query): Handle "qXfer:osdata:read:".
14920 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14921 (buffer_xml_printf): New functions.
14922 * server.h (struct buffer): New.
14923 (buffer_grow_str, buffer_grow_str0): New macros.
14924 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14925 (buffer_xml_printf): Declare.
07e059b5 14926
4cab47ab
DE
149272008-11-24 Doug Evans <dje@google.com>
14928
14929 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14930
f142445f
DJ
149312008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14932
14933 * server.c (handle_v_run): Always use the supplied argument list.
14934
d0107bb6 149352008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14936
d0107bb6
BW
14937 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14938 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14939
2c4ad781
TJB
149402008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14941
14942 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14943 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14944 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14945 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14946 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14947 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14948 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14949 XML target descriptions.
14950 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14951 when inferior is running on an ISA 2.05 or later processor. Add
14952 special case to return offset for full 64-bit slot of FPSCR when
14953 in 32-bits.
14954
dfb64f85
DJ
149552008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14956
14957 * Makefile.in (SFILES, clean): Added sparc64 files.
14958 (reg-sparc64.o, reg-sparc64.c): New.
14959 * configure.srv (sparc*-*-linux*): New configuration.
14960 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14961 syscall arguments for SPARC.
14962 (regsets_store_inferior_registers): Likewise.
14963 * linux-sparc-low.c: New file.
14964
66b6e1dd
DE
149652008-10-21 Doug Evans <dje@google.com>
14966
14967 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14968 (READLINE_DIR,READLINE_DEP): Delete.
14969 (INTERNAL_CFLAGS): Update.
14970 (LINTFLAGS): Update.
14971
9b710a42
PA
149722008-10-10 Pedro Alves <pedro@codesourcery.com>
14973
14974 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14975 whole argv from the last run, not just argv[0].
14976
5822d809
PA
149772008-09-08 Pedro Alves <pedro@codesourcery.com>
14978
14979 * regcache.c (new_register_cache): Return NULL if the register
14980 cache size isn't known yet.
14981 (free_register_cache): Avoid dereferencing a NULL regcache.
14982
74aac56f
DJ
149832008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14984
14985 * configure.srv: Merge MIPS and MIPS64.
14986
400b20f5
MR
149872008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14988
14989 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14990
677c5bb1
LM
149912008-08-18 Luis Machado <luisgpm@br.ibm.com>
14992
14993 * Makefile.in: Add required vsx dependencies.
14994
14995 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14996 Declare init_registers_powerpc_vsx32l.
14997 Declare init_registers_powerpc_vsx64l.
14998 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14999 (ppc_arch_setup): Check for VSX in hwcap.
15000 (ppc_fill_vsxregset): New function.
15001 (ppc_store_vsxregset): New function.
15002 Add new VSX entry in regset_info target_regsets.
15003
15004 * configure.srv: Add new VSX dependencies.
15005
a6f3e723
SL
150062008-08-12 Pedro Alves <pedro@codesourcery.com>
15007
15008 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15009 (remote_open): Set or clear transport_is_reliable.
15010 (putpkt_binary): Don't expect acks in noack mode.
15011 (getpkt): Don't send ack/nac in noack mode.
15012 * server.c (handle_general_set): Handle QStartNoAckMode.
15013 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15014 qSupported.
15015 (main): Reset noack_mode on every connection.
15016 * server.h (noack_mode): Declare.
15017
a417dc56
RW
150182008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15019
15020 * Makefile.in (GDBREPLAY_OBS): New variable.
15021 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15022
3221518c
UW
150232008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15024 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15027 (usr_store_inferior_registers): Likewise.
15028 (regsets_store_inferior_registers): Likewise.
15029
ec56be1b
PA
150302008-07-31 Rolf Jansen <rj@surtec.com>
15031 Pedro Alves <pedro@codesourcery.com>
15032
15033 * configure.ac: Check for memmem declaration.
15034 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15035 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15036 (disable_packet_qfThreadInfo): Unconditionally compile.
15037 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15038 * configure, config.in: Regenerate.
15039
2fe5e3ff
DE
150402008-07-28 Doug Kwan <dougkwan@google.com>
15041
15042 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15043 (linux_write_memory): Remove declaration of errno.
15044
836acd6d
UW
150452008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15046
15047 * linux-low.c (handle_extended_wait): Do not use "status"
15048 variable uninitialized.
15049
aeba519e
PA
150502008-07-07 Pedro Alves <pedro@codesourcery.com>
15051
15052 * server.c (handle_v_attach): Inhibit reporting dll changes.
15053
db42f210
PA
150542008-06-27 Pedro Alves <pedro@codesourcery.com>
15055
15056 * remote-utils.c (prepare_resume_reply): If requested, don't
15057 output "thread:TID" in the T stop reply.
15058
15059 * server.c (disable_packet_vCont, disable_packet_Tthread)
15060 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15061 (handle_query): If requested, disable support for qC, qfThreadInfo
15062 and qsThreadInfo.
15063 (handle_v_requests): If requested, disable support for vCont.
15064 (gdbserver_show_disableable): New.
15065 (main): Handle --disable-packet and --disable-packet=LIST.
15066
15067 * server.h (disable_packet_vCont, disable_packet_Tthread)
15068 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15069
8e4c5421
CD
150702008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15071
15072 * server.c (gdbserver_usage): Mention --version.
15073
6e23a804
DJ
150742008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15075
15076 * Makefile.in (gdbreplay.o): New rule.
15077
90aa6a40
JM
150782008-06-06 Joseph Myers <joseph@codesourcery.com>
15079
15080 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15081 message, not gdbserver.
15082
c16158bc 150832008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15084 Nathan Sidwell <nathan@codesourcery.com>
15085 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15086
15087 * acinclude.m4: Include ../../config/acx.m4.
15088 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15089 * configure, config.in: Regenerate.
15090 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15091 * server.c (gdbserver_version): Print PKGVERSION.
15092 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15093 (main): Adjust gdbserver_usage calls.
15094 * gdbreplay.c (version, host_name): Add declarations.
15095 (gdbreplay_version, gdbreplay_usage): New.
15096 (main): Accept --version and --help options.
15097
aeb75bf5
DJ
150982008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15099
15100 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15101 (arm_breakpoint_at): Handle Thumb.
15102 (the_low_target): Add comment.
15103
76b233dd
UW
151042008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15105
15106 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15107
08388c79
DE
151082008-05-09 Doug Evans <dje@google.com>
15109
a3c83fae
DE
15110 * server.h (decode_search_memory_packet): Declare.
15111 * remote-utils.c (decode_search_memory_packet): New fn.
15112 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15113 (handle_search_memory): New fn.
15114 (handle_query): Process qSearch:memory packets.
15115
bb9c3d36
UW
151162008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15117
15118 * regcache.c (registers_length): Remove.
15119 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15120 full register packet.
15121 * regcache.h (registers_length): Remove prototype.
15122 * server.h (PBUFSIZ): Define to 16384.
15123
7284e1be
UW
151242008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15125
15126 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15127 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15128 powerpc-64l.o, and powerpc-altivec64l.o.
15129 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15130 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15131 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15132 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15133 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15134 to srv_xmlfiles.
15135
15136 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15137 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15138 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15139 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15140 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15141 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15142 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15143 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15144 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15145 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15146 (clean): Update.
15147
15148 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15149 (init_registers_powerpc_32l): ... this new prototype.
15150 (init_registers_powerpc_32): Remove, replace by ...
15151 (init_registers_powerpc_altivec32l): ... this new prototype.
15152 (init_registers_powerpc_e500): Remove, replace by ...
15153 (init_registers_powerpc_e500l): ... this new prototype.
15154 (init_registers_ppc64): Remove, replace by ...
15155 (init_registers_powerpc_64l): ... this new prototype.
15156 (init_registers_powerpc_64): Remove, replace by ...
15157 (init_registers_powerpc_altivec64l): ... this new prototype.
15158 (ppc_num_regs): Set to 73.
15159 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15160 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15161 (ppc_cannot_store_register): Handle orig_r3 and trap.
15162 (ppc_arch_setup): Update init_registers_... calls.
15163 (ppc_fill_gregset): Handle orig_r3 and trap.
15164
15165 * inferiors.c (clear_inferiors): Reset current_inferior.
15166
fdc59709
PB
151672008-04-23 Paolo Bonzini <bonzini@gnu.org>
15168
889bf7c5
PA
15169 * acinclude.m4: Add override.m4.
15170 * configure: Regenerate.
fdc59709 15171
c9b2f845
UW
151722008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15173
15174 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15175 initial call to init_register_ppc64.
15176
550512b8
UW
151772008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15178
43aaf8b6
PA
15179 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15180 single powerpc*-*-linux* case.
550512b8
UW
15181 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15182
b6430ec3
UW
151832008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15184
15185 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15186 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15187 from reg_xmlfiles.
15188 * linux-ppc-low.c: Include <elf.h>.
15189 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15190 (ppc_hwcap): New global variable.
15191 (ppc_regmap): Remove __SPE__ #ifdef sections.
15192 (ppc_regmap_e500): New global variable.
15193 (ppc_cannot_store_register): Update __SPE__ special case.
15194 (ppc_get_hwcap): New function.
15195 (ppc_arch_setup): Use it to determine whether inferior supports
15196 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15197 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15198 Do not access registers if target does not support AltiVec.
15199 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15200 Do not access registers if target does not support SPE.
15201 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15202
52fa2412
UW
152032008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15204
15205 * linux-low.c (disabled_regsets, num_regsets): New.
15206 (use_regsets_p): Delete.
15207 (linux_wait_for_process): Clear disabled_regsets.
15208 (regsets_fetch_inferior_registers): Check and set it.
15209 (regsets_store_inferior_registers): Likewise.
15210 (linux_fetch_registers, linux_store_registers): Do not use
15211 use_regsets_p.
15212 (initialize_low): Allocate disabled_regsets.
15213
e28b3332
DJ
152142008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15215
15216 * Makefile.in (LIBOBJS): New.
15217 (OBS): Use LIBOBJS.
15218 (memmem.o): New rule.
15219 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15220 * configure: Regenerated.
15221
4536995d
UW
152222008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15223
15224 * server.c (handle_query): Never return "unsupported" for
15225 qXfer:features:read queries.
15226
221c031f
UW
152272008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15228
15229 * server.c (get_features_xml): Fix inverted condition.
15230 (handle_query): Always support qXfer:feature:read.
15231
ccd213ac
DJ
152322008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15233
15234 * server.c (wrapper_argv): New.
15235 (start_inferior): Handle wrapper_argv. If set, expect an extra
15236 trap.
15237 (gdbserver_usage): Document --wrapper.
15238 (main): Parse --wrapper.
15239
6fe305f7
UW
152402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15241
15242 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15243 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15244 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15245 (ppc_set_pc): Likewise.
15246 (ppc_arch_setup): New function.
15247 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15248 of collect_register.
889bf7c5 15249 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15250
5b0a002e
UW
152512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15252
15253 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15254 instead of linux-ppc64-low.o.
15255 * linux-ppc64-low.c: Remove file.
15256 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15257 (linux-ppc64-low.o): Remove rule.
15258
15259 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15260 (init_registers_powerpc_64): Likewise.
15261 (ppc_regmap): Conditionally define depending on __powerpc64__.
15262 (ppc_cannot_store_register): Do not special-case "fpscr" when
15263 compiled on __powerpc64__.
15264 (ppc_collect_ptrace_register): New function.
15265 (ppc_supply_ptrace_register): New function.
15266 (ppc_breakpoint): Change type to "unsigned int".
15267 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15268 (the_low_target): Conditionally provide initializers for the
889bf7c5 15269 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15270 collect_ptrace_register and supply_ptrace_register members.
15271
9b4b61c8
UW
152722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15273
15274 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15275 * server.c (gdbserver_xmltarget): Define.
15276 (get_features_xml): Use it to replace "target.xml" and arch_string.
15277
15278 * configure.srv: Remove srv_xmltarget. Add XML files that were
15279 mentioned there to srv_xmlfiles instead. Remove conditional tests
15280 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15281 srv_xmlfiles and srv_regobj to include all possible choices.
15282 * configure.ac (srv_xmltarget): Remove.
15283 (srv_xmlfiles): Do not add "target.xml".
15284 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15285 checks for supplementary target information.
15286 * configure: Regenerate.
15287 * Makefile.in (XML_TARGET): Remove.
15288 (target.xml): Remove rule.
15289 (clean): Do not clean up target.xml.
15290 (.PRECIOUS): Do not mention target.xml.
15291
15292 * target.h (struct target_ops): Remove arch_string member.
15293 * linux-low.c (linux_arch_string): Remove.
15294 (linux_target_ops): Remove arch_string initializer.
15295 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15296 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15297 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15298 * spu-low.c (spu_arch_string): Remove.
15299 (spu_target_ops): Remove arch_string initializer.
15300 * win32-low.c (win32_arch_string): Remove.
15301 (win32_target_ops): Remove arch_string initializer.
15302 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15303 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15304 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15305
ee1a7ae4
UW
153062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15307
15308 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15309 by collect_ptrace_register and supply_ptrace_register hooks.
15310 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15311 instead of checking for the_low_target.left_pad_xfer.
15312 (usr_store_inferior_registers): Use collect_ptrace_register callback
15313 instead of checking for the_low_target.left_pad_xfer.
15314
15315 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15316 (s390_supply_ptrace_register): Likewise.
15317 (s390_fill_gregset): Call s390_collect_ptrace_register.
15318 (the_low_target): Update.
15319
15320 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15321 (ppc_supply_ptrace_register): Likewise.
15322 (the_low_target): Update.
15323
15324 * linux-i386-low.c (the_low_target): Update.
15325 * linux-x86-64-low.c (the_low_target): Update.
15326
d61ddec4
UW
153272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15328
15329 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15330 reg-s390.o and reg-s390x.o.
15331
15332 * linux-low.c (new_inferior): New global variable.
15333 (linux_create_inferior, linux_attach): Set it.
15334 (linux_wait_for_process): Call the_low_target.arch_setup after the
15335 target has stopped for the first time.
15336 (initialize_low): Do not call the_low_target.arch_setup.
15337
15338 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15339 (s390_set_pc): Likewise.
15340 (s390_arch_setup): New function.
15341 (the_low_target): Use s390_arch_setup as arch_setup routine.
15342
15343 * regcache.c (realloc_register_cache): New function.
15344 (set_register_cache): Call it for each existing regcache.
15345
d05b4ac3
UW
153462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15347
15348 * server.h (init_registers): Remove prototype.
15349
15350 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15351 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15352 instead of init_registers ().
15353 * linux-arm-low.c (init_registers_arm): Add prototype.
15354 (init_registers_arm_with_iwmmxt): Likewise.
15355 (the_low_target): Add initializer for arch_setup field.
15356 * linux-cris-low.c (init_registers_cris): Add prototype.
15357 (the_low_target): Add initializer for arch_setup field.
15358 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15359 (the_low_target): Add initializer for arch_setup field.
15360 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15361 (the_low_target): Add initializer for arch_setup field.
15362 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15363 (the_low_target): Add initializer for arch_setup field.
15364 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15365 (the_low_target): Add initializer for arch_setup field.
15366 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15367 (the_low_target): Add initializer for arch_setup field.
15368 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15369 (init_registers_mips64_linux): Likewise.
15370 (the_low_target): Add initializer for arch_setup field.
15371 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15372 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15373 (the_low_target): Add initializer for arch_setup field.
15374 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15375 (init_registers_powerpc_64): Likewise.
15376 (the_low_target): Add initializer for arch_setup field.
15377 * linux-s390-low.c (init_registers_s390): Add prototype.
15378 (init_registers_s390x): Likewise.
15379 (the_low_target): Add initializer for arch_setup field.
15380 * linux-sh-low.c (init_registers_sh): Add prototype.
15381 (the_low_target): Add initializer for arch_setup field.
15382 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15383 (the_low_target): Add initializer for arch_setup field.
15384 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15385 (the_low_target): Add initializer for arch_setup field.
15386
15387 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15388 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15389 instead of init_registers ().
15390 * win32-arm-low.c (init_registers_arm): Add prototype.
15391 (the_low_target): Add initializer for arch_setup field.
15392 * win32-i386-low.c (init_registers_i386): Add prototype.
15393 (the_low_target): Add initializer for arch_setup field.
15394
15395 * spu-low.c (init_registers_spu): Add prototype.
15396 (initialize_low): Call initialie_registers_spu () instead of
15397 initialize_registers ().
15398
fd96d250
PA
153992008-02-19 Pedro Alves <pedro@codesourcery.com>
15400
15401 * server.c (handle_v_requests): When handling the vRun and vAttach
15402 packets, if already debugging a process, don't kill it. Return an
15403 error instead.
15404
d41b6bb4
DJ
154052008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15406
15407 * server.c (handle_query): Correct length check.
15408
5ac588cf
PA
154092008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15410
15411 * win32-low.c (do_initial_child_stuff): Add process handle
15412 parameter. Set current_process_handle and current_process_id from the
15413 parameters. Clear globals.
15414 (win32_create_inferior): Don't set current_process_handle and
15415 current_process_id here. Instead pass them on the call to
15416 do_initial_child_stuff.
15417 (win32_attach): Likewise.
15418 (win32_clear_inferiors): New.
15419 (win32_kill): Don't close the current process handle or the
15420 current thread handle here. Instead call win32_clear_inferiors.
15421 (win32_detach): Don't open a new handle to the process. Call
15422 win32_clear_inferiors.
15423 (win32_join): Don't rely on current_process_handle; open a new
15424 handle using the process id.
15425 (win32_wait): Call win32_clear_inferiors when the inferior process
15426 has exited.
15427
ecd7ecbc
DJ
154282008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15429
15430 * server.c (monitor_show_help): Add "exit".
15431
1525d545
MG
154322008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15433
ecd7ecbc 15434 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15435 (clean): Add reg-xtensa.c.
15436 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15437 * configure.srv (xtensa*-*-linux*) New target.
15438 * linux-xtensa-low.c: New.
15439 * xtensa-xtregs.c: New.
1525d545 15440
59a016f0
PA
154412008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15442
15443 * hostio.c: Don't include errno.h.
15444 (errno_to_fileio_errno): Move to hostio-errno.
15445 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15446 error number outputting to the target->hostio_last_error callback.
15447 (hostio_packet_error): Use FILEIO_EINVAL directly.
15448 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15449 calls to hostio_error.
15450 * hostio-errno.c: New.
15451 * server.h (hostio_last_error_from_errno): Declare.
15452 * target.h (target_ops): Add hostio_last_error member.
15453 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15454 as hostio_last_error handler.
889bf7c5 15455 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15456 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15457 (wince_hostio_last_error): New functions.
15458 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15459 as hostio_last_error handler.
15460 (win32_target_ops) [!_WIN32_WCE]: Register
15461 hostio_last_error_from_errno as hostio_last_error handler.
15462 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15463 (hostio-errno.o): New rule.
15464 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15465 * configure.srv (srv_hostio_err_objs): New variable. Default to
15466 hostio-errno.o.
15467 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15468 * configure: Regenerate.
15469
2d717e4f
DJ
154702008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15471
15472 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15473 (linux_kill, linux_detach): Clean up the process list.
15474 * remote-utils.c (remote_open): Improve port number parsing.
15475 (putpkt_binary, input_interrupt): Only send interrupts if the target
15476 is running.
15477 * server.c (extended_protocol): Make static.
15478 (attached): Define earlier.
15479 (exit_requested, response_needed, program_argv): New variables.
15480 (target_running): New.
15481 (start_inferior): Clear attached here.
15482 (attach_inferior): Set attached here.
15483 (require_running): Define.
15484 (handle_query): Use require_running and target_running. Implement
15485 "monitor exit".
15486 (handle_v_attach, handle_v_run): New.
15487 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15488 (gdbserver_usage): Update.
15489 (main): Redo argument parsing. Handle --debug and --multi. Handle
15490 --attach along with other options or after the port. Save
15491 program_argv. Support no initial program. Resynchronize
15492 communication with GDB after an error. Handle "monitor exit".
15493 Use require_running and target_running. Always allow the extended
15494 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15495 restart in extended mode.
15496 * README: Refer to the GDB manual. Update --attach usage.
15497
7407e2de
AS
154982007-12-20 Andreas Schwab <schwab@suse.de>
15499
15500 * linux-low.c (STACK_SIZE): Define.
15501 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15502 (linux_test_for_tracefork): Likewise.
15503
b65d95c5
DJ
155042007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15505
15506 * linux-low.c (linux_wait_for_event): Update messages. Do not
15507 reinsert auto-delete breakpoints.
15508 * mem-break.c (struct breakpoint): Change return type of handler to
15509 int.
15510 (set_breakpoint_at): Update handler type.
15511 (reinsert_breakpoint_handler): Return 1 instead of calling
15512 delete_breakpoint.
15513 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15514 setting a new one.
15515 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15516 * mem-break.h (set_breakpoint_at): Update handler type.
15517 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15518 * win32-low.c (auto_delete_breakpoint): New.
15519 (get_child_debug_event): Use it.
15520
4e799345
DJ
155212007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15522
15523 * configure.ac: Check for pread and pwrite.
15524 * hostio.c (handle_pread): Fall back to lseek and read.
15525 (handle_pwrite): Fall back to lseek and write.
15526 * config.in, configure: Regenerated.
15527
27524b67
DJ
155282007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15529
15530 * server.c (myresume): Add own_buf argument.
15531 (main): Update calls.
15532
a20d5e98
DJ
155332007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15534
15535 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15536 * remote-utils.c (remote_open): Do not call disable_async_io.
15537 (block_async_io): Delete.
15538 (unblock_async_io): Make static.
15539 (initialize_async_io): New.
15540 * server.c (handle_v_cont): Handle async I/O here.
15541 (myresume): Likewise. Move other common resume tasks here...
15542 (main): ... from here. Call initialize_async_io. Disable async
15543 I/O before the main loop.
15544 * server.h (initialize_async_io): Declare.
15545 (block_async_io, unblock_async_io): Delete prototypes.
15546 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15547
b79d787e
DJ
155482007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15549
15550 * remote-utils.c (readchar): Allow binary data in received messages.
15551
d97903b2
PA
155522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15553
15554 * win32-low.c (attaching): New global.
15555 (win32_create_inferior): Clear the `attaching' global.
15556 (win32_attach): Set the `attaching' global.
15557 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15558 attaching. Only set a breakpoint at the entry point if not
15559 attaching.
15560
311de423
PA
155612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15562
15563 * server.c (main): Don't report dll events on the initial
15564 connection on attaches.
15565
6c2d16d2
PA
155662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15567
15568 * server.c (main): Relax numerical bases supported for the pid of
15569 the --attach command line argument.
15570
5ca906e6
PA
155712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15572
15573 * win32-low.c (win32_attach): Call OpenProcess before
15574 DebugActiveProcess, not after. Add last error output to error
15575 call.
15576
9c6c8194
PA
155772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15578
15579 * win32-low.c (win32_get_thread_context)
15580 (win32_set_thread_context): New functions.
15581 (thread_rec): Use win32_get_thread_context.
15582 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15583 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15584 field.
15585
4d5d1aaa
PA
155862007-12-03 Leo Zayas
15587 Pedro Alves <pedro_alves@portugalmail.pt>
15588
15589 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15590 global variables.
15591 (child_add_thread): Minor cleanup.
15592 (child_continue): Resume artificially suspended threads before
15593 calling ContinueDebugEvent.
15594 (suspend_one_thread): New.
15595 (fake_breakpoint_event): New.
15596 (get_child_debug_event): Change return type to int. Check here if
15597 gdb sent an interrupt request. If a soft interrupt was requested,
15598 fake a breakpoint event. Return 0 if there is no event to handle,
15599 and 1 otherwise.
15600 (win32_wait): Don't check here if gdb sent an interrupt request.
15601 Ensure there is a valid event to handle.
15602 (win32_request_interrupt): Add soft interruption method as last
15603 resort.
15604
c436e841
PA
156052007-12-03 Leo Zayas
15606 Pedro Alves <pedro_alves@portugalmail.pt>
15607
15608 * win32-low.h (win32_thread_info): Add descriptions to the
15609 structure members. Replace `suspend_count' counter by a
15610 `suspended' flag.
15611 * win32-low.c (thread_rec): Update condition of when to get the
15612 context from the inferior. Rely on ContextFlags being set if it
15613 has already been retrieved. Only suspend the inferior thread if
15614 we haven't already. Warn if that fails.
15615 (continue_one_thread): s/suspend_count/suspended/. Only call
15616 ResumeThread once. Warn if that fails.
15617
e7b5fa67
PA
156182007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15619
15620 * win32-low.c (win32_wait): Don't read from the inferior when it
15621 has already exited.
15622
a385171d
PA
156232007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15624
15625 * Makefile.in (win32_low_h): New variable.
15626 (win32-low.o): Add dependency on $(win32_low_h).
15627 (win32-arm-low.o, win32-i386-low.o): New rules.
15628
f80c84b3
DJ
156292007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15630
15631 * hostio.c: Correct copyright year.
15632
a6b151f1
DJ
156332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15634
15635 * Makefile.in (OBS): Add hostio.o.
15636 (hostio.o): New rule.
15637 * server.h (handle_vFile): Declare.
15638 * hostio.c: New file.
15639 * server.c (handle_v_requests): Take packet_len and new_packet_len
15640 for binary packets. Call handle_vFile.
15641 (main): Update call to handle_v_requests.
15642
f9387fc3
DJ
156432007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15644
15645 * linux-low.c: Include <sched.h>.
15646
51c2684e
DJ
156472007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15648
15649 * linux-low.c (linux_tracefork_grandchild): New.
15650 (linux_tracefork_child): Use clone.
15651 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15652
75f83163
JB
156532007-10-31 Joel Brobecker <brobecker@adacore.com>
15654
15655 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15656
da5898ce
DJ
156572007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15658
15659 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15660
24a09b5f
DJ
156612007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15662
15663 * inferiors.c (change_inferior_id): Delete.
15664 (add_pid_to_list, pull_pid_from_list): New.
15665 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15666 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15667 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15668 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15669 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15670 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15671 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15672 (using_threads): Always set to 1.
15673 (handle_extended_wait): New.
15674 (add_process): Do not set TID.
15675 (linux_create_inferior): Set must_set_ptrace_flags.
15676 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15677 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15678 (linux_thread_alive): Rename TID argument to LWPID.
15679 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15680 (linux_wait_for_event): Do not use TID or check using_threads. Update
15681 call to dead_thread_notify. Call handle_extended_wait.
15682 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15683 (send_sigstop): Delete sigstop_sent.
15684 (wait_for_sigstop): Avoid TID.
15685 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15686 (linux_test_for_tracefork): New.
15687 (linux_lookup_signals): Use thread_db_active and
15688 linux_supports_tracefork_flag.
15689 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15690 * linux-low.h (get_process_thread): Avoid TID.
15691 (struct process_ifo): Move thread_known and tid to the end. Remove
15692 sigstop_sent.
15693 (linux_attach_lwp, thread_db_init): Update prototypes.
15694 * server.h (change_inferior_id): Delete prototype.
15695 (add_pid_to_list, pull_pid_from_list): New prototypes.
15696 * thread-db.c (thread_db_use_events): New.
15697 (find_first_thread): Rename to...
15698 (find_one_thread): ...this. Update callers and messages. Do not
15699 call fatal. Check thread_db_use_events. Do not call
15700 change_inferior_id or new_thread_notify.
15701 (maybe_attach_thread): Update. Do not call new_thread_notify.
15702 (thread_db_init): Set thread_db_use_events. Check use_events.
15703 * utils.c (fatal, warning): Correct message prefix.
15704
30ed0a8f
DJ
157052007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15706
15707 * Makefile.in (clean): Remove new files.
15708 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15709 (powerpc-64.o, powerpc-64.c): New rules.
15710 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15711 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15712 with SPE.
15713 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15714 SPE targets.
15715 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15716 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15717 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15718 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15719 (target_regsets): Add AltiVec and SPE register sets.
15720 * configure.ac: Check for AltiVec and SPE.
15721 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15722 (ppc_fill_vrregset, ppc_store_vrregset): New.
15723 (target_regsets): Add AltiVec register set.
15724 * configure: Regenerated.
15725
fd462a61
DJ
157262007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15727
15728 * linux-low.c (O_LARGEFILE): Define.
15729 (linux_read_memory): Use /proc/PID/mem.
15730 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15731 * configure, config.in: Regenerated.
15732
69f223ed
DJ
157332007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15734
15735 * linux-low.c (linux_wait_for_event): Do not pass signals while
15736 single-stepping.
15737
aec18585
PA
157382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15739
15740 * win32-low.c (create_process): New.
15741 (win32_create_inferior): Use create_process instead of
15742 CreateProcess. If create_process failed retry appending an ".exe"
15743 suffix. Store the GetLastError result immediatelly after
15744 create_process calls and use it on the call to error.
15745
34d86ddd
PA
157462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15747
15748 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15749
5a0e3bd0
JB
157502007-08-23 Joel Brobecker <brobecker@adacore.com>
15751
15752 * configure.ac: Switch license to GPLv3.
15753
f88c79e6
MS
157542007-08-01 Michael Snyder <msnyder@access-company.com>
15755
15756 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15757
6b3d9b83
PA
157582007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15759
15760 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15761 typedef.
15762 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15763 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15764 CloseToolhelp32Snapshot.
15765 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15766 CloseToolhelp32Snapshot.
15767
c588c53c
MS
157682007-07-27 Michael Snyder <michael.snyder@access-company.com>
15769
15770 * server.c (main): Check for inferior exit before main loop.
15771
aa0403d9
PA
157722007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15773
15774 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15775 instead of on tmp_desc.
15776
255e7678
DJ
157772007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15778 Daniel Jacobowitz <dan@codesourcery.com>
15779
15780 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15781 (add_thread): Minor cleanups.
15782 (clear_inferiors): Move lower in the file. Clear the DLL
15783 list.
15784 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15785 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15786 (xml_escape_text): New.
15787 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15788 for qSupported.
15789 (handle_v_cont): Report errors.
15790 (gdbserver_version): Update.
15791 (main): Correct size of own_buf. Do not report initial DLL events.
15792 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15793 (unloaded_dll, xml_escape_text): New.
15794 * win32-low.c (enum target_waitkind): Update comments.
15795 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15796 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15797 (win32_EnumProcessModules, win32_GetModuleInformation)
15798 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15799 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15800 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15801 (win32_Module32First, win32_Module32Next, load_toolhelp)
15802 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15803 (get_child_debug_event): Handle DLL events.
15804 (win32_wait): Likewise.
15805
0d37add9
DJ
158062007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15807
15808 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15809 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15810
45e2715e
PA
158112007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15812
15813 * win32-low.c (handle_output_debug_string): Ignore event if not
15814 waiting.
15815
c5674cf1
PA
158162007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15817
15818 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15819
2bbe3cc1
DJ
158202007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15821
15822 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15823
ae13219e
DJ
158242007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15825
15826 * inferiors.c (change_inferior_id): Add comment.
15827 * linux-low.c (check_removed_breakpoint): Add an early
15828 prototype. Improve debug output.
15829 (linux_attach): Doc update.
15830 (linux_detach_one_process, linux_detach): Clean up before releasing
15831 each process.
15832 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15833 * linux-low.h (struct process_info): Doc improvement.
15834 * mem-break.c (delete_all_breakpoints): New.
15835 * mem-break.h (delete_all_breakpoints): New prototype.
15836 * thread-db.c (find_first_thread): New.
15837 (thread_db_create_event): Call it instead of
15838 thread_db_find_new_threads. Clean up unused variables.
15839 (maybe_attach_thread): Remove first thread handling.
15840 (thread_db_find_new_threads): Use find_first_thread.
15841 (thread_db_get_tls_address): Likewise.
15842
4105de34
DJ
158432007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15844
15845 * thread-db.c (thread_db_find_new_threads): Add prototype.
15846 (thread_db_create_event): Check for the main thread before adding
15847 a new thread.
15848 (maybe_attach_thread): Only enable event reporting if TID == 0.
15849 (thread_db_get_tls_address): Check for new threads.
15850
2b876972
DJ
158512007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15852
15853 * linux-low.c (linux_create_inferior): Try execv before execvp.
15854 * spu-low.c (spu_create_inferior): Likewise.
15855
7a245884
DJ
158562007-06-13 Mike Frysinger <vapier@gentoo.org>
15857
15858 * linux-low.c (linux_create_inferior): Change execv to execvp.
15859 * spu-low.c (spu_create_inferior): Likewies.
15860
117ce543
DJ
158612007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15862
15863 * Makefile.in (clean): Clean new files instead of deleted ones.
15864 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15865 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15866 rules.
15867 * configure.srv: Specify XML files and new regformats for MIPS and
15868 MIPS64 GNU/Linux.
15869 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15870 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15871 an entry for the restart register.
15872 (mips_cannot_fetch_register, mips_cannot_store_register)
15873 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15874 register names to match the XML descriptions.
15875 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15876 restart register instead of $0.
15877
0e7f50da
UW
158782007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15879 Markus Deuling <deuling@de.ibm.com>
15880
15881 * remote-utils.c (decode_xfer_write): New function.
15882 * server.h (decode_xfer_write): Add prototype.
15883 * server.c (handle_query): Add PACKET_LEN argument. Support
15884 qXfer:spu:read and qXfer:spu:write packets.
15885 (main): Pass packet_len to handle_query.
15886 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15887 * target.h (target_ops): Add qxfer_spu.
15888
374c1d38
UW
158892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15890
15891 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15892 accessing non-seekable spufs files.
15893
bb63802a
UW
158942007-05-16 Markus Deuling <deuling@de.ibm.com>
15895
889bf7c5 15896 * server.c (handle_query): Add reply for qC packet.
bb63802a 15897
7390519e
PA
158982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15899 Leo Zayas <lerele@champenstudios@com>
15900
15901 * server.h (check_remote_input_interrupt_request): New function.
15902 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15903 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15904 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15905 (check_remote_input_interrupt_request): New function.
15906 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15907 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15908 winapi_GenerateConsoleCtrlEvent): New typedefs.
15909 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15910 to 250 ms.
15911 (win32_wait): Check for remote interrupt request
15912 with check_remote_input_interrupt_request.
15913 (win32_request_interrupt): New function.
15914 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15915
34b34921
PA
159162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15917
15918 * win32-low.c (debug_registers_changed,
15919 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15920 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15921 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15922 (thread_rec): Get context using the low target.
15923 (child_add_thread): Call thread_added on the low target,
15924 which does the same thing.
15925 (regptr): Delete.
15926 (do_initial_child_stuff): Remove debug registers references.
15927 Set context using the low target. Resume threads after
15928 setting the contexts.
15929 (child_continue): Remove dead variable. Remove debug
15930 registers references.
15931 (child_fetch_inferior_registers): Go through the low target.
15932 (do_child_store_inferior_registers): Remove.
15933 (child_store_inferior_registers): Go through the low target.
15934 (win32_resume): Remove debug registers references.
15935 Set context using the low target.
15936 (handle_exception): Change return type to void. Don't record
15937 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15938 first chance exception.
889bf7c5 15939 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15940 goto loop. Always return after waiting for debug event.
15941 (win32_wait): Convert to switch statement. Handle spurious
15942 events.
15943
15944 * win32-i386-low.c (debug_registers_changed,
15945 debug_registers_used): New.
15946 (initial_stuff): Rename to ...
15947 (i386_initial_stuff): ... this. Clear debug registers
15948 state variables.
15949 (store_debug_registers): Delete.
15950 (i386_get_thread_context): New.
15951 (load_debug_registers): Delete.
15952 (i386_set_thread_context): New.
15953 (i386_thread_added): New.
15954 (single_step): Rename to ...
15955 (i386_single_step): ... this.
15956 (do_fetch_inferior_registers): Rename to ...
15957 (i386_fetch_inferior_register): ... this.
15958 (i386_store_inferior_register): New.
15959 (the_low_target): Adapt to new interface.
15960
15961 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15962 (arm_get_thread_context): New.
15963 (arm_set_thread_context): New.
15964 (regptr): New.
15965 (do_fetch_inferior_registers): Rename to ...
15966 (arm_fetch_inferior_register): ... this.
15967 (arm_store_inferior_register): New.
15968 (arm_wince_breakpoint): Reimplement as unsigned long.
15969 (arm_wince_breakpoint_len): Define.
15970 (the_low_target): Adapt to new interface.
15971
15972 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15973 load_debug_registers. Add get_thread_context, set_thread_context,
15974 thread_added and store_inferior_register. Rename
15975 fetch_inferior_registers to fetch_inferior_register.
15976 (regptr): Remove declaration.
15977
dd6953e1
PA
159782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15979
15980 * linux-low.c (linux_detach): Change return type to int. Return 0.
15981 * spu-low.c (spu_detach): Likewise.
15982
444d6139
PA
159832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15984
15985 * target.h (target_ops): Change return type of detach to int.
15986 Add join.
15987 (join_inferior): New.
15988 * server.c (main): Don't skip detach support on mingw32.
15989 If the inferior doesn't support detaching return error.
15990 Call join_inferior instead of using waitpid.
15991 * linux-low.c (linux_join): New.
15992 (linux_target_op): Add linux_join.
15993 * spu-low.c (spu_join): New.
15994 (spu_target_ops): Add spu_join.
15995 * win32-low.c (win32_detach): Adapt to new interface.
15996 Reopen current_process_handle before detaching. Issue a child
15997 resume before detaching.
15998 (win32_join): New.
15999 (win32_target_op): Add win32_join.
16000
1d5315fe
PA
160012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16002
16003 * win32-low.c (win32-attach): Fix return value.
16004 * target.h (target_ops): Describe ATTACH return values.
16005
bf914831
PA
160062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16007
16008 * win32-low.c (GETPROCADDRESS): Define.
16009 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16010 (winapi_DebugSetProcessKillOnExit): Likewise.
16011 (win32_create_inferior): Force usage of ansi CreateProcessA.
16012 (win32_attach): Use GETPROCADDRESS.
16013 (win32_detach): Likewise.
16014
f72f3e60
PA
160152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16016
16017 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16018
ed50f18f
PA
160192007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16020
16021 * win32-low.c: Commit leftover changes from 2007-03-29.
16022
0c2ead7e
DJ
160232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16024
16025 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16026 fields short instead of int. Add explicit padding.
16027 (i387_cache_to_fsave): Remove unnecessary casts.
16028 (i387_fsave_to_cache): Doc fix.
16029 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16030
73725ff3
DJ
160312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16032
16033 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16034 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16035
d99f33d8
PA
160362007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16037
16038 * configure.srv (arm*-*-mingw32ce*): Move near the other
16039 arm targets.
16040
68070c10
PA
160412007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16042
2482afc6 16043 * configure.ac: Add errno checking.
68070c10
PA
16044 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16045 sys/file.h and malloc.h.
16046 (AC_CHECK_DECLS): Add perror.
16047 (srv_mingwce): Handle.
2482afc6 16048 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16049 win32-i386-low.o to srv_tgtobj.
16050 (i[34567]86-*-mingw*): Likewise.
16051 (arm*-*-mingw32ce*): Add case.
16052 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16053 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16054 [__MINGW32CE__] (strerror): New function.
16055 [__MINGW32CE__] (errno): Define to GetLastError.
16056 [__MINGW32CE__] (COUNTOF): New macro.
16057 (remote_open): Remove extra close call.
16058 * mem-break.c (delete_breakpoint_at): New function.
16059 * mem-break.h (delete_breakpoint_at): Declare.
16060 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16061 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16062 [USE_WIN32API] (read, write): Add char* casts.
16063 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16064 * server.h: Include wincecompat.h on Windows CE.
16065 [HAVE_ERRNO_H]: Check.
16066 (perror): Declare if not declared.
16067 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16068 (perror_with_name): Remove errno declaration.
16069 * wincecompat.h: New.
16070 * wincecompat.c: New.
16071 * win32-low.h: New.
16072 * win32-arm-low.c: New.
16073 * win32-i386-low.c: New.
16074 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16075 (OUTMSG2): Make it safe.
16076 (_T): New macro.
16077 (COUNTOF): New macro.
16078 (NUM_REGS): Get it from the low target.
16079 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16080 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16081 (thread_rec): Let low target handle debug registers.
16082 (child_add_thread): Likewise.
16083 (child_init_thread_list): Likewise.
16084 (continue_one_thread): Likewise.
16085 (regptr): New.
16086 (do_child_fetch_inferior_registers): Move to ...
16087 * win32-i386-low.c: ... here, and rename to ...
16088 (do_fetch_inferior_registers): ... this.
889bf7c5 16089 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16090 Go through the low target.
16091 (do_child_store_inferior_registers): Use regptr.
16092 (strwinerror): New function.
16093 (win32_create_inferior): Handle Windows CE.
16094 Use strwinerror instead of strerror on Windows error
16095 codes. Add program to the error output.
16096 Don't close the main thread handle on Windows CE.
16097 (win32_attach): Use coredll.dll on Windows CE.
16098 (win32_kill): Close current process and current
16099 thread handles.
16100 (win32_detach): Use coredll.dll on Windows CE.
16101 (win32_resume): Let low target handle debug registers, and
16102 step request.
16103 (handle_exception): Add/Remove initial breakpoint. Avoid
16104 non-existant WSTOPSIG on Windows CE.
16105 (win32_read_inferior_memory): Cast to remove warning.
16106 (win32_arch_string): Go through the low target.
16107 (initialize_low): Call set_breakpoint_data with the low
16108 target's breakpoint.
16109 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16110 FOP_REGNUM, mappings): Move to ...
16111 * win32-i386-low.c: ... here.
16112 * win32-low.c (win32_thread_info): Move to ...
16113 * win32-low.h: ... here.
16114 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16115 win32-arm-low.c and wincecompat.c.
16116 (all:): Add $EXEEXT.
16117 (install-only:): Likewise.
16118 (gdbserver:): Likewise.
16119 (gdbreplay:): Likewise.
16120 * config.in: Regenerate.
16121 * configure: Regenerate.
16122
41093d81
PA
161232007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16124
16125 * win32-low.c: Rename typedef thread_info to
16126 win32_thread_info throughout.
16127
544afa54
PA
161282007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16129
16130 * win32-i386-low.c: Rename to ...
16131 * win32-low.c: ... this.
16132 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16133 * Makefile.in: Likewise.
16134
bce7165d
PA
161352007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16136
16137 * remote-utils.c (monitor_output): Constify msg parameter.
16138 * server.h (monitor_output): Likewise.
16139 * win32-i386-low.c (handle_output_debug_string): New.
16140 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16141 handle_output_debug_string.
16142 (get_child_debug_event): Likewise.
16143
506c7aa0
DJ
161442007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16145
16146 * server.c (main): Correct strtoul check.
16147
42c81e2a
DJ
161482007-03-27 Jon Ringle <jon@ringle.org>
16149
16150 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16151
9453113a
DJ
161522007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16153
16154 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16155
64a69107
DJ
161562007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16157
16158 * terminal.h: Check HAVE_SGTTY_H.
16159
161602007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16161
16162 * remote-utils.c (remote_open): Print out the assigned port number.
16163
c74d0ad8
DJ
161642007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16165
16166 * remote-utils.c (monitor_output): New function.
16167 * server.c (debug_threads): Define here.
16168 (monitor_show_help): New function.
16169 (handle_query): Handle qRcmd.
16170 (main): Do not handle 'd' packet.
16171 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16172 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16173 of debug_threads.
16174
de7c3b4a
PA
161752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16176
16177 * Makefile.in (EXEEXT): New.
16178 (clean): Use $(EXEEXT).
16179
ef57601b
PA
161802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16181
16182 * target.h (target_ops): Rename send_signal to request_interrupt,
16183 and remove enum target_signal parameter.
16184 * linux-low.c (linux_request_interrupt): Rename from
16185 linux_send_signal, and always send SIGINT.
16186 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16187 and always send SIGINT.
16188 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16189 of send_signal.
16190 (input_interrupt): Likewise.
16191
820f2bda
PA
161922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16193
16194 * server.c (get_features_xml): Check if target implemented
16195 arch_string.
16196 * win32-i386-low.c (win32_arch_string): New.
16197 (win32_target_ops): Add win32_arch_string as arch_string member.
16198
ab39bf24
UW
161992007-02-22 Markus Deuling <deuling@de.ibm.com>
16200
16201 * spu-low.c (spu_arch_string): New.
16202 (spu_target_ops): Add spu_arch_string.
16203
61ff6e04
DJ
162042007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16205
16206 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16207 * configure.ac: Do not check for terminal.h.
16208 * configure, config.in: Regenerated.
16209
fb1e4ffc
DJ
162102007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16211
16212 * Makefile.in (OBS): Add $(XML_BUILTIN).
16213 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16214 (clean): Update.
16215 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16216 (arm-with-iwmmxt.c): New.
16217 * config.in, configure: Regenerate.
16218 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16219 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16220 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16221 (arm*-*-linux*): Add iWMMXt and regset support.
16222 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16223 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16224 (arm_store_wmmxregset, target_regsets): New.
16225 * server.c (get_features_xml): Take annex argument. Check builtin
16226 XML documents.
16227 (handle_query): Handle multiple annexes.
16228
0f48aa01
DJ
162292007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16230
16231 * remote-utils.c [USE_WIN32API] (read, write): Define.
16232 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16233 write.
16234
23181151
DJ
162352007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16236
16237 * linux-i386-low.c (the_low_target): Set arch_string.
16238 * linux-x86-64-low.c (the_low_target): Likewise.
16239 * linux-low.c (linux_arch_string): New.
16240 (linux_target_ops): Add it.
16241 * linux-low.h (struct linux_target_ops): Add arch_string.
16242 * server.c (write_qxfer_response): Use const void * for DATA.
16243 (get_features_xml): New.
16244 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16245 * target.h (struct target_ops): Add arch_string method.
16246
9d606399
DJ
162472007-01-03 Denis Pilat <denis.pilat@st.com>
16248 Daniel Jacobowitz <dan@codesourcery.com>
16249
16250 * linux-low.c (linux_kill): Handle being called with no threads.
16251 * win32-i386-low.c (win32_kill): Likewise.
16252 (get_child_debug_event): Clear current_process_handle.
16253
162542006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16255 Daniel Jacobowitz <dan@codesourcery.com>
16256
16257 * remote-utils.c (remote_open): Check the type of specified
16258 serial port devices before opening them.
16259 * server.c (main): Kill the inferior if an error occurs during
16260 the first remote_open.
16261
a5e13d24
DJ
162622006-12-05 Markus Deuling <deuling@de.ibm.com>
16263
16264 * README: Update supported targets.
16265
186947f7
DJ
162662006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16267
16268 * Makefile.in (clean): Remove reg-mips64.c.
16269 (reg-mips64.c, reg-mips64.o): New rules.
16270 * configure.srv: Handle mips64. Include regset support for mips.
16271 * linux-mips-low.c (union mips_register): New.
16272 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16273 (mips_breakpoint, mips_breakpoint_at): Use int.
16274 (mips_collect_register, mips_supply_register)
16275 (mips_collect_register_32bit, mips_supply_register_32bit)
16276 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16277 (mips_store_fpregset, target_regsets): New.
16278 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16279
a13e2c95
UW
162802006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16281
16282 * configure.srv: Add target "spu*-*-*".
16283 * Makefile.in (clean): Remove reg-spu.c.
16284 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16285 * spu-low.c: New file.
16286
cb7283db
DJ
162872006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16288
16289 * configure.ac: Correct td_thr_tls_get_addr test.
16290 * configure: Regenerated.
16291
89be2091
DJ
162922006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16293
16294 * linux-low.c (linux_wait_for_event): Reformat. Use the
16295 pass_signals array.
16296 * remote-utils.c (decode_address_to_semicolon): New.
16297 * server.c (pass_signals, handle_general_set): New.
16298 (handle_query): Mention QPassSignals for qSupported.
16299 (main): Call handle_general_set.
16300 * server.h (pass_signals, decode_address_to_semicolon): New.
16301
000ef4f0
DJ
163022006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16303
16304 * server.c (handle_query): Correct error handling for read_auxv.
16305
b7149293
UW
163062005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16307
16308 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16309 and srv_linux_thread_db to yes.
16310 * linux-s390-low.c (s390_fill_gregset): New function.
16311 (target_regsets): Define data structure.
16312
dae5f5cf
DJ
163132006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16314
16315 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16316 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16317 * config.in, configure: Regenerated.
16318 * inferiors.c (gdb_id_to_thread): New function.
16319 (gdb_id_to_thread_id): Use it.
16320 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16321 * linux-low.h (struct process_info): Add th member.
16322 (thread_db_get_tls_address): New prototype.
16323 * remote-utils.c (decode_address): Make non-static.
16324 * server.c (handle_query): Handle qGetTLSAddr.
16325 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16326 * target.h (struct target_ops): Add get_tls_address.
16327 * thread-db.c (maybe_attach_thread): Save the thread handle.
16328 (thread_db_get_tls_address): New.
16329
32ca6d61
DJ
163302006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16331
16332 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16333 (linux_resume_one_process): Take a siginfo_t *. Update all
16334 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16335 (struct pending_signals): Add a siginfo_t.
16336 (linux_wait_for_process): Always set last_status.
16337 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16338 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16339 * linux-low.h (struct process_info): Add last_status.
16340
5ffff7c1
DJ
163412006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16342
16343 * remote-utils.c (try_rle): New function.
16344 (putpkt_binary): Use it.
16345
8695c747
DJ
163462006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16347
16348 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16349 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16350 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16351 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16352 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16353 point registers.
16354
290fadea
RS
163552006-08-08 Richard Sandiford <richard@codesourcery.com>
16356
16357 * server.c (terminal_fd): New variable.
16358 (old_foreground_pgrp): Likewise.
16359 (restore_old_foreground_pgrp): New function.
16360 (start_inferior): Record the terminal file descriptor in terminal_fd
16361 and its original foreground group in old_foreground_pgrp. Register
16362 restore_old_foreground_pgrp with atexit().
16363
9f2e1e63
DJ
163642006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16365
16366 * server.c (handle_query): Correct qPart to qXfer.
16367
b80864fb
DJ
163682006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16369
16370 * configure.ac: Check for more headers which are missing on
16371 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16372 * configure.srv: Add Cygwin and mingw32.
16373 * remote-utils.c: Don't include headers unconditionally which
16374 are missing on mingw32. Include <winsock.h> for mingw32.
16375 (remote_open): Adjust for mingw32 support. Flush
16376 standard error after writing to it.
16377 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16378 (unblock_async_io, enable_async_io, disable_async_io)
16379 (readchar, getpkt): Update for Winsock support.
16380 (prepare_resume_reply): Expect a protocol signal number.
16381 * server.c: Disable <sys/wait.h> on mingw32.
16382 (start_inferior): Adjust for mingw32 support. Flush
16383 standard error after writing to it.
16384 (attach_inferior): Likewise. Use protocol signal
16385 numbers.
16386 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16387 and names.
16388 * win32-i386-low.c: New file.
16389 * Makefile.in (XM_CLIBS): Set.
16390 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16391 (win32-i386-low.o): New dependency rule.
16392 * linux-low.c (linux_wait): Use target signal numbers.
16393 * target.h (struct target_ops): Doc fix.
16394 * server.h (target_signal_to_name): New prototype.
16395 * gdbreplay.c: Don't include headers unconditionally which
16396 are missing on mingw32. Include <winsock.h> for mingw32.
16397 (remote_close, remote_open): Adjust for Winsock support.
16398 * configure, config.in: Regenerated.
16399
0876f84a
DJ
164002006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16401
16402 * server.c (decode_xfer_read, write_qxfer_response): New.
16403 (handle_query): Take a packet length argument. Handle
16404 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16405 the qSupported response.
16406 (main): Update call to handle_query.
16407
01f9e8fa
DJ
164082006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16409
16410 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16411 (putpkt_binary): Renamed from putpkt and adjusted for binary
16412 data.
16413 (putpkt): New wrapper for putpkt_binary.
16414 (readchar): Don't mask off the high bit.
16415 (decode_X_packet): New function.
16416 * server.c (main): Call putpkt_binary if a handler sets the packet
16417 length. Save the length of the incoming packet. Handle 'X'.
16418 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16419
be2a5f71
DJ
164202006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16421
16422 * server.c (handle_query): Handle qSupported.
16423
ea025f5f
DJ
164242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16425
16426 * remote-utils.c (all_symbols_looked_up): New variable.
16427 (look_up_one_symbol): Check it.
16428 * server.h (look_up_one_symbol): New declaration.
16429 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16430
9308fc88
DJ
164312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16432
16433 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16434 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16435 (PTRACE_GET_THREAD_AREA): Define.
16436 (ps_get_thread_area): New function.
16437
52fb6437
NS
164382006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16439
16440 * configure.srv (m68k*-*-uclinux*): New target.
16441 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16442 (linux_resume_one_process): Remove extraneous cast.
16443 (linux_read_offsets): New.
16444 (linux_target_op): Add linux_read_offsets on mmuless systems.
16445 * server.c (handle_query): Add qOffsets logic.
16446 * target.h (struct target_ops): Add read_offsets.
16447
21b0f40c
DJ
164482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16449
16450 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16451 (PTRACE_GET_THREAD_AREA): Define.
16452 (ps_get_thread_area): New function.
16453 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16454 (linux-x86-64-low.o): Update.
16455
0050a760
DJ
164562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16457
16458 * configure.ac: Remove checks for prfpregset_t.
16459 * gdb_proc_service.h: New file.
16460 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16461 new "gdb_proc_service.h".
16462 * proc-service.c: Likewise.
16463 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16464 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16465 * Makefile.in (gdb_proc_service_h): Updated.
16466 * configure, config.in: Regenerated.
16467
b92a518e
DJ
164682006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16469
16470 * remote-utils.c (prepare_resume_reply): Move declaration
16471 of gdb_id_from_wait to the top of the block.
16472
545587ee
DJ
164732006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16474
16475 * linux-low.c (regsets_store_inferior_registers): Read the regset
16476 from the target before filling it.
16477
9db87ebd
DJ
164782006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16479
16480 * server.c (attach_inferior): Return SIGTRAP for a successful
16481 attach.
16482
dd24457d
DJ
164832006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16484
16485 * Makefile.in (OBS): Add version.o.
16486 (STAGESTUFF): Delete.
16487 (version.o): Add dependencies.
16488 (version.c): Replace rule.
16489 (clean): Remove version.c.
16490 * server.c (gdbserver_version): New.
16491 (gdbserver_usage): Use printf.
16492 (main): Handle --version and --help.
16493 * server.h (version, host_name): Add declarations.
16494
6f0f660e
EZ
164952005-12-23 Eli Zaretskii <eliz@gnu.org>
16496
889bf7c5
PA
16497 * linux-arm-low.c:
16498 * linux-arm-low.c:
16499 * inferiors.c:
16500 * i387-fp.h:
16501 * i387-fp.c:
16502 * gdbreplay.c:
16503 * regcache.c:
16504 * proc-service.c:
16505 * mem-break.h:
16506 * mem-break.c:
16507 * linux-x86-64-low.c:
16508 * linux-sh-low.c:
16509 * linux-s390-low.c:
16510 * linux-ppc64-low.c:
16511 * linux-ppc-low.c:
16512 * linux-mips-low.c:
16513 * linux-m68k-low.c:
16514 * linux-m32r-low.c:
16515 * linux-low.h:
16516 * linux-low.c:
16517 * linux-ia64-low.c:
16518 * linux-i386-low.c:
16519 * linux-crisv32-low.c:
16520 * thread-db.c:
16521 * terminal.h:
16522 * target.h:
16523 * target.c:
16524 * server.h:
16525 * server.c:
16526 * remote-utils.c:
16527 * regcache.h:
16528 * utils.c:
16529 * Makefile.in:
16530 * configure.ac:
6f0f660e
EZ
16531 * gdbserver.1: Add (C) after Copyright. Update the FSF
16532 address.
16533
9d1fb177
DJ
165342005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16535
16536 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16537 (arm_breakpoint_at): Recognize both breakpoints.
16538 (the_low_target): Use the correct breakpoint instruction.
16539
011a70c2
DJ
165402005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16541
16542 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16543 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16544 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16545 (the_low_target): Update.
16546
7fb85e41
AS
165472005-10-25 Andreas Schwab <schwab@suse.de>
16548
16549 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16550
16551 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16552 (ia64_num_regs): Reduce to 462.
16553
3db0444b
DJ
165542005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16555
16556 * acinclude.m4: Correct quoting.
16557 * aclocal.m4: Regenerated.
16558
16559 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16560 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16561 (thread_db_init): Call thread_db_err_str.
16562 * configure.ac: Check for TD_VERSION.
16563 * config.in, configure: Regenerated.
16564
bee0189a
DJ
165652005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16566
16567 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16568
e9d25b98
DJ
165692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16570
16571 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16572 is not available. Define HAVE_PTRACE_GETREGS if it is.
16573 * config.in, configure: Regenerated.
16574 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16575 * linux-i386-low.c, linux-m68k-low.c: Update to use
16576 HAVE_PTRACE_GETREGS.
16577 * linux-low.c (regsets_fetch_inferior_registers)
16578 (regsets_store_inferior_registers): Only return 0 if we processed
16579 GENERAL_REGS.
16580 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16581 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16582
a06660f7
DJ
165832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16584
16585 * inferiors.c (struct thread_info): Add gdb_id.
16586 (add_thread): Add gdb_id argument.
16587 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16588 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16589 calls to add_thread.
16590 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16591 * server.c (handle_query): Use thread_to_gdb_id.
16592 (handle_v_cont, main): Use gdb_id_to_thread_id.
16593 * server.h (add_thread): Update prototype.
16594 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16595 prototypes.
16596
5a1f5858
DJ
165972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16598
16599 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16600 left-padded registers.
16601 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16602 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16603
e122f1f5
SE
166042005-07-01 Steve Ellcey <sje@cup.hp.com>
16605
16606 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16607 * configure: Regenerate.
16608 * config.in: Regenerate.
16609 * server.h (NEED_DECLARATION_STRERROR):
16610 Replace with !HAVE_DECL_STRERROR.
16611
d592fa2f
DJ
166122005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16613
16614 * linux-low.c (linux_wait, linux_send_signal): Don't test
16615 an unsigned long variable for > 0 if it could be MAX_ULONG.
16616 * server.c (myresume): Likewise.
16617 * target.c (set_desired_inferior): Likewise.
16618
ccbd4912
MK
166192005-06-13 Mark Kettenis <kettenis@gnu.org>
16620
16621 * configure.ac: Simplify and improve check for socklen_t.
16622 * configure, config.in: Regenerate.
16623
f450004a
DJ
166242005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16625
16626 * acconfig.h: Remove.
16627 * configure.ac: Add a test for socklen_t. Use three-argument
16628 AC_DEFINE throughout.
16629 * config.in: Regenerated using autoheader 2.59.
16630 * configure: Regenerated.
16631
16632 * gdbreplay.c (socklen_t): Provide a default.
16633 (remote_open): Use socklen_t.
16634 * remote-utils.c (socklen_t): Provide a default.
16635 (remote_open): Use socklen_t.
16636 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16637 unsigned char.
16638
16639 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16640 char for buffers.
16641 * linux-low.c (linux_read_memory, linux_write_memory)
16642 (linux_read_auxv): Likewise.
16643 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16644 (check_mem_write): Likewise.
16645 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16646 Likewise.
16647 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16648 (registers_from_string, register_data): Likewise.
16649 * server.c (handle_query, main): Likewise.
16650 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16651 (decode_M_packet): Likewise.
16652 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16653 * target.h (struct target_ops): Update read_memory, write_memory,
16654 and read_auxv.
16655 (read_inferior_memory, write_inferior_memory): Update.
16656 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16657 to unsigned char *.
16658 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16659 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16660 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16661 linux-s390-low.c, linux-sh-low.c: Update for changes in
16662 read_inferior_memory and the_low_target->breakpoint.
16663
eee84df1
DJ
166642005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16665
16666 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16667 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16668 * configure.srv: Add powerpc64-*-linux*.
16669 * linux-ppc64-low.c: New file.
16670
45b134e5
OF
166712005-05-23 Orjan Friberg <orjanf@axis.com>
16672
16673 * linux-cris-low.c: New file with support for CRIS.
16674 * linux-crisv32-low.c: Ditto for CRISv32.
16675 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16676 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16677 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16678 reg-crisv32.o, and reg-crisv32.c to make rules.
16679 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16680 recognized targets.
16681
48d93c75
UW
166822005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16683
16684 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16685 of sizeof (PTRACE_XFER_TYPE).
16686 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16687
e013ee27
OF
166882005-05-12 Orjan Friberg <orjanf@axis.com>
16689
889bf7c5 16690 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16691 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16692 pointers for hardware watchpoint support.
16693 * linux-low.h (struct linux_target_ops): Ditto.
16694 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16695 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16696 to linux_target_ops.
16697 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16698 reply packet.
16699 * server.c (main): Recognize 'Z' and 'z' packets.
16700
b0ded00b
UW
167012005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16702
16703 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16704 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16705 (the_low_target): Add new members.
16706
8643e2ad
DJ
167072005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16708
16709 * proc-service.c (ps_lgetregs): Search all_processes instead of
16710 all_threads.
16711
fc620387
DJ
167122005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16713
16714 * server.c (start_inferior): Change return type to int.
16715 (attach_inferior): Change sigptr to int *.
16716 (handle_v_cont, handle_v_requests): Change signal to int *.
16717 (main): Change signal to int.
16718
167192005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16720
16721 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16722 * configure.srv: Add m32r*-*-linux*.
16723 * linux-m32r-low.c: New file.
16724
e0e76420
DJ
167252005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16726
16727 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16728
a1928bad
DJ
167292005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16730
16731 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16732 Take unsigned long arguments for PIDs.
16733 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16734 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16735 (wait_for_sigstop, linux_resume_one_process)
16736 (regsets_fetch_inferior_registers, linux_send_signal)
16737 (linux_read_auxv): Likewise. Update the types of variables holding
16738 PIDs. Update format string specifiers.
16739 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16740 * remote-utils.c (prepare_resume_reply): Likewise.
16741 * server.c (cont_thread, general_thread, step_thread)
16742 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16743 unsigned long.
16744 (handle_query): Update format specifiers.
16745 (handle_v_cont, main): Use strtoul for thread IDs.
16746 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16747 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16748 (general_thread, step_thread, thread_from_wait)
16749 (old_thread_from_wait): Update.
16750 * target.h (struct thread_resume): Use unsigned long for THREAD.
16751 (struct target_ops): Use unsigned long for arguments to attach and
16752 thread_alive.
16753
dcdb98d2
DJ
167542005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16755
16756 * acinclude.m4: Include bfd/bfd.m4 directly.
16757 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16758 <agriffis@toolchain.org>.
16759 * aclocal.m4, configure: Regenerated.
16760
bec39cab
AC
167612005-01-07 Andrew Cagney <cagney@gnu.org>
16762
16763 * configure.ac: Rename configure.in, require autoconf 2.59.
16764 * configure: Re-generate.
16765
434c4c77
DJ
167662004-12-08 Daniel Jacobowitz <dan@debian.org>
16767
16768 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16769 LIBS when finished.
16770 * aclocal.m4: Regenerated.
16771 * configure: Regenerated.
16772
db1d3e1b
AS
167732004-11-21 Andreas Schwab <schwab@suse.de>
16774
16775 * linux-m68k-low.c (m68k_num_gregs): Define.
16776 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16777 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16778 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16779 (m68k_breakpoint_at): New. Add to the_low_target.
16780
16781 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16782 srv_linux_thread_db to yes.
16783
43360365
JB
167842004-10-20 Joel Brobecker <brobecker@gnat.com>
16785
16786 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16787 (ARCH_SET_FS): Likewise.
16788 (ARCH_GET_FS): Likewise.
16789 (ARCH_GET_GS): Likewise.
16790
fd500816
DJ
167912004-10-16 Daniel Jacobowitz <dan@debian.org>
16792
16793 * linux-i386-low.c (ps_get_thread_area): New.
16794 * linux-x86-64-low.c (ps_get_thread_area): New.
16795 * linux-low.c: Include <sys/syscall.h>.
16796 (linux_kill_one_process): Don't kill the first thread here.
16797 (linux_kill): Kill the first thread here.
16798 (kill_lwp): New function.
16799 (send_sigstop, linux_send_signal): Use it.
16800 * proc-service.c: Clean up #ifdefs.
16801 (fpregset_info): Delete.
16802 (ps_lgetregs): Update and enable implementation.
16803 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16804 implementations.
16805 * remote-utils.c (struct sym_cache, symbol_cache): New.
16806 (input_interrupt): Print a clearer message.
16807 (async_io_enabled): New variable.
16808 (enable_async_io, disable_async_io): Use it. Update comments.
16809 (look_up_one_symbol): Use the symbol cache.
16810 * thread-db.c (thread_db_look_up_symbols): New function.
16811 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16812
f6de3c42
DJ
168132004-10-16 Daniel Jacobowitz <dan@debian.org>
16814
16815 * configure.in: Test for -rdynamic.
16816 * configure: Regenerated.
16817 * Makefile (INTERNAL_LDFLAGS): New.
16818 (gdbserver, gdbreplay): Use it.
16819
2c0fc042
AC
168202004-09-02 Andrew Cagney <cagney@gnu.org>
16821
16822 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16823
075b3282
DJ
168242004-03-23 Daniel Jacobowitz <drow@mvista.com>
16825
16826 * linux-low.c (linux_wait): Clear all_processes list also.
16827
fa6a77dc
DJ
168282004-03-12 Daniel Jacobowitz <drow@mvista.com>
16829
16830 * linux-low.c: Include <errno.h>. Remove extern declaration of
16831 errno.
16832
6d782a97
DJ
168332004-03-12 Daniel Jacobowitz <drow@mvista.com>
16834
16835 * gdbreplay.c, server.h, utils.c: Update copyright years.
16836
3a7fb99b
DJ
168372004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16838
16839 * server.c (main): Print child status or termination signal from
16840 variable 'signal', not 'sig'.
16841
c3e735a6
DJ
168422004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16843
16844 * linux-low.c (linux_read_memory): Change return type to
16845 int. Check for and return error from ptrace().
16846 * target.c (read_inferior_memory): Change return type to int. Pass
16847 back return status from the_target->read_memory().
16848 * target.h (struct target_ops): Adapt *read_memory() prototype.
16849 Update comment.
16850 (read_inferior_memory): Adapt prototype.
16851 * server.c (main): Return an error packet if
16852 read_inferior_memory() returns an error.
16853
a59d1c82
DJ
168542004-03-04 Daniel Jacobowitz <drow@mvista.com>
16855
16856 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16857 Unify with other clean targets.
16858
dc3f8883
DJ
168592004-02-29 Daniel Jacobowitz <drow@mvista.com>
16860
16861 * server.c (handle_v_cont): Call set_desired_inferior.
16862
89a208da
DJ
168632004-02-29 Daniel Jacobowitz <drow@mvista.com>
16864
16865 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16866
62ea82f5
DJ
168672004-02-29 Daniel Jacobowitz <drow@mvista.com>
16868
16869 * linux-low.c (linux_wait): Unblock async I/O.
16870 (linux_resume): Block and enable async I/O.
16871 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16872 * server.h (block_async_io, unblock_async_io): Add prototypes.
16873
6910d122
DJ
168742004-02-29 Daniel Jacobowitz <drow@mvista.com>
16875
16876 * remote-utils.c (remote_open): Print a status notice after
16877 opening a TCP port.
16878 * server.c (attach_inferior): Print a status notice after
16879 attaching.
16880
168812004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16882
16883 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16884
c89dc5d4
DJ
168852004-02-26 Daniel Jacobowitz <drow@mvista.com>
16886
16887 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16888 error packet.
16889 * server.c, target.h: Update copyright years.
16890
4b8dad4a
RM
168912004-02-25 Roland McGrath <roland@redhat.com>
16892
16893 * target.h (struct target_ops): New member `read_auxv'.
16894 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16895 * linux-low.c (linux_read_auxv): New function.
16896 (linux_target_ops): Initialize `read_auxv' member to that.
16897
d7446758
JB
168982004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16899
16900 Committed by Jim Blandy <jimb@redhat.com>.
16901
16902 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16903 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16904 instead of GPR_SIZE to distiguish s390 and s390x targets.
16905
5544ad89
DJ
169062004-01-31 Daniel Jacobowitz <drow@mvista.com>
16907
16908 * linux-low.c: Update copyright year.
16909 (check_removed_breakpoint): Clear pending_is_breakpoint.
16910 (linux_set_resume_request, linux_queue_one_thread)
16911 (resume_status_pending_p): New functions.
16912 (linux_continue_one_thread): Use process->resume.
16913 (linux_resume): Only resume threads if there are no pending events.
16914 * linux-low.h (struct process_info): Add resume request
16915 pointer.
16916
2a68b70e
DJ
169172004-01-30 Daniel Jacobowitz <drow@mvista.com>
16918
16919 * regcache.c (new_register_cache): Clear the allocated register
16920 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16921
64386c31
DJ
169222003-10-13 Daniel Jacobowitz <drow@mvista.com>
16923
16924 * linux-low.c (linux_resume): Take a struct thread_resume *
16925 argument.
16926 (linux_wait): Update call.
16927 (resume_ptr): New static variable.
16928 (linux_continue_one_thread): Renamed from
16929 linux_continue_one_process. Use resume_ptr.
16930 (linux_resume): Use linux_continue_one_thread.
16931 * server.c (handle_v_cont, handle_v_requests): New functions.
16932 (myresume): New function.
16933 (main): Handle 'v' case.
16934 * target.h (struct thread_resume): New type.
16935 (struct target_ops): Change argument of "resume" to struct
16936 thread_resume *.
16937 (myresume): Delete macro.
16938
c938e9b0
L
169392003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16940
16941 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16942 (uninstall): Support DESTDIR.
16943
7f313d07
BC
16944Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16945
16946 * configure.srv: Add xscale*linux copy of arm*linux entry.
16947
3b2fc2ea
DJ
169482003-07-24 Daniel Jacobowitz <drow@mvista.com>
16949
16950 * linux-arm-low.c (arm_reinsert_addr): New function.
16951 (the_low_target): Add arm_reinsert_addr.
16952
1c0a559e
MK
169532003-07-08 Mark Kettenis <kettenis@gnu.org>
16954
16955 * mem-break.c: Remove whitespace at end of file.
16956
43d5792c
DJ
169572003-06-28 Daniel Jacobowitz <drow@mvista.com>
16958
16959 * configure.in: Check whether we need to prototype strerror.
16960 * server.h: Optionally prototype strerror.
16961 * gdbreplay.c (perror_with_name): Use strerror.
16962 * linux-low.c (linux_attach_lwp): Use strerror.
16963 * utils.c (perror_with_name): Use strerror.
16964 * config.in, configure: Regenerated.
16965
c8a86edf
DJ
169662003-06-28 Daniel Jacobowitz <drow@mvista.com>
16967
16968 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16969 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16970
73d37363
DJ
169712003-06-20 Daniel Jacobowitz <drow@mvista.com>
16972
16973 * Makefile.in (SFILES): Update.
16974 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16975 low-sun3.c: Remove files.
16976
6ad8ae5c
DJ
169772003-06-17 Daniel Jacobowitz <drow@mvista.com>
16978
16979 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16980 (linux_detach_one_process, linux_detach): New functions.
16981 (linux_target_ops): Add linux_detach.
16982 * server.c (main): Handle 'D' packet.
16983 * target.h (struct target_ops): Add "detach" member.
16984 (detach_inferior): Define.
16985
1581182a
MK
169862003-06-13 Mark Kettenis <kettenis@gnu.org>
16987
16988 From Kelley Cook <kelleycook@wideopenwest.com>:
16989 * configure.srv: Accept i[34567]86 variants.
16990
e5379b03
DJ
169912003-06-05 Daniel Jacobowitz <drow@mvista.com>
16992
16993 * linux-low.c (linux_wait_for_event): Correct comment typos.
16994 (linux_resume_one_process): Call check_removed_breakpoint.
16995 (linux_send_signal): New function.
16996 (linux_target_ops): Add linux_send_signal.
16997 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16998 of kill.
16999 * target.h (struct target_ops): Add send_signal.
17000
2ff29de4
JB
170012003-05-29 Jim Blandy <jimb@redhat.com>
17002
17003 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17004 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17005 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17006 away part of the register's value.
17007
254787d4
DJ
170082003-03-26 Daniel Jacobowitz <drow@mvista.com>
17009
17010 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17011 (linux_wait_for_event, linux_init_signals): Likewise.
17012
94e10508
DJ
170132003-03-17 Daniel Jacobowitz <drow@mvista.com>
17014
17015 * configure.in: Check for stdlib.h.
17016 * configure: Regenerated.
17017 * config.in: Regenerated.
17018
4c0711e0
DJ
170192003-01-04 Andreas Schwab <schwab@suse.de>
17020
17021 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17022
ef66e766
AC
170232003-01-02 Andrew Cagney <ac131313@redhat.com>
17024
17025 * Makefile.in: Remove obsolete code.
17026
a1358604
DJ
170272002-11-20 Daniel Jacobowitz <drow@mvista.com>
17028
17029 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17030 defined(PT_FPR0_HI).
17031
23ce3b1c
DJ
170322002-11-17 Stuart Hughes <seh@zee2.com>
17033
17034 * linux-arm-low.c (arm_num_regs): Increase.
17035 (arm_regmap): Include status register.
17036
170372002-11-17 Daniel Jacobowitz <drow@mvista.com>
17038
17039 * linux-low.c (register_addr): Remove incorrect -1 check.
17040
a9fa9f7d
DJ
170412002-08-29 Daniel Jacobowitz <drow@mvista.com>
17042
17043 * linux-low.c (linux_create_inferior): Call setpgid. Return
17044 the new PID.
17045 (unstopped_p, linux_signal_pid): Remove.
17046 (linux_target_ops): Remove linux_signal_pid.
17047 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17048 global instead of target method.
17049 * target.h (struct target_ops): Remove signal_pid. Update comment
17050 for create_inferior.
17051 * server.c (signal_pid): New variable.
17052 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17053 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17054 (attach_inferior): Set signal_pid.
17055
17574093
DJ
170562002-08-23 Daniel Jacobowitz <drow@mvista.com>
17057
17058 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17059
170602002-08-20 Jim Blandy <jimb@redhat.com>
17061
17062 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17063 default for this.
17064
170652002-08-01 Andrew Cagney <cagney@redhat.com>
17066
17067 * Makefile.in: Make chill references obsolete.
17068
170692002-07-24 Kevin Buettner <kevinb@redhat.com>
17070
17071 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17072 * configure: Regenerate.
17073 * config.in: Regenerate.
17074
170752002-07-09 David O'Brien <obrien@FreeBSD.org>
17076
17077 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17078 (perror_with_name, remote_close, remote_open, expect, play): Static.
17079
170802002-07-04 Michal Ludvig <mludvig@suse.cz>
17081
4b8dad4a 17082 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17083 byte offsets instead of an array of indexes.
17084 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17085
170862002-06-13 Daniel Jacobowitz <drow@mvista.com>
17087
17088 * regcache.c: Add comment.
17089
170902002-06-11 Daniel Jacobowitz <drow@mvista.com>
17091
17092 * thread-db.c: New file.
17093 * proc-service.c: New file.
17094 * acinclude.m4: New file.
17095 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17096 proc-service.o, and thread-db.o.
17097 (linux-low.o): Add USE_THREAD_DB.
17098 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17099 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17100 * aclocal.m4: Regenerated.
17101 * config.in: Regenerated.
17102 * configure: Regenerated.
17103 * configure.in: Check for proc_service.h, sys/procfs.h,
17104 thread_db.h, and linux/elf.h headrs.
17105 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17106 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17107 Check for -lthread_db and thread support.
17108 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17109 PowerPC, and SuperH.
17110 * i387-fp.c: Constify arguments.
17111 * i387-fp.h: Likewise.
17112 * inferiors.c: (struct thread_info): Renamed from
17113 `struct inferior_info'. Remove PID member. Use generic inferior
17114 list header. All uses updated.
17115 (inferiors, signal_pid): Removed.
17116 (all_threads): New variable.
17117 (get_thread): Define.
17118 (add_inferior_to_list): New function.
17119 (for_each_inferior): New function.
17120 (change_inferior_id): New function.
17121 (add_inferior): Removed.
17122 (remove_inferior): New function.
17123 (add_thread): New function.
17124 (free_one_thread): New function.
17125 (remove_thread): New function.
17126 (clear_inferiors): Use for_each_inferior and free_one_thread.
17127 (find_inferior): New function.
17128 (find_inferior_id): New function.
17129 (inferior_target_data): Update argument type.
17130 (set_inferior_target_data): Likewise.
17131 (inferior_regcache_data): Likewise.
17132 (set_inferior_regcache_data): Likewise.
17133 * linux-low.c (linux_bp_reinsert): Remove.
17134 (all_processes, stopping_threads, using_thrads)
17135 (struct pending_signals, debug_threads, pid_of): New.
17136 (inferior_pid): Replace with macro.
17137 (struct inferior_linux_data): Remove.
17138 (get_stop_pc, add_process): New functions.
17139 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17140 Use add_process and add_thread.
17141 (linux_attach_lwp): New function, based on old linux_attach. Use
17142 add_process and add_thread. Set stop_expected for new threads.
17143 (linux_attach): New function.
17144 (linux_kill_one_process): New function.
17145 (linux_kill): Kill all LWPs.
17146 (linux_thread_alive): Use find_inferior_id.
17147 (check_removed_breakpoints, status_pending_p): New functions.
17148 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17149 Update. Use WNOHANG. Wait for cloned processes also. Update process
17150 struct for the found process.
17151 (linux_wait_for_event): New function.
17152 (linux_wait): Use it. Support LWPs.
17153 (send_sigstop, wait_for_sigstop, stop_all_processes)
17154 (linux_resume_one_process, linux_continue_one_process): New functions.
17155 (linux_resume): Support LWPs.
17156 (REGISTER_RAW_SIZE): Remove.
17157 (fetch_register): Use register_size instead. Call supply_register.
17158 (usr_store_inferior_registers): Likewise. Call collect_register.
17159 Fix recursive case.
17160 (regsets_fetch_inferior_registers): Improve error message.
17161 (regsets_store_inferior_registers): Add debugging.
17162 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17163 (unstopped_p, linux_signal_pid): New functions.
17164 (linux_target_ops): Add linux_signal_pid.
17165 (linux_init_signals): New function.
17166 (initialize_low): Call it. Initialize using_threads.
17167 * regcache.c (inferior_regcache_data): Add valid
17168 flag.
17169 (get_regcache): Fetch registers lazily. Add fetch argument
17170 and update all callers.
17171 (regcache_invalidate_one, regcache_invalidate): New
17172 functions.
17173 (new_register_cache): Renamed from create_register_cache.
17174 Return the new regcache.
17175 (free_register_cache): Change argument to a void *.
17176 (registers_to_string, registers_from_string): Call get_regcache
17177 with fetch flag set.
17178 (register_data): Make static. Pass fetch flag to get_regcache.
17179 (supply_register): Call get_regcache with fetch flag clear.
17180 (collect_register): Call get_regcache with fetch flag set.
17181 (collect_register_as_string): New function.
17182 * regcache.h: Update.
17183 * remote-utils.c (putpkt): Flush after debug output and use
17184 stderr.
17185 Handle input interrupts while waiting for an ACK.
17186 (input_interrupt): Use signal_pid method.
17187 (getpkt): Flush after debug output and use stderr.
17188 (outreg): Use collect_register_as_string.
17189 (new_thread_notify, dead_thread_notify): New functions.
17190 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17191 and general_thread.
17192 (look_up_one_symbol): Flush after debug output.
17193 * server.c (step_thread, server_waiting): New variables.
17194 (start_inferior): Don't use signal_pid. Update call to mywait.
17195 (attach_inferior): Update call to mywait.
17196 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17197 (main): Don't fetch/store registers explicitly. Use
17198 set_desired_inferior. Support proposed ``Hs'' packet. Update
17199 calls to mywait.
17200 * server.h: Update.
17201 (struct inferior_list, struct_inferior_list_entry): New.
17202 * target.c (set_desired_inferior): New.
17203 (write_inferior_memory): Constify.
17204 (mywait): New function.
17205 * target.h: Update.
17206 (struct target_ops): New signal_pid method.
17207 (mywait): Removed macro, added prototype.
17208
17209 * linux-low.h (regset_func): Removed.
17210 (regset_fill_func, regset_store_func): New.
17211 (enum regset_type): New.
17212 (struct regset_info): Add type field. Use new operation types.
17213 (struct linux_target_ops): stop_pc renamed to get_pc.
17214 Add decr_pc_after_break and breakpoint_at.
17215 (get_process, get_thread_proess, get_process_thread)
17216 (strut process_info, all_processes, linux_attach_lwp)
17217 (thread_db_init): New.
17218
17219 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17220 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17221 (the_low_target): Add new members.
17222 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17223 (i386_store_fpxregset): Constify.
17224 (target_regsets): Add new kind identifier.
17225 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17226 (i386_set_pc): Add debugging.
17227 (i386_breakpoint_at): New function.
17228 (the_low_target): Add new members.
17229 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17230 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17231 (mips_breakpoint_at): New.
17232 (the_low_target): Add new members.
17233 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17234 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17235 (the_low_target): Add new members.
17236 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17237 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17238 (the_low_target): Add new members.
17239 * linux-x86-64-low.c (target_regsets): Add new kind
17240 identifier.
17241
172422002-05-15 Daniel Jacobowitz <drow@mvista.com>
17243
17244 From Martin Pool <mbp@samba.org>:
17245 * server.c (gdbserver_usage): New function.
17246 (main): Call it.
17247
172482002-05-14 Daniel Jacobowitz <drow@mvista.com>
17249
17250 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17251 stop_at -> stop_pc.
17252
172532002-05-04 Andrew Cagney <ac131313@redhat.com>
17254
17255 * Makefile.in: Remove obsolete code.
17256
172572002-04-24 Michal Ludvig <mludvig@suse.cz>
17258
17259 * linux-low.c (regsets_fetch_inferior_registers),
17260 (regsets_store_inferior_registers): Removed cast to int from
17261 ptrace() calls.
17262 * regcache.h: Added declaration of struct inferior_info.
17263
172642002-04-20 Daniel Jacobowitz <drow@mvista.com>
17265
17266 * inferiors.c (struct inferior_info): Add regcache_data.
17267 (add_inferior): Call create_register_cache.
17268 (clear_inferiors): Call free_register_cache.
17269 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17270 * regcache.c (struct inferior_regcache_data): New.
17271 (registers): Remove.
17272 (get_regcache): New function.
17273 (create_register_cache, free_register_cache): New functions.
17274 (set_register_cache): Don't initialize the register cache here.
17275 (registers_to_string, registers_from_string, register_data): Call
17276 get_regcache.
17277 * regcache.h: Add prototypes.
17278 * server.h: Likewise.
17279
172802002-04-20 Daniel Jacobowitz <drow@mvista.com>
17281
17282 * mem-break.c: New file.
17283 * mem-break.h: New file.
17284 * Makefile.in: Add mem-break.o rule; update server.h
17285 dependencies.
17286 * inferiors.c (struct inferior_info): Add target_data
17287 member.
17288 (clear_inferiors): Free target_data member if set.
17289 (inferior_target_data, set_inferior_target_data): New functions.
17290 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17291 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17292 * linux-low.c (linux_bp_reinsert): New variable.
17293 (struct inferior_linux_data): New.
17294 (linux_create_inferior): Use set_inferior_target_data.
17295 (linux_attach): Likewise. Call add_inferior.
17296 (linux_wait_for_one_inferior): New function.
17297 (linux_wait): Call it.
17298 (linux_write_memory): Add const.
17299 (initialize_low): Call set_breakpoint_data.
17300 * linux-low.h (struct linux_target_ops): Add breakpoint
17301 handling members.
17302 * server.c (attach_inferior): Remove extra add_inferior
17303 call.
17304 * server.h: Include mem-break.h. Update inferior.c
17305 prototypes.
17306 * target.c (read_inferior_memory)
17307 (write_inferior_memory): New functions.
17308 * target.h (read_inferior_memory)
17309 (write_inferior_memory): Change macros to prototypes.
17310 (struct target_ops): Update comments. Add const to write_memory
17311 definition.
17312
173132002-04-11 Daniel Jacobowitz <drow@mvista.com>
17314
17315 * linux-low.c (usr_store_inferior_registers): Support
17316 registers which are allowed to fail to store.
17317 * linux-low.h (linux_target_ops): Likewise.
17318 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17319 (ppc_cannot_store_register): FPSCR may not be storable.
17320
173212002-04-09 Daniel Jacobowitz <drow@mvista.com>
17322
17323 * server.h: Include <string.h> if HAVE_STRING_H.
17324 * ChangeLog: Correct paths in last ChangeLog entry.
17325
173262002-04-09 Daniel Jacobowitz <drow@mvista.com>
17327
17328 * linux-low.h: Remove obsolete prototypes.
17329 (struct linux_target_ops): New.
17330 (extern the_low_target): New.
17331 * linux-low.c (num_regs, regmap): Remove declarations.
17332 (register_addr): Use the_low_target explicitly.
17333 (fetch_register): Likewise.
17334 (usr_fetch_inferior_registers): Likewise.
17335 (usr_store_inferior_registers): Likewise.
17336 * linux-arm-low.c (num_regs): Remove.
17337 (arm_num_regs): Define.
17338 (arm_regmap): Renamed from regmap, made static.
17339 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17340 made static.
17341 (arm_cannot_store_register): Renamed from cannot_store_register,
17342 made static.
17343 (the_low_target): New.
17344 * linux-i386-low.c (num_regs): Remove.
17345 (i386_num_regs): Define.
17346 (i386_regmap): Renamed from regmap, made static.
17347 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17348 made static.
17349 (i386_cannot_store_register): Renamed from cannot_store_register,
17350 made static.
17351 (the_low_target): New.
17352 * linux-ia64-low.c (num_regs): Remove.
17353 (ia64_num_regs): Define.
17354 (ia64_regmap): Renamed from regmap, made static.
17355 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17356 made static.
17357 (ia64_cannot_store_register): Renamed from cannot_store_register,
17358 made static.
17359 (the_low_target): New.
17360 * linux-m68k-low.c (num_regs): Remove.
17361 (m68k_num_regs): Define.
17362 (m68k_regmap): Renamed from regmap, made static.
17363 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17364 made static.
17365 (m68k_cannot_store_register): Renamed from cannot_store_register,
17366 made static.
17367 (the_low_target): New.
17368 * linux-mips-low.c (num_regs): Remove.
17369 (mips_num_regs): Define.
17370 (mips_regmap): Renamed from regmap, made static.
17371 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17372 made static.
17373 (mips_cannot_store_register): Renamed from cannot_store_register,
17374 made static.
17375 (the_low_target): New.
17376 * linux-ppc-low.c (num_regs): Remove.
17377 (ppc_num_regs): Define.
17378 (ppc_regmap): Renamed from regmap, made static.
17379 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17380 made static.
17381 (ppc_cannot_store_register): Renamed from cannot_store_register,
17382 made static.
17383 (the_low_target): New.
17384 * linux-s390-low.c (num_regs): Remove.
17385 (s390_num_regs): Define.
17386 (s390_regmap): Renamed from regmap, made static.
17387 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17388 made static.
17389 (s390_cannot_store_register): Renamed from cannot_store_register,
17390 made static.
17391 (the_low_target): New.
17392 * linux-sh-low.c (num_regs): Remove.
17393 (sh_num_regs): Define.
17394 (sh_regmap): Renamed from regmap, made static.
17395 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17396 made static.
17397 (sh_cannot_store_register): Renamed from cannot_store_register,
17398 made static.
17399 (the_low_target): New.
17400 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17401 (the_low_target): New.
17402
174032002-04-09 Daniel Jacobowitz <drow@mvista.com>
17404
17405 * Makefile.in: Add stamp-h target.
17406 * configure.in: Create stamp-h.
17407 * configure: Regenerated.
17408
174092002-04-09 Daniel Jacobowitz <drow@mvista.com>
17410
17411 * inferiors.c: New file.
17412 * target.c: New file.
17413 * target.h: New file.
17414 * Makefile.in: Add target.o and inferiors.o. Update
17415 dependencies.
17416 * linux-low.c (inferior_pid): New static variable,
17417 moved from server.c.
17418 (linux_create_inferior): Renamed from create_inferior.
17419 Call add_inferior. Return 0 on success instead of a PID.
17420 (linux_attach): Renamed from myattach.
17421 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17422 (linux_thread_alive): Renamed from mythread_alive.
17423 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17424 child dies.
17425 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17426 (regsets_store_inferior_registers): Correct error message.
17427 Add missing ``return 0''.
17428 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17429 (linux_store_registers): Renamed from store_inferior_registers.
17430 (linux_read_memory): Renamed from read_inferior_memory.
17431 (linux_write_memory): Renamed from write_inferior_memory.
17432 (linux_target_ops): New structure.
17433 (initialize_low): Call set_target_ops ().
17434 * remote-utils.c (unhexify): New function.
17435 (hexify): New function.
17436 (input_interrupt): Send signals to ``signal_pid''.
17437 * server.c (inferior_pid): Remove.
17438 (start_inferior): Update create_inferior call.
17439 (attach_inferior): Call add_inferior.
17440 (handle_query): New function.
17441 (main): Call handle_query for `q' packets.
17442 * server.h: Include "target.h". Remove obsolete prototypes.
17443 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17444
174452002-04-09 Daniel Jacobowitz <drow@mvista.com>
17446
17447 * Makefile.in: Add WARN_CFLAGS. Update configury
17448 dependencies.
17449 * configure.in: Check for <string.h>
17450 * configure: Regenerate.
17451 * config.in: Regenerate.
17452 * gdbreplay.c: Include needed system headers.
17453 (remote_open): Remove strchr prototype.
17454 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17455 * regcache.c (supply_register): Change buf argument to const void *.
17456 (supply_register_by_name): Likewise.
17457 (collect_register): Change buf argument to void *.
17458 (collect_register_by_name): Likewise.
17459 * regcache.h: Add missing prototypes.
17460 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17461 * server.c (handle_query): New function.
17462 (attached): New static variable, moved out of main.
17463 (main): Quiet longjmp clobber warnings.
17464 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17465 * utils.c (error): Remove NORETURN.
17466 (fatal): Likewise.