]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Replace write_inferior_memory with target_write_memory
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4196ab2a
TT
12019-08-15 Tom Tromey <tromey@adacore.com>
2
3 * tracepoint.c (write_inferior_data_pointer)
4 (write_inferior_integer, write_inferior_int8)
5 (write_inferior_uinteger, m_tracepoint_action_download)
6 (r_tracepoint_action_download, x_tracepoint_action_download)
7 (l_tracepoint_action_download, clear_inferior_trace_buffer)
8 (download_agent_expr, download_tracepoint_1)
9 (download_trace_state_variables, upload_fast_traceframes): Update.
10 * server.c (gdb_write_memory): Update.
11 * remote-utils.c (relocate_instruction): Update.
12 * proc-service.c (ps_pdwrite): Update.
13 * mem-break.c (remove_memory_breakpoint)
14 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
15 (uninsert_fast_tracepoint_jumps_at)
16 (reinsert_fast_tracepoint_jumps_at): Update.
17 * linux-x86-low.c (append_insns)
18 (i386_install_fast_tracepoint_jump_pad)
19 (amd64_write_goto_address, i386_write_goto_address): Update.
20 * linux-s390-low.c (append_insns, s390_write_goto_address):
21 Update.
22 * linux-ppc-low.c (ppc_relocate_instruction)
23 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
24 (ppc_write_goto_address): Update.
25 * linux-aarch64-low.c (append_insns): Update.
26 * target.h (struct target_ops): Update.
27 (write_inferior_memory): Don't declare.
28 * target.c (target_write_memory): Rename from
29 write_inferior_memory. Remove old target_write_memory.
30
c6778d00
TT
312019-08-15 Tom Tromey <tromey@adacore.com>
32
33 * target.c (write_inferior_memory): Use std::vector.
34
404f2902
FCE
352019-08-06 Frank Ch. Eigler <fche@redhat.com>
36
37 PR build/24886
38 * configure.ac: Drop enable-libmcheck support.
39 * configure, config.in: Rebuild.
40 * acinclude.m4: Don't include it.
41
4c5aa8e0
AH
422019-07-19 Alan Hayward <alan.hayward@arm.com>
43
44 * configure.srv: Remove Arm xml files.
45
7cc17433
AH
462019-07-19 Alan Hayward <alan.hayward@arm.com>
47
48 * configure.srv: Add new files. Remove xml generated files.
49 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
50 registers.
51 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
52 * linux-aarch32-tdesc.c: New file.
53 * linux-aarch32-tdesc.h: New file.
54 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
55 * linux-arm-low.c (init_registers_arm, tdesc_arm)
56 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
57 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
58 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
59 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
60 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
61 (arm_read_description): Call arm_linux_read_description.
62 (initialize_low_arch): Don't init registers.
63 * linux-arm-tdesc.c: New file.
64 * linux-arm-tdesc.h: New file.
65
166a82be
AH
662019-07-10 Alan Hayward <alan.hayward@arm.com>
67
68 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
69 Move counter inside for.
70 (arm_read_description): Check ptrace earlier.
71 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
72
268a13a5
TT
732019-07-09 Tom Tromey <tom@tromey.com>
74
75 * configure: Rebuild.
76 * configure.ac: Change common to gdbsupport.
77 * acinclude.m4: Change common to gdbsupport.
78 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
79 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
80 common to gdbsupport.
81 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
82 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
83 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
84 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
85 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
86 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
87 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
88 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
89 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
90 common to gdbsupport.
91
350fab54
AH
922019-07-04 Alan Hayward <alan.hayward@arm.com>
93
94 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
95 defines.
96 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
97
2b40fda7
AH
982019-07-04 Alan Hayward <alan.hayward@arm.com>
99
100 * configure.srv: Remove legacy xml.
101 * linux-aarch64-low.c (initialize_low_arch): Remove
102 initialize_low_tdesc call.
103 * linux-aarch64-tdesc-selftest.c: Remove file.
104 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
105 * linux-x86-low.c (initialize_low_arch): Remove
106 initialize_low_tdesc call.
107 * linux-x86-tdesc-selftest.c: Remove file.
108 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
109
7d10623d
TV
1102019-06-20 Tom de Vries <tdevries@suse.de>
111
112 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
113 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
114
8d6a48df
TV
1152019-06-19 Tom de Vries <tdevries@suse.de>
116
117 * debug.h (debug_write): Change return type to ssize_t.
118 * debug.c (debug_write): Same.
119
73cc7272
TT
1202019-06-14 Tom Tromey <tom@tromey.com>
121
122 * configure.ac: Use new path to gnulib.
123 * configure: Rebuild.
124 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
125 to gnulib.
126
08f10e02
TT
1272019-06-11 Tom Tromey <tom@tromey.com>
128
129 * Makefile.in (SFILES): Add alloc.c.
130 (OBS): Add alloc.o.
131 (IPA_OBJS): Add alloc-ipa.o.
132 (alloc-ipa.o): New target.
133 (%.o: ../%.c): New pattern rule.
134
422186a9
TT
1352019-06-10 Tom Tromey <tromey@adacore.com>
136
137 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
138 end warning with a newline.
139 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
140 newline.
141 * thread-db.c (attach_thread): Don't end warning with a newline.
142 (thread_db_notice_clone): Likewise.
143 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
144 newline.
145 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
146 end warning with a newline.
147
b02f78f9
PA
1482019-06-04 Pedro Alves <palves@redhat.com>
149
150 * server.c (captured_main): Use make_unique_xstrdup.
151
88ed7edb
TT
1522019-06-02 Tom Tromey <tom@tromey.com>
153
154 * gdbreplay.c (fromhex): Remove.
155 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
156
33a6bc35
TT
1572019-05-29 Tom Tromey <tromey@adacore.com>
158
159 * configure: Rebuild.
160
e90a813d
KB
1612019-05-06 Kevin Buettner <kevinb@redhat.com>
162
163 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
164 sign extension code on 32-bit builds.
165
353ea2d1
EZ
1662019-05-03 Eli Zaretskii <eliz@gnu.org>
167
168 * remote-utils.c:
169 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
170
b494cdff
TT
1712019-04-19 Tom Tromey <tom@tromey.com>
172
173 * server.c (struct vstop_notif): Derive from notif_event.
174 <base>: Remove.
175 (queue_stop_reply): Update.
176 (remove_all_on_match_ptid): Change type. Rewrite.
177 (discard_queued_stop_replies): Rewrite.
178 (in_queued_stop_replies_ptid): Change type.
179 (in_queued_stop_replies): Rewrite.
180 (notif_stop): Update.
181 (queue_stop_reply_callback): Update.
182 (captured_main): Don't call initialize_notif.
183 (push_stop_notification): Update.
184 * notif.c (notif_write_event, handle_notif_ack)
185 (notif_event_enque, notif_push): Update.
186 (notif_event_xfree, initialize_notif): Remove.
187 * notif.h (struct notif_event): Include <list>, not
188 "common/queue.h".
189 (struct notif_server) <queue>: Now a std::list.
190 (notif_event_p): Remove typedef.
191 (initialize_notif): Don't declare.
192 (struct notif_event): Add virtual destructor.
193
a7e559cc
AH
1942019-04-17 Alan Hayward <alan.hayward@arm.com>
195
196 * ax.c (ax_vdebug): Call debug_printf.
197 * debug.c (debug_write): New function.
198 * debug.h (debug_write): New declaration.
199 * linux-low.c (sigchld_handler): Call debug_write.
200
aeb2e706
AH
2012019-04-17 Alan Hayward <alan.hayward@arm.com>
202
203 * debug.c (debug_set_output): New function.
204 (debug_vprintf): Send output to debug_file.
205 (debug_flush): Likewise.
206 * debug.h (debug_set_output): New declaration.
207 * server.c (handle_monitor_command): Add debug-file option.
208 (captured_main): Likewise.
209
c1bc0935
AH
2102019-04-17 Alan Hayward <alan.hayward@arm.com>
211
212 * debug.c (remote_debug): Add definition.
213 * debug.h (remote_debug): Add declaration.
214 * hostio.c (remote_debug): Remove declaration.
215 * remote-utils.c (struct ui_file): Likewise.
216 (remote_debug): Likewise.
217 * remote-utils.h (remote_debug): Likewise,
218 * server.c (remote_debug): Remove definition.
219
3f52fdbc
KB
2202019-04-10 Kevin Buettner <kevinb@redhat.com>
221
222 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
223 when using a 64-bit gdbserver.
224
b0319eaa
TT
2252019-04-09 Tom Tromey <tromey@adacore.com>
226
227 * linux-low.c (select_event_lwp): Use find_thread_in_random.
228
eedc3f4f
TT
2292019-04-08 Tom Tromey <tom@tromey.com>
230
231 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
232 throw.
233 (linux_resume_one_lwp): Likewise.
234
230d2906
TT
2352019-04-08 Tom Tromey <tom@tromey.com>
236
237 * gdbreplay.c: Update.
238 * linux-low.c: Update.
239 * server.c: Update.
240
a70b8144
TT
2412019-04-08 Tom Tromey <tom@tromey.com>
242
243 * server.c: Use C++ exception handling.
244 * linux-low.c: Use C++ exception handling.
245 * gdbreplay.c: Use C++ exception handling.
246
3d6e9d23
TT
2472019-04-08 Tom Tromey <tom@tromey.com>
248
249 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
250 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
251 (captured_main, main): Update.
252 * gdbreplay.c (main): Update.
253
0570503d
PFC
2542019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
255
256 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
257 value in argument pointer, return 1 if the entry is found and 0
258 otherwise. Move comment.
259 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
260 * linux-low.h (linux_get_auxv): Declare.
261 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
262
227a9e65
TT
2632019-04-05 Tom Tromey <tromey@adacore.com>
264
265 * server.c (gdbserver_usage): Use upper-case for metasyntactic
266 variables.
267
69f4c9cc
AH
2682019-03-28 Alan Hayward <alan.hayward@arm.com>
269
270 * linux-low.c (AT_HWCAP2): Add define if not already included.
271
974c89e0
AH
2722019-03-26 Alan Hayward <alan.hayward@arm.com>
273
274 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
275 (aarch64_arch_setup): Call linux_get_hwcap.
276 * linux-arm-low.c (arm_get_hwcap): Remove function.
277 (arm_read_description): Call linux_get_hwcap.
278 * linux-low.c (linux_get_auxv): New function.
279 (linux_get_hwcap): Likewise.
280 (linux_get_hwcap2): Likewise.
281 * linux-low.h (linux_get_hwcap): New declaration.
282 (linux_get_hwcap2): Likewise.
283 * linux-ppc-low.c (ppc_get_auxv): Remove function.
284 (ppc_arch_setup): Call linux_get_hwcap.
285 * linux-s390-low.c (s390_get_hwcap): Remove function.
286 (s390_arch_setup): Call linux_get_hwcap.
287
1ef53e6b
AH
2882019-03-22 Alan Hayward <alan.hayward@arm.com>
289 Jiong Wang <jiong.wang@arm.com>
290
291 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
292 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
293 to fail.
294 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
295
ee4fbcfa
AH
2962019-03-22 Alan Hayward <alan.hayward@arm.com>
297 Jiong Wang <jiong.wang@arm.com>
298
299 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
300 (aarch64_get_hwcap): New function.
301 (aarch64_arch_setup): Read APIA hwcap.
302
6dc0ebde
AH
3032019-03-22 Alan Hayward <alan.hayward@arm.com>
304 Jiong Wang <jiong.wang@arm.com>
305
306 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
307 (initialize_low_tracepoint): Likewise.
308 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
309 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
310 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
311 (aarch64_linux_read_description): Likewise.
312 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
313
1163a4b7
JB
3142019-03-12 John Baldwin <jhb@FreeBSD.org>
315
316 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
317 i386_create_target_description for 'segments' parameter.
318 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
319 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
320 * win32-i386-low.c (i386_arch_setup): Likewise.
321
d3a70e03
TT
3222019-03-12 Tom Tromey <tromey@adacore.com>
323
324 * linux-low.c (iterate_over_lwps): Update.
325
37991b4f
TT
3262019-03-06 Tom Tromey <tom@tromey.com>
327
328 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
329 (captured_main): Use SCOPE_EXIT.
330
45950eb6
SDJ
3312019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
332
333 * configure.srv: Use '$enable_unittest' instead of '$development'
334 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
335 case.
336
43ac54fc
TT
3372019-02-27 Tom Tromey <tromey@adacore.com>
338
339 * gdbreplay.c (logchar): Handle \r\n.
340
df0da8a2
AH
3412019-02-07 Alan Hayward <alan.hayward@arm.com>
342
343 * linux-low.c (linux_attach): Add process before lwp.
344 * server.c (attach_inferior): Check if already attached.
345
1a5c2598
TT
3462019-02-07 Tom Tromey <tom@tromey.com>
347
348 * x86-tdesc.h: Rename include guard.
349 * x86-low.h: Add include guard.
350 * wincecompat.h: Rename include guard.
351 * win32-low.h: Add include guard.
352 * utils.h: Rename include guard.
353 * tracepoint.h: Rename include guard.
354 * tdesc.h: Rename include guard.
355 * target.h: Rename include guard.
356 * server.h: Rename include guard.
357 * remote-utils.h: Rename include guard.
358 * regcache.h: Rename include guard.
359 * nto-low.h: Rename include guard.
360 * notif.h: Add include guard.
361 * mem-break.h: Rename include guard.
362 * lynx-low.h: Add include guard.
363 * linux-x86-tdesc.h: Add include guard.
364 * linux-s390-tdesc.h: Add include guard.
365 * linux-ppc-tdesc-init.h: Add include guard.
366 * linux-low.h: Add include guard.
367 * linux-aarch64-tdesc.h: Add include guard.
368 * linux-aarch32-low.h: Add include guard.
369 * inferiors.h: Rename include guard.
370 * i387-fp.h: Rename include guard.
371 * hostio.h: Rename include guard.
372 * gdbthread.h: Rename include guard.
373 * gdb_proc_service.h: Rename include guard.
374 * event-loop.h: Rename include guard.
375 * dll.h: Rename include guard.
376 * debug.h: Rename include guard.
377 * ax.h: Rename include guard.
378
956cc47c
SN
3792018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
380
381 PR gdb/23985
382 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
383 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
384
a0707f3c
TT
3852019-01-25 Tom Tromey <tom@tromey.com>
386
387 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
388
0747795c
TT
3892019-01-25 Tom Tromey <tom@tromey.com>
390
391 * win32-low.c: Fix common/ includes.
392 * win32-i386-low.c: Fix common/ includes.
393 * tracepoint.c: Fix common/ includes.
394 * thread-db.c: Fix common/ includes.
395 * target.h: Fix common/ includes.
396 * symbol.c: Fix common/ includes.
397 * spu-low.c: Fix common/ includes.
398 * server.h: Fix common/ includes.
399 * server.c: Fix common/ includes.
400 * remote-utils.c: Fix common/ includes.
401 * regcache.h: Fix common/ includes.
402 * regcache.c: Fix common/ includes.
403 * nto-x86-low.c: Fix common/ includes.
404 * notif.h: Fix common/ includes.
405 * mem-break.h: Fix common/ includes.
406 * lynx-low.c: Fix common/ includes.
407 * lynx-i386-low.c: Fix common/ includes.
408 * linux-x86-tdesc-selftest.c: Fix common/ includes.
409 * linux-x86-low.c: Fix common/ includes.
410 * linux-low.c: Fix common/ includes.
411 * inferiors.h: Fix common/ includes.
412 * i387-fp.c: Fix common/ includes.
413 * hostio.c: Fix common/ includes.
414 * hostio-errno.c: Fix common/ includes.
415 * gdbthread.h: Fix common/ includes.
416 * gdbreplay.c: Fix common/ includes.
417 * fork-child.c: Fix common/ includes.
418 * event-loop.c: Fix common/ includes.
419 * ax.c:
420 (enum gdb_agent_op): Fix common/ includes.
421
be6d4f74
TT
4222019-01-21 Tom Tromey <tom@tromey.com>
423
424 * tracepoint.c: Fix includes.
425 * remote-utils.c: Fix includes.
426 * linux-x86-low.c: Fix includes.
427
66d91b39
JB
4282019-01-01 Joel Brobecker <brobecker@adacore.com>
429
430 * gdbreplay.c (gdbreplay_version): Update copyright year in
431 version message.
432 * server.c (gdbserver_version): Likewise.
433
754e3168
AH
4342018-12-05 Alan Hayward <alan.hayward@arm.com>
435
436 * linux-low.c (add_lwp): Switch ordering.
437
d105de22
TT
4382018-11-29 Tom Tromey <tom@tromey.com>
439
440 * win32-low.c (win32_join): Take pid, not process.
441 * target.h (struct target_ops) <join>: Change argument type.
442 (join_inferior): Change argument name.
443 * spu-low.c (spu_join): Take pid, not process.
444 * server.c (handle_detach): Preserve pid before destroying
445 process.
446 * lynx-low.c (lynx_join): Take pid, not process.
447 * linux-low.c (linux_join): Take pid, not process.
448
50138245
AH
4492018-11-23 Alan Hayward <alan.hayward@arm.com>
450
451 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
452 (aarch64_cannot_fetch_register): Likewise.
453 (struct linux_target_ops): Update references.
454
64f57f3d
PFC
4552018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
456
457 * linux-ppc-low.c: Include nat/linux-ptrace.h.
458
8d619c01
EBM
4592018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
460
461 * configure.srv (ipa_ppc_linux_regobj): Add
462 powerpc-isa207-htm-vsx32l-ipa.o and
463 powerpc-isa207-htm-vsx64l-ipa.o.
464 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
465 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
466 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
467 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
468 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
469 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
470 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
471 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
472 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
473 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
474 (init_registers_powerpc_isa207_htm_vsx32l)
475 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
476 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
477 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
478 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
479 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
480 (ppc_store_tm_ctarregset): New functions.
481 (ppc_regsets): Add entries for HTM regsets.
482 (ppc_arch_setup): Set htm in features struct when needed. Set
483 sizes for the HTM regsets.
484 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
485 (initialize_low_arch): Call
486 init_registers_powerpc_isa207_htm_vsx32l and
487 init_registers_powerpc_isa207_htm_vsx64l.
488 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
489 PPC_TDESC_ISA207_HTM_VSX.
490 (initialize_low_tracepoint): Call
491 init_registers_powerpc_isa207_htm_vsx32l and
492 init_registers_powerpc_isa207_htm_vsx64l.
493
232bfb86
EBM
4942018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
495
496 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
497 rs6000/power-linux-pmu.xml to srv_xmlfiles.
498 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
499 (ppc_store_pmuregset): New functions.
500 (ppc_regsets): Add entries for ebb and pmu regsets.
501 (ppc_arch_setup): Set isa207 in features struct if the ebb and
502 pmu regsets are available. Set sizes for these regsets.
503
f2cf6173
EBM
5042018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
505
506 * configure.srv (ipa_ppc_linux_regobj): Add
507 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
508 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
509 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
510 rs6000/powerpc-isa207-vsx32l.xml, and
511 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
512 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
513 <PPC_TDESC_ISA207_VSX>: New enum value.
514 (init_registers_powerpc_isa207_vsx32l): Declare.
515 (init_registers_powerpc_isa207_vsx64l): Declare.
516 * linux-ppc-low.c (ppc_fill_tarregset): New function.
517 (ppc_store_tarregset): New function.
518 (ppc_regsets): Add entry for the TAR regset.
519 (ppc_arch_setup): Set isa207 in features struct when needed. Set
520 size for the TAR regsets.
521 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
522 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
523 and init_registers_powerpc_isa207_vsx64l.
524 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
525 (initialize_low_tracepoint): Call
526 init_registers_powerpc_isa207_vsx32l and
527 init_registers_powerpc_isa207_vsx64l.
528
7ca18ed6
EBM
5292018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
530 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
531
532 * configure.srv (ipa_ppc_linux_regobj): Add
533 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
534 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
535 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
536 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
537 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
538 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
539 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
540 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
541 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
542 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
543 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
544 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
545 (ppc_hwcap): Add comment.
546 (ppc_hwcap2): New global.
547 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
548 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
549 (ppc_regsets): Add entries for the DSCR and PPR regsets.
550 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
551 when needed. Set sizes for the the DSCR and PPR regsets.
552 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
553 (initialize_low_arch): Call
554 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
555 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
556 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
557 PPC_TDESC_ISA205_PPR_DSCR_VSX.
558 (initialize_low_tracepoint): Call
559 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
560 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
561
5c849b22
PFC
5622018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
563
564 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
565
8ecfd7bd
SDJ
5662018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
567 Simon Marchi <simark@simark.ca>
568
569 * acinclude.m4: Include "../selftest.m4".
570 * configure: Regenerate.
571 * configure.ac: Use "GDB_AC_SELFTEST".
572 * configure.srv: Use "$enable_unittests" instead of
573 "$development" when checking whether unit tests have been
574 enabled.
575 * server.c (captured_main): Update message informing that
576 selftests have been disabled.
577
96643e35
TT
5782018-10-04 Tom Tromey <tom@tromey.com>
579
580 * configure: Rebuild.
581
da4ae14a
TT
5822018-10-04 Tom Tromey <tom@tromey.com>
583
584 * server.c (handle_status): Rename inner "thread".
585 (process_serial_event): Declare "res" in 'm' case.
586 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
587 (iterate_over_lwps): Rename inner "thread".
588 (linux_qxfer_libraries_svr4): Rename inner "len".
589 * gdbthread.h (find_thread_in_random): Rename inner "thread".
590
7c619dbd
GB
5912018-10-01 Gary Benson <gbenson@redhat.com>
592
593 * gdb_proc_service.h: Moved common code to
594 common/gdb_proc_service.h.
595
3795e814
GB
5962018-10-01 Gary Benson <gbenson@redhat.com>
597
598 * gdb_proc_service.h: Synchronize comments and whitespace with
599 GDB's version of this file.
600
49b036f1
TT
6012018-09-25 Tom Tromey <tom@tromey.com>
602
603 * configure: Rebuild.
604 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
605
8ff03f0b
SM
6062018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
607
608 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
609 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
610 ($(IPA_LIB)): Sort IPA_OBJS.
611
a1cd91dc
SM
6122018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
613
614 * Makefile.in: Remove references to $(ADD_DEPS).
615
752312ba
TT
6162018-09-16 Tom Tromey <tom@tromey.com>
617
618 * remote-utils.c (remote_open): Use GNU style for metasyntactic
619 variables.
620 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
621 variables.
622
f1628857
TT
6232018-09-05 Tom Tromey <tom@tromey.com>
624
625 * configure: Rebuild.
626
ad202fcc
SM
6272018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
628
629 PR build/23399
630 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
631
d3d8724a
TT
6322018-08-27 Tom Tromey <tom@tromey.com>
633
634 PR build/23087:
635 * configure: Rebuild.
636
b4f183d2
TT
6372018-08-27 Tom Tromey <tom@tromey.com>
638
639 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
640 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
641 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
642 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
643 (s390x_emit_stack_adjust): Add casts to unsigned char.
644
4e2aa472
SM
6452018-08-22 Simon Marchi <simon.marchi@ericsson.com>
646
647 PR gdb/23374
648 PR gdb/23375
649 * server.h (struct client_state) <disable_randomization>:
650 Initialize to 1.
651
cf4088a9
SM
6522018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
653
654 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
655 variable.
656 (mips_supply_ptrace_register): Likewise.
657
a0de763e
TT
6582018-07-22 Tom Tromey <tom@tromey.com>
659
660 * configure: Rebuild.
661
b0a7723d
TT
6622018-07-22 Tom Tromey <tom@tromey.com>
663
664 * win32-low.c (win32_create_inferior): Remove unused variables.
665 * gdbreplay.c (remote_open): Remove unused variable.
666 * remote-utils.c (remote_prepare): Remove unused variable.
667 * x86-tdesc.h (X86_TDESC_H): Define.
668 (amd64_expedite_regs): Define conditionally.
669 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
670 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
671 * remote-utils.c (readchar): Remove unused variable.
672
a780ef4f
PA
6732018-07-13 Pedro Alves <palves@redhat.com>
674
675 * linux-low.c (linux_kill): Change parameter to process_info
676 pointer instead of pid. Adjust.
677 * lynx-low.c (lynx_kill): Likewise.
678 * nto-low.c (nto_kill): Likewise.
679 * spu-low.c (spu_kill): Likewise.
680 * win32-low.c (win32_kill): Likewise.
681 * server.c (handle_v_kill, kill_inferior_callback)
682 (detach_or_kill_for_exit): Adjust.
683 * target.c (kill_inferior): Change parameter to process_info
684 pointer instead of pid. Adjust.
685 * target.h (struct target_ops) <kill>: Change parameter to
686 process_info pointer instead of pid. Adjust all implementations
687 and callers.
688 (kill_inferior): Likewise.
689
ef2ddb33
PA
6902018-07-13 Pedro Alves <palves@redhat.com>
691
692 * linux-low.c (linux_detach, linux_join): Change parameter to
693 process_info pointer instead of pid. Adjust.
694 * lynx-low.c (lynx_detach, lynx_join): Likewise.
695 * nto-low.c (nto_detach): Likewise.
696 * spu-low.c (spu_detach, spu_join): Likewise.
697 * win32-low.c (win32_detach, win32_join): Likewise.
698 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
699 * target.h (struct target_ops) <detach, join>: Change parameter to
700 process_info pointer instead of pid. Adjust all implementations
701 and callers.
702 (detach_inferior, join_inferior): Rename 'pid' parameter to
703 'proc'.
704
c7ab0aef
SDJ
7052018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
706 Jan Kratochvil <jan.kratochvil@redhat.com>
707 Paul Fertser <fercerpav@gmail.com>
708 Tsutomu Seki <sekiriki@gmail.com>
709
710 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
711 (OBS): Add 'common/netstuff.o'.
712 (GDBREPLAY_OBS): Likewise.
713 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
714 (remote_open): Implement support for IPv6
715 connections.
716 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
717 and 'wspiapi.h'.
718 (handle_accept_event): Accept connections from IPv6 sources.
719 (remote_prepare): Handle IPv6-style hostnames; implement
720 support for IPv6 connections.
721 (remote_open): Implement support for printing connections from
722 IPv6 sources.
723
31445d10
PA
7242018-07-11 Pedro Alves <palves@redhat.com>
725
726 PR gdb/23377
727 * mem-break.c (any_persistent_commands): Add process_info
728 parameter and use it instead of relying on the current process.
729 Change return type to bool.
730 * mem-break.h (any_persistent_commands): Add process_info
731 parameter and change return type to bool.
732 * server.c (handle_detach): Remove require_running_or_return call.
733 Look up the process_info for the process we're about to detach.
734 If not found, return back error to GDB. Adjust
735 any_persistent_commands call to pass down a process pointer.
736
cb197132
PA
7372018-07-11 Pedro Alves <palves@redhat.com>
738
739 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
740 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
741 instead of collect_register_by_name.
742 * regcache.c (regcache_raw_get_unsigned_by_name): New.
743 * regcache.h (regcache_raw_get_unsigned_by_name): New.
744
1b919490
VB
7452018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
746 Pedro Alves <palves@redhat.com>
747
748 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
749
d7e15655
TT
7502018-07-03 Tom Tromey <tom@tromey.com>
751
752 * linux-low.c: Update.
753 * lynx-low.c: Update.
754 * mem-break.c: Update.
755 * nto-low.c: Update.
756 * remote-utils.c: Update.
757 * server.c: Update.
758 * spu-low.c: Update.
759 * target.c: Update.
760 * win32-low.c: Update.
761
26a57c92
TT
7622018-07-03 Tom Tromey <tom@tromey.com>
763
764 * server.c: Update.
765
0e998d96
TT
7662018-07-03 Tom Tromey <tom@tromey.com>
767
768 * linux-low.c: Update.
769
cc6bcb54
TT
7702018-07-03 Tom Tromey <tom@tromey.com>
771
772 * target.c: Update.
773
e38504b3
TT
7742018-07-03 Tom Tromey <tom@tromey.com>
775
776 * linux-low.c: Update.
777 * linux-mips-low.c: Update.
778 * lynx-low.c: Update.
779 * nto-low.c: Update.
780 * remote-utils.c: Update.
781 * server.c: Update.
782 * spu-low.c: Update.
783 * target.c: Update.
784 * thread-db.c: Update.
785
e99b03dc
TT
7862018-07-03 Tom Tromey <tom@tromey.com>
787
788 * linux-low.c: Update.
789 * linux-mips-low.c: Update.
790 * lynx-low.c: Update.
791 * mem-break.c: Update.
792 * nto-low.c: Update.
793 * remote-utils.c: Update.
794 * server.c: Update.
795 * spu-low.c: Update.
796 * target.c: Update.
797 * tracepoint.c: Update.
798
f2907e49
TT
7992018-07-03 Tom Tromey <tom@tromey.com>
800
801 * linux-low.c: Update.
802 * linux-ppc-low.c: Update.
803 * linux-x86-low.c: Update.
804 * proc-service.c: Update.
805 * server.c: Update.
806 * spu-low.c: Update.
807 * thread-db.c: Update.
808 * win32-low.c: Update.
809
fd79271b
TT
8102018-07-03 Tom Tromey <tom@tromey.com>
811
812 * linux-low.c: Update.
813 * lynx-low.c: Update.
814 * nto-low.c: Update.
815 * remote-utils.c: Update.
816 * spu-low.c: Update.
817 * thread-db.c: Update.
818 * win32-low.c: Update.
819
c0867626
SDJ
8202018-06-29 Joel Brobecker <brobecker@adacore.com>
821
822 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
823 parameter in call to 'amd64_create_target_description'.
824
2512d7ef
JK
8252018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
826
827 * x86-tdesc.h: Remove executable permission flag.
828
d0ac1c44
SM
8292018-06-19 Simon Marchi <simon.marchi@ericsson.com>
830
831 * configure.ac: Remove AC_PREREQ, add missing quoting.
832 * configure: Re-generate.
833 * config.in: Re-generate.
834 * aclocal.m4: Re-generate.
835
c4eb05ff
SM
8362018-06-18 Simon Marchi <simon.marchi@ericsson.com>
837
838 * tracepoint.h (current_traceframe): Remove declaration.
839
02895270
AH
8402018-06-18 Alan Hayward <alan.hayward@arm.com>
841
842 * linux-aarch64-low.c (is_sve_tdesc): New function.
843 (aarch64_sve_regs_copy_to_regcache): Likewise.
844 (aarch64_sve_regs_copy_from_regcache): Likewise.
845 (aarch64_regs_info): Add SVE checks.
846 (initialize_low_arch): Initialize SVE.
847
e9902bfc
AH
8482018-06-18 Alan Hayward <alan.hayward@arm.com>
849
850 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
851
fefa175e
AH
8522018-06-11 Alan Hayward <alan.hayward@arm.com>
853
854 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
855 (initialize_low_tracepoint): Likewise
856 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
857 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
858 param.
859 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
860 checks.
861 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
862
b91ad3ff
AH
8632018-06-11 Alan Hayward <alan.hayward@arm.com>
864
865 * server.h (PBUFSIZ): Increase size
866
f868386e
AH
8672018-06-11 Alan Hayward <alan.hayward@arm.com>
868
869 * regcache.c (regcache::raw_compare): New function.
870 * regcache.h (regcache::raw_compare): New declaration.
871
9c861883
AH
8722018-06-11 Alan Hayward <alan.hayward@arm.com>
873
874 * regcache.c (new_register_cache): Use new.
875 (free_register_cache): Use delete.
876 (register_data): Use const.
877 (supply_register): Move body inside regcache.
878 (regcache::raw_supply): New override function.
879 (collect_register): Move body inside regcache.
880 (regcache::raw_collect): New override function.
881 (regcache::get_register_status): New override function.
882 * regcache.h (struct regcache): Inherit from reg_buffer_common.
883
40591844
TT
8842018-06-09 Tom Tromey <tom@tromey.com>
885
886 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
887 declare queue.
888 (event_queue): Use std::queue.
889 (gdb_event_xfree): Remove.
890 (initialize_event_loop, process_event, wait_for_event): Update.
891
6341380d
SC
8922018-06-08 Stan Cox <scox@redhat.com>
893
894 * win32-low.c (win32_create_inferior): last_ptid and last_status
895 moved to client_state.
896
03349c93
PA
8972018-06-08 Pedro Alves <palves@redhat.com>
898
899 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
900 common/common-exceptions.o, common/common-utils.o,
901 common/errors.o, common/print-utils.o and utils.o.
902 * gdbreplay.c: Include "common-defs.h" instead of the two
903 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
904 string.h or alloca.h.
905 (perror_with_name): Delete.
906 (remote_open): Use xstrdup instead of strdup.
907 (main): Rename to ...
908 (captured_main): ... this.
909 (main): New.
910
8dcc53b3
TT
9112018-06-08 Tom Tromey <tom@tromey.com>
912
913 * linux-low.c (linux_low_read_btrace): Update.
914
c12a5089
SC
9152018-06-04 Stan Cox <scox@redhat.com>
916
917 * server.h (struct client_state): New.
918 * server.c (cont_thread, general_thread, multi_process)
919 (report_fork_events, report_vfork_events, report_exec_events)
920 (report_thread_events, swbreak_feature, hwbreak_feature)
921 (vCont_supported, disable_randomization, pass_signals)
922 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
923 Moved to client_state.
924 * remote-utils.c (remote_debug, noack_mode)
925 (transport_is_reliable): Moved to client_state.
926 * tracepoint.c (current_traceframe): Moved to client_state.
927
928 Update all callers.
929 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
930 linux-low.c, remote-utils.h, target.c: Use client_state.
931
122394f1
AH
9322018-05-31 Alan Hayward <alan.hayward@arm.com>
933
934 * configure.srv: Add new c/h file.
935
95228a0d
AH
9362018-05-31 Alan Hayward <alan.hayward@arm.com>
937
938 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
939 null VQ.
940
d8dab6c3
MR
9412018-05-25 Maciej W. Rozycki <macro@mips.com>
942
943 * gdb.arch/mips-fpregset-core.exp: New test.
944 * gdb.arch/mips-fpregset-core.c: New test source.
945
81e25b7c
EK
9462018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
947
948 PR server/23198
949 * hostio.c (require_int): Do not report overflow for integers
950 between 0xfffffff and 0x7fffffff.
951
7e947ad3
MR
9522018-05-22 Maciej W. Rozycki <macro@mips.com>
953
954 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
955 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
956 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
957 functions.
958 (the_low_target): Wire them.
959
1d75a658
PFC
9602018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
961
962 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
963 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
964 mode. Call collect_register_by_name with vscr using
965 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
966 (ppc_store_vrregset): Add and set vscr_offset variable as in
967 ppc_fill_vrregset. Call supply_register_by_name with vscr using
968 vscr_offset.
969
d078308a
PFC
9702018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
971
972 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
973 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
974 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
975
7273b5fc
PFC
9762018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
977
978 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
979 (ppc_store_vsxregset): Likewise.
980 (ppc_fill_vrregset): Likewise.
981 (ppc_store_vrregset): Likewise.
982 (ppc_fill_evrregset): Likewise.
983 (ppc_store_evrregset): Likewise.
984 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
985 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
986 needed.
987
2e077f5e
PFC
9882018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
989
990 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
991 wordsize of the inferior. Call ppc_linux_target_wordsize.
992
bd64614e
PFC
9932018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
994
995 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
996 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
997 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
998 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
999 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1000 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1001 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1002 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1003 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1004 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1005 (tdesc_powerpc_e500l): Remove.
1006 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1007 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1008 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1009 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1010 linux-ppc-tdesc.h.
1011 (ppc_arch_setup): Remove target description matching code. Fill a
1012 ppc_linux_features struct and call ppc_linux_match_description
1013 with it.
1014
75d74cca
MR
10152018-05-22 Maciej W. Rozycki <macro@mips.com>
1016
1017 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1018 width of the requested register exceeds the width of the
1019 `ptrace' data type.
1020 (mips_cannot_store_register): Likewise.
1021
e4439e43
MR
10222018-05-21 Maciej W. Rozycki <macro@mips.com>
1023
1024 * linux-mips-low.c (mips_fetch_register): New function. Update
1025 preceding comment.
1026 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1027 (the_low_target): Wire `mips_fetch_register'.
1028
55271bf9
JB
10292018-05-10 Joel Brobecker <brobecker@adacore.com>
1030
1031 * lynx-i386-low.c (LYNXOS_178): New macro.
1032 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1033 the layout on LynxOS-178.
1034 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1035 handle floating point registers that are not supported by
1036 LynxOS-178.
1037
1a34f210
TT
10382018-05-10 Tom Tromey <tom@tromey.com>
1039
1040 * configure: Rebuild.
1041
190852c8
JB
10422018-05-10 Joel Brobecker <brobecker@adacore.com>
1043
1044 PR server/23158:
1045 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1046 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1047 Use it to set the expedite_regs field in the given tdesc.
1048 * x86-tdesc.h: New file.
1049 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1050 Adjust following the addition of the new expedite_regs parameter
1051 to init_target_desc.
1052 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1053 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1054 (i386_linux_read_description, amd64_linux_read_description):
1055 Adjust following the addition of the new expedite_regs parameter
1056 to init_target_desc.
1057 * lynx-i386-low.c: #include "x86-tdesc.h".
1058 (lynx_i386_arch_setup): Adjust following the addition of the new
1059 expedite_regs parameter to init_target_desc.
1060 * nto-x86-low.c: #include "x86-tdesc.h".
1061 (nto_x86_arch_setup): Adjust following the addition of the new
1062 expedite_regs parameter to init_target_desc.
1063 * win32-i386-low.c: #include "x86-tdesc.h".
1064 (i386_arch_setup): Adjust following the addition of the new
1065 expedite_regs parameter to init_target_desc.
1066
7dbac825
JB
10672018-05-10 Joel Brobecker <brobecker@adacore.com>
1068
1069 PR server/23158:
1070 * win32-low.c (win32_create_inferior): Add call to my_wait
1071 setting last_status global.
1072
906994d9
JB
10732018-05-10 Joel Brobecker <brobecker@adacore.com>
1074
1075 PR server/23158:
1076 * win32-low.c (create_process): Only call gdb_tilde_expand if
1077 inferior_cwd is not NULL.
1078
8ee22052
AB
10792018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1080
1081 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1082 registers to the cache if their values have changed.
1083 (i387_xsave_to_cache): Provide default values for x87 control
1084 registers when these features are available, but disabled.
1085 * regcache.c (supply_register_by_name_zeroed): New function.
1086 * regcache.h (supply_register_by_name_zeroed): Declare new
1087 function.
1088
aff689d3
TT
10892018-05-07 Tom Tromey <tom@tromey.com>
1090
1091 * configure: Rebuild.
1092
85e26832
TT
10932018-05-04 Tom Tromey <tom@tromey.com>
1094
1095 * configure: Rebuild.
1096
a3b60e45
JK
10972018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1098 Pedro Alves <palves@redhat.com>
1099
1100 * linux-aarch64-low.c (aarch64_stopped_data_address):
1101 Likewise.
1102
632e107b
TT
11032018-04-27 Tom Tromey <tom@tromey.com>
1104
1105 * configure: Rebuild.
1106
458412c3
TT
11072018-04-23 Tom Tromey <tom@tromey.com>
1108
1109 * configure: Rebuild.
1110
f31c089e
SM
11112018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1112
1113 * Makefile.in (depcomp): Add "..".
1114 (all_deps_files): New and use it.
1115
b319b098
AH
11162018-04-18 Alan Hayward <alan.hayward@arm.com>
1117
1118 * configure.srv (aarch64*-*-linux*): Don't include xml.
1119 (i[34567]86-*-cygwin*): Likewise.
1120 (i[34567]86-*-linux*): Likewise.
1121 (i[34567]86-*-lynxos*): Likewise.
1122 (i[34567]86-*-mingw32ce*): Likewise.
1123 (i[34567]86-*-mingw*): Likewise.
1124 (i[34567]86-*-nto*): Likewise.
1125 (tic6x-*-uclinux): Likewise.
1126 (x86_64-*-linux*): Likewise.
1127 (x86_64-*-mingw*): Likewise.
1128 (x86_64-*-cygwin*): Likewise.
1129
3b74854b
AH
11302018-04-18 Alan Hayward <alan.hayward@arm.com>
1131
1132 * tdesc.c: Remove xml parameter.
1133
e98577a9
AH
11342018-04-18 Alan Hayward <alan.hayward@arm.com>
1135
1136 * server.c (get_features_xml): Remove cast.
1137 * tdesc.c (void target_desc::accept): Fill in function.
1138 (tdesc_get_features_xml): Remove old xml creation.
1139 (print_xml_feature::visit_pre): Add xml vistor.
1140 * tdesc.h (struct target_desc): Make xmltarget mutable.
1141 (tdesc_get_features_xml): Remove declaration.
1142
d278f585
AH
11432018-04-18 Alan Hayward <alan.hayward@arm.com>
1144
1145 * tdesc.c (tdesc_architecture_name): Add new function.
1146 (tdesc_osabi_name): Likewise.
1147 (tdesc_get_features_xml): Use new functions.
1148
eee8a18d
AH
11492018-04-18 Alan Hayward <alan.hayward@arm.com>
1150
1151 * tdesc.c (tdesc_create_flags): Remove.
1152 (tdesc_add_flag): Likewise.
1153 (tdesc_named_type): Likewise.
1154 (tdesc_create_union): Likewise.
1155 (tdesc_create_struct): Likewise.
1156 (tdesc_create_vector): Likewise.
1157 (tdesc_add_bitfield): Likewise.
1158 (tdesc_add_field): Likewise.
1159 (tdesc_set_struct_size): Likewise.
1160
82ec9bc7
AH
11612018-04-18 Alan Hayward <alan.hayward@arm.com>
1162
1163 * tdesc.c (~target_desc): Remove implictly deleted items.
1164 (init_target_desc): Iterate all features.
1165 (tdesc_get_features_xml): Use vector.
1166 (tdesc_create_feature): Create feature.
1167 * tdesc.h (tdesc_feature) Remove
1168 (target_desc): Add features.
1169
ea3e7d71
AH
11702018-04-18 Alan Hayward <alan.hayward@arm.com>
1171
1172 * Makefile.in: Add common/tdesc.c
1173 * tdesc.c (init_target_desc): init all reg_defs from register
1174 vector.
1175 (tdesc_create_reg): Create tdesc_reg.
1176 * tdesc.h (tdesc_feature): Add register vector.
1177
17d08cd4
SM
11782018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1179
1180 * tdesc.h (struct target_desc) <features>: Change type to
1181 std::vector<std::string>.
1182 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1183 changes.
1184 (tdesc_get_features_xml): Likewise.
1185 (tdesc_create_feature): Likewise.
1186
5cd3e386
AH
11872018-03-26 Alan Hayward <alan.hayward@arm.com>
1188
1189 * regcache.c (find_register_by_number): Return a ref.
1190 (find_regno): Use references.
1191 (register_size): Likewise.
1192 (register_data): Likewise.
1193 * tdesc.c (target_desc::~target_desc): Remove free calls.
1194 (target_desc::operator==): Use std::vector compare.
1195 (init_target_desc): Use reference.
1196 (tdesc_create_reg): Use reg constructors.
1197 * tdesc.h (struct target_desc): Replace pointer with object.
1198
dff7492c
AH
11992018-03-23 Alan Hayward <alan.hayward@arm.com>
1200
1201 * regcache.c (find_register_by_number): Make static.
1202 (find_regno): Use find_register_by_number
1203 * regcache.h (struct reg): Remove declaration.
1204
d80e5242
AH
12052018-03-23 Alan Hayward <alan.hayward@arm.com>
1206
1207 * tdesc.c (target_desc::~target_desc): Move to here.
1208 (target_desc::operator==): Likewise.
1209 * tdesc.h (target_desc::~target_desc): Move from here.
1210 (target_desc::operator==): Likewise.
1211
f69c5afb
AA
12122018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1213
1214 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1215
ce29f843
AA
12162018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1217
1218 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1219 S390_TDESC_GS.
1220 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1221 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1222 and init_registers_s390_gs_linux64.
1223
c49bd90b
AA
12242018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1225
1226 * linux-s390-low.c (s390_fill_gs): Remove function.
1227 (s390_fill_gsbc): Remove function.
1228 (s390_regsets): Set fill functions for the guarded storage regsets
1229 to NULL.
1230
7edb9bd3
AA
12312018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1232
1233 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1234 the word size. Add comment.
1235 (s390_get_wordsize): New function.
1236 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1237 pswm with it. Instead, use s390_get_wordsize to determine the
1238 word size first and derive the correct tdesc from that directly.
1239
39be3c7e
SM
12402018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1241
1242 * Makefile.in: Include silent-rules.mk.
1243 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1244 (COMPILE): Add ECHO_CXX.
1245 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1246 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1247 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1248 (version-generated.c): Add ECHO_GEN.
1249 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1250 (IPAGENT_COMPILE): Add ECHO_CXX.
1251 (%-generated.c): Add ECHO_REGDAT.
1252
3ae9ce5d
TT
12532018-03-14 Tom Tromey <tom@tromey.com>
1254
1255 PR cli/14977:
1256 * ax.c (ax_printf): Special case for NULL.
1257
e6a58aa8
SM
12582018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1259
1260 * linux-low.c (linux_qxfer_libraries_svr4): Use
1261 xml_escape_text_append.
1262
f6e8a41e
SM
12632018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1264
1265 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1266
b9671caf
SM
12672018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1268
1269 * server.c (handle_general_set): Remove unnecessary xstrdup.
1270
e80aaf61
SM
12712018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1272
1273 * server.c (parse_debug_format_options): Adjust to
1274 delim_string_to_char_ptr_vec changes.
1275 * thread-db.c (thread_db_load_search): Adjust to
1276 dirnames_to_char_ptr_vec changes.
1277
b1223e78
MM
12782018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1279
1280 * target.h (target_enable_btrace, target_disable_btrace)
1281 (target_read_btrace, target_read_btrace_conf): Turn macro into
1282 inline function. Throw error if target method is not defined.
1283 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1284 check for btrace target method. Be prepared to handle exceptions
1285 from btrace target methods.
1286
81561546
SDJ
12872018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1288
1289 * server.c (captured_main): Change order of error message printed
1290 when the current working directory cannot be found.
1291
25e3c82c
SDJ
12922018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1293
1294 * server.c: Include "filenames.h" and "pathstuff.h".
1295 (program_name): Delete variable.
1296 (program_path): New anonymous class.
1297 (get_exec_wrapper): Use "program_path" instead of
1298 "program_name".
1299 (handle_v_run): Likewise.
1300 (captured_main): Likewise.
1301 (process_serial_event): Likewise.
1302
b4987c95
SDJ
13032018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1304
1305 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1306 (OBJS): Add "pathstuff.o".
1307 * server.c (current_directory): New global variable.
1308 (captured_main): Initialize "current_directory".
1309
f46cd62a
AH
13102018-02-26 Alan Hayward <alan.hayward@arm.com>
1311
1312 * tdesc.c: Use common/tdesc.h.
1313 * tdesc.h: Likewise.
1314
a543c5ca
AH
13152018-02-20 Alan Hayward <alan.hayward@arm.com>
1316 Simon Marchi <simon.marchi@ericsson.com>
1317
1318 * Makefile.in: Switch order of make rules.
1319
b5884fa7
AH
13202018-02-19 Alan Hayward <alan.hayward@arm.com>
1321
1322 * Makefile.in: Add common directory in build.
1323 * configure.ac: Add common reference.
1324 * configure: Regenerate.
1325
de6242d3
MM
13262018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1327
1328 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1329 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1330 * spu-low.c (spu_target_ops): Likewise.
1331 * win32-low.c (win32_target_ops): Likewise.
1332 * server.c (supported_btrace_packets): Report packets unconditionally.
1333 * target.h (target_ops) <supports_btrace>: Remove.
1334 (target_supports_btrace): Remove.
1335
9ee23a85
MM
13362018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1337
1338 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1339 (handle_btrace_disable): Change return type to void. Use exceptions
1340 to report errors.
1341 (handle_btrace_general_set): Catch exception and copy message to
1342 return message.
1343
8ce47547
TT
13442018-02-08 Tom Tromey <tom@tromey.com>
1345
1346 * linux-low.c (install_software_single_step_breakpoints): Use
1347 make_scoped_restore.
1348 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1349 (do_restore_current_thread_cleanup): Remove.
1350 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1351 declare.
1352
45dd3607
TT
13532018-02-08 Tom Tromey <tom@tromey.com>
1354
1355 * mem-break.c (set_raw_breakpoint_at): Use
1356 gdb::unique_xmalloc_ptr.
1357
e671cd59
PA
13582018-01-30 Pedro Alves <palves@redhat.com>
1359
1360 PR gdb/13211
1361 * target.c (target_terminal::terminal_state): Rename to ...
1362 (target_terminal::m_terminal_state): ... this.
1363
a0aad537
JC
13642018-01-19 James Clarke <jrtc27@jrtc27.com>
1365
1366 * linux-low.c (handle_extended_wait): Surround call to
1367 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1368
4d9b86e1
SM
13692018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1370
1371 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1372 linux_ptrace_attach_fail_reason_string now returning an
1373 std::string.
1374 (linux_attach): Likewise.
1375 * thread-db.c (attach_thread): Likewise.
1376
f517c180
EA
13772018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1378
1379 PR gdb/21559
1380 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1381 checking for fs_base/gs_base fields in struct user_regs_struct.
1382 * configure: Regenerate.
1383
9a70f35c
YQ
13842018-01-16 Yao Qi <yao.qi@linaro.org>
1385
1386 PR gdb/18749
1387 * linux-low.c (fetch_register): Call supply_register instead of
1388 error.
1389
605fd3c6
YQ
13902018-01-08 Yao Qi <yao.qi@linaro.org>
1391 Simon Marchi <simon.marchi@ericsson.com>
1392
1393 * Makefile.in (OBS): Remove selftest.o.
1394 * configure.ac: Set srv_selftest_objs if $development is true.
1395 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1396 * configure: Re-generated.
1397 * server.c (captured_main): Wrap variable selftest_filter with
1398 GDB_SELF_TEST.
1399
2cc05030
SM
14002018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1401
1402 * server.c (parse_debug_format_options): Return std::string.
1403 (handle_monitor_command, captured_main): Adjust.
1404
e379cee6
PA
14052018-01-05 Pedro Alves <palves@redhat.com>
1406
1407 PR gdb/18653
1408 * server.c (captured_main): Pass quiet=false to
1409 save_original_signals_state.
1410
82e1e79a
JB
14112018-01-01 Joel Brobecker <brobecker@adacore.com>
1412
1413 * gdbreplay.c (gdbreplay_version): Update copyright year in
1414 version message.
1415 * server.c (gdbserver_version): Likewise.
1416
8e481c3b
TT
14172017-12-08 Tom Tromey <tom@tromey.com>
1418
1419 * ax.c (ax_printf): Update.
1420
a8806230
YQ
14212017-12-07 Yao Qi <yao.qi@linaro.org>
1422
1423 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1424 aarch64_linux_read_description.
1425 * linux-amd64-ipa.c (idx2mask): New array.
1426 (get_ipa_tdesc): Move idx2mask out.
1427 (initialize_low_tracepoint): Initialize target descriptions.
1428 * linux-i386-ipa.c (idx2mask): New array.
1429 (get_ipa_tdesc): Move idx2mask out.
1430 (initialize_low_tracepoint): Initialize target descriptions.
1431
d4a0e8b5
SM
14322017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1433
1434 * tdesc.c (struct tdesc_type): Change return type.
1435 (tdesc_add_flag): Change parameter type.
1436 (tdesc_add_bitfield): Likewise.
1437 (tdesc_add_field): Likewise.
1438 (tdesc_set_struct_size): Likewise.
1439
798a7429
SM
14402017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1441
1442 * regcache.c (registers_to_string): Remove unused variable.
1443
c0e15c9b
SM
14442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1445
1446 * inferiors.c (for_each_inferior_with_data): Remove.
1447 * inferiors.h (for_each_inferior_with_data): Remove.
1448 * server.c (handle_qxfer_threads_worker): Change parameter type.
1449 (handle_qxfer_threads_proper): Use for_each_thread.
1450
f0045347
SM
14512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1452
1453 * inferiors.c (for_each_inferior): Remove.
1454 (clear_inferiors): Use for_each_thread.
1455 * inferiors.h (for_each_inferior): Remove.
1456 * linux-low.c (linux_wait_for_event_filtered): Use
1457 for_each_thread.
1458 (linux_stabilize_threads): Likewise.
1459 * regcache.c (regcache_release): Likewise.
1460 * server.c (gdb_wants_all_threads_stopped): Likewise.
1461 (clear_pending_status_callback): Remove.
1462 (handle_status): Use for_each_thread.
1463 (captured_main): Likewise.
1464 * win32-low.c (child_init_thread_list): Likewise.
1465 (win32_clear_inferiors): Likewise.
1466 (fake_breakpoint_event): Likewise.
1467
9521758b
SM
14682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1469
1470 * inferiors.h (find_inferior): Remove.
1471 * inferiors.c (find_inferior): Remove.
1472
8f86d7aa
SM
14732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1474
1475 * linux-low.c (resume_status_pending_p): Update comment.
1476 (need_step_over_p): Update comment.
1477
e2b44075
SM
14782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1479
1480 * linux-low.c (proceed_one_lwp): Return void, change parameter
1481 type.
1482 (unsuspend_and_proceed_one_lwp): Likewise.
1483 (proceed_all_lwps): Use for_each_thread.
1484 (unstop_all_lwps): Likewise.
1485
c80825ff
SM
14862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1487
1488 * linux-low.c (linux_resume_one_thread): Return void, take
1489 parameter directly.
1490 (linux_resume): Use for_each_thread.
1491
df3e4dbe
SM
14922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1493
1494 * linux-low.c (send_sigstop_callback): Return void, change
1495 parameter type. Rename to...
1496 (send_sigstop): ... this.
1497 (suspend_and_send_sigstop_callback): Return void, change parameter
1498 type. Rename to...
1499 (suspend_and_send_sigstop): ... this.
1500 (stop_all_lwps): Use for_each_thread.
1501
5a6b0a41
SM
15022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1503
1504 * linux-low.c (lwp_running): Return bool, remove unused
1505 argument.
1506 (linux_stabilize_threads): Use find_thread.
1507
39a64da5
SM
15082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1509
1510 * linux-low.c (select_singlestep_lwp_callback): Remove.
1511 (count_events_callback): Remove.
1512 (select_event_lwp_callback): Remove.
1513 (select_event_lwp): Use find_thread/for_each_thread.
1514
a1385b7b
SM
15152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1516
1517 * linux-low.c (not_stopped_callback): Return bool, take filter
1518 argument directly.
1519 (linux_wait_for_event_filtered): Use find_thread.
1520 (linux_wait_1): Likewise.
1521
454296a2
SM
15222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1523
1524 * linux-low.c (same_lwp): Remove.
1525 (find_lwp_pid): Use find_thread.
1526
6b2a85da
SM
15272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1528
1529 * linux-low.c (delete_lwp_callback): Remove.
1530 (linux_mourn): Use for_each_thread.
1531
798a38e8
SM
15322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1533
1534 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1535 args parameter, don't check for pid.
1536 (linux_detach): Use for_each_thread.
1537
e4eb0dec
SM
15382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1539
1540 * linux-low.c (struct counter): Remove.
1541 (second_thread_of_pid_p): Remove.
1542 (last_thread_of_process_p): Use find_thread.
1543
83e1b6c1
SM
15442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1545
1546 * inferiors.c (find_inferior_in_random): Remove.
1547 * inferiors.h (find_inferior_in_random): Remove.
1548 * linux-low.c (status_pending_p_callback): Return bool, accept
1549 parameter ptid directly.
1550 (linux_wait_for_event_filtered): Use find_thread_in_random.
1551 (linux_wait_1): Likewise.
1552
8dc7b443
SM
15532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1554
1555 * inferiors.c (find_inferior_id): Remove.
1556 (find_thread_ptid): Move implemention from find_inferior_id to
1557 here.
1558 * inferiors.h (find_inferior_id): Remove.
1559 * server.c (handle_status): Use find_thread_ptid.
1560 (process_serial_event): Likewise.
1561 * thread-db.c (find_one_thread): Likewise.
1562 (thread_db_thread_handle): Likewise.
1563 * win32-low.c (thread_rec): Likewise.
1564 (child_delete_thread): Likewise.
1565 (win32_thread_alive): Likewise.
1566 (get_child_debug_event): Likewise.
1567
da25033c
SM
15682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1569
1570 * linux-mips-low.c (update_watch_registers_callback): Return
1571 void, remove pid_p parameter, don't check for pid.
1572 (mips_insert_point, mips_remove_point): Use for_each_thread.
1573
c91bb56b
SM
15742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1575
1576 * lynx.low (lynx_delete_thread_callback): Remove.
1577 (lynx_mourn): Use for_each_thread.
1578
634a3254
SM
15792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1580
1581 * regcache.c (regcache_invalidate_one): Remove.
1582 (regcache_invalidate_pid): use for_each_thread.
1583
41272101
TT
15842017-11-26 Tom Tromey <tom@tromey.com>
1585
1586 * linux-low.c (linux_create_inferior): Update.
1587
f5291a6f
UW
15882017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1589
1590 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1591
6654d750
AH
15922017-11-24 Alan Hayward <alan.hayward@arm.com>
1593
1594 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1595 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1596 * linux-aarch64-tdesc-selftest.c: New file.
1597 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1598
15992017-11-24 Alan Hayward <alan.hayward@arm.com>
1600
1601 * configure.srv: Add new file.
1602 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1603 * linux-aarch64-tdesc-selftest.c: New file.
1604 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1605
49bdb7ee
AH
16062017-11-24 Alan Hayward <alan.hayward@arm.com>
1607
1608 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1609 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1610 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1611
d6d7ce56
AH
16122017-11-24 Alan Hayward <alan.hayward@arm.com>
1613
1614 * configure.srv: Add new files.
1615 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1616 aarch64_linux_read_description.
1617 * linux-aarch64-low.c (aarch64_linux_read_description):
1618 Merge with aarch64_arch_setup.
1619 (aarch64_arch_setup): Call aarch64_linux_read_description.
1620 * linux-aarch64-tdesc.c: New file.
1621 * linux-aarch64-tdesc.h: New file.
1622
506fe5f4
YQ
16232017-11-24 Yao Qi <yao.qi@linaro.org>
1624
1625 * configure.srv: Set $srv_regobj for tic6x-linux.
1626 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1627 (tic6x_read_description): Move some code to tic6x_arch_setup.
1628 (tic6x_tdesc_test): New function.
1629 (initialize_low_arch): Call selftests::register_test.
1630
29f9a567
YQ
16312017-11-22 Yao Qi <yao.qi@linaro.org>
1632
1633 * remote-utils.c (prepare_resume_reply): Use memcpy.
1634
578290ec
SM
16352017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1636
1637 * linux-low.c (kill_one_lwp_callback): Return void, take
1638 argument directly, don't filter on pid.
1639 (linux_kill): Use for_each_thread.
1640
eca55aec
SM
16412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1642
1643 * linux-low.c (need_step_over_p): Return bool, remove dummy
1644 argument.
1645 (linux_resume, proceed_all_lwps): Use find_thread.
1646
25c28b4d
SM
16472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1648
1649 * linux-low.c (resume_status_pending_p): Return bool, remove
1650 flag_p argument.
1651 (linux_resume): Use find_thread.
1652
5fdda392
SM
16532017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1654
1655 * linux-low.c (struct thread_resume_array): Remove.
1656 (linux_set_resume_request): Return void, take arguments
1657 directly.
1658 (linux_resume): Use for_each_thread.
1659
fcb056a5
SM
16602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1661
1662 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1663 return bool, remove data argument.
1664 (linux_stabilize_threads): Use find_thread.
1665
139720c5
SM
16662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1667
1668 * linux-low.c (unsuspend_one_lwp): Remove.
1669 (unsuspend_all_lwps): Use for_each_thread, inline code from
1670 unsuspend_one_lwp.
1671
6d1e5673
SM
16722017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1673
1674 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1675 * linux-low.c (struct iterate_over_lwps_args): Remove.
1676 (iterate_over_lwps_filter): Remove.
1677 (iterate_over_lwps): Use find_thread.
1678
bbf550d5
SM
16792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1680
1681 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1682 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1683 code from reset_lwp_ptrace_options_callback.
1684
00192f77
SM
16852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1686
1687 * linux-arm-low.c (struct update_registers_data): Remove.
1688 (update_registers_callback): Return void, take arguments
1689 directly, don't check thread's pid.
1690 (arm_insert_point, arm_remove_point): Use for_each_thread.
1691
2bee2b6c
SM
16922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1693
1694 * win32-low.c (continue_one_thread): Return void, take argument
1695 directly.
1696 (child_continue): Use for_each_thread.
1697
0b360f19
SM
16982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1699
1700 * win32-i386-low.c (update_debug_registers_callback): Rename
1701 to ...
1702 (update_debug_registers): ... this, return void, remove pid_p arg.
1703 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1704
f27866ba
SM
17052017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1706
1707 * inferiors.h (struct process_info): Add constructor, initialize
1708 fields..
1709 <syscalls_to_catch>: Change type to std::vector<int>.
1710 * inferiors.c (add_process): Allocate process_info with new.
1711 (remove_process): Free process_info with delete.
1712 * linux-low.c (handle_extended_wait): Adjust.
1713 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1714 * server.c (handle_general_set): Adjust.
1715
e849ea89
PA
17162017-11-16 Pedro Alves <palves@redhat.com>
1717
1718 * remote-utils.c (remote_close): Block SIGIO signals instead of
1719 uninstalling the SIGIO handler.
1720
1d0aa65c
AH
17212017-11-16 Alan Hayward <alan.hayward@arm.com>
1722
1723 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1724
3491a34c
YQ
17252017-11-16 Yao Qi <yao.qi@linaro.org>
1726
1727 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1728 (tic6x_store_gregset): Likewise.
1729 (tic6x_usrregs_info): Move it up.
1730
a602f924
AH
17312017-11-15 Alan Hayward <alan.hayward@arm.com>
1732
1733 * Makefile.in: Update arch rules.
1734 * configure.srv: Explicitly mark arch/ files.
1735
5616b6c3
AS
17362017-11-13 Andreas Schwab <schwab@suse.de>
1737
1738 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1739 function.
1740 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1741
d1928160
PA
17422017-11-06 Pedro Alves <palves@redhat.com>
1743
1744 * config.in, configure: Regenerate.
1745
bac608e7
SM
17462017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1747
1748 * target.c (struct thread_search): Remove.
1749 (thread_search_callback): Remove.
1750 (prepare_to_access_memory): Use for_each_thread instead of
1751 find_inferior. Inline code from thread_search_callback.
1752
eaddb425
SM
17532017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1754
1755 * server.c (struct visit_actioned_threads_data): Remove.
1756 (visit_actioned_threads): Change prototype to take arguments
1757 directly.
1758 (resume): Use find_thread instead of find_inferior.
1759
99078d34
SM
17602017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1761
1762 * server.c (queue_stop_reply_callback): Change prototype, return
1763 void.
1764 (find_status_pending_thread_callback): Remove.
1765 (handle_status): Replace find_inferior with find_thread and
1766 for_each_thread.
1767
cc628f3d
AH
17682017-10-25 Alan Hayward <alan.hayward@arm.com>
1769
1770 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1771 with REGNO.
1772 (aarch64_store_gregset): Likewise.
1773 (aarch64_fill_fpregset): Likewise.
1774 (aarch64_store_fpregset): Likewise.
1775
4d3bb80e
SM
17762017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1777
1778 * gdbthread.h (find_thread, for_each_thread): New functions.
1779 * inferiors.c (thread_of_pid): Remove.
1780 (find_any_thread_of_pid): Use find_thread.
1781 * linux-low.c (num_lwps): Use for_each_thread.
1782
7a7cdfa0
YQ
17832017-10-17 Yao Qi <yao.qi@linaro.org>
1784
1785 * Makefile.in: Remove one rule.
1786 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1787
e675d170
YQ
17882017-10-17 Yao Qi <yao.qi@linaro.org>
1789
1790 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1791 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1792
7eb4e0f9
YQ
17932017-10-17 Yao Qi <yao.qi@linaro.org>
1794
1795 * configure.srv: Rename arm.o with arch/arm.o.
1796
60d6cfc9
YQ
17972017-10-17 Yao Qi <yao.qi@linaro.org>
1798
1799 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1800 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1801 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1802 (arch-i386.o, arch-amd64.o): Remove rules.
1803 (arch/%.o): New rule.
1804 Update POSTCOMPILE and COMPILE.pre.
1805 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1806 * configure: Re-generated.
1807 * configure.srv: Replace arch-i386.o with arch/i386.o.
1808 Replace arch-amd64.o with arch/amd64.o.
1809
5bfda255
YQ
18102017-10-16 Yao Qi <yao.qi@linaro.org>
1811
1812 * configure: Regenerated.
1813
9c80ecd6
SM
18142017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1815
1816 * inferiors.h: (struct inferior_list): Remove.
1817 (struct inferior_list_entry); Remove.
1818 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1819 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1820 get_first_inferior): Remove.
1821 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1822 find_inferior_id, find_inferior_in_random): Change signature.
1823 * inferiors.c (all_threads): Change type to
1824 std::list<thread_info *>.
1825 (get_thread): Remove macro.
1826 (find_inferior, find_inferior_id): Change signature, implement
1827 using find_thread.
1828 (find_inferior_in_random): Change signature, implement using
1829 find_thread_in_random.
1830 (for_each_inferior, for_each_inferior_with_data): Change
1831 signature, implement using for_each_thread.
1832 (add_inferior_to_list, remove_inferior): Remove.
1833 (add_thread, get_first_thread, thread_of_pid,
1834 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1835 (get_first_inferior, one_inferior_p, clear_inferior_list):
1836 Remove.
1837 (clear_inferiors, get_thread_process): Update.
1838 * gdbthread.h: Include <list>.
1839 (struct thread_info) <entry>: Remove field.
1840 <id>: New field.
1841 (all_threads): Change type to std::list<thread_info *>.
1842 (get_first_inferior): Add doc.
1843 (find_thread, for_each_thread, find_thread_in_random): New
1844 functions.
1845 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1846 * linux-arm-low.c (update_registers_callback): Update.
1847 * linux-low.c (second_thread_of_pid_p): Update.
1848 (kill_one_lwp_callback, linux_detach_lwp_callback,
1849 delete_lwp_callback, status_pending_p_callback, same_lwp,
1850 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1851 iterate_over_lwps, not_stopped_callback,
1852 resume_stopped_resumed_lwps, count_events_callback,
1853 select_singlestep_lwp_callback, select_event_lwp_callback,
1854 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1855 suspend_and_send_sigstop_callback, wait_for_sigstop,
1856 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1857 lwp_running, linux_set_resume_request, resume_status_pending_p,
1858 need_step_over_p, start_step_over, linux_resume_one_thread,
1859 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1860 reset_lwp_ptrace_options_callback): Update.
1861 * linux-mips-low.c (update_watch_registers_callback): Update.
1862 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1863 Update.
1864 (free_register_cache_thread_one): Remove.
1865 (regcache_release): Update.
1866 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1867 handle_qxfer_threads_worker): Update.
1868 (handle_query): Update, use list iterator.
1869 (visit_actioned_threads, handle_pending_status,
1870 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1871 clear_pending_status_callback, set_pending_status_callback,
1872 find_status_pending_thread_callback, handle_status,
1873 process_serial_event): Update.
1874 * target.c (thread_search_callback): Update.
1875 * thread-db.c (thread_db_get_tls_address): Update.
1876 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1877 Update.
1878 * win32-i386-low.c (update_debug_registers_callback): Update.
1879 * win32-low.c (delete_thread_info, child_delete_thread,
1880 continue_one_thread, suspend_one_thread,
1881 get_child_debug_event): Adjust.
1882
9179355e
SM
18832017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1884
1885 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1886 * inferiors.h: Include <list>.
1887 (struct process_info) <entry>: Remove field.
1888 <pid>: New field.
1889 (pid_of): Change macro to function.
1890 (ptid_of, lwpid_of): Remove macro.
1891 (all_processes): Change type to std::list<process_info *>.
1892 (ALL_PROCESSES): Remove macro.
1893 (for_each_process, find_process): New function.
1894 * inferiors.c (all_processes): Change type to
1895 std::list<process_info *>.
1896 (find_thread_process): Adjust.
1897 (add_process): Likewise.
1898 (remove_process): Likewise.
1899 (find_process_pid): Likewise.
1900 (get_first_process): Likewise.
1901 (started_inferior_callback): Remove.
1902 (have_started_inferiors_p): Adjust.
1903 (attached_inferior_callback): Remove.
1904 (have_attached_inferiors_p): Adjust.
1905 * linux-low.c (check_zombie_leaders): Likewise.
1906 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1907 (x86_linux_update_xmltarget): Adjust.
1908 * server.c (handle_query): Likewise.
1909 (gdb_reattached_process): Remove.
1910 (handle_status): Adjust.
1911 (kill_inferior_callback): Likewise.
1912 (detach_or_kill_inferior): Remove.
1913 (print_started_pid): Likewise.
1914 (print_attached_pid): Likewise.
1915 (detach_or_kill_for_exit): Update.
1916 (process_serial_event): Likewise.
1917 * linux-arm-low.c (arm_new_fork): Likewise.
1918
c9cb8905
SM
19192017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1920
1921 * dll.h: Include <list>.
1922 (struct dll_info): Add constructor.
1923 <entry>: Remove field.
1924 (all_dlls): Change type to std::list<dll_info>.
1925 * dll.c: Include <algorithm>.
1926 (get_dll): Remove macro.
1927 (all_dlls): Change type to std::list<dll_info *>.
1928 (free_one_dll): Remove.
1929 (match_dll): Likewise.
1930 (loaded_dll): Adjust.
1931 (unloaded_dll): Adjust to all_dlls type change, use
1932 std::find_if. Inline code from match_dll.
1933 (clear_dlls): Adjust to all_dlls type change.
1934 * server.c (emit_dll_description): Remove.
1935 (handle_qxfer_libraries): Adjust to all_dlls type change,
1936 integrate emit_dll_description's functionality.
1937
04ec7890
SM
19382017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1939
1940 * linux-low.h (struct linux_target_ops) <delete_process>: New
1941 field.
1942 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1943 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1944 (struct linux_target_ops): Add delete_process callback.
1945 * linux-arm-low.c (arm_delete_process): New.
1946 (struct linux_target_ops): Add delete_process callback.
1947 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1948 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1949 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1950 * linux-mips-low.c (mips_linux_delete_process): New.
1951 (struct linux_target_ops): Add delete_process callback.
1952 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1953 * linux-s390-low.c (struct linux_target_ops): Likewise.
1954 * linux-sh-low.c (struct linux_target_ops): Likewise.
1955 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1956 * linux-tile-low.c (struct linux_target_ops): Likewise.
1957 * linux-x86-low.c (x86_linux_delete_process): New.
1958 (struct linux_target_ops): Add delete_process callback.
1959 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1960
466eecee
SM
19612017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1962
1963 * linux-aarch64-low.c (the_low_target): Add thread delete
1964 callback.
1965 * linux-arm-low.c (arm_delete_thread): New function.
1966 (the_low_target): Add thread delete callback.
1967 * linux-bfin-low.c (the_low_target): Likewise.
1968 * linux-crisv32-low.c (the_low_target): Likewise.
1969 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1970 set.
1971 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1972 field.
1973 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1974 * linux-mips-low.c (mips_linux_delete_thread): New function.
1975 (the_low_target): Add thread delete callback.
1976 * linux-ppc-low.c (the_low_target): Likewise.
1977 * linux-s390-low.c (the_low_target): Likewise.
1978 * linux-sh-low.c (the_low_target): Likewise.
1979 * linux-tic6x-low.c (the_low_target): Likewise.
1980 * linux-tile-low.c (the_low_target): Likewise.
1981 * linux-x86-low.c (the_low_target): Likewise.
1982 * linux-xtensa-low.c (the_low_target): Likewise.
1983
b79f7801
YZ
19842017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1985
1986 * win32-low.c: Include "common-inferior.h".
1987
bc3b087d
SDJ
19882017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1989
1990 * inferiors.c (set_inferior_cwd): New function.
1991 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1992 (handle_query): Inform that QSetWorkingDir is supported.
1993 * win32-low.c (create_process): Pass the inferior's cwd to
1994 CreateProcess.
1995
d092c5a2
SDJ
19962017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1997
1998 * inferiors.c (current_inferior_cwd): New global variable.
1999 (get_inferior_cwd): New function.
2000 * inferiors.h (struct process_info) <cwd>: New field.
2001
7da0a886
SDJ
20022017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2003
2004 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2005 (OBS): Add gdb_tilde_expand.o.
2006
289a6840
SM
20072017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2008
2009 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2010 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2011
256642e8
PA
20122017-09-29 Pedro Alves <palves@redhat.com>
2013
2014 * ax.c (gdb_parse_agent_expr): Constify.
2015 * ax.h (gdb_parse_agent_expr): Constify.
2016 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2017 Constify.
2018 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2019 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2020 * remote-utils.h (read_ptid): Constify.
2021 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2022 (process_point_options, process_serial_event): Constify.
2023 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2024 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2025 (cmd_qtbuffer): Constify.
2026
5b9ca4d4
PA
20272017-09-29 Pedro Alves <palves@redhat.com>
2028
2029 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2030 fails.
2031
94c207e0
PA
20322017-09-29 Pedro Alves <palves@redhat.com>
2033
2034 * linux-low.c (handle_extended_wait): Pass parent thread instead
2035 of process to thread_db_notice_clone.
2036 * linux-low.h (thread_db_notice_clone): Replace parent process
2037 parameter with parent thread parameter.
2038 * thread-db.c (find_one_thread): Add comment.
2039 (thread_db_notice_clone): Replace parent process parameter with
2040 parent thread parameter. Temporarily switch to the parent thread.
2041
75352e28
SDJ
20422017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2043
2044 * gdbthread.h: Include "common-gdbthread.h".
2045 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2046 "if" when validating the ptid.
2047 * remote-utils.c: Include "gdbthread.h".
2048 (prepare_resume_reply): Use "switch_to_thread".
2049 * target.c (done_accessing_memory): Likewise.
2050
ad339634
AA
20512017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2052
2053 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2054 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2055 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2056 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2057 s390x-gs-linux64-ipa.o to ipa_obj.
2058 * linux-s390-low.c (HWCAP_S390_GS): New define.
2059 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2060 New functions.
2061 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2062 (s390_arch_setup): Check for guarded-storage support and choose
2063 appropriate tdesc.
2064 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2065 init_registers_s390x_gs_linux64.
2066 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2067 enum value.
2068 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2069 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2070
cc4d742f
SM
20712017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2072
2073 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2074
f6327dcb
KB
20752017-09-21 Kevin Buettner <kevinb@redhat.com>
2076
2077 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2078 (thread_db_thread_handle): Declare.
2079 * linux-low.c (linux_target_ops): Initialize thread_handle.
2080 * server.c (handle_qxfer_threads_worker): Add support for
2081 "handle" attribute.
2082 * target.h (struct target_ops): Add new function pointer,
2083 thread_handle.
2084 (target_thread_handle): Define.
2085 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2086 field in lwp.
2087 (thread_db_thread_handle): New function.
2088
86299109
KB
20892017-09-21 Kevin Buettner <kevinb@redhat.com>
2090
2091 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2092 * linux-low.h (thread_db_notice_clone): Declare.
2093 * thread-db.c (thread_db_notice_clone): New function.
2094
f557a88a
PA
20952017-09-21 Pedro Alves <palves@redhat.com>
2096
2097 * server.c (gdb_read_memory, handle_status, process_serial_event)
2098 (handle_serial_event, handle_target_event): Adjust to
2099 set_desired_thread prototype change.
2100 * target.c (set_desired_thread): Remove 'use_general' parameter
2101 and adjust.
2102 * target.h (set_desired_thread): Remove 'use_general' parameter.
2103
223ffa71
TT
21042017-09-20 Tom Tromey <tom@tromey.com>
2105
2106 * target.c (target_terminal::terminal_state): Define.
2107 (target_terminal::init): Rename from target_terminal_init.
2108 (target_terminal::inferior): Rename from
2109 target_terminal_inferior.
2110 (target_terminal::ours): Rename from target_terminal_ours.
2111 (target_terminal::ours_for_output, target_terminal::info): New.
2112
04fd3ba9
SM
21132017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2114
2115 * server.c (accumulate_file_name_length): Remove.
2116 (emit_dll_description): Adjust to std::string change.
2117 (handle_qxfer_libraries): Use std::string to hold document.
2118
5e187554
SM
21192017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2120
2121 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2122 return type of xml_escape_text.
2123 * server.c (emit_dll_description): Likewise.
2124
1526853e
SM
21252017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2126
2127 * server.c (captured_main): Accept argument for --selftest.
2128 Update run_tests call.
2129 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2130 when registering selftests.
2131
c4dfafab
SDJ
21322017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2133
2134 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2135 instead of "VEC" for "target_desc.reg_defs".
2136 (regcache_cpy): Likewise.
2137 (registers_to_string): Likewise.
2138 (registers_from_string): Likewise.
2139 (find_regno): Likewise.
2140 (supply_regblock): Likewise.
2141 (regcache_raw_read_unsigned): Likewise.
2142 * tdesc.c (init_target_desc): Likewise.
2143 (tdesc_create_reg): Likewise.
2144 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2145 (struct target_desc) <reg_defs>: Convert to "std::vector".
2146 (target_desc): Do not initialize "reg_defs".
2147 (~target_desc): Update code to use "std::vector" instead of "VEC"
2148 for "target_desc.reg_defs".
2149 (operator==): Likewise.
2150
124aceb4
SM
21512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2152
2153 * inferiors.h (thread_to_gdb_id): Remove.
2154 * inferiors.c (thread_to_gdb_id): Remove.
2155 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2156 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2157 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2158 Likewise.
2159 * nto-low.c (nto_fetch_registers, nto_store_registers,
2160 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2161
96cde54f
SM
21622017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2163
2164 * inferiors.h (gdb_id_to_thread_id): Remove.
2165 * inferiors.c (gdb_id_to_thread_id): Remove.
2166 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2167 removal. Move pid declaration closer to where it's used.
2168
e8ca139e
SM
21692017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2170
2171 * server.c (handle_detach): New function.
2172 (process_serial_event): Move code out, call handle_detach.
2173
f8a4e119
SM
21742017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2175
2176 * server.c (require_running): Rename to ...
2177 (require_running_or_return): ... this ...
2178 (require_running_or_break): ... and this.
2179 (handle_query, process_serial_event): Adjust.
2180
0eb0a407
SM
21812017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2182
2183 * linux-low.c (linux_set_resume_request): Remove unused
2184 variables.
2185
785922a5
SM
21862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2187
2188 * server.c (first_thread_of): Remove.
2189 (process_serial_event): Replace usage of first_thread_of with
2190 find_any_thread_of_pid.
2191 * tracepoint.c (same_process_p): Remove.
2192 (gdb_agent_about_to_close): Replace usage of same_process_p with
2193 find_any_thread_of_pid.
2194 * linux-x86-low.c (same_process_callback): Remove.
2195 (x86_arch_setup_process_callback): Replace usage of
2196 same_process_callback with find_any_thread_of_pid.
2197 * thread-db.c (any_thread_of): Remove.
2198 (switch_to_process): Replace usage of any_thread_of with
2199 find_any_thread_of_pid.
2200 * inferiors.c (thread_pid_matches_callback): Remove.
2201 (find_thread_process): Adjust to use find_any_thread_of_pid.
2202
a059f00c
SDJ
22032017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2204
2205 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2206 with "!VEC_empty".
a059f00c 2207
cc397f3a
SDJ
22082017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2209
2210 * linux-low.c (handle_extended_wait): Use
2211 "allocate_target_description" instead of "XNEW".
2212 * linux-x86-low.c (initialize_low_arch): Likewise.
2213
22916b07
YQ
22142017-09-05 Yao Qi <yao.qi@linaro.org>
2215
2216 * configure.srv (srv_i386_regobj): Remove.
2217 (srv_amd64_regobj): Remove.
2218 (srv_regobj): Set it to "" for x86 non-linux targets.
2219 * linux-x86-tdesc.c (i386_linux_read_description):
2220 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2221 (init_registers_i386): Remove the declaration.
2222 (tdesc_i386): Remove the declaration.
2223 (lynx_i386_arch_setup): Call i386_create_target_description.
2224 * nto-x86-low.c: Likewise.
2225 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2226 [!__x86_64__]: include arch/i386.h.
2227 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2228
38602d55
YQ
22292017-09-05 Yao Qi <yao.qi@linaro.org>
2230
2231 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2232 i386/amd64-XXX-linux from it.
2233
44b886ff
YQ
22342017-09-05 Yao Qi <yao.qi@linaro.org>
2235
2236 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2237 false.
2238 (ipa_amd64_linux_regobj): Remove.
2239 (ipa_x32_linux_regobj): Remove.
2240
b4570e4b
YQ
22412017-09-05 Yao Qi <yao.qi@linaro.org>
2242
2243 * Makefile.in (arch-amd64.o): New rule.
2244 * configure.srv: Append arch-amd64.o.
2245 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2246 (get_ipa_tdesc): Call amd64_linux_read_description.
2247 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2248 and init_registers_amd64_XXX.
2249 * linux-x86-low.c (x86_linux_read_description): Call
2250 amd64_linux_read_description.
2251 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2252 (initialize_low_arch): Don't call init_registers_x32_XXX and
2253 init_registers_amd64_XXX.
2254 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2255 and tdesc_amd64_XXX.
2256 [__x86_64__] (amd64_tdesc_test): New function.
2257 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2258 and init_registers_amd64_XXX.
2259 * linux-x86-tdesc.c: Include arch/amd64.h.
2260 (xcr0_to_tdesc_idx): New function.
2261 (i386_linux_read_description): New function.
2262 (amd64_get_ipa_tdesc_idx): New function.
2263 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2264 (amd64_get_ipa_tdesc): Declare.
2265
d1f28ea2
YQ
22662017-09-05 Yao Qi <yao.qi@linaro.org>
2267
2268 * configure.srv (srv_i386_linux_xmlfiles): Remove
2269 i386/i386-XXX-linux.xml from it.
2270
25a93583
YQ
22712017-09-05 Yao Qi <yao.qi@linaro.org>
2272
2273 * configure.srv: Set srv_i386_linux_regobj empty if $development
2274 is false.
2275 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2276 initialize_low_tdesc.
2277 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2278 with #if initialize_low_tdesc.
2279 * linux-x86-tdesc-selftest.c: New file.
2280 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2281
5f035c07
YQ
22822017-09-05 Yao Qi <yao.qi@linaro.org>
2283
2284 * Makefile.in (arch-i386.o): New rule.
2285 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2286 (x86_64-*-linux*): Likewise.
2287 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2288 include arch/i386.h.
2289 (i386_linux_read_description): Remove code and call
2290 i386_create_target_description.
2291 * tdesc.c (allocate_target_description): New function.
2292 * tdesc.h (set_tdesc_architecture): Remove declaration.
2293 (set_tdesc_osabi): Likewise.
2294
0abe8a89
YQ
22952017-09-05 Yao Qi <yao.qi@linaro.org>
2296
2297 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2298 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2299 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2300 .xmltarget.
2301 * server.c (get_features_xml): Call tdesc_get_features_xml.
2302 * tdesc.c (set_tdesc_architecture): New function.
2303 (set_tdesc_osabi): New function.
2304 (tdesc_get_features_xml): New function.
2305 (tdesc_create_feature): Add an argument.
2306 * tdesc.h (struct target_desc) <features>: New field.
2307 <arch, osabi>: New field.
2308 (~target_desc): xfree features, arch, and osabi.
2309 (target_desc::oerator==): Don't compare .xmltarget.
2310 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2311 (set_tdesc_osabi): Likewise.
2312 (tdesc_get_features_xml): Likewise.
2313
0a188386
YQ
23142017-09-05 Yao Qi <yao.qi@linaro.org>
2315
2316 * linux-x86-tdesc.c: Include selftest.h.
2317 (i386_tdesc_test): New function.
2318 (initialize_low_tdesc): Call selftests::register_test.
2319 * tdesc.h: Include regdef.h.
2320 (target_desc): Override operator == and !=.
2321
f49ff000
YQ
23222017-09-05 Yao Qi <yao.qi@linaro.org>
2323
2324 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2325 (ipa_obj): Likewise.
2326 * linux-i386-ipa.c: Include common/x86-xstate.h
2327 (get_ipa_tdesc): Call i386_linux_read_description.
2328 (initialize_low_tracepoint): Don't call init_registers_XXX
2329 functions, call initialize_low_tdesc instead.
2330 * linux-x86-low.c (x86_linux_read_description): Call
2331 i386_linux_read_description.
2332 (initialize_low_arch): Don't call init_registers_i386_XXX
2333 functions, call initialize_low_tdesc.
2334 * linux-x86-tdesc.c: New file.
2335 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2336 (i386_get_ipa_tdesc_idx): Declare.
2337 (i386_get_ipa_tdesc): Declare.
2338 (initialize_low_tdesc): Declare.
2339
2b68ef2f
YQ
23402017-09-05 Yao Qi <yao.qi@linaro.org>
2341
2342 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2343 instead of 0.
2344
f7000548
YQ
23452017-09-05 Yao Qi <yao.qi@linaro.org>
2346
2347 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2348 * regcache.c (get_thread_regcache): Use VEC_length.
2349 (init_register_cache): Likewise.
2350 (regcache_cpy): Likewise.
2351 (registers_to_string): Iterate reg_defs via VEC_iterate.
2352 (find_regno): Likewise.
2353 (find_register_by_number): Use VEC_index.
2354 (register_size): Call find_register_by_number.
2355 (register_data): Call find_register_by_number.
2356 (supply_regblock): Use VEC_length.
2357 (regcache_raw_read_unsigned): Likewise.
2358 * tdesc.c (init_target_desc): Iterate reg_defs via
2359 VEC_iterate.
2360 (default_description): Update initializer.
2361 (copy_target_description): Don't update field num_registers.
2362 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2363 <num_registers>: Remove.
2364
50a421ac
SM
23652017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2366
2367 * Makefile.in (.SECONDARY): Define target.
2368
23fdd69e
SM
23692017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2370
2371 * linux-low.c (linux_wait_1): Adjust.
2372 * server.c (queue_stop_reply_callback): Adjust.
2373
0a2dde4a
SDJ
23742017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2375
2376 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2377 QEnvironmentUnset and QEnvironmentReset packets.
2378 (handle_query): Inform remote that QEnvironmentHexEncoded,
2379 QEnvironmentUnset and QEnvironmentReset are supported.
2380
6afd337d
SM
23812017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2382
2383 * inferiors.h (inferior_target_data): Rename to ...
2384 (thread_target_data): ... this.
2385 (inferior_regcache_data): Rename to ...
2386 (thread_regcache_data): ... this.
2387 (set_inferior_regcache_data): Rename to ...
2388 (set_thread_regcache_data): ... this.
2389 * inferiors.c (inferior_target_data): Rename to ...
2390 (thread_target_data): ... this.
2391 (inferior_regcache_data): Rename to ...
2392 (thread_regcache_data): ... this.
2393 (set_inferior_regcache_data): Rename to ...
2394 (set_thread_regcache_data): ... this.
2395 (free_one_thread): Update.
2396 * linux-low.h (get_thread_lwp): Update.
2397 * regcache.c (get_thread_regcache): Update.
2398 (regcache_invalidate_thread): Update.
2399 (free_register_cache_thread): Update.
2400 * win32-i386-low.c (update_debug_registers_callback): Update.
2401 (win32_get_current_dr): Update.
2402 * win32-low.c (thread_rec): Update.
2403 (delete_thread_info): Update.
2404 (continue_one_thread): Update.
2405 (suspend_one_thread): Update.
2406
a160cc46
SM
24072017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2408
2409 * inferiors.c (set_inferior_target_data): Remove.
2410 * inferiors.h (set_inferior_target_data): Remove.
2411
6d580b63
YQ
24122017-08-18 Yao Qi <yao.qi@linaro.org>
2413
2414 * Makefile.in (OBS): Add selftest.o.
2415 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2416 * configure, config.in: Re-generated.
2417 * server.c: Include common/sefltest.h.
2418 (captured_main): Handle option --selftest.
2419
f5a29eb0
YQ
24202017-08-09 Yao Qi <yao.qi@linaro.org>
2421
2422 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2423 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2424 i386-avx-mpx.o and i386-mmx.o.
2425 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2426 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2427 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2428 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2429 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2430 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2431 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2432 i386/amd64-avx-mpx.xml.
2433
57757c2f
YQ
24342017-08-09 Yao Qi <yao.qi@linaro.org>
2435
2436 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2437 and x32-avx-avx512.o.
2438 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2439 i386/x32-avx-avx512.xml.
2440
229d26fc
SM
24412017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2442
2443 * tracepoint.h (enum class fast_tpoint_collect_result): New
2444 enumeration.
2445 (fast_tracepoint_collecting): Change return type to
2446 fast_tpoint_collect_result.
2447 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2448 * linux-low.h: Include tracepoint.h.
2449 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2450 fast_tpoint_collect_result.
2451 * linux-low.c (handle_tracepoints): Adjust.
2452 (linux_fast_tracepoint_collecting): Change return type to
2453 fast_tpoint_collect_result.
2454 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2455 linux_wait_1, stuck_in_jump_pad_callback,
2456 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2457 proceed_one_lwp): Adjust to type change.
2458
2e1e43e1
YQ
24592017-07-10 Yao Qi <yao.qi@linaro.org>
2460
2461 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2462
adc764e7
YQ
24632017-06-29 Yao Qi <yao.qi@linaro.org>
2464
2465 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2466 Remove.
2467 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2468
a206891a
SM
24692017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2470
2471 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2472
9a6c7d9c
SDJ
24732017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2474
2475 * linux-low.c (linux_create_inferior): Adjust code to access the
2476 environment information via 'gdb_environ' class.
2477 * lynx-low.c (lynx_create_inferior): Likewise.
2478 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2479 (get_environ): Return a pointer to 'our_environ'.
2480 (captured_main): Initialize 'our_environ'.
2481 * server.h (get_environ): Adjust prototype.
2482 * spu-low.c (spu_create_inferior): Adjust code to access the
2483 environment information via 'gdb_environ' class.
2484
ae3e2ccf
SM
24852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2486
2487 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2488 usage of "register" keyword.
2489
3e019bdc
SM
24902017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2491
2492 * configure: Re-generate.
2493
8465943a
SM
24942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2495
2496 * configure: Re-generate.
2497
cf0dd6f0
SM
24982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2499
2500 * Makefile.in (COMPILE.pre): Add "-x c++".
2501
9845682b
SDJ
25022017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2503
2504 * fork-child.c: Conditionally include <signal.h>.
2505
aefd8b33
SDJ
25062017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2507
2508 * server.c (handle_general_set): Handle new packet
2509 "QStartupWithShell".
2510 (handle_query): Add "QStartupWithShell" to the list of supported
2511 packets.
2512 (gdbserver_usage): Add help text explaining the
2513 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2514 options.
2515 (captured_main): Recognize and act upon the presence of the new
2516 CLI options.
2517
2090129c
SDJ
25182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2519 Pedro Alves <palves@redhat.com>
2520
2521 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2522 * configure: Regenerate.
2523 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2524 "fork-inferior.o".
2525 (i[34567]86-*-lynxos*): Likewise.
2526 (spu*-*-*): Likewise.
2527 * fork-child.c: New file.
2528 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2529 and "environ.h".
2530 (linux_ptrace_fun): New function.
2531 (linux_create_inferior): Adjust function prototype to reflect
2532 change on "target.h". Adjust function code to use
2533 "fork_inferior".
2534 (linux_request_interrupt): Delete "signal_pid".
2535 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2536 (lynx_ptrace_fun): New function.
2537 (lynx_create_inferior): Adjust function prototype to reflect
2538 change on "target.h". Adjust function code to use
2539 "fork_inferior".
2540 * nto-low.c (nto_create_inferior): Adjust function prototype and
2541 code to reflect change on "target.h". Update comments.
2542 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2543 "common-terminal.h" and "environ.h".
2544 (terminal_fd): Moved to fork-child.c.
2545 (old_foreground_pgrp): Likewise.
2546 (restore_old_foreground_pgrp): Likewise.
2547 (last_status): Make it global.
2548 (last_ptid): Likewise.
2549 (our_environ): New variable.
2550 (startup_with_shell): Likewise.
2551 (program_name): Likewise.
2552 (program_argv): Rename to...
2553 (program_args): ...this.
2554 (wrapper_argv): New variable.
2555 (start_inferior): Delete function.
2556 (get_exec_wrapper): New function.
2557 (get_exec_file): Likewise.
2558 (get_environ): Likewise.
2559 (prefork_hook): Likewise.
2560 (post_fork_inferior): Likewise.
2561 (postfork_hook): Likewise.
2562 (postfork_child_hook): Likewise.
2563 (handle_v_run): Update code to deal with arguments coming from the
2564 remote host. Update calls from "start_inferior" to
2565 "create_inferior".
2566 (captured_main): Likewise. Initialize environment variable. Call
2567 "have_job_control".
2568 * server.h (post_fork_inferior): New prototype.
2569 (get_environ): Likewise.
2570 (last_status): Declare.
2571 (last_ptid): Likewise.
2572 (signal_pid): Likewise.
2573 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2574 (spu_ptrace_fun): New function.
2575 (spu_create_inferior): Adjust function prototype to reflect change
2576 on "target.h". Adjust function code to use "fork_inferior".
2577 * target.c (target_terminal_init): New function.
2578 (target_terminal_inferior): Likewise.
2579 (target_terminal_ours): Likewise.
2580 * target.h: Include <vector>.
2581 (struct target_ops) <create_inferior>: Update prototype.
2582 (create_inferior): Update macro.
2583 * utils.c (gdb_flush_out_err): New function.
2584 * win32-low.c (win32_create_inferior): Adjust function prototype
2585 and code to reflect change on "target.h".
2586
043a4934
SDJ
25872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2588
2589 * inferiors.c (switch_to_thread): New function.
2590
15652511
SDJ
25912017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2592
2593 * Makefile.in (SFILE): Add "common/job-control.c".
2594 (OBS): Add "job-control.o".
2595
21ea5acd
SDJ
25962017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2597
2598 * Makefile: Remove "@host_makefile_frag@".
2599
e13cb306
PA
26002017-05-05 Pedro Alves <palves@redhat.com>
2601
2602 * configure: Regenerate.
2603
c94fee56
SDJ
26042017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2605
2606 * configure: Regenerate.
2607
a0ff9e1a
SM
26082017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2609
2610 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2611 software_single_step change of return type to
2612 std::vector<CORE_ADDR>.
2613 * linux-low.c (install_software_single_step_breakpoints):
2614 Likewise.
2615 * linux-low.h (install_software_single_step_breakpoints):
2616 Likewise.
2617
be628ab8
SDJ
26182017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2619
2620 * remote-utils.c: Include "gdb_termios.h" instead of
2621 "terminal.h".
2622 * terminal.h: Delete file.
2623
7c5ded6a
SDJ
26242017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2625
2626 * server.c: Include <vector>.
2627 <program_argv, wrapper_argv>: Convert to std::vector.
2628 (start_inferior): Rewrite function to use C++.
2629 (handle_v_run): Likewise. Update code that calculates the argv
2630 based on the vRun packet; use C++.
2631 (captured_main): Likewise.
2632
436252de
SM
26332017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2634
2635 * server.c (handle_v_cont): Initialize thread_resume::thread
2636 with null_ptid.
2637
9bf2a700
PA
26382017-04-05 Pedro Alves <palves@redhat.com>
2639
2640 * configure: Regenerate.
2641
a121b7c1
PA
26422017-04-05 Pedro Alves <palves@redhat.com>
2643
2644 * gdbreplay.c (sync_error): Constify.
2645 * linux-x86-low.c (push_opcode): Constify.
2646
21c8a587
PA
26472017-04-05 Pedro Alves <palves@redhat.com>
2648
2649 * win32-low.c (get_child_debug_event)
2650 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2651 Report TARGET_WAITKIND_SPURIOUS instead.
2652
fb32b4f7
PA
26532017-04-05 Pedro Alves <palves@redhat.com>
2654
e79be6e5
SM
2655 * remote-utils.c (remote_prepare, remote_open): Constify.
2656 * remote-utils.h (remote_prepare, remote_open): Constify.
2657 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2658
65dd1e59
SM
26592017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2660
2661 * Makefile.in (clean): Clear .deps.
2662
8fa5b777
SM
26632017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2664
2665 * .gitignore: Remove generated files, replace with wildcard.
2666 * (clean): Replace removal of generated files with wildcard.
2667 (version.c): Replace with...
2668 (version-generated.c): ...this.
2669 (xml-builtin.c): Replace with...
2670 (xml-builtin-generated.c): ...this.
2671 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2672 (%.c: *regformats*): Replace with...
2673 (%-generated.c: *regformats*): ...this.
2674
a12e714b
MF
26752017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2676
2677 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2678 (xtensa_fill_gregset): Call collect_register_by_name for
2679 threadptr register.
2680 (xtensa_store_gregset): Call supply_register_by_name for
2681 threadptr register.
2682
1a09b50a
MF
26832017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2684
2685 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2686 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2687 (xtensa_store_gregset): Call supply_register for all registers in
2688 a0_regnum..a0_regnum + C0_NREGS range.
2689
1a01e7c6
SM
26902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2691
2692 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2693 (ax-ipa.o: ax.c): Remove.
2694 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2695 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2696 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2697 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2698 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2699
36bc18a8
SM
27002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2701
2702 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2703 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2704 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2705 (errors-ipa.o: ../common/errors.c): Remove.
2706 (format-ipa.o: ../common/format.c): Remove.
2707 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2708
a8ebe3d5
SM
27092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2710
2711 * Makefile.in (%-ipa.o: %.c): New rule.
2712 (tracepoint-ipa.o: tracepoint.c): Remove.
2713 (utils-ipa.o: utils.c): Remove.
2714 (remote-utils-ipa.o: remote-utils.c): Remove.
2715 (regcache-ipa.o: regcache.c): Remove.
2716 (i386-linux-ipa.o: i386-linux.c): Remove.
2717 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2718 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2719 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2720 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2721 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2722 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2723 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2724 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2725 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2726 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2727 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2728 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2729 (aarch64-ipa.o: aarch64.c): Remove.
2730 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2731 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2732 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2733 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2734 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2735 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2736 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2737 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2738 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2739 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2740 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2741 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2742 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2743 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2744 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2745 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2746 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2747 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2748 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2749 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2750 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2751 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2752 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2753 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2754 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2755 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2756 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2757 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2758 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2759 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2760 (tdesc-ipa.o: tdesc.c): Remove.
2761 (x32-linux-ipa.o: x32-linux.c): Remove.
2762 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2763 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2764
50cfacb7
SM
27652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2766
2767 * Makefile.in (%.o: ../arch/%.c): New rule.
2768 (arm.o: ../arch/arm.c): Remove.
2769 (arm-linux.o: ../arch/arm-linux.c): Remove.
2770 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2771 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2772
c5a22423
SM
27732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2774
2775 * Makefile.in (%.o: ../nat/%.c): New rule.
2776 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2777 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2778 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2779 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2780 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2781 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2782 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2783 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2784 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2785 (linux-personality.o: ../nat/linux-personality.c): Remove.
2786 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2787 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2788 (x86-linux.o: ../nat/x86-linux.c): Remove.
2789 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2790 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2791
6bda016b
SM
27922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2793
2794 * Makefile.in (%.o: ../common/%.c): New rule.
2795 (signals.o: ../common/signals.c): Remove.
2796 (print-utils.o: ../common/print-utils.c): Remove.
2797 (rsp-low.o: ../common/rsp-low.c): Remove.
2798 (common-utils.o: ../common/common-utils.c): Remove.
2799 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2800 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2801 (vec.o: ../common/vec.c): Remove.
2802 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2803 (xml-utils.o: ../common/xml-utils.c): Remove.
2804 (ptid.o: ../common/ptid.c): Remove.
2805 (buffer.o: ../common/buffer.c): Remove.
2806 (format.o: ../common/format.c): Remove.
2807 (filestuff.o: ../common/filestuff.c): Remove.
2808 (agent.o: ../common/agent.c): Remove.
2809 (errors.o: ../common/errors.c): Remove.
2810 (environ.o: ../common/environ.c): Remove.
2811 (common-debug.o: ../common/common-debug.c): Remove.
2812 (cleanups.o: ../common/cleanups.c): Remove.
2813 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2814 (fileio.o: ../common/fileio.c): Remove.
2815 (common-regcache.o: ../common/common-regcache.c): Remove.
2816 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2817 (new-op.o: ../common/new-op.c): Remove.
2818 (btrace-common.o: ../common/btrace-common.c): Remove.
2819
21122961
SM
28202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2821
2822 * Makefile.in (%.o: ../target/%.c): New rule.
2823 (waitstatus.o: ../target/waitstatus.c): Remove.
2824
c362e621
SM
28252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2826
2827 * Makefile.in
2828 (%.c: ../regformats/%.dat,
2829 (%.c: ../regformats/arm/%.dat,
2830 (%.c: ../regformats/i386/%.dat,
2831 (%.c: ../regformats/rs6000/%.dat): New rules.
2832 (aarch64.c): Remove.
2833 (reg-arm.c): Remove.
2834 (arm-with-iwmmxt.c): Remove.
2835 (arm-with-vfpv2.c): Remove.
2836 (arm-with-vfpv3.c): Remove.
2837 (arm-with-neon.c): Remove.
2838 (reg-bfin.c): Remove.
2839 (reg-cris.c): Remove.
2840 (reg-crisv32.c): Remove.
2841 (i386.c): Remove.
2842 (i386-linux.c): Remove.
2843 (i386-avx.c): Remove.
2844 (i386-avx-linux.c): Remove.
2845 (i386-avx-avx512.c): Remove.
2846 (i386-avx-avx512-linux.c): Remove.
2847 (i386-mpx.c): Remove.
2848 (i386-mpx-linux.c): Remove.
2849 (i386-avx-mpx-avx512-pku.c): Remove.
2850 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2851 (i386-avx-mpx.c): Remove.
2852 (i386-avx-mpx-linux.c): Remove.
2853 (i386-mmx.c): Remove.
2854 (i386-mmx-linux.c): Remove.
2855 (reg-ia64.c): Remove.
2856 (reg-m32r.c): Remove.
2857 (reg-m68k.c): Remove.
2858 (reg-cf.c): Remove.
2859 (mips-linux.c): Remove.
2860 (mips-dsp-linux.c): Remove.
2861 (mips64-linux.c): Remove.
2862 (mips64-dsp-linux.c): Remove.
2863 (nios2-linux.c): Remove.
2864 (powerpc-32.c): Remove.
2865 (powerpc-32l.c): Remove.
2866 (powerpc-altivec32l.c): Remove.
2867 (powerpc-cell32l.c): Remove.
2868 (powerpc-vsx32l.c): Remove.
2869 (powerpc-isa205-32l.c): Remove.
2870 (powerpc-isa205-altivec32l.c): Remove.
2871 (powerpc-isa205-vsx32l.c): Remove.
2872 (powerpc-e500l.c): Remove.
2873 (powerpc-64l.c): Remove.
2874 (powerpc-altivec64l.c): Remove.
2875 (powerpc-cell64l.c): Remove.
2876 (powerpc-vsx64l.c): Remove.
2877 (powerpc-isa205-64l.c): Remove.
2878 (powerpc-isa205-altivec64l.c): Remove.
2879 (powerpc-isa205-vsx64l.c): Remove.
2880 (s390-linux32.c): Remove.
2881 (s390-linux32v1.c): Remove.
2882 (s390-linux32v2.c): Remove.
2883 (s390-linux64.c): Remove.
2884 (s390-linux64v1.c): Remove.
2885 (s390-linux64v2.c): Remove.
2886 (s390-te-linux64.c): Remove.
2887 (s390-vx-linux64.c): Remove.
2888 (s390-tevx-linux64.c): Remove.
2889 (s390x-linux64.c): Remove.
2890 (s390x-linux64v1.c): Remove.
2891 (s390x-linux64v2.c): Remove.
2892 (s390x-te-linux64.c): Remove.
2893 (s390x-vx-linux64.c): Remove.
2894 (s390x-tevx-linux64.c): Remove.
2895 (tic6x-c64xp-linux.c): Remove.
2896 (tic6x-c64x-linux.c): Remove.
2897 (tic6x-c62x-linux.c): Remove.
2898 (reg-sh.c): Remove.
2899 (reg-sparc64.c): Remove.
2900 (reg-spu.c): Remove.
2901 (amd64.c): Remove.
2902 (amd64-linux.c): Remove.
2903 (amd64-avx.c): Remove.
2904 (amd64-avx-linux.c): Remove.
2905 (amd64-avx-avx512.c): Remove.
2906 (amd64-avx-avx512-linux.c): Remove.
2907 (amd64-mpx.c): Remove.
2908 (amd64-mpx-linux.c): Remove.
2909 (amd64-avx-mpx-avx512-pku.c): Remove.
2910 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2911 (amd64-avx-mpx.c): Remove.
2912 (amd64-avx-mpx-linux.c): Remove.
2913 (x32.c): Remove.
2914 (x32-linux.c): Remove.
2915 (x32-avx.c): Remove.
2916 (x32-avx-linux.c): Remove.
2917 (x32-avx-avx512.c): Remove.
2918 (x32-avx-avx512-linux.c): Remove.
2919 (reg-xtensa.c): Remove.
2920 (reg-tilegx.c): Remove.
2921 (reg-tilegx32.c): Remove.
2922
1672e0d9
SDJ
29232017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2924
2925 * Makefile.in (SFILES): Add "common/environ.c".
2926 (OBJS): Add "common/environ.h".
2927
239b6d10
WT
29282017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2929
2930 * configure.ac: Check if the fs_base and gs_base members of
2931 `struct user_regs_struct' exist.
2932 * config.in: Regenerated.
2933 * configure: Likewise.
2934
694b382c
AT
29352017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2936
2937 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2938 target_read_memory.
2939 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2940 (get_next_pcs_syscall_next_pc): Likewise.
2941
7dc53023
LM
29422016-12-23 Luis Machado <lgustavo@codesourcery.com>
2943
2944 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2945 * nto-x86-low.c: Likewise.
2946
ad02e4fe
SM
29472016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2948
2949 * Makefile.in: Include disable-implicit-rules.mk.
2950
dcb07cfa
PA
29512016-11-23 Pedro Alves <palves@redhat.com>
2952
2953 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2954 (debug_vprintf): Use std::chrono::steady_clock instead of
2955 gettimeofday. Use '.' instead of ':'.
2956 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2957 (get_timestamp): Use std::chrono::steady_clock instead of
2958 gettimeofday.
2959
8629c02c
SM
29602016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2961
2962 * Makefile.in: Fix whitespace formatting.
2963
b593ecca
SM
29642016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2965
2966 * Makefile.in (SFILES, OBS): Flatten list and order
2967 alphabetically.
2968
9986ba08
PA
29692016-11-23 Pedro Alves <palves@redhat.com>
2970
2971 * event-loop.c (handle_file_event): Use warning.
2972 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2973 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2974 Use warning.
2975
4eefa7bc
PA
29762016-11-23 Pedro Alves <palves@redhat.com>
2977
2978 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2979 output.
2980 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2981 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2982 debug_printf and debug_flush for debug output.
2983 * server.c (handle_general_set): Likewise.
2984 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2985 output.
2986
5443506e
SM
29872016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2988
2989 * Makefile.in (.c.o): Replace rule with ...
2990 (%.o: %.c): ... this one.
2991
3b165252
SM
29922016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2993
2994 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2995 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2996 make.
2997 * configure.ac: Remove checks for the make program.
2998 * configure: Re-generate.
2999
0bcda685
PA
30002016-10-28 Pedro Alves <palves@redhat.com>
3001
3002 * Makefile.in (CXX_DIALECT): Get from configure.
3003 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3004 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3005 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3006 * config.in: Regenerate.
3007 * configure: Regenerate.
3008
c3805894
YQ
30092016-10-27 Yao Qi <yao.qi@linaro.org>
3010
3011 * linux-low.c (linux_supports_range_stepping): Return true if
3012 can_software_single_step return true.
3013
89342618
YQ
30142016-10-27 Yao Qi <yao.qi@linaro.org>
3015
3016 * inferiors.c (find_inferior_in_random): New function.
3017 * inferiors.h (find_inferior_in_random): Declare.
3018 * linux-low.c (linux_wait_for_event_filtered): Call
3019 find_inferior_in_random instead of find_inferior.
3020
e3652c84
YQ
30212016-10-27 Yao Qi <yao.qi@linaro.org>
3022
3023 * linux-low.c (linux_wait_1): If single-step breakpoints are
3024 inserted, remove them.
3025
5a04c4cf
PA
30262016-10-26 Pedro Alves <palves@redhat.com>
3027
3028 * linux-low.c (handle_extended_wait): Link parent/child fork
3029 threads.
3030 (linux_wait_1): Unlink them.
3031 (linux_set_resume_request): Ignore resume requests for
3032 already-resumed and unhandled fork child threads.
3033 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3034 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3035 New functions.
3036 (handle_v_requests) <vCont>: Don't call require_running.
3037 * server.h (in_queued_stop_replies): New declaration.
3038
cb93dc7f
YQ
30392016-10-24 Yao Qi <yao.qi@linaro.org>
3040
3041 PR server/20733
3042 * linux-aarch64-low.c (append_insns): Cast the return value to
3043 'uint32_t *'.
3044
a1078bea
YQ
30452016-10-10 Yao Qi <yao.qi@linaro.org>
3046
3047 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3048
1fb77080
SDJ
30492016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3050
3051 * target.c (target_supports_multi_process): New function, moved
3052 from...
3053 * target.h (target_supports_multi_process): ... here. Remove
3054 macro.
3055
39b5a3b9
TT
30562016-10-05 Tom Tromey <tom@tromey.com>
3057
3058 PR remote/20655:
3059 * tracepoint.c (handle_tracepoint_bkpts): Check
3060 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3061
c1d0b70a
YQ
30622016-10-05 Yao Qi <yao.qi@linaro.org>
3063
3064 * configure.srv: Update the path of arm-*.xml files.
3065
0a69eedb
YQ
30662016-10-05 Terry Guo <terry.guo@arm.com>
3067 Yao Qi <yao.qi@linaro.org>
3068
3069 * Makefile.in: Adjust the path of rules.
3070 * configure.srv: Update the path of xml files.
3071 * regformats/arm-with-iwmmxt.dat: Regenerated.
3072 * regformats/arm-with-neon.dat: Likewise.
3073 * regformats/arm-with-vfpv2.dat: Likewise.
3074 * regformats/arm-with-vfpv3.dat Likewise.
3075
17e16485
YQ
30762016-09-30 Yao Qi <yao.qi@linaro.org>
3077
3078 PR gdbserver/20627
3079 * target.c (target_stop_and_wait): Don't call
3080 target_continue_no_signal, use resume_stop instead.
3081
edeeb602
YQ
30822016-09-26 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-low.c (linux_wait_1): Call debug_exit.
3085
503b1c39
PA
30862016-09-23 Pedro Alves <palves@redhat.com>
3087
3088 * Makefile.in (SFILES): Add common/new-op.c.
3089 (OBS): Add common/new-op.o.
3090 (new-op.o): New rule.
3091
74172ecf
SM
30922016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3093
3094 * .gitinore: Ignore more files.
3095
fc6cda2e
YQ
30962016-09-21 Yao Qi <yao.qi@linaro.org>
3097
3098 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3099 23.
3100
bc1e6c81
SDJ
31012016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3102
3103 * server.c (start_inferior): Call target_mourn_inferior instead of
3104 mourn_inferior; pass ptid_t argument to it.
3105 (resume): Likewise.
3106 (handle_target_event): Likewise.
3107 * target.c (target_mourn_inferior): New function.
3108 * target.h (mourn_inferior): Delete macro.
3109
0e00e962
AA
31102016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3111
3112 * linux-low.c (lwp_is_stepping): New function.
3113
1d8cb77d
CL
31142016-09-06 Carl Love <cel@us.ibm.com>
3115
3116 * server.c (start_inferior): Fixed comment, requested comment change
3117 didn't get updated correctly. Removed reference to ptrace () call as
3118 it is only true on Linux systems.
3119
7313bced
CL
31202016-09-06 Carl Love <cel@us.ibm.com>
3121
3122 * server.c (start_inferior): Do not call
3123 function target_post_create_inferior () if the
3124 inferior process has already exited.
3125
cf6de44d
PA
31262016-09-05 Pedro Alves <palves@redhat.com>
3127
3128 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3129 (COMPILE.pre, CC_LD): Use CXX directly.
3130 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3131 * acinclude.m4: Don't include build-with-cxx.m4.
3132 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3133 * configure: Regenerate.
3134
c1da6748
AT
31352016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3136
3137 PR gdb/19495
3138 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3139 call writing data to own_buf.
3140
f2b9e3df
SDJ
31412016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3142
3143 * target.c (mywait): Call target_wait instead of
3144 the_target->wait.
3145 (target_wait): New function.
3146
049a8570
SDJ
31472016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3148
3149 * server.c (start_inferior): New variable 'ptid'. Replace calls
3150 to the_target->resume by target_continue{,_no_signal}, depending
3151 on the case.
3152 * target.c (target_stop_and_wait): Call target_continue_no_signal
3153 instead of the_target->resume.
3154 (target_continue): New function.
3155
3aa5cfa0
AT
31562016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3157
3158 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3159
754653a7
AZ
31602016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3161
3162 PR server/20491
3163 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3164 ps_prochandle.
3165 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3166 * linux-arm-low.c (ps_get_thread_area): Likewise.
3167 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3168 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3169 * linux-mips-low.c (ps_get_thread_area): Likewise.
3170 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3171 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3172 * linux-x86-low.c (ps_get_thread_area): Likewise.
3173 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3174
ed036b40
PA
31752016-08-19 Pedro Alves <palves@redhat.com>
3176
3177 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3178
c8ef42ee
PA
31792016-08-19 Pedro Alves <palves@redhat.com>
3180
3181 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3182 comment. Use memcpy instead of casting through unsigned long.
3183
9c235a72
PA
31842016-08-19 Pedro Alves <palves@redhat.com>
3185
3186 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3187 allocating around 0x80000000.
3188
201506da
PA
31892016-08-19 Pedro Alves <palves@redhat.com>
3190
3191 PR gdb/20415
3192 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3193 (x32-avx512-linux-ipa.o): New rules.
3194 * configure.ac (x86_64-*-linux*): New x32 check.
3195 * configure.srv (ipa_x32_linux_regobj): New.
3196 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3197 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3198 descriptions.
3199 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3200 descriptions.
3201 * configure: Regenerate.
3202
f348d89a
PA
32032016-08-09 Pedro Alves <palves@redhat.com>
3204
3205 PR gdb/18653
3206 * Makefile.in (OBS): Add signals-state-save-restore.o.
3207 (signals-state-save-restore.o): New rule.
3208 * config.in: Regenerate.
3209 * configure: Regenerate.
3210 * linux-low.c: Include "signals-state-save-restore.h".
3211 (linux_create_inferior): Call
3212 restore_original_signals_state.
3213 * server.c: Include "dispositions-save-restore.h".
3214 (captured_main): Call save_original_signals_state.
3215
1baf5149
PA
32162016-08-05 Pedro Alves <palves@redhat.com>
3217
3218 * configure: Regenerate.
3219
fcd4a73d
YQ
32202016-08-04 Yao Qi <yao.qi@linaro.org>
3221
3222 * linux-low.c (regsets_fetch_inferior_registers): Check
3223 errno is ESRCH or not.
3224
979659d0
YQ
32252016-08-02 Yao Qi <yao.qi@linaro.org>
3226
3227 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3228 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3229 (thread_db_load_search): Update.
3230 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3231 td_ta_set_event and td_ta_event_getmsg.
3232
6598661d
PA
32332016-07-26 Pedro Alves <palves@redhat.com>
3234
3235 PR server/20414
3236 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3237 of unsigned long for 64-bit registers and use uint32_t instead of
3238 unsigned int for 32-bit registers.
3239
9cf12d57
PA
32402016-07-26 Pedro Alves <palves@redhat.com>
3241
3242 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3243 to 'ptrace'.
3244
305450ed
TT
32452016-07-21 Tom Tromey <tom@tromey.com>
3246
3247 * configure: Rebuild.
3248
2583da7c
YQ
32492016-07-21 Yao Qi <yao.qi@linaro.org>
3250
3251 * mem-break.c (find_gdb_breakpoint): Cast bp to
3252 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3253
21536b36
YQ
32542016-07-21 Yao Qi <yao.qi@linaro.org>
3255
3256 * server.c (handle_v_requests): Support s and S actions
3257 if target_supports_software_single_step return true.
3258
8901d193
YQ
32592016-07-21 Yao Qi <yao.qi@linaro.org>
3260
3261 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3262 is resume_step, call maybe_hw_step.
3263 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3264 and unstop them.
3265 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3266 breakpoints or not.
3267 (proceed_one_lwp): If resume request is resume_step, install
3268 reinsert breakpoints and call maybe_hw_step.
3269
0e9a339e
YQ
32702016-07-21 Yao Qi <yao.qi@linaro.org>
3271
3272 * linux-low.c (proceed_one_lwp): Declare.
3273 (linux_resume_one_thread): Remove local variable 'step'.
3274 Lift code enqueue signal. Call proceed_one_lwp instead of
3275 linux_resume_one_lwp.
3276
4281b351
YQ
32772016-07-21 Yao Qi <yao.qi@linaro.org>
3278
3279 * linux-low.c (linux_resume_one_thread): Call
3280 enqueue_pending_signal.
3281
984a2c04
YQ
32822016-07-21 Yao Qi <yao.qi@linaro.org>
3283
3284 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3285 * inferiors.c (do_restore_current_thread_cleanup): New function.
3286 (make_cleanup_restore_current_thread): Likewise.
3287 * linux-low.c (install_software_single_step_breakpoints): Call
3288 make_cleanup_restore_current_thread. Switch current_thread to
3289 thread.
3290
bec903c9
YQ
32912016-07-21 Yao Qi <yao.qi@linaro.org>
3292
3293 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3294 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3295 (clone_one_breakpoint): Likewise.
3296 (delete_reinsert_breakpoints): Change parameter to thread.
3297 Callers updated.
3298 (has_reinsert_breakpoints): Likewise.
3299 (uninsert_reinsert_breakpoints): Likewise.
3300 (reinsert_reinsert_breakpoints): Likewise.
3301 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3302 (delete_reinsert_breakpoints): Likewise.
3303 (reinsert_reinsert_breakpoints): Likewise.
3304 (uninsert_reinsert_breakpoints): Likewise.
3305 (has_reinsert_breakpoints): Likewise.
3306
63c40ec7
YQ
33072016-07-21 Yao Qi <yao.qi@linaro.org>
3308
3309 * inferiors.c (get_thread_process): Make parameter const.
3310 * inferiors.h (get_thread_process): Update declaration.
3311 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3312 Add new parameters child_thread and parent_thread. Callers
3313 updated.
3314 * mem-break.h (clone_all_breakpoints): Update declaration.
3315
9aa76cd0
YQ
33162016-07-21 Yao Qi <yao.qi@linaro.org>
3317
3318 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3319 <command_list, handler>: Remove.
3320 (struct gdb_breakpoint): New.
3321 (struct other_breakpoint): New.
3322 (struct reinsert_breakpoint): New.
3323 (is_gdb_breakpoint): New function.
3324 (any_persistent_commands): Update command_list if
3325 is_gdb_breakpoint returns true.
3326 (set_breakpoint): Create breakpoints according to their types.
3327 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3328 (set_gdb_breakpoint_1): Likewise.
3329 (set_gdb_breakpoint): Likewise.
3330 (clear_breakpoint_conditions): Change parameter type to
3331 'struct gdb_breakpoint *'.
3332 (clear_breakpoint_commands): Likewise.
3333 (clear_breakpoint_conditions_and_commands): Likewise.
3334 (add_condition_to_breakpoint): Likewise.
3335 (add_breakpoint_condition): Likewise.
3336 (add_commands_to_breakpoint): Likewise.
3337 (check_breakpoints): Check other_breakpoint.
3338 (clone_one_breakpoint): Clone breakpopint according to its type.
3339 * mem-break.h (struct gdb_breakpoint): Declare.
3340 (set_gdb_breakpoint): Update declaration.
3341 (clear_breakpoint_conditions_and_commands): Likewise.
3342 (add_breakpoint_condition): Likewise.
3343 (add_breakpoint_commands): Likewise.
3344 * server.c (process_point_options): Change parameter type to
3345 'struct gdb_breakpoint *'.
3346
811f8301
YQ
33472016-07-21 Yao Qi <yao.qi@linaro.org>
3348
3349 * mem-break.c (set_breakpoint_at): Rename it to ...
3350 (set_breakpoint_type_at): ... it.
3351 (set_breakpoint_at): Call set_breakpoint_type_at.
3352 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3353 * mem-break.h (set_breakpoint_at): Update comments.
3354
b1c51e36
CLT
33552016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3356
3357 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3358 to buf parameter.
3359 (nios2_store_gregset): Likewise.
3360
ced2dffb
PA
33612016-07-01 Pedro Alves <palves@redhat.com>
3362 Antoine Tremblay <antoine.tremblay@ericsson.com>
3363
3364 * linux-low.c: Change interface to take the target lwp_info
3365 pointer directly and return void. Handle detaching from a zombie
3366 thread.
3367 (linux_detach_lwp_callback): New function.
3368 (linux_detach): Detach from the leader thread after detaching from
3369 the clone threads.
3370
2ac09a5b
YQ
33712016-06-28 Yao Qi <yao.qi@linaro.org>
3372
3373 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3374 for variable new_offset.
3375 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3376 (aarch64_ftrace_insn_reloc_cb): Likewise.
3377 (aarch64_ftrace_insn_reloc_tb): Likewise.
3378 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3379 PRIx64 instead of PRIx32.
3380
79e7fd4f
YQ
33812016-06-28 Yao Qi <yao.qi@linaro.org>
3382
3383 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3384 (the_low_target): Install arm_get_syscall_trapinfo.
3385
061fc021
YQ
33862016-06-28 Yao Qi <yao.qi@linaro.org>
3387
3388 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3389 function.
3390 (the_low_target): Install aarch64_get_syscall_trapinfo.
3391
4cc32bec
YQ
33922016-06-28 Yao Qi <yao.qi@linaro.org>
3393
3394 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3395 Callers updated.
3396 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3397 Remove parameter sysno.
3398 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3399 sysret.
3400
782c1122
AA
34012016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3402
3403 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3404 (s390_emit_ne_goto): Likewise.
3405 (s390_emit_lt_goto): Likewise.
3406 (s390_emit_le_goto): Likewise.
3407 (s390_emit_gt_goto): Likewise.
3408 (s390_emit_ge_goto): Likewise.
3409 (s390x_emit_eq_goto): Likewise.
3410 (s390x_emit_ne_goto): Likewise.
3411 (s390x_emit_lt_goto): Likewise.
3412 (s390x_emit_le_goto): Likewise.
3413 (s390x_emit_gt_goto): Likewise.
3414 (s390x_emit_ge_goto): Likewise.
3415 (s390_emit_ops_impl): Mark variable static.
3416 (s390x_emit_ops): Likewise.
3417
2e7b624b
YQ
34182016-06-17 Yao Qi <yao.qi@linaro.org>
3419
3420 * linux-low.c (handle_extended_wait): Call
3421 uninsert_reinsert_breakpoints for the parent process. Remove
3422 reinsert breakpoints from the child process. Reinsert them to
3423 the parent process when vfork is done.
3424 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3425 (reinsert_reinsert_breakpoints): New function.
3426 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3427 (reinsert_reinsert_breakpoints): Declare.
3428
8a81c5d7
YQ
34292016-06-17 Yao Qi <yao.qi@linaro.org>
3430
3431 * linux-low.c (handle_extended_wait): If the parent is doing
3432 step-over, remove the reinsert breakpoints from the forked child.
3433
f50bf8e5
YQ
34342016-06-17 Yao Qi <yao.qi@linaro.org>
3435
3436 * linux-low.c (unsuspend_all_lwps): Declare.
3437 (linux_low_filter_event): If thread exited, call finish_step_over.
3438 If step-over is finished, unsuspend other threads.
3439
8376a3cb
YQ
34402016-06-17 Yao Qi <yao.qi@linaro.org>
3441
3442 * linux-low.c (linux_resume_one_lwp_throw): Assert
3443 has_reinsert_breakpoints returns false.
3444 * mem-break.c (delete_disabled_breakpoints): Assert
3445 bp type isn't reinsert_breakpoint.
3446
f79b145d
YQ
34472016-06-17 Yao Qi <yao.qi@linaro.org>
3448
3449 * linux-low.c (maybe_hw_step): New function.
3450 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3451 (finish_step_over): Switch current_thread to lwp temporarily,
3452 and assert has_reinsert_breakpoints returns true.
3453 (proceed_one_lwp): Call maybe_hw_step.
3454 * mem-break.c (has_reinsert_breakpoints): New function.
3455 * mem-break.h (has_reinsert_breakpoints): Declare.
3456
0ae534d2
JT
34572016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3458
3459 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3460
fcdad592
YQ
34612016-05-17 Yao Qi <yao.qi@linaro.org>
3462
3463 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3464 instead of find_inferior.
3465
9e784964
YQ
34662016-05-05 Yao Qi <yao.qi@linaro.org>
3467
3468 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3469 Initialize res to zero.
3470
cf2ebb6e
YQ
34712016-05-05 Yao Qi <yao.qi@linaro.org>
3472
3473 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3474 to uint32_t.
3475
c1aebf87
UW
34762016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3477
3478 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3479 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3480 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3481
35fd2deb 34822016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3483 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3484
3485 * tracepoint.c (write_inferior_int8): New function.
3486 (cmd_qtenable_disable): Write enable flag using
3487 write_inferior_int8.
3488
484b3c32
YQ
34892016-04-25 Yao Qi <yao.qi@linaro.org>
3490
3491 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3492 (need_step_over_p): Return zero if the LWP has pending signals
3493 can be delivered on software single step target.
3494
85ba7d86
YQ
34952016-04-25 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3498 return instead of error.
3499
3539aa13
YQ
35002016-04-22 Yao Qi <yao.qi@linaro.org>
3501
3502 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3503 to 23.
3504
5b061e98
YQ
35052016-04-22 Yao Qi <yao.qi@linaro.org>
3506
3507 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3508 signal when stepping over breakpoint with software single
3509 step.
3510
3451269c
PA
35112016-04-21 Pedro Alves <palves@redhat.com>
3512
3513 * linux-s390-low.c (s390_collect_ptrace_register)
3514 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3515 add casts.
3516 (s390_check_regset): Use void * instead of gdb_byte *.
3517
a2358508
PA
35182016-04-20 Pedro Alves <palves@redhat.com>
3519
3520 * configure: Renegerate.
3521
6885166d
YQ
35222016-04-20 Yao Qi <yao.qi@linaro.org>
3523
3524 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3525 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3526 number 16.
3527 (arm_store_gregset): Likewise.
3528
2b863f51
WT
35292016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3530
3531 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3532 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3533 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3534 (amd64-avx-mpx-linux.c): New rules.
3535 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3536 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3537 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3538 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3539 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3540 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3541 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3542 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3543 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3544 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3545 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3546 * linux-x86-low.c (x86_linux_read_description): Add case for
3547 X86_XSTATE_AVX_MPX_MASK.
3548 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3549 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3550 init_registers_i386_avx_mpx_linux.
3551 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3552 (initialize_low_tracepoint): Call
3553 init_registers_i386_avx_mpx_linux.
3554 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3555 (initialize_low_tracepoint): Call
3556 init_registers_amd64_avx_mpx_linux.
3557 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3558 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3559 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3560 declarations.
3561
9b30624b
PA
35622016-04-18 Pedro Alves <palves@redhat.com>
3563
3564 * configure: Regenerate.
3565
45e3745e
AT
35662016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3567
3568 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3569 (aarch64_emit_sub): Likewise.
3570
2afc13ff
PA
35712016-04-12 Pedro Alves <palves@redhat.com>
3572
3573 * utils.c (prepare_to_throw_exception): Delete.
3574
6e774b13
SM
35752016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3576
3577 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3578
4dca19f8
MK
35792016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3580
3581 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3582
d0a9981f
MK
35832016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3584
3585 * linux-aarch64-ipa.c: Add <elf.h> include.
3586 * linux-ppc-ipa.c: Add <elf.h> include.
3587 * linux-s390-ipa.c: Add <elf.h> include.
3588
252db07e
MK
35892016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3590
3591 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3592 (get_raw_reg_ptr): Likewise.
3593 (get_trace_state_variable_value_ptr): Likewise.
3594 (set_trace_state_variable_value_ptr): Likewise.
3595 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3596 char *.
3597
14e2b6d9
MK
35982016-03-31 Wei-cheng Wang <cole945@gmail.com>
3599 Marcin Kościelnicki <koriakin@0x04.net>
3600
3601 PR/17221
3602 * linux-ppc-low.c (emit_insns): New function.
3603 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3604 (ppc_emit_prologue): New function.
3605 (ppc_emit_epilogue): New function.
3606 (ppc_emit_add): New function.
3607 (ppc_emit_sub): New function.
3608 (ppc_emit_mul): New function.
3609 (ppc_emit_lsh): New function.
3610 (ppc_emit_rsh_signed): New function.
3611 (ppc_emit_rsh_unsigned): New function.
3612 (ppc_emit_ext): New function.
3613 (ppc_emit_zero_ext): New function.
3614 (ppc_emit_log_not): New function.
3615 (ppc_emit_bit_and): New function.
3616 (ppc_emit_bit_or): New function.
3617 (ppc_emit_bit_xor): New function.
3618 (ppc_emit_bit_not): New function.
3619 (ppc_emit_equal): New function.
3620 (ppc_emit_less_signed): New function.
3621 (ppc_emit_less_unsigned): New function.
3622 (ppc_emit_ref): New function.
3623 (ppc_emit_const): New function.
3624 (ppc_emit_reg): New function.
3625 (ppc_emit_pop): New function.
3626 (ppc_emit_stack_flush): New function.
3627 (ppc_emit_swap): New function.
3628 (ppc_emit_stack_adjust): New function.
3629 (ppc_emit_call): New function.
3630 (ppc_emit_int_call_1): New function.
3631 (ppc_emit_void_call_2): New function.
3632 (ppc_emit_if_goto): New function.
3633 (ppc_emit_goto): New function.
3634 (ppc_emit_eq_goto): New function.
3635 (ppc_emit_ne_goto): New function.
3636 (ppc_emit_lt_goto): New function.
3637 (ppc_emit_le_goto): New function.
3638 (ppc_emit_gt_goto): New function.
3639 (ppc_emit_ge_goto): New function.
3640 (ppc_write_goto_address): New function.
3641 (ppc_emit_ops_impl): New static variable.
3642 (ppc64v1_emit_prologue): New function.
3643 (ppc64v2_emit_prologue): New function.
3644 (ppc64_emit_epilogue): New function.
3645 (ppc64_emit_add): New function.
3646 (ppc64_emit_sub): New function.
3647 (ppc64_emit_mul): New function.
3648 (ppc64_emit_lsh): New function.
3649 (ppc64_emit_rsh_signed): New function.
3650 (ppc64_emit_rsh_unsigned): New function.
3651 (ppc64_emit_ext): New function.
3652 (ppc64_emit_zero_ext): New function.
3653 (ppc64_emit_log_not): New function.
3654 (ppc64_emit_bit_and): New function.
3655 (ppc64_emit_bit_or): New function.
3656 (ppc64_emit_bit_xor): New function.
3657 (ppc64_emit_bit_not): New function.
3658 (ppc64_emit_equal): New function.
3659 (ppc64_emit_less_signed): New function.
3660 (ppc64_emit_less_unsigned): New function.
3661 (ppc64_emit_ref): New function.
3662 (ppc64_emit_const): New function.
3663 (ppc64v1_emit_reg): New function.
3664 (ppc64v2_emit_reg): New function.
3665 (ppc64_emit_pop): New function.
3666 (ppc64_emit_stack_flush): New function.
3667 (ppc64_emit_swap): New function.
3668 (ppc64v1_emit_call): New function.
3669 (ppc64v2_emit_call): New function.
3670 (ppc64v1_emit_int_call_1): New function.
3671 (ppc64v2_emit_int_call_1): New function.
3672 (ppc64v1_emit_void_call_2): New function.
3673 (ppc64v2_emit_void_call_2): New function.
3674 (ppc64_emit_if_goto): New function.
3675 (ppc64_emit_eq_goto): New function.
3676 (ppc64_emit_ne_goto): New function.
3677 (ppc64_emit_lt_goto): New function.
3678 (ppc64_emit_le_goto): New function.
3679 (ppc64_emit_gt_goto): New function.
3680 (ppc64_emit_ge_goto): New function.
3681 (ppc64v1_emit_ops_impl): New static variable.
3682 (ppc64v2_emit_ops_impl): New static variable.
3683 (ppc_emit_ops): New function.
3684 (linux_low_target): Wire in ppc_emit_ops.
3685
a2174ba4
MK
36862016-03-31 Wei-cheng Wang <cole945@gmail.com>
3687 Marcin Kościelnicki <koriakin@0x04.net>
3688
3689 PR/17221
3690 * Makefile.in: Add powerpc-*-ipa.o
3691 * configure.srv: Add ipa_obj for powerpc*-linux.
3692 * linux-ppc-ipa.c: New file.
3693 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3694 includes.
3695 (PPC_FIELD): New macro.
3696 (PPC_SEXT): New macro.
3697 (PPC_OP6): New macro.
3698 (PPC_BO): New macro.
3699 (PPC_LI): New macro.
3700 (PPC_BD): New macro.
3701 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3702 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3703 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3704 (ppc_get_thread_area): New function.
3705 (is_elfv2_inferior): New function.
3706 (gen_ds_form): New function.
3707 (GEN_STD): New macro.
3708 (GEN_STDU): New macro.
3709 (GEN_LD): New macro.
3710 (GEN_LDU): New macro.
3711 (gen_d_form): New function.
3712 (GEN_ADDI): New macro.
3713 (GEN_ADDIS): New macro.
3714 (GEN_LI): New macro.
3715 (GEN_LIS): New macro.
3716 (GEN_ORI): New macro.
3717 (GEN_ORIS): New macro.
3718 (GEN_LWZ): New macro.
3719 (GEN_STW): New macro.
3720 (GEN_STWU): New macro.
3721 (gen_xfx_form): New function.
3722 (GEN_MFSPR): New macro.
3723 (GEN_MTSPR): New macro.
3724 (GEN_MFCR): New macro.
3725 (GEN_MTCR): New macro.
3726 (GEN_SYNC): New macro.
3727 (GEN_LWSYNC): New macro.
3728 (gen_x_form): New function.
3729 (GEN_OR): New macro.
3730 (GEN_MR): New macro.
3731 (GEN_LWARX): New macro.
3732 (GEN_STWCX): New macro.
3733 (GEN_CMPW): New macro.
3734 (gen_md_form): New function.
3735 (GEN_RLDICL): New macro.
3736 (GEN_RLDICR): New macro.
3737 (gen_i_form): New function.
3738 (GEN_B): New macro.
3739 (GEN_BL): New macro.
3740 (gen_b_form): New function.
3741 (GEN_BNE): New macro.
3742 (GEN_LOAD): New macro.
3743 (GEN_STORE): New macro.
3744 (gen_limm): New function.
3745 (gen_atomic_xchg): New function.
3746 (gen_call): New function.
3747 (ppc_relocate_instruction): New function.
3748 (ppc_install_fast_tracepoint_jump_pad): New function.
3749 (ppc_get_min_fast_tracepoint_insn_len): New function.
3750 (ppc_get_ipa_tdesc_idx): New function.
3751 (the_low_target): Wire in the new functions.
3752 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3753 tdescs.
3754 * linux-ppc-tdesc.h: New file.
3755
a13c4696
MK
37562016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3757
3758 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3759 (alloc_jump_pad_buffer): New function.
3760 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3761 (alloc_jump_pad_buffer): New function.
3762 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3763 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3764 (alloc_jump_pad_buffer): New function.
3765 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3766 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3767 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3768 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3769
1cda1512
MK
37702016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3771
3772 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3773 * linux-amd64-ipa.c: Likewise.
3774 * linux-i386-ipa.c: Likewise.
3775 * linux-s390-ipa.c: Likewise.
3776 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3777 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3778 set_trace_state_variable_value_ptr.
3779 (struct ipa_sym_addresses): Likewise.
3780 (symbol_list): Likewise.
3781 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3782 accessing gdb_collect directly.
3783 (gdb_collect_ptr_type): New typedef.
3784 (get_raw_reg_ptr_type): New typedef.
3785 (get_trace_state_variable_value_ptr_type): New typedef.
3786 (set_trace_state_variable_value_ptr_type): New typedef.
3787 (gdb_collect_ptr): New global.
3788 (get_raw_reg_ptr): New global.
3789 (get_trace_state_variable_value_ptr): New global.
3790 (set_trace_state_variable_value_ptr): New global.
3791 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3792 accessing get_raw_reg directly.
3793 (get_get_tsv_func_addr): Likewise for
3794 get_trace_state_variable_value_ptr.
3795 (get_set_tsv_func_addr): Likewise for
3796 set_trace_state_variable_value_ptr.
3797 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3798
72fb5488
SM
37992016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3800
3801 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3802
28170b88
MK
38032016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3804
3805 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3806 packets.
3807 (relocate_instruction): Remove own_buf.
3808 * server.c (own_buf): Make global.
3809 (handle_v_requests): Make global.
3810 * server.h (own_buf): New declaration.
3811 (handle_v_requests): New prototype.
3812
f39e8743
MK
38132016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3814
3815 PR 18377
3816 * linux-s390-low.c (add_insns): New function.
3817 (s390_emit_prologue): New function.
3818 (s390_emit_epilogue): New function.
3819 (s390_emit_add): New function.
3820 (s390_emit_sub): New function.
3821 (s390_emit_mul): New function.
3822 (s390_emit_lsh): New function.
3823 (s390_emit_rsh_signed): New function.
3824 (s390_emit_rsh_unsigned): New function.
3825 (s390_emit_ext): New function.
3826 (s390_emit_log_not): New function.
3827 (s390_emit_bit_and): New function.
3828 (s390_emit_bit_or): New function.
3829 (s390_emit_bit_xor): New function.
3830 (s390_emit_bit_not): New function.
3831 (s390_emit_equal): New function.
3832 (s390_emit_less_signed): New function.
3833 (s390_emit_less_unsigned): New function.
3834 (s390_emit_ref): New function.
3835 (s390_emit_if_goto): New function.
3836 (s390_emit_goto): New function.
3837 (s390_write_goto_address): New function.
3838 (s390_emit_litpool): New function.
3839 (s390_emit_const): New function.
3840 (s390_emit_call): New function.
3841 (s390_emit_reg): New function.
3842 (s390_emit_pop): New function.
3843 (s390_emit_stack_flush): New function.
3844 (s390_emit_zero_ext): New function.
3845 (s390_emit_swap): New function.
3846 (s390_emit_stack_adjust): New function.
3847 (s390_emit_set_r2): New function.
3848 (s390_emit_int_call_1): New function.
3849 (s390_emit_void_call_2): New function.
3850 (s390_emit_eq_goto): New function.
3851 (s390_emit_ne_goto): New function.
3852 (s390_emit_lt_goto): New function.
3853 (s390_emit_le_goto): New function.
3854 (s390_emit_gt_goto): New function.
3855 (s390_emit_ge_goto): New function.
3856 (s390x_emit_prologue): New function.
3857 (s390x_emit_epilogue): New function.
3858 (s390x_emit_add): New function.
3859 (s390x_emit_sub): New function.
3860 (s390x_emit_mul): New function.
3861 (s390x_emit_lsh): New function.
3862 (s390x_emit_rsh_signed): New function.
3863 (s390x_emit_rsh_unsigned): New function.
3864 (s390x_emit_ext): New function.
3865 (s390x_emit_log_not): New function.
3866 (s390x_emit_bit_and): New function.
3867 (s390x_emit_bit_or): New function.
3868 (s390x_emit_bit_xor): New function.
3869 (s390x_emit_bit_not): New function.
3870 (s390x_emit_equal): New function.
3871 (s390x_emit_less_signed): New function.
3872 (s390x_emit_less_unsigned): New function.
3873 (s390x_emit_ref): New function.
3874 (s390x_emit_if_goto): New function.
3875 (s390x_emit_const): New function.
3876 (s390x_emit_call): New function.
3877 (s390x_emit_reg): New function.
3878 (s390x_emit_pop): New function.
3879 (s390x_emit_stack_flush): New function.
3880 (s390x_emit_zero_ext): New function.
3881 (s390x_emit_swap): New function.
3882 (s390x_emit_stack_adjust): New function.
3883 (s390x_emit_int_call_1): New function.
3884 (s390x_emit_void_call_2): New function.
3885 (s390x_emit_eq_goto): New function.
3886 (s390x_emit_ne_goto): New function.
3887 (s390x_emit_lt_goto): New function.
3888 (s390x_emit_le_goto): New function.
3889 (s390x_emit_gt_goto): New function.
3890 (s390x_emit_ge_goto): New function.
3891 (s390_emit_ops): New function.
3892 (struct linux_target_ops): Fill in emit_ops hook.
3893
abd9baf9
MK
38942016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3895
3896 PR 18377
3897 * Makefile.in: Add s390 IPA files.
3898 * configure.srv: Build IPA for s390.
3899 * linux-s390-ipa.c: New file.
3900 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3901 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3902 (tdesc_s390_linux32): Likewise.
3903 (init_registers_s390_linux32v1): Likewise.
3904 (tdesc_s390_linux32v1): Likewise.
3905 (init_registers_s390_linux32v2): Likewise.
3906 (tdesc_s390_linux32v2): Likewise.
3907 (init_registers_s390_linux64): Likewise.
3908 (tdesc_s390_linux64): Likewise.
3909 (init_registers_s390_linux64v1): Likewise.
3910 (tdesc_s390_linux64v1): Likewise.
3911 (init_registers_s390_linux64v2): Likewise.
3912 (tdesc_s390_linux64v2): Likewise.
3913 (init_registers_s390_te_linux64): Likewise.
3914 (tdesc_s390_te_linux64): Likewise.
3915 (init_registers_s390_vx_linux64): Likewise.
3916 (tdesc_s390_vx_linux64): Likewise.
3917 (init_registers_s390_tevx_linux64): Likewise.
3918 (tdesc_s390_tevx_linux64): Likewise.
3919 (init_registers_s390x_linux64): Likewise.
3920 (tdesc_s390x_linux64): Likewise.
3921 (init_registers_s390x_linux64v1): Likewise.
3922 (tdesc_s390x_linux64v1): Likewise.
3923 (init_registers_s390x_linux64v2): Likewise.
3924 (tdesc_s390x_linux64v2): Likewise.
3925 (init_registers_s390x_te_linux64): Likewise.
3926 (tdesc_s390x_te_linux64): Likewise.
3927 (init_registers_s390x_vx_linux64): Likewise.
3928 (tdesc_s390x_vx_linux64): Likewise.
3929 (init_registers_s390x_tevx_linux64): Likewise.
3930 (tdesc_s390x_tevx_linux64): Likewise.
3931 (have_hwcap_s390_vx): New static variable.
3932 (s390_arch_setup): Fill have_hwcap_s390_vx.
3933 (s390_get_thread_area): New function.
3934 (s390_ft_entry_gpr_esa): New const.
3935 (s390_ft_entry_gpr_zarch): New const.
3936 (s390_ft_entry_misc): New const.
3937 (s390_ft_entry_fr): New const.
3938 (s390_ft_entry_vr): New const.
3939 (s390_ft_main_31): New const.
3940 (s390_ft_main_64): New const.
3941 (s390_ft_exit_fr): New const.
3942 (s390_ft_exit_vr): New const.
3943 (s390_ft_exit_misc): New const.
3944 (s390_ft_exit_gpr_esa): New const.
3945 (s390_ft_exit_gpr_zarch): New const.
3946 (append_insns): New function.
3947 (s390_relocate_instruction): New function.
3948 (s390_install_fast_tracepoint_jump_pad): New function.
3949 (s390_get_min_fast_tracepoint_insn_len): New function.
3950 (s390_get_ipa_tdesc_idx): New function.
3951 (struct linux_target_ops): Wire in the above functions.
3952 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3953 * linux-s390-tdesc.h: New file.
3954
a4105d04
MK
39552016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3956
3957 * linux-s390-low.c (s390_supports_tracepoints): New function.
3958 (struct linux_target_ops): Fill supports_tracepoints hook.
3959
35ac8b3e
YQ
39602016-03-18 Yao Qi <yao.qi@linaro.org>
3961
3962 * linux-low.c (lwp_signal_can_be_delivered): New function.
3963 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3964
94610ec4
YQ
39652016-03-18 Yao Qi <yao.qi@linaro.org>
3966
3967 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3968 0 if signal is enqueued. Remove 'signal' from one debugging
3969 message. Move one debugging message to some lines below.
3970 Remove code setting 'signal' to 0.
3971
80aea927
YQ
39722016-03-18 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-low.c (linux_low_filter_event): Remove redundant
3975 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3976
b04fd3be
MK
39772016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3978
3979 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3980 (struct linux_target_ops): Wire in the above.
3981
c40c8d4b
YQ
39822016-03-03 Yao Qi <yao.qi@linaro.org>
3983
3984 * linux-low.c: Update comments to start_step_over.
3985
0f8288ae
YQ
39862016-03-03 Yao Qi <yao.qi@linaro.org>
3987
3988 PR server/19736
3989 * linux-low.c (handle_extended_wait): Set child suspended
3990 if event_lwp->bp_reinsert isn't zero.
3991
fdbd04a8
YQ
39922016-03-02 Yao Qi <yao.qi@linaro.org>
3993
3994 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3995 enqueue_pending_signal.
3996
6896a8fa
MK
39972016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3998
3999 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4000 is actually loaded.
4001
ab503087
MK
40022016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4003
4004 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4005 (s390_regmap_3264) [!__s390x__]: New global.
4006 (s390_collect_ptrace_register): Skip map entries containing -1.
4007 (s390_supply_ptrace_register): Ditto.
4008 (s390_fill_gprs_high): New function.
4009 (s390_store_gprs_high): New function.
4010 (s390_regsets): Add NT_S390_HIGH_GPRS.
4011 (s390_get_hwcap): Enable on 31-bit.
4012 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4013 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4014 Detect NT_S390_HIGH_GPRS.
4015 (s390_usrregs_info_3264): Enable on 31-bit.
4016 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4017 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4018
ae91f625
MK
40192016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4020
4021 PR gdb/13808
4022 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4023 * configure.srv: Ditto.
4024 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4025 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4026 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4027 (init_registers_amd64_linux): Remove prototype.
4028 (tdesc_amd64_linux): Remove declaration.
4029 (get_ipa_tdesc): New function.
4030 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4031 initialize remaining tdescs.
4032 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4033 (init_registers_i386_linux): Remove prototype.
4034 (tdesc_i386_linux): Remove declaration.
4035 (get_ipa_tdesc): New function.
4036 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4037 initialize remaining tdescs.
4038 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4039 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4040 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4041 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4042 (x86_get_ipa_tdesc_idx): New function.
4043 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4044 * linux-x86-tdesc.h: New file.
4045 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4046 (target_get_ipa_tdesc_idx): New macro.
4047 * tracepoint.c (ipa_tdesc_idx): New macro.
4048 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4049 (symbol_list): Add ipa_tdesc_idx.
4050 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4051 (ipa_tdesc): Remove.
4052 (ipa_tdesc_idx): New variable.
4053 (get_context_regcache): Use get_ipa_tdesc.
4054 (gdb_collect): Ditto.
4055 (gdb_probe): Ditto.
4056 * tracepoint.h (get_ipa_tdesc): New prototype.
4057 (ipa_tdesc): Remove.
4058
e7ad2f14
PA
40592016-02-24 Pedro Alves <palves@redhat.com>
4060
4061 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4062 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4063 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4064 Factor out common code between the USE_SIGTRAP_SIGINFO and
4065 !USE_SIGTRAP_SIGINFO blocks.
4066 (linux_low_filter_event): Call save_stop_reason instead of
4067 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4068 Update comments.
4069 (linux_wait_1): Update comments.
4070
657f9cde
WW
40712016-02-24 Wei-cheng Wang <cole945@gmail.com>
4072
4073 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4074 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4075 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4076 ppc_insert_point, ppc_remove_point.
4077
b00b61e1
MK
40782016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4079
4080 * linux-s390-low.c (s390_supports_z_point_type): New function.
4081 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4082
553cb527
YQ
40832016-02-16 Yao Qi <yao.qi@linaro.org>
4084
4085 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4086 PC. Get pc from regcache_read_pc.
4087
a5652c21
YQ
40882016-02-12 Yao Qi <yao.qi@linaro.org>
4089
4090 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4091 or linux_get_pc_32bit.
4092 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4093
ed443b61
YQ
40942016-02-12 Yao Qi <yao.qi@linaro.org>
4095
4096 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4097 arm_linux_get_next_pcs_fixup.
4098
020ecd38
MK
40992016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4100
4101 * tracepoint.c (x_tracepoint_action_download): Change
4102 write_inferior_data_ptr to write_inferior_data_pointer.
4103 (cmd_qtstart): Likewise.
4104 (write_inferior_data_ptr): Remove.
4105 (download_agent_expr): Change write_inferior_data_ptr to
4106 write_inferior_data_pointer.
4107 (download_tracepoint_1): Likewise.
4108 (download_tracepoint): Likewise.
4109 (download_trace_state_variables): Likewise.
4110
7cae9051
WW
41112016-02-11 Wei-cheng Wang <cole945@gmail.com>
4112 Marcin Kościelnicki <koriakin@0x04.net>
4113
4114 * tracepoint.c (struct tracepoint_action_ops): Remove.
4115 (struct tracepoint_action): Remove ops.
4116 (m_tracepoint_action_download, r_tracepoint_action_download)
4117 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4118 size and offset accordingly.
4119 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4120 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4121 (tracepoint_action_send, tracepoint_action_download): New functions.
4122 Helpers for trace action handlers.
4123 (add_tracepoint_action): Remove setup actions ops.
4124 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4125
9f6a71b4
YQ
41262016-02-10 Yao Qi <yao.qi@linaro.org>
4127
4128 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4129
1e94266c
SM
41302016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4131
4132 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4133 to AC_OUTPUT.
4134 * configure: Regenerate.
4135
8adce034
SM
41362016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4137
4138 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4139 void * to gdb_byte *.
4140 * linux-low.c (siginfo_fixup): Likewise.
4141 (linux_xfer_siginfo): Likewise.
4142 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4143 Likewise.
4144 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4145
93813b37
WT
41462016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4147
4148 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4149 to srv_tgtobj.
4150 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4151 to srv_tgtobj.
4152 * linux-x86-low.c [__x86_64__]: Include
4153 "nat/amd64-linux-siginfo.h".
4154 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4155 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4156 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4157 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4158 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4159 (cpt_si_fd, si_timerid, si_overrun): Move from
4160 nat/amd64-linux-siginfo.c.
4161 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4162
8424cc97
SM
41632016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4164
4165 * server.c (skip_to_semicolon): Remove.
4166 (process_point_options): Use strchrnul instead of
4167 skip_to_semicolon.
4168
4d18591b
YQ
41692016-01-26 Yao Qi <yao.qi@linaro.org>
4170
4171 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4172 * linux-low.c (install_software_single_step_breakpoints): Don't
4173 call regcache_read_pc.
4174 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4175 argument pc.
4176
d8020970
YQ
41772016-01-26 Yao Qi <yao.qi@linaro.org>
4178
4179 * linux-low.c (install_software_single_step_breakpoints): Call
4180 regcache_read_pc instead of get_pc.
4181
8b207339
YQ
41822016-01-26 Yao Qi <yao.qi@linaro.org>
4183
4184 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4185 (unblock_async_io): Rename to ...
4186 (block_unblock_async_io): ... it. New function.
4187 (enable_async_io): Don't install SIGIO handler. Unblock it
4188 instead.
4189 (disable_async_io): Don't ignore SIGIO. Block it instead.
4190 (initialize_async_io): Install SIGIO handler. Don't call
4191 unblock_async_io.
4192
18879fef
YQ
41932016-01-26 Yao Qi <yao.qi@linaro.org>
4194
4195 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4196 first character is '\003', call *the_target->request_interrupt.
4197
a0f8e08a
YQ
41982016-01-25 Yao Qi <yao.qi@linaro.org>
4199
4200 * remote-utils.c (new_thread_notify): Remove.
4201 (dead_thread_notify): Likewise.
4202 * remote-utils.h (new_thread_notify): Remove declaration.
4203 (dead_thread_notify): Likewise.
4204
cc5fd9ab
MK
42052016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4206
4207 * gdb.trace/pending.exp: Fix expected message on continue.
4208
99e8eb11
MK
42092016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4210
4211 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4212 it works properly on big-endian machines where sizeof (CORE_ADDR)
4213 != sizeof (void *).
4214
a994041d
PA
42152016-01-21 Pedro Alves <palves@redhat.com>
4216
4217 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4218 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4219 * configure: Regenerate.
4220
f7a6a40d
YQ
42212016-01-21 Yao Qi <yao.qi@linaro.org>
4222
4223 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4224 is_thumb and set it according to CPSR saved on the stack.
4225 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4226 arm_sigreturn_next_pc.
4227
6f69e520
YQ
42282016-01-18 Yao Qi <yao.qi@linaro.org>
4229
4230 * linux-low.c (linux_set_pc_64bit): New function.
4231 (linux_get_pc_64bit): New function.
4232 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4233 Declare.
4234 * linux-sparc-low.c (debug_threads): Remove declaration.
4235 (sparc_get_pc): Remove.
4236 (the_low_target): Use linux_get_pc_64bit instead of
4237 sparc_get_pc.
4238 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4239 (the_low_target): Use linux_get_pc_64bit and
4240 linux_set_pc_64bit.
4241
276d4552
YQ
42422016-01-18 Yao Qi <yao.qi@linaro.org>
4243
4244 * linux-arm-low.c (debug_threads): Remove declaration.
4245 (arm_get_pc, arm_set_pc): Remove.
4246 (the_low_target): Use linux_get_pc_32bit and
4247 linux_set_pc_32bit.
4248 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4249 (the_low_target): Use linux_get_pc_32bit and
4250 linux_set_pc_32bit.
4251 * linux-cris-low.c (debug_threads): Remove declaration.
4252 (cris_get_pc, cris_set_pc,): Remove.
4253 (the_low_target): Use linux_get_pc_32bit and
4254 linux_set_pc_32bit.
4255 * linux-crisv32-low.c (debug_threads): Remove declaration.
4256 (cris_get_pc, cris_set_pc): Remove.
4257 (the_low_target): Use linux_get_pc_32bit and
4258 linux_set_pc_32bit.
4259 * linux-low.c: Include inttypes.h.
4260 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4261 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4262 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4263 (the_low_target): Use linux_get_pc_32bit and
4264 linux_set_pc_32bit.
4265 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4266 (the_low_target): Use linux_get_pc_32bit and
4267 linux_set_pc_32bit.
4268 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4269 (the_low_target): Use linux_get_pc_32bit and
4270 linux_set_pc_32bit.
4271 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4272 (the_low_target): Use linux_get_pc_32bit and
4273 linux_set_pc_32bit.
4274 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4275 (the_low_target): Use linux_get_pc_32bit and
4276 linux_set_pc_32bit.
4277
eb0edac8
GB
42782016-01-18 Gary Benson <gbenson@redhat.com>
4279
4280 * configure.ac (AC_FUNC_FORK): New check.
4281 * config.in: Regenerate.
4282 * configure: Likewise.
4283
1b451dda
YQ
42842016-01-14 Yao Qi <yao.qi@linaro.org>
4285
4286 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4287 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4288 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4289 arm_get_next_pcs_ctor.
4290
82075af2
JS
42912016-01-12 Josh Stone <jistone@redhat.com>
4292 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4293
4294 * inferiors.h: Include "gdb_vecs.h".
4295 (struct process_info): Add syscalls_to_catch.
4296 * inferiors.c (remove_process): Free syscalls_to_catch.
4297 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4298 syscall_return stops.
4299 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4300 * server.c (handle_general_set): Handle QCatchSyscalls.
4301 (handle_query): Report support for QCatchSyscalls.
4302 * target.h (struct target_ops): Add supports_catch_syscall.
4303 (target_supports_catch_syscall): New macro.
4304 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4305 (struct lwp_info): Add syscall_state.
4306 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4307 Maintain syscall_state and syscalls_to_catch across exec.
4308 (get_syscall_trapinfo): New function, proxy to the_low_target.
4309 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4310 (linux_low_filter_event): Toggle syscall_state entry/return for
4311 syscall traps, and set it ignored for all others.
4312 (gdb_catching_syscalls_p): New function.
4313 (gdb_catch_this_syscall_p): New function.
4314 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4315 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4316 (linux_supports_catch_syscall): New function.
4317 (linux_target_ops): Install it.
4318 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4319 (the_low_target): Install it.
4320
8f13a3ce
MF
43212016-01-12 Mike Frysinger <vapier@gentoo.org>
4322
4323 * acinclude.m4: Include new ../warning.m4 file.
4324 * configure: Regenerated.
4325 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4326
5b3da067
MF
43272016-01-12 Mike Frysinger <vapier@gentoo.org>
4328
4329 * ax.c (is_goto_target): Mark static.
4330 * linux-low.c (register_addr): Likewise.
4331 (linux_fetch_registers, linux_store_registers): Likewise.
4332 * mem-break.c (any_persistent_commands): Fix old prototype.
4333 (add_commands_to_breakpoint): Mark static.
4334 * regcache.c (find_register_by_name): Delete unused func.
4335 * remote-utils.c (hex_or_minus_one): Mark static.
4336 * server.c (monitor_show_help): Mark static.
4337 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4338 handle_v_requests): Likewise.
4339
bc504a31
PA
43402016-01-12 Pedro Alves <palves@redhat.com>
4341
4342 Remove use of the registered trademark symbol throughout.
4343
5a0dd67a
YQ
43442016-01-08 Yao Qi <yao.qi@linaro.org>
4345
4346 * remote-utils.c (getpkt): If c is '\003', call target hook
4347 request_interrupt.
4348
b2ca446f
YQ
43492016-01-06 Yao Qi <yao.qi@linaro.org>
4350
4351 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4352 linux-aarch32-low.c.
4353 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4354 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4355 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4356 (thumb2_breakpoint): Declare.
4357 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4358 linux-aarch32-low.h.
4359 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4360 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4361 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4362
edd88788
JB
43632016-01-01 Joel Brobecker <brobecker@adacore.com>
4364
4365 * gdbreplay.c (gdbreplay_version): Change copyright year in
4366 version message.
4367 * server.c (gdbserver_version): Likewise.
4368
65da7f14
PP
43692015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4370
4371 * server.c (crc32_table): Delete.
4372 (crc32): Use libiberty's xcrc32 function.
4373
4abd5ed2
JB
43742015-12-22 Joel Brobecker <brobecker@adacore.com>
4375
4376 * lynx-low.c (lynx_delete_thread_callback): New function.
4377 (lynx_mourn): Properly delete our process and all of its
4378 threads. Remove call to clear_inferiors.
4379
0e50fe5c
JB
43802015-12-22 Joel Brobecker <brobecker@adacore.com>
4381
4382 * target.c (thread_search_callback): Add check that
4383 the thread_stopped target callback is not NULL before
4384 calling it.
4385
35adc03f
YQ
43862015-12-21 Yao Qi <yao.qi@linaro.org>
4387
4388 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4389 arm breakpoint.
4390
bd2b2909
AT
43912015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4392
4393 * server.c (handle_query): Call target_supports_software_single_step.
4394
7fe5e27e
AT
43952015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4396
4397 * linux-low.c (single_step): New function.
4398 (linux_resume_one_lwp_throw): Call single_step.
4399 (start_step_over): Likewise.
4400
d9311bfa
AT
44012015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4402
4403 * Makefile.in (SFILES): Append arch/arm-linux.c,
4404 arch/arm-get-next-pcs.c.
4405 (arm-linux.o): New rule.
4406 (arm-get-next-pcs.o): New rule.
4407 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4408 arm-linux.o.
4409 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4410 to linux-aarch32-low.c.
4411 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4412 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4413 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4414 (thumb2_breakpoint_len): Likewise.
4415 (arm_is_thumb_mode): Make non-static.
4416 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4417 from linux-aarch32-low.c.
4418 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4419 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4420 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4421 (thumb2_breakpoint_len): Likewise.
4422 (arm_is_thumb_mode): New declaration.
4423 * linux-arm-low.c: Include arch/arm-linux.h
4424 aarch/arm-get-next-pcs.h, sys/syscall.h.
4425 (get_next_pcs_ops): New struct.
4426 (get_next_pcs_addr_bits_remove): New function.
4427 (get_next_pcs_is_thumb): New function.
4428 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4429 (arm_sigreturn_next_pc): Likewise.
4430 (get_next_pcs_syscall_next_pc): Likewise.
4431 (arm_gdbserver_get_next_pcs): Likewise.
4432 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4433 Initialize.
4434 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4435 * server.h: Include gdb_vecs.h.
4436
68ce2059
AT
44372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4438
4439 * Makefile.in (SFILES): Append common/common-regcache.c.
4440 (OBS): Append common-regcache.o.
4441 (common-regcache.o): New rule.
4442 * regcache.c (init_register_cache): Initialize cache to
4443 REG_UNAVAILABLE.
4444 (regcache_raw_read_unsigned): New function.
4445 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4446 register_status enum.
4447
fa5308bd
AT
44482015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4449
4450 * linux-aarch64-low.c (the_low_targets): Rename
4451 breakpoint_reinsert_addr to get_next_pcs.
4452 * linux-arm-low.c (the_low_targets): Likewise.
4453 * linux-bfin-low.c (the_low_targets): Likewise.
4454 * linux-cris-low.c (the_low_targets): Likewise.
4455 * linux-crisv32-low.c (the_low_targets): Likewise.
4456 * linux-low.c (can_software_single_step): Likewise.
4457 (install_software_single_step_breakpoints): New function.
4458 (start_step_over): Use install_software_single_step_breakpoints.
4459 * linux-low.h: New CORE_ADDR vector.
4460 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4461 get_next_pcs.
4462 * linux-mips-low.c (the_low_targets): Likewise.
4463 * linux-nios2-low.c (the_low_targets): Likewise.
4464 * linux-sparc-low.c (the_low_targets): Likewise.
4465
4a6ed09b
PA
44662015-12-17 Pedro Alves <palves@redhat.com>
4467
4468 * linux-low.c (linux_kill_one_lwp): Remove references to
4469 LinuxThreads.
4470 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4471 to 'kill'.
4472 (linux_init_signals): Delete.
4473 (initialize_low): Adjust.
4474 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4475
7544db95
PA
44762015-12-16 Pedro Alves <palves@redhat.com>
4477
4478 * configure.ac (compiler warning flags): When testing a
4479 -Wno-foo option, check whether -Wfoo works instead.
4480 * configure: Regenerate.
4481
8020350c
DB
44822015-12-11 Don Breazeal <donb@codesourcery.com>
4483
4484 * server.c (process_serial_event): Don't exit from gdbserver
4485 in remote mode if there are still active inferiors.
4486
db91f502
YQ
44872015-12-11 Yao Qi <yao.qi@linaro.org>
4488
4489 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4490 arm_breakpoint_at if the process is 32-bit.
4491
b37a6290
YQ
44922015-12-11 Yao Qi <yao.qi@linaro.org>
4493
4494 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4495 arm breakpoint.
4496
17b1509a
YQ
44972015-12-07 Yao Qi <yao.qi@linaro.org>
4498
4499 * configure.srv: Append arm.o to srv_tgtobj for
4500 aarch64*-*-linux* target.
4501 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4502 from linux-arm-low.c.
4503 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4504 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4505 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4506 (thumb2_breakpoint_len): Likewise.
4507 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4508 (arm_breakpoint_kinds): Likewise.
4509 (arm_breakpoint_kind_from_pc): Likewise.
4510 (arm_sw_breakpoint_from_kind): Likewise.
4511 (arm_breakpoint_kind_from_current_state): Likewise.
4512 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4513 (arm_sw_breakpoint_from_kind): Declare.
4514 (arm_breakpoint_kind_from_current_state): Declare.
4515 (arm_breakpoint_at): Declare.
4516 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4517 arm_sw_breakpoint_from_kind if process is 32-bit.
4518 (aarch64_breakpoint_kind_from_pc): New function.
4519 (aarch64_breakpoint_kind_from_current_state): New function.
4520 (the_low_target): Initialize fields breakpoint_kind_from_pc
4521 and breakpoint_kind_from_current_state.
4522 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4523 linux-aarch32-low.c.
4524 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4525 (arm_breakpoint, arm_breakpoint_len): Likewise.
4526 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4527 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4528 (arm_is_thumb_mode): Likewise.
4529 (arm_breakpoint_at): Likewise.
4530 (arm_breakpoint_kind_from_pc): Likewise.
4531 (arm_sw_breakpoint_from_kind): Likewise.
4532 (arm_breakpoint_kind_from_current_state): Likewise.
4533
4534 Revert:
4535 2015-08-04 Yao Qi <yao.qi@linaro.org>
4536
4537 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4538 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4539 * server.c (extended_protocol): Remove "static".
4540 * server.h (extended_protocol): Declare it.
4541
ece66d65
JS
45422015-12-04 Josh Stone <jistone@redhat.com>
4543
4544 * target.h (struct target_ops) <arch_setup>: Rename to ...
4545 (struct target_ops) <post_create_inferior>: ... this.
4546 (target_arch_setup): Rename to ...
4547 (target_post_create_inferior): ... this, calling post_create_inferior.
4548 * server.c (start_inferior): Update target_arch_setup calls to
4549 target_post_create_inferior.
4550 * linux-low.c (linux_low_ptrace_options): Forward declare.
4551 (linux_arch_setup): Update its comment for general use.
4552 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4553 (struct linux_target_ops): Use linux_post_create_inferior.
4554 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4555 to post_create_inferior.
4556 * nto-low.c (struct nto_target_ops): Likewise.
4557 * spu-low.c (struct spu_target_ops): Likewise.
4558 * win32-low.c (struct win32_target_ops): Likewise.
4559
e58c48b4
AT
45602015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4561
4562 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4563
fbec8956
AT
45642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4565
4566 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4567 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4568 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4569 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4570 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4571 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4572 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4573 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4574 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4575 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4576 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4577 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4578
9b4c5f87
AT
45792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4580
4581 * linux-low.c (linux_look_up_symbols): Don't call
4582 linux_supports_traceclone.
4583 * linux-low.h (thread_db_init): Remove use_events argument.
4584 * thread-db.c (thread_db_use_event): Remove global variable.
4585 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4586 (struct thread_db) <td_create_bp>: Remove field.
4587 (thread_db_create_event): Remove function.
4588 (thread_db_enable_reporting): Likewise.
4589 (find_one_thread): Don't check for thread_db_use_events.
4590 (attach_thread): Likewise.
4591 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4592 (try_thread_db_load_1): Don't check for thread_db_use_events.
4593 (thread_db_init): Remove use_events argument and thread events
4594 handling.
4595 (remove_thread_event_breakpoints): Remove function.
4596 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4597
7d00775e
AT
45982015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4599
4600 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4601 New function.
4602 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4603 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4604 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4605 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4606 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4607 Initialize.
4608 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4609 New function.
4610 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4611 * linux-low.c (can_hardware_single_step): Use
4612 supports_hardware_single_step.
4613 (can_software_single_step): New function.
4614 (start_step_over): Call can_software_single_step.
4615 (linux_supports_hardware_single_step): New function.
4616 (struct target_ops) <supports_software_single_step>: Initialize.
4617 * linux-low.h (struct linux_target_ops)
4618 <supports_hardware_single_step>: Initialize.
4619 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4620 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4621 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4622 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4623 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4624 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4625 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4626 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4627 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4628 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4629 Initialize.
4630 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4631 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4632 Initialize.
4633 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4634 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4635 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4636 New function.
4637 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4638 * target.h (struct target_ops): <supports_software_single_step>:
4639 New field.
4640 (target_supports_software_single_step): New macro.
4641
2d97cd35
AT
46422015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4643
4644 * linux-low.c (linux_wait_1): Fix pc advance condition.
4645 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4646 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4647
769ef81f
AT
46482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4649
4650 * linux-arm-low.c (arm_is_thumb_mode): New function.
4651 (arm_breakpoint_at): Use arm_is_thumb_mode.
4652 (arm_breakpoint_kind_from_current_state): New function.
4653 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4654 Initialize.
4655 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4656 (linux_breakpoint_kind_from_current_state): New function.
4657 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4658 * linux-low.h (struct linux_target_ops)
4659 <breakpoint_kind_from_current_state>: New field.
4660 * target.h (struct target_ops): Likewise.
4661 (target_breakpoint_kind_from_current_state): New macro.
4662
1bebeeca
PA
46632015-11-30 Pedro Alves <palves@redhat.com>
4664
4665 * linux-low.c (linux_resume): Wake up the event loop before
4666 returning.
4667
a67a9fae
PA
46682015-11-30 Pedro Alves <palves@redhat.com>
4669
4670 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4671 check.
4672 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4673 to -1.
4674 * target.c (struct thread_search): New structure.
4675 (thread_search_callback): New function.
4676 (prev_general_thread): New global.
4677 (prepare_to_access_memory, done_accessing_memory): New functions.
4678 * target.h (prepare_to_access_memory, done_accessing_memory):
4679 Replace macros with function declarations.
4680
f2faf941
PA
46812015-11-30 Pedro Alves <palves@redhat.com>
4682
4683 PR 14618
4684 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4685 report TARGET_WAITKIND_NO_RESUMED.
4686 * remote-utils.c (prepare_resume_reply): Handle
4687 TARGET_WAITKIND_NO_RESUMED.
4688 * server.c (report_no_resumed): New global.
4689 (handle_query) <qSupported>: Handle "no-resumed+". Report
4690 "no-resumed+" support.
4691 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4692 return error if the client doesn't support no-resumed events.
4693 (push_stop_notification): New function.
4694 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4695 events if the client supports them.
4696
a681f9c9
PA
46972015-11-30 Pedro Alves <palves@redhat.com>
4698
4699 * linux-low.c (thread_still_has_status_pending_p): Don't check
4700 vCont;t here.
4701 (lwp_resumed): New function.
4702 (status_pending_p_callback): Return early if the LWP is not
4703 supposed to be resumed.
4704
65706a29
PA
47052015-11-30 Pedro Alves <palves@redhat.com>
4706
4707 * linux-low.c (handle_extended_wait): Assert that the LWP's
4708 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4709 thread create events, leave the new child's status pending.
4710 (linux_low_filter_event): If GDB wants to hear about thread exit
4711 events, leave the LWP marked dead and don't delete it.
4712 (linux_wait_for_event_filtered): Don't check for thread exit.
4713 (filter_exit_event): New function.
4714 (linux_wait_1): Use it, when returning an exit event.
4715 (linux_resume_one_lwp_throw): Assert that the LWP's
4716 waitstatus is TARGET_WAITKIND_IGNORE.
4717 * remote-utils.c (prepare_resume_reply): Handle
4718 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4719 * server.c (report_thread_events): New global.
4720 (handle_general_set): Handle QThreadEvents.
4721 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4722 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4723 TARGET_WAITKIND_THREAD_EXITED.
4724 * server.h (report_thread_events): Declare.
4725
56cf4bed
PA
47262015-11-30 Pedro Alves <palves@redhat.com>
4727
4728 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4729 the thread's last_resume_kind was resume_stop.
4730
500c1d85
PA
47312015-11-30 Pedro Alves <palves@redhat.com>
4732
4733 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4734 before returning.
4735
de979965
PA
47362015-11-30 Pedro Alves <palves@redhat.com>
4737
4738 * server.c (handle_v_requests): Handle vCtrlC.
4739
34c65914
PA
47402015-11-30 Pedro Alves <palves@redhat.com>
4741
4742 * gdbthread.h (find_any_thread_of_pid): Declare.
4743 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4744 functions.
4745 * server.c (handle_query): If current_thread is NULL, look for
4746 another thread of the selected process.
4747
79efa585 47482015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4749 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4750
4751 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4752 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4753 name in reply.
4754 * target.h (struct target_ops) <thread_name>: New field.
4755 (target_thread_name): New macro.
4756
80d82c19
JB
47572015-11-23 Joel Brobecker <brobecker@adacore.com>
4758
4759 * regcache.h (regcache_invalidate_pid): Add declaration.
4760 * regcache.c (regcache_invalidate_pid): New function, extracted
4761 from regcache_invalidate.
4762 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4763 Add trivial documentation comment.
4764 * lynx-low.c: Use regcache_invalidate_pid instead of
4765 regcache_invalidate.
4766
64da5dd5
JB
47672015-11-23 Joel Brobecker <brobecker@adacore.com>
4768
4769 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4770 and Elf64_auxv_t if the target is Android.
4771
37ce4055
DE
47722015-11-22 Doug Evans <xdje42@gmail.com>
4773
4774 * target.h: #include <sys/types.h>.
4775
06e03fff
PA
47762015-11-19 Pedro Alves <palves@redhat.com>
4777
4778 * linux-low.c (linux_process_qsupported): Change prototype.
4779 Adjust.
4780 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4781 Change prototype.
4782 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4783 and adjust to loop over all features.
4784 * server.c (handle_query) <qSupported>: Adjust to call
4785 target_process_qsupported once, passing it a vector of unprocessed
4786 features.
4787 * target.h (struct target_ops) <process_qsupported>: Change
4788 prototype.
4789 (target_process_qsupported): Adjust.
4790
9a084706
PA
47912015-11-19 Pedro Alves <palves@redhat.com>
4792
4793 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4794 mode.
4795 * configure: Regenerate.
4796
dad44a1f
PA
47972015-11-19 Pedro Alves <palves@redhat.com>
4798
4799 * configure: Regenerate.
4800
231c0592
YQ
48012015-11-19 Yao Qi <yao.qi@linaro.org>
4802
4803 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4804 type to uint32_t.
4805
6c1c9a8b
YQ
48062015-11-19 Yao Qi <yao.qi@linaro.org>
4807
4808 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4809 (struct aarch64_operand): Move enum out.
4810
9caa3311
YQ
48112015-11-19 Yao Qi <yao.qi@linaro.org>
4812
4813 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4814 struct user_fpsimd_state *.
4815 (aarch64_store_fpregset): Likewise.
4816
6a69a054
YQ
48172015-11-19 Yao Qi <yao.qi@linaro.org>
4818
4819 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4820 struct user_pt_regs *.
4821 (aarch64_store_gregset): Likewise.
4822
1798301e
PA
48232015-11-18 Pedro Alves <palves@redhat.com>
4824
4825 * Makefile.in (all_object_files): Add $IPA_OBJS.
4826
ce7715e2
PA
48272015-11-17 Pedro Alves <palves@redhat.com>
4828
4829 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4830 GDB_SIGNAL_0 and gdb_signal_to_string.
4831
c0879059
PA
48322015-11-17 Pedro Alves <palves@redhat.com>
4833
4834 * win32-low.c (handle_output_debug_string): Remove parameter.
4835 (win32_kill): Remove our_status local and adjust call to
4836 handle_output_debug_string.
4837 (get_child_debug_event): Adjust call to
4838 handle_output_debug_string.
4839
1996e237
SM
48402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4841
4842 * linux-mips-low.c (mips_fill_gregset): Add cast.
4843 (mips_store_gregset): Likewise.
4844 (mips_fill_fpregset): Likewise.
4845 (mips_store_fpregset): Likewise.
4846
cbec665b
SM
48472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4848
4849 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4850 priv.
4851
eb3e3c67
SM
48522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4853
4854 * linux-mips-low.c (mips_linux_new_thread): Change type of
4855 watch_type to enum target_hw_bp_type.
4856
171de4b8
SM
48572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4858
4859 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4860 Change return type to arm_hwbp_type.
4861
04248ead
SM
48622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4863
4864 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4865 (arm_store_gregset): Likewise.
4866 * linux-arm-low.c (arm_get_hwcap): Likewise.
4867 (arm_read_description): Likewise.
4868
04b3479c
SM
48692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4870
4871 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4872
2bc84e8a
SM
48732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4874
4875 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4876 (ppc_fill_vsxregset): Likewise.
4877 (ppc_store_vsxregset): Likewise.
4878 (ppc_fill_vrregset): Likewise.
4879 (ppc_store_vrregset): Likewise.
4880 (ppc_fill_evrregset): Likewise.
4881 (ppc_store_evrregset): Likewise.
4882
e6c5bb05
SM
48832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4884
4885 * linux-ppc-low.c (ppc_usrregs_info): Remove
4886 forward-declaration.
4887 (ppc_arch_setup): Move lower in file.
4888
7ea45d72
SM
48892015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4890
4891 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4892 (ps_pdwrite): Likewise.
4893
69291610
HW
48942015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4895
4896 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4897 to after assert checks.
4898
b42945fd
SM
48992015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4900
4901 * proc-service.c (ps_pdread): Add/adjust casts.
4902 (ps_pdwrite): Add/adjust casts.
4903
d6f85c84
SM
49042015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4905
4906 * server.c (handle_search_memory_1): Cast return value of
4907 memmem.
4908
f98cd059
SM
49092015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4910
4911 * server.c (write_qxfer_response): Change type of data to
4912 gdb_byte *.
4913
d2412fa5
PA
49142015-10-29 Pedro Alves <palves@redhat.com>
4915
4916 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4917
c17414a2
PA
49182015-10-29 Pedro Alves <palves@redhat.com>
4919
4920 * tracepoint.c (clear_installed_tracepoints): Add casts.
4921
e053fbc4
PA
49222015-10-29 Pedro Alves <palves@redhat.com>
4923
4924 * server.c (handle_v_cont, process_serial_event): Add enum
4925 gdb_signal casts to signal parsing code.
4926
add67df8
PA
49272015-10-29 Pedro Alves <palves@redhat.com>
4928
4929 * linux-low.h (NULL_REGSET): Define.
4930 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4931 * linux-arm-low.c (arm_regsets): Likewise.
4932 * linux-crisv32-low.c (cris_regsets): Likewise.
4933 * linux-m68k-low.c (m68k_regsets): Likewise.
4934 * linux-mips-low.c (mips_regsets): Likewise.
4935 * linux-nios2-low.c (nios2_regsets): Likewise.
4936 * linux-ppc-low.c (ppc_regsets): Likewise.
4937 * linux-s390-low.c (s390_regsets): Likewise.
4938 * linux-sh-low.c (sh_regsets): Likewise.
4939 * linux-sparc-low.c (sparc_regsets): Likewise.
4940 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4941 * linux-tile-low.c (tile_regsets): Likewise.
4942 * linux-x86-low.c (x86_regsets): Likewise.
4943 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4944
50bc912a
PA
49452015-10-29 Pedro Alves <palves@redhat.com>
4946
4947 * linux-low.h (NULL_REGSET): Define.
4948 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4949 * linux-arm-low.c (arm_regsets): Likewise.
4950 * linux-crisv32-low.c (cris_regsets): Likewise.
4951 * linux-m68k-low.c (m68k_regsets): Likewise.
4952 * linux-mips-low.c (mips_regsets): Likewise.
4953 * linux-nios2-low.c (nios2_regsets): Likewise.
4954 * linux-ppc-low.c (ppc_regsets): Likewise.
4955 * linux-s390-low.c (s390_regsets): Likewise.
4956 * linux-sh-low.c (sh_regsets): Likewise.
4957 * linux-sparc-low.c (sparc_regsets): Likewise.
4958 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4959 * linux-tile-low.c (tile_regsets): Likewise.
4960 * linux-x86-low.c (x86_regsets): Likewise.
4961 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4962
682b2546
DE
49632015-10-26 Doug Evans <dje@google.com>
4964
4965 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4966
963843d4
DE
49672015-10-26 Doug Evans <dje@google.com>
4968
4969 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4970
d41401ac
DE
49712015-10-26 Doug Evans <dje@google.com>
4972
4973 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4974 for debug_printf.
4975 (attach_thread, find_new_threads_callback): Ditto.
4976
3db28855
AT
49772015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4978
4979 * mem-break.h (set_breakpoint_data): Remove.
4980
fb78e89c
AT
49812015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4982
4983 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4984 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4985 (initialize_low): Remove set_breakpoint_data call.
4986 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4987 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4988 (initialize_low): Remove set_breakpoint_data call.
4989 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4990 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4991 (initialize_low): Remove set_breakpoint_data call.
4992
2e6ee069
AT
49932015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4994
4995 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4996 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4997 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4998 * target.h (target_breakpoint_kind_from_pc): New macro.
4999
1652a986
AT
50002015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5001
5002 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5003 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5004 the default breakpoint kind.
5005
abeead09
AT
50062015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5007
5008 * linux-arm-low.c (arm_supports_z_point_type): Add software
5009 breakpoint support.
5010
b0b4b501
AT
50112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5012
5013 * linux-arm-low.c: Refactor breakpoint definitions.
5014 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5015 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5016
8689682c
AT
50172015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5018
5019 * Makefile.in: Add arm.c/o.
5020 * configure.srv: Likewise.
5021 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5022 (arm_breakpoint_kind_from_pc): New function.
5023 (arm_sw_breakpoint_from_kind): Return proper kind.
5024 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5025
27165294
AT
50262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5027
5028 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5029 removal.
5030 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5031 (struct raw_breakpoint) <size>: Remove.
5032 (struct raw_breakpoint) <kind>: Add.
5033 (bp_size): New function.
5034 (bp_opcode): Likewise.
5035 (find_raw_breakpoint_at): Adjust for kind.
5036 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5037 (remove_memory_breakpoint): Adjust for kind call bp_size.
5038 (set_raw_breakpoint_at): Adjust for kind.
5039 (set_breakpoint): Likewise.
5040 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5041 (delete_raw_breakpoint): Adjust for kind.
5042 (delete_breakpoint): Likewise.
5043 (find_gdb_breakpoint): Likewise.
5044 (set_gdb_breakpoint_1): Likewise.
5045 (set_gdb_breakpoint): Likewise.
5046 (delete_gdb_breakpoint_1): Likewise.
5047 (delete_gdb_breakpoint): Likewise.
5048 (uninsert_raw_breakpoint): Likewise.
5049 (reinsert_raw_breakpoint): Likewise.
5050 (set_breakpoint_data): Remove.
5051 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5052 (check_mem_read): Adjust for kind call bp_size.
5053 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5054 (clone_one_breakpoint): Adjust for kind.
5055 * mem-break.h (set_gdb_breakpoint): Likewise.
5056 (delete_gdb_breakpoint): Likewise.
5057 * server.c (process_serial_event): Likewise.
5058
dd373349
AT
50592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5060
5061 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5062 (struct linux_target_ops) <breakpoint>: Remove.
5063 (struct linux_target_ops) <breakpoint_len>: Remove.
5064 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5065 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5066 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5067 (arm_sw_breakpoint_from_kind): New function.
5068 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5069 (struct linux_target_ops) <breakpoint>: Remove.
5070 (struct linux_target_ops) <breakpoint_len>: Remove.
5071 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5072 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5073 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5074 (struct linux_target_ops) <breakpoint>: Remove.
5075 (struct linux_target_ops) <breakpoint_len>: Remove.
5076 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5077 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5078 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5079 (struct linux_target_ops) <breakpoint>: Remove.
5080 (struct linux_target_ops) <breakpoint_len>: Remove.
5081 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5082 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5083 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5084 and sw_breakpoint_from_kind to increment the pc.
5085 (linux_breakpoint_kind_from_pc): New function.
5086 (linux_sw_breakpoint_from_kind): New function.
5087 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5088 (initialize_low): Call breakpoint_kind_from_pc and
5089 sw_breakpoint_from_kind to replace breakpoint_data/len.
5090 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5091 New field.
5092 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5093 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5094 (struct linux_target_ops) <breakpoint>: Remove.
5095 (struct linux_target_ops) <breakpoint_len>: Remove.
5096 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5097 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5098 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5099 (struct linux_target_ops) <breakpoint>: Remove.
5100 (struct linux_target_ops) <breakpoint_len>: Remove.
5101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5103 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5104 (struct linux_target_ops) <breakpoint>: Remove.
5105 (struct linux_target_ops) <breakpoint_len>: Remove.
5106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5108 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5109 (struct linux_target_ops) <breakpoint>: Remove.
5110 (struct linux_target_ops) <breakpoint_len>: Remove.
5111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5113 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5114 (struct linux_target_ops) <breakpoint>: Remove.
5115 (struct linux_target_ops) <breakpoint_len>: Remove.
5116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5118 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5119 (struct linux_target_ops) <breakpoint>: Remove.
5120 (struct linux_target_ops) <breakpoint_len>: Remove.
5121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5123 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5124 (struct linux_target_ops) <breakpoint>: Remove.
5125 (struct linux_target_ops) <breakpoint_len>: Remove.
5126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5128 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5129 (struct linux_target_ops) <breakpoint>: Remove.
5130 (struct linux_target_ops) <breakpoint_len>: Remove.
5131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5133 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5134 (struct linux_target_ops) <breakpoint>: Remove.
5135 (struct linux_target_ops) <breakpoint_len>: Remove.
5136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5138 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5139 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5140 (struct linux_target_ops) <breakpoint>: Remove.
5141 (struct linux_target_ops) <breakpoint_len>: Remove.
5142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5144 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5145 (struct linux_target_ops) <breakpoint>: Remove.
5146 (struct linux_target_ops) <breakpoint_len>: Remove.
5147 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5148 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5149
4cd98a19
AT
51502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5151
5152 * linux-cris-low.c (cris_get_pc): Remove void arg.
5153
774ee6d2
AR
51542015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5155
5156 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5157 variable name.
5158
833dcd29
AR
51592015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5160
5161 * inferiors.c (thread_pid_matches_callback): New function.
5162 (find_thread_process): New function.
5163 (remove_thread): Reset current_thread.
5164 (remove_process): Assert threads have been removed first.
5165
8d689ee5
YQ
51662015-10-15 Yao Qi <yao.qi@linaro.org>
5167
5168 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5169 if it is 3.
5170 (aarch64_remove_point): Likewise.
5171 * regcache.c (regcache_register_size): New function.
5172
1c2e1515
YQ
51732015-10-12 Yao Qi <yao.qi@linaro.org>
5174
5175 * linux-aarch64-low.c: Update all callers as emit_load_store
5176 is renamed to aarch64_emit_load_store.
5177
e1c587c3
YQ
51782015-10-12 Yao Qi <yao.qi@linaro.org>
5179
5180 * linux-aarch64-low.c: Update all callers of function renaming
5181 from emit_insn to aarch64_emit_insn.
5182
b6542f81
YQ
51832015-10-12 Yao Qi <yao.qi@linaro.org>
5184
5185 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5186 arch/aarch64-insn.h.
5187 (struct aarch64_memory_operand): Likewise.
5188 (ENCODE): Likewise.
5189 (emit_insn): Move to arch/aarch64-insn.c.
5190 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5191 (emit_load_store): Move to arch/aarch64-insn.c.
5192 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5193 (can_encode_int32): Remove.
5194
246994ce
YQ
51952015-10-12 Yao Qi <yao.qi@linaro.org>
5196
5197 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5198 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5199 (aarch64_relocate_instruction): Likewise.
5200 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5201 (struct aarch64_insn_visitor): Likewise.
5202
0badd99f
YQ
52032015-10-12 Yao Qi <yao.qi@linaro.org>
5204
5205 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5206 (struct aarch64_insn_visitor): New.
5207 (struct aarch64_insn_relocation_data): New.
5208 (aarch64_ftrace_insn_reloc_b): New function.
5209 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5210 (aarch64_ftrace_insn_reloc_cb): Likewise.
5211 (aarch64_ftrace_insn_reloc_tb): Likewise.
5212 (aarch64_ftrace_insn_reloc_adr): Likewise.
5213 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5214 (aarch64_ftrace_insn_reloc_others): Likewise.
5215 (visitor): New.
5216 (aarch64_relocate_instruction): Use visitor.
5217
dfaffe9d
YQ
52182015-10-12 Yao Qi <yao.qi@linaro.org>
5219
5220 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5221 int. Add argument buf.
5222 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5223 aarch64_relocate_instruction.
5224
70b439f0
YQ
52252015-10-12 Yao Qi <yao.qi@linaro.org>
5226
5227 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5228 argument insn. Remove local variable insn. Don't call
5229 target_read_uint32.
5230 (aarch64_install_fast_tracepoint_jump_pad): Call
5231 target_read_uint32.
5232
7781c06f
YQ
52332015-09-30 Yao Qi <yao.qi@linaro.org>
5234
5235 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5236 (emit_load_store_pair): Likewise.
5237
9a3c8263
SM
52382015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5239
5240 * dll.c (match_dll): Add cast(s).
5241 (unloaded_dll): Likewise.
5242 * linux-low.c (second_thread_of_pid_p): Likewise.
5243 (delete_lwp_callback): Likewise.
5244 (count_events_callback): Likewise.
5245 (select_event_lwp_callback): Likewise.
5246 (linux_set_resume_request): Likewise.
5247 * server.c (accumulate_file_name_length): Likewise.
5248 (emit_dll_description): Likewise.
5249 (handle_qxfer_threads_worker): Likewise.
5250 (visit_actioned_threads): Likewise.
5251 * thread-db.c (any_thread_of): Likewise.
5252 * tracepoint.c (same_process_p): Likewise.
5253 (match_blocktype): Likewise.
5254 (build_traceframe_info_xml): Likewise.
5255
224c3ddb
SM
52562015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5257
5258 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5259 assignment.
5260 (gdb_unparse_agent_expr): Likewise.
5261 * hostio.c (require_data): Likewise.
5262 (handle_pread): Likewise.
5263 * linux-low.c (disable_regset): Likewise.
5264 (fetch_register): Likewise.
5265 (store_register): Likewise.
5266 (get_dynamic): Likewise.
5267 (linux_qxfer_libraries_svr4): Likewise.
5268 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5269 (set_fast_tracepoint_jump): Likewise.
5270 (uninsert_fast_tracepoint_jumps_at): Likewise.
5271 (reinsert_fast_tracepoint_jumps_at): Likewise.
5272 (validate_inserted_breakpoint): Likewise.
5273 (clone_agent_expr): Likewise.
5274 * regcache.c (init_register_cache): Likewise.
5275 * remote-utils.c (putpkt_binary_1): Likewise.
5276 (decode_M_packet): Likewise.
5277 (decode_X_packet): Likewise.
5278 (look_up_one_symbol): Likewise.
5279 (relocate_instruction): Likewise.
5280 (monitor_output): Likewise.
5281 * server.c (handle_search_memory): Likewise.
5282 (handle_qxfer_exec_file): Likewise.
5283 (handle_qxfer_libraries): Likewise.
5284 (handle_qxfer): Likewise.
5285 (handle_query): Likewise.
5286 (handle_v_cont): Likewise.
5287 (handle_v_run): Likewise.
5288 (captured_main): Likewise.
5289 * target.c (write_inferior_memory): Likewise.
5290 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5291 * tracepoint.c (init_trace_buffer): Likewise.
5292 (add_tracepoint_action): Likewise.
5293 (add_traceframe): Likewise.
5294 (add_traceframe_block): Likewise.
5295 (cmd_qtdpsrc): Likewise.
5296 (cmd_qtdv): Likewise.
5297 (cmd_qtstatus): Likewise.
5298 (response_source): Likewise.
5299 (response_tsv): Likewise.
5300 (cmd_qtnotes): Likewise.
5301 (gdb_collect): Likewise.
5302 (initialize_tracepoint): Likewise.
5303
afbe19f8
PL
53042015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5305
5306 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5307 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5308 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5309 <NOP>: New.
5310 (enum aarch64_condition_codes): New enum.
5311 (w0): New static global.
5312 (fp): Likewise.
5313 (lr): Likewise.
5314 (struct aarch64_memory_operand) <type>: New
5315 MEMORY_OPERAND_POSTINDEX type.
5316 (postindex_memory_operand): New helper function.
5317 (emit_ret): New function.
5318 (emit_load_store_pair): New function, factored out of emit_stp
5319 with support for MEMORY_OPERAND_POSTINDEX.
5320 (emit_stp): Rewrite using emit_load_store_pair.
5321 (emit_ldp): New function.
5322 (emit_load_store): Likewise.
5323 (emit_ldr): Mention post-index instruction in comment.
5324 (emit_ldrh): New function.
5325 (emit_ldrb): New function.
5326 (emit_ldrsw): Mention post-index instruction in comment.
5327 (emit_str): Likewise.
5328 (emit_subs): New function.
5329 (emit_cmp): Likewise.
5330 (emit_and): Likewise.
5331 (emit_orr): Likewise.
5332 (emit_orn): Likewise.
5333 (emit_eor): Likewise.
5334 (emit_mvn): Likewise.
5335 (emit_lslv): Likewise.
5336 (emit_lsrv): Likewise.
5337 (emit_asrv): Likewise.
5338 (emit_mul): Likewise.
5339 (emit_sbfm): Likewise.
5340 (emit_sbfx): Likewise.
5341 (emit_ubfm): Likewise.
5342 (emit_ubfx): Likewise.
5343 (emit_csinc): Likewise.
5344 (emit_cset): Likewise.
5345 (emit_nop): Likewise.
5346 (emit_ops_insns): New helper function.
5347 (emit_pop): Likewise.
5348 (emit_push): Likewise.
5349 (aarch64_emit_prologue): New function.
5350 (aarch64_emit_epilogue): Likewise.
5351 (aarch64_emit_add): Likewise.
5352 (aarch64_emit_sub): Likewise.
5353 (aarch64_emit_mul): Likewise.
5354 (aarch64_emit_lsh): Likewise.
5355 (aarch64_emit_rsh_signed): Likewise.
5356 (aarch64_emit_rsh_unsigned): Likewise.
5357 (aarch64_emit_ext): Likewise.
5358 (aarch64_emit_log_not): Likewise.
5359 (aarch64_emit_bit_and): Likewise.
5360 (aarch64_emit_bit_or): Likewise.
5361 (aarch64_emit_bit_xor): Likewise.
5362 (aarch64_emit_bit_not): Likewise.
5363 (aarch64_emit_equal): Likewise.
5364 (aarch64_emit_less_signed): Likewise.
5365 (aarch64_emit_less_unsigned): Likewise.
5366 (aarch64_emit_ref): Likewise.
5367 (aarch64_emit_if_goto): Likewise.
5368 (aarch64_emit_goto): Likewise.
5369 (aarch64_write_goto_address): Likewise.
5370 (aarch64_emit_const): Likewise.
5371 (aarch64_emit_call): Likewise.
5372 (aarch64_emit_reg): Likewise.
5373 (aarch64_emit_pop): Likewise.
5374 (aarch64_emit_stack_flush): Likewise.
5375 (aarch64_emit_zero_ext): Likewise.
5376 (aarch64_emit_swap): Likewise.
5377 (aarch64_emit_stack_adjust): Likewise.
5378 (aarch64_emit_int_call_1): Likewise.
5379 (aarch64_emit_void_call_2): Likewise.
5380 (aarch64_emit_eq_goto): Likewise.
5381 (aarch64_emit_ne_goto): Likewise.
5382 (aarch64_emit_lt_goto): Likewise.
5383 (aarch64_emit_le_goto): Likewise.
5384 (aarch64_emit_gt_goto): Likewise.
5385 (aarch64_emit_ge_got): Likewise.
5386 (aarch64_emit_ops_impl): New static global variable.
5387 (aarch64_emit_ops): New target function, return
5388 &aarch64_emit_ops_impl.
5389 (struct linux_target_ops): Install it.
5390
bb903df0
PL
53912015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5392
5393 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5394 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5395 aarch64-ipa.o.
5396 * linux-aarch64-ipa.c: New file.
5397 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5398 and endian.h.
5399 (aarch64_get_thread_area): New target method.
5400 (extract_signed_bitfield): New helper function.
5401 (aarch64_decode_ldr_literal): New function.
5402 (enum aarch64_opcodes): New enum.
5403 (struct aarch64_register): New struct.
5404 (struct aarch64_operand): New struct.
5405 (x0): New static global.
5406 (x1): Likewise.
5407 (x2): Likewise.
5408 (x3): Likewise.
5409 (x4): Likewise.
5410 (w2): Likewise.
5411 (ip0): Likewise.
5412 (sp): Likewise.
5413 (xzr): Likewise.
5414 (aarch64_register): New helper function.
5415 (register_operand): Likewise.
5416 (immediate_operand): Likewise.
5417 (struct aarch64_memory_operand): New struct.
5418 (offset_memory_operand): New helper function.
5419 (preindex_memory_operand): Likewise.
5420 (enum aarch64_system_control_registers): New enum.
5421 (ENCODE): New macro.
5422 (emit_insn): New helper function.
5423 (emit_b): New function.
5424 (emit_bcond): Likewise.
5425 (emit_cb): Likewise.
5426 (emit_tb): Likewise.
5427 (emit_blr): Likewise.
5428 (emit_stp): Likewise.
5429 (emit_ldp_q_offset): Likewise.
5430 (emit_stp_q_offset): Likewise.
5431 (emit_load_store): Likewise.
5432 (emit_ldr): Likewise.
5433 (emit_ldrsw): Likewise.
5434 (emit_str): Likewise.
5435 (emit_ldaxr): Likewise.
5436 (emit_stxr): Likewise.
5437 (emit_stlr): Likewise.
5438 (emit_data_processing_reg): Likewise.
5439 (emit_data_processing): Likewise.
5440 (emit_add): Likewise.
5441 (emit_sub): Likewise.
5442 (emit_mov): Likewise.
5443 (emit_movk): Likewise.
5444 (emit_mov_addr): Likewise.
5445 (emit_mrs): Likewise.
5446 (emit_msr): Likewise.
5447 (emit_sevl): Likewise.
5448 (emit_wfe): Likewise.
5449 (append_insns): Likewise.
5450 (can_encode_int32_in): New helper function.
5451 (aarch64_relocate_instruction): New function.
5452 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5453 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5454 (struct linux_target_ops): Install aarch64_get_thread_area,
5455 aarch64_install_fast_tracepoint_jump_pad and
5456 aarch64_get_min_fast_tracepoint_insn_len.
5457
787749ea
PL
54582015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5459
5460 * Makefile.in (aarch64-insn.o): New rule.
5461 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5462
9812b2e6
YQ
54632015-09-21 Yao Qi <yao.qi@linaro.org>
5464
5465 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5466
18fe412b
YQ
54672015-09-21 Yao Qi <yao.qi@linaro.org>
5468
5469 * tracepoint.c (max_jump_pad_size): Remove.
5470
a0cc84cd
YQ
54712015-09-18 Yao Qi <yao.qi@linaro.org>
5472
5473 * linux-aarch64-low.c: Don't include sys/uio.h.
5474 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5475
d78908cf
WW
54762015-09-16 Wei-cheng Wang <cole945@gmail.com>
5477
5478 * tracepoint.c (eval_result_type): Change prototype.
5479 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5480
d57e0d50
PA
54812015-09-15 Pedro Alves <palves@redhat.com>
5482
5483 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5484 Check whether to report exec events instead of checking whether
5485 multiprocess is enabled.
5486
5a676acc
PA
54872015-09-15 Pedro Alves <palves@redhat.com>
5488
5489 PR remote/18965
5490 * remote-utils.c (prepare_resume_reply): Merge
5491 TARGET_WAITKIND_VFORK_DONE switch case with the
5492 TARGET_WAITKIND_FORKED case.
5493
7c5d0fad
YQ
54942015-09-15 Yao Qi <yao.qi@linaro.org>
5495
5496 * server.c (handle_query): Check string comparison using
5497 "else if" instead of "if".
5498
750ce8d1
YQ
54992015-09-15 Yao Qi <yao.qi@linaro.org>
5500
5501 * server.c (vCont_supported): New global variable.
5502 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5503 matches. Append ";vContSupported+" to own_buf.
5504 (handle_v_requests): Append ";s;S" to own_buf if target supports
5505 hardware single step or vCont_supported is false.
5506 (capture_main): Set vCont_supported to zero.
5507
70b90b91
YQ
55082015-09-15 Yao Qi <yao.qi@linaro.org>
5509
5510 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5511 it to ...
5512 (linux_supports_hardware_single_step): ... New function.
5513 (linux_target_ops): Update.
5514 * lynx-low.c (lynx_target_ops): Set field
5515 supports_hardware_single_step to target_can_do_hardware_single_step.
5516 * nto-low.c (nto_target_ops): Likewise.
5517 * spu-low.c (spu_target_ops): Likewise.
5518 * win32-low.c (win32_target_ops): Likewise.
5519 * target.c (target_can_do_hardware_single_step): New function.
5520 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5521 Remove. <supports_hardware_single_step>: New field.
5522 (target_supports_conditional_breakpoints): Remove.
5523 (target_supports_hardware_single_step): New macro.
5524 (target_can_do_hardware_single_step): Declare.
5525 * server.c (handle_query): Use target_supports_hardware_single_step
5526 instead of target_supports_conditional_breakpoints.
5527
ade90bde
YQ
55282015-09-15 Yao Qi <yao.qi@linaro.org>
5529
5530 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5531 function.
5532 (struct linux_target_ops the_low_target): Install
5533 aarch64_linux_siginfo_fixup.
5534
94585166
DB
55352015-09-11 Don Breazeal <donb@codesourcery.com>
5536 Luis Machado <lgustavo@codesourcery.com>
5537
5538 * linux-low.c (linux_mourn): Static declaration.
5539 (linux_arch_setup): Move in front of
5540 handle_extended_wait.
5541 (linux_arch_setup_thread): New function.
5542 (handle_extended_wait): Handle exec events. Call
5543 linux_arch_setup_thread. Make event_lwp argument a
5544 pointer-to-a-pointer.
5545 (check_zombie_leaders): Do not check stopped threads.
5546 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5547 (linux_low_filter_event): Add lwp and thread for exec'ing
5548 non-leader thread if leader thread has been deleted.
5549 Refactor code into linux_arch_setup_thread and call it.
5550 Pass child lwp pointer by reference to handle_extended_wait.
5551 (linux_wait_for_event_filtered): Update comment.
5552 (linux_wait_1): Prevent clobbering exec event status.
5553 (linux_supports_exec_events): New function.
5554 (linux_target_ops) <supports_exec_events>: Initialize new member.
5555 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5556 new member.
5557 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5558 * server.c (report_exec_events): New global variable.
5559 (handle_query): Handle qSupported query for exec-events feature.
5560 (captured_main): Initialize report_exec_events.
5561 * server.h (report_exec_events): Declare new global variable.
5562 * target.h (struct target_ops) <supports_exec_events>: New
5563 member.
5564 (target_supports_exec_events): New macro.
5565 * win32-low.c (win32_target_ops) <supports_exec_events>:
5566 Initialize new member.
5567
0568462b
MM
55682015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5569
5570 * linux-low.c (linux_low_enable_btrace): Remove.
5571 (linux_target_ops): Replace linux_low_enable_btrace with
5572 linux_enable_btrace.
5573
39edd165
YQ
55742015-09-03 Yao Qi <yao.qi@linaro.org>
5575
5576 * linux-aarch64-low.c (aarch64_insert_point): Call
5577 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5578 returns true.
5579
1db33b5a
UW
55802015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5581
5582 * linux-low.c (check_stopped_by_breakpoint): Use
5583 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5584
ab290430
PA
55852015-08-27 Pedro Alves <palves@redhat.com>
5586
5587 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5588
8d749320
SM
55892015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5590
6711b7f8
SM
5591 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5592 the XNEW-family equivalent.
8d749320
SM
5593 (compile_bytecodes): Likewise.
5594 * dll.c (loaded_dll): Likewise.
5595 * event-loop.c (append_callback_event): Likewise.
5596 (create_file_handler): Likewise.
5597 (create_file_event): Likewise.
5598 * hostio.c (handle_open): Likewise.
5599 * inferiors.c (add_thread): Likewise.
5600 (add_process): Likewise.
5601 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5602 * linux-arm-low.c (arm_new_process): Likewise.
5603 (arm_new_thread): Likewise.
5604 * linux-low.c (add_to_pid_list): Likewise.
5605 (linux_add_process): Likewise.
5606 (handle_extended_wait): Likewise.
5607 (add_lwp): Likewise.
5608 (enqueue_one_deferred_signal): Likewise.
5609 (enqueue_pending_signal): Likewise.
5610 (linux_resume_one_lwp_throw): Likewise.
5611 (linux_resume_one_thread): Likewise.
5612 (linux_read_memory): Likewise.
5613 (linux_write_memory): Likewise.
5614 * linux-mips-low.c (mips_linux_new_process): Likewise.
5615 (mips_linux_new_thread): Likewise.
5616 (mips_add_watchpoint): Likewise.
5617 * linux-x86-low.c (initialize_low_arch): Likewise.
5618 * lynx-low.c (lynx_add_process): Likewise.
5619 * mem-break.c (set_raw_breakpoint_at): Likewise.
5620 (set_breakpoint): Likewise.
5621 (add_condition_to_breakpoint): Likewise.
5622 (add_commands_to_breakpoint): Likewise.
5623 (clone_agent_expr): Likewise.
5624 (clone_one_breakpoint): Likewise.
5625 * regcache.c (new_register_cache): Likewise.
5626 * remote-utils.c (look_up_one_symbol): Likewise.
5627 * server.c (queue_stop_reply): Likewise.
5628 (start_inferior): Likewise.
5629 (queue_stop_reply_callback): Likewise.
5630 (handle_target_event): Likewise.
5631 * spu-low.c (fetch_ppc_memory): Likewise.
5632 (store_ppc_memory): Likewise.
5633 * target.c (set_target_ops): Likewise.
5634 * thread-db.c (thread_db_load_search): Likewise.
5635 (try_thread_db_load_1): Likewise.
5636 * tracepoint.c (add_tracepoint): Likewise.
5637 (add_tracepoint_action): Likewise.
5638 (create_trace_state_variable): Likewise.
5639 (cmd_qtdpsrc): Likewise.
5640 (cmd_qtro): Likewise.
5641 (add_while_stepping_state): Likewise.
5642 * win32-low.c (child_add_thread): Likewise.
5643 (get_image_name): Likewise.
5644
ed8b7b42
YQ
56452015-08-25 Yao Qi <yao.qi@linaro.org>
5646
5647 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5648
db3cb7cb
YQ
56492015-08-25 Yao Qi <yao.qi@linaro.org>
5650
5651 * Makefile.in (aarch64-linux.o): New rule.
5652 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5653 srv_tgtobj.
5654 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5655 (aarch64_init_debug_reg_state): Make it extern.
5656 (aarch64_linux_prepare_to_resume): Remove.
5657
f6011a1c
YQ
56582015-08-25 Yao Qi <yao.qi@linaro.org>
5659
5660 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5661 lwp_arch_private_info and ptid_of_lwp.
5662
88e2cf7e
YQ
56632015-08-25 Yao Qi <yao.qi@linaro.org>
5664
5665 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5666 Find proc_info by find_process_pid. All callers updated.
5667
5e35436e
YQ
56682015-08-25 Yao Qi <yao.qi@linaro.org>
5669
5670 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5671 Remove.
5672 (debug_reg_change_callback): Remove.
5673 (aarch64_notify_debug_reg_change): Remove.
5674
4a8a7965
YQ
56752015-08-25 Yao Qi <yao.qi@linaro.org>
5676
5677 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5678 Call current_lwp_ptid.
5679
32a271ee
YQ
56802015-08-25 Yao Qi <yao.qi@linaro.org>
5681
5682 * linux-aarch64-low.c (debug_reg_change_callback): Use
5683 debug_printf.
5684
0d51c8d7
YQ
56852015-08-25 Yao Qi <yao.qi@linaro.org>
5686
5687 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5688
31a43dd5
YQ
56892015-08-25 Yao Qi <yao.qi@linaro.org>
5690
5691 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5692
8ee52567
YQ
56932015-08-25 Yao Qi <yao.qi@linaro.org>
5694
5695 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5696 the code.
5697
ff3f0f45
YQ
56982015-08-25 Yao Qi <yao.qi@linaro.org>
5699
5700 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5701 Remove.
5702 (debug_reg_change_callback): Remove argument entry and add argument
5703 lwp. Remove local variable thread. Don't print thread id in the
5704 debugging output. Don't check whether pid of thread equals to pid.
5705 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5706 iterate_over_lwps instead find_inferior.
5707
3d40fbb5
PA
57082015-08-24 Pedro Alves <palves@redhat.com>
5709
5710 * inferiors.c (get_first_process): New function.
5711 * inferiors.h (get_first_process): New declaration.
5712 * remote-utils.c (read_ptid): Default to the first process in the
5713 list, instead of to the current thread's process.
5714
438e1e42
PA
57152015-08-24 Pedro Alves <palves@redhat.com>
5716
5717 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5718 * event-loop.c: Likewise.
5719 * remote-utils.c: Likewise.
5720 * tracepoint.c: Likewise.
5721
a8c6d4fc
PA
57222015-08-24 Pedro Alves <palves@redhat.com>
5723
5724 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5725 ptid_get_lwp.
5726
99b0bb12
PA
57272015-08-21 Pedro Alves <palves@redhat.com>
5728
5729 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5730 instead of literal 1.
5731
f8904751
PA
57322015-08-21 Pedro Alves <palves@redhat.com>
5733
5734 * tdesc.c (default_description): Explicitly zero-initialize.
5735
465a859e
PA
57362015-08-21 Pedro Alves <palves@redhat.com>
5737
5738 PR gdb/18749
5739 * inferiors.c (remove_thread): Discard any pending stop reply for
5740 this thread.
5741 * server.c (remove_all_on_match_pid): Rename to ...
5742 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5743 instead of a pid.
5744 (discard_queued_stop_replies): Change parameter to a ptid. Now
5745 extern.
5746 (handle_v_kill, kill_inferior_callback, captured_main)
5747 (process_serial_event): Adjust.
5748 * server.h (discard_queued_stop_replies): Declare.
5749
f0db101d
PA
57502015-08-21 Pedro Alves <palves@redhat.com>
5751
5752 * linux-low.c (wait_for_sigstop): Always switch to no thread
5753 selected if the previously current thread dies.
5754 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5755 process instead of the current thread's.
5756 * remote-utils.c (input_interrupt): Don't check if there's no
5757 current thread.
5758 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5759 current thread to the general thread fails, error out.
5760 (handle_qxfer_auxv, handle_qxfer_libraries)
5761 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5762 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5763 (handle_query): Check if there's a thread selected instead of
5764 checking whether there's any thread in the thread list.
5765 (handle_qxfer_threads, handle_qxfer_btrace)
5766 (handle_qxfer_btrace_conf): Don't error out early if there's no
5767 thread in the thread list.
5768 (handle_v_cont, myresume): Don't set the current thread to the
5769 continue thread.
5770 (process_serial_event) <Hg handling>: Also set thread_id if the
5771 previous general thread is still alive.
5772 (process_serial_event) <g/G handling>: If setting the current
5773 thread to the general thread fails, error out.
5774 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5775 thread's lwp instead of the current thread's.
5776 * target.c (set_desired_thread): If the desired thread was not
5777 found, leave the current thread pointing to NULL. Return an int
5778 (boolean) indicating success.
5779 * target.h (set_desired_thread): Change return type to int.
5780
40045d91
MF
57812015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5782
5783 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5784 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5785 #includes.
5786 (ps_get_thread_area): New function.
5787
45face3b
GB
57882015-08-19 Gary Benson <gbenson@redhat.com>
5789
5790 * hostio.c (handle_pread): Do not attempt to read more data
5791 than hostio_reply_with_data can fit in a packet.
5792
16d5f642
JB
57932015-08-18 Joel Brobecker <brobecker@adacore.com>
5794
5795 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5796
a738da3a
MF
57972015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5798
5799 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5800
33ebda9d
PA
58012015-08-06 Pedro Alves <palves@redhat.com>
5802
5803 * tracepoint.c (expr_eval_result): Now an int.
5804
a44892be
PA
58052015-08-06 Pedro Alves <palves@redhat.com>
5806
5807 * gdbthread.h (struct regcache): Forward declare.
5808 (struct thread_info) <regcache_data>: Now a struct regcache
5809 pointer.
5810 * inferiors.c (inferior_regcache_data)
5811 (set_inferior_regcache_data): Now work with struct regcache
5812 pointers.
5813 * inferiors.h (struct regcache): Forward declare.
5814 (inferior_regcache_data, set_inferior_regcache_data): Now work
5815 with struct regcache pointers.
5816 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5817 (free_register_cache_thread): Remove struct regcache pointer
5818 casts.
5819
608a1e46
PA
58202015-08-06 Pedro Alves <palves@redhat.com>
5821
5822 * server.c (captured_main): On error, print the exception message
5823 to stderr, and if run_once is set, throw a quit.
5824
f0ce0d3a
PA
58252015-08-06 Pedro Alves <palves@redhat.com>
5826
5827 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5828 the current thread.
5829
bf47e248
PA
58302015-08-06 Pedro Alves <palves@redhat.com>
5831
5832 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5833 reading beyond the passed in buffer length.
5834
b6b9ffcc
PL
58352015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5836
5837 * tracepoint.c (symbol_list) <required>: Remove.
5838
863d01bd
PA
58392015-08-06 Pedro Alves <palves@redhat.com>
5840
5841 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5842 count if stopping and suspending threads.
5843 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5844 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5845 (linux_detach): Complete an ongoing step-over.
5846 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5847 throughout.
5848 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5849 (linux_wait_1): If passing a signal to the inferior after
5850 finishing a step-over, unsuspend and re-resume all lwps. If we
5851 see a single-step event but the thread should be continuing, don't
5852 pass the trap to gdb.
5853 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5854 internal_error instead of gdb_assert.
5855 (enqueue_pending_signal): New function.
5856 (check_ptrace_stopped_lwp_gone): Add debug output.
5857 (start_step_over): Use internal_error instead of gdb_assert.
5858 (complete_ongoing_step_over): New function.
5859 (linux_resume_one_thread): Don't resume a suspended thread.
5860 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5861 it stepping.
5862
00db26fa
PA
58632015-08-06 Pedro Alves <palves@redhat.com>
5864
5865 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5866 (linux_thread_alive): Use lwp_is_marked_dead.
5867 (extended_event_reported): Delete.
5868 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5869 instead of extended_event_reported.
5870 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5871 as well.
5872 (lwp_is_marked_dead): New function.
5873 (lwp_running): Use lwp_is_marked_dead.
5874 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5875 comment.
5876
ad071a30
PA
58772015-08-06 Pedro Alves <palves@redhat.com>
5878
5879 * linux-low.c (linux_wait_1): Move fork event output out of the
5880 !report_to_gdb check. Pass event_child->waitstatus to
5881 target_waitstatus_to_string instead of ourstatus.
5882
524b57e6
YQ
58832015-08-04 Yao Qi <yao.qi@linaro.org>
5884
5885 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5886 if current_thread is 32 bit.
5887
6085d6f6
YQ
58882015-08-04 Yao Qi <yao.qi@linaro.org>
5889
5890 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5891 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5892 * server.c (extended_protocol): Remove "static".
5893 * server.h (extended_protocol): Declare it.
5894
8a7e4587
YQ
58952015-08-04 Yao Qi <yao.qi@linaro.org>
5896
5897 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5898 both aarch64 and aarch32.
5899 (aarch64_set_pc): Likewise.
5900
3b53ae99
YQ
59012015-08-04 Yao Qi <yao.qi@linaro.org>
5902
5903 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5904 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5905 arm-with-neon.xml to srv_xmlfiles.
5906 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5907 (is_64bit_tdesc): New function.
5908 (aarch64_linux_read_description): New function.
5909 (aarch64_arch_setup): Call aarch64_linux_read_description.
5910 (regs_info): Rename to regs_info_aarch64.
5911 (aarch64_regs_info): Return right regs_info.
5912 (initialize_low_arch): Call initialize_low_arch_aarch32.
5913
bd9e6534
YQ
59142015-08-04 Yao Qi <yao.qi@linaro.org>
5915
5916 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5917 * linux-aarch32-low.c: New file.
5918 * linux-aarch32-low.h: New file.
5919 * linux-arm-low.c (arm_fill_gregset): Move it to
5920 linux-aarch32-low.c.
5921 (arm_store_gregset): Likewise.
5922 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5923 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5924 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5925 (regs_info): Rename to regs_info_arm.
5926 (arm_regs_info): Return regs_info_aarch32 if
5927 have_ptrace_getregset is 1 and target description is
5928 arm_with_neon or arm_with_vfpv3.
5929 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5930 Call initialize_low_arch_aarch32 instead.
5931
ded48a5e
YQ
59322015-08-04 Yao Qi <yao.qi@linaro.org>
5933
5934 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5935 * linux-low.c: ... here.
5936 * linux-low.h (have_ptrace_getregset): Declare it.
5937
96e9210f
PA
59382015-08-04 Pedro Alves <palves@redhat.com>
5939
5940 * thread-db.c (struct thread_db): Use new typedefs.
5941 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5942 CHK calls.
5943 (disable_thread_event_reporting): Cast result of dlsym to
5944 destination function pointer type.
5945 (thread_db_mourn): Use td_ta_delete_ftype.
5946
af60a1ef
SL
59472015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5948
5949 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5950 arch variant.
5951 (CDX_BREAKPOINT): Define for R2.
5952 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5953 (the_low_target): Add comments.
5954
e8b41681
YQ
59552015-07-30 Yao Qi <yao.qi@linaro.org>
5956
5957 * linux-arm-low.c (arm_hwcap): Remove it.
5958 (arm_read_description): New local variable arm_hwcap. Don't
5959 set arm_hwcap to zero.
5960
89abb039
YQ
59612015-07-30 Yao Qi <yao.qi@linaro.org>
5962
5963 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5964 Use regcache->tdesc instead.
5965 (arm_store_wmmxregset): Likewise.
5966 (arm_fill_vfpregset): Likewise.
5967 (arm_store_vfpregset): Likewise.
5968
deca266c
YQ
59692015-07-30 Yao Qi <yao.qi@linaro.org>
5970
5971 * linux-arm-low.c: Include arch/arm.h.
5972 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5973 (arm_store_gregset): Likewise.
5974
aa58a496
SM
59752015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5976
5977 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5978 ptrace's 4th parameter.
5979
50904b25
YQ
59802015-07-27 Yao Qi <yao.qi@linaro.org>
5981
5982 * configure.srv (case aarch64*-*-linux*): Don't set
5983 srv_linux_usrregs.
5984
5826e159
PA
59852015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5986
5987 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5988 sys/ptrace.h.
5989 * linux-arm-low.c: Likewise.
5990 * linux-cris-low.c: Likewise.
5991 * linux-crisv32-low.c: Likewise.
5992 * linux-low.c: Likewise.
5993 * linux-m68k-low.c: Likewise.
5994 * linux-mips-low.c: Likewise.
5995 * linux-nios2-low.c: Likewise.
5996 * linux-s390-low.c: Likewise.
5997 * linux-sparc-low.c: Likewise.
5998 * linux-tic6x-low.c: Likewise.
5999 * linux-tile-low.c: Likewise.
6000 * linux-x86-low.c: Likewise.
6001
54019719
PA
60022015-07-24 Pedro Alves <palves@redhat.com>
6003
6004 * config.in: Regenerate.
6005 * configure: Regenerate.
6006
eb7aa561
PA
60072015-07-24 Pedro Alves <palves@redhat.com>
6008
6009 * acinclude.m4: Include ../ptrace.m4.
6010 * configure.ac: Call GDB_AC_PTRACE.
6011 * config.in, configure: Regenerate.
6012
55d7b841
YQ
60132015-07-24 Yao Qi <yao.qi@linaro.org>
6014
6015 * linux-low.c (linux_create_inferior): Remove setting to
6016 proc->priv->new_inferior.
6017 (linux_attach): Likewise.
6018 (linux_low_filter_event): Likewise.
6019 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6020
c06cbd92
YQ
60212015-07-24 Yao Qi <yao.qi@linaro.org>
6022
6023 * linux-low.c (linux_arch_setup): New function.
6024 (linux_low_filter_event): If proc->tdesc is NULL and
6025 proc->attached is true, call the_low_target.arch_setup.
6026 Otherwise, keep status pending, and return.
6027 (linux_resume_one_lwp_throw): Don't call get_pc if
6028 thread->while_stepping isn't NULL. Don't call
6029 get_thread_regcache if proc->tdesc is NULL.
6030 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6031 (linux_target_ops): Install arch_setup.
6032 * server.c (start_inferior): Call the_target->arch_setup.
6033 * target.h (struct target_ops) <arch_setup>: New field.
6034 (target_arch_setup): New marco.
6035 * lynx-low.c (lynx_target_ops): Update.
6036 * nto-low.c (nto_target_ops): Update.
6037 * spu-low.c (spu_target_ops): Update.
6038 * win32-low.c (win32_target_ops): Update.
6039
5ae3ebba
YQ
60402015-07-24 Yao Qi <yao.qi@linaro.org>
6041
6042 * linux-low.c (linux_add_process): Don't set
6043 proc->priv->new_inferior.
6044 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6045 (linux_attach): Likewise.
6046
eb97750b
YQ
60472015-07-24 Yao Qi <yao.qi@linaro.org>
6048
6049 * server.c (start_inferior): Code refactor.
6050
51aee833
YQ
60512015-07-24 Yao Qi <yao.qi@linaro.org>
6052
6053 * server.c (process_serial_event): Set general_thread.
6054
af1b22f3
YQ
60552015-07-21 Yao Qi <yao.qi@linaro.org>
6056
6057 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6058 aarch64_linux_get_debug_reg_capacity.
6059
554717a3
YQ
60602015-07-17 Yao Qi <yao.qi@linaro.org>
6061
6062 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6063 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6064 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6065 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6066 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6067 (AARCH64_HWP_ALIGNMENT): Likewise.
6068 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6069 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6070 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6071 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6072 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6073 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6074 (struct aarch64_debug_reg_state): Likewise.
6075 (struct arch_lwp_info): Likewise.
6076 (aarch64_align_watchpoint): Likewise.
6077 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6078 (aarch64_watchpoint_length): Likewise.
6079 (aarch64_point_encode_ctrl_reg): Likewise
6080 (aarch64_point_is_aligned): Likewise.
6081 (aarch64_align_watchpoint): Likewise.
6082 (aarch64_linux_set_debug_regs):
6083 (aarch64_dr_state_insert_one_point): Likewise.
6084 (aarch64_dr_state_remove_one_point): Likewise.
6085 (aarch64_handle_breakpoint): Likewise.
6086 (aarch64_handle_aligned_watchpoint): Likewise.
6087 (aarch64_handle_unaligned_watchpoint): Likewise.
6088 (aarch64_handle_watchpoint): Likewise.
6089
c67ca4de
YQ
60902015-07-17 Yao Qi <yao.qi@linaro.org>
6091
6092 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6093 and don't aarch64_get_debug_reg_state. All callers update.
6094 (aarch64_handle_aligned_watchpoint): Likewise.
6095 (aarch64_handle_unaligned_watchpoint): Likewise.
6096 (aarch64_handle_watchpoint): Likewise.
6097 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6098 (aarch64_remove_point): Likewise.
6099
25abf979
YQ
61002015-07-17 Yao Qi <yao.qi@linaro.org>
6101
6102 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6103 debug_printf.
6104 (aarch64_handle_unaligned_watchpoint): Likewise.
6105
db1ff28b
JK
61062015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6107
6108 Revert the previous 3 commits:
6109 Move gdb_regex* to common/
6110 Move linux_find_memory_regions_full & co.
6111 gdbserver build-id attribute generator
6112
700ca40f
JK
61132015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6114 Jan Kratochvil <jan.kratochvil@redhat.com>
6115
6116 gdbserver build-id attribute generator.
6117 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6118 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6119 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6120 (find_phdr): New.
6121 (get_dynamic): Use find_pdhr to traverse program headers.
6122 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6123 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6124 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6125 (get_hex_build_id): New.
6126 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6127 to reply XML document.
6128
9904185c
JK
61292015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6130 Jan Kratochvil <jan.kratochvil@redhat.com>
6131
6132 * target.c: Include target/target-utils.h and fcntl.h.
6133 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6134 (target_fileio_read_stralloc): New functions.
6135
6e5b4429
JK
61362015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6137
6138 * Makefile.in (OBS): Add gdb_regex.o.
6139 (gdb_regex.o): New.
6140 * config.in: Rebuilt.
6141 * configure: Rebuilt.
6142
ddc98fbf
JK
61432015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6144 Jan Kratochvil <jan.kratochvil@redhat.com>
6145
6146 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6147 * Makefile.in (OBS): Add target-utils.o.
6148 (linux-maps.o, target-utils.o): New.
6149 * configure.srv (srv_linux_obj): Add linux-maps.o.
6150
e57bb7a0
PL
61512015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6152
6153 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6154 function, return 1.
6155 (the_low_target): Install it.
6156
586b02a9
PA
61572015-07-14 Pedro Alves <palves@redhat.com>
6158
6159 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6160 Instead, ignore ECHILD, and throw an error for other errnos.
6161
58c1b36c
PA
61622015-07-10 Pedro Alves <palves@redhat.com>
6163
6164 * event-loop.c (struct callback_event) <data>: Change type to
6165 gdb_client_data instance instead of gdb_client_data pointer.
6166 (append_callback_event): Adjust.
6167
421530db
PL
61682015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6169
6170 * linux-aarch64-low.c: Add comments for each linux_target_ops
6171 method. Remove comments already covered in target_ops and
6172 linux_target_ops definitions.
6173 (the_low_target): Add comments for each unimplemented method.
6174
c2d65f38
YQ
61752015-07-09 Yao Qi <yao.qi@linaro.org>
6176
6177 * linux-aarch64-low.c (aarch64_regmap): Remove.
6178 (aarch64_usrregs_info): Remove.
6179 (regs_info): Set field usrregs to NULL.
6180
b20a6524
MM
61812015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6182
6183 * linux-low.c: Include "rsp-low.h"
6184 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6185 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6186 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6187 (handle_btrace_enable_pt): New.
6188 (handle_btrace_general_set): Support "pt".
6189 (handle_btrace_conf_general_set): Support "pt:size".
6190
96c97461
PL
61912015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6192
6193 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6194 Z_PACKET_SW_BP.
6195
37d66942
PL
61962015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6197
6198 * linux-aarch64-low.c: Remove comment about endianness.
6199 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6200 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6201 memcmp.
6202
dc06243f
GB
62032015-06-24 Gary Benson <gbenson@redhat.com>
6204
6205 * linux-i386-ipa.c (stdint.h): Do not include.
6206 * lynx-i386-low.c (stdint.h): Likewise.
6207 * lynx-ppc-low.c (stdint.h): Likewise.
6208 * mem-break.c (stdint.h): Likewise.
6209 * thread-db.c (stdint.h): Likewise.
6210 * tracepoint.c (stdint.h): Likewise.
6211 * win32-low.c (stdint.h): Likewise.
6212
124e13d9
SM
62132015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6214
6215 * server.c (write_qxfer_response): Update call to
6216 remote_escape_output.
6217
909c2cda
JK
62182015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6219 Jan Kratochvil <jan.kratochvil@redhat.com>
6220
6221 Merge multiple hex conversions.
6222 * gdbreplay.c (tohex): Rename to 'fromhex'.
6223 (logchar): Use fromhex.
6224
24c05f46
JK
62252015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6226
6227 * server.c (handle_qxfer_libraries): Set `version' attribute for
6228 <library-list>.
6229
14d2069a
GB
62302015-06-10 Gary Benson <gbenson@redhat.com>
6231
6232 * target.h (struct target_ops) <multifs_open>: New field.
6233 <multifs_unlink>: Likewise.
6234 <multifs_readlink>: Likewise.
6235 * linux-low.c (nat/linux-namespaces.h): New include.
6236 (linux_target_ops): Initialize the_target->multifs_open,
6237 the_target->multifs_unlink and the_target->multifs_readlink.
6238 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6239 * hostio.c (hostio_fs_pid): New static variable.
6240 (hostio_handle_new_gdb_connection): New function.
6241 (handle_setfs): Likewise.
6242 (handle_open): Use the_target->multifs_open as appropriate.
6243 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6244 (handle_readlink): Use the_target->multifs_readlink as
6245 appropriate.
6246 (handle_vFile): Handle vFile:setfs packets.
6247 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6248 after target_handle_new_gdb_connection.
6249
4b8b5e72
GB
62502015-06-10 Gary Benson <gbenson@redhat.com>
6251
6252 * configure.ac (AC_CHECK_FUNCS): Add setns.
6253 * config.in: Regenerate.
6254 * configure: Likewise.
6255 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6256 (linux-namespaces.o): New rule.
6257 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6258
3ac2e371
GB
62592015-06-09 Gary Benson <gbenson@redhat.com>
6260
6261 * hostio.c (handle_open): Process mode argument with
6262 fileio_to_host_mode.
6263
ca9b78ce
YQ
62642015-06-01 Yao Qi <yao.qi@linaro.org>
6265
6266 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6267 * linux-x86-low.c: Likewise.
6268
bfacd19d
DB
62692015-05-28 Don Breazeal <donb@codesourcery.com>
6270
6271 * linux-low.c (handle_extended_wait): Initialize
6272 thread_info.last_resume_kind for new fork children.
6273
452003ef
PA
62742015-05-15 Pedro Alves <palves@redhat.com>
6275
6276 * target.h (target_handle_new_gdb_connection): Rewrite using if
6277 wrapped in do/while.
6278
1041a03c
JB
62792015-05-14 Joel Brobecker <brobecker@adacore.com>
6280
6281 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6282 * configure, config.in: Regenerate.
6283 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6284 Declare typedef.
6285
c269dbdb
DB
62862015-05-12 Don Breazeal <donb@codesourcery.com>
6287
6288 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6289 PTRACE_EVENT_VFORK_DONE.
6290 (linux_low_ptrace_options, extended_event_reported): Add vfork
6291 events.
6292 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6293 and "vforkdone" for RSP 'T' Stop Reply Packet.
6294 * server.h (report_vfork_events): Declare
6295 global variable.
6296
3a8a0396
DB
62972015-05-12 Don Breazeal <donb@codesourcery.com>
6298
6299 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6300 (the_low_target) <new_fork>: Initialize new member.
6301 * linux-arm-low.c (arm_new_fork): New function.
6302 (the_low_target) <new_fork>: Initialize new member.
6303 * linux-low.c (handle_extended_wait): Call new target function
6304 new_fork.
6305 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6306 * linux-mips-low.c (mips_add_watchpoint): New function
6307 extracted from mips_insert_point.
6308 (the_low_target) <new_fork>: Initialize new member.
6309 (mips_linux_new_fork): New function.
6310 (mips_insert_point): Call mips_add_watchpoint.
6311 * linux-x86-low.c (x86_linux_new_fork): New function.
6312 (the_low_target) <new_fork>: Initialize new member.
6313
de0d863e
DB
63142015-05-12 Don Breazeal <donb@codesourcery.com>
6315
6316 * linux-low.c (handle_extended_wait): Implement return value,
6317 rename argument 'event_child' to 'event_lwp', handle
6318 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6319 (linux_low_ptrace_options): New function.
6320 (linux_low_filter_event): Call linux_low_ptrace_options,
6321 use different argument fo linux_enable_event_reporting,
6322 use return value from handle_extended_wait.
6323 (extended_event_reported): New function.
6324 (linux_wait_1): Call extended_event_reported and set
6325 status to report fork events.
6326 (linux_write_memory): Add pid to debug message.
6327 (reset_lwp_ptrace_options_callback): New function.
6328 (linux_handle_new_gdb_connection): New function.
6329 (linux_target_ops): Initialize new structure member.
6330 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6331 * lynx-low.c: Initialize new structure member.
6332 * remote-utils.c (prepare_resume_reply): Implement stop reason
6333 "fork" for "T" stop message.
6334 * server.c (handle_query): Call handle_new_gdb_connection.
6335 * server.h (report_fork_events): Declare global flag.
6336 * target.h (struct target_ops) <handle_new_gdb_connection>:
6337 New member.
6338 (target_handle_new_gdb_connection): New macro.
6339 * win32-low.c: Initialize new structure member.
6340
ddcbc397
DB
63412015-05-12 Don Breazeal <donb@codesourcery.com>
6342
6343 * mem-break.c (APPEND_TO_LIST): Define macro.
6344 (clone_agent_expr): New function.
6345 (clone_one_breakpoint): New function.
6346 (clone_all_breakpoints): New function.
6347 * mem-break.h: Declare new functions.
6348
89245bc0
DB
63492015-05-12 Don Breazeal <donb@codesourcery.com>
6350
6351 * linux-low.c (linux_supports_fork_events): New function.
6352 (linux_supports_vfork_events): New function.
6353 (linux_target_ops): Initialize new structure members.
6354 (initialize_low): Call linux_check_ptrace_features.
6355 * lynx-low.c (lynx_target_ops): Initialize new structure
6356 members.
6357 * server.c (report_fork_events, report_vfork_events):
6358 New global flags.
6359 (handle_query): Add new features to qSupported packet and
6360 response.
6361 (captured_main): Initialize new global variables.
6362 * target.h (struct target_ops) <supports_fork_events>:
6363 New member.
6364 <supports_vfork_events>: New member.
6365 (target_supports_fork_events): New macro.
6366 (target_supports_vfork_events): New macro.
6367 * win32-low.c (win32_target_ops): Initialize new structure
6368 members.
6369
835205d0
GB
63702015-05-12 Gary Benson <gbenson@redhat.com>
6371
6372 * server.c (handle_qxfer_exec_file): Use current process
6373 if annex is empty.
6374
21e94bd9
SL
63752015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6376
6377 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6378 Remove HAVE_PTRACE_GETREGS conditionals.
6379 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6380 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6381
45614f15
YQ
63822015-05-08 Yao Qi <yao.qi@linaro.org>
6383
6384 * linux-low.c (linux_supports_conditional_breakpoints): New
6385 function.
6386 (linux_target_ops): Install new target method.
6387 * lynx-low.c (lynx_target_ops): Install NULL hook for
6388 supports_conditional_breakpoints.
6389 * nto-low.c (nto_target_ops): Likewise.
6390 * spu-low.c (spu_target_ops): Likewise.
6391 * win32-low.c (win32_target_ops): Likewise.
6392 * server.c (handle_query): Check
6393 target_supports_conditional_breakpoints.
6394 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6395 New field.
6396 (target_supports_conditional_breakpoints): New macro.
6397
80ad801e
PA
63982015-05-06 Pedro Alves <palves@redhat.com>
6399
6400 PR server/18081
6401 * server.c (start_inferior): If the process exits, mourn it.
6402
819843c7
GB
64032015-04-21 Gary Benson <gbenson@redhat.com>
6404
6405 * hostio.c (fileio_open_flags_to_host): Factored out to
6406 fileio_to_host_openflags in common/fileio.c. Single use
6407 updated.
6408
a2d5a9d7
MF
64092015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6410
6411 * linux-xtensa-low.c (xtensa_fill_gregset)
6412 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6413 XCHAL_HAVE_LOOP.
6414
deb44829
MF
64152015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6416
6417 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6418 (regs_info): Replace usrregs pointer with NULL.
6419
e57f1de3
GB
64202015-04-17 Gary Benson <gbenson@redhat.com>
6421
6422 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6423 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6424 * server.c (handle_qxfer_exec_file): New function.
6425 (qxfer_packets): Add exec-file entry.
6426 (handle_query): Report qXfer:exec-file:read as supported packet.
6427
62828379
RN
64282015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6429
6430 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6431
b88bb450
GB
64322015-04-09 Gary Benson <gbenson@redhat.com>
6433
6434 * hostio-errno.c (errno_to_fileio_error): Remove function.
6435 Update caller to use remote_fileio_to_fio_error.
6436
c8f4bfdd
YQ
64372015-04-09 Yao Qi <yao.qi@linaro.org>
6438
6439 * linux-low.c (linux_insert_point): Call
6440 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6441 (linux_remove_point): Call remove_memory_breakpoint if type is
6442 raw_bkpt_type_sw.
6443 * linux-x86-low.c (x86_insert_point): Don't call
6444 insert_memory_breakpoint.
6445 (x86_remove_point): Don't call remove_memory_breakpoint.
6446
41f98f02
PA
64472015-04-01 Pedro Alves <palves@redhat.com>
6448 Cleber Rosa <crosa@redhat.com>
6449
6450 * server.c (gdbserver_usage): Reorganize and extend the usage
6451 message.
6452
2bf6fb9d
PA
64532015-03-24 Pedro Alves <palves@redhat.com>
6454
6455 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6456 output. Also dump TRAP_TRACE.
6457 (linux_low_filter_event): In debug output, distinguish a
6458 resume_stop SIGSTOP from a delayed SIGSTOP.
6459
369f6daa
GB
64602015-03-24 Gary Benson <gbenson@redhat.com>
6461
6462 * linux-x86-low.c (x86_linux_new_thread): Moved to
6463 nat/x86-linux.c.
6464 (x86_linux_prepare_to_resume): Likewise.
6465
8e5d4070
GB
64662015-03-24 Gary Benson <gbenson@redhat.com>
6467
6468 * Makefile.in (x86-linux-dregs.o): New rule.
6469 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6470 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6471 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6472 (x86_linux_dr_get): Likewise.
6473 (x86_linux_dr_set): Likewise.
6474 (update_debug_registers_callback): Likewise.
6475 (x86_linux_dr_set_addr): Likewise.
6476 (x86_linux_dr_get_addr): Likewise.
6477 (x86_linux_dr_set_control): Likewise.
6478 (x86_linux_dr_get_control): Likewise.
6479 (x86_linux_dr_get_status): Likewise.
6480 (x86_linux_update_debug_registers): Likewise.
6481
2b95d440
GB
64822015-03-24 Gary Benson <gbenson@redhat.com>
6483
6484 * linux-x86-low.c (x86_linux_update_debug_registers):
6485 New function, factored out from...
6486 (x86_linux_prepare_to_resume): ...this.
6487
14b0bc68
GB
64882015-03-24 Gary Benson <gbenson@redhat.com>
6489
6490 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6491 (x86_linux_dr_set): Likewise.
6492 (update_debug_registers_callback): Likewise.
6493 (x86_linux_dr_set_addr): Likewise.
6494 (x86_linux_dr_get_addr): Likewise.
6495 (x86_linux_dr_set_control): Likewise.
6496 (x86_linux_dr_get_control): Likewise.
6497 (x86_linux_dr_get_status): Likewise.
6498 (x86_linux_prepare_to_resume): Likewise.
6499
5dfe6ca8
GB
65002015-03-24 Gary Benson <gbenson@redhat.com>
6501
6502 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6503 Use perror_with_name. Pass string through gettext.
6504 (x86_linux_dr_set): Likewise.
6505
d33472ad
GB
65062015-03-24 Gary Benson <gbenson@redhat.com>
6507
6508 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6509 (x86_linux_dr_set_addr): ...this.
6510 (x86_dr_low_get_addr): Rename to...
6511 (x86_linux_dr_get_addr): ...this.
6512 (x86_dr_low_set_control): Rename to...
6513 (x86_linux_dr_set_control): ...this.
6514 (x86_dr_low_get_control): Rename to...
6515 (x86_linux_dr_get_control): ...this.
6516 (x86_dr_low_get_status): Rename to...
6517 (x86_linux_dr_get_status): ...this.
6518 (x86_dr_low): Update with new function names.
6519
4b134ca1
GB
65202015-03-24 Gary Benson <gbenson@redhat.com>
6521
6522 * Makefile.in (x86-linux.o): New rule.
6523 * configure.srv: Add x86-linux.o to relevant targets.
6524 * linux-low.c (lwp_set_arch_private_info): New function.
6525 (lwp_arch_private_info): Likewise.
6526 * linux-x86-low.c: Include nat/x86-linux.h.
6527 (arch_lwp_info): Removed structure.
6528 (update_debug_registers_callback):
6529 Use lwp_set_debug_registers_changed.
6530 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6531 and lwp_set_debug_registers_changed.
6532 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6533
34c703da
GB
65342015-03-24 Gary Benson <gbenson@redhat.com>
6535
6536 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6537 * linux-arm-low.c (arm_new_thread): Likewise.
6538 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6539 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6540 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6541 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6542
cff068da
GB
65432015-03-24 Gary Benson <gbenson@redhat.com>
6544
6545 * linux-low.c (ptid_of_lwp): New function.
6546 (lwp_is_stopped): Likewise.
6547 (lwp_stop_reason): Likewise.
6548 * linux-x86-low.c (update_debug_registers_callback):
6549 Use lwp_is_stopped.
6550 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6551 lwp_stop_reason.
6552
b2f7c7e8
GB
65532015-03-24 Gary Benson <gbenson@redhat.com>
6554
6555 * linux-low.h (linux_stop_lwp): Remove declaration.
6556
6d4ee8c6
GB
65572015-03-24 Gary Benson <gbenson@redhat.com>
6558
6559 * linux-low.h: Include nat/linux-nat.h.
6560 * linux-low.c (iterate_over_lwps_args): New structure.
6561 (iterate_over_lwps_filter): New function.
6562 (iterate_over_lwps): Likewise.
6563 * linux-x86-low.c (update_debug_registers_callback):
6564 Update signature to what iterate_over_lwps expects.
6565 Remove PID check that iterate_over_lwps now performs.
6566 (x86_dr_low_set_addr): Use iterate_over_lwps.
6567 (x86_dr_low_set_control): Likewise.
6568
70a0bb6b
GB
65692015-03-24 Gary Benson <gbenson@redhat.com>
6570
6571 * linux-x86-low.c (x86_debug_reg_state): New function.
6572 (x86_linux_prepare_to_resume): Use the above.
6573
7b669087
GB
65742015-03-24 Gary Benson <gbenson@redhat.com>
6575
6576 * linux-low.c (current_lwp_ptid): New function.
6577 * linux-x86-low.c: Include nat/linux-nat.h.
6578 (x86_dr_low_get_addr): Use current_lwp_ptid.
6579 (x86_dr_low_get_control): Likewise.
6580 (x86_dr_low_get_status): Likewise.
6581
eef49a3d
PA
65822015-03-20 Pedro Alves <palves@redhat.com>
6583
6584 * tracepoint.c (cmd_qtstatus): Make "str" const.
6585
b2333d22
PA
65862015-03-20 Pedro Alves <palves@redhat.com>
6587
6588 * server.c (handle_general_set): Make "req_str" const.
6589
23f238d3
PA
65902015-03-19 Pedro Alves <palves@redhat.com>
6591
6592 * linux-low.c (linux_resume_one_lwp): Rename to ...
6593 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6594 instead call perror_with_name.
6595 (check_ptrace_stopped_lwp_gone): New function.
6596 (linux_resume_one_lwp): Reimplement as wrapper around
6597 linux_resume_one_lwp_throw that swallows errors if the LWP is
6598 gone.
6599
91baf43f
PA
66002015-03-19 Pedro Alves <palves@redhat.com>
6601
6602 * linux-low.c (count_events_callback, select_event_lwp_callback):
6603 No longer check whether the thread has resume_stop as last resume
6604 kind.
6605
8bf3b159
PA
66062015-03-19 Pedro Alves <palves@redhat.com>
6607
6608 * linux-low.c (count_events_callback, select_event_lwp_callback):
6609 Use the lwp's status_pending_p field, not the thread's.
6610
b90fc188
PA
66112015-03-19 Pedro Alves <palves@redhat.com>
6612
6613 * linux-low.c (select_event_lwp_callback): Update comments to
6614 no longer mention SIGTRAP.
6615
464b0089
GB
66162015-03-18 Gary Benson <gbenson@redhat.com>
6617
6618 * server.c (handle_query): Do not report vFile:fstat as supported.
6619
aa9e327f
GB
66202015-03-11 Gary Benson <gbenson@redhat.com>
6621
6622 * hostio.c (sys/types.h): New include.
6623 (sys/stat.h): Likewise.
6624 (common-remote-fileio.h): Likewise.
6625 (handle_fstat): New function.
6626 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6627
791c0056
GB
66282015-03-11 Gary Benson <gbenson@redhat.com>
6629
6630 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6631 struct stat.st_blocks and struct stat.st_blksize.
6632 * configure: Regenerate.
6633 * config.in: Likewise.
6634 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6635 (OBS): Add common-remote-fileio.o.
6636 (common-remote-fileio.o): New rule.
6637
9a9df970
PA
66382015-03-09 Pedro Alves <palves@redhat.com>
6639
6640 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6641 'struct sockaddr' pointer in 'accept' call.
6642
9eb1356e
PA
66432015-03-09 Pedro Alves <palves@redhat.com>
6644
6645 Revert:
6646 2015-03-07 Pedro Alves <palves@redhat.com>
6647 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6648 or <winsock2.h> here. Instead include "gdb_socket.h".
6649 (remote_open): Use union gdb_sockaddr_u.
6650 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6651 or <winsock2.h> here. Instead include "gdb_socket.h".
6652 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6653 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6654 or <sys/un.h>.
6655 (init_named_socket, gdb_agent_helper_thread): Use union
6656 gdb_sockaddr_u.
6657
aac331e4
PA
66582015-03-07 Pedro Alves <palves@redhat.com>
6659
6660 * configure.ac (build_warnings): Move
6661 -Wdeclaration-after-statement to the C-specific set.
6662 * configure: Regenerate.
6663
366c75fc
PA
66642015-03-07 Pedro Alves <palves@redhat.com>
6665
6666 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6667 or <winsock2.h> here. Instead include "gdb_socket.h".
6668 (remote_open): Use union gdb_sockaddr_u.
6669 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6670 or <winsock2.h> here. Instead include "gdb_socket.h".
6671 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6672 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6673 or <sys/un.h>.
6674 (init_named_socket, gdb_agent_helper_thread): Use union
6675 gdb_sockaddr_u.
6676
492d29ea
PA
66772015-03-07 Pedro Alves <palves@redhat.com>
6678
6679 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6680 instead.
6681
60a191ed
YQ
66822015-03-06 Yao Qi <yao.qi@linaro.org>
6683
6684 * linux-aarch64-low.c (aarch64_insert_point): Use
6685 show_debug_regs as a boolean.
6686 (aarch64_remove_point): Likewise.
6687
f5771b1d
PA
66882015-03-05 Pedro Alves <palves@redhat.com>
6689
6690 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6691 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6692 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6693 * nto-low.c (nto_target_ops): Likewise.
6694 * spu-low.c (spu_target_ops): Likewise.
6695 * win32-low.c (win32_target_ops): Likewise.
6696
3e572f71
PA
66972015-03-04 Pedro Alves <palves@redhat.com>
6698
72f4393d 6699 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6700 Decide whether a breakpoint triggered based on the SIGTRAP's
6701 siginfo.si_code.
72f4393d
L
6702 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6703 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6704 (linux_low_filter_event): Check for breakpoints before checking
6705 watchpoints.
6706 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6707 siginfo.si_code.
72f4393d
L
6708 (linux_stopped_by_sw_breakpoint)
6709 (linux_supports_stopped_by_sw_breakpoint)
6710 (linux_stopped_by_hw_breakpoint)
6711 (linux_supports_stopped_by_hw_breakpoint): New functions.
6712 (linux_target_ops): Install new target methods.
3e572f71 6713
1ec68e26
PA
67142015-03-04 Pedro Alves <palves@redhat.com>
6715
6716 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6717 * server.c (swbreak_feature, hwbreak_feature): New globals.
6718 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6719 (captured_main): Clear swbreak_feature and hwbreak_feature.
6720 * server.h (swbreak_feature, hwbreak_feature): Declare.
6721 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6722 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6723 supports_stopped_by_hw_breakpoint>: New fields.
6724 (target_supports_stopped_by_sw_breakpoint)
6725 (target_stopped_by_sw_breakpoint)
6726 (target_supports_stopped_by_hw_breakpoint)
6727 (target_stopped_by_hw_breakpoint): Declare.
6728
15c66dd6
PA
67292015-03-04 Pedro Alves <palves@redhat.com>
6730
6731 enum lwp_stop_reason -> enum target_stop_reason
6732 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6733 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6734 (linux_wait_1, stuck_in_jump_pad_callback)
6735 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6736 (linux_stopped_by_watchpoint):
6737 * linux-low.h (enum lwp_stop_reason): Delete.
6738 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6739 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6740
98fc70d6
YQ
67412015-03-04 Yao Qi <yao.qi@linaro.org>
6742
6743 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6744
dd2ac174
GB
67452015-03-03 Gary Benson <gbenson@redhat.com>
6746
6747 * hostio.c (handle_vFile): Fix prefix lengths.
6748
d68e53f4
MM
67492015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6750
6751 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6752 ptr_bits.
6753
bf2d68ab
AA
67542015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6755
6756 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6757 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6758 (clean): Add "rm -f" for above C files.
6759 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6760 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6761 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6762 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6763 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6764 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6765 (init_registers_s390x_vx_linux64)
6766 (init_registers_s390x_tevx_linux64)
6767 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6768 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6769 declarations.
6770 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6771 (s390_store_vxrs_high): New functions.
6772 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6773 NT_S390_VXRS_HIGH.
6774 (s390_arch_setup): Add logic for selecting one of the new target
6775 descriptions. Activate the new vector regsets if applicable.
6776 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6777 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6778 and init_registers_s390x_tevx_linux64.
6779
c966a859
PA
67802015-03-01 Pedro Alves <palves@redhat.com>
6781
6782 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6783 parameter.
6784
4180215b
PA
67852015-02-27 Pedro Alves <palves@redhat.com>
6786
6787 * linux-x86-low.c (u_debugreg_offset): New function.
6788 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6789
749bab01
PA
67902015-02-27 Pedro Alves <palves@redhat.com>
6791
6792 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6793 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6794 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6795 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6796 (ps_lsetfpregs, ps_getpid)
6797 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6798 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6799 (ps_lsetxregs, ps_plog): Declare.
6800
3c14e5a3
PA
68012015-02-27 Pedro Alves <palves@redhat.com>
6802
6803 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6804 IP_AGENT_EXPORT_FUNC.
6805 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6806 IP_AGENT_EXPORT_FUNC.
6807 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6808 (IP_AGENT_EXPORT): Delete.
6809 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6810 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6811 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6812 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6813 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6814 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6815 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6816 (traceframe_read_count, traceframe_write_count)
6817 (traceframes_created, trace_state_variables, get_raw_reg)
6818 (get_trace_state_variable_value, set_trace_state_variable_value)
6819 (ust_loaded, helper_thread_id, cmd_buf): Use
6820 IPA_SYM_EXPORTED_NAME.
6821 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6822 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6823 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6824 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6825 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6826 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6827 EXTERN_C_PUSH/EXTERN_C_POP.
6828 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6829 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6830 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6831 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6832 (traceframe_write_count, traceframe_read_count)
6833 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6834 (about_to_request_buffer_space, get_trace_state_variable_value)
6835 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6836 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6837 EXTERN_C_PUSH/EXTERN_C_POP.
6838 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6839 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6840 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6841 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6842 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6843 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6844 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6845 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6846 Define.
6847 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6848 (IP_AGENT_EXPORT_VAR_DECL): Define.
6849 (tracing): Declare.
6850 (gdb_agent_get_raw_reg): Declare.
6851
fe978cb0
PA
68522015-02-27 Tom Tromey <tromey@redhat.com>
6853 Pedro Alves <palves@redhat.com>
6854
6855 Rename symbols whose names are reserved C++ keywords throughout.
6856
3bc3d82a
PA
68572015-02-27 Pedro Alves <palves@redhat.com>
6858
6859 * Makefile.in (COMPILER): New, get it from autoconf.
6860 (CXX): Get from autoconf instead.
6861 (COMPILE.pre): Use COMPILER.
6862 (CC-LD): Rename to ...
6863 (CC_LD): ... this. Use COMPILER.
6864 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6865 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6866 * acinclude.m4: Include build-with-cxx.m4.
6867 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6868 Disable -Werror by default if building in C++ mode.
6869 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6870 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6871 the C++ compiler. Save/restore CXXFLAGS too.
6872 * configure: Regenerate.
6873
07697489
PA
68742015-02-27 Pedro Alves <palves@redhat.com>
6875
6876 * acinclude.m4: Include libiberty.m4.
6877 * configure.ac: Call libiberty_INIT.
6878 * config.in, configure: Regenerate.
6879
9beb7c4e
PA
68802015-02-26 Pedro Alves <palves@redhat.com>
6881
6882 * linux-low.c (linux_wait_1): When incrementing the PC past a
6883 program breakpoint always use the_low_target.breakpoint_len as
6884 increment, rather than the maximum between that and
6885 the_low_target.decr_pc_after_break.
6886
8090aef2
PA
68872015-02-23 Pedro Alves <palves@redhat.com>
6888
6889 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6890 thread was doing a step-over; always adjust the PC if
6891 we stepped over a permanent breakpoint.
6892 (linux_wait_1): If we stepped over breakpoint that was on top of a
6893 permanent breakpoint, manually advance the PC past it.
6894
bc9540e8
PA
68952015-02-23 Pedro Alves <palves@redhat.com>
6896
6897 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6898 modes.
6899 (x86_fill_gregset, x86_store_gregset): Use it when handling
6900 $orig_eax.
6901
2db9a427
PA
69022015-02-20 Pedro Alves <palves@redhat.com>
6903
6904 * thread-db.c: Include "nat/linux-procfs.h".
6905 (thread_db_init): Skip listing new threads if the kernel supports
6906 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6907
afa8d396
PA
69082015-02-20 Pedro Alves <palves@redhat.com>
6909
6910 * linux-low.c (status_pending_p_callback): Use ptid_match.
6911
c9587f88
AT
69122015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6913
6914 PR breakpoints/16812
6915 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6916 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6917 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6918
b05ec7a5
AT
69192015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6920
6921 PR breakpoints/15956
6922 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6923
d33501a5
MM
69242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6925
6926 * linux-low.c (linux_low_btrace_conf): Print size.
6927 * server.c (handle_btrace_conf_general_set): New.
6928 (hanle_general_set): Call handle_btrace_conf_general_set.
6929 (handle_query): Report Qbtrace-conf:bts:size as supported.
6930
f4abbc16
MM
69312015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6932
6933 * linux-low.c (linux_low_enable_btrace): Update parameters.
6934 (linux_low_btrace_conf): New.
6935 (linux_target_ops)<to_btrace_conf>: Initialize.
6936 * server.c (current_btrace_conf): New.
6937 (handle_btrace_enable): Rename to ...
6938 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6939 to target_enable_btrace. Update comment. Update users.
6940 (handle_qxfer_btrace_conf): New.
6941 (qxfer_packets): Add btrace-conf entry.
6942 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6943 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6944 (target_ops)<read_btrace_conf>: New.
6945 (target_enable_btrace): Update parameters.
6946 (target_read_btrace_conf): New.
6947
043c3577
MM
69482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6949
6950 * server.c (handle_btrace_general_set): Remove call to
6951 target_supports_btrace.
6952 (supported_btrace_packets): New.
6953 (handle_query): Call supported_btrace_packets.
6954 * target.h: include btrace-common.h.
6955 (btrace_target_info): Removed.
6956 (supports_btrace, target_supports_btrace): Update parameters.
6957
734b0e4b
MM
69582015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6959
6960 * Makefile.in (SFILES): Add common/btrace-common.c.
6961 (OBS): Add common/btrace-common.o.
6962 (btrace-common.o): Add build rules.
6963 * linux-low: Include btrace-common.h.
6964 (linux_low_read_btrace): Use struct btrace_data. Call
6965 btrace_data_init and btrace_data_fini.
6966
d6c146e9
PA
69672015-02-06 Pedro Alves <palves@redhat.com>
6968
6969 * thread-db.c (find_new_threads_callback): Add debug output.
6970
20ba1ce6
PA
69712015-02-04 Pedro Alves <palves@redhat.com>
6972
6973 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6974 (resume_stopped_resumed_lwps): New function.
6975 (linux_wait_for_event_filtered): Use it.
6976
8cc73a39
SDJ
69772015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6978
6979 * Makefile.in (SFILES): Add linux-personality.c.
6980 (linux-personality.o): New rule.
6981 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6982 list of objects to be built.
6983 * linux-low.c: Include nat/linux-personality.h.
6984 (linux_create_inferior): Remove code to disable address space
6985 randomization (moved to ../nat/linux-personality.c). Create
6986 cleanup to disable address space randomization.
6987
fb23d554
SDJ
69882015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6989
6990 * Makefile.in (posix-strerror.o): New rule.
6991 (mingw-strerror.o): Likewise.
6992 * configure: Regenerated.
6993 * configure.ac: Source file ../common/common.host. Initialize new
6994 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6995
cdf43629
YQ
69962015-01-14 Yao Qi <yao@codesourcery.com>
6997
6998 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6999 (ppc-linux.o): New rule.
7000 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7001 * configure.ac: AC_CHECK_FUNCS(getauxval).
7002 * config.in: Re-generated.
7003 * configure: Re-generated.
7004 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7005 ppc64_64bit_inferior_p
7006
514c5338
YQ
70072015-01-14 Yao Qi <yao@codesourcery.com>
7008
7009 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7010 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7011 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7012 (PT_ORIG_R3, PT_TRAP): Likewise.
7013 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7014 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7015 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7016
3368c1e5
JB
70172015-01-10 Joel Brobecker <brobecker@adacore.com>
7018
7019 * i387-fp.c (i387_cache_to_xsave): In look over
7020 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7021 zmmh_low_space field by use of zmmh_high_space.
7022
582511be
PA
70232015-01-09 Pedro Alves <palves@redhat.com>
7024
7025 * linux-low.c (step_over_bkpt): Move higher up in the file.
7026 (handle_extended_wait): Don't store the stop_pc here.
7027 (get_stop_pc): Adjust comments and rename to ...
7028 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7029 stopped for a software breakpoint or hardware breakpoint.
7030 (thread_still_has_status_pending_p): New function.
7031 (status_pending_p_callback): Use
7032 thread_still_has_status_pending_p. If the event is no longer
7033 interesting, resume the LWP.
7034 (handle_tracepoints): Add assert.
7035 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7036 (wstatus_maybe_breakpoint): New function.
7037 (cancel_breakpoint): Delete function.
7038 (check_stopped_by_watchpoint): New function, factored out from
7039 linux_low_filter_event.
7040 (lp_status_maybe_breakpoint): Delete function.
7041 (linux_low_filter_event): Remove filter_ptid argument.
7042 Leave thread group exits pending here. Store the LWP's stop PC.
7043 Always leave events pending.
7044 (linux_wait_for_event_filtered): Pull all events out of the
7045 kernel, and leave them all pending.
7046 (count_events_callback, select_event_lwp_callback): Consider all
7047 events.
7048 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7049 (select_event_lwp): Only give preference to the stepping LWP in
7050 all-stop mode. Adjust comments.
7051 (ignore_event): New function.
7052 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7053 references to cancel_breakpoints. Adjust to renames. Also give
7054 equal priority to all LWPs that have had events in non-stop mode.
7055 If reporting a software breakpoint event, unadjust the LWP's PC.
7056 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7057 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7058 Adjust.
7059 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7060 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7061 (linux_stopped_by_watchpoint): Adjust.
7062 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7063 * linux-low.h (enum lwp_stop_reason): New.
7064 (struct lwp_info) <stop_pc>: Adjust comment.
7065 <stopped_by_watchpoint>: Delete field.
7066 <stop_reason>: New field.
7067 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7068 * mem-break.c (software_breakpoint_inserted_here)
7069 (hardware_breakpoint_inserted_here): New function.
7070 * mem-break.h (software_breakpoint_inserted_here)
7071 (hardware_breakpoint_inserted_here): Declare.
7072 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7073 (cancel_breakpoints): Delete.
7074 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7075 (upload_fast_traceframes): Remove references to
7076 cancel_breakpoints.
7077
a33e3959
PA
70782015-01-09 Pedro Alves <palves@redhat.com>
7079
7080 * thread-db.c (find_new_threads_callback): Ignore thread if the
7081 kernel thread ID is -1.
7082
8784d563
PA
70832015-01-09 Pedro Alves <palves@redhat.com>
7084
7085 * linux-low.c (linux_attach_fail_reason_string): Move to
7086 nat/linux-ptrace.c, and rename.
7087 (linux_attach_lwp): Update comment.
7088 (attach_proc_task_lwp_callback): New function.
7089 (linux_attach): Adjust to rename and use
7090 linux_proc_attach_tgid_threads.
7091 (linux_attach_fail_reason_string): Delete declaration.
7092
76f2b779
JB
70932015-01-01 Joel Brobecker <brobecker@adacore.com>
7094
7095 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7096 * server.c (gdbserver_version): Likewise.
7097
fafcc06a
SDJ
70982014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7099
7100 * remote-utils.c: Include ctype.h.
7101 (input_interrupt): Explicitly handle the case when the char
7102 received is the NUL byte. Improve the printing of non-ASCII
7103 characters.
7104
beed38b8
JB
71052014-12-16 Joel Brobecker <brobecker@adacore.com>
7106
7107 * linux-low.c (linux_low_filter_event): Update call to
7108 linux_enable_event_reporting following the addition of
7109 a new parameter to that function.
7110
bf330350
CU
71112014-12-16 Catalin Udma <catalin.udma@freescale.com>
7112
7113 PR server/17457
7114 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7115 (AARCH64_FPCR_REGNO): Likewise.
7116 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7117 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7118 (aarch64_store_fpregset): Likewise.
7119
5227d625
JB
71202014-12-15 Joel Brobecker <brobecker@adacore.com>
7121
7122 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7123 Remove FIXME comment about assumption about N.
7124
f93b65a0
JB
71252014-12-13 Joel Brobecker <brobecker@adacore.com>
7126
7127 * configure.ac: If large-file support is disabled in GDBserver,
7128 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7129 * configure: Regenerate.
7130
e5a9158d
AA
71312014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7132
7133 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7134 warning upon ENODATA from ptrace.
7135 * linux-s390-low.c (s390_store_tdb): New.
7136 (s390_regsets): Add regset for NT_S390_TDB.
7137
feea5f36
AA
71382014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7139
7140 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7141 without a fill_function.
7142 * linux-s390-low.c (s390_fill_last_break): Remove.
7143 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7144 (s390_arch_setup): Use regset's size instead of fill_function for
7145 loop end condition.
7146
098dbe61
AA
71472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7148
7149 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7150 the regset's store function when ptrace returned an error.
7151 * regcache.c (get_thread_regcache): Invalidate register cache
7152 before fetching inferior's registers.
7153
28eef672
AA
71542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7155
7156 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7157 while-loop as for-loop.
7158 (regsets_store_inferior_registers): Likewise.
7159
bdca27a2
YQ
71602014-11-28 Yao Qi <yao@codesourcery.com>
7161
7162 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7163 * config.in, configure: Re-generate.
7164 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7165 is defined.
7166
9c232dda
YQ
71672014-11-21 Yao Qi <yao@codesourcery.com>
7168
7169 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7170 (AC_CHECK_HEADERS): Remove malloc.h.
7171 * configure: Re-generated.
7172 * config.in: Re-generated.
7173 * server.h: Don't include alloca.h and malloc.h.
7174 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7175 Don't include malloc.h.
7176
43968415
JB
71772014-11-17 Joel Brobecker <brobecker@adacore.com>
7178
7179 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7180 corresponding ERRNO check in same block.
7181
40e91bc7
PA
71822014-11-12 Pedro Alves <palves@redhat.com>
7183
7184 * server.c (cont_thread): Update comment.
7185 (start_inferior, attach_inferior): No longer clear cont_thread.
7186 (handle_v_cont): No longer set cont_thread.
7187 (captured_main): Clear cont_thread each time a GDB connects.
7188
c2c118cf
PA
71892014-11-12 Pedro Alves <palves@redhat.com>
7190
7191 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7192 thread, and don't resume all threads if the Hc thread has exited.
7193
78708b7c
PA
71942014-11-12 Pedro Alves <palves@redhat.com>
7195
7196 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7197 the process group instead of to a specific LWP.
7198
a2abc7de
PA
71992014-10-15 Pedro Alves <palves@redhat.com>
7200
7201 PR server/17487
7202 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7203 parameter.
7204 (arm_set_thread_context): Delete.
7205 (the_low_target): Adjust.
7206 * win32-i386-low.c (debug_registers_changed)
7207 (debug_registers_used): Delete.
7208 (update_debug_registers_callback): New function.
7209 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7210 needing to update their debug registers.
7211 (win32_get_current_dr): New function.
7212 (x86_dr_low_get_addr, x86_dr_low_get_control)
7213 (x86_dr_low_get_status): Fetch the debug register from the thread
7214 record's context.
7215 (i386_initial_stuff): Adjust.
7216 (i386_get_thread_context): Remove current_event parameter. Don't
7217 clear debug_registers_changed nor copy DR values to
7218 debug_reg_state.
7219 (i386_set_thread_context): Delete.
7220 (i386_prepare_to_resume): New function.
7221 (i386_thread_added): Mark the thread as needing to update irs
7222 debug registers.
7223 (the_low_target): Remove i386_set_thread_context and install
7224 i386_prepare_to_resume.
7225 * win32-low.c (win32_get_thread_context): Adjust.
7226 (win32_set_thread_context): Use SetThreadContext
7227 directly.
7228 (win32_prepare_to_resume): New function.
7229 (win32_require_context): New function, factored out from ...
7230 (thread_rec): ... this.
7231 (continue_one_thread): Call win32_prepare_to_resume on each thread
7232 we're about to continue.
7233 (win32_resume): Call win32_prepare_to_resume on the event thread.
7234 * win32-low.h (struct win32_thread_info)
7235 <debug_registers_changed>: New field.
7236 (struct win32_target_ops): Change prototype of set_thread_context,
7237 delete set_thread_context and add prepare_to_resume.
7238 (win32_require_context): New declaration.
7239
a442d071
GB
72402014-10-08 Gary Benson <gbenson@redhat.com>
7241
7242 * server.h: Do not include common-exceptions.h.
7243
6f1947e8
GB
72442014-10-08 Gary Benson <gbenson@redhat.com>
7245
7246 * server.h: Do not include cleanups.h.
7247
63b434a4
JH
72482014-09-30 James Hogan <james.hogan@imgtec.com>
7249
7250 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7251 mips64-dsp-linux.c.
7252
c4d9ceb6
YQ
72532014-09-23 Yao Qi <yao@codesourcery.com>
7254
7255 * linux-low.c (lp_status_maybe_breakpoint): New function.
7256 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7257 (count_events_callback): Likewise.
7258 (select_event_lwp_callback): Likewise.
7259 (cancel_breakpoints_callback): Likewise.
7260
89a5711c
DB
72612014-09-19 Don Breazeal <donb@codesourcery.com>
7262
7263 * linux-low.c (handle_extended_wait): Call
7264 linux_ptrace_get_extended_event.
7265 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7266 linux_is_extended_waitstatus.
7267
bffc0964
JB
72682014-09-16 Joel Brobecker <brobecker@adacore.com>
7269
7270 * Makefile.in (CPPFLAGS): Define.
7271 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7272 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7273
0bfdf32f
GB
72742014-09-16 Gary Benson <gbenson@redhat.com>
7275
7276 * inferiors.h (current_inferior): Renamed as...
7277 (current_thread): New variable. All uses updated.
7278 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7279 (maybe_move_out_of_jump_pad): Likewise.
7280 (cancel_breakpoint): Likewise.
7281 (linux_low_filter_event): Likewise.
7282 (wait_for_sigstop): Likewise.
7283 (linux_resume_one_lwp): Likewise.
7284 (need_step_over_p): Likewise.
7285 (start_step_over): Likewise.
7286 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7287 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7288 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7289 and save_inferior as saved_thread.
7290 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7291 saved_thread.
7292 (regcache_invalidate_thread): Likewise.
7293 * remote-utils.c (prepare_resume_reply): Likewise.
7294 * thread-db.c (thread_db_get_tls_address): Likewise.
7295 (disable_thread_event_reporting): Likewise.
7296 (remove_thread_event_breakpoints): Likewise.
7297 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7298 as saved_thread.
7299 * target.h (set_desired_inferior): Renamed as...
7300 (set_desired_thread): New declaration. All uses updated.
7301 * server.c (myresume): Updated comment to reference thread instead
7302 of inferior.
7303 (handle_serial_event): Likewise.
7304 (handle_target_event): Likewise.
7305
361c8ade
GB
73062014-09-12 Tom Tromey <tromey@redhat.com>
7307 Gary Benson <gbenson@redhat.com>
7308
7309 * regcache.h: Include common-regcache.h.
7310 (regcache_read_pc): Don't declare.
7311 * regcache.c (get_thread_regcache_for_ptid): New function.
7312
bd9269f7
GB
73132014-09-11 Tom Tromey <tromey@redhat.com>
7314 Gary Benson <gbenson@redhat.com>
7315
7316 * symbol.c: New file.
7317 * Makefile.in (SFILES): Add symbol.c.
7318 (OBS): Add symbol.o.
7319
f8c1d06b
GB
73202014-09-11 Gary Benson <gbenson@redhat.com>
7321
7322 * target.c (target_stop_ptid, target_continue_ptid): New
7323 functions.
7324
721ec300
GB
73252014-09-11 Tom Tromey <tromey@redhat.com>
7326 Gary Benson <gbenson@redhat.com>
7327
7328 * target.h: Include target/target.h.
7329 * target.c (target_read_memory, target_read_uint32)
7330 (target_write_memory): New functions.
7331
c5e92cca
GB
73322014-09-11 Gary Benson <gbenson@redhat.com>
7333
7334 * server.h (debug_hw_points): Don't declare.
7335 * server.c (debug_hw_points): Don't define. Replace all uses
7336 with show_debug_regs.
7337 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7338 all uses with show_debug_regs.
7339
2e4bb98a
EBM
73402014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7341
7342 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7343 endianness into account.
7344 (ppc_supply_ptrace_register): Likewise.
7345
ac740bc7
JH
73462014-09-03 James Hogan <james.hogan@imgtec.com>
7347
7348 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7349 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7350
97ea6506
GB
73512014-09-03 Gary Benson <gbenson@redhat.com>
7352
7353 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7354 ALL_DEBUG_ADDRESS_REGISTERS.
7355
df7e5265
GB
73562014-09-02 Gary Benson <gbenson@redhat.com>
7357
7358 * i386-low.h: Renamed as...
7359 * x86-low.h: New file. All type, function and variable name
7360 prefixes changed from "i386_" to "x86_". All references updated.
7361 * i386-low.c: Renamed as...
7362 * x86-low.c: New file. All type, function and variable name
7363 prefixes changed from "i386_" to "x86_". All references updated.
7364
ed859da7
GB
73652014-09-02 Gary Benson <gbenson@redhat.com>
7366
7367 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7368 (x86_linux_new_thread): Likewise.
7369
860789c7
GB
73702014-08-29 Gary Benson <gbenson@redhat.com>
7371
7372 * server.h (setjmp.h): Do not include.
7373 (toplevel): Do not declare.
7374 (common-exceptions.h): Include.
7375 (cleanups.h): Likewise.
7376 * server.c (toplevel): Do not define.
7377 (exit_code): New static global.
7378 (detach_or_kill_for_exit_cleanup): New function.
7379 (main): New function. Original main renamed to...
7380 (captured_main): New function.
7381 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7382
ff55e1b5
GB
73832014-08-29 Gary Benson <gbenson@redhat.com>
7384
7385 * Makefile.in (SFILES): Add common/common-exceptions.c.
7386 (OBS): Add common-exceptions.o.
7387 (common-exceptions.o): New rule.
7388 * utils.c (prepare_to_throw_exception): New function.
7389
e9bcb658
GB
73902014-08-29 Gary Benson <gbenson@redhat.com>
7391
7392 * config.in: Regenerate.
7393 * configure: Likewise.
7394
e3180625
GB
73952014-08-29 Gary Benson <gbenson@redhat.com>
7396
7397 * Makefile.in (SFILES): Add common/cleanups.c.
7398 (OBS): cleanups.o.
7399 (cleanups.o): New rule.
7400
e3d6ba5d
GB
74012014-08-29 Gary Benson <gbenson@redhat.com>
7402
7403 * utils.c (internal_vwarning): New function.
7404
7096e886
GB
74052014-08-28 Gary Benson <gbenson@redhat.com>
7406
7407 * utils.h (fatal): Remove declaration.
7408 * utils.c (fatal): Remove function.
7409
14ce3192
GB
74102014-08-28 Gary Benson <gbenson@redhat.com>
7411
7412 * tracepoint.c (gdb_agent_init): Replace fatal with
7413 perror_with_name.
7414 (initialize_tracepoint): Likewise.
7415
50278d59
GB
74162014-08-28 Gary Benson <gbenson@redhat.com>
7417
7418 * remote-utils.c (remote_prepare): Replace fatal with error.
7419
aa96c426
GB
74202014-08-28 Gary Benson <gbenson@redhat.com>
7421
7422 * linux-low.c (linux_async): Replace fatal with warning.
7423 Tidy up and return.
7424 (linux_start_non_stop): Return -1 if linux_async failed.
7425
f7160e97
GB
74262014-08-28 Gary Benson <gbenson@redhat.com>
7427
7428 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7429 gdb_assert.
7430 (i386_dr_low_get_addr): Remove vague comment.
7431 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7432 gdb_assert.
7433
38e08fca
GB
74342014-08-28 Gary Benson <gbenson@redhat.com>
7435
7436 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7437 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7438 internal_error.
7439 (linux_resume_one_lwp): Likewise.
7440 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7441 gdb_assert.
7442 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7443 with internal_error.
7444 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7445 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7446 (find_register_by_name): Replace fatal with internal_error.
7447 (find_regno): Likewise.
7448 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7449 * thread-db.c (thread_db_create_event): Likewise.
7450 (thread_db_load_search): Likewise.
7451 (try_thread_db_load_1): Likewise.
7452 * tracepoint.c (get_jump_space_head): Replace fatal with
7453 internal_error.
7454 (claim_trampoline_space): Likewise.
7455 (have_fast_tracepoint_trampoline_buffer): Likewise.
7456 (cmd_qtstart): Likewise.
7457 (stop_tracing): Likewise.
7458 (fast_tracepoint_collecting): Likewise.
7459 (target_malloc): Likewise.
7460 (download_tracepoint): Likewise.
7461 (download_trace_state_variables): Replace check with gdb_assert.
7462 (upload_fast_traceframes): Replace fatal with internal_error.
7463
34abf635
GB
74642014-08-19 Tom Tromey <tromey@redhat.com>
7465 Gary Benson <gbenson@redhat.com>
7466
7467 * Makefile.in (SFILES): Add common/common-debug.c.
7468 (OBS): Add common-debug.o.
7469 (common-debug.o): New rule.
7470 * debug.h (debug_printf): Don't declare.
7471 * debug.c (debug_printf): Renamed and rewritten as...
7472 (debug_vprintf): New function.
7473
f6e94d78
GB
74742014-08-19 Gary Benson <gbenson@redhat.com>
7475
7476 * utils.h: Do not include print-utils.h.
7477
9239eeab
GB
74782014-08-19 Tom Tromey <tromey@redhat.com>
7479 Gary Benson <gbenson@redhat.com>
7480
7481 * server.h: Add static assertion.
7482 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7483
ef87c8bb
GB
74842014-08-19 Tom Tromey <tromey@redhat.com>
7485 Gary Benson <gbenson@redhat.com>
7486
7487 * Makefile.in (SFILES): Add common/errors.c.
7488 (OBS): Add errors.o.
7489 (IPA_OBS): Add errors-ipa.o.
7490 (errors.o): New rule.
7491 (errors-ipa.o): Likewise.
7492 * utils.h (perror_with_name, error, warning): Don't declare.
7493 * utils.c (warning): Renamed and rewritten as...
7494 (vwarning): New function.
7495 (error): Renamed and rewritten as...
7496 (verror): New function.
7497 (internal_error): Renamed and rewritten as...
7498 (internal_verror): New function.
7499
bb974a24
GB
75002014-08-07 Gary Benson <gbenson@redhat.com>
7501
7502 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7503 * configure: Regenerate.
7504 * config.in: Likewise.
7505 * server.h: Do not include errno.h.
7506 * event-loop.c: Likewise.
7507 * hostio-errno.c: Likewise.
7508 * linux-low.c: Likewise.
7509 * remote-utils.c: Likewise.
7510 * spu-low.c: Likewise.
7511 * utils.c: Likewise.
7512 * gdbreplay.c: Unconditionally include errno.h.
7513
6d3d12eb
GB
75142014-08-07 Gary Benson <gbenson@redhat.com>
7515
7516 * server.h: Do not include string.h.
7517 * event-loop.c: Likewise.
7518 * linux-low.c: Likewise.
7519 * regcache.c: Likewise.
7520 * remote-utils.c: Likewise.
7521 * spu-low.c: Likewise.
7522 * utils.c: Likewise.
7523
dccbb609
GB
75242014-08-07 Gary Benson <gbenson@redhat.com>
7525
7526 * server.h: Do not include gdb_assert.h.
7527
e76df0d0
GB
75282014-08-07 Gary Benson <gbenson@redhat.com>
7529
7530 * server.h: Do not include common-utils.h.
7531
4cb9c816
GB
75322014-08-07 Gary Benson <gbenson@redhat.com>
7533
7534 * server.h: Do not include ptid.h.
7535 * notif.h: Likewise.
7536
3995eeee
GB
75372014-08-07 Gary Benson <gbenson@redhat.com>
7538
7539 * server.h: Do not include gdb_locale.h.
7540
cb9f1a9b
GB
75412014-08-07 Gary Benson <gbenson@redhat.com>
7542
7543 * server.h: Do not include gdb/signals.h.
7544 * win32-low.c: Likewise.
7545
a5fceff8
GB
75462014-08-07 Gary Benson <gbenson@redhat.com>
7547
7548 * server.h: Do not include pathmax.h.
7549
b9391142
GB
75502014-08-07 Gary Benson <gbenson@redhat.com>
7551
7552 * server.h: Do not include libiberty.h.
7553 * linux-bfin-low.c: Likewise.
7554
0e443c87
GB
75552014-08-07 Gary Benson <gbenson@redhat.com>
7556
7557 * server.h: Do not include ansidecl.h.
7558
8ebb3f56
GB
75592014-08-07 Gary Benson <gbenson@redhat.com>
7560
7561 * linux-x86-low.c: Do not include stddef.h.
7562 * lynx-ppc-low.c: Likewise.
7563 * tracepoint.c: Likewise.
7564
8980bdf6
GB
75652014-08-07 Gary Benson <gbenson@redhat.com>
7566
7567 * server.h: Do not include stdarg.h.
7568 * nto-low.c: Likewise.
7569
d7096f71
GB
75702014-08-07 Gary Benson <gbenson@redhat.com>
7571
7572 * server.h: Do not include stdlib.h.
7573 * inferiors.c: Likewise.
7574 * linux-low.c: Likewise.
7575 * regcache.c: Likewise.
7576 * spu-low.c: Likewise.
7577 * tracepoint.c: Likewise.
7578 * utils.c: Likewise.
7579
d02f550d
GB
75802014-08-07 Gary Benson <gbenson@redhat.com>
7581
7582 * server.h: Do not include stdio.h.
7583 * linux-low.c: Likewise.
7584 * remote-utils.c: Likewise.
7585 * spu-low.c: Likewise.
7586 * utils.c: Likewise.
7587 * wincecompat.c: Likewise.
7588
87f6c4e3
GB
75892014-08-06 Gary Benson <gbenson@redhat.com>
7590
7591 * regcache.c (init_register_cache): Move conditionals inside if.
7592
7089dca4
GB
75932014-08-06 Gary Benson <gbenson@redhat.com>
7594
7595 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7596
462f517e
GB
75972014-07-31 Gary Benson <gbenson@redhat.com>
7598
7599 * ax.h: Do not include server.h.
7600 * gdbthread.h: Likewise.
7601 * lynx-low.h: Likewise.
7602 * notif.h: Likewise.
7603
976411d6
GB
76042014-07-30 Gary Benson <gbenson@redhat.com>
7605
7606 * server.h: Include common-defs.h.
7607 Do not include config.h or build-gnulib-gdbserver/config.h.
7608
d41f6d8e
GB
76092014-07-30 Gary Benson <gbenson@redhat.com>
7610
7611 * hostio-errno.c: Move server.h to top of includes list.
7612 * inferiors.c: Likewise.
7613 * linux-x86-low.c: Likewise.
7614 * notif.c: Include server.h.
7615
314c6a35
TT
76162014-07-24 Tom Tromey <tromey@redhat.com>
7617 Gary Benson <gbenson@redhat.com>
7618
7619 * server.h (CORE_ADDR): Now unsigned.
7620
69ff6be5
PA
76212014-07-16 Pedro Alves <palves@redhat.com>
7622
7623 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7624
ce9e3fe7
PA
76252014-07-15 Pedro Alves <palves@redhat.com>
7626
7627 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7628 copy.
7629
e76126e8
PA
76302014-07-11 Pedro Alves <palves@redhat.com>
7631
7632 * linux-low.c (kill_wait_lwp): New function, based on
7633 kill_one_lwp_callback, but use my_waitpid directly.
7634 (kill_one_lwp_callback, linux_kill): Use it.
7635
8e9db26e
PA
76362014-06-23 Pedro Alves <palves@redhat.com>
7637
7638 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7639 before setting DR0..DR3.
7640
698b3e08
GB
76412014-06-20 Gary Benson <gbenson@redhat.com>
7642
7643 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7644 * configure: Regenerated.
7645 * config.in: Likewise.
7646
125f8a3d
GB
76472014-06-20 Gary Benson <gbenson@redhat.com>
7648
7649 * Makefile.in (SFILES): Update locations for files moved
7650 from common to nat.
7651 (object file files): Reordered.
7652
42995dbd
GB
76532014-06-20 Gary Benson <gbenson@redhat.com>
7654
7655 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7656 (i386_dr_low_set_addr): Likewise.
7657 (i386_dr_low_get_addr): Likewise.
7658 (i386_dr_low_can_set_control): Likewise.
7659 (i386_dr_low_set_control): Likewise.
7660 (i386_dr_low_get_control): Likewise.
7661 (i386_dr_low_get_status): Likewise.
7662 (i386_get_debug_register_length): Likewise.
7663 * linux-x86-low.c (i386_dr_low_set_addr):
7664 Changed signature. Made static.
7665 (i386_dr_low_get_addr): Likewise.
7666 (i386_dr_low_set_control): Likewise.
7667 (i386_dr_low_get_control): Likewise.
7668 (i386_dr_low_get_status): Likewise.
7669 (i386_dr_low): New global variable.
7670 * win32-i386-low.c (i386_dr_low_set_addr):
7671 Changed signature. Made static.
7672 (i386_dr_low_get_addr): Likewise.
7673 (i386_dr_low_set_control): Likewise.
7674 (i386_dr_low_get_control): Likewise.
7675 (i386_dr_low_get_status): Likewise.
7676 (i386_dr_low): New global variable.
7677
e1d2394b
MS
76782014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7679
7680 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7681 * Makefile.in (AR, AR_FLAGS): Define.
7682 * configure: Regenerate.
7683
3a8ee006
GB
76842014-06-19 Gary Benson <gbenson@redhat.com>
7685
7686 * Makefile.in (i386-dregs.o): New rule.
7687 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7688 * i386-low.c (target.h): Remove include.
7689 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7690 (DR_CONTROL_SHIFT): Likewise.
7691 (DR_CONTROL_SIZE): Likewise.
7692 (DR_RW_EXECUTE): Likewise.
7693 (DR_RW_WRITE): Likewise.
7694 (DR_RW_READ): Likewise.
7695 (DR_RW_IORW): Likewise.
7696 (DR_LEN_1): Likewise.
7697 (DR_LEN_2): Likewise.
7698 (DR_LEN_4): Likewise.
7699 (DR_LEN_8): Likewise.
7700 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7701 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7702 (DR_ENABLE_SIZE): Likewise.
7703 (DR_LOCAL_SLOWDOWN): Likewise.
7704 (DR_GLOBAL_SLOWDOWN): Likewise.
7705 (DR_CONTROL_RESERVED): Likewise.
7706 (I386_DR_CONTROL_MASK): Likewise.
7707 (I386_DR_VACANT): Likewise.
7708 (I386_DR_LOCAL_ENABLE): Likewise.
7709 (I386_DR_GLOBAL_ENABLE): Likewise.
7710 (I386_DR_DISABLE): Likewise.
7711 (I386_DR_SET_RW_LEN): Likewise.
7712 (I386_DR_GET_RW_LEN): Likewise.
7713 (I386_DR_WATCH_HIT): Likewise.
7714 (i386_wp_op_t): Likewise.
7715 (i386_show_dr): Likewise.
7716 (i386_length_and_rw_bits): Likewise.
7717 (i386_insert_aligned_watchpoint): Likewise.
7718 (i386_remove_aligned_watchpoint): Likewise.
7719 (i386_handle_nonaligned_watchpoint): Likewise.
7720 i386_update_inferior_debug_regs(): Likewise.
7721 (i386_dr_insert_watchpoint): Likewise.
7722 (i386_dr_remove_watchpoint): Likewise.
7723 (i386_dr_region_ok_for_watchpoint): Likewise.
7724 (i386_dr_stopped_data_address): Likewise.
7725 (i386_dr_stopped_by_watchpoint): Likewise.
7726
8f26655c
GB
77272014-06-19 Gary Benson <gbenson@redhat.com>
7728
7729 * i386-low.c (i386_dr_show): Renamed to
7730 i386_show_dr and made static. All uses updated.
7731 (i386_dr_length_and_rw_bits): Renamed to
7732 i386_length_and_rw_bits and made static.
7733 All uses updated.
7734 (i386_dr_insert_aligned_watchpoint): Renamed to
7735 i386_insert_aligned_watchpoint and made static.
7736 All uses updated.
7737 (i386_dr_remove_aligned_watchpoint): Renamed to
7738 i386_remove_aligned_watchpoint and made static.
7739 All uses updated.
7740 (i386_dr_update_inferior_debug_regs): Renamed to
7741 i386_update_inferior_debug_regs and made static.
7742 All uses updated.
7743
b9228891
GB
77442014-06-18 Gary Benson <gbenson@redhat.com>
7745
5171def3
GB
7746 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7747 (i386_dr_low_can_set_control): Likewise.
7748 (i386_get_debug_register_length): Likewise.
7749 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7750 (i386_dr_low_can_set_control): Likewise.
7751 (i386_get_debug_register_length): Likewise.
7752
77532014-06-17 Gary Benson <gbenson@redhat.com>
7754
b9228891
GB
7755 * i386-low.h (i386-dregs.h): New include.
7756 (DR_FIRSTADDR): Now in i386-dregs.h.
7757 (DR_LASTADDR): Likewise.
7758 (DR_NADDR): Likewise.
7759 (DR_STATUS): Likewise.
7760 (DR_CONTROL): Likewise.
7761 (i386_debug_reg_state): Likewise.
7762 (i386_dr_insert_watchpoint): Likewise.
7763 (i386_dr_remove_watchpoint): Likewise.
7764 (i386_dr_region_ok_for_watchpoint): Likewise.
7765 (i386_dr_stopped_data_address): Likewise.
7766 (i386_dr_stopped_by_watchpoint): Likewise.
7767 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7768
4be83cc2
GB
77692014-06-18 Gary Benson <gbenson@redhat.com>
7770
7771 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7772 i386_dr_insert_watchpoint.
7773 (i386_low_remove_watchpoint): Renamed to
7774 i386_dr_remove_watchpoint.
7775 (i386_low_region_ok_for_watchpoint): Renamed to
7776 i386_dr_region_ok_for_watchpoint.
7777 (i386_low_stopped_data_address): Renamed to
7778 i386_dr_stopped_data_address.
7779 (i386_low_stopped_by_watchpoint): Renamed to
7780 i386_dr_stopped_by_watchpoint.
7781 * i386-low.c (i386_show_dr): Renamed to
7782 i386_dr_show and made nonstatic. All uses updated.
7783 (i386_length_and_rw_bits): Renamed to
7784 i386_dr_length_and_rw_bits and made nonstatic.
7785 All uses updated.
7786 (i386_insert_aligned_watchpoint): Renamed to
7787 i386_dr_insert_aligned_watchpoint and made nonstatic.
7788 All uses updated.
7789 (i386_remove_aligned_watchpoint): Renamed to
7790 i386_dr_remove_aligned_watchpoint and made nonstatic.
7791 All uses updated.
7792 (i386_update_inferior_debug_regs): Renamed to
7793 i386_dr_update_inferior_debug_regs and made nonstatic.
7794 All uses updated.
7795 (i386_low_insert_watchpoint): Renamed to
7796 i386_dr_insert_watchpoint. All uses updated.
7797 (i386_low_remove_watchpoint): Renamed to
7798 i386_dr_remove_watchpoint. All uses updated.
7799 (i386_low_region_ok_for_watchpoint): Renamed to
7800 i386_dr_region_ok_for_watchpoint. All uses updated.
7801 (i386_low_stopped_data_address): Renamed to
7802 i386_dr_stopped_data_address. All uses updated.
7803 (i386_low_stopped_by_watchpoint): Renamed to
7804 i386_dr_stopped_by_watchpoint. All uses updated.
7805
131aa0d4
GB
78062014-06-18 Gary Benson <gbenson@redhat.com>
7807
7808 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7809 (i386_dr_low_can_set_control): Likewise.
7810 (i386_insert_aligned_watchpoint): New check.
7811
d9305f7f
GB
78122014-06-18 Gary Benson <gbenson@redhat.com>
7813
7814 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7815 Renamed to state.
7816
e927c9fc
GB
78172014-06-18 Gary Benson <gbenson@redhat.com>
7818
7819 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7820 instead of fatal and error.
7821 (i386_handle_nonaligned_watchpoint): Likewise.
7822
1b6d4134
GB
78232014-06-18 Gary Benson <gbenson@redhat.com>
7824
7825 * i386-low.c (i386_get_debug_register_length): New macro.
7826 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7827 (i386_show_dr): Use debug_printf instead of fprintf. Use
7828 phex to format values.
7829
6e62758f
GB
78302014-06-18 Gary Benson <gbenson@redhat.com>
7831
7832 * i386-low.h: Comment changes.
7833 * i386-low.c: Likewise.
7834
fc6e2f03
GB
78352014-06-18 Gary Benson <gbenson@redhat.com>
7836
7837 * i386-low.c: Whitespace changes.
7838
f9d1eeed
TT
78392014-06-12 Tom Tromey <tromey@redhat.com>
7840
7841 * utils.c (freeargv): Remove.
7842
0b04e523
TT
78432014-06-12 Tom Tromey <tromey@redhat.com>
7844
7845 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7846 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7847 (parse_debug_format_options): Likewise.
7848 (gdbserver_usage): Likewise.
7849 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7850 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7851 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7852 against libiberty.
7853 ($(LIBGNU)): Depend on libiberty.
7854 (all-lib): Recurse into all subdirs.
7855 (install-only): Invoke "install" target in subdirs.
7856 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7857 targets.
7858 * configure: Rebuild.
7859 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7860 for vasprintf, vsnprintf, or gettimeofday.
7861 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7862 srv_tgtobj.
7863
270c9937
JB
78642014-06-05 Joel Brobecker <brobecker@adacore.com>
7865
7866 * development.sh: Delete.
7867 * Makefile.in (config.status): Adjust dependency on development.sh.
7868 * configure.ac: Adjust development.sh source call.
7869 * configure: Regenerate.
7870
0a261ed8
PA
78712014-06-02 Pedro Alves <palves@redhat.com>
7872
7873 * ax.c (gdb_free_agent_expr): New function.
7874 * ax.h (gdb_free_agent_expr): New declaration.
7875 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7876 list.
7877 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7878 static.
7879 (clear_breakpoint_conditions_and_commands): New function.
7880 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7881 (clear_breakpoint_conditions_and_commands): New declaration.
7882
e9dae05e
RR
78832014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7884
7885 * linux-aarch64-low.c (asm/ptrace.h): Include.
7886
5876f503
JK
78872014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7888
7889 Fix TLS access for -static -pthread.
7890 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7891 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7892 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7893
802e8e6d
PA
78942014-05-20 Pedro Alves <palves@redhat.com>
7895
7896 * linux-aarch64-low.c (aarch64_insert_point)
7897 (aarch64_remove_point): No longer check whether the type is
7898 supported here. Adjust to new interface.
7899 (the_low_target): Install aarch64_supports_z_point_type as
7900 supports_z_point_type method.
7901 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7902 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7903 instead of a Z packet char. Adjust.
7904 (arm_supports_z_point_type): New function.
7905 (arm_insert_point, arm_remove_point): Adjust to new interface.
7906 (the_low_target): Install arm_supports_z_point_type.
7907 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7908 (cris_insert_point, cris_remove_point): Adjust to new interface.
7909 Don't check whether the type is supported here.
7910 (the_low_target): Install cris_supports_z_point_type.
7911 * linux-low.c (linux_supports_z_point_type): New function.
7912 (linux_insert_point, linux_remove_point): Adjust to new interface.
7913 * linux-low.h (struct linux_target_ops) <insert_point,
7914 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7915 raw_breakpoint pointer parameter.
7916 <supports_z_point_type>: New method.
7917 * linux-mips-low.c (mips_supports_z_point_type): New function.
7918 (mips_insert_point, mips_remove_point): Adjust to new interface.
7919 Use mips_supports_z_point_type.
7920 (the_low_target): Install mips_supports_z_point_type.
7921 * linux-ppc-low.c (the_low_target): Install NULL as
7922 supports_z_point_type method.
7923 * linux-s390-low.c (the_low_target): Install NULL as
7924 supports_z_point_type method.
7925 * linux-sparc-low.c (the_low_target): Install NULL as
7926 supports_z_point_type method.
7927 * linux-x86-low.c (x86_supports_z_point_type): New function.
7928 (x86_insert_point): Adjust to new insert_point interface. Use
7929 insert_memory_breakpoint. Adjust to new
7930 i386_low_insert_watchpoint interface.
7931 (x86_remove_point): Adjust to remove_point interface. Use
7932 remove_memory_breakpoint. Adjust to new
7933 i386_low_remove_watchpoint interface.
7934 (the_low_target): Install x86_supports_z_point_type.
7935 * lynx-low.c (lynx_target_ops): Install NULL as
7936 supports_z_point_type callback.
7937 * nto-low.c (nto_supports_z_point_type): New.
7938 (nto_insert_point, nto_remove_point): Adjust to new interface.
7939 (nto_target_ops): Install nto_supports_z_point_type.
7940 * mem-break.c: Adjust intro comment.
7941 (struct raw_breakpoint) <raw_type, size>: New fields.
7942 <inserted>: Update comment.
7943 <shlib_disabled>: Delete field.
7944 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7945 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7946 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7947 (raw_bkpt_type_to_target_hw_bp_type): New function.
7948 (find_enabled_raw_code_breakpoint_at): New function.
7949 (find_raw_breakpoint_at): New type and size parameters. Use them.
7950 (insert_memory_breakpoint): New function, based off
7951 set_raw_breakpoint_at.
7952 (remove_memory_breakpoint): New function.
7953 (set_raw_breakpoint_at): Reimplement.
7954 (set_breakpoint): New, based on set_breakpoint_at.
7955 (set_breakpoint_at): Reimplement.
7956 (delete_raw_breakpoint): Go through the_target->remove_point
7957 instead of assuming memory breakpoints.
7958 (find_gdb_breakpoint_at): Delete.
7959 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7960 (find_gdb_breakpoint): New function.
7961 (set_gdb_breakpoint_at): Delete.
7962 (z_type_supported): New function.
7963 (set_gdb_breakpoint_1): New function, loosely based off
7964 set_gdb_breakpoint_at.
7965 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7966 (delete_gdb_breakpoint_at): Delete.
7967 (delete_gdb_breakpoint_1): New function, loosely based off
7968 delete_gdb_breakpoint_at.
7969 (delete_gdb_breakpoint): New function.
7970 (clear_gdb_breakpoint_conditions): Rename to ...
7971 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7972 breakpoint.
7973 (add_condition_to_breakpoint): Make static.
7974 (add_breakpoint_condition): Take a struct breakpoint pointer
7975 instead of an address. Adjust.
7976 (gdb_condition_true_at_breakpoint): Rename to ...
7977 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7978 z_type parameter.
7979 (gdb_condition_true_at_breakpoint): Reimplement.
7980 (add_breakpoint_commands): Take a struct breakpoint pointer
7981 instead of an address. Adjust.
7982 (gdb_no_commands_at_breakpoint): Rename to ...
7983 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7984 parameter. Return true if no breakpoint was found. Change debug
7985 output.
7986 (gdb_no_commands_at_breakpoint): Reimplement.
7987 (run_breakpoint_commands): Rename to ...
7988 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7989 and change return type to boolean.
7990 (run_breakpoint_commands): New function.
7991 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7992 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7993 breakpoint. Go through the_target->remove_point instead of
7994 assuming memory breakpoint.
7995 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7996 software and hardware breakpoints.
7997 (reinsert_raw_breakpoint): Go through the_target->insert_point
7998 instead of assuming memory breakpoint.
7999 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8000 software and hardware breakpoints.
8001 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8002 Check both software and hardware breakpoints.
8003 (validate_inserted_breakpoint): Assert the breakpoint is a
8004 software breakpoint. Set the inserted flag to -1 instead of
8005 setting shlib_disabled.
8006 (delete_disabled_breakpoints): Adjust.
8007 (validate_breakpoints): Only validate software breakpoints.
8008 Adjust to inserted flag change.
8009 (check_mem_read, check_mem_write): Skip breakpoint types other
8010 than software breakpoints. Adjust to inserted flag change.
8011 * mem-break.h (enum raw_bkpt_type): New enum.
8012 (raw_breakpoint, struct process_info): Forward declare.
8013 (Z_packet_to_target_hw_bp_type): Delete declaration.
8014 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8015 (set_gdb_breakpoint, delete_gdb_breakpoint)
8016 (clear_breakpoint_conditions): New declarations.
8017 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8018 (breakpoint_inserted_here): Update comment.
8019 (add_breakpoint_condition, add_breakpoint_commands): Replace
8020 address parameter with a breakpoint pointer parameter.
8021 (gdb_breakpoint_here): Update comment.
8022 (delete_gdb_breakpoint_at): Delete.
8023 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8024 * server.c (process_point_options): Take a struct breakpoint
8025 pointer instead of an address. Adjust.
8026 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8027 delete_gdb_breakpoint.
8028 * spu-low.c (spu_target_ops): Install NULL as
8029 supports_z_point_type method.
8030 * target.h: Include mem-break.h.
8031 (struct target_ops) <prepare_to_access_memory>: Update comment.
8032 <supports_z_point_type>: New field.
8033 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8034 instead of a char. Also take a raw breakpoint pointer.
8035 * win32-arm-low.c (the_low_target): Install NULL as
8036 supports_z_point_type.
8037 * win32-i386-low.c (i386_supports_z_point_type): New function.
8038 (i386_insert_point, i386_remove_point): Adjust to new interface.
8039 (the_low_target): Install i386_supports_z_point_type.
8040 * win32-low.c (win32_supports_z_point_type): New function.
8041 (win32_insert_point, win32_remove_point): Adjust to new interface.
8042 (win32_target_ops): Install win32_supports_z_point_type.
8043 * win32-low.h (struct win32_target_ops):
8044 <supports_z_point_type>: New method.
8045 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8046 instead of a char. Also take a raw breakpoint pointer.
8047
932539e3
PA
80482014-05-20 Pedro Alves <palves@redhat.com>
8049
8050 * mem-break.h: Include break-common.h.
8051 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8052 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8053 (Z_packet_to_target_hw_bp_type): New declaration.
8054 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8055 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8056 (Z_PACKET_ACCESS_WP): Delete macros.
8057 (Z_packet_to_hw_type): Delete function.
8058 * i386-low.h: Don't include break-common.h here.
8059 (Z_packet_to_hw_type): Delete declaration.
8060 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8061 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8062 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8063 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8064 * linux-aarch64-low.c: Don't include break-common.h here.
8065 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8066 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8067 (Z_packet_to_target_hw_bp_type): Delete function.
8068 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8069 function.
8070 (mips_insert_point, mips_remove_point): Use
8071 Z_packet_to_target_hw_bp_type.
8072
4ff0d3d8
PA
80732014-05-20 Pedro Alves <palves@redhat.com>
8074
8075 * linux-aarch64-low.c: Include break-common.h.
8076 (enum target_point_type): Delete.
8077 (Z_packet_to_point_type): Rename to ...
8078 (Z_packet_to_target_hw_bp_type): ... this, and return a
8079 target_hw_bp_type instead.
8080 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8081 instead of an enum target_point_type.
8082 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8083 breakpoint type.
8084 (aarch64_dr_state_insert_one_point)
8085 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8086 (aarch64_handle_aligned_watchpoint)
8087 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8088 Take an enum target_hw_bp_type instead of an enum
8089 target_point_type.
8090 (aarch64_supports_z_point_type): New function.
8091 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8092 use Z_packet_to_target_hw_bp_type.
8093
786dc519
JB
80942014-05-20 Joel Brobecker <brobecker@adacore.com>
8095
8096 * configure.ac: Only use -Werror by default when DEVELOPMENT
8097 is true.
8098 * configure: Regenerate.
8099
9e0aa64f
JK
81002014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8101
8102 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8103 * linux-x86-low.c (X86_64_USER_REGS): New.
8104 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8105
2b577b92
YQ
81062014-04-28 Yao Qi <yao@codesourcery.com>
8107
8108 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8109 name.
8110
94611da2
PA
81112014-04-25 Pedro Alves <palves@redhat.com>
8112
8113 PR server/16255
8114 * linux-low.c (linux_attach_fail_reason_string): New function.
8115 (linux_attach_lwp): Delete.
8116 (linux_attach_lwp_1): Rename to ...
8117 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8118 argument. Remove "initial" parameter. Return int instead of
8119 void. Don't error or warn here.
8120 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8121 failure to attach to the tgid. Call warning when failing to
8122 attach to an lwp.
8123 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8124 argument. Remove "initial" parameter. Return int instead of
8125 void. Don't error or warn here.
8126 (linux_attach_fail_reason_string): New declaration.
8127 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8128 interface change. Use linux_attach_fail_reason_string.
8129
01f9f808
MS
81302014-04-24 Michael Sturm <michael.sturm@mintel.com>
8131 Walfred Tedeschi <walfred.tedeschi@intel.com>
8132
8133 * Makefile.in: Added rules to handle new files
8134 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8135 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8136 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8137 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8138 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8139 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8140 x32-avx512-linux.o.
8141 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8142 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8143 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8144 i386/x32-avx512.xml.
8145 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8146 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8147 i386/x32-avx512-linux.xml.
8148 * i387-fp.c (num_avx512_k_registers): New constant for number
8149 of K registers.
8150 (num_avx512_zmmh_low_registers): New constant for number of
8151 lower ZMM registers (0-15).
8152 (num_avx512_zmmh_high_registers): New constant for number of
8153 higher ZMM registers (16-31).
8154 (num_avx512_ymmh_registers): New contant for number of higher
8155 YMM registers (ymm16-31 added by avx521 on x86_64).
8156 (num_avx512_xmm_registers): New constant for number of higher
8157 XMM registers (xmm16-31 added by AVX512 on x86_64).
8158 (struct i387_xsave): Add space for AVX512 registers.
8159 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8160 Add code to handle AVX512 registers.
8161 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8162 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8163 prototypei from generated file.
8164 (tdesc_amd64_avx512_linux): Likewise.
8165 (init_registers_x32_avx512_linux): Likewise.
8166 (tdesc_x32_avx512_linux): Likewise.
8167 (init_registers_i386_avx512_linux): Likewise.
8168 (tdesc_i386_avx512_linux): Likewise.
8169 (x86_64_regmap): Add AVX512 registers.
8170 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8171 mask.
8172 (initialize_low_arch): Add code to initialize AVX512 registers.
8173
51aa91f9
PA
81742014-04-23 Pedro Alves <palves@redhat.com>
8175
8176 * mem-break.c (find_gdb_breakpoint_at): Make static.
8177 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8178
a4165e94
PA
81792014-04-23 Pedro Alves <palves@redhat.com>
8180
8181 * i386-low.c: Don't include break-common.h here.
8182 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8183 prototype to take target_hw_bp_type as argument instead of a Z
8184 packet char.
8185 * i386-low.h: Include break-common.h here.
8186 (Z_packet_to_hw_type): Declare.
8187 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8188 prototypes.
8189 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8190 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8191 (x86_remove_point): Convert the packet number to a
8192 target_hw_bp_type before calling i386_low_remove_watchpoint.
8193 * win32-i386-low.c (i386_insert_point): Convert the packet number
8194 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8195 (i386_remove_point): Convert the packet number to a
8196 target_hw_bp_type before calling i386_low_remove_watchpoint.
8197
b8acf843
PA
81982014-04-23 Pedro Alves <palves@redhat.com>
8199
8200 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8201
d708bcd1
PA
82022014-04-10 Pedro Alves <palves@redhat.com>
8203
8204 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8205 Check if the condition or command is NULL before checking if the
8206 breakpoint is known. On success, return true.
8207 * mem-break.h (add_breakpoint_condition): Document return.
8208 (add_breakpoint_commands): Add describing comment.
8209 * server.c (skip_to_semicolon): New function.
8210 (process_point_options): Use it.
8211
2eec7d5b
PA
82122014-04-09 Pedro Alves <palves@redhat.com>
8213
8214 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8215 to lwpid_of.
8216
fa96cb38
PA
82172014-02-27 Pedro Alves <palves@redhat.com>
8218
8219 PR 12702
8220 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8221 macros.
8222 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8223 output.
8224 (last_thread_of_process_p): Take a PID argument instead of a
8225 thread pointer.
8226 (linux_wait_for_lwp): Delete.
8227 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8228 functions.
8229 (linux_low_filter_event): New function, party factored out from
8230 linux_wait_for_event.
8231 (linux_wait_for_event): Rename to ...
8232 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8233 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8234 sigsuspend. Check for zombie leaders.
8235 (linux_wait_for_event): Reimplement as wrapper around
8236 linux_wait_for_event_filtered.
8237 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8238 a normal or signal exit is seen, it's the whole process exiting.
8239 (wait_for_sigstop): No longer a for_each_inferior callback.
8240 Rewrite on top of linux_wait_for_event_filtered.
8241 (stop_all_lwps): Call wait_for_sigstop directly.
8242 * server.c (resume, handle_target_event): Handle
8243 TARGET_WAITKIND_NO_RESUMED.
8244
d763de10
JB
82452014-02-26 Joel Brobecker <brobecker@adacore.com>
8246
8247 * win32-low.c (psapi_get_dll_name,
8248 * win32_CreateToolhelp32Snapshot): Delete.
8249 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8250 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8251 Delete.
8252 (handle_load_dll): Add function description.
8253 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8254
850a0f76
JB
82552014-02-26 Joel Brobecker <brobecker@adacore.com>
8256
8257 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8258 Add comment.
8259 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8260 base address when calling win32_add_one_solib.
8261 (handle_load_dll): Delete local variable load_addr.
8262 Remove 0x1000 offset applied to DLL base address when calling
8263 win32_add_one_solib.
8264 (handle_unload_dll): Add comment.
8265
f25b3fc3
JB
82662014-02-26 Joel Brobecker <brobecker@adacore.com>
8267
8268 * win32-low.c (win32_add_all_dlls): Renames
8269 win32_ensure_ntdll_loaded. Rewrite function documentation.
8270 Adjust implementation to always load all DLLs.
8271 Add 0x1000 offset to DLL base address when calling
8272 win32_add_one_solib.
8273 (child_initialization_done): New static global.
8274 (do_initial_child_stuff): Set child_initialization_done to
8275 zero during child initialization, and 1 after. Replace call
8276 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8277 Add comment.
8278 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8279 (handle_unload_dll): Add function documentation.
8280 (get_child_debug_event): Ignore load and unload DLL events
8281 during child initialization.
8282
d86d4aaf
DE
82832014-02-20 Doug Evans <dje@google.com>
8284
3bc32da3 8285 Remove global all_lwps.
d86d4aaf
DE
8286 * inferiors.h (ptid_of): Move here from linux-low.h.
8287 (pid_of, lwpid_of): Ditto.
8288 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8289 parameter is a struct thread_info * now.
8290 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8291 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8292 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8293 directly.
8294 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8295 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8296 * linux-arm-low.c (update_registers_callback): Update, "entry"
8297 parameter is a struct thread_info * now.
8298 Fetch lwpid from current_inferior directly.
8299 (arm_insert_point): Pass &all_threads to find_inferior instead of
8300 &all_lwps.
8301 (arm_remove_point): Ditto.
8302 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8303 (arm_prepare_to_resume): Fetch pid from thread.
8304 (arm_read_description): Fetch lwpid from current_inferior directly.
8305 * linux-low.c (all_lwps): Delete.
8306 (delete_lwp): Delete call to remove_inferior.
8307 (handle_extended_wait): Fetch lwpid from thread.
8308 (add_lwp): Don't set lwp->entry.id. Remove call to
8309 add_inferior_to_list.
8310 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8311 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8312 (kill_one_lwp_callback): Ditto.
8313 (linux_kill): Don't dereference NULL pointer.
8314 Fetch ptid,lwpid from thread.
8315 (get_detach_signal): Fetch ptid from thread.
8316 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8317 Simplify call to regcache_invalidate_thread.
8318 (delete_lwp_callback): Update, "entry" parameter is a
8319 struct thread_info * now. Fetch pid from thread.
8320 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8321 (status_pending_p_callback): Update, "entry" parameter is a
8322 struct thread_info * now. Fetch ptid from thread.
8323 (find_lwp_pid): Update, "entry" parameter is a
8324 struct thread_info * now.
8325 (linux_wait_for_lwp): Fetch pid from thread.
8326 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8327 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8328 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8329 (dequeue_one_deferred_signal): Ditto.
8330 (cancel_breakpoint): Fetch ptid from current_inferior.
8331 (linux_wait_for_event): Pass &all_threads to find_inferior,
8332 not &all_lwps. Fetch ptid, lwpid from thread.
8333 (count_events_callback): Update, "entry" parameter is a
8334 struct thread_info * now.
8335 (select_singlestep_lwp_callback): Ditto.
8336 (select_event_lwp_callback): Ditto.
8337 (cancel_breakpoints_callback): Ditto.
8338 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8339 not &all_lwps.
8340 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8341 (unsuspend_one_lwp): Update, "entry" parameter is a
8342 struct thread_info * now.
8343 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8344 not &all_lwps.
8345 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8346 Fetch lwpid from thread, not lwp.
8347 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8348 Pass &all_threads to find_inferior, not &all_lwps.
8349 (send_sigstop): Fetch lwpid from thread, not lwp.
8350 (send_sigstop_callback): Update, "entry" parameter is a
8351 struct thread_info * now.
8352 (suspend_and_send_sigstop_callback): Ditto.
8353 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8354 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8355 struct thread_info * now.
8356 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8357 from thread, lwp.
8358 (lwp_running): Update, "entry" parameter is a
8359 struct thread_info * now.
8360 (stop_all_lwps): Fetch ptid from thread.
8361 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8362 (linux_resume_one_lwp): Fetch lwpid from thread.
8363 (linux_set_resume_request): Update, "entry" parameter is a
8364 struct thread_info * now. Fetch pid, lwpid from thread.
8365 (resume_status_pending_p): Update, "entry" parameter is a
8366 struct thread_info * now.
8367 (need_step_over_p): Ditto. Fetch lwpid from thread.
8368 (start_step_over): Fetch lwpid from thread.
8369 (linux_resume_one_thread): Update, "entry" parameter is a
8370 struct thread_info * now. Fetch lwpid from thread.
8371 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8372 (proceed_one_lwp): Update, "entry" parameter is a
8373 struct thread_info * now. Fetch lwpid from thread.
8374 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8375 struct thread_info * now.
8376 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8377 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8378 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8379 directly.
8380 (regsets_store_inferior_registers): Ditto.
8381 (fetch_register, store_register): Ditto.
8382 (linux_read_memory, linux_write_memory): Ditto.
8383 (linux_request_interrupt): Ditto.
8384 (linux_read_auxv): Ditto.
8385 (linux_xfer_siginfo): Ditto.
8386 (linux_qxfer_spu): Ditto.
8387 (linux_qxfer_libraries_svr4): Ditto.
8388 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8389 moved to inferiors.h.
8390 (get_lwp): Delete.
8391 (get_thread_lwp): Update.
8392 (struct lwp_info): Delete member "entry". Simplify comment for
8393 member "thread".
8394 (all_lwps): Delete.
8395 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8396 current_inferior directly.
8397 (update_watch_registers_callback): Update, "entry" parameter is a
8398 struct thread_info * now. Fetch pid from thread.
8399 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8400 (mips_insert_point): Fetch lwpid from current_inferior.
8401 Pass &all_threads to find_inferior, not &all_lwps.
8402 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8403 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8404 directly.
8405 (mips_stopped_data_address): Ditto.
8406 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8407 directly.
8408 * linux-tile-low.c (tile_arch_setup): Ditto.
8409 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8410 (update_debug_registers_callback): Update, "entry" parameter is a
8411 struct thread_info * now. Fetch pid from thread.
8412 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8413 Pass &all_threads to find_inferior, not &all_lwps.
8414 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8415 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8416 Pass &all_threads to find_inferior, not &all_lwps.
8417 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8418 (i386_dr_low_get_status): Ditto.
8419 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8420 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8421 (x86_linux_read_description): Ditto.
8422 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8423
3b8361aa
DE
84242014-02-20 Doug Evans <dje@google.com>
8425
8426 * inferiors.c (get_first_inferior): Fix buglet.
8427
f7667f0d
DE
84282014-02-19 Doug Evans <dje@google.com>
8429
8430 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8431 * inferiors.c (add_thread): Change result type to struct thread_info *.
8432 All callers updated.
8433 (add_lwp): Call add_thread here instead of in callers.
8434 All callers updated.
8435 * linux-low.h (get_lwp_thread): Rewrite.
8436 (struct lwp_info): New member "thread".
8437
b3312d80
DE
84382014-02-19 Doug Evans <dje@google.com>
8439
8440 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8441 All callers updated.
8442
ecc6f45c
DE
84432014-02-19 Doug Evans <dje@google.com>
8444
8445 * inferiors.c (add_thread): Fix whitespace.
8446
649ebbca
DE
84472014-02-19 Doug Evans <dje@google.com>
8448
8449 * dll.c (clear_dlls): Replace accessing list implemention details
8450 with API function.
8451 * gdbthread.h (get_first_thread): Declare.
8452 * inferiors.c (for_each_inferior_with_data): New function.
8453 (get_first_thread): New function.
8454 (find_thread_ptid): Simplify.
8455 (get_first_inferior): New function.
8456 (clear_list): Delete.
8457 (one_inferior_p): New function.
8458 (clear_inferior_list): New function.
8459 (clear_inferiors): Update.
8460 * inferiors.h (for_each_inferior_with_data): Declare.
8461 (clear_inferior_list): Declare.
8462 (one_inferior_p): Declare.
8463 (get_first_inferior): Declare.
8464 * linux-low.c (linux_wait_for_event): Replace accessing list
8465 implemention details with API function.
8466 * server.c (target_running): Ditto.
8467 (accumulate_file_name_length): New function.
8468 (emit_dll_description): New function.
8469 (handle_qxfer_libraries): Replace accessing list implemention
8470 details with API function.
8471 (handle_qxfer_threads_worker): New function.
8472 (handle_qxfer_threads_proper): Replace accessing list implemention
8473 details with API function.
8474 (handle_query): Ditto.
8475 (visit_actioned_threads_callback_ftype): New typedef.
8476 (visit_actioned_threads_data): New struct.
8477 (visit_actioned_threads): Rewrite to be find_inferior callback.
8478 (resume): Call find_inferior.
8479 (handle_status): Replace accessing list implemention
8480 details with API function.
8481 (process_serial_event): Replace accessing list implemention details
8482 with API function.
8483 * target.c (set_desired_inferior): Replace accessing list implemention
8484 details with API function.
8485 * tracepoint.c (same_process_p): New function.
8486 (gdb_agent_about_to_close): Replace accessing list implemention
8487 details with API function.
8488 * win32-low.c (child_delete_thread): Replace accessing list
8489 implemention details with API function.
8490 (match_dll_by_basename): New function.
8491 (dll_is_loaded_by_basename): New function.
8492 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8493 details call to dll_is_loaded_by_basename.
8494
80894984
DE
84952014-02-19 Doug Evans <dje@google.com>
8496
8497 * dll.h (struct dll_info): Add comment.
8498 * gdbthread.h (struct thread_info): Add comment.
8499 (current_ptid): Simplify.
8500 * inferiors.c (add_process): Update.
8501 (remove_process): Update.
8502 * inferiors.h (struct process_info): Rename member "head" to "entry".
8503 * linux-low.c (delete_lwp): Update.
8504 (add_lwp): Update.
8505 (last_thread_of_process_p): Update.
8506 (kill_one_lwp_callback, linux_kill): Update.
8507 (status_pending_p_callback): Update.
8508 (wait_for_sigstop): Update. Simplify read of ptid.
8509 (start_step_over): Update.
8510 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8511 (get_lwp_thread): Update.
8512 (struct lwp_info): Rename member "head" to "entry".
8513 * regcache.h (inferior_list_entry): Delete.
8514 * server.c (kill_inferior_callback): Update.
8515 (detach_or_kill_inferior_callback): Update.
8516 (print_started_pid): Update.
8517 (print_attached_pid): Update.
8518 (process_serial_event): Simplify read of ptid.
8519 * thread-db.c (thread_db_create_event): Update.
8520 (thread_db_get_tls_address): Update.
8521 * win32-low.c (current_inferior_ptid): Simplify.
8522
46917d26
TT
85232014-02-19 Tom Tromey <tromey@redhat.com>
8524
8525 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8526 argument.
8527 (target_supports_btrace): Update.
8528
0759a81e
YQ
85292014-02-14 Yao Qi <yao@codesourcery.com>
8530
8531 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8532 (rsp-low-ipa.o): New target.
8533
a7191e8b
TT
85342014-02-12 Tom Tromey <tromey@redhat.com>
8535
8536 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8537 convert_ascii_to_int.
8538 * regcache.c (registers_to_string): Likewise.
8539 * remote-utils.c (decode_M_packet): Likewise.
8540 * server.c (process_serial_event): Likewise.
8541
ff0e980e
TT
85422014-02-12 Tom Tromey <tromey@redhat.com>
8543
8544 * server.c (handle_query, handle_v_run): Use hex2bin, not
8545 unhexify.
8546 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8547
e9371aff
TT
85482014-02-12 Tom Tromey <tromey@redhat.com>
8549
8550 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8551 convert_int_to_ascii.
8552 * regcache.c (registers_to_string, collect_register_as_string):
8553 Likewise.
8554 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8555 Likewise.
8556 * server.c (process_serial_event): Likewise.
8557 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8558 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8559
971dc0b8
TT
85602014-02-12 Tom Tromey <tromey@redhat.com>
8561
8562 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8563 bin2hex, not hexify.
8564 * tracepoint.c (cmd_qtstatus): Likewise.
8565
0a822afb
TT
85662014-02-12 Tom Tromey <tromey@redhat.com>
8567
8568 * remote-utils.c (monitor_output): Pass explicit length to
8569 hexify.
8570
9c3d6531
TT
85712014-02-12 Tom Tromey <tromey@redhat.com>
8572
8573 * tracepoint.c: Include rsp-low.h.
8574 * server.c: Include rsp-low.h.
8575 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8576 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8577 declare.
8578 * remote-utils.c: Include rsp-low.h.
8579 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8580 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8581 (convert_int_to_ascii, convert_ascii_to_int): Move to
8582 common/rsp-low.c.
8583 * regcache.c: Include rsp-low.h.
8584 * ax.c: Include rsp-low.h.
8585 * Makefile.in (SFILES): Add common/rsp-low.c.
8586 (OBS): Add rsp-low.o.
8587 (rsp-low.o): New target.
8588
01fd3ea5
TT
85892014-02-12 Tom Tromey <tromey@redhat.com>
8590
8591 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8592 Include print-utils.h.
8593 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8594 (plongest, thirty_two, phex_nz): Remove.
8595 * Makefile.in (SFILES): Add common/print-utils.c.
8596 (OBS): Add print-utils.o.
8597 (print-utils-ipa.o): New target.
8598 (print-utils.o): New target.
8599 (IPA_OBJS): Add print-utils-ipa.o.
8600
e99dc820
TT
86012014-02-06 Tom Tromey <tromey@redhat.com>
8602
8603 * Makefile.in (SFILES): Fix indentation.
8604
ee1e2d4f
DE
86052014-02-05 Doug Evans <dje@google.com>
8606
8607 * linux-low.c (linux_wait_for_event): Improve comment.
8608 (linux_wait_1): Keep current_inferior in sync with event_child.
8609
f5a02773
DE
86102014-01-22 Doug Evans <dje@google.com>
8611
8612 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8613
87ce2a04
DE
86142014-01-22 Doug Evans <dje@google.com>
8615
8616 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8617 * configure: Regenerate.
8618 * config.in: Regenerate.
8619 * Makefile.in (SFILES): Add debug.c.
8620 (OBS): Add debug.o.
8621 * debug.c: New file.
8622 * debug.h: New file.
8623 * linux-aarch64-low.c (*): Update all debugging printfs to use
8624 debug_printf instead of fprintf.
8625 * linux-arm-low.c (*): Ditto.
8626 * linux-cris-low.c (*): Ditto.
8627 * linux-crisv32-low.c (*): Ditto.
8628 * linux-m32r-low.c (*): Ditto.
8629 * linux-sparc-low.c (*): Ditto.
8630 * linux-x86.c (*): Ditto.
8631 * linux-low.c (*): Ditto.
8632 (linux_wait_1): Add calls to debug_enter, debug_exit.
8633 (linux_wait): Remove redundant debugging printf.
8634 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8635 (linux_resume, unstop_all_lwps): Ditto.
8636 * mem-break.c (*): Update all debugging printfs to use
8637 debug_printf instead of fprintf.
8638 * remote-utils.c (*): Ditto.
8639 * thread-db.c (*): Ditto.
8640 * server.c #include <ctype.h>, "gdb_vecs.h".
8641 (debug_threads): Moved to debug.c.
8642 (*): Update all debugging printfs to use debug_printf instead of
8643 fprintf.
8644 (start_inferior): Replace call to fflush with call to debug_flush.
8645 (monitor_show_help): Mention set debug-format.
8646 (parse_debug_format_options): New function.
8647 (handle_monitor_command): Handle "monitor set debug-format".
8648 (gdbserver_usage): Mention --debug-format.
8649 (main): Parse --debug-format.
8650 * server.h (debug_threads): Declaration moved to debug.h.
8651 #include "debug.h".
8652 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8653 trace_debug_1 that uses debug_printf.
8654 (tracepoint_look_up_symbols): Update all debugging printfs to use
8655 debug_printf instead of fprintf.
8656
e671835b
BS
86572014-01-20 Baruch Siach <baruch@tkos.co.il>
8658
8659 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8660 sys/ptrace.h.
8661
b5737fa9
PA
86622014-01-17 Pedro Alves <palves@redhat.com>
8663
ea38d2a9 8664 PR build/16445
c7faa97a
PA
8665 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8666 defined after including gdb_proc_service.h.
b5737fa9 8667
40ed484e
DE
86682014-01-16 Doug Evans <dje@google.com>
8669
8670 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8671 (match_dll): Use it.
8672
969c39fb
MM
86732014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8674
8675 * target.h (target_ops) <read_btrace>: Change parameters and
8676 return type to allow error reporting.
8677 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8678 trace reading errors on.
8679 * linux-low.c (linux_low_read_btrace): Pass trace reading
8680 errors on.
8681 (linux_low_disable_btrace): New.
8682
ab7f45ba
DE
86832014-01-15 Doug Evans <dje@google.com>
8684
8685 * inferiors.c (thread_id_to_gdb_id): Delete.
8686 * inferiors.h (thread_id_to_gdb_id): Delete.
8687
66af0f44
EZ
86882014-01-13 Eli Zaretskii <eliz@gnu.org>
8689
8690 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8691 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8692 versions.
8693
9939e131
PA
86942014-01-08 Pedro Alves <palves@redhat.com>
8695
8696 * server.c (handle_status): Don't discard previous queued stop
8697 replies or thread's pending status here.
8698 (main) <disconnection>: Do it here instead.
8699
b7ea362b
PA
87002014-01-08 Pedro Alves <palves@redhat.com>
8701
8702 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8703 * server.c (visit_actioned_threads, handle_pending_status): New
8704 function.
8705 (handle_v_cont): Factor out parts to ...
8706 (resume): ... this new function. If in all-stop, and a thread
8707 being resumed has a pending status, report it without actually
8708 resuming.
8709 (myresume): Adjust to use the new 'resume' function.
8710 (clear_pending_status_callback, set_pending_status_callback)
8711 (find_status_pending_thread_callback): New functions.
8712 (handle_status): Handle the case of multiple threads having
8713 interesting statuses to report. Report threads' real last signal
8714 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8715 with an interesting thread to report the status for, instead of
8716 always reporting the status of the first thread.
8717
28498c42
JB
87182014-01-01 Joel Brobecker <brobecker@adacore.com>
8719
8720 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8721 * gdbreplay.c (gdbreplay_version): Likewise.
8722
f45c82da
YZ
87232013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8724
8725 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8726 iov.iov_len with the real length in use.
8727
379a5e2d
JB
87282013-12-13 Joel Brobecker <brobecker@adacore.com>
8729
8730 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8731 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8732 for all targets that use win32-low.c.
8733 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8734 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8735
4210d83e
PA
87362013-12-13 Pedro Alves <palves@redhat.com>
8737
8738 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8739 if equal to TARGET_WAITKIND_LOADED.
8740 * win32-low.c (cached_status): New static global.
8741 (win32_wait): Add declaration.
8742 (do_initial_child_stuff): Flush all initial pending debug events
8743 up to the initial breakpoint.
8744 (win32_wait): If CACHED_STATUS was set, return that instead
8745 of doing a real wait. Remove the code resuming the execution
8746 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8747 during the initial phase. Also remove the code changing
8748 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8749 TARGET_WAITKIND_STOPPED.
8750
e7f0d979
YQ
87512013-12-11 Yao Qi <yao@codesourcery.com>
8752
8753 * notif.c (handle_notif_ack): Return 0 if no notification
8754 matches.
8755
ebcf782c
DE
87562013-11-20 Doug Evans <dje@google.com>
8757
8758 * linux-low.c (linux_set_resume_request): Fix comment.
8759
20ad9378
DE
87602013-11-20 Doug Evans <dje@google.com>
8761
8762 * linux-low.c (resume_status_pending_p): Tweak comment.
8763
a196ebeb
WT
87642013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8765
8766 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8767 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8768 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8769 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8770 (srv_amd64_regobj): Add amd64-mpx.o.
8771 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8772 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8773 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8774 * i387-fp.c (num_pl_bnd_register) Added constant.
8775 (num_pl_bnd_cfg_registers) Added constant.
8776 (struct i387_xsave) Added reserved area and MPX fields.
8777 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8778 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8779 function.
8780 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8781 (init_registers_amd64_mpx_linux): Declare new function.
8782 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8783 (x86_64_regmap): Add MPX registers.
8784 (x86_linux_read_description): Add MPX case.
8785 (initialize_low_arch): Initialize MPX targets.
8786
0080a2f6
TT
87872013-11-18 Tom Tromey <tromey@redhat.com>
8788
8789 * configure: Rebuild.
8790 * configure.ac: Don't check for stdlib.h.
8791 * gdbreplay.c: Unconditionally include stdlib.h.
8792
2978b111
TT
87932013-11-18 Tom Tromey <tromey@redhat.com>
8794
8795 * config.in: Rebuild.
8796 * configure: Rebuild.
8797 * configure.ac: Don't use AC_HEADER_DIRENT.
8798
a3d08894
TT
87992013-11-18 Tom Tromey <tromey@redhat.com>
8800
8801 * server.h: Don't check HAVE_STRING_H.
8802 * gdbreplay.c: Don't check HAVE_STRING_H.
8803 * configure: Rebuild.
8804
0a5dd17d
TT
88052013-11-18 Tom Tromey <tromey@redhat.com>
8806
8807 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8808 LIBGNU.
8809
1bd2f0ba
TT
88102013-11-08 Tom Tromey <tromey@redhat.com>
8811
8812 * configure, config.in: Rebuild.
8813 * configure.ac: Remove unused configury.
8814
3266f10b
TT
88152013-11-08 Tom Tromey <tromey@redhat.com>
8816
8817 * acinclude.m4: Include common.m4, codeset.m4.
8818 * configure, config.in: Rebuild.
8819 * configure.ac: Use GDB_AC_COMMON.
8820
6682d959
AA
88212013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8822
8823 * linux-s390-low.c (HWCAP_S390_TE): New define.
8824 (s390_arch_setup): Consider the TE field in the HWCAP for
8825 determining 'have_regset_tdb'.
8826
fd0a4d76
SDJ
88272013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8828
8829 PR gdb/16014
8830 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8831 call to sizeof.
8832
1a3d890b
PA
88332013-10-02 Pedro Alves <palves@redhat.com>
8834
8835 * server.c (process_serial_event): Don't output "GDBserver
8836 exiting" if GDB is connected through stdio.
8837 * target.c (mywait): Likewise, be silent if GDB is connected
8838 through stdio.
8839
97ad4581
JB
88402013-10-01 Joel Brobecker <brobecker@adacore.com>
8841
8842 * lynx-low.c (lynx_add_threads_after_attach): New function.
8843 (lynx_attach): Remove call to add_thread. Add call to
8844 lynx_add_threads_after_attach instead.
8845
5b4e221c
MF
88462013-09-28 Mike Frysinger <vapier@gentoo.org>
8847
8848 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8849 * config.in, configure: Regenerated.
8850
ee47b2f8
YQ
88512013-09-18 Yao Qi <yao@codesourcery.com>
8852
8853 PR server/15959
8854 * server.c (start_inferior): Clear 'resume_info'.
8855
d6707650 88562013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8857
d6707650
JW
8858 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8859 for each register.
8860
9243dd0e 88612013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8862
9243dd0e
JW
8863 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8864 linux-tile-low.o to srv_tgtobj.
8865
c623a6ef
WN
88662013-09-16 Will Newton <will.newton@linaro.org>
8867
8868 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8869 out regs.
8870
fb71d39e
PA
88712013-09-06 Pedro Alves <palves@redhat.com>
8872
8873 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8874 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8875 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8876 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8877 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8878 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8879
8e7e9910
PA
88802013-09-06 Pedro Alves <palves@redhat.com>
8881
8882 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8883 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8884
7c3a12ca
PA
88852013-09-06 Pedro Alves <palves@redhat.com>
8886
8887 * linux-amd64-ipa.c: Include tracepoint.h.
8888 * linux-i386-ipa.c: Include tracepoint.h.
8889
8eb3d7b6
RW
88902013-09-06 Ricard Wanderlof <ricardw@axis.com>
8891
8892 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8893 (ps_get_thread_area): New function.
8894
eddddb9d
RW
88952013-09-06 Ricard Wanderlof <ricardw@axis.com>
8896
8897 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8898 (initialize_low_arch): Call init_registers_crisv32 rather than
8899 init_register_crisv32.
8900
533b0600
PA
89012013-09-05 Pedro Alves <palves@redhat.com>
8902
8903 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8904 to ...
8905 * hostio.h: ... this new file.
8906 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8907 win32-low.c: Include hostio.h.
8908
0ce3d3b5
PA
89092013-09-05 Pedro Alves <palves@redhat.com>
8910
8911 * server.h (gdb_client_data, handler_func, callback_handler_func)
8912 (delete_file_handler, add_file_handler, append_callback_event)
8913 (delete_callback_event, start_event_loop, initialize_event_loop):
8914 Move to event-loop.h and include it.
8915 * event-loop.h: New file.
8916
799cdc37
PA
89172013-09-05 Pedro Alves <palves@redhat.com>
8918
8919 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8920 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8921 (loaded_dll, unloaded_dll): Move to ...
8922 * dll.h: ... this new file.
8923 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8924
6a6bbd9d
PA
89252013-09-05 Pedro Alves <palves@redhat.com>
8926
8927 * server.h (current_process, get_thread_process, all_processes)
8928 (add_inferior_to_list, for_each_inferior, current_inferior)
8929 (remove_inferior, add_process, remove_process, find_process_pid)
8930 (have_started_inferiors_p, have_attached_inferiors_p)
8931 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8932 (clear_inferiors, find_inferior, find_inferior_id)
8933 (inferior_target_data, set_inferior_target_data)
8934 (inferior_regcache_data, set_inferior_regcache_data): Move to
8935 inferiors.h, and include it.
8936 * inferiors.h: New file.
8937
f699aaba
PA
89382013-09-05 Pedro Alves <palves@redhat.com>
8939
8940 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8941 Move ...
72f4393d 8942 * ax.h: ... here.
f699aaba 8943
c144c7a0
PA
89442013-09-05 Pedro Alves <palves@redhat.com>
8945
8946 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8947 tracepoint.h.
8948 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8949 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8950 (handle_tracepoint_general_set, handle_tracepoint_query)
8951 (tracepoint_finished_step, tracepoint_was_hit)
8952 (release_while_stepping_state_list, current_traceframe)
8953 (in_readonly_region, traceframe_read_mem)
8954 (fetch_traceframe_registers, traceframe_read_sdata)
8955 (traceframe_read_info, struct fast_tpoint_collect_status)
8956 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8957 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8958 (supply_fast_tracepoint_registers)
8959 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8960 (ipa_tdesc, claim_trampoline_space)
8961 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8962 (agent_mem_read, agent_get_trace_state_variable_value)
8963 (agent_set_trace_state_variable_value, agent_tsv_read)
8964 (agent_mem_read_string, get_raw_reg_func_addr)
8965 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8966 * tracepoint.h: ... this new file.
8967
ff42e6ab
PA
89682013-09-05 Pedro Alves <palves@redhat.com>
8969
8970 * server.h (perror_with_name, error, fatal, warning, paddress)
8971 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8972 include it.
8973 * utils.h: New file.
8974
541af0f4
PA
89752013-09-05 Pedro Alves <palves@redhat.com>
8976
8977 * server.h (remote_debug, noack_mode, transport_is_reliable)
8978 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8979 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8980 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8981 (write_enn, initialize_async_io, enable_async_io)
8982 (disable_async_io, check_remote_input_interrupt_request)
8983 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8984 (dead_thread_notify, prepare_resume_reply)
8985 (decode_address_to_semicolon, decode_address, decode_m_packet)
8986 (decode_M_packet, decode_X_packet, decode_xfer_write)
8987 (decode_search_memory_packet, unhexify, hexify)
8988 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8989 (look_up_one_symbol, relocate_instruction)
8990 (monitor_output): Move to remote-utils.h, and include it.
8991 * remote-utils.h: New file.
8992
eebdf26b
PA
89932013-09-05 Pedro Alves <palves@redhat.com>
8994
8995 * server.h (_): Delete.
8996
3aafd2ff
PA
89972013-09-02 Pedro Alves <palves@redhat.com>
8998
8999 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9000 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9001 allocated.
9002 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9003
cee83bcb
PM
90042013-09-02 Pierre Muller <muller@sourceware.org>
9005
9006 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9007 or WriteProcessMemory complete successfully and handle
9008 ERROR_PARTIAL_COPY error.
9009
9a13b2fa
PA
90102013-09-02 Pedro Alves <palves@redhat.com>
9011
9012 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9013 error instead of EIO.
9014
602e3198
JK
90152013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9016
9017 PR server/15604
9018 * linux-low.c: Include filestuff.h.
9019 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9020 * lynx-low.c: Include filestuff.h.
9021 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9022 * server.c: Include filestuff.h.
9023 (main): Call notice_open_fds.
9024 * spu-low.c: Include filestuff.h.
9025 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9026
96d7229d
LM
90272013-08-22 Luis Machado <lgustavo@codesourcery.com>
9028
9029 * Makefile.in: Explain why ../target and ../nat are not
9030 listed as include file search paths.
9031 (linux-waitpid.o): New object file rule.
9032 * configure.srv (srv_native_linux_obj): New variable.
9033 Replace all occurrences of linux native object files with
9034 $srv_native_linux_obj.
9035 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9036 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9037 (linux_enable_event_reporting): Remove declaration.
9038 (my_waitpid): Moved to common/linux-waitpid.c.
9039 (linux_wait_for_event): Pass ptid when calling
9040 linux_enable_event_reporting.
9041 (linux_supports_tracefork_flag): Remove.
9042 (linux_enable_event_reporting): Likewise.
9043 (linux_tracefork_grandchild): Remove.
9044 (STACK_SIZE): Moved to common/linux-ptrace.c.
9045 (linux_tracefork_child): Remove.
9046 (linux_test_for_tracefork): Remove.
9047 (linux_look_up_symbols): Call linux_supports_traceclone.
9048 (initialize_low): Remove call to linux_test_for_tracefork.
9049 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9050 common/linux-ptrace.h.
9051 (PTRACE_TYPE_ARG4): Likewise.
9052 Include linux-ptrace.h.
9053
32940073
PA
90542013-08-21 Pedro Alves <palves@redhat.com>
9055
9056 * config.in: Renegerate.
9057
33b60d58 90582013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9059
33b60d58
LM
9060 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9061 (SFILES): Remove $(srcdir)/common/target-common.c and
9062 add $(srcdir)/target/waitstatus.c.
9063 (OBS): Remove target-common.o and add waitstatus.o.
9064 (server_h): Remove $(srcdir)/../common/target-common.h and
9065 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9066 and $(srcdir)/../target/waitstatus.h.
9067 (target-common.o): Remove.
9068 (waitstatus.o): New target object file.
9069 * target.h: Do not include target-common.h and
9070 include target/resume.h, target/wait.h and
9071 target/waitstatus.h.
9072
b8e1b30e
LM
90732013-08-13 Luis Machado <lgustavo@codesourcery.com>
9074
9075 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9076 to PTRACE_TYPE_ARG3.
9077 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9078 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9079 PTRACE_TYPE_ARG4.
9080 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9081 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9082
7a60ad40
YQ
90832013-07-27 Jie Zhang <jie@codesourcery.com>
9084 Daniel Jacobowitz <dan@codesourcery.com>
9085 Yao Qi <yao@codesourcery.com>
9086
9087 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9088 (mips-linux-watch.o): New rule.
9089 (mips_linux_watch_h): New variable.
9090 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9091 srv_tgtobj.
9092 * linux-mips-low.c: Include mips-linux-watch.h.
9093 (struct arch_process_info, struct arch_lwp_info): New.
9094 (update_watch_registers_callback): New function.
9095 (mips_linux_new_process, mips_linux_new_thread) New functions.
9096 (mips_linux_prepare_to_resume, mips_insert_point): New
9097 functions.
9098 (mips_remove_point, mips_stopped_by_watchpoint): New
9099 functions.
9100 (rsp_bp_type_to_target_hw_bp_type): New function.
9101 (mips_stopped_data_address): New function.
9102 (the_low_target): Add watchpoint support functions.
9103
de6f69ad
YQ
91042013-07-27 Yao Qi <yao@codesourcery.com>
9105
9106 * i386-low.c: Include break-common.h.
9107 (enum target_hw_bp_type): Remove.
9108
3360c0bf
LM
91092013-07-24 Luis Machado <lgustavo@codesourcery.com>
9110
9111 * Makefile.in (SFILES): /common/target-common.c.
9112 (OBS): Add target-common.o.
9113 (server_h): Add $(srcdir)/../common/target-common.h.
9114 (target-common.o): New target.
9115 * server.c (queue_stop_reply_callback): Free
9116 status string after use.
9117 * target.c (target_waitstatus_to_string): Remove.
9118 * target.h: Include target-common.h.
9119 (resume_kind): Likewise.
9120 (target_waitkind): Likewise.
9121 (target_waitstatus): Likewise.
9122 (TARGET_WNOHANG): Likewise.
9123
bd885420
YQ
91242013-07-04 Yao Qi <yao@codesourcery.com>
9125
9126 * Makefile.in (host_alias): Use @host_noncanonical@.
9127 (target_alias): Use @target_noncanonical@.
9128 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9129 ACX_NONCANONICAL_HOST.
9130 * configure: Regenerated.
9131
9132 Revert:
9133 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9134
9135 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9136 * configure: Rebuild.
9137 * Makefile.in (version_host, version_target): Get from configure.
9138 (version.c): Use $(version_host) and $(version_target).
9139
17ef446e
PA
91402013-07-03 Pedro Alves <palves@redhat.com>
9141
9142 * Makefile.in (config.status): Depend on development.sh.
9143 * acinclude.m4: Include libmcheck.m4.
9144 * configure: Regenerate.
9145
7a9a7487
MG
91462013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9147
9148 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9149 attribute inside the parentheses.
9150 (winapi_DebugSetProcessKillOnExit): Ditto.
9151 (winapi_DebugBreakProcess): Ditto.
9152 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9153
49b64de6
MG
91542013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9155
9156 * notif.h (notif_event): Add a dummy member to avoid compiler
9157 errors.
9158
d5749ee7
PA
91592013-07-01 Pedro Alves <palves@redhat.com>
9160
9161 * hostio.c (HOSTIO_PATH_MAX): Define.
9162 (require_filename, handle_open, handle_unlink, handle_readlink):
9163 Use it.
9164
d8d2a3ee
PA
91652013-07-01 Pedro Alves <palves@redhat.com>
9166
9167 * server.h: Include "pathmax.h".
9168 * linux-low.c: Don't include sys/param.h.
9169 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9170 MAXPATHLEN.
9171 * win32-low.c: Don't include sys/param.h.
9172 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9173
bc7dea8d
PA
91742013-07-01 Pedro Alves <palves@redhat.com>
9175
9176 * event-loop.c: Don't check HAVE_UNISTD_H before including
9177 <unistd.h>.
9178 * gdbreplay.c: Likewise.
9179 * remote-utils.c: Likewise.
9180 * server.c: Likewise.
9181 * configure.ac: Don't check for unistd.h.
9182 * configure: Regenerate.
9183
d6c2da54
TT
91842013-06-28 Tom Tromey <tromey@redhat.com>
9185
9186 * Makefile.in (version.c): Use version.in, not
9187 common/version.in.
9188
257b6bec
MG
91892013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9190
9191 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9192 * configure: Rebuild.
9193 * Makefile.in (version_host, version_target): Get from configure.
9194 (version.c): Use $(version_host) and $(version_target).
9195
86ebe149
DK
91962013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9197
9198 Fix trace-status to output user name without trailing colon.
9199 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9200
f30aa5af
DK
92012013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9202
9203 Fix trace-status to output proper start-time and stop-time.
9204 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9205 output start time and stop time in hex as gdb expects.
9206
28a93511
YQ
92072013-06-26 Pedro Alves <pedro@codesourcery.com>
9208
9209 * tracepoint.c (build_traceframe_info_xml): Output trace state
9210 variables present in the trace buffer.
9211
01208463
TT
92122013-06-24 Tom Tromey <tromey@redhat.com>
9213
9214 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9215 create-version.sh.
9216 (version.o): Remove.
9217 * gdbreplay.c: Include version.h.
9218 (version, host_name): Don't declare.
9219 * server.h: Include version.h.
9220 (version, host_name): Don't declare.
9221
760256f9
PA
92222013-06-12 Pedro Alves <palves@redhat.com>
9223
9224 * linux-x86-low.c (linux_is_elf64): Delete global.
9225 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9226 with local linux_pid_exe_is_elf_64_file use.
9227
030031ee
PA
92282013-06-11 Pedro Alves <palves@redhat.com>
9229
9230 * linux-low.c (regset_disabled, disable_regset): New functions.
9231 (regsets_fetch_inferior_registers)
9232 (regsets_store_inferior_registers): Use them.
9233 (initialize_regsets_info); Don't allocate the disabled_regsets
9234 array here.
9235 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9236 comment.
9237
5da6eb0a
PA
92382013-06-11 Pedro Alves <palves@redhat.com>
9239
9240 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9241 xmalloc.
9242
7e5aaa09
PA
92432013-06-11 Pedro Alves <palves@redhat.com>
9244
9245 * linux-x86-low.c (initialize_low_arch): Call
9246 init_registers_x32_avx_linux.
9247
d878444c
JK
92482013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9249
9250 Fix compatibility with Android Bionic.
9251 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9252 it is not empty.
9253
3aee8918
PA
92542013-06-07 Pedro Alves <palves@redhat.com>
9255
5f2b57b5 9256 PR server/14823
3aee8918
PA
9257 * Makefile.in (OBS): Add tdesc.o.
9258 (IPA_OBJS): Add tdesc-ipa.o.
9259 (tdesc-ipa.o): New rule.
9260 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9261 interface.
9262 * linux-low.c (new_inferior): Delete.
9263 (disabled_regsets, num_regsets): Delete.
9264 (linux_add_process): Adjust to set the new per-process
9265 new_inferior flag.
9266 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9267 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9268 was a stop. When calling arch_setup, switch the current inferior
9269 to the thread that got an event.
9270 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9271 (regsets_fetch_inferior_registers)
9272 (regsets_store_inferior_registers): New regsets_info parameter.
9273 Adjust to use it.
9274 (linux_register_in_regsets): New regs_info parameter. Adjust to
9275 use it.
9276 (register_addr, fetch_register, store_register): New usrregs_info
9277 parameter. Adjust to use it.
9278 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9279 parameter regs_info. Adjust to use it.
9280 (linux_fetch_registers): Get the current inferior's regs_info, and
9281 adjust to use it.
9282 (linux_store_registers): Ditto.
9283 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9284 (initialize_low): Don't initialize the target_regsets here. Call
9285 initialize_low_arch.
9286 * linux-low.h (target_regsets): Delete declaration.
9287 (struct regsets_info): New.
9288 (struct usrregs_info): New.
9289 (struct regs_info): New.
9290 (struct process_info_private) <new_inferior>: New field.
9291 (struct linux_target_ops): Delete the num_regs, regmap, and
9292 regset_bitmap fields. New field regs_info.
9293 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9294 * i387-fp.c (num_xmm_registers): Delete.
9295 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9296 calls to new interface.
9297 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9298 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9299 Infer the number of xmm registers from the regcache's target
9300 description.
9301 * i387-fp.h (num_xmm_registers): Delete.
9302 * inferiors.c (add_thread): Don't install the thread's regcache
9303 here.
9304 * proc-service.c (gregset_info): Fetch the current inferior's
9305 regs_info. Adjust to use it.
9306 * regcache.c: Include tdesc.h.
9307 (register_bytes, reg_defs, num_registers)
9308 (gdbserver_expedite_regs): Delete.
9309 (get_thread_regcache): If the thread doesn't have a regcache yet,
9310 create one, instead of aborting gdbserver.
9311 (regcache_invalidate_one): Rename to ...
9312 (regcache_invalidate_thread): ... this.
9313 (regcache_invalidate_one): New.
9314 (regcache_invalidate): Only invalidate registers of the current
9315 process.
9316 (init_register_cache): Add target_desc parameter, and use it.
9317 (new_register_cache): Ditto. Assert the target description has a
9318 non zero registers_size.
9319 (regcache_cpy): Add assertions. Adjust.
9320 (realloc_register_cache, set_register_cache): Delete.
9321 (registers_to_string, registers_from_string): Adjust.
9322 (find_register_by_name, find_regno, find_register_by_number)
9323 (register_cache_size): Add target_desc parameter, and use it.
9324 (free_register_cache_thread, free_register_cache_thread_one)
9325 (regcache_release, register_cache_size): New.
9326 (register_size): Add target_desc parameter, and use it.
9327 (register_data, supply_register, supply_register_zeroed)
9328 (supply_regblock, supply_register_by_name, collect_register)
9329 (collect_register_as_string, collect_register_by_name): Adjust.
9330 * regcache.h (struct target_desc): Forward declare.
9331 (struct regcache) <tdesc>: New field.
9332 (init_register_cache, new_register_cache): Add target_desc
9333 parameter.
9334 (regcache_invalidate_thread): Declare.
9335 (regcache_invalidate_one): Delete declaration.
9336 (regcache_release): Declare.
9337 (find_register_by_number, register_cache_size, register_size)
9338 (find_regno): Add target_desc parameter.
9339 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9340 declarations.
9341 * remote-utils.c: Include tdesc.h.
9342 (outreg, prepare_resume_reply): Adjust.
9343 * server.c: Include tdesc.h.
9344 (gdbserver_xmltarget): Delete declaration.
9345 (get_features_xml, process_serial_event): Adjust.
9346 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9347 declare.
9348 (struct process_info) <tdesc>: New field.
9349 (ipa_tdesc): Declare.
9350 * tdesc.c: New file.
9351 * tdesc.h: New file.
9352 * tracepoint.c: Include tdesc.h.
9353 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9354 (get_context_regcache): Adjust to pass ipa_tdesc down.
9355 (do_action_at_tracepoint): Adjust to get the register cache size
9356 from the context regcache's description.
9357 (traceframe_walk_blocks): Adjust to get the register cache size
9358 from the current trace frame's description.
9359 (traceframe_get_pc): Adjust to get current trace frame's
9360 description and pass it down.
9361 (gdb_collect): Adjust to get the register cache size from the
9362 IPA's description.
9363 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9364 (gdbserver_xmltarget): Delete.
9365 (initialize_low_tracepoint): Set the ipa's target description.
9366 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9367 (initialize_low_tracepoint): Set the ipa's target description.
9368 * linux-x86-low.c: Include tdesc.h.
9369 [__x86_64__] (is_64bit_tdesc): New.
9370 (ps_get_thread_area, x86_get_thread_area): Use it.
9371 (i386_cannot_store_register): Rename to ...
9372 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9373 (i386_cannot_fetch_register): Rename to ...
9374 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9375 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9376 to new interface.
9377 (target_regsets): Rename to ...
9378 (x86_regsets): ... this.
9379 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9380 interface.
9381 (x86_siginfo_fixup): Use is_64bit_tdesc.
9382 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9383 (tdesc_x32_avx_linux, tdesc_x32_linux)
9384 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9385 Declare.
9386 (x86_linux_update_xmltarget): Delete.
9387 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9388 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9389 (AMD64_LINUX_USER64_CS): New.
9390 (x86_linux_read_description): New, based on
9391 x86_linux_update_xmltarget.
9392 (same_process_callback): New.
9393 (x86_arch_setup_process_callback): New.
9394 (x86_linux_update_xmltarget): New.
9395 (x86_regsets_info): New.
9396 (amd64_linux_regs_info): New.
9397 (i386_linux_usrregs_info): New.
9398 (i386_linux_regs_info): New.
9399 (x86_linux_regs_info): New.
9400 (x86_arch_setup): Reimplement.
9401 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9402 (x86_emit_ops): Ditto.
9403 (the_low_target): Adjust. Install x86_linux_regs_info,
9404 x86_cannot_fetch_register, and x86_cannot_store_register.
9405 (initialize_low_arch): New.
9406 * linux-ia64-low.c (tdesc_ia64): Declare.
9407 (ia64_fetch_register): Adjust.
9408 (ia64_usrregs_info, regs_info): New globals.
9409 (ia64_regs_info): New function.
9410 (the_low_target): Adjust.
9411 (initialize_low_arch): New function.
9412 * linux-sparc-low.c (tdesc_sparc64): Declare.
9413 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9414 Adjust.
9415 (sparc_arch_setup): New function.
9416 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9417 (the_low_target): Adjust.
9418 (initialize_low_arch): New function.
9419 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9420 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9421 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9422 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9423 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9424 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9425 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9426 (tdesc_powerpc_isa205_vsx64l): Declare.
9427 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9428 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9429 (ppc_set_pc, ppc_get_hwcap): Adjust.
9430 (ppc_usrregs_info): Forward declare.
9431 (!__powerpc64__) ppc_regmap_adjusted: New global.
9432 (ppc_arch_setup): Adjust to the current process'es target
9433 description.
9434 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9435 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9436 (ppc_store_evrregset): Adjust.
9437 (target_regsets): Rename to ...
9438 (ppc_regsets): ... this, and make static.
9439 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9440 (ppc_regs_info): New function.
9441 (the_low_target): Adjust.
9442 (initialize_low_arch): New function.
9443 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9444 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9445 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9446 (tdesc_s390x_linux64v2): Declare.
9447 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9448 (s390_fill_gregset, s390_store_last_break): Adjust.
9449 (target_regsets): Rename to ...
9450 (s390_regsets): ... this, and make static.
9451 (s390_get_pc, s390_set_pc): Adjust.
9452 (s390_get_hwcap): New target_desc parameter, and use it.
9453 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9454 (s390_arch_setup): Adjust to set the current process'es target
9455 description. Don't adjust the regmap.
9456 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9457 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9458 (regs_info_3264): New globals.
9459 (s390_regs_info): New function.
9460 (the_low_target): Adjust.
9461 (initialize_low_arch): New function.
9462 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9463 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9464 [__mips64] (init_registers_mips_linux)
9465 (init_registers_mips_dsp_linux): Delete defines.
9466 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9467 (have_dsp): New global.
9468 (mips_read_description): New, based on mips_arch_setup.
9469 (mips_arch_setup): Reimplement.
9470 (get_usrregs_info): New function.
9471 (mips_cannot_fetch_register, mips_cannot_store_register)
9472 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9473 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9474 (target_regsets): Rename to ...
9475 (mips_regsets): ... this, and make static.
9476 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9477 (dsp_regs_info, regs_info): New globals.
9478 (mips_regs_info): New function.
9479 (the_low_target): Adjust.
9480 (initialize_low_arch): New function.
9481 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9482 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9483 Declare.
9484 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9485 (arm_read_description): New, with bits factored from
9486 arm_arch_setup.
9487 (arm_arch_setup): Reimplement.
9488 (target_regsets): Rename to ...
9489 (arm_regsets): ... this, and make static.
9490 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9491 (arm_regs_info): New function.
9492 (the_low_target): Adjust.
9493 (initialize_low_arch): New function.
9494 * linux-m68k-low.c (tdesc_m68k): Declare.
9495 (target_regsets): Rename to ...
9496 (m68k_regsets): ... this, and make static.
9497 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9498 (m68k_regs_info): New function.
9499 (m68k_arch_setup): New function.
9500 (the_low_target): Adjust.
9501 (initialize_low_arch): New function.
9502 * linux-sh-low.c (tdesc_sharch): Declare.
9503 (target_regsets): Rename to ...
9504 (sh_regsets): ... this, and make static.
9505 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9506 (sh_regs_info, sh_arch_setup): New functions.
9507 (the_low_target): Adjust.
9508 (initialize_low_arch): New function.
9509 * linux-bfin-low.c (tdesc_bfin): Declare.
9510 (bfin_arch_setup): New function.
9511 (bfin_usrregs_info, regs_info): New globals.
9512 (bfin_regs_info): New function.
9513 (the_low_target): Adjust.
9514 (initialize_low_arch): New function.
9515 * linux-cris-low.c (tdesc_cris): Declare.
9516 (cris_arch_setup): New function.
9517 (cris_usrregs_info, regs_info): New globals.
9518 (cris_regs_info): New function.
9519 (the_low_target): Adjust.
9520 (initialize_low_arch): New function.
9521 * linux-cris-low.c (tdesc_crisv32): Declare.
9522 (cris_arch_setup): New function.
9523 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9524 (cris_regs_info): New function.
9525 (the_low_target): Adjust.
9526 (initialize_low_arch): New function.
9527 * linux-m32r-low.c (tdesc_m32r): Declare.
9528 (m32r_arch_setup): New function.
9529 (m32r_usrregs_info, regs_info): New globals.
9530 (m32r_regs_info): Adjust.
9531 (initialize_low_arch): New function.
9532 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9533 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9534 (tic6x_usrregs_info): Forward declare.
9535 (tic6x_read_description): New function, based on ...
9536 (tic6x_arch_setup): ... this. Reimplement.
9537 (target_regsets): Rename to ...
9538 (tic6x_regsets): ... this, and make static.
9539 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9540 (tic6x_regs_info): New function.
9541 (the_low_target): Adjust.
9542 (initialize_low_arch): New function.
9543 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9544 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9545 (target_regsets): Rename to ...
9546 (xtensa_regsets): ... this, and make static.
9547 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9548 globals.
9549 (xtensa_arch_setup, xtensa_regs_info): New functions.
9550 (the_low_target): Adjust.
9551 (initialize_low_arch): New function.
9552 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9553 (nios2_arch_setup): Set the current process'es tdesc.
9554 (target_regsets): Rename to ...
9555 (nios2_regsets): ... this.
9556 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9557 (nios2_regs_info): New function.
9558 (the_low_target): Adjust.
9559 (initialize_low_arch): New function.
a261b8f5
PA
9560 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9561 (aarch64_arch_setup): Set the current process'es tdesc.
9562 (target_regsets): Rename to ...
9563 (aarch64_regsets): ... this.
9564 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9565 (aarch64_regs_info): New function.
9566 (the_low_target): Adjust.
9567 (initialize_low_arch): New function.
3aee8918
PA
9568 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9569 globals.
9570 (target_regsets): Rename to ...
9571 (tile_regsets): ... this.
9572 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9573 (tile_regs_info): New function.
9574 (tile_arch_setup): Set the current process'es tdesc.
9575 (the_low_target): Adjust.
9576 (initialize_low_arch): New function.
9577 * spu-low.c (tdesc_spu): Declare.
9578 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9579 * win32-arm-low.c (tdesc_arm): Declare.
9580 (arm_arch_setup): New function.
9581 (the_low_target): Install arm_arch_setup instead of
9582 init_registers_arm.
9583 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9584 (init_windows_x86): Rename to ...
9585 (i386_arch_setup): ... this. Set `win32_tdesc'.
9586 (the_low_target): Adjust.
9587 * win32-low.c (win32_tdesc): New global.
9588 (child_add_thread): Don't create the thread cache here.
9589 (do_initial_child_stuff): Set the new process'es tdesc.
9590 * win32-low.h (struct target_desc): Forward declare.
9591 (win32_tdesc): Declare.
9592 * lynx-i386-low.c (tdesc_i386): Declare global.
9593 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9594 * lynx-low.c (lynx_tdesc): New global.
9595 (lynx_add_process): Set the new process'es tdesc.
9596 * lynx-low.h (struct target_desc): Forward declare.
9597 (lynx_tdesc): Declare global.
9598 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9599 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9600 * nto-low.c (nto_tdesc): New global.
9601 (do_attach): Set the new process'es tdesc.
9602 * nto-low.h (struct target_desc): Forward declare.
9603 (nto_tdesc): Declare.
9604 * nto-x86-low.c (tdesc_i386): Declare.
9605 (nto_x86_arch_setup): Set `nto_tdesc'.
9606
b1fbec62
GB
96072013-06-04 Gary Benson <gbenson@redhat.com>
9608
9609 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9610 to qSupported response when appropriate.
9611 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9612 with nonzero-length annex.
9613 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9614 arguments supplied in annex.
9615
d1ec4ce7
DE
96162013-05-31 Doug Evans <dje@google.com>
9617
ac44adcb 9618 PR server/15594
d1ec4ce7
DE
9619 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9620 64 bits in 64-cross-32 environment.
9621
9b25f2d3
PA
96222013-05-28 Pedro Alves <palves@redhat.com>
9623
9624 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9625 (aarch64-without-fpu.c): Delete rule.
9626 * configure.srv (aarch64*-*-linux*): Remove references to
9627 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9628 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9629 declaration.
9630
6740dc9c
PA
96312013-05-24 Pedro Alves <palves@redhat.com>
9632
9633 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9634 instead of strchr/decode_address. Error if the range isn't split
9635 with a ','. Don't assume there's be a ':' in the action.
9636
c2d6af84
PA
96372013-05-23 Yao Qi <yao@codesourcery.com>
9638 Pedro Alves <palves@redhat.com>
9639
9640 * linux-low.c (lwp_in_step_range): New function.
9641 (linux_wait_1): If the thread was range stepping and stopped
9642 outside the stepping range, report the stop to GDB. Otherwise,
9643 continue stepping. Add range stepping debug output.
9644 (linux_set_resume_request): Copy the step range from the resume
9645 request to the lwp.
9646 (linux_supports_range_stepping): New.
9647 (linux_target_ops) <supports_range_stepping>: Set to
9648 linux_supports_range_stepping.
9649 * linux-low.h (struct linux_target_ops)
9650 <supports_range_stepping>: New field.
9651 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9652 * linux-x86-low.c (x86_supports_range_stepping): New.
9653 (the_low_target) <supports_range_stepping>: Set to
9654 x86_supports_range_stepping.
9655 * server.c (handle_v_cont): Handle 'r' action.
9656 (handle_v_requests): Append ";r" if the target supports range
9657 stepping.
9658 * target.h (struct thread_resume) <step_range_start,
9659 step_range_end>: New fields.
9660 (struct target_ops) <supports_range_stepping>:
9661 New field.
9662 (target_supports_range_stepping): New macro.
9663
58794e1a
JB
96642013-05-17 Joel Brobecker <brobecker@adacore.com>
9665
9666 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9667 confusion in comment.
9668
d631c5a7
JB
96692013-05-17 Joel Brobecker <brobecker@adacore.com>
9670
9671 * lynx-low.c (struct process_info_private): New type.
9672 (lynx_add_process): New function.
9673 (lynx_create_inferior, lynx_attach): Replace calls to
9674 add_process by calls to lynx_add_process.
9675 (lynx_resume): If PTID is null, then try using
9676 current_process()->private->last_wait_event_ptid.
9677 Add comments.
9678 (lynx_clear_inferiors): Delete. The contents of that function
9679 has been inlined in lynx_mourn;
9680 (lynx_wait_1): Save the ptid in the process's private data.
9681 (lynx_mourn): Free the process' private data. Replace call
9682 to lynx_clear_inferiors by call to clear_inferiors.
9683
96f7a20f
YQ
96842013-05-17 Yao Qi <yao@codesourcery.com>
9685
9686 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9687 the right place.
9688
db0dfaa0
LM
96892013-05-16 Luis Machado <lgustavo@codesourcery.com>
9690
9691 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9692 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9693 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9694 PT_TEXT_END_ADDR guards. Update comments.
9695 (linux_target_op) <read_offsets>: Conditionally define to
9696 linux_read_offsets if the target is UCLIBC and if it defines
9697 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9698
68f5f838
SL
96992013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9700 Andrew Jenner <andrew@codesourcery.com>
9701
9702 * Makefile.in (SFILES): Add linux-nios2-low.c.
9703 (clean): Add action to delete nios2-linux.c.
9704 (nios2-linux.c): New rule.
9705 * configure.srv: Add nios2*-*-linux*.
9706 * linux-nios2-low.c: New.
9707
1ebff1fd
HAQ
97082013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9709
9710 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9711
f6150862
HZ
97122013-04-25 Hui Zhu <hui@codesourcery.com>
9713
9714 PR gdb/15186
f6150862
HZ
9715 * ax.c (ax_printf): Add fflush.
9716
614c279d
TT
97172013-04-22 Tom Tromey <tromey@redhat.com>
9718
9719 * Makefile.in (SFILES): Add filestuff.c.
9720 (OBS): Add filestuff.o.
9721 (filestuff.o): New target.
9722 * config.in, configure: Rebuild.
9723 * configure.ac: Check for fdwalk, pipe2.
9724
7d4e5717
PA
97252013-04-17 Pedro Alves <palves@redhat.com>
9726
9727 * configure.ac (USE_THREAD_DB): Delete variable.
9728 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9729 Don't AC_SUBST USE_THREAD_DB.
9730 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9731 * config.in, configure: Regenerate.
9732
d5c93e41
PA
97332013-04-16 Pedro Alves <palves@redhat.com>
9734
9735 * linux-low.h (struct lwp_info) <thread_known>: Move under
9736 the USE_THREAD_DB #ifdef.
9737
04f5fe89
PA
97382013-04-16 Pedro Alves <palves@redhat.com>
9739
9740 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9741 (linux-low.o): Delete rule.
9742 * linux-low.h: Always include "gdb_thread_db.h" instead of
9743 conditionally including thread_db.h.
9744 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9745 HAVE_THREAD_DB_H.
9746
480b27bf
JK
97472013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9748
9749 * Makefile.in (install-only): Fix make install regression.
9750
43662968
JK
97512013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9752
9753 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9754 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9755 installation.
9756 * gdbserver.1: Remove.
9757
3e74e146
PA
97582013-03-22 Pedro Alves <palves@redhat.com>
9759
9760 * linux-low.c (handle_extended_wait): Don't call
9761 linux_enable_event_reporting.
9762
a8347a2a
TT
97632013-03-15 Tony Theodore <tonyt@logyst.com>
9764
9765 PR build/9098:
9766 * Makefile.in (SHELL): Use @SHELL@.
9767
eeb56fa7
SDJ
97682013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9769
9770 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9771 compiler warning.
9772
4fa7e2ff
JB
97732013-03-13 Joel Brobecker <brobecker@adacore.com>
9774
9775 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9776 Remove extraneous NULL element.
9777
8ddb1965
YQ
97782013-03-13 Yao Qi <yao@codesourcery.com>
9779
9780 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9781 'V' block in trace frame.
9782
9accd112
MM
97832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9784
9785 * target.h (struct target_ops): Add btrace ops.
9786 (target_supports_btrace): New macro.
9787 (target_enable_btrace): New macro.
9788 (target_disable_btrace): New macro.
9789 (target_read_btrace): New macro.
9790 * gdbthread.h (struct thread_info): Add btrace field.
9791 * server.c: Include btrace-common.h.
9792 (handle_btrace_general_set): New function.
9793 (handle_btrace_enable): New function.
9794 (handle_btrace_disable): New function.
9795 (handle_general_set): Call handle_btrace_general_set.
9796 (handle_qxfer_btrace): New function.
9797 (struct qxfer qxfer_packets[]): Add btrace entry.
9798 * inferiors.c (remove_thread): Disable btrace.
9799 * linux-low: Include linux-btrace.h.
9800 (linux_low_enable_btrace): New function.
9801 (linux_low_read_btrace): New function.
9802 (linux_target_ops): Add btrace ops.
9803 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9804 Add srv_linux_btrace=yes.
9805 (x86_64-*-linux*): Add linux-btrace.o.
9806 Add srv_linux_btrace=yes.
9807 * configure.ac: Define HAVE_LINUX_BTRACE.
9808 * config.in: Regenerated.
9809 * configure: Regenerated.
9810
5cc22e4c
MM
98112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9812
9813 * server.c (handle_qxfer): Preserve error message if -3 is
9814 returned.
9815 (qxfer): Document the -3 return value.
9816
7c97f91e
MM
98172013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9818
9819 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9820 (linux_btrace_h): New variable.
9821 (linux-btrace.o): New rule.
9822
be9a119c 98232013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9824 Hafiz Abid Qadeer <abidh@codesourcery.com>
9825
9826 * tracepoint.c (trace_buffer_size): New global.
9827 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9828 (init_trace_buffer): Change to one-argument function. Allocate
9829 trace buffer memory.
9830 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9831 handle QTBuffer:size packet.
9832 (cmd_bigqtbuffer_size): New function.
9833 (initialize_tracepoint): Call init_trace_buffer with
9834 DEFAULT_TRACE_BUFFER_SIZE.
9835 * server.c (handle_query): Add QTBuffer:size in the
9836 supported packets.
9837
e64f7499
YQ
98382013-03-07 Yao Qi <yao@codesourcery.com>
9839
9840 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9841 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9842 of -1.
9843 (cmd_qtsp): Adjust condition. Do post increment.
9844 Set cur_action and cur_step_action back to 0.
9845
f0ae6fc3
PA
98462013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9847
9848 PR server/15236
9849 * linux-low.c (linux_write_memory): Return early success if LEN is
9850 zero.
9851
b5b0b0af
CV
98522013-03-05 Corinna Vinschen <vinschen@redhat.de>
9853
334ad4a8 9854 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9855
589bc927
TT
98562013-02-28 Tom Tromey <tromey@redhat.com>
9857
9858 * configure.ac: Invoke AC_SYS_LARGEFILE.
9859 * configure, config.in: Rebuild.
9860
dfe07582
CV
98612013-02-28 Corinna Vinschen <vinschen@redhat.com>
9862
9863 * win32-low.c: Throughout, fix format strings and casts of
9864 printf-like functions to avoid type related warnings on all
9865 platforms.
9866 (get_child_debug_event): Print dwDebugEventCode as hex since
9867 that's how it's usually documented.
9868
736cd585
YQ
98692013-02-28 Yao Qi <yao@codesourcery.com>
9870
9871 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9872 pulongest.
9873
e1f58301
JW
98742013-02-27 Jiong Wang <jiwang@tilera.com>
9875
9876 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9877 (reg-tilegx32.c): New rule.
9878 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9879 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9880 different register info initializer according to elf class.
9881 (init_registers_tilgx32): New function. The tilegx32 register info
9882 initializer.
9883 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9884 (tile_store_gregset): Likewise.
9885
d171ca78
YQ
98862013-02-27 Yao Qi <yao@codesourcery.com>
9887
9888 * server.c (process_point_options): Print debug message when
9889 debug_threads is true.
9890
282bbdf3
YQ
98912013-02-26 Yao Qi <yao@codesourcery.com>
9892
9893 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9894
aca22551
PA
98952013-02-19 Pedro Alves <palves@redhat.com>
9896 Kai Tietz <ktietz@redhat.com>
9897
9898 PR gdb/15161
9899
9900 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9901 instead of strtoul to extract address from packet.
9902 (process_serial_event) <'z'>: Likewise.
9903
4f3cee1c
YQ
99042013-02-18 Yao Qi <yao@codesourcery.com>
9905
9906 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9907
8e1d55a3
PA
99082013-02-14 Pedro Alves <palves@redhat.com>
9909
9910 Plug memory leak.
9911
9912 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9913 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9914
458820da
PA
99152013-02-14 Pedro Alves <palves@redhat.com>
9916
9917 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9918
baea0dae
PA
99192013-02-14 Pedro Alves <palves@redhat.com>
9920
9921 * tracepoint.c (save_string): Delete.
9922 (add_tracepoint_action): Use savestring instead of save_string.
9923
0b1afbb3
PA
99242013-02-12 Pedro Alves <palves@redhat.com>
9925
9926 * linux-xtensa-low.c: Ditto.
9927 * xtensa-xtregs.c: Ditto.
9928
8a4ac37e
PA
99292013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9930
9931 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9932 thread_db.
9933
148de6bb
MS
99342013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9935
9936 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9937 aarch64_num_wp_regs and aarch64_num_bp_regs to
9938 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9939
55fac6e0
MS
99402013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9941
9942 * linux-aarch64-low.c (ps_get_thread_area): Replace
9943 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9944
176eb98c
MS
99452013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9946 Marcus Shawcroft <marcus.shawcroft@arm.com>
9947 Nigel Stephens <nigel.stephens@arm.com>
9948 Yufeng Zhang <yufeng.zhang@arm.com>
9949
9950 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9951 (aarch64.c, aarch64-without-fpu.c): New targets.
9952 * configure.srv (aarch64*-*-linux*): New.
9953 * linux-aarch64-low.c: New file.
9954
56f7af9c
MS
99552013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9956
43aaf8b6 9957 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9958 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9959 (dequeue_one_deferred_signal, linux_resume_one_thread)
9960 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9961 (linux_tracefork_grandchild, linux_test_for_tracefork)
9962 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9963 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9964 where the argument is 0.
9965
60f662b0
YQ
99662013-01-25 Yao Qi <yao@codesourcery.com>
9967
9968 * event-loop.c: Include "queue.h".
9969 (gdb_event_p): New typedef.
9970 (struct gdb_event) <next_event>: Remove.
9971 (event_queue): Change to QUEUE(gdb_event_p).
9972 (async_queue_event): Remove.
9973 (gdb_event_xfree): New.
9974 (initialize_event_loop): New.
9975 (process_event): Use API from QUEUE.
9976 (wait_for_event): Likewise.
9977 * server.c (main): Call initialize_event_loop.
9978 * server.h (initialize_event_loop): Declare.
9979
5ae4861a
YQ
99802013-01-18 Yao Qi <yao@codesourcery.com>
9981
9982 * ax.h (struct eval_agent_expr_context): New.
9983 (gdb_eval_agent_expr): Update declaration.
9984 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9985 TFRAME. Add new argument CTX.
9986 * server.h (struct eval_agent_expr_context): Declare.
9987 (agent_mem_read, agent_tsv_read): Update declaration.
9988 (agent_mem_read_string): Likewise.
9989 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9990 (add_traceframe_block): Add new argument TPOINT.
9991 Increase TPOINT->traceframe_usage.
9992 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9993 eval_tracepoint_agent_expr.
9994 (condition_true_at_tracepoint): Likewise.
9995 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9996 (agent_mem_read_string, agent_tsv_read): Likewise.
9997
85e00e85
YQ
99982013-01-16 Yao Qi <yao@codesourcery.com>
9999
10000 * linux-low.c (linux_resume_one_lwp): Don't check
10001 'lwp->bp_reinsert != 0'.
10002
4039cf45
JB
100032013-01-07 Joel Brobecker <brobecker@adacore.com>
10004 Pedro Alves <palves@redhat.com>
10005
10006 * lynx-low.c (ptrace_request_to_str): Define a temporary
10007 macro and use it to simplify this function's implementation.
10008
9044dee2
JB
100092013-01-07 Joel Brobecker <brobecker@adacore.com>
10010
10011 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10012 sets errno.
10013
e6352c8f
JB
100142013-01-07 Joel Brobecker <brobecker@adacore.com>
10015
10016 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10017
50681a27
JB
100182013-01-07 Joel Brobecker <brobecker@adacore.com>
10019
10020 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10021
3f6e77ef
JB
100222013-01-07 Joel Brobecker <brobecker@adacore.com>
10023
10024 * lynx-low.c (lynx_resume): Use the resume_info parameter
10025 to determine the ptid for the lynx_ptrace call, unless
10026 it is equal to minus_one_ptid, in which case we use the
10027 ptid of the current_inferior.
10028 (lynx_wait_1): After having received a thread create/exit
10029 event, resume the inferior's execution using the signaling
10030 thread's ptid, rather than the old ptid.
10031
7fda33ae
JB
100322013-01-07 Joel Brobecker <brobecker@adacore.com>
10033
10034 * lynx-low.c (lynx_resume): Delete variable ret.
10035
b9786c74
JB
100362013-01-01 Joel Brobecker <brobecker@adacore.com>
10037
10038 * gdbreplay.c (gdbreplay_version): Update copyright year.
10039 * server.c (gdbserver_version): Likewise.
10040
8b93d60f
JB
100412012-12-17 Joel Brobecker <brobecker@adacore.com>
10042
10043 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10044 new thread.
10045
037335a7
JB
100462012-12-17 Joel Brobecker <brobecker@adacore.com>
10047
10048 * lynx-low.c (ptrace_request_to_str): Add handling for
10049 PTRACE_GETTRACESIG.
10050
52d4cbd8
JB
100512012-12-17 Joel Brobecker <brobecker@adacore.com>
10052
10053 * lynx-low.c (lynx_attach): Delete variable new_process.
10054
ab8f6ca9
JB
100552012-12-17 Joel Brobecker <brobecker@adacore.com>
10056
10057 * lynx-low.c (lynx_create_inferior): Delete variable
10058 new_process.
10059
78cbc024
JB
100602012-12-17 Joel Brobecker <brobecker@adacore.com>
10061
10062 * lynx-low.c (ptrace_request_to_str): Do not handle
10063 PTRACE_GETTHREADLIST if this macro does not exist.
10064
14a00470
YQ
100652012-12-15 Yao Qi <yao@codesourcery.com>
10066
10067 * Makefile.in (OBS): Add notif.o.
10068 * notif.c, notif.h: New.
10069 * server.c: Include "notif.h".
10070 (struct vstop_notif) <next>: Remove.
10071 <base>: New field.
10072 (queue_stop_reply): Update.
10073 (push_event, send_next_stop_reply): Remove.
10074 (discard_queued_stop_replies): Update.
10075 (notif_stop): New variable.
10076 (handle_v_stopped): Remove.
10077 (handle_v_requests): Don't call handle_v_stopped. Call
10078 handle_ack_notif instead.
10079 (queue_stop_reply_callback): Call notif_event_enque instead
10080 of queue_stop_reply.
10081 (handle_status): Don't call send_next_stop_reply, call
10082 notif_write_event instead.
10083 (kill_inferior_callback): Likewise.
10084 (detach_or_kill_inferior_callback): Likewise.
10085 (main): Call initialize_notif.
10086 (process_serial_event): Call QUEUE_is_empty.
10087 (handle_target_event): Call notif_push instead of push event.
10088 * server.h (push_event): Remove declaration.
10089
61c125b9
TT
100902012-12-10 Tom Tromey <tromey@redhat.com>
10091
10092 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10093 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10094 macros.
10095 (.c.o): Rewrite.
10096 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10097 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10098 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10099 (amd64-linux-ipa.o, ax.o): Rewrite.
10100 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10101 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10102 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10103 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10104 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10105 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10106 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10107 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10108 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10109 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10110 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10111 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10112 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10113 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10114 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10115 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10116 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10117 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10118 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10119 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10120 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10121 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10122 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10123 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10124 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10125 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10126 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10127 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10128 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10129 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10130 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10131 (reg-tilegx.o): Remove.
10132 (all_object_files): New macro.
10133 Include .deps files.
10134 * aclocal.m4, configure: Rebuild.
10135 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10136 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10137 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10138
e90e9ad9
TT
101392012-12-05 Tom Tromey <tromey@redhat.com>
10140
10141 PR gdb/14917:
10142 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10143
02d403bf 101442012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10145
10146 * configure.ac: Check for linux/perf_event.h.
10147 * config.in: Regenerated.
10148 * configure: Regenerated.
10149
0270a750
PA
101502012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10151
10152 * hostio.c (handle_readlink): Decrease buffer size
10153 parameter passed to readlink by one byte.
10154
8c29b58e
YQ
101552012-11-26 Yao Qi <yao@codesourcery.com>
10156
10157 * configure.ac (build_warnings): Append '-Wempty-body'.
10158 * configure: Regenerated.
10159 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10160 body.
10161
8bdce1ff
PM
101622012-11-15 Pierre Muller <muller@sourceware.org>
10163
10164 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10165 * config.in: Regenerate.
10166 * configure: Regenerate.
10167 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10168 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10169 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10170 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10171 header.
10172 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10173 instead of <sys/wait.h> header.
10174 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10175
02d403bf 101762012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10177
10178 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10179 (various make rules): Remove -DGDBSERVER
10180
fbd5db48
YQ
101812012-11-09 Yao Qi <yao@codesourcery.com>
10182
10183 * spu-low.c (current_ptid): Move it to ..
10184 * gdbthread.h: ... here. New.
10185 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10186 * server.c (myresume, process_serial_event): Likewise.
10187 * thread-db.c (thread_db_find_new_threads): Likewise.
10188 * tracepoint.c (run_inferior_command): Likewise.
10189
b3dc46ff
AB
101902012-10-01 Andrew Burgess <aburgess@broadcom.com>
10191
10192 * server.c (handle_search_memory_1): Include access length in
10193 warning message.
10194
07c04788
HPN
101952012-09-05 Michael Brandt <michael.brandt@axis.com>
10196
10197 * linux-crisv32-low.c: Fix compile errors.
10198
918d227b
YQ
101992012-09-04 Yao Qi <yao@codesourcery.com>
10200
10201 * tracepoint.c (cmd_qtsv): Adjust debug message.
10202 Don't check CUR_TPOINT.
10203
18c1b81a
YQ
102042012-08-28 Yao Qi <yao@codesourcery.com>
10205
10206 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10207 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10208 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10209 Remove declarations of xmalloc, xreallloc, xstrdup and
10210 freeargv.
10211 * Makefile.in (libiberty_h): New.
10212 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10213 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10214
dc82f37b
YQ
102152012-08-23 Yao Qi <yao@codesourcery.com>
10216
10217 * server.h: Remove declaration of 'xsnprintf'.
10218
406b1477
KS
102192012-08-22 Keith Seitz <keiths@redhat.com>
10220
10221 * server.h: Include build-gnulib-gbserver/config.h.
10222 * gdbreplay.c: Likewise.
10223
e6712ff1
DE
102242012-08-08 Doug Evans <dje@google.com>
10225
10226 * Makefile.in (SFILES): Add gdb_vecs.c.
10227 (OBS): Add gdb_vecs.o.
10228 (gdb_vecs_h, host_defs_h): New variables.
10229 (thread-db.o): Add $(gdb_vecs_h) dependency.
10230 (gdb_vecs.o): New rule.
10231 * thread-db.c: #include "gdb_vecs.h".
10232 (thread_db_load_search): Use a vector to iterate over path elements.
10233 Handle text appearing after "$pdir".
10234
10235 * configure.ac: Add check for strstr.
10236 * config.in: Regenerate.
10237 * configure: Regenerate.
10238
7c3270ae
UW
102392012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10240
10241 * hostio.c (handle_pread): If pread fails, fall back to attempting
10242 lseek/read.
10243 (handle_pwrite): Likewise for pwrite.
10244
b62e2b27
UW
102452012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10246
10247 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10248 between unsupported TYPE and unimplementable ADDR/LEN combination.
10249 (arm_insert_point): Act on new return value.
10250
78a99e91
PA
102512012-07-31 Pedro Alves <palves@redhat.com>
10252
10253 * server.c (process_point_options): Only skip tokens if we find
10254 one that is unrecognized. Don't treat 'X' specially while
10255 skipping unrecognized tokens.
10256
fcf303ab
UW
102572012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10258
10259 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10260 to 4-byte-align HW breakpoint addresses for Thumb.
10261
7255706c
YQ
102622012-07-27 Yao Qi <yao@codesourcery.com>
10263
10264 PR remote/14161.
10265
10266 * server.h: Declare gdb_agent_about_to_close.
10267 * target.c (kill_inferior): Include "agent.h".
10268 New. Send command 'kill'.
10269 * target.h (kill_inferior): Removed macro.
10270 * tracepoint.c (gdb_agent_about_to_close): New.
10271 (gdb_agent_helper_thread): Handle command 'close'.
10272 Wait endlessly until the inferior stops.
10273 Install gdb_agent_remove_socket to atexit hook.
10274 (agent_socket_name): New static variable.
10275 (gdb_agent_socket_init): Replace local variable 'name' with
10276 'agent_socket_name'.
10277 (gdb_agent_remove_socket): New.
10278
5a3f286f
YQ
102792012-07-27 Yao Qi <yao@codesourcery.com>
10280
10281 * server.c (process_point_options): Stop at 'X' when parsing.
10282
961bd387
ME
102832012-07-19 Michael Eager <eager@eagercon.com>
10284
a261b8f5 10285 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10286 to hw_execute.
10287 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10288 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10289 hardware breakpoint.
10290
aa7c7447
JK
102912012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10292
10293 * gdbserver/linux-low.c (initialize_low): Call
10294 linux_ptrace_init_warnings.
10295
7f216e7c
DE
102962012-07-02 Doug Evans <dje@google.com>
10297
10298 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10299 pointer to int.
10300
d3ce09f5
SS
103012012-07-02 Stan Shebs <stan@codesourcery.com>
10302
10303 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10304 (ax.o): Add it to build rule.
10305 (ax-ipa.o): Ditto.
10306 (OBS): Add format.o.
10307 (IPA_OBS): Add format.o.
10308 * server.c (handle_query): Claim support for breakpoint commands.
10309 (process_point_options): Add command case.
10310 (process_serial_event): Leave running if there are printfs in
10311 effect.
10312 * mem-break.h (any_persistent_commands): Declare.
10313 (add_breakpoint_commands): Declare.
10314 (gdb_no_commands_at_breakpoint): Declare.
10315 (run_breakpoint_commands): Declare.
10316 * mem-break.c (struct point_command_list): New struct.
10317 (struct breakpoint): New field command_list.
10318 (any_persistent_commands): New function.
10319 (add_commands_to_breakpoint): New function.
10320 (add_breakpoint_commands): New function.
10321 (gdb_no_commands_at_breakpoint): New function.
10322 (run_breakpoint_commands): New function.
10323 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10324 locally.
10325 * ax.c: Include format.h.
10326 (ax_printf): New function.
10327 (gdb_eval_agent_expr): Add printf opcode.
10328
2f8f6aed
YQ
103292012-06-13 Yao Qi <yao@codesourcery.com>
10330
10331 * server.c (start_inferior): Remove duplicated writes to fields
10332 'last_resume_kind' and 'last_status' of 'current_inferior'.
10333
0c9070b3
YQ
103342012-06-12 Yao Qi <yao@codesourcery.com>
10335 Pedro Alves <palves@redhat.com>
10336
10337 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10338 comment.
10339 * server.c (handle_v_cont): Extend comment.
10340
c52daf70
YQ
103412012-06-11 Yao Qi <yao@codesourcery.com>
10342
10343 * linux-low.c (linux_attach): Add 'static'.
10344
d38bbb0a
YQ
103452012-06-06 Yao Qi <yao@codesourcery.com>
10346
10347 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10348
89dc0afd
JK
103492012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10350
10351 Fix gcc -flto compilation warning.
10352 * server.c (main): Make variable multi_mode and attach volatile.
10353
75f62ce7
TJB
103542012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10355
10356 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10357 if the platform doesn't know about it.
10358
65f479b6
PA
103592012-05-30 Jeff Kenton <jkenton@tilera.com>
10360
10361 * Makefile.in (SFILES): Add linux-tile-low.c.
10362 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10363 * configure.srv: Handle tilegx-*-linux*.
10364 * linux-tile-low.c: New file.
10365
0c5bf5a9
JK
103662012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10367
10368 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10369
a493e3e2
PA
103702012-05-24 Pedro Alves <palves@redhat.com>
10371
10372 PR gdb/7205
10373
43aaf8b6 10374 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10375
2ea28649
PA
103762012-05-24 Pedro Alves <palves@redhat.com>
10377
10378 PR gdb/7205
10379
10380 Replace target_signal with gdb_signal throughout.
10381
8d409d16
MR
103822012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10383
10384 * linux-low.c (linux_store_registers): Avoid the copying sequence
10385 when no data has been retrieved by ptrace.
10386
23512c01
MGD
103872012-05-22 Will Deacon <will.deacon@arm.com>
10388
10389 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10390 Include asm/ptrace.h.
10391 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10392 already defined.
10393
4934b29e
MR
103942012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10395
10396 * linux-low.c (linux_store_registers): Don't re-retrieve data
10397 with ptrace that has already been obtained from /proc. Always
10398 copy any data retrieved with ptrace to the buffer supplied.
10399
bde24c0a
PA
104002012-05-11 Yao Qi <yao@codesourcery.com>
10401 Pedro Alves <palves@redhat.com>
10402
10403 * linux-low.c (enum stopping_threads_kind): New.
10404 (stopping_threads): Change type to `enum stopping_threads_kind'.
10405 (handle_extended_wait): If stopping and suspending threads, leave
10406 the new_lwp suspended too.
10407 (linux_wait_for_event): Adjust.
10408 (stop_all_lwps): Set `stopping_threads' to
10409 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10410 whether we're suspending threads or just stopping them. Assert no
10411 recursion happens.
10412
623b6bdf
YQ
104132012-04-29 Yao Qi <yao@codesourcery.com>
10414
10415 * server.h: Move some code to ...
10416 * gdbthread.h: ... here. New.
10417 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10418 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10419 (nto-low.o, win32-low.o): Likewise.
10420 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10421 * regcache.c, remote-utils.c, server.c: Likewise.
10422 * target.c, tracepoint.c, win32-low.c: Likewise.
10423
f15f9948
TJB
104242012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10425
10426 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10427 (PTRACE_ARG4_TYPE): Likewise.
10428 (PTRACE_XFER_TYPE): Likewise.
10429 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10430 ptrace to PTRACE_ARG3_TYPE.
10431 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10432 (PTRACE_ARG4_TYPE): Likewise.
10433 (PTRACE_XFER_TYPE): Likewise.
10434 (linux_detach_one_lwp): Cast fourth argument of
10435 ptrace to long then PTRACE_ARG4_TYPE.
10436 (regsets_fetch_inferior_registers): Cast third argument of
10437 ptrace to long then PTRACE_ARG3_TYPE.
10438 (regsets_store_inferior_registers): Likewise.
10439
38ea300a
PA
104402012-04-20 Pedro Alves <palves@redhat.com>
10441
10442 * configure: Regenerate.
10443
c971b7fa
PA
104442012-04-19 Pedro Alves <palves@redhat.com>
10445
43aaf8b6 10446 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10447 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10448 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10449 (all, install-only, uninstall, clean-info, all-lib, clean): No
10450 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10451 (maintainer-clean realclean distclean): Use subdir_do.
10452 (subdir_do): New.
10453 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10454 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10455 * acinclude.m4: Include acx_configure_dir.m4.
10456 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10457 calls. Call AC_PROG_RANLIB. Configure gnulib using
10458 ACX_CONFIGURE_DIR.
10459 (GNULIB): New.
10460 (GNULIB_STDINT_H): Adjust.
10461 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10462 * gdbreplay.c: Include build-gnulib/config.h.
10463 * server.h: Likewise.
10464 * aclocal.m4: Regenerate.
10465 * config.in: Regenerate.
10466 * configure: Regenerate.
c971b7fa 10467
809277f8
PA
104682012-04-19 Pedro Alves <palves@redhat.com>
10469
10470 * Makefile.in (LIBGNU, INCGNU): Adjust.
10471 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10472 (all, install-only, uninstall, clean-info, all-lib, clean)
10473 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10474 * configure.ac: Adjust AC_OUTPUT output.
10475 * aclocal.m4: Regenerate.
10476 * configure: Regenerate.
10477
fd9bb8b8
PA
104782012-04-19 Pedro Alves <palves@redhat.com>
10479
10480 * Makefile.in (generated_files): New.
10481 (server_h): Remove the explicit dependency on config.h, and depend
10482 on $generated_files.
10483
1c298c66
PA
104842012-04-19 Pedro Alves <palves@redhat.com>
10485
10486 * Makefile.in (INCGNU): Add -Ignulib.
10487
57c4b50b
PA
104882012-04-19 Pedro Alves <palves@redhat.com>
10489
10490 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10491 (INCGNU): ... this, and spell out -I here.
10492 (GNULIB_LIB): Rename to ...
10493 (LIBGNU): ... this.
10494 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10495
1030e047
PA
104962012-04-19 Pedro Alves <palves@redhat.com>
10497
10498 * config.in: Regenerate.
10499
447d4319
PA
105002012-04-19 Pedro Alves <palves@redhat.com>
10501
10502 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10503 * server.h (memmem): Remove declaration.
10504 * config.in: Regenerate.
10505 * configure: Regenerate.
10506
aad9eab9
YQ
105072012-04-19 Yao Qi <yao@codesourcery.com>
10508
10509 * Makefile.in (SFILES): Add common/vec.c.
10510 (OBS): Add vec.o.
10511 (vec.o): New rule.
10512
3e10640f
YQ
105132012-04-19 Yao Qi <yao@codesourcery.com>
10514
10515 * remote-utils.c (prepare_resume_reply): Replace with macro
10516 target_core_of_thread.
10517 * server.c (handle_qxfer_threads_proper): Likewise.
10518 * target.h (traget_core_of_thread): New macro.
10519
71622373
PA
105202012-04-18 Pedro Alves <palves@redhat.com>
10521
10522 * aclocal.m4: Regenerate.
10523 * configure: Regenerate.
10524
80d26939
YQ
105252012-04-16 Yao Qi <yao@codesourcery.com>
10526
10527 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10528 duplicated on address.
10529
42476b70
YQ
105302012-04-16 Yao Qi <yao@codesourcery.com>
10531
10532 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10533 (struct tracepoint_action_ops) <send>: New field.
10534 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10535 (agent_expr_send, x_tracepoint_action_send): New.
10536 (l_tracepoint_action_send): New.
10537 (cmd_qtdp): Download and install tracepoint
10538 according to `use_agent'.
10539 (run_inferior_command): Add one more parameter `len'.
10540 Update callers.
10541 (tracepoint_send_agent): New.
10542 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10543
7bc83639
YQ
105442012-04-16 Yao Qi <yao@codesourcery.com>
10545
10546 * tracepoint.c (download_tracepoints): Moved to ...
10547 (cmd_qtstart): ... here.
10548
5f18041e
YQ
105492012-04-14 Yao Qi <yao@codesourcery.com>
10550
10551 * tracepoint.c: Include inttypes.h.
10552 (struct collect_memory_action): Use sized types.
10553 (struct tracepoint): Likewise.
10554 (cmd_qtdp, stop_tracing): Update print specifiers.
10555 (cmd_qtp, response_tracepoint): Likewise.
10556 (collect_data_at_tracepoint): Likewise.
10557 (collect_data_at_step): Likewise.
10558
55a8c076
YQ
105592012-04-14 Yao Qi <yao@codesourcery.com>
10560
10561 Import gnulib module inttypes.
10562 * aclocal.m4, config.in, configure: Regenerated.
10563
dc750257
YQ
105642012-04-14 Yao Qi <yao@codesourcery.com>
10565
10566 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10567 Makefile and config.status at last.
10568
0ab5faf9
YQ
105692012-04-13 Yao Qi <yao@codesourcery.com>
10570
10571 * tracepoint.c: Include stdint.h unconditionally.
10572
18f5fd81
TJB
105732012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10574
10575 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10576 on BFD_HAVE_SYS_PROCFS_TYPE.
10577 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10578 * configure: Regenerate.
10579 * config.in: Likewise.
10580
4d47af5c
L
105812012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10582
10583 * Makefile.in (clean): Also remove x32.c x32-linux.c
10584 x32-avx.c x32-avx-linux.c.
10585 (x32.o): New target.
10586 (x32.c): Likewise.
10587 (x32-linux.o): Likewise.
10588 (x32-linux.c): Likewise.
10589 (x32-avx.o): Likewise.
10590 (x32-avx.c): Likewise.
10591 (x32-avx-linux.o): Likewise.
10592 (x32-avx-linux.c): Likewise.
10593
10594 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10595 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10596 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10597 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10598 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10599 i386/x32-avx-linux.xml.
10600
10601 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10602 (init_registers_x32_avx_linux): Likwise.
10603 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10604 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10605
ecedbe58
PA
106062012-04-13 Pedro Alves <palves@redhat.com>
10607
10608 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10609 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10610 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10611 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10612 the sub-make.
10613
c92b5177
L
106142012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10615
10616 * linux-x86-low.c (compat_x32_clock_t): New.
10617 (compat_x32_siginfo_t): Likewise.
10618 (compat_x32_siginfo_from_siginfo): Likewise.
10619 (siginfo_from_compat_x32_siginfo): Likewise.
10620 (linux_is_elf64): Likewise.
10621 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10622 and siginfo_from_compat_x32_siginfo for x32.
10623 (x86_arch_setup): Set linux_is_elf64.
10624
214d508e
L
106252012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10626
10627 PR gdb/13969
10628 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10629 e_machine field.
10630 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10631 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10632 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10633 compatible with process.
10634
c9a1864a
YQ
106352012-04-12 Yao Qi <yao@codesourcery.com>
10636
10637 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10638 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10639 (install-only, install-info, clean): Handle sub dir gnulib.
10640 (all-lib, am--refresh): New targets.
10641 (memmem.o): Remove target.
10642 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10643 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10644 (AC_REPLACE_FUNCS): Remove memmem.
10645 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10646 (AC_OUTPUT): Generate Makefile in gnulib/.
10647 * aclocal.m4, config.in, configure: Regenerated.
10648
367ba2c2
MR
106492012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10650
10651 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10652
9d236627
PA
106532012-04-05 Pedro Alves <palves@redhat.com>
10654
10655 -Werror=strict-aliasing
10656
10657 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10658 pointer.
10659
111217b3
PA
106602012-04-04 Pedro Alves <palves@redhat.com>
10661
10662 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10663 (sparc_store_gregset_from_stack, sparc_store_gregset)
10664 (sparc_breakpoint_at): Fix formatting.
10665
8365dcf5
TJB
106662012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10667
10668 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10669 are available.
10670 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10671 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10672 * config.in: Regenerate.
10673 * configure: Likewise.
10674
689cc2ae
PA
106752012-03-29 Pedro Alves <palves@redhat.com>
10676
10677 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10678 Correct ptrace arguments.
10679
c14dfd32
PA
106802012-03-28 Pedro Alves <palves@redhat.com>
10681
10682 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10683 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10684 (IA64_FR1_REGNUM): New defines.
10685 (ia64_fetch_register): New.
10686 (the_low_target): Install it.
10687 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10688 field.
10689 * linux-low.c (linux_fetch_registers): Try the
10690 the_low_target.fetch_register hook first.
10691
10692 * linux-arm-low.c (the_low_target): Adjust.
10693 * linux-bfin-low.c (the_low_target): Adjust.
10694 * linux-cris-low.c (the_low_target): Adjust.
10695 * linux-crisv32-low.c (the_low_target): Adjust.
10696 * linux-m32r-low.c (the_low_target): Adjust.
10697 * linux-m68k-low.c (the_low_target): Adjust.
10698 * linux-mips-low.c (the_low_target): Adjust.
10699 * linux-ppc-low.c (the_low_target): Adjust.
10700 * linux-s390-low.c (the_low_target): Adjust.
10701 * linux-sh-low.c (the_low_target): Adjust.
10702 * linux-sparc-low.c (the_low_target): Adjust.
10703 * linux-tic6x-low.c (the_low_target): Adjust.
10704 * linux-x86-low.c (the_low_target): Adjust.
10705 * linux-xtensa-low.c (the_low_target): Adjust.
10706
63c88e13
PA
107072012-03-26 Pedro Alves <palves@redhat.com>
10708
10709 * server.c (handle_qxfer_libraries): Don't bail early if
10710 the_target->qxfer_libraries_svr4 is not NULL.
10711
fb723180
PA
107122012-03-26 Pedro Alves <palves@redhat.com>
10713
10714 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10715
0afae3cf
PA
107162012-03-23 Pedro Alves <palves@redhat.com>
10717
10718 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10719 "library-list-svr4" element's start tag when the the DSO list is
10720 empty.
10721
485f1ee4
PA
107222012-03-23 Pedro Alves <palves@redhat.com>
10723
10724 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10725 a variable whose type size is the same as the inferior's pointer
10726 size.
10727
a5362b9a
TS
107282012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10729
10730 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10731 struct siginfo.
10732 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10733 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10734 * linux-low.h: Include <signal.h>.
10735 (struct siginfo): Remove forward declaration.
10736 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10737 struct siginfo.
10738
d226c142
MF
107392012-03-21 Mike Frysinger <vapier@gentoo.org>
10740
10741 * .gitignore: Ignore more files.
10742
122f36ef
PA
107432012-03-19 Pedro Alves <palves@redhat.com>
10744 Jan Kratochvil <jan.kratochvil@redhat.com>
10745
10746 * server.c (cont_thread, general_thread): Add describing comments.
10747 (start_inferior): Clear `cont_thread'.
10748 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10749 of a process.
10750
fc3e5175
YQ
107512012-03-15 Yao Qi <yao@codesourcery.com>
10752
10753 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10754 handling to ...
10755 (cmd_qtdp): ... here.
10756
8d0d92cd
YQ
107572012-03-15 Yao Qi <yao@codesourcery.com>
10758
10759 * tracepoint.c (struct tracepoint_action_ops): New.
10760 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10761 (m_tracepoint_action_download): New.
10762 (r_tracepoint_action_download): New.
10763 (x_tracepoint_action_download): New.
10764 (l_tracepoint_action_download): New.
10765 (add_tracepoint_action): Install `action->ops' according type.
10766 (download_tracepoint_1): Move code `download' function pointer
10767 of various tracepoint_action_ops.
10768
87b0bb13
JK
107692012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10770
10771 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10772 linux_ptrace_attach_warnings.
10773
5f572dec
JK
107742012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10775
10776 * Makefile.in (linux-ptrace.o): New.
10777 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10778 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10779 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10780 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10781 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10782 of these targets.
10783 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10784
f4647387
YQ
107852012-03-08 Yao Qi <yao@codesourcery.com>
10786 Pedro Alves <palves@redhat.com>
10787
10788 Fix PR server/13392.
10789 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10790 offset of JMP insn.
10791 * tracepoint.c (remove_tracepoint): New.
10792 (cmd_qtdp): Call remove_tracepoint when failed to install.
10793
9b224c5e
PA
107942012-03-07 Pedro Alves <palves@redhat.com>
10795
10796 * linux-low.c (get_detach_signal): New.
10797 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10798 Pass on pending signals to PTRACE_DETACH. Check the result of the
10799 ptrace call.
10800 * server.c (program_signals, program_signals_p): New.
10801 (handle_general_set): Handle QProgramSignals.
10802 * server.h (program_signals, program_signals_p): Declare.
10803
e237a7e2
JK
108042012-03-05 Pedro Alves <palves@redhat.com>
10805 Jan Kratochvil <jan.kratochvil@redhat.com>
10806
10807 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10808 New comment why.
10809
5808517f
YQ
108102012-03-03 Yao Qi <yao@codesourcery.com>
10811
10812 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10813 agent_look_up_symbols.
10814
58b4daa5
YQ
108152012-03-03 Yao Qi <yao@codesourcery.com>
10816
10817 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10818 (linux-x86-low.o): Likewise.
10819 * server.h: Remove in_process_agent_loaded.
10820 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10821 common/agent.c.
10822 Update callers.
10823
8ffcbaaf
YQ
108242012-03-03 Yao Qi <yao@codesourcery.com>
10825
10826 * tracepoint.c (gdb_agent_capability): New global.
10827 (in_process_agent_loaded_ust): Renamed to
10828 `in_process_agent_supports_ust'.
10829 Update callers.
10830 (in_process_agent_supports_ust): Call agent_capability_check.
10831 (clear_installed_tracepoints): Assert that agent supports
10832 agent.
10833
d1feda86
YQ
108342012-03-03 Yao Qi <yao@codesourcery.com>
10835
10836 * linux-low.c (linux_supports_agent): New.
10837 (linux_target_ops): Initialize field `supports_agent' with
10838 linux_supports_agent.
10839 * target.h (struct target_ops) <supports_agent>: New.
10840 (target_supports_agent): New macro.
10841 * server.c (handle_general_set): Handle packet 'QAgent'.
10842 (handle_query): Send `QAgent+'.
10843 * Makefile.in (server.o): Depends on agent.h.
10844
2fa291ac
YQ
108452012-03-03 Yao Qi <yao@codesourcery.com>
10846
10847 * Makefile.in (OBS): Add agent.o.
10848 Add new rule for agent.o.
10849 Track dependence of tracepoint.c on agent.h.
10850 * tracepoint.c (run_inferior_command_1):
10851 (run_inferior_command): Call agent_run_command.
10852 (gdb_ust_connect_sync_socket): Deleted. Move it to
10853 common/agent.c.
10854 (resume_thread, stop_thread): Likewise.
10855 (gdb_ust_socket_init): Renamed to ...
10856 (gdb_agent_socket_init): ... New.
10857 (gdb_ust_thread): Renamed to ...
10858 (gdb_agent_helper_thread): ... New.
10859 (gdb_ust_init): Move some code to ...
10860 (gdb_agent_init): ... here. New.
10861 [HAVE_UST]: Call gdb_ust_init.
10862 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10863 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10864 * config.in, configure: Regenerated.
10865
05044653
PA
108662012-03-02 Pedro Alves <palves@redhat.com>
10867
10868 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10869 * linux-low.c (struct simple_pid_list): New.
10870 (stopped_pids): New a struct simple_pid_list pointer.
10871 (add_to_pid_list, pull_pid_from_list): New.
10872 (handle_extended_wait): Don't assume the first signal new children
10873 report is SIGSTOP. Adjust call to pull_pid_from_list.
10874 (linux_wait_for_lwp): Adjust.
10875
8d00225b
YQ
108762012-03-02 Yao Qi <yao@codesourcery.com>
10877
10878 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10879 debug log.
10880
19560ba5
YQ
108812012-03-02 Yao Qi <yao@codesourcery.com>
10882
10883 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10884 `stop_pc' and `tpoint'. Update caller.
10885
1faeff08
MR
108862012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10887
10888 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10889 * linux-low.c (use_linux_regsets): New macro.
10890 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10891 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10892 (linux_register_in_regsets): New function.
10893 (usr_fetch_inferior_registers): Skip registers covered by
10894 regsets.
10895 (usr_store_inferior_registers): Likewise.
10896 (usr_fetch_inferior_registers): New macro.
10897 (usr_store_inferior_registers): Likewise.
10898 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10899 (linux_store_registers): Likewise.
10900 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10901 prototype.
10902 (init_registers_mips64_dsp_linux): Likewise.
10903 (init_registers_mips_linux): New macro.
10904 (init_registers_mips_dsp_linux): Likewise.
10905 (mips_dsp_num_regs): Likewise.
10906 (DSP_BASE, DSP_CONTROL): New fallback macros.
10907 (mips_base_regs): New macro.
10908 (mips_regmap): Use it. Fix the size.
10909 (mips_dsp_regmap): New variable.
10910 (mips_dsp_regset_bitmap): Likewise.
10911 (mips_arch_setup): New function.
10912 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10913 than mips_regmap.
10914 (mips_cannot_store_register): Likewise.
10915 (the_low_target): Update .arch_setup, .num_regs and .regmap
10916 initializers. Add .regset_bitmap initializer.
10917 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10918 initializer.
10919 * linux-bfin-low.c (the_low_target): Likewise.
10920 * linux-cris-low.c (the_low_target): Likewise.
10921 * linux-crisv32-low.c (the_low_target): Likewise.
10922 * linux-ia64-low.c (the_low_target): Likewise.
10923 * linux-m32r-low.c (the_low_target): Likewise.
10924 * linux-m68k-low.c (the_low_target): Likewise.
10925 * linux-ppc-low.c (the_low_target): Likewise.
10926 * linux-s390-low.c (the_low_target): Likewise.
10927 * linux-sh-low.c (the_low_target): Likewise.
10928 * linux-sparc-low.c (the_low_target): Likewise.
10929 * linux-tic6x-low.c (the_low_target): Likewise.
10930 * linux-x86-low.c (the_low_target): Likewise.
10931 * linux-xtensa-low.c (the_low_target): Likewise.
10932 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10933 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10934 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10935 srv_xmlfiles.
10936 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10937 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10938
c03e6ccc
YQ
109392012-02-29 Yao Qi <yao@codesourcery.com>
10940 Pedro Alves <palves@redhat.com>
10941
10942 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10943 `step_over_finished' is true.
10944
644cebc9
PA
109452012-02-27 Pedro Alves <palves@redhat.com>
10946
10947 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10948 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10949
c14d7ab2
PA
109502012-02-27 Pedro Alves <palves@redhat.com>
10951
10952 PR server/9684
10953 * linux-low.c (pid_is_stopped): New.
10954 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10955
412c89dd
LM
109562012-02-25 Luis Machado <lgustavo@codesourcery.com>
10957
10958 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10959 of conditions.
10960
b745defe
MR
109612012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10962
10963 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10964
9f3a5c85
LM
109652012-02-24 Luis Machado <lgustavo@codesourcery>
10966
10967 * server.c (handle_query): Advertise support for target-side
10968 breakpoint condition evaluation.
10969 (process_point_options): New function.
10970 (process_serial_event): When inserting a breakpoint, check for
10971 a target-side condition that should be evaluated.
10972
10973 * mem-break.c: Include regcache.h and ax.h.
10974 (point_cond_list_t): New data structure.
10975 (breakpoint) <cond_list>: New field.
10976 (find_gdb_breakpoint_at): Make non-static.
10977 (delete_gdb_breakpoint_at): Clear any target-side
10978 conditions.
10979 (clear_gdb_breakpoint_conditions): New function.
10980 (add_condition_to_breakpoint): Likewise.
10981 (add_breakpoint_condition): Likewise.
10982 (gdb_condition_true_at_breakpoint): Likewise.
10983 (gdb_breakpoint_here): Return result directly instead
10984 of going through a local variable.
10985
10986 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10987 (clear_gdb_breakpoint_conditions): Likewise.
10988 (add_breakpoint_condition): Likewise.
10989 (gdb_condition_true_at_breakpoint): Likewise.
10990
10991 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10992 (need_step_over_p): Take target-side breakpoint condition into
10993 consideration.
10994
5e1dc496
LM
109952012-02-24 Luis Machado <lgustavo@codesourcery>
10996
10997 * server.h: Include tracepoint.h.
10998 (agent_mem_read, agent_get_trace_state_variable_value,
10999 agent_set_trace_state_variable_value,
11000 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11001 get_set_tsv_func_addr): New prototypes.
11002
11003 * ax.h: New include file.
11004 * ax.c: New source file.
11005
11006 * tracepoint.c: Include ax.h.
11007 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11008 agent_expr, eval_result_type): Move to ax.h.
11009 (parse_agent_expr): Rename to ...
11010 (gdb_parse_agent_expr): ... this, make it non-static and move
11011 to ax.h.
11012 (unparse_agent_expr) Rename to ...
11013 (gdb_unparse_agent_expr): ... this, make it non-static and move
11014 to ax.h.
11015 (eval_agent_expr): Rename to ...
11016 (eval_tracepoint_agent_expr): ... this.
11017 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11018 forward declarations.
11019 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11020 (agent_get_trace_state_variable_value): New function.
11021 (agent_set_trace_state_variable_value): New function.
11022 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11023 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11024 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11025 (condition_true_at_tracepoint): Likewise.
11026 (parse_agent_expr): Rename to ...
11027 (gdb_parse_agent_expr): ... this and move to ax.c.
11028 (unparse_agent_expr): Rename to ...
11029 (gdb_unparse_agent_expr): ... this and move to ax.c.
11030 (gdb_agent_op_name): Move to ax.c.
11031 (eval_agent_expr): Rename to ...
11032 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11033 and move to ax.c.
11034 (eval_tracepoint_agent_expr): New function.
11035 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11036 non-static.
5e1dc496
LM
11037 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11038 ax.c.
11039 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11040 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11041 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11042 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11043 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11044 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11045 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11046 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11047 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11048 (compile_bytecodes): Remove forward declaration.
11049 (is_goto_target): Move to ax.c.
11050 (compile_bytecodes): Move to ax.c and call
11051 agent_get_trace_state_variable_value (...) and
11052 agent_set_trace_state_variable_value (...).
11053
11054 * Makefile.in: Update ax.c and IPA dependencies.
11055
277e4e52
PA
110562012-02-24 Pedro Alves <palves@redhat.com>
11057
11058 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11059 (cmd_bigqtbuffer_circular): ... this. Only handle
11060 'QTBuffer:circular:'.
11061 (handle_tracepoint_general_set): Adjust.
11062
bf4c19f7
YQ
110632012-02-16 Yao Qi <yao@codesourcery.com>
11064
11065 * inferiors.c: Move code to ...
11066 * dll.c: .... here. New.
11067 * server.h: Declare clear_dlls.
11068 * Makefile.in (SFILES): Add dll.c.
11069 (OBS): Add dll.o
11070 (dll.o): New rule.
11071
d73f2619
YQ
110722012-02-11 Yao Qi <yao@codesourcery.com>
11073
11074 * server.c: (handle_monitor_command): Add a new parameter
11075 `own_buf'.
11076 (handle_query): Update caller.
11077
f8255c2a
JB
110782012-02-09 Joel Brobecker <brobecker@adacore.com>
11079
11080 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11081 * configure, config.in: Regenerate.
11082 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11083 is not defined.
11084
da84f473
PA
110852012-02-02 Pedro Alves <palves@redhat.com>
11086
11087 Try SIGKILL first, then PTRACE_KILL.
11088 * linux-low.c (linux_kill_one_lwp): New.
11089 (linux_kill_one_lwp): Rename to ...
11090 (kill_one_lwp_callback): ... this. Use the new
11091 linux_kill_one_lwp.
11092
e886a173
PA
110932012-02-02 Pedro Alves <palves@redhat.com>
11094
11095 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11096 inferior.
11097
be07f1a2
PA
110982012-01-27 Pedro Alves <palves@redhat.com>
11099
11100 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11101 (elf_64_file_p): Make static.
11102 (linux_pid_exe_is_elf_64_file): New.
11103 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11104 Delete declarations.
11105 (linux_pid_exe_is_elf_64_file): Declare.
11106 * linux-x86-low.c (x86_arch_setup): Use
11107 linux_pid_exe_is_elf_64_file.
11108
d8301ad1
JK
111092012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11110
11111 * linux-low.c (linux_wait_for_event_1): Rename to ...
11112 (linux_wait_for_event): ... here and merge it with former
11113 linux_wait_for_event - new variable wait_ptid, use it.
11114 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11115
01b17894
PA
111162012-01-23 Pedro Alves <palves@redhat.com>
11117
11118 * server.c (main): Avoid yet another case of infinite loop while
11119 detaching/killing after a longjmp.
11120
e825046f
JK
111212012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11122
11123 Code cleanup.
11124 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11125
b9e7b9c3
UW
111262012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11127
11128 * hostio.c (handle_readlink): New function.
11129 (handle_vFile): Call it to handle "vFile:readlink" packets.
11130
901f9912
UW
111312012-01-20 Pedro Alves <palves@redhat.com>
11132 Ulrich Weigand <ulrich.weigand@linaro.org>
11133
11134 * server.c (handle_v_requests): Only support vAttach and vRun to
11135 start multiple processes when in extended protocol mode.
11136
fc1ab1a0
PA
111372012-01-17 Pedro Alves <palves@redhat.com>
11138
11139 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11140 memalign plus mprotect to allocate the scratch buffer.
11141
7d5d4e98
PA
111422012-01-13 Pedro Alves <palves@redhat.com>
11143
11144 * server.c (attach_inferior): Clear `cont_thread'.
11145
f128d5e9
PA
111462012-01-13 Pedro Alves <palves@redhat.com>
11147
11148 * server.c (main): Avoid infinite loop while detaching/killing
11149 after a longjmp.
11150
06db92f0
DE
111512012-01-09 Doug Evans <dje@google.com>
11152
11153 * server.c (start_inferior): Set last_ptid in --wrapper case.
11154
32d92999
YQ
111552012-01-06 Yao Qi <yao@codesourcery.com>
11156
11157 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11158 defined.
11159 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11160
5e0a92a9
YQ
111612012-01-04 Yao Qi <yao@codesourcery.com>
11162
11163 * tracepoint.c (cmd_qtdp): Print debug message
11164 for static tracepoint.
11165
ae639e8c
YQ
111662012-01-04 Yao Qi <yao@codesourcery.com>
11167
11168 * tracepoint.c (trace_vdebug): Differentiate debug message
11169 between gdbserver and IPA.
11170
f72429c5
YQ
111712012-01-03 Yao Qi <yao@codesourcery.com>
11172
11173 * tracepoint.c (tracepoint_was_hit): Don't collect for
11174 static tracepoint.
11175
12c3e59c
JB
111762012-01-02 Joel Brobecker <brobecker@adacore.com>
11177
11178 * terminal.h: Reformat copyright header.
11179
67827812
JB
111802012-01-02 Joel Brobecker <brobecker@adacore.com>
11181
11182 * server.c (gdbserver_version): Update copyright year.
11183 * gdbreplay.c (gdbreplay_version): Likewise.
11184
3e52c33d
JK
111852011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11186
11187 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11188
11189 Revert:
11190 2011-12-18 Hui Zhu <teawater@gmail.com>
11191 * linux-low.c (linux_create_inferior): Save return value to ret.
11192
66f1260e
HZ
111932011-12-18 Hui Zhu <teawater@gmail.com>
11194
11195 * linux-low.c (linux_create_inferior): Save return value to ret.
11196
e77616d7
DE
111972011-12-16 Doug Evans <dje@google.com>
11198
e7b06c57
DE
11199 * linux-low.c (linux_create_inferior): If stdio connection,
11200 redirect stdin from /dev/null, stdout to stderr.
11201 * remote-utils.c (remote_is_stdio): New static global.
11202 (remote_connection_is_stdio): New function.
11203 (remote_prepare): Handle stdio connection.
11204 (remote_open): Ditto.
11205 (remote_close): Don't close stdin for stdio connections.
11206 (read_prim,write_prim): New functions. Replace all calls to
11207 read/write to these.
11208 * server.c (main): Watch for "-" argument. Move call to
11209 remote_prepare before start_inferior.
11210 * server.h (STDIO_CONNECTION_NAME): New macro.
11211 (remote_connection_is_stdio): Declare.
11212
e77616d7
DE
11213 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11214 in debugging output.
11215
82067193
YQ
112162011-12-15 Yao Qi <yao@codesourcery.com>
11217
11218 * tracepoint.c: Include sys/syscall.h.
11219 (gdb_ust_thread): Remove preprocessor conditional.
11220
82bfbe7e
PA
112212011-12-14 Pedro Alves <pedro@codesourcery.com>
11222
11223 * linux-low.c (linux_detach_one_lwp): Call
11224 the_low_target.prepare_to_resume before detaching.
11225
712c6575
YQ
112262011-12-14 Yao Qi <yao@codesourcery.com>
11227
11228 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11229 of write.
11230
d54d1edf
YQ
112312011-12-14 Yao Qi <yao@codesourcery.com>
11232
11233 * i386-low.c (i386_low_stopped_data_address): Initialize local
11234 variable `control'.
11235
6210a125
PA
112362011-12-13 Pedro Alves <pedro@codesourcery.com>
11237
11238 PR remote/13492
11239
11240 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11241 DR_CONTROL unless necessary. Extend comments.
11242 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11243 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11244
2ece8244
YQ
112452011-12-13 Yao Qi <yao@codesourcery.com>
11246
11247 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11248 macros.
11249 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11250
784867a5
JK
112512011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11252
11253 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11254 Print new debug message for such case.
11255
6bf36717
JK
112562011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11257
11258 Fix overlapping memcpy.
11259 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11260 the read_inferior_memory transfer.
11261 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11262 write_inferior_memory transfer.
11263 (set_fast_tracepoint_jump): New variable buf. Use it for the
11264 read_inferior_memory and write_inferior_memory transfers.
11265 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11266 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11267 Use it for the write_inferior_memory transfer.
11268 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11269 buffers.
11270
50275556
MR
112712011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11272
11273 * linux-low.c (fetch_register, store_register): Make code
11274 consistent, fix formatting.
11275
7325beb4
MR
112762011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11277
11278 * linux-low.c (usr_store_inferior_registers): Factor out code
11279 to handle individual registers into...
11280 (store_register): ... this new function.
11281
c642a434
UW
112822011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11283
11284 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11285 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11286 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11287 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11288 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11289 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11290 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11291 (srv_xmlfiles): Add new XML files.
11292
11293 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11294 and <sys/uio.h>.
11295 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11296 (init_registers_s390_linux32v1): Add prototype.
11297 (init_registers_s390_linux32v2): Likewise.
11298 (init_registers_s390_linux64v1): Likewise.
11299 (init_registers_s390_linux64v2): Likewise.
11300 (init_registers_s390x_linux64v1): Likewise.
11301 (init_registers_s390x_linux64v2): Likewise.
11302 (s390_num_regs): Increment to 52.
11303 (s390_regmap): Add orig_r2 register.
11304 (s390_num_regs_3264): Increment to 68.
11305 (s390_regmap_3264): Add orig_r2 register.
11306 (s390_collect_ptrace_register): Handle orig_r2 register.
11307 (s390_supply_ptrace_register): Likewise.
11308 (s390_fill_last_break): New function.
11309 (s390_store_last_break): Likewise.
11310 (s390_fill_system_call): New function.
11311 (s390_store_system_call): Likewise.
11312 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11313 register sets.
11314 (s390_check_regset): New function.
11315 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11316 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11317 Update target_regsets for available register sets.
11318
2268b414
JK
113192011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11320 Jan Kratochvil <jan.kratochvil@redhat.com>
11321
11322 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11323 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11324 New.
11325 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11326 * linux-low.h (struct process_info_private): New member r_debug.
11327 * server.c (handle_qxfer_libraries): Call
11328 the_target->qxfer_libraries_svr4.
11329 (handle_qxfer_libraries_svr4): New function.
11330 (qxfer_packets): New entry "libraries-svr4".
11331 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11332 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11333 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11334 PACKET_qXfer_libraries_svr4.
11335
d6db1fab
UW
113362011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11337
11338 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11339 PSW address/mask between 8-byte and 16-byte formats.
11340 (s390_supply_ptrace_register): Likewise.
11341 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11342 basic addressing mode bit.
11343
242f5f1c
SS
113442011-11-24 Stan Shebs <stan@codesourcery.com>
11345
11346 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11347
f196051f
SS
113482011-11-17 Stan Shebs <stan@codesourcery.com>
11349
11350 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11351 (tracing_start_time): New global.
11352 (tracing_stop_time): New global.
11353 (tracing_user_name): New global.
11354 (tracing_notes): New global.
11355 (tracing_stop_note): New global.
11356 (cmd_qtstart): Set traceframe_usage, start_time.
11357 (stop_tracing): Set stop_time.
11358 (cmd_qtstatus): Report additional status.
11359 (cmd_qtp): New function.
11360 (handle_tracepoint_query): Call it.
11361 (cmd_qtnotes): New function.
11362 (handle_tracepoint_general_set): Call it.
11363 (get_timestamp): Rename from tsv_get_timestamp.
11364
405f8e94
SS
113652011-11-14 Stan Shebs <stan@codesourcery.com>
11366 Kwok Cheung Yeung <kcy@codesourcery.com>
11367
11368 * linux-x86-low.c (small_jump_insn): New.
11369 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11370 trampoline and error message, build a trampoline and issue a small
11371 jump instruction to it.
11372 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11373 trampoline and error message.
11374 (x86_get_min_fast_tracepoint_insn_len): New.
11375 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11376 * linux-low.h (struct linux_target_ops): Add arguments to
11377 install_fast_tracepoint_jump_pad operation, add new operation.
11378 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11379 arguments.
11380 (linux_get_min_fast_tracepoint_insn_len): New function.
11381 (linux_target_op): Add new operation.
11382 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11383 (gdb_trampoline_buffer_end): Ditto.
11384 (gdb_trampoline_buffer_error): Ditto.
11385 (struct ipa_sym_addresses): Add fields for new IPA variables.
11386 (symbol_list): Add entries for new IPA variables.
11387 (struct tracepoint): Add fields to hold the address range of the
11388 trampoline used by the tracepoint.
11389 (trampoline_buffer_head): New static variable.
11390 (trampoline_buffer_tail): Ditto.
11391 (claim_trampoline_space): New function.
11392 (have_fast_tracepoint_trampoline_buffer): New function.
11393 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11394 structure.
11395 (install_fast_tracepoint): Ditto, also add error buffer argument.
11396 (cmd_qtminftpilen): New function.
11397 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11398 (fast_tracepoint_from_trampoline_address): New function.
11399 (fast_tracepoint_collecting): Handle trampoline as part of jump
11400 pad space.
11401 (set_trampoline_buffer_space): New function.
11402 (initialize_tracepoint): Initialize new IPA variables.
11403 * target.h (struct target_ops): Add arguments to
11404 install_fast_tracepoint_jump_pad operation, add new
11405 get_min_fast_tracepoint_insn_len operation.
11406 (target_get_min_fast_tracepoint_insn_len): New.
11407 (install_fast_tracepoint_jump_pad): Add arguments.
11408 * server.h (IPA_BUFSIZ): Define.
11409 * linux-i386-ipa.c: Include extra header files.
11410 (initialize_fast_tracepoint_trampoline_buffer): New function.
11411 (initialize_low_tracepoint): Call it.
11412 * server.h (set_trampoline_buffer_space): Declare.
11413 (claim_trampoline_space): Ditto.
11414 (have_fast_tracepoint_trampoline_buffer): Ditto.
11415
1e4d1764
YQ
114162011-11-14 Yao Qi <yao@codesourcery.com>
11417
11418 * server.c (handle_query): Handle InstallInTrace for qSupported.
11419 * tracepoint.c (add_tracepoint): Sort list.
11420 (install_tracepoint, download_tracepoint): New.
11421 (cmd_qtdp): Call them to install and download tracepoints.
11422 (sort_tracepoints): Removed.
11423 (cmd_qtstart): Update.
11424
5c73ff4e
YQ
114252011-11-14 Yao Qi <yao@codesourcery.com>
11426
11427 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11428 * mem-break.h: Declare.
11429 * tracepoint.c (cmd_qtstart): Move some code to ...
11430 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11431 New.
11432 (download_tracepoints): Move some code to ...
11433 (download_tracepoint_1): ... here. New.
11434
86a30030
YQ
114352011-11-08 Yao Qi <yao@codesourcery.com>
11436
11437 * remote-utils.c (relocate_instruction): A comment fix.
11438
8d26e50c
JB
114392011-11-07 Joel Brobecker <brobecker@adacore.com>
11440
11441 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11442 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11443 dr_status_mirror and dr_control_mirror from debug_reg_state.
11444 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11445 (i386_initial_stuff): Remove use of deleted globals.
11446 (i386_get_thread_context, i386_set_thread_context,
11447 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11448 from debug_reg_state.
11449
a59306a3
YQ
114502011-11-05 Yao Qi <yao@codesourcery.com>
11451
11452 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11453 address as TPOINT's.
11454
3065dfb6
SS
114552011-11-02 Stan Shebs <stan@codesourcery.com>
11456
11457 * tracepoint.c (agent_mem_read_string): New function.
11458 (eval_agent_expr): Call it for tracenz.
11459 * server.c (handle_query): Report support for tracenz.
11460
fd0d8c7c
YQ
114612011-11-02 Yao Qi <yao@codesourcery.com>
11462
11463 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11464
609086b1
YQ
114652011-11-02 Yao Qi <yao@codesourcery.com>
11466
11467 * target.h: Fix a typo in comment.
11468
b9fd1791
PA
114692011-10-31 Pedro Alves <pedro@codesourcery.com>
11470
11471 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11472 clobber the breakpoints' shadows with fast tracepoint jumps.
11473 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11474 * target.c (write_inferior_memory): Also pass MYADDR down to
11475 check_mem_write.
11476
03583c20
UW
114772011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11478
11479 * configure.ac: Check support for personality routine.
11480 * configure: Regenerate.
11481 * config.in: Likewise.
11482 * linux-low.c: Include <sys/personality.h>.
11483 Define ADDR_NO_RANDOMIZE if necessary.
11484 (linux_create_inferior): Disable address space randomization when
11485 forking inferior, if requested.
11486 (linux_supports_disable_randomization): New function.
11487 (linux_target_ops): Install it.
11488 * server.h (disable_randomization): Declare.
11489 * server.c (disable_randomization): New global variable.
11490 (handle_general_set): Handle QDisableRandomization.
11491 (handle_query): Likewise for qSupported.
11492 (main): Support --disable-randomization and --no-disable-randomization
11493 command line arguments.
11494 * target.h (struct target_ops): Add supports_disable_randomization.
11495 (target_supports_disable_randomization): New macro.
11496
723b724b
MF
114972011-09-29 Mike Frysinger <vapier@gentoo.org>
11498
11499 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11500 ifdef check.
11501 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11502 [!PT_GETDSBT] (target_loadmap): New definition.
11503 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11504 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11505 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11506 and PT_GETDSBT to LINUX_LOADMAP.
11507 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11508 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11509
55329a5c 115102011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11511
11512 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11513 (arm_linux_hwbp_cap): New static variable.
11514 (arm_linux_get_hwbp_cap): Replace by ...
11515 (arm_linux_init_hwbp_cap): ... this new function.
11516 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11517 (arm_linux_get_hw_watchpoint_count): Likewise.
11518 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11519 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11520 (arm_prepare_to_resume): Use perror_with_name instead of error.
11521
55329a5c 115222011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11523
11524 * linux-arm-low.c: Include <signal.h>.
11525 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11526 (struct arm_linux_hwbp_cap): New data type.
11527 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11528 (struct arm_linux_hw_breakpoint): New data type.
11529 (MAX_BPTS, MAX_WPTS): Define.
11530 (struct arch_process_info, struct arch_lwp_info): New data types.
11531 (arm_linux_get_hwbp_cap): New function.
11532 (arm_linux_get_hw_breakpoint_count): Likewise.
11533 (arm_linux_get_hw_watchpoint_count): Likewise.
11534 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11535 (arm_hwbp_control_initialize): Likewise.
11536 (arm_hwbp_control_is_enabled): Likewise.
11537 (arm_hwbp_control_is_initialized): Likewise.
11538 (arm_hwbp_control_disable): Likewise.
11539 (arm_linux_hw_breakpoint_equal): Likewise.
11540 (arm_linux_hw_point_initialize): Likewise.
11541 (struct update_registers_data): New data structure.
11542 (update_registers_callback: New function.
11543 (arm_insert_point): Likewise.
11544 (arm_remove_point): Likewise.
11545 (arm_stopped_by_watchpoint): Likewise.
11546 (arm_stopped_data_address): Likewise.
11547 (arm_new_process): Likewise.
11548 (arm_new_thread): Likewise.
11549 (arm_prepare_to_resume): Likewise.
11550 (the_low_target): Register arm_insert_point, arm_remove_point,
11551 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11552 arm_new_thread, and arm_prepare_to_resume.
11553
6b9801d4
SS
115542011-09-15 Stan Shebs <stan@codesourcery.com>
11555
11556 * server.h (struct emit_ops): Add compare-goto fields.
11557 * tracepoint.c (gdb_agent_op_sizes): New table.
11558 (emit_eq_goto): New function.
11559 (emit_ne_goto): New function.
11560 (emit_lt_goto): New function.
11561 (emit_le_goto): New function.
11562 (emit_gt_goto): New function.
11563 (emit_ge_goto): New function.
11564 (is_goto_target): New function.
11565 (compile_bytecodes): Recognize special cases of compare-goto
11566 combinations and call specialized emitters for them.
11567 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11568 (amd64_emit_ne_goto): New function.
11569 (amd64_emit_lt_goto): New function.
11570 (amd64_emit_le_goto): New function.
11571 (amd64_emit_gt_goto): New function.
11572 (amd64_emit_ge_goto): New function.
11573 (amd64_emit_ops): Add the new functions.
11574 (i386_emit_eq_goto): New function.
11575 (i386_emit_ne_goto): New function.
11576 (i386_emit_lt_goto): New function.
11577 (i386_emit_le_goto): New function.
11578 (i386_emit_gt_goto): New function.
11579 (i386_emit_ge_goto): New function.
11580 (i386_emit_ops): Add the new functions.
11581
bf15cbda
SS
115822011-09-08 Stan Shebs <stan@codesourcery.com>
11583
11584 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11585 (i386_emit_epilogue): Restore %ebx.
11586
943ca1dd
JZ
115872011-08-31 Jie Zhang <jzhang918@gmail.com>
11588
11589 * server.c (step_thread): Remove definition.
11590 (process_serial_event): Don't handle Hs.
11591 * server.h (step_thread): Remove declaration.
11592 * target.c (set_desired_inferior): Remove use of step_thread.
11593
e3deef73
LM
115942011-08-24 Luis Machado <lgustavo@codesourcery.com>
11595
11596 * linux-low.c: Include linux-procfs.h.
11597 (linux_attach_lwp_1): Update comments.
11598 (linux_attach): Scan for existing threads when attaching to a
11599 process that is the tgid.
11600 * Makefile.in: Update dependencies.
11601
13da1c97
LM
116022011-08-24 Luis Machado <lgustavo@codesourcery.com>
11603
11604 * configure.srv: Add linux-procfs.o dependencies.
11605
881127c9
YQ
116062011-08-14 Yao Qi <yao@codesourcery.com>
11607
11608 * target.h (struct target_ops): Fix indent.
11609 * win32-low.c (win32_target_ops): Fix comment.
11610
58dbd541
YQ
116112011-08-14 Andrew Jenner <andrew@codesourcery.com>
11612 Yao Qi <yao@codesourcery.com>
11613
11614 * Makefile.in (clean): Remove tic6x-*.c files.
11615 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11616 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11617 (tic6x-c64xp-linux.c): Likewise.
11618 * configure.srv: Add support for tic6x-*-uclinux.
11619 * linux-tic6x-low.c: New.
11620 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11621
78d85199
YQ
116222011-08-14 Andrew Stubbs <ams@codesourcery.com>
11623 Yao Qi <yao@codesourcery.com>
11624
11625 * target.h (struct target_ops): Add read_loadmap.
11626 * linux-low.c (struct target_loadseg): New type.
11627 (struct target_loadmap): New type.
11628 (linux_read_loadmap): New function.
11629 (linux_target_ops): Add linux_read_loadmap.
11630 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11631 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11632 to NULL.
78d85199 11633
a959a88d
EZ
116342011-08-05 Eli Zaretskii <eliz@gnu.org>
11635
11636 * win32-low.c: Include <stdint.h>.
11637
1ced966e
PA
116382011-07-22 Pedro Alves <pedro@codesourcery.com>
11639
11640 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11641 to the inferior here.
11642 (i386_remove_aligned_watchpoint): Ditto.
11643 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11644 fit part of the watchpoint in the debug registers.
11645 (i386_update_inferior_debug_regs): New.
11646 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11647 registers, and only update the inferior on success.
11648 (i386_low_remove_watchpoint): Ditto.
11649
d26e3629
KY
116502011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11651
11652 * linux-low.c (compare_ints, unique, list_threads, show_process,
11653 linux_core_of_thread): Delete.
11654 (linux_target_ops): Change linux_core_of_thread to
11655 linux_common_core_of_thread.
11656 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11657 * utils.c (malloc_failure): Change type of argument.
11658 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11659 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11660 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11661 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11662 (IPA_OBJS): Add common-utils-ipa.o.
11663 (ptid_h, linux_osdata_h): New macros.
11664 (server_h): Add common/common-utils.h, common/xml-utils.h,
11665 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11666 common/ptid.h.
11667 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11668 ptid.o, buffer.o): New rules.
11669 (linux-low.o): Add common/linux-osdata.h as a dependency.
11670 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11671 * configure.ac: Add AC_HEADER_DIRENT check.
11672 * config.in: Regenerate.
11673 * configure: Regenerate.
11674 * remote-utils.c (xml_escape_text): Delete.
11675 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11676 buffer_xml_printf): Move to common/buffer.c.
11677 * server.c (main): Remove call to initialize_inferiors.
11678 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11679 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11680 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11681 internal_error, gdb_assert, gdb_assert_fail): Delete.
11682 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11683 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11684 common/buffer.h.
11685 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11686 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11687 initialize_inferiors): Delete.
11688
2275a1a7
PA
116892011-07-20 Pedro Alves <pedro@codesourcery.com>
11690
11691 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11692 symbol error.
11693
0a5b1e09
PA
116942011-05-31 Pedro Alves <pedro@codesourcery.com>
11695
11696 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11697 assertion.
11698 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11699
6938fd34
YQ
117002011-05-26 Yao Qi <yao@codesourcery.com>
11701
11702 * Makefile.in (thread-db.o): Track dependence to
11703 common/gdb_thread_db.h.
11704 * thread-db.c: include gdb_thread_db.h from right place.
11705
b481f9e0
TT
117062011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11707
11708 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11709 __FILE__ and __LINE__ to internal_error.
11710
98a5dd13
DE
117112011-05-13 Doug Evans <dje@google.com>
11712
11713 * thread-db.c (try_thread_db_load_from_sdir): New function.
11714 (try_thread_db_load_from_dir): New function.
11715 (thread_db_load_search): Handle $sdir, ignore $pdir.
11716 Remove trying of system directories if search of
11717 libthread-db-search-path fails, that is now done via $sdir.
11718
d248b706
KY
117192011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11720
11721 * server.c (handle_query): Add EnableDisableTracepoints to the list
11722 of supported features.
43aaf8b6 11723 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11724 tracepoints.
43aaf8b6
PA
11725 (cmd_qtenable_disable): New.
11726 (cmd_qtstart): Install tracepoints even if disabled.
11727 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11728 receiving a QTEnable or QTDisable packet.
11729 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11730 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11731 tracepoints.
11732 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11733
84e578fb
DE
117342011-05-10 Doug Evans <dje@google.com>
11735
11736 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11737
71f55dd8
DE
117382011-05-04 Doug Evans <dje@google.com>
11739
11740 * linux-low.c (linux_join): Skip process lookup.
11741 * spu-low.c (spu_join): Ditto.
11742 * server.c (join_inferiors_callback): Delete.
11743 (process_serial_event): For 'D' packet (detach) call join_inferior
11744 directly.
11745
4d393d60
JM
117462011-05-04 Joseph Myers <joseph@codesourcery.com>
11747
11748 * README: Don't mention xscale*-*-linux*.
11749 * configure.srv (xscale*-*-linux*): Don't handle target.
11750
b00ad6ff
NF
117512011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11752
11753 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11754 casting pointers.
11755 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11756 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11757 (i386_emit_void_call_2): Likewise.
11758
af96c192
YQ
117592011-04-26 Yao Qi <yao@codesourcery.com>
11760
43aaf8b6
PA
11761 * linux-low.c: Move common macros to linux-ptrace.h.
11762 Include linux-ptrace.h.
af96c192
YQ
11763 * Makefile.in (linux_ptrace_h): New.
11764 (linux-low.o): Depends on linux-ptrace.h.
11765
03f2bd59
JK
117662011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11767
11768 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11769 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11770 (remote_prepare): New function with most of the TCP code from ...
11771 (remote_open): ... here. Detect PORT here unconditionally. Move also
11772 setting transport_is_reliable.
11773 * server.c (run_once): New variable.
11774 (gdbserver_usage): Document it.
11775 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11776 the first run if RUN_ONCE.
11777 * server.h (run_once, remote_prepare): New declarations.
11778
7a9dd1b2
TT
117792011-04-19 Tom Tromey <tromey@redhat.com>
11780
11781 * win32-low.c (handle_load_dll): Remove duplicate "the".
11782
81239425
PM
117832011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11784
11785 Remove support for old Cygwin 1.5 versions.
11786 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11787 function to avoid warning.
11788 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11789 warning.
11790
9e0627f1
PM
117912011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11792
11793 * gdbserver/server.h (Macro _): Define it if not available.
11794
588eebee
MS
117952011-03-14 Michael Snyder <msnyder@vmware.com>
11796
348af9f7 11797 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11798
43f70d4c
JB
117992011-03-10 Joel Brobecker <brobecker@adacore.com>
11800
11801 * Makefile.in (maintainer-clean realclean distclean): Remove
11802 "make ... subdir_do" command.
11803
348af9f7
MS
118042011-03-10 Michael Snyder <msnyder@vmware.com>
11805
11806 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11807
11808 * server.c (handle_v_run): Free alloced buffer on early return.
11809
e637a4f5
YQ
118102011-03-09 Yao Qi <yao@codesourcery.com>
11811
11812 Revert:
11813 2011-03-04 Yao Qi <yao@codesourcery.com>
11814
11815 * Makefile.in: Remove GNU make feature --directory.
11816
11817 2011-03-05 Yao Qi <yao@codesourcery.com>
11818
11819 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11820 (subdir_do): New make target. Copied from gdb/Makefile.
11821 (maintainer-clean, realclean, distclean, clean): Call corresponding
11822 make targets in common/Makefile.
11823
11824 2011-02-11 Yao Qi <yao@codesourcery.com>
11825
11826 * configure.ac: Call AC_PROG_RANLIB.
11827 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11828 * configure: Regenerate.
11829
e6edda56
JK
118302011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11831
11832 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11833
e5141119
JB
118342011-03-06 Yao Qi <yao@codesourcery.com>
11835
11836 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11837
64794aa4
JB
118382011-03-05 Yao Qi <yao@codesourcery.com>
11839
11840 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11841 (subdir_do): New make target. Copied from gdb/Makefile.
11842 (maintainer-clean, realclean, distclean, clean): Call corresponding
11843 make targets in common/Makefile.
11844
7a762829
YQ
118452011-03-04 Yao Qi <yao@codesourcery.com>
11846
11847 * Makefile.in: Remove GNU make feature --directory.
11848
348af9f7
MS
118492011-03-04 Michael Snyder <msnyder@vmware.com>
11850
11851 * server.c (queue_stop_reply): Call xmalloc not malloc.
11852
118532011-03-02 Michael Snyder <msnyder@vmware.com>
11854
11855 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11856
9f72fee2
MS
118572011-02-28 Michael Snyder <msnyder@vmware.com>
11858
588eebee
MS
11859 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11860 (cmd_qtframe): Ditto.
11861 (cmd_qtbuffer): Ditto.
11862 (cmd_bigqtbuffer): Ditto.
11863
9f72fee2
MS
11864 * utils.c (decimal2str): Initialize 'width' to nine, then
11865 don't mess with it.
11866
8040bd49
UW
118672011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11868
11869 * hostio.c (require_data): Free *data, not data.
11870
7e52cbd0
JK
118712011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11872
11873 * hostio.c (require_data): Use free, not xfree.
11874
9130f83e
MS
118752011-02-27 Michael Snyder <msnyder@vmware.com>
11876
4b812f4e
MS
11877 * server.c (handle_query): Discard unused value.
11878
9130f83e
MS
11879 * hostio.c (require_data): Free malloc memory before returning
11880 error.
11881
69d37113
MS
118822011-02-26 Michael Snyder <msnyder@vmware.com>
11883
11884 * linux-low.c (list_threads): Call closedir for dirent.
11885
35f5825a
MS
118862011-02-27 Michael Snyder <msnyder@vmware.com>
11887
2a589cef
MS
11888 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11889 a case statement falls through.
11890
0adea5f7
MS
11891 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11892
35f5825a
MS
11893 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11894 in comparison.
11895
238f1c74
MS
118962011-02-26 Michael Snyder <msnyder@vmware.com>
11897
11898 * utils.c (decimal2str): Eliminate dead code and dead param.
11899 (pulongest): Drop dead param from call to decimal2str.
11900 (plongest): Ditto.
11901
633ff500
JB
119022011-02-24 Joel Brobecker <brobecker@adacore.com>
11903
11904 Revert the following patch (not approved yet):
11905 2011-02-21 Hui Zhu <teawater@gmail.com>
11906 * tracepoint.c (tp_printf): New function.
11907 (eval_agent_expr): Handle gdb_agent_op_printf.
11908
f9c6ff72
HZ
119092011-02-21 Hui Zhu <teawater@gmail.com>
11910
11911 * tracepoint.c (tp_printf): New function.
11912 (eval_agent_expr): Handle gdb_agent_op_printf.
11913
94d5e490
TT
119142011-02-18 Tom Tromey <tromey@redhat.com>
11915
11916 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11917 (tracepoint.o): Likewise.
11918 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11919 (gdb_agent_op_names): Likewise.
11920
c7f96d2b
TT
119212011-02-18 Tom Tromey <tromey@redhat.com>
11922
11923 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11924 gdb_agent_op_rot>: New constants.
11925 (gdb_agent_op_names): Add pick and roll.
11926 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11927 cases.
11928
0feedb2c
JK
119292011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11930
11931 * aclocal.m4: Regenerated with aclocal-1.11.1.
11932
b3b9301e
PA
119332011-02-14 Pedro Alves <pedro@codesourcery.com>
11934
11935 * server.c (handle_qxfer_traceframe_info): New.
11936 (qxfer_packets): Register "traceframe-info".
11937 (handle_query): Report support for qXfer:traceframe-info:read+.
11938 * tracepoint.c (match_blocktype): New.
11939 (traceframe_find_block_type): Rename to ...
11940 (traceframe_walk_blocks): ... this. Add callback filter argument,
11941 and use it.
11942 (traceframe_find_block_type): New, reimplemented on top of
11943 traceframe_walk_blocks.
11944 (build_traceframe_info_xml): New.
11945 (traceframe_read_info): New.
11946 * server.h (traceframe_read_info): Declare.
11947
4f3e6fb7
YQ
119482011-02-11 Yao Qi <yao@codesourcery.com>
11949
11950 * configure.ac: Call AC_PROG_RANLIB.
11951 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11952 * configure: Regenerate.
11953
764880b7
PA
119542011-02-07 Pedro Alves <pedro@codesourcery.com>
11955
11956 * server.c (gdb_read_memory): Change return semantics to allow
11957 partial transfers.
11958 (handle_search_memory_1): Adjust.
11959 (process_serial_event) <'m' packet>: Handle partial transfers.
11960 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11961
1c79eb8a
PA
119622011-01-28 Pedro Alves <pedro@codesourcery.com>
11963
11964 * regcache.c (init_register_cache): Initialize
11965 regcache->register_status.
11966 (free_register_cache): Release regcache->register_status.
11967 (regcache_cpy): Copy register_status.
11968 (registers_to_string): Print 'x's for unavailable registers.
11969 (supply_register): Mark the register's status valid or
11970 unavailable, depending on whether a buffer was passed in or not.
11971 (supply_register_zeroed): New.
11972 (supply_regblock): Mark the registers' status valid or
11973 unavailable, depending on whether a buffer was passed in or not.
11974 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11975 (struct regcache): New `register_status' field.
11976 (supply_register_zeroed): Declare.
11977 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11978 supply_register_zeroed, rather than passing a NULL buffer to
11979 supply_register.
11980 * tracepoint.c (fetch_traceframe_registers): Update comment.
11981
85724a0e
PA
119822011-01-28 Pedro Alves <pedro@codesourcery.com>
11983
11984 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11985 buffer explicit.
11986
d08aafef
PA
119872011-01-25 Pedro Alves <pedro@codesourcery.com>
11988
11989 * server.h (decode_xfer_write): Change prototype.
11990 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11991 and don't extract the annex here.
11992 * server.c (decode_xfer_read): Remove `annex' parameter,
11993 and don't extract the annex here.
11994 (decode_xfer): New.
11995 (struct qxfer): New.
11996 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11997 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11998 (handle_qxfer_statictrace): New functions, abstracted out from
11999 handle_query, and made to use the struct qxfer interface.
12000 (handle_threads_qxfer_proper): Rename to ...
12001 (handle_qxfer_threads_proper): ... this.
12002 (handle_threads_qxfer): Rename to ...
12003 (handle_qxfer_threads): ... this. Adjust.
12004 (qxfer_packets): New array.
12005 (handle_qxfer): New function.
12006 (handle_query): Use handle_qxfer.
12007
493e2a69
MS
120082011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12009
12010 * gdbreplay.c: Shorten lines of >= 80 columns.
12011 * linux-low.c: Ditto.
12012 * linux-ppc-low.c: Ditto.
12013 * linux-s390-low.c: Ditto.
12014 * linux-sparc-low.c: Ditto.
12015 * linux-x86-low.c: Ditto.
12016 * linux-xtensa-low.c: Ditto.
12017 * mem-break.c: Ditto.
12018 * nto-low.c: Ditto.
12019 * regcache.h: Ditto.
12020 * remote-utils.c: Ditto.
12021 * server.c: Ditto.
12022 * server.h: Ditto.
12023 * thread-db.c: Ditto.
12024 * tracepoint.c: Ditto.
12025 * utils.c: Ditto.
12026 * win32-low.h: Ditto.
12027
44944448
JB
120282011-01-05 Joel Brobecker <brobecker@adacore.com>
12029
12030 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12031 update.
12032
71ce852c
JB
120332011-01-01 Joel Brobecker <brobecker@adacore.com>
12034
12035 * server.c (gdbserver_version): Update copyright year in version
12036 output.
12037 * gdbreplay.c (gdbreplay_version): Ditto.
12038
eb826dc6
MF
120392010-12-29 Jie Zhang <jie.zhang@analog.com>
12040
12041 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12042 * linux-bfin-low.c: New file.
12043 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12044 PT_DATA_ADDR for BFIN targets.
12045 * Makefile.in (SFILES): Add linux-bfin-low.c.
12046 (clean): Remove reg-bfin.c.
12047 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12048 * README: Mention supported Blackfin targets.
12049
39ab222a
MF
120502010-12-23 Mike Frysinger <vapier@gentoo.org>
12051
12052 * .gitignore: New file.
12053
a1f2ce7d
MF
120542010-11-16 Mike Frysinger <vapier@gentoo.org>
12055
12056 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12057
f474844c
JZ
120582010-10-22 Jie Zhang <jie@codesourcery.com>
12059
12060 * Makefile.in: Add FLAGS_TO_PASS variable.
12061 (install): Remove dependency of install-only and recursively
12062 invoke make for install-only.
12063
f1048712
DE
120642010-10-04 Doug Evans <dje@google.com>
12065
12066 * Makefile.in (uninstall): Use $(DESTDIR).
12067
b53a1623
PA
120682010-09-24 Pedro Alves <pedro@codesourcery.com>
12069
e6ee044d
PA
12070 PR gdb/11842
12071
b53a1623
PA
12072 * linux-x86-low.c (compat_siginfo_from_siginfo)
12073 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12074 si_code is < 0. Check for si_code == SI_TIMER before checking for
12075 si_code < 0.
12076
fa1bd1e4
JB
120772010-09-13 Joel Brobecker <brobecker@adacore.com>
12078
12079 * lynx-i386-low.c: New file.
12080 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12081
47fac8f8
JB
120822010-09-13 Joel Brobecker <brobecker@adacore.com>
12083
12084 * lynx-low.c (ptrace_request_to_str): Remove handling for
12085 request values that have been removed in LynxOS 5.x.
12086
1adfc54d
JB
120872010-09-13 Joel Brobecker <brobecker@adacore.com>
12088
12089 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12090 <ptrace.h>
12091
c2a66c29
NS
120922010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12093
12094 * configure.ac: Add --enable-inprocess-agent option.
12095 * configure: Rebuilt.
12096
32fcada3
YQ
120972010-09-06 Yao Qi <yao@codesourcery.com>
12098
12099 * linux-low.c (linux_kill): Remove unused variable.
12100 (linux_stabilize_threads): Likewise.
12101 * server.c (start_inferior): Likewise.
12102 (queue_stop_reply_callback): Likewise.
12103 * tracepoint.c (do_action_at_tracepoint): Likewise.
12104
0cccb683
YQ
121052010-09-06 Yao Qi <yao@codesourcery.com>
12106
12107 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12108 on return.
12109
423ec54c
JK
121102010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12111
12112 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12113
12ac6819
PA
121142010-09-06 Pedro Alves <pedro@codesourcery.com>
12115
12116 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12117 "$(IPA_DEPFILES)".
12118
8ed54b31
JB
121192010-09-01 Joel Brobecker <brobecker@adacore.com>
12120
12121 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12122 gdbserver/lynx-ppc-low.c: New files.
12123 * Makefile.in (lynx_low_h): New variable.
12124 (lynx-low.o, lynx-ppc-low.o): New rules.
12125 * configure.ac: On LynxOS, link with -lnetinet.
12126 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12127 * configure: regenerate.
12128
bb0116a4
JB
121292010-09-01 Joel Brobecker <brobecker@adacore.com>
12130
12131 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12132 * configure.ac: Add check for vasprintf and vsnprintf.
12133 * configure, config.in: Regenerate.
12134 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12135
a778ab81 121362010-09-01 Joel Brobecker <brobecker@adacore.com>
12137
12138 * gdbreplay.c: Move include of alloca.h up, next to include of
12139 malloc.h.
12140 * server.h: Add include of malloc.h.
12141 * mem-break.c: Remove include of malloc.h.
12142 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12143
8b034a19 121442010-09-01 Joel Brobecker <brobecker@adacore.com>
12145
12146 * Makefile.in (memmem.o): Build with -Wno-error.
12147
121482010-09-01 Joel Brobecker <brobecker@adacore.com>
12149
12150 * utils.c (xsnprintf): Make non-static.
12151 * server.h: Add xsnprintf declaration.
12152 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12153 replace calls to snprintf by calls to xsnprintf throughout.
12154
121552010-09-01 Joel Brobecker <brobecker@adacore.com>
12156
12157 * configure.ac: Add configure check for alloca.
12158 * configure, config.in: Regenerate.
12159 * server.h: Include alloca.h if it exists.
12160 * gdbreplay.c: Include alloca.h if it exists.
12161
1a981360
PA
121622010-08-28 Pedro Alves <pedro@codesourcery.com>
12163
12164 * linux-low.c (__SIGRTMIN): Define if not already defined.
12165 (linux_create_inferior): Check for __ANDROID__ rather than
12166 __SIGRTMIN.
12167 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12168 are already deferred.
12169 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12170 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12171 stopped and already has a pending signal to report.
12172 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12173 a pending signal to report or is moving out of a jump pad.
12174 (linux_init_signals): Check for __ANDROID__ rather than
12175 __SIGRTMIN.
12176
b4d51a55
PA
121772010-08-28 Pedro Alves <pedro@codesourcery.com>
12178
12179 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12180 debug_threads check. Avoid a linear search when not doing debug
12181 output.
12182
ec48365d
PA
121832010-08-27 Pedro Alves <pedro@codesourcery.com>
12184
12185 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12186 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12187 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12188 (process_event): Change local fd's type to gdb_fildes_t.
12189 (create_file_handler): Adjust prototype.
12190 (delete_file_handler): Adjust prototype.
12191 (handle_file_event): Adjust prototype. Use pfildes.
12192 (create_file_event): Adjsut prototype.
12193 * remote-utils.c (remote_desc, listen_desc): Change type to
12194 gdb_fildes_t.
12195 * server.h: New gdb_fildes_t typedef.
12196 [USE_WIN32API]: Include winsock2.h.
12197 (delete_file_handler, add_file_handler): Adjust prototypes.
12198 (pfildes): Declare.
12199 * utils.c (pfildes): New.
12200
854d88f0
PA
122012010-08-27 Pedro Alves <pedro@codesourcery.com>
12202
12203 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12204 * configure: Regenerate.
12205
0146f85b
PA
122062010-08-27 Pedro Alves <pedro@codesourcery.com>
12207
12208 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12209 (linux_done_accessing_memory): ... this.
12210 (linux_target_ops): Adjust.
12211 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12212 * nto-low.c (nto_target_ops): Adjust comment.
12213 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12214 * spu-low.c (spu_target_ops): Adjust comment.
12215 * target.h (target_ops): Rename unprepare_to_access_memory field
12216 to done_accessing_memory.
12217 (unprepare_to_access_memory): Rename to ...
12218 (done_accessing_memory): ... this.
12219
90d74c30
PA
122202010-08-26 Pedro Alves <pedro@codesourcery.com>
12221
12222 * linux-low.c (linux_prepare_to_access_memory): New.
12223 (linux_unprepare_to_access_memory): New.
12224 (linux_target_ops): Install them.
12225 * server.c (read_memory): Rename to ...
12226 (gdb_read_memory): ... this. Use
12227 prepare_to_access_memory/prepare_to_access_memory.
12228 (write_memory): Rename to ...
12229 (gdb_write_memory): ... this. Use
12230 prepare_to_access_memory/prepare_to_access_memory.
12231 (handle_search_memory_1): Adjust.
12232 (process_serial_event): Adjust.
12233 * target.h (struct target_ops): New fields
12234 prepare_to_access_memory and unprepare_to_access_memory.
12235 (prepare_to_access_memory, unprepare_to_access_memory): New.
12236 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12237 prepare_to_access_memory/prepare_to_access_memory.
12238 * nto-low.c (nto_target_ops): Adjust.
12239 * spu-low.c (spu_target_ops): Adjust.
12240 * win32-low.c (win32_target_ops): Adjust.
12241
fd467969
PA
122422010-08-26 Pedro Alves <pedro@codesourcery.com>
12243
12244 * Makefile.in (WARN_CFLAGS): Get it from configure.
12245 (WERROR_CFLAGS): New.
12246 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12247 * configure.ac: Introduce --enable-werror, which adds -Werror to
12248 the compiler command line. Enabled by default. Disable with
12249 --disable-werror. Add -Wdeclaration-after-statement
12250 Wpointer-arith and -Wformat-nonliteral to warning flags.
12251 * configure: Regenerate.
12252
331e2f5f
PA
122532010-08-26 Pedro Alves <pedro@codesourcery.com>
12254
12255 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12256
e581f2b4
PA
122572010-08-26 Pedro Alves <pedro@codesourcery.com>
12258
12259 * gdbreplay.c (remote_error): New.
12260 (gdbchar): New.
12261 (expect): Use gdbchar. Check for error reading from GDB.
12262 Clarify sync error output.
12263 (play): Check for errors writing to GDB.
12264 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12265 * remote-utils.c (getpkt): Check for errors writing to the remote
12266 descriptor.
12267
3c11dd79
PA
122682010-08-25 Pedro Alves <pedro@codesourcery.com>
12269
12270 * linux-low.c (linux_wait_1): Move non-debugging code out of
12271 `debug_threads' control.
12272
d20a8ad9
PA
122732010-08-25 Pedro Alves <pedro@codesourcery.com>
12274
12275 * linux-low.c (linux_wait_1): Don't set last_status here.
12276 * server.c (push_event, queue_stop_reply_callback): Assert we're
12277 not pushing a TARGET_WAITKIND_IGNORE event.
12278 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12279 (myresume, handle_target_event): Set the thread's last_resume_kind
12280 and last_status from the target returned status.
12281
964e4306
PA
122822010-08-25 Pedro Alves <pedro@codesourcery.com>
12283
12284 PR threads/10729
12285
12286 * linux-x86-low.c (update_debug_registers_callback): New.
12287 (i386_dr_low_set_addr): Use it.
12288 (i386_dr_low_get_addr): New.
12289 (i386_dr_low_set_control): Use update_debug_registers_callback.
12290 (i386_dr_low_get_control): New.
12291 (i386_dr_low_get_status): Adjust.
12292 * linux-low.c (linux_stop_lwp): New.
12293 * linux-low.h (linux_stop_lwp): Declare.
12294
12295 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12296 argument instead of a i386_debug_reg_state.
12297 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12298 a i386_debug_reg_state.
12299 (i386_insert_aligned_watchpoint): Adjust.
12300 (i386_remove_aligned_watchpoint): Adjust.
12301 (i386_low_stopped_data_address): Read the debug registers from the
12302 inferior instead of from the mirrors.
12303 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12304 (i386_dr_low_get_addr): Declare.
12305 (i386_dr_low_get_control): Declare.
12306 (i386_dr_low_get_status): Change prototype.
12307
12308 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12309 (i386_dr_low_get_addr): New.
12310 (i386_dr_low_get_control): New.
12311 (i386_dr_low_get_status): Adjust prototype. Return
12312 dr_status_mirror.
12313 (i386_initial_stuff): Clear dr_status_mirror and
12314 dr_control_mirror.
12315 (i386_get_thread_context): Adjust.
12316 (i386_set_thread_context): Adjust.
12317 (i386_thread_added): Adjust.
12318
5f21a75b
PA
123192010-08-24 Pedro Alves <pedro@codesourcery.com>
12320
12321 * linux-low.h (linux_thread_area): Delete declaration.
12322
3e4c1235
TS
123232010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12324
12325 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12326 after its termination.
12327
1971b033
PA
123282010-08-09 Pedro Alves <pedro@codesourcery.com>
12329
12330 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12331 (gdb_wants_all_stopped): Delete.
12332 (linux_wait_1): Don't call them.
12333 * server.c (handle_v_cont): Tag all threads as want-stopped.
12334 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12335 stopped as "client-wants-stopped".
12336
310444ac
PA
123372010-07-31 Pedro Alves <pedro@codesourcery.com>
12338
12339 * Makefile.in (signals_h): New.
12340 (server_h): Depend on it.
12341 (server.o): Don't depend on $(signals_def).
12342 (signals.o): Depend on $(signals_def).
12343
a19cae16
JK
123442010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12345
12346 * Makefile.in (signals_def): New.
12347 (server_h): Append include/gdb/signals.h and signals_def.
12348 (server.o): Append signals_def.
12349
30d50328
JK
123502010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12351
12352 * server.c (handle_target_event): Use target_signal_to_host for
12353 resume_info.sig initialization.
12354 * target.h (struct thread_resume) <sig>: New comment.
12355
5c3216e2
OS
123562010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12357
c6f46ca0
OS
12358 * server.c (handle_query): strcpy() the returned string from paddress()
12359 instead of sprintf().
5c3216e2
OS
12360 * utils.c (paddress): Return phex_nz().
12361
6bd31874
JB
123622010-07-07 Joel Brobecker <brobecker@adacore.com>
12363
12364 * server.c (handle_v_cont): Call mourn_inferior if process
12365 just exited.
12366 (myresume): Likewise.
12367
0fb4aa4b
PA
123682010-07-01 Pedro Alves <pedro@codesourcery.com>
12369
12370 Static tracepoints, and integration with UST.
12371
12372 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12373 * mem-break.c (uninsert_all_breakpoints)
12374 (reinsert_all_breakpoints): New.
12375 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12376 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12377 (gdb_agent_ust_loaded, helper_thread_id)
12378 (gdb_agent_helper_thread_id): New macros.
12379 (struct ipa_sym_addresses): Add addr_ust_loaded,
12380 addr_helper_thread_id, addr_cmd_buf.
12381 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12382 (in_process_agent_loaded_ust): New.
12383 (write_e_ust_not_loaded): New.
12384 (maybe_write_ipa_ust_not_loaded): New.
12385 (struct collect_static_trace_data_action): New.
12386 (enum tracepoint_type) <static_tracepoint>: New.
12387 (struct tracepoint) <handle>: Mention static tracepoints.
12388 (struct static_tracepoint_ctx): New.
12389 (CMD_BUF_SIZE): New.
12390 (add_tracepoint_action): Handle static tracepoint actions.
12391 (unprobe_marker_at): New.
12392 (clear_installed_tracepoints): Handle static tracepoints.
12393 (cmd_qtdp): Handle static tracepoints.
12394 (probe_marker_at): New.
12395 (cmd_qtstart): Handle static tracepoints.
12396 (response_tracepoint): Handle static tracepoints.
12397 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12398 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12399 (get_context_regcache): Handle static tracepoints.
12400 (do_action_at_tracepoint): Handle static tracepoint actions.
12401 (traceframe_find_block_type): Handle static trace data blocks.
12402 (traceframe_read_sdata): New.
12403 (download_tracepoints): Download static tracepoint actions.
12404 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12405 (GDB_PROBE_NAME): New.
12406 (ust_ops): New.
12407 (GET_UST_SYM): New.
12408 (USTF): New.
12409 (dlsym_ust): New.
12410 (ust_marker_to_static_tracepoint): New.
12411 (gdb_probe): New.
12412 (collect_ust_data_at_tracepoint): New.
12413 (gdb_ust_probe): New.
12414 (UNIX_PATH_MAX, SOCK_DIR): New.
12415 (gdb_ust_connect_sync_socket): New.
12416 (resume_thread, stop_thread): New.
12417 (run_inferior_command): New.
12418 (init_named_socket): New.
12419 (gdb_ust_socket_init): New.
12420 (cstr_to_hexstr): New.
12421 (next_st): New.
12422 (first_marker, next_marker): New.
12423 (response_ust_marker): New.
12424 (cmd_qtfstm, cmd_qtsstm): New.
12425 (unprobe_marker_at, probe_marker_at): New.
12426 (cmd_qtstmat, gdb_ust_thread): New.
12427 (gdb_ust_init): New.
12428 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12429 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12430 (ST_REGENTRY): New.
12431 (x86_64_st_collect_regmap): New.
12432 (X86_64_NUM_ST_COLLECT_GREGS): New.
12433 (AMD64_RIP_REGNUM): New.
12434 (supply_static_tracepoint_registers): New.
12435 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12436 (ST_REGENTRY): New.
12437 (i386_st_collect_regmap): New.
12438 (i386_NUM_ST_COLLECT_GREGS): New.
12439 (supply_static_tracepoint_registers): New.
12440 * server.c (handle_query): Handle qXfer:statictrace:read.
12441 <qSupported>: Report support for StaticTracepoints, and
12442 qXfer:statictrace:read features.
12443 * server.h (traceframe_read_sdata)
12444 (supply_static_tracepoint_registers): Declare.
12445 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12446 (unpack_varlen_hex): Include in IPA build.
12447 * Makefile.in (ustlibs, ustinc): New.
12448 (IPA_OBJS): Add remote-utils-ipa.o.
12449 ($(IPA_LIB)): Link -ldl and -lpthread.
12450 (UST_CFLAGS): New.
12451 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12452 * config.in, configure: Regenerate.
12453
9e4344e5
PA
124542010-06-20 Ian Lance Taylor <iant@google.com>
12455 Pedro Alves <pedro@codesourcery.com>
12456
12457 * linux-x86-low.c (always_true): Delete.
12458 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12459 trying to fool the compiler with always_true.
12460
c6beb2cb
PA
124612010-06-20 Pedro Alves <pedro@codesourcery.com>
12462
12463 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12464 conditions in gdbserver.
12465
d2ed6730
UW
124662010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12467
12468 * spu-low.c (spu_read_memory): Wrap around local store limit.
12469 (spu_write_memory): Likewise.
12470
4e29fb54
PA
124712010-06-15 Pedro Alves <pedro@codesourcery.com>
12472
12473 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12474 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12475 LONGEST uses.
12476 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12477 uses.
12478 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12479 uses with LONGEST uses.
12480
6a271cae
PA
124812010-06-14 Stan Shebs <stan@codesourcery.com>
12482 Pedro Alves <pedro@codesourcery.com>
12483
12484 Bytecode compiler.
12485
12486 * linux-x86-low.c: Include limits.h.
12487 (add_insns): New.
12488 (always_true): New.
12489 (EMIT_ASM): New.
12490 (EMIT_ASM32): New.
12491 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12492 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12493 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12494 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12495 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12496 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12497 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12498 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12499 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12500 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12501 (amd64_emit_void_call_2): New.
12502 (amd64_emit_ops): New.
12503 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12504 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12505 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12506 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12507 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12508 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12509 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12510 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12511 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12512 (i386_emit_stack_adjust, i386_emit_int_call_1)
12513 (i386_emit_void_call_2): New.
12514 (i386_emit_ops): New.
12515 (x86_emit_ops): New.
12516 (the_low_target): Install x86_emit_ops.
12517 * server.h (struct emit_ops): New.
12518 (get_raw_reg_func_addr): Declare.
12519 (current_insn_ptr, emit_error): Declare.
12520 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12521 (set_trace_state_variable_value): New defines.
12522 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12523 addr_get_trace_state_variable_value and
12524 addr_set_trace_state_variable_value.
12525 (symbol_list): New fields for get_raw_reg,
12526 get_trace_state_variable_value and set_trace_state_variable_value.
12527 (condfn): New typedef.
12528 (struct tracepoint): New field `compiled_cond'.
12529 (do_action_at_tracepoint): Clear compiled_cond.
12530 (get_trace_state_variable_value, set_trace_state_variable_value):
12531 Export in the IPA.
12532 (condition_true_at_tracepoint): If there's a compiled condition,
12533 run that.
12534 (current_insn_ptr, emit_error): New globals.
12535 (struct bytecode_address): New.
12536 (get_raw_reg_func_addr): New.
12537 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12538 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12539 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12540 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12541 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12542 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12543 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12544 (compile_tracepoint_condition, compile_bytecodes): New.
12545 * target.h (emit_ops): Forward declare.
12546 (struct target_ops): New field emit_ops.
12547 (target_emit_ops): New.
12548 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12549 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12550 * linux-low.c (linux_emit_ops): New.
12551 (linux_target_ops): Install it.
12552 * linux-low.h (struct linux_target_ops): New field emit_ops.
12553
92b72907
UW
125542010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12555
12556 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12557 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12558
fa593d66
PA
125592010-06-01 Pedro Alves <pedro@codesourcery.com>
12560 Stan Shebs <stan@codesourcery.com>
12561
12562 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12563 (all): Depend on $(extra_libraries).
12564 (install-only): Install the IPA.
12565 (IPA_OBJS, IPA_LIB): New.
12566 (clean): Remove the IPA lib.
12567 (IPAGENT_CFLAGS): New.
12568 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12569 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12570 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12571 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12572 * configure.ac: Check for atomic builtins support in the compiler.
12573 (IPA_DEPFILES, extra_libraries): Define.
12574 * configure.srv (ipa_obj): Add description.
12575 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12576 (i[34567]86-*-linux*): Set ipa_obj.
12577 (x86_64-*-linux*): Set ipa_obj.
12578 * linux-low.c (stabilizing_threads): New.
12579 (supports_fast_tracepoints): New.
12580 (linux_detach): Stabilize threads before detaching.
12581 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12582 the lwp is either not stabilizing, or is moving out of a jump pad.
12583 (linux_fast_tracepoint_collecting): New.
12584 (maybe_move_out_of_jump_pad): New.
12585 (enqueue_one_deferred_signal): New.
12586 (dequeue_one_deferred_signal): New.
12587 (linux_wait_for_event_1): If moving out of a jump pad, defer
12588 pending signals to later.
12589 (linux_stabilize_threads): New.
12590 (linux_wait_1): Check if threads need moving out of jump pads, and
12591 do it if so.
12592 (stuck_in_jump_pad_callback): New.
12593 (move_out_of_jump_pad_callback): New.
12594 (lwp_running): New.
12595 (linux_resume_one_lwp): Handle moving out of jump pads.
12596 (linux_set_resume_request): Dequeue deferred signals.
12597 (need_step_over_p): Also step over fast tracepoint jumps.
12598 (start_step_over): Also uninsert fast tracepoint jumps.
12599 (finish_step_over): Also reinsert fast tracepoint jumps.
12600 (linux_install_fast_tracepoint_jump): New.
12601 (linux_target_ops): Install linux_stabilize_threads and
12602 linux_install_fast_tracepoint_jump_pad.
12603 * linux-low.h (linux_target_ops) <get_thread_area,
12604 install_fast_tracepoint_jump_pad>: New fields.
12605 (struct lwp_info) <collecting_fast_tracepoint,
12606 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12607 (linux_get_thread_area): Declare.
12608 * linux-x86-low.c (jump_insn): New.
12609 (x86_get_thread_area): New.
12610 (append_insns): New.
12611 (push_opcode): New.
12612 (amd64_install_fast_tracepoint_jump_pad): New.
12613 (i386_install_fast_tracepoint_jump_pad): New.
12614 (x86_install_fast_tracepoint_jump_pad): New.
12615 (the_low_target): Install x86_get_thread_area and
12616 x86_install_fast_tracepoint_jump_pad.
12617 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12618 (struct fast_tracepoint_jump): New.
12619 (fast_tracepoint_jump_insn): New.
12620 (fast_tracepoint_jump_shadow): New.
12621 (find_fast_tracepoint_jump_at): New.
12622 (fast_tracepoint_jump_here): New.
12623 (delete_fast_tracepoint_jump): New.
12624 (set_fast_tracepoint_jump): New.
12625 (uninsert_fast_tracepoint_jumps_at): New.
12626 (reinsert_fast_tracepoint_jumps_at): New.
12627 (set_breakpoint_at): Use write_inferior_memory.
12628 (uninsert_raw_breakpoint): Use write_inferior_memory.
12629 (check_mem_read): Mask out fast tracepoint jumps.
12630 (check_mem_write): Mask out fast tracepoint jumps.
12631 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12632 (set_fast_tracepoint_jump): Declare.
12633 (delete_fast_tracepoint_jump)
12634 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12635 (reinsert_fast_tracepoint_jumps_at): Declare.
12636 * regcache.c: Don't compile many functions when building the
12637 in-process agent library.
12638 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12639 the register buffer in the heap.
12640 (free_register_cache): If the register buffer isn't owned by the
12641 regcache, don't free it.
12642 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12643 pre-existing register caches.
12644 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12645 type.
12646 (convert_ascii_to_int): : Constify `from' parameter type.
12647 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12648 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12649 the needed buffer in-place.
12650 (relocate_instruction): New.
12651 * server.c (handle_query) <qSymbols>: If the target supports
12652 tracepoints, give it a chance of looking up symbols. Report
12653 support for fast tracepoints.
12654 (handle_status): Stabilize threads.
12655 (process_serial_event): Adjust.
12656 * server.h (struct fast_tracepoint_jump): Forward declare.
12657 (struct process_info) <fast_tracepoint_jumps>: New field.
12658 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12659 (decode_X_packet, decode_M_packet): Adjust.
12660 (relocate_instruction): Declare.
12661 (in_process_agent_loaded): Declare.
12662 (tracepoint_look_up_symbols): Declare.
12663 (struct fast_tpoint_collect_status): Declare.
12664 (fast_tracepoint_collecting): Declare.
12665 (force_unlock_trace_buffer): Declare.
12666 (handle_tracepoint_bkpts): Declare.
12667 (initialize_low_tracepoint)
12668 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12669 * target.h (struct target_ops) <stabilize_threads,
12670 install_fast_tracepoint_jump_pad>: New fields.
12671 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12672 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12673 [HAVE_STDINT_H]: Include stdint.h.
12674 (trace_debug_1): Rename to ...
12675 (trace_vdebug): ... this.
12676 (trace_debug): Rename to ...
12677 (trace_debug_1): ... this. Add `level' parameter.
12678 (trace_debug): New.
12679 (ATTR_USED, ATTR_NOINLINE): New.
12680 (IP_AGENT_EXPORT): New.
12681 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12682 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12683 (about_to_request_buffer_space, trace_buffer_is_full)
12684 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12685 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12686 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12687 (traceframe_write_count, traceframes_created)
12688 (trace_state_variables)
12689 New renaming defines.
12690 (struct ipa_sym_addresses): New.
12691 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12692 (symbol_list): New.
12693 (ipa_sym_addrs): New.
12694 (all_tracepoint_symbols_looked_up): New.
12695 (in_process_agent_loaded): New.
12696 (write_e_ipa_not_loaded): New.
12697 (maybe_write_ipa_not_loaded): New.
12698 (tracepoint_look_up_symbols): New.
12699 (debug_threads) [IN_PROCESS_AGENT]: New.
12700 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12701 (UNKNOWN_SIDE_EFFECTS): New.
12702 (stop_tracing): New.
12703 (flush_trace_buffer): New.
12704 (stop_tracing_bkpt): New.
12705 (flush_trace_buffer_bkpt): New.
12706 (read_inferior_integer): New.
12707 (read_inferior_uinteger): New.
12708 (read_inferior_data_pointer): New.
12709 (write_inferior_data_pointer): New.
12710 (write_inferior_integer): New.
12711 (write_inferior_uinteger): New.
12712 (struct collect_static_trace_data_action): Delete.
12713 (enum tracepoint_type): New.
12714 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12715 <actions_str, step_actions, step_actions_str>: Only include in
12716 GDBserver.
fa593d66
PA
12717 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12718 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12719 (tracepoints): Use IP_AGENT_EXPORT.
12720 (last_tracepoint): Don't include in the IPA.
12721 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12722 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12723 (alloced_trace_state_variables): New.
12724 (trace_state_variables): Use IP_AGENT_EXPORT.
12725 (traceframe_t): Delete unused variable.
12726 (circular_trace_buffer): Don't include in the IPA.
12727 (trace_buffer_start): Delete.
12728 (struct trace_buffer_control): New.
12729 (trace_buffer_free): Delete.
12730 (struct ipa_trace_buffer_control): New.
12731 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12732 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12733 New.
12734 (trace_buffer_ctrl): New.
12735 (TRACE_BUFFER_CTRL_CURR): New.
12736 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12737 Reimplement as macros.
12738 (trace_buffer_wrap): Delete.
12739 (traceframe_write_count, traceframe_read_count)
12740 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12741 (struct tracepoint_hit_ctx) <type>: New field.
12742 (struct fast_tracepoint_ctx): New.
12743 (memory_barrier): New.
12744 (cmpxchg): New.
12745 (record_tracepoint_error): Update atomically in the IPA.
12746 (clear_inferior_trace_buffer): New.
12747 (about_to_request_buffer_space): New.
12748 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12749 updating the same buffer.
12750 (add_tracepoint): Default the tracepoint's type to trap
12751 tracepoint, and orig_size to -1.
12752 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12753 internal variables.
12754 (create_trace_state_variable): New parameter `gdb'. Handle it.
12755 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12756 (cmd_qtdp): Handle fast tracepoints.
12757 (cmd_qtdv): Adjust.
12758 (max_jump_pad_size): New.
12759 (gdb_jump_pad_head): New.
12760 (get_jump_space_head): New.
12761 (claim_jump_space): New.
12762 (sort_tracepoints): New.
12763 (MAX_JUMP_SIZE): New.
12764 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12765 IPA.
12766 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12767 support. Upload fast traceframes, and delete internal IPA
12768 breakpoints.
12769 (stop_tracing_handler): New.
12770 (flush_trace_buffer_handler): New.
12771 (cmd_qtstop): Upload fast tracepoints.
12772 (response_tracepoint): Handle fast tracepoints.
12773 (tracepoint_finished_step): Upload fast traceframes. Set the
12774 tracepoint hit context's tracepoint type.
12775 (handle_tracepoint_bkpts): New.
12776 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12777 type. Add comment about fast tracepoints.
12778 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12779 non-existing action_str field.
12780 (get_context_regcache): Handle fast tracepoints.
12781 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12782 to the regcache.
12783 (fast_tracepoint_from_jump_pad_address): New.
12784 (fast_tracepoint_from_ipa_tpoint_address): New.
12785 (collecting_t): New.
12786 (force_unlock_trace_buffer): New.
12787 (fast_tracepoint_collecting): New.
12788 (collecting): New.
12789 (gdb_collect): New.
12790 (write_inferior_data_ptr): New.
12791 (target_tp_heap): New.
12792 (target_malloc): New.
12793 (download_agent_expr): New.
12794 (UALIGN): New.
12795 (download_tracepoints): New.
12796 (download_trace_state_variables): New.
12797 (upload_fast_traceframes): New.
12798 (IPA_FIRST_TRACEFRAME): New.
12799 (IPA_NEXT_TRACEFRAME_1): New.
12800 (IPA_NEXT_TRACEFRAME): New.
12801 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12802 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12803 (gdb_jump_pad_buffer_end): New.
12804 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12805 (initialize_tracepoint): Adjust.
12806 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12807 buffer. Initialize the low module.
12808 * utils.c (PREFIX, TOOLNAME): New.
12809 (malloc_failure): Use PREFIX.
12810 (error): In the IPA, an error causes an exit.
12811 (fatal, warning): Use PREFIX.
12812 (internal_error): Use TOOLNAME.
12813 (NUMCELLS): Increase to 10.
12814 * configure, config.in: Regenerate.
12815
d149dd1d
PA
128162010-06-01 Pedro Alves <pedro@codesourcery.com>
12817
12818 * server.c (handle_query) <qSupported>: Do two passes over the
12819 qSupported string to avoid nesting strtok.
12820
f6528abd
JK
128212010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12822
12823 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12824 (CDEPS): New.
12825 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12826 -Wl,--dynamic-list.
12827 * configure: Regenerate.
12828 * proc-service.list: New.
12829
ca2a87a0
JK
128302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12831
12832 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12833 New comment.
12834
363a6e9f
OS
128352010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12836
12837 * gdbreplay.c (remote_open): Check error return from socket() call by
12838 its equality to -1 not by it being negative.
12839 * remote-utils.c (remote_open): Likewise.
12840
d23b6cb1
PA
128412010-05-23 Pedro Alves <pedro@codesourcery.com>
12842
12843 * config.h: Regenerate.
12844
28d3cf85
MK
128452010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12846
12847 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12848 doesn't provide PTRACE_GET_THREAD_AREA.
12849
fea36a59
MK
128502010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12851
12852 * linux-m68k-low.c: Include <asm/ptrace.h>
12853 (ps_get_thread_area): Implement.
12854
24b066ba
DE
128552010-05-03 Doug Evans <dje@google.com>
12856
12857 * event-loop.c (struct callback_event): New struct.
12858 (callback_list): New global.
12859 (append_callback_event, delete_callback_event): New functions.
12860 (process_callback): New function.
12861 (start_event_loop): Call it.
12862 * remote-utils.c (NOT_SCHEDULED): Define.
12863 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12864 moved out of readchar.
12865 (readchar): Rewrite. Call reschedule before returning.
12866 (reset_readchar): New function.
12867 (remote_close): Call it.
12868 (process_remaining, reschedule): New functions.
12869 * server.h (callback_handler_func): New typedef.
12870 (append_callback_event, delete_callback_event): Declare.
12871
9836d6ea
PA
128722010-05-03 Pedro Alves <pedro@codesourcery.com>
12873
12874 * proc-service.c (ps_pglobal_lookup): Use
12875 thread_db_look_up_one_symbol.
12876 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12877 parameter. Use it instead of all_symbols_looked_up.
12878 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12879 field.
12880 (all_symbols_looked_up): Don't declare.
12881 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12882 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12883 field.
12884 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12885 Set all_symbols_looked_up here.
12886 (thread_db_look_up_one_symbol): New.
12887 (thread_db_get_tls_address): Adjust.
12888 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12889 thread_db object on the heap, and tentatively set it in the
12890 process structure.
12891 (thread_db_init): Don't set all_symbols_looked_up here.
12892 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12893
7984d532
PA
128942010-05-03 Pedro Alves <pedro@codesourcery.com>
12895
12896 * linux-low.c (linux_kill, linux_detach): Adjust.
12897 (status_pending_p_callback): Remove redundant statement. Check
12898 for !TARGET_WAITIKIND_IGNORE, instead of
12899 TARGET_WAITKIND_STOPPED.
12900 (handle_tracepoints): Make sure LWP is locked. Adjust.
12901 (linux_wait_for_event_1): Adjust.
12902 (linux_cancel_breakpoints): New.
12903 (unsuspend_one_lwp): New.
12904 (unsuspend_all_lwps): New.
12905 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12906 (send_sigstop_callback): Change return type to int, add new
12907 `except' parameter and handle it.
12908 (suspend_and_send_sigstop_callback): New.
12909 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12910 pass them down. If SUSPEND, also increment the lwp's suspend
12911 count.
12912 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12913 (need_step_over_p): Don't consider suspended LWPs.
12914 (start_step_over): Adjust.
12915 (proceed_one_lwp): Change return type to int, add new `except'
12916 parameter and handle it.
12917 (unsuspend_and_proceed_one_lwp): New.
12918 (proceed_all_lwps): Use find_inferior instead of
12919 for_each_inferior.
12920 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12921 also decrement the suspend count of LWPs. Pass `except' down,
12922 instead of hacking its suspend count.
12923 (linux_pause_all): Add `freeze' parameter. Adjust.
12924 (linux_unpause_all): New.
12925 (linux_target_ops): Install linux_unpause_all.
12926 * server.c (handle_status): Adjust.
12927 * target.h (struct target_ops): New fields `unpause_all' and
12928 `cancel_breakpoints'. Add new parameter to `pause_all'.
12929 (pause_all): Add new `freeze' parameter.
12930 (unpause_all): New.
12931 (cancel_breakpoints): New.
12932 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12933 cancel breakpoints.
12934 (cmd_qtstart): Pause threads.
12935 (stop_tracing): Pause threads, and cancel breakpoints.
12936 * win32-low.c (win32_target_ops): Adjust.
12937
e471f25b
PA
129382010-05-03 Pedro Alves <pedro@codesourcery.com>
12939
12940 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12941 the inferior right away from here...
12942 (linux_wait_1): ... to here, and adjust to check the thread's
12943 last_resume_kind instead of the lwp's step or stop_expected flags.
12944
1915ef4f
PA
129452010-05-02 Pedro Alves <pedro@codesourcery.com>
12946
12947 * README: Use consistent `GDB' and `GDBserver' spellings.
12948
f9e39928
PA
129492010-05-02 Pedro Alves <pedro@codesourcery.com>
12950
12951 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12952 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12953 (linux_detach_one_lwp): Assume the lwp is stopped.
12954 (any_thread_of): Delete.
12955 (linux_detach): Stop all lwps here. Don't blindly delete all
12956 breakpoints.
12957 (delete_lwp_callback): New.
12958 (linux_mourn): Delete all lwps of the process that is gone.
12959 (linux_wait_1): Don't delete the last lwp of the process here.
12960 * mem-break.h (mark_breakpoints_out): Declare.
12961 * mem-break.c (mark_breakpoints_out): New.
12962 (free_all_breakpoints): Use it.
12963 * server.c (handle_target_event): If the process is gone, mark
12964 breakpoints out.
12965 * thread-db.c (struct thread_db) <create_bp>: New field.
12966 (thread_db_enable_reporting): Fix prototype. Store a thread event
12967 breakpoint reference in the thread_db struct.
12968 (thread_db_load_search): Clear the thread_db object.
12969 (try_thread_db_load_1): Ditto.
12970 (switch_to_process): New.
12971 (disable_thread_event_reporting): Use it.
12972 (remove_thread_event_breakpoints): New.
12973 (thread_db_detach, thread_db_mourn): Use it.
12974
1e7fc18c
PA
129752010-05-01 Pedro Alves <pedro@codesourcery.com>
12976
12977 * linux-low.c (linux_enable_event_reporting): New.
12978 (linux_wait_for_event_1, handle_extended_wait): Use it.
12979
02fc4de7
PA
129802010-04-30 Pedro Alves <pedro@codesourcery.com>
12981
12982 * linux-low.c (linux_kill_one_lwp, linux_kill)
12983 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12984 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12985 SIGSTOP even if the LWP is stopped.
12986 (send_sigstop_callback): New.
12987 (stop_all_lwps): Use send_sigstop_callback instead.
12988 (linux_resume_one_thread): Adjust.
12989 (proceed_one_lwp): Still proceed an LWP that the client has
12990 requested to stop, if we haven't reported it as stopped yet. Make
12991 sure that LWPs the client want stopped, have a pending SIGSTOP.
12992
bc3b5632
DE
129932010-04-26 Doug Evans <dje@google.com>
12994
ae1ada35
DE
12995 * server.c (handle_general_set): Make static.
12996
bc3b5632
DE
12997 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12998 Print received char after testing for error/eof instead of before.
12999 (input_interrupt): Tweak comment.
13000
65730243
DE
130012010-04-23 Doug Evans <dje@google.com>
13002
13003 * server.c (start_inferior): Print inferior argv if --debug.
13004
a8ae7dc0
AR
130052010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13006
13007 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13008 * nto-x86-low.c: Include server.h
13009
1c07cc19
PM
130102010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13011
13012 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13013 be consistent with other sources of this directory.
13014 (init_registers_amd64): Correct name of source file of this function
13015 in the comment.
13016
e0a61e09
PM
130172010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13018
13019 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13020 64-bit executables.
13021
54709339
PM
130222010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13023
13024 * win32-i386-low.c: Add 64-bit support.
13025 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13026 (init_registers_amd64): Declare.
13027 (mappings): Add 64-bit version of array.
13028 (init_windows_x86): New function.
13029 (the_low_target): Change init_arch field to init_windows_x86.
13030
e8f0053d
PM
130312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13032
13033 * win32-low.c: Adapt to support also 64-bit architecture.
13034 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13035 (get_image_name): Use SIZE_T type for local variable `done'.
13036 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13037 (toolhelp_get_dll_name): Idem.
13038 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13039 Use uintptr_t typecast to avoid warning.
13040 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13041 (handle_exception): Use phex_nz to avoid warning.
13042 (win32_wait): Remove unused local variable `process'.
13043
c481e77e
PM
130442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13045
13046 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13047 `amd64-avx.o'.
13048
12ea4b69
PM
130492010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13050
13051 * configure.ac: Use `ws2_32' library for srv_mingw.
13052 * configure: Regenerate.
13053 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13054 * remote-utils.c: Likewise.
13055
f6d1620c
L
130562010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13057
13058 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13059 if __x86_64__ is defined.
13060
8e642873
PM
130612010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13062
13063 * configure: Regenerate.
13064
711e434b
PM
130652010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13066
13067 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13068 * target.h (target_ops): New get_tib_address field.
13069 * win32-low.h (win32_thread_info): Add thread_local_base field.
13070 * win32-low.c (child_add_thread): Add tlb argument.
13071 Set thread_local_base field to TLB.
13072 (get_child_debug_event): Adapt to child_add_thread change.
13073 (win32_get_tib_address): New function.
13074 (win32_target_ops): Set get_tib_address field to
13075 win32_get_tib_address.
13076 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13077
505106cd
PA
130782010-04-12 Pedro Alves <pedro@codesourcery.com>
13079
505106cd
PA
13080 * linux-low.c (linux_mourn): Also remove the process.
13081 * server.c (handle_target_event): Don't remove the process here.
13082 * nto-low.c (nto_mourn): New.
13083 (nto_target_ops): Install it.
13084 * spu-low.c (spu_mourn): New.
13085 (spu_target_ops): Install it.
13086 * win32-low.c (win32_mourn): New.
13087 (win32_target_ops): Install it.
13088
e8470a06
PA
130892010-04-12 Pedro Alves <pedro@codesourcery.com>
13090
13091 * server.h (buffer_xml_printf): Remove redundant `;'.
13092
45ba0d02
PA
130932010-04-12 Pedro Alves <pedro@codesourcery.com>
13094
13095 * regcache.c (set_register_cache): Invalidate regcaches before
13096 changing the register cache layout.
13097 (regcache_invalidate_one): Allow a NULL regcache.
13098 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13099 regcaches before changing the register cache layout or the target
13100 regsets.
13101
59e04013
L
131022010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13103
13104 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13105 variable warning on Linux/x86-64.
13106
8336d594
PA
131072010-04-11 Pedro Alves <pedro@codesourcery.com>
13108
13109 GDBserver disconnected tracing support.
13110
13111 * linux-low.c (linux_remove_process): Delete.
13112 (add_lwp): Don't set last_resume_kind here.
13113 (linux_kill): Use `mourn'.
13114 (linux_detach): Use `thread_db_detach', and `mourn'.
13115 (linux_mourn): New.
13116 (linux_attach_lwp_1): Adjust comment.
13117 (linux_attach): last_resume_kind moved the thread_info; adjust.
13118 (status_pending_p_callback): Adjust.
13119 (linux_wait_for_event_1): Adjust.
13120 (count_events_callback, select_singlestep_lwp_callback)
13121 (select_event_lwp_callback, cancel_breakpoints_callback)
13122 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13123 (proceed_one_lwp): Adjust.
13124 (linux_async): Add debug output.
13125 (linux_thread_stopped): New.
13126 (linux_pause_all): New.
13127 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13128 linux_pause_all.
13129 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13130 (thread_db_free): Delete declaration.
13131 (thread_db_detach, thread_db_mourn): Declare.
13132 * thread-db.c (thread_db_init): Use thread_db_mourn.
13133 (thread_db_free): Delete, split in two.
13134 (disable_thread_event_reporting): New.
13135 (thread_db_detach): New.
13136 (thread_db_mourn): New.
13137
13138 * server.h (struct thread_info) <last_resume_kind>: New field.
13139 <attached>: Add comment.
13140 <gdb_detached>: New field.
13141 (handler_func): Change return type to int.
13142 (handle_serial_event, handle_target_event): Ditto.
13143 (gdb_connected): Declare.
13144 (tracing): Delete.
13145 (disconnected_tracing): Declare.
13146 (stop_tracing): Declare.
13147
13148 * server.c (handle_query) <qSupported>: Report support for
13149 disconnected tracing.
13150 (queue_stop_reply_callback): Account for running threads.
13151 (gdb_wants_thread_stopped): New.
13152 (gdb_wants_all_threads_stopped): New.
13153 (gdb_reattached_process): New.
13154 (handle_status): Clear the `gdb_detached' flag of all processes.
13155 In all-stop, stop all threads.
13156 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13157 (process_serial_event): If the remote connection breaks, or if an
13158 exit was forced with "monitor exit", force an event loop exit.
13159 Handle disconnected tracing on detach.
13160 (handle_serial_event): Adjust.
13161 (handle_target_event): If GDB isn't connected, forward events back
13162 to the inferior, unless the last process exited, in which case,
13163 exit gdbserver. Adjust interface.
13164
13165 * remote-utils.c (remote_open): Don't block in accept. Instead
13166 register an event loop source on the listen socket file
13167 descriptor. Refactor bits into ...
13168 (listen_desc): ... this new global.
13169 (gdb_connected): ... this new function.
13170 (enable_async_notification): ... this new function.
13171 (handle_accept_event): ... this new function.
13172 (remote_close): Clear remote_desc.
13173
13174 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13175
13176 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13177 New fields.
13178 (mourn_inferior): Define.
13179 (target_process_qsupported): Avoid the dangling else problem.
13180 (thread_stopped): Define.
13181 (pause_all): Define.
13182 (target_waitstatus_to_string): Declare.
13183 * target.c (target_waitstatus_to_string): New.
13184
13185 * tracepoint.c (tracing): Make extern.
13186 (disconnected_tracing): New.
13187 (stop_tracing): Make extern. Handle tracing stops due to GDB
13188 disconnecting.
13189 (cmd_qtdisconnected): New.
13190 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13191 (handle_tracepoint_general_set): Handle QTDisconnected.
13192
13193 * event-loop.c (event_handler_func): Change return type to int.
13194 (process_event): Bail out if the event handler wants the event
13195 loop to stop.
13196 (handle_file_event): Ditto.
13197 (start_event_loop): Bail out if the event handler wants the event
13198 loop to stop.
13199
13200 * nto-low.c (nto_target_ops): Adjust.
13201 * spu-low.c (spu_wait): Don't remove the process here.
13202 (spu_target_ops): Adjust.
13203 * win32-low.c (win32_wait): Don't remove the process here.
13204 (win32_target_ops): Adjust.
13205
5d267c4c
PA
132062010-04-11 Pedro Alves <pedro@codesourcery.com>
13207
13208 * regcache.c (realloc_register_cache): Invalidate inferior's
13209 regcache before recreating it.
13210
623ccd72
PA
132112010-04-09 Pedro Alves <pedro@codesourcery.com>
13212
13213 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13214
219f2f23
PA
132152010-04-09 Stan Shebs <stan@codesourcery.com>
13216 Pedro Alves <pedro@codesourcery.com>
13217
13218 * server.h (LONGEST): New.
13219 (struct thread_info) <while_stepping>: New field.
13220 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13221 Declare.
13222 (initialize_tracepoint, handle_tracepoint_general_set)
13223 (handle_tracepoint_query, tracepoint_finished_step)
13224 (tracepoint_was_hit, release_while_stepping_state_list):
13225 (current_traceframe): Declare.
13226 * server.c (handle_general_set): Handle tracepoint packets.
13227 (read_memory): New.
13228 (write_memory): New.
13229 (handle_search_memory_1): Use read_memory.
13230 (handle_query): Report support for conditional tracepoints, trace
13231 state variables, and tracepoint sources. Handle tracepoint
13232 queries.
13233 (main): Initialize the tracepoints module.
13234 (process_serial_event): Handle traceframe reads/writes.
13235
13236 * linux-low.c (handle_tracepoints): New.
13237 (linux_wait_1): Call it.
13238 (linux_resume_one_lwp): Handle while-stepping.
13239 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13240 (linux_target_ops): Install them.
13241 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13242 New field.
13243 * linux-x86-low.c (x86_supports_tracepoints): New.
13244 (the_low_target). Install it.
13245
13246 * mem-break.h (delete_breakpoint): Declare.
13247 * mem-break.c (delete_breakpoint): Make external.
13248
13249 * target.h (struct target_ops): Add `supports_tracepoints',
13250 `read_pc', and `write_pc' fields.
13251 (target_supports_tracepoints): Define.
13252 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13253 (phex_nz): New.
13254
13255 * regcache.h (struct regcache) <registers_owned>: New field.
13256 (init_register_cache, regcache_cpy): Declare.
13257 (regcache_read_pc, regcache_write_pc): Declare.
13258 (register_cache_size): Declare.
13259 (supply_regblock): Declare.
13260 * regcache.c (init_register_cache): New.
13261 (new_register_cache): Use it.
13262 (regcache_cpy): New.
13263 (register_cache_size): New.
13264 (supply_regblock): New.
13265 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13266
219f2f23
PA
13267 * tracepoint.c: New.
13268
13269 * Makefile.in (OBS): Add tracepoint.o.
13270 (tracepoint.o): New rule.
13271
3a13a53b
L
132722010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13273
13274 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13275 (i386-mmx.o): New.
13276 (i386-mmx.c): Likewise.
13277 (i386-mmx-linux.o): Likewise.
13278 (i386-mmx-linux.c): Likewise.
13279
13280 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13281 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13282 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13283 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13284
13285 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13286 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13287 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13288
1570b33e
L
132892010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13290
13291 * Makefile.in (clean): Updated.
13292 (i386-avx.o): New.
13293 (i386-avx.c): Likewise.
13294 (i386-avx-linux.o): Likewise.
13295 (i386-avx-linux.c): Likewise.
13296 (amd64-avx.o): Likewise.
13297 (amd64-avx.c): Likewise.
13298 (amd64-avx-linux.o): Likewise.
13299 (amd64-avx-linux.c): Likewise.
13300
13301 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13302 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13303 (srv_amd64_regobj): Add amd64-avx.o.
13304 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13305 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13306 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13307 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13308 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13309 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13310 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13311
13312 * i387-fp.c: Include "i386-xstate.h".
13313 (i387_xsave): New.
13314 (i387_cache_to_xsave): Likewise.
13315 (i387_xsave_to_cache): Likewise.
13316 (x86_xcr0): Likewise.
13317
13318 * i387-fp.h (i387_cache_to_xsave): Likewise.
13319 (i387_xsave_to_cache): Likewise.
13320 (x86_xcr0): Likewise.
13321
13322 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13323 * linux-crisv32-low.c (target_regsets): Likewise.
13324 * linux-m68k-low.c (target_regsets): Likewise.
13325 * linux-mips-low.c (target_regsets): Likewise.
13326 * linux-ppc-low.c (target_regsets): Likewise.
13327 * linux-s390-low.c (target_regsets): Likewise.
13328 * linux-sh-low.c (target_regsets): Likewise.
13329 * linux-sparc-low.c (target_regsets): Likewise.
13330 * linux-xtensa-low.c (target_regsets): Likewise.
13331
13332 * linux-low.c: Include <sys/uio.h>.
13333 (regsets_fetch_inferior_registers): Support nt_type.
13334 (regsets_store_inferior_registers): Likewise.
13335 (linux_process_qsupported): New.
13336 (linux_target_ops): Add linux_process_qsupported.
13337
13338 * linux-low.h (regset_info): Add nt_type.
13339 (linux_target_ops): Add process_qsupported.
13340
13341 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13342 and <sys/uio.h>.
13343 (init_registers_i386_avx_linux): New.
13344 (init_registers_amd64_avx_linux): Likewise.
13345 (xmltarget_i386_linux_no_xml): Likewise.
13346 (xmltarget_amd64_linux_no_xml): Likewise.
13347 (PTRACE_GETREGSET): Likewise.
13348 (PTRACE_SETREGSET): Likewise.
13349 (x86_fill_xstateregset): Likewise.
13350 (x86_store_xstateregset): Likewise.
13351 (use_xml): Likewise.
13352 (x86_linux_update_xmltarget): Likewise.
13353 (x86_linux_process_qsupported): Likewise.
13354 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13355 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13356 init_registers_i386_linux here. Call
13357 x86_linux_update_xmltarget.
13358 (the_low_target): Add x86_linux_process_qsupported.
13359
13360 * server.c (handle_query): Call target_process_qsupported.
13361
13362 * target.h (target_ops): Add process_qsupported.
13363 (target_process_qsupported): New.
13364
fc7238bb
PA
133652010-04-03 Pedro Alves <pedro@codesourcery.com>
13366
13367 * inferiors.c (add_thread): Set last_status kind to
13368 TARGET_WAITKIND_IGNORE.
13369 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13370 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13371 (linux_wait_1): Move `thread' local definition to block that uses
13372 it. Don't NULL initialize `event_child'.
13373 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13374 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13375 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13376
bdabb078
PA
133772010-04-01 Pedro Alves <pedro@codesourcery.com>
13378
13379 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13380 an extended waitstatus, or by a watchpoint.
13381 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13382 thread was stepping or has been stopped by a watchpoint.
13383
d3bbe7a0
PA
133842010-04-01 Pedro Alves <pedro@codesourcery.com>
13385
13386 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13387 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13388 of another, then delete the previous, and validate all
13389 breakpoints.
13390 (validate_inserted_breakpoint): New.
13391 (delete_disabled_breakpoints): New.
13392 (validate_breakpoints): New.
13393 (check_mem_read): Validate breakpoints before trusting their
13394 shadow. Delete disabled breakpoints.
13395 (check_mem_write): Validate breakpoints before trusting they
13396 should be inserted. Delete disabled breakpoints.
13397 * mem-break.h (validate_breakpoints):
13398 * server.c (handle_query): Validate breakpoints when we see a
13399 qSymbol query.
13400
8b07ae33
PA
134012010-04-01 Pedro Alves <pedro@codesourcery.com>
13402
13403 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13404 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13405 if we could tell there's a GDB breakpoint at stop_pc.
13406 (need_step_over_p): Don't do a step over if we find a GDB
13407 breakpoint at the resume PC.
13408
13409 * mem-break.c (struct raw_breakpoint): New.
13410 (enum bkpt_type): New type `gdb_breakpoint'.
13411 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13412 fields. New field `raw'.
13413 (find_raw_breakpoint_at): New.
13414 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13415 breakpoint instead.
13416 (set_breakpoint_at): Adjust.
13417 (delete_raw_breakpoint): New.
13418 (release_breakpoint): New.
13419 (delete_breakpoint): Rename to...
13420 (delete_breakpoint_1): ... this. Add proc parameter. Use
13421 release_breakpoint. Return ENOENT.
13422 (delete_breakpoint): Reimplement.
13423 (find_breakpoint_at): Delete.
13424 (find_gdb_breakpoint_at): New.
13425 (delete_breakpoint_at): Delete.
13426 (set_gdb_breakpoint_at): New.
13427 (delete_gdb_breakpoint_at): New.
13428 (gdb_breakpoint_here): New.
13429 (set_reinsert_breakpoint): Use release_breakpoint.
13430 (uninsert_breakpoint): Rename to ...
13431 (uninsert_raw_breakpoint): ... this.
13432 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13433 (reinsert_raw_breakpoint): Change parameter type to
13434 raw_breakpoint.
13435 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13436 instead.
13437 (check_breakpoints): Adjust. Use release_breakpoint.
13438 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13439 (breakpoint_inserted_here): Ditto.
13440 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13441 Don't trust the breakpoint's shadow if it is not inserted.
13442 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13443 (delete_all_breakpoints): Adjust.
13444 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13445 use delete_breakpoint_1.
13446
13447 * mem-break.h (breakpoints_supported): Delete declaration.
13448 (set_gdb_breakpoint_at): Declare.
13449 (gdb_breakpoint_here): Declare.
13450 (delete_breakpoint_at): Delete.
13451 (delete_gdb_breakpoint_at): Declare.
13452
13453 * server.h (struct raw_breakpoint): Forward declare.
13454 (struct process_info): New field `raw_breakpoints'.
13455
13456 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13457 breakpoints.
13458
6bf5e0ba
PA
134592010-03-24 Pedro Alves <pedro@codesourcery.com>
13460
13461 * linux-low.c (status_pending_p_callback): Fix comment.
13462 (linux_wait_for_event_1): Move most of the internal breakpoint
13463 handling from here...
13464 (linux_wait_1): ... to here.
13465 (count_events_callback): New.
13466 (select_singlestep_lwp_callback): New.
13467 (select_event_lwp_callback): New.
13468 (cancel_breakpoints_callback): New.
13469 (select_event_lwp): New.
13470 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13471 priority to all LWPs that have had events that should be reported
13472 to the client. Cancel breakpoints when about to reporting the
13473 event to the client, not while stopping lwps. No longer cancel
13474 finished single-steps here.
13475 (cancel_finished_single_step): Delete.
13476 (cancel_finished_single_steps): Delete.
13477
414a389f
PA
134782010-03-24 Pedro Alves <pedro@codesourcery.com>
13479
13480 * mem-break.c (enum bkpt_type): New.
13481 (struct breakpoint): New field `type'.
13482 (set_breakpoint_at): Change return type to struct breakpoint
13483 pointer. Set type to `other_breakpoint' by default.
13484 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13485 in the breakpoint list.
13486 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13487 (reinsert_breakpoint): Rename to ...
13488 (reinsert_raw_breakpoint): ... this.
13489 (reinsert_breakpoints_at): Adjust.
13490 * mem-break.h (struct breakpoint): Declare.
13491 (set_breakpoint_at): Change return type to struct breakpoint
13492 pointer.
13493
2280c721
PA
134942010-03-24 Pedro Alves <pedro@codesourcery.com>
13495
13496 * server.c (handle_query): Assign, not compare.
13497
d50171e4
PA
134982010-03-24 Pedro Alves <pedro@codesourcery.com>
13499
13500 Teach linux gdbserver to step-over-breakpoints.
13501
13502 * linux-low.c (can_hardware_single_step): New.
13503 (supports_breakpoints): New.
13504 (handle_extended_wait): If stopping threads, read the stop pc of
13505 the new cloned LWP.
13506 (get_pc): New.
13507 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13508 low target doesn't support retrieving the PC.
13509 (add_lwp): Set last_resume_kind to resume_continue.
13510 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13511 (linux_attach): Don't clear stop_expected. Set the lwp's
13512 last_resume_kind to resume_stop.
13513 (linux_detach_one_lwp): Don't check for removed breakpoints.
13514 (check_removed_breakpoint): Delete.
13515 (status_pending_p): Rename to ...
13516 (status_pending_p_callback): ... this. Don't check for removed
13517 breakpoints. Don't consider threads that are stopped from GDB's
13518 perspective.
13519 (linux_wait_for_lwp): Always read the stop_pc here.
13520 (cancel_breakpoint): New.
13521 (step_over_bkpt): New global.
13522 (linux_wait_for_event_1): Implement stepping over breakpoints.
13523 (gdb_wants_lwp_stopped): New.
13524 (gdb_wants_all_stopped): New.
13525 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13526 single-step traps here. Store the thread's last reported target
13527 wait status.
13528 (send_sigstop): Don't clear stop_expected. Always set it,
13529 instead.
13530 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13531 (cancel_finished_single_step): New.
13532 (cancel_finished_single_steps): New.
13533 (wait_for_sigstop): Don't cancel finished single-step traps here.
13534 (linux_resume_one_lwp): Don't check for removed breakpoints.
13535 Don't set `step' on non-hardware step archs.
13536 (linux_set_resume_request): Ignore resume_stop requests if already
13537 stopping or stopped. Set the lwp's last_resume_kind.
13538 (resume_status_pending_p): Don't check for removed breakpoints.
13539 (need_step_over_p): New.
13540 (start_step_over): New.
13541 (finish_step_over): New.
13542 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13543 requests. Clear the thread's last reported target waitstatus.
13544 Don't use the `suspended' flag. Don't consider pending breakpoints.
13545 (linux_resume): Start a step-over if necessary.
13546 (proceed_one_lwp): New.
13547 (proceed_all_lwps): New.
13548 (unstop_all_lwps): New.
13549 * linux-low.h (struct lwp_info): Rewrite comment for the
13550 `suspended' flag. Add the `stop_pc' field. Delete the
13551 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13552 Add `'last_resume_kind' and `need_step_over' fields.
13553 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13554 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13555 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13556 (set_raw_breakpoint_at): New.
13557 (set_breakpoint_at): Rewrite to use it.
13558 (reinsert_breakpoint_handler): Delete.
13559 (set_reinsert_breakpoint): New.
13560 (reinsert_breakpoint_by_bp): Delete.
13561 (delete_reinsert_breakpoints): New.
13562 (uninsert_breakpoint): Rewrite.
13563 (uninsert_breakpoints_at): New.
13564 (reinsert_breakpoint): Rewrite.
13565 (reinsert_breakpoints_at): New.
13566 (check_breakpoints): Rewrite.
13567 (breakpoint_here): New.
13568 (breakpoint_inserted_here): New.
13569 (check_mem_read): Adjust.
13570 * mem-break.h (breakpoints_supported, breakpoint_here)
13571 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13572 (reinsert_breakpoint_by_bp): Delete declaration.
13573 (delete_reinsert_breakpoints): Declare.
13574 (reinsert_breakpoint): Delete declaration.
13575 (reinsert_breakpoints_at): Declare.
13576 (uninsert_breakpoint): Delete declaration.
13577 (uninsert_breakpoints_at): Declare.
13578 (check_breakpoints): Adjust prototype.
13579 * server.h: Adjust include order.
13580 (struct thread_info): Declare here. Add a `last_status' field.
13581
30ba68cb
MS
135822010-03-23 Michael Snyder <msnyder@vmware.com>
13583
13584 * server.c (crc32): New function.
13585 (handle_query): Add handling for 'qCRC:' request.
13586
b9a881c2
PA
135872010-03-23 Pedro Alves <pedro@codesourcery.com>
13588
13589 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13590 lwp had been stopped by a watchpoint.
13591
e92d13d5
PA
135922010-03-16 Pedro Alves <pedro@codesourcery.com>
13593
13594 * server.h (internal_error): Declare.
13595 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13596 * utils.c (internal_error): New function.
13597
64daa791
AS
135982010-03-15 Andreas Schwab <schwab@redhat.com>
13599
13600 * configure.srv: Fix typo setting srv_regobj.
13601
f52cd8cd
PA
136022010-03-15 Pedro Alves <pedro@codesourcery.com>
13603
13604 * linux-low.c (fetch_register): Avoid passing a non string literal
13605 format to `error'.
13606 (usr_store_inferior_registers): Ditto.
13607
93ae6fdc
PA
136082010-03-14 Pedro Alves <pedro@codesourcery.com>
13609
13610 * linux-low.c (linux_write_memory): Bail out early if peeking
13611 memory failed.
13612
c3adc08c
PA
136132010-03-14 Pedro Alves <pedro@codesourcery.com>
13614
13615 * linux-low.h (struct lwp_info): New fields
13616 `stopped_by_watchpoint' and `stopped_data_address'.
13617 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13618 here, and cache them in the lwp object.
13619 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13620 directly.
13621 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13622 field.
13623 (linux_stopped_by_watchpoint): Rewrite.
13624 (linux_stopped_data_address): Rewrite.
13625
bce522a2
PA
136262010-03-06 Simo Melenius <simo.melenius@iki.fi>
13627
13628 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13629 switching the current inferior, not before.
13630
90884b2b
L
136312010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13632
13633 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13634 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13635 i386-linux.c and amd64-linux.c.
13636 (reg-i386.o): Removed.
13637 (reg-i386.c): Likewise.
13638 (reg-i386-linux.o): Likewise.
13639 (reg-i386-linux.c): Likewise.
13640 (reg-x86-64.o): Likewise.
13641 (reg-x86-64.c): Likewise.
13642 (reg-x86-64-linux.o): Likewise.
13643 (reg-x86-64-linux.c): Likewise.
13644 (i386.o): New.
13645 (i386.c): Likewise.
13646 (i386-linux.o): Likewise.
13647 (i386-linux.c): Likewise.
13648 (amd64.o): Likewise.
13649 (amd64.c): Likewise.
13650 (amd64-linux.o): Likewise.
13651 (amd64-linux.c): Likewise.
13652
13653 * configure.srv (srv_i386_regobj): New.
13654 (srv_i386_linux_regobj): Likewise.
13655 (srv_amd64_regobj): Likewise.
13656 (srv_amd64_linux_regobj): Likewise.
13657 (srv_i386_32bit_xmlfiles): Likewise.
13658 (srv_i386_64bit_xmlfiles): Likewise.
13659 (srv_i386_xmlfiles): Likewise.
13660 (srv_amd64_xmlfiles): Likewise.
13661 (srv_i386_linux_xmlfiles): Likewise.
13662 (srv_amd64_linux_xmlfiles): Likewise.
13663 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13664 srv_xmlfiles to $srv_i386_xmlfiles.
13665 (i[34567]86-*-mingw32ce*): Likewise.
13666 (i[34567]86-*-mingw*): Likewise.
13667 (i[34567]86-*-nto*): Likewise.
13668 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13669 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13670 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13671 (x86_64-*-linux*): Likewise.
13672
13673 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13674 (init_registers_amd64_linux): New.
13675 (x86_arch_setup): Replace init_registers_x86_64_linux with
13676 init_registers_amd64_linux.
13677
193f13e6
MK
136782010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13679
13680 * configure.ac: Check for libdl. If it is not available link against
13681 static libthread_db.
13682 * configure: Regenerate.
13683
85d721b8
PA
136842010-02-22 Pedro Alves <pedro@codesourcery.com>
13685
13686 PR9605
13687
13688 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13689 handing a read watchpoint.
13690 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13691
6076632b
DE
136922010-02-12 Doug Evans <dje@google.com>
13693
13694 * linux-low.c (linux_supports_tracefork_flag): Document.
13695 (linux_look_up_symbols): Add comment.
13696
3327ccf7
L
136972010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13698
13699 * regcache.c (supply_register): Clear regcache if buf is NULL.
13700
0718675c 137012010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13702 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13703
13704 * inferiors.c (find_inferior): Add function documentation.
13705 (unloaded_dll): Handle the case where the unloaded dll has not
13706 been previously registered in the dll list.
13707
177321bd
DJ
137082010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13709
13710 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13711 (thumb2_breakpoint): New.
13712 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13713
2b009048
DJ
137142010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13715
13716 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13717 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13718 breakpoints.
13719
3be029c7
PA
137202010-01-21 Pedro Alves <pedro@codesourcery.com>
13721
13722 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13723
18f5de3b
JK
137242010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13725
13726 * linux-s390-low.c (s390_collect_ptrace_register)
13727 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13728
3743bb4f
DE
137292010-01-21 Doug Evans <dje@google.com>
13730
14ce3065
DE
13731 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13732 (PTRACE_ARG4_TYPE): New macro.
13733 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13734 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13735 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13736 (usr_store_inferior_registers): Ditto.
13737 (linux_read_memory, linux_write_memory): Ditto.
13738 (linux_test_for_tracefork): Ditto.
13739
3743bb4f
DE
13740 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13741 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13742
8b315be5
PA
137432010-01-21 Pedro Alves <pedro@codesourcery.com>
13744
13745 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13746 target.
13747
85492558
PA
137482010-01-21 Pedro Alves <pedro@codesourcery.com>
13749
13750 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13751 prototype to take a regcache. Adjust.
13752
442ea881
PA
137532010-01-20 Pedro Alves <pedro@codesourcery.com>
13754
13755 * regcache.h (struct thread_info): Forward declare.
13756 (struct regcache): New.
13757 (new_register_cache): Adjust prototype.
13758 (get_thread_regcache): Declare.
13759 (free_register_cache): Adjust prototype.
13760 (registers_to_string, registers_from_string): Ditto.
13761 (supply_register, supply_register_by_name, collect_register)
13762 (collect_register_as_string, collect_register_by_name): Ditto.
13763 * regcache.c (struct inferior_regcache_data): Delete.
13764 (get_regcache): Rename to ...
13765 (get_thread_regcache): ... this. Adjust. Switch inferior before
13766 fetching registers.
13767 (regcache_invalidate_one): Adjust.
13768 (regcache_invalidate): Fix prototype.
13769 (new_register_cache): Return the new register cache.
13770 (free_register_cache): Change prototype.
13771 (realloc_register_cache): Adjust.
13772 (registers_to_string): Change prototype to take a regcache. Adjust.
13773 (registers_from_string): Ditto.
13774 (register_data): Ditto.
13775 (supply_register): Ditto.
13776 (supply_register_by_name): Ditto.
13777 (collect_register): Ditto.
13778 (collect_register_as_string): Ditto.
13779 (collect_register_by_name): Ditto.
13780 * server.c (process_serial_event): Adjust.
13781 * linux-low.h (regset_fill_func, regset_store_func): Change
13782 prototype.
13783 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13784 Change prototype.
13785 * linux-low.c (get_stop_pc): Adjust.
13786 (check_removed_breakpoint): Adjust.
13787 (linux_wait_for_event): Adjust.
13788 (linux_resume_one_lwp): Adjust.
13789 (fetch_register): Add regcache parameter. Adjust.
13790 (usr_store_inferior_registers): Ditto.
13791 (regsets_fetch_inferior_registers): Ditto.
13792 (regsets_store_inferior_registers): Ditto.
13793 (linux_fetch_registers, linux_store_registers): Ditto.
13794 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13795 regcache. Adjust.
43aaf8b6
PA
13796 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13797 Ditto.
442ea881
PA
13798 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13799 prototype to take a regcache.
13800 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13801 * remote-utils.c (convert_ascii_to_int, outreg)
13802 (prepare_resume_reply): Change prototype to take a regcache.
13803 Adjust.
13804 * target.h (struct target_ops) <fetch_registers, store_registers>:
13805 Change prototype to take a regcache.
13806 (fetch_inferior_registers, store_inferior_registers): Change
13807 prototype to take a regcache. Adjust.
13808 * proc-service.c (ps_lgetregs): Adjust.
13809 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13810 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13811 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13812 take a regcache. Adjust.
13813 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13814 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13815 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13816 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13817 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13818 (cris_cannot_fetch_register):
13819 (cris_breakpoint_at): Change prototype to take a regcache.
13820 Adjust.
13821 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13822 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13823 to take a regcache. Adjust.
13824 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13825 Adjust.
13826 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13827 take a regcache. Adjust.
13828 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13829 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13830 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13831 * linux-mips-low.c (mips_get_pc):
13832 (mips_set_pc): Change prototype to take a regcache. Adjust.
13833 (mips_reinsert_addr): Adjust.
13834 (mips_collect_register): Change prototype to take a regcache.
13835 Adjust.
13836 (mips_supply_register):
13837 (mips_collect_register_32bit, mips_supply_register_32bit)
13838 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13839 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13840 * linux-ppc-low.c (ppc_supply_ptrace_register)
13841 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13842 (parse_spufs_run): Adjust.
13843 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13844 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13845 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13846 take a regcache. Adjust.
13847 * linux-s390-low.c (s390_collect_ptrace_register)
13848 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13849 (s390_set_pc): Change prototype to take a regcache. Adjust.
13850 (s390_arch_setup): Adjust.
13851 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13852 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13853 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13854 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13855 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13856 regcache. Adjust.
13857 (sparc_breakpoint_at): Adjust.
13858 * linux-xtensa-low.c (xtensa_fill_gregset):
13859 (xtensa_store_gregset):
13860 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13861 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13862 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13863 prototype to take a regcache. Adjust.
13864 * win32-arm-low.c (arm_fetch_inferior_register)
13865 (arm_store_inferior_register): Change prototype to take a
13866 regcache. Adjust.
13867 * win32-i386-low.c (i386_fetch_inferior_register)
13868 (i386_store_inferior_register): Change prototype to take a
13869 regcache. Adjust.
13870 * win32-low.c (child_fetch_inferior_registers)
13871 (child_store_inferior_registers): Change prototype to take a
13872 regcache. Adjust.
13873 (win32_wait): Adjust.
13874 (win32_fetch_inferior_registers): Change prototype to take a
13875 regcache. Adjust.
13876 (win32_store_inferior_registers): Adjust.
13877 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13878 store_inferior_register>: Change prototype to take a regcache.
13879
60c3d7b0
DE
138802010-01-20 Doug Evans <dje@google.com>
13881
13882 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13883 #ifdef.
13884 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13885 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13886
dc146f7c
VP
138872010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13888
13889 * linux-low.c (linux_core_of_thread): New.
13890 (compare_ints, show_process, list_threads): New.
13891 (linux_qxfer_osdata): Report threads and cores.
13892 (linux_target_op): Register linux_core_of_thread.
13893 * remote-utils.c (prepare_resume_reply): Report the core.
13894 (buffer_xml_printf): Support %d specifier.
13895 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13896 New.
13897 (handle_query): Handle qXfer:threads. Announce availability
13898 thereof.
13899 * target.h (struct target_ops): New field core_of_thread.
13900
7803799a
UW
139012010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13902
13903 * Makefile.in (clean): Remove new generated files.
13904 (reg-s390.o, reg-s390.c): Remove rules.
13905 (reg-s390x.o, reg-s390x.c): Likewise.
13906 (s390-linux32.o, s390-linux32.c): Add rules.
13907 (s390-linux64.o, s390-linux64.c): Likewise.
13908 (s390x-linux64.o, s390x-linux64.c): Likewise.
13909 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13910 * linux-s390-low.c: Include <elf.h>.
13911 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13912 (init_registers_s390): Remove prototype.
13913 (init_registers_s390x): Likewise.
13914 (init_registers_s390_linux32): Add prototype.
13915 (init_registers_s390_linux64): Likewise.
13916 (init_registers_s390x_linux64): Likewise.
13917 (s390_num_regs_3264): New define.
13918 (s390_regmap_3264): New global variable.
13919 (s390_cannot_fetch_register): Remove obsolete check.
13920 (s390_cannot_store_register): Likewise.
13921 (s390_collect_ptrace_register): Handle upper/lower register halves.
13922 (s390_supply_ptrace_register): Likewise.
13923 (s390_fill_gregset): Update to register number changes.
13924 (s390_get_hwcap): New routine.
13925 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13926 Install appropriate regmap and register set.
13927
6e7ffa39
JB
139282010-01-01 Joel Brobecker <brobecker@adacore.com>
13929
13930 * server.c (gdbserver_version): Update copyright year to 2010.
13931 * gdbreplay.c (gdbreplay_version): Likewise.
13932
957f3f49
DE
139332009-12-28 Doug Evans <dje@google.com>
13934
13935 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13936 elf/external.h. Include <elf.h> instead but only if necessary.
13937
ca5c370d
PA
139382009-12-28 Pedro Alves <pedro@codesourcery.com>
13939
13940 * linux-low.c (linux_remove_process): Remove `detaching'
13941 parameter. Don't release/detach from thread_db here.
13942 (linux_kill): Release/detach from thread_db here, ...
13943 (linux_detach): ... and here, before actually detaching.
13944 (linux_wait_1): ... and here, when a process exits.
13945 * thread-db.c (any_thread_of): New.
13946 (thread_db_free): Switch the current inferior to a thread of the
13947 passed in process.
13948
4ee62156
DE
139492009-12-21 Doug Evans <dje@google.com>
13950
d90e6a88
DE
13951 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13952
c5f62d5f
DE
13953 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13954 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13955 warning ifndef __NR_tkill. Move setting of errno there too.
13956 Delete unnecessary resetting of errno after syscall.
13957 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13958
10e86dd7
DE
13959 * configure.ac: Check for dladdr.
13960 * config.in: Regenerate.
13961 * configure: Regenerate.
13962 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13963 (try_thread_db_load): Update.
13964
4ee62156
DE
13965 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13966
00f515da
DE
139672009-12-18 Doug Evans <dje@google.com>
13968
e9464885
DE
13969 * event-loop.c: Include unistd.h if it exists.
13970
07d4f67e
DE
13971 * linux-low.c (my_waitpid): Move definition away from being in
13972 between linux_tracefork_child/linux_test_for_tracefork.
13973
00f515da
DE
13974 * gdb_proc_service.h (psaddr_t): Fix type.
13975 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13976 signature to match glibc.
13977
1de1badb
DE
139782009-12-16 Doug Evans <dje@google.com>
13979
13980 * linux-low.c (linux_read_memory): Fix argument to read.
13981
aeeb81d1
PA
139822009-11-26 Pedro Alves <pedro@codesourcery.com>
13983
13984 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13985 events, don't leave current_inferior pointing at null.
13986
10357975
PA
139872009-11-26 Pedro Alves <pedro@codesourcery.com>
13988
13989 * win32-low.c (LOG): Delete.
13990 (OUTMSG): Output to stderr.
13991 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13992 on compile time LOG macro.
13993 (win32_wait): Fix debug output.
13994
cf6e3471
PA
139952009-11-26 Pedro Alves <pedro@codesourcery.com>
13996
13997 * win32-low.c (win32_add_one_solib): If the dll name is
13998 "ntdll.dll", prepend the system directory to the dll path.
13999
0c85e18e
MK
140002009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14001
14002 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14003
9ac544ce 140042009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14005 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14006
14007 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14008 * configure.ac: Check for __mcoldfire__ and set
14009 gdb_cv_m68k_is_coldfire.
14010 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14011 reg-cf.o and reg-m68k.o.
14012 * configure: Regenerated.
14013
fd7dd3e6
PA
140142009-11-16 Pedro Alves <pedro@codesourcery.com>
14015
14016 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14017 Pass it to thread_db_free.
14018 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14019 proper `detaching' argument to linux_remove_process.
14020 * linux-low.h (thread_db_free): Add `detaching' parameter.
14021 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14022 to thread_db_free.
14023 (thread_db_free): Add `detaching' parameter. Only
14024 call td_ta_clear_event if detaching from process.
14025
75aa492e
MK
140262009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14027
14028 * thread-db.c (thread_db_free): Fix typo.
14029
21e1bee4
PP
140302009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14031
14032 PR gdb/10838
14033 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14034
8838b45e
NS
140352009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14036
14037 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14038 with an i686 compiler.
14039 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14040 needed.
14041 * configure: Rebuilt.
14042
8a35fb51
SL
140432009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14044
14045 PR gdb/10783
14046
14047 * server.c (handle_search_memory_1): Correct read_addr initialization
14048 in loop for searching subsequent chunks.
14049
96f15937
PP
140502009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14051
14052 * configure.ac: New --with-libthread-db option.
14053 * thread-db.c: Allow direct dependence on libthread_db.
14054 (thread_db_free): Adjust.
14055 * config.in: Regenerate.
14056 * configure: Likewise.
889bf7c5 14057
5f7d1694
PP
140582009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14059
14060 PR gdb/10757
14061 * thread-db.c (attach_thread): New function.
14062 (maybe_attach_thread): Return success/failure.
14063 (find_new_threads_callback): Adjust.
889bf7c5
PA
14064 (thread_db_find_new_threads): Loop until no new threads.
14065
88e3b899
PA
140662009-10-13 Pedro Alves <pedro@codesourcery.com>
14067
14068 * proc-service.c (ps_lgetregs): Formatting.
14069
cdbfd419
PP
140702009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14071
14072 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14073 * configure.ac: Adjust.
14074 * linux-low.h (struct process_info_private): Move members to struct
14075 thread_db.
14076 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14077 * linux-low.c (linux_remove_process): Adjust.
14078 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14079 * server.c (handle_query): Move code ...
14080 (handle_monitor_command): ... here. New function.
14081 * target.h (struct target_ops): New member.
14082 * thread-db.c (struct thread_db): New.
14083 (libthread_db_search_path): New variable.
14084 (thread_db_create_event, thread_db_enable_reporting)
14085 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14086 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14087 (try_thread_db_load_1, dladdr_to_soname): New functions.
14088 (try_thread_db_load, thread_db_load_search): New functions.
14089 (thread_db_init): Search for libthread_db.
14090 (thread_db_free): New function.
14091 (thread_db_handle_monitor_command): Likewise.
14092 * config.in: Regenerate.
14093 * configure: Regenerate.
889bf7c5 14094
4168d2d6
UW
140952009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14096
14097 * spu-low.c (spu_kill): Wait for inferior to terminate.
14098 Call clear_inferiors.
14099 (spu_detach): Call clear_inferiors.
14100
81ecdfbb
RW
141012009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14102
14103 * aclocal.m4: Regenerate.
14104 * config.in: Likewise.
14105 * configure: Likewise.
14106
0b9ff2c0
UW
141072009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14108
14109 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14110 (parse_spufs_run): New function.
14111 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14112 (ppc_breakpoint_at): Handle SPU breakpoints.
14113
efcbbd14
UW
141142009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14115
14116 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14117 (SPUFS_MAGIC): Define.
14118 (spu_enumerate_spu_ids): New function.
14119 (linux_qxfer_spu): New function.
14120 (linux_target_ops): Install linux_qxfer_spu.
14121
f4d9bade
UW
141222009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14123
14124 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14125 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14126 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14127 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14128 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14129 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14130 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14131 (init_registers_powerpc_cell32l): Add prototype.
14132 (init_registers_powerpc_cell64l): Likewise.
14133 (ppc_arch_setup): Detect Cell/B.E. architecture.
14134
96e946ca
RW
141352009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14136
14137 * Makefile.in (datarootdir): New variable.
14138
58d6951d
DJ
141392009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14140
14141 * linux-low.c (linux_write_memory): Update debugging output.
14142 * Makefile.in (clean): Add new descriptions.
14143 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14144 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14145 * configure.srv: Add new files for arm*-*-linux*.
14146 * linux-arm-low.c: Add new declarations.
14147 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14148 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14149 (HWCAP_VFPv3D16): New.
14150 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14151 instead of __IWMMXT__.
14152 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14153 (arm_arch_setup): New.
14154 (target_regsets): Remove #ifdef. Add VFP regset.
14155 (the_low_target): Use arm_arch_setup.
14156
12b42a12
DJ
141572009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14158
14159 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14160 the main thread again.
14161
ac8c974e
AR
141622009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14163
14164 Adding Neutrino gdbserver.
14165 * configure: Regenerated.
14166 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14167 * configure.srv (i[34567]86-*-nto*): New target.
14168 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14169 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14170 (nto_comctrl) [__QNX__]: New function.
14171 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14172
4424e0c3 141732009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14174
14175 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14176 srv_tgtobj.
14177
912cf4ba
PA
141782009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14179 Pedro Alves <pedro@codesourcery.com>
14180
14181 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14182 don't support CONTEXT_EXTENDED_REGISTERS.
14183 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14184 (the_low_target): Install them.
14185 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14186 failing with ERROR_PIPE_NOT_CONNECTED.
14187
aa5ca48f
DE
141882009-06-30 Doug Evans <dje@google.com>
14189 Pierre Muller <muller@ics.u-strasbg.fr>
14190
14191 Add h/w watchpoint support to x86-linux, win32-i386.
14192 * Makefile.in (SFILES): Add i386-low.c
14193 (i386_low_h): Define.
14194 (i386-low.o): Add dependencies.
14195 (linux-x86-low.o): Add i386-low.h dependency.
14196 (win32-i386-low.o): Ditto.
14197 * i386-low.c: New file.
14198 * i386-low.h: New file.
14199 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14200 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14201 * linux-low.c (linux_add_process): Initialize arch_private.
14202 (linux_remove_process): Free arch_private.
14203 (add_lwp): Initialize arch_private.
14204 (delete_lwp): Free arch_private.
14205 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14206 provided.
14207 * linux-low.h (process_info_private): New member arch_private.
14208 (lwp_info): New member arch_private.
14209 (linux_target_ops): New members new_process, new_thread,
14210 prepare_to_resume.
14211 (ptid_of): New macro.
14212 * linux-x86-low.c: Include stddef.h, i386-low.h.
14213 (arch_process_info): New struct.
14214 (arch_lwp_info): New struct.
14215 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14216 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14217 (i386_dr_low_get_status): New function.
14218 (x86_insert_point, x86_remove_point): New functions.
14219 (x86_stopped_by_watchpoint): New function.
14220 (x86_stopped_data_address): New function.
14221 (x86_linux_new_process, x86_linux_new_thread): New functions.
14222 (x86_linux_prepare_to_resume): New function.
14223 (the_low_target): Add entries for insert_point, remove_point,
14224 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14225 prepare_to_resume.
14226 * server.c (debug_hw_points): New global.
14227 (monitor_show_help): Document set debug-hw-points.
14228 (handle_query): Process "set debug-hw-points".
14229 * server.h (debug_hw_points): Declare.
14230 (paddress): Declare.
14231 * utils.c (NUMCELLS, CELLSIZE): New macros.
14232 (get_sell, xsnprintf, paddress): New functions.
14233 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14234 remove_point, stopped_by_watchpoint, stopped_data_address.
14235 * win32-i386-low.c: Include i386-low.h.
14236 (debug_reg_state): Replaces dr.
14237 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14238 (i386_dr_low_get_status): New function.
14239 (i386_insert_point, i386_remove_point): New functions.
14240 (i386_stopped_by_watchpoint): New function.
14241 (i386_stopped_data_address): New function.
14242 (i386_initial_stuff): Update.
14243 (get_thread_context,set_thread_context,i386_thread_added): Update.
14244 (the_low_target): Add entries for insert_point,
14245 remove_point, stopped_by_watchpoint, stopped_data_address.
14246 * win32-low.c (win32_insert_watchpoint): New function.
14247 (win32_remove_watchpoint): New function.
14248 (win32_stopped_by_watchpoint): New function.
14249 (win32_stopped_data_address): New function.
14250 (win32_target_ops): Add entries for insert_watchpoint,
14251 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14252 * win32-low.h (win32_target_ops): New members insert_point,
14253 remove_point, stopped_by_watchpoint, stopped_data_address.
14254
d993e290
PA
142552009-06-25 Pedro Alves <pedro@codesourcery.com>
14256
14257 * server.c (process_serial_event): Re-return unsupported, not
14258 error, if the type isn't recognized. Re-allow supporting only
14259 insert or remove packets. Also call require_running for
14260 breakpoints. Add missing break statement to default case. Tidy.
14261 * target.h (struct target_ops): Rename insert_watchpoint to
14262 insert_point, and remove_watchpoint to remove_point.
14263
14264 * linux-low.h (struct linux_target_ops): Likewise.
14265 * linux-low.c (linux_insert_watchpoint): Rename to ...
14266 (linux_insert_point): ... this. Adjust.
14267 (linux_remove_watchpoint): Rename to ...
14268 (linux_remove_point): ... this. Adjust.
14269 (linux_target_ops): Adjust.
14270 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14271 (cris_insert_point): ... this.
14272 (cris_remove_watchpoint): Rename to ...
14273 (cris_remove_point): ... this.
14274 (the_low_target): Adjust.
14275
0f54c268
PM
142762009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14277
14278 * server.c (handle_v_kill): Pass signal_pid to
14279 kill_inferior if multi_process is zero.
14280
c6314022
AR
142812009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14282
14283 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14284 * target.h (target_ops): Comment for *_watchpoint to make it clear
14285 the functions can get types '0' and '1'.
14286
4463ce24
AR
142872009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14288
14289 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14290 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14291 * regcache.c (get_regcache): Likewise.
14292 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14293 * win32-low.c (child_fetch_inferior_registers): Remove check for
14294 regno 0.
14295
cf8fd78b
PA
142962009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14297 Pedro Alves <pedro@codesourcery.com>
14298
14299 * target.h (struct target_ops) <supports_multi_process>: New
14300 callback.
14301 (target_supports_multi_process): New.
14302 * server.c (handle_query): Even if GDB reports support, only
14303 enable multi-process if the target also supports it. Report
14304 multi-process support only if the target backend supports it.
14305 * linux-low.c (linux_supports_multi_process): New function.
14306 (linux_target_ops): Install it as target_supports_multi_process
14307 callback.
14308
47c0c975
DE
143092009-05-24 Doug Evans <dje@google.com>
14310
e09875d4
DE
14311 Global renaming of find_thread_pid to find_thread_ptid.
14312 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14313 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14314 All callers updated.
14315
e27d73f6
DE
14316 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14317 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14318 directly.
14319
47c0c975
DE
14320 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14321 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14322 (linux_resume_one_lwp): Ditto.
14323
2acc282a
DE
143242009-05-23 Doug Evans <dje@google.com>
14325
14326 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14327 from struct inferior_list_entry * to struct lwp_info *.
14328 All callers updated.
14329
9f1036c1
DE
143302009-05-13 Doug Evans <dje@google.com>
14331
14332 * linux-x86-low.c: Don't include assert.h.
14333 (x86_siginfo_fixup): Use fatal, not assert.
14334 (x86_arch_setup): Fix comment.
14335
d0722149
DE
143362009-05-12 Doug Evans <dje@google.com>
14337
14338 Biarch support for i386/amd64 gdbserver.
14339 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14340 Add linux-x86-low.c.
14341 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14342 (linux-x86-low.o): Add.
14343 * linux-x86-64-low.c: Delete.
14344 * linux-i386-low.c: Delete.
14345 * linux-x86-low.c: New file.
14346 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14347 linux-x86-low.o.
14348 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14349 linux-x86-low.o.
14350 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14351 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14352 (linux_child_pid_to_exec_file): New function.
14353 (elf_64_header_p, elf_64_file_p): New functions.
14354 (siginfo_fixup): New function.
14355 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14356 give target a chance to convert layout.
14357 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14358 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14359
fdeb2a12
DE
143602009-05-07 Doug Evans <dje@google.com>
14361
14362 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14363 (regsets_store_inferior_registers): Ditto.
14364
a6dbe5df
PA
143652009-05-06 Pedro Alves <pedro@codesourcery.com>
14366
14367 PR server/10048
14368
14369 * linux-low.c (must_set_ptrace_flags): Delete.
14370 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14371 of the global.
14372 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14373 `lwp->must_set_ptrace_flags' instead.
ba42693b 14374 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14375 (linux_wait_1): ... not here.
14376
5091eb23
DE
143772009-04-30 Doug Evans <dje@google.com>
14378
9f767825
DE
14379 * inferiors.c (started_inferior_callback): New function.
14380 (attached_inferior_callback): New function.
14381 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14382 * server.c (print_started_pid, print_attached_pid): New functions.
14383 (detach_or_kill_for_exit): New function.
14384 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14385 * server.h (have_started_inferiors_p): Declare.
14386 (have_attached_inferiors_p): Declare.
14387
5091eb23
DE
14388 * inferiors.c (remove_process): Fix memory leak, free process.
14389 * linux-low.c (linux_remove_process): New function.
14390 (linux_kill): Call it instead of remove_process.
14391 (linux_detach, linux_wait_1): Ditto.
14392
155c8968
PA
143932009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14394
14395 * configure.srv: Add x86 Windows CE target.
14396
7fe519cb
UW
143972009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14398
14399 * inferiors.c (get_thread_process): Make global.
14400 * server.h (get_thread_process): Add prototype.
14401 * thread-db.c (find_one_thread): Use get_thread_process
14402 instead of current_process.
14403 (thread_db_get_tls_address): Do not crash if called when
14404 thread layer is not yet initialized.
14405
5472f405
UW
144062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14407
14408 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14409 * spu-low.c (current_tid): Rename to ...
14410 (current_ptid): ... this.
14411 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14412 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14413 ptid_get_lwp (current_ptid) instead of current_tid.
14414 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14415 instead of current_tid. Use find_process_pid to verify pid
14416 argument is valid. Pass proper argument to remove_process.
14417 (spu_thread_alive): Compare current_ptid instead of current_tid.
14418 (spu_resume): Likewise.
14419
55ac2b99
PA
144202009-04-02 Pedro Alves <pedro@codesourcery.com>
14421
14422 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14423 variable.
14424
95954743
PA
144252009-04-01 Pedro Alves <pedro@codesourcery.com>
14426
14427 Implement the multiprocess extensions, and add linux multiprocess
14428 support.
14429
14430 * server.h (ULONGEST): Declare.
14431 (struct ptid, ptid_t): New.
14432 (minus_one_ptid, null_ptid): Declare.
14433 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14434 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14435 (struct inferior_list_entry): Change `id' type from unsigned from
14436 to ptid_t.
14437 (struct sym_cache, struct breakpoint, struct
14438 process_info_private): Forward declare.
14439 (struct process_info): Declare.
14440 (current_process): Declare.
14441 (all_processes): Declare.
14442 (initialize_inferiors): Declare.
14443 (add_thread): Adjust to use ptid_t.
14444 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14445 (add_process, remove_process, find_thread_pid): Declare.
14446 (find_inferior_id): Adjust to use ptid_t.
14447 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14448 (multi_process): Declare.
14449 (push_event): Adjust to use ptid_t.
14450 (read_ptid, write_ptid): Declare.
14451 (prepare_resume_reply): Adjust to use ptid_t.
14452 (clear_symbol_cache): Declare.
14453 * inferiors.c (all_processes): New.
14454 (null_ptid, minus_one_ptid): New.
14455 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14456 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14457 (add_thread): Change unsigned long to ptid. Remove gdb_id
14458 parameter. Adjust.
14459 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14460 (gdb_id_to_thread): Rename to ...
14461 (find_thread_pid): ... this. Change unsigned long to ptid.
14462 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14463 (loaded_dll, pull_pid_from_list): Adjust.
14464 (add_process, remove_process, find_process_pid)
14465 (get_thread_process, current_process, initialize_inferiors): New.
14466 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14467 (struct target_waitstatus) <related_pid>: Ditto.
14468 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14469 return type to int.
14470 (struct target_ops) <join>: Add `pid' argument.
14471 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14472 (struct target_ops) <wait>: Add `ptid' field. Change return type
14473 to ptid.
14474 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14475 (mywait): Add `ptid' argument. Change return type to ptid_t.
14476 (target_pid_to_str): Declare.
14477 * target.c (set_desired_inferior): Adjust to use ptids.
14478 (mywait): Add new `ptid' argument. Adjust.
14479 (target_pid_to_str): New.
14480 * mem-break.h (free_all_breakpoints): Declare.
14481 * mem-break.c (breakpoints): Delelete.
14482 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14483 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14484 to use per-process breakpoint list.
14485 (free_all_breakpoints): New.
14486 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14487 (symbol_cache, all_symbols_looked_up): Delete.
14488 (hexchars): New.
14489 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14490 read_ptid): New.
14491 (prepare_resume_reply): Change ptid argument's type from unsigned
14492 long to ptid_t. Adjust. Implement W;process and X;process.
14493 (free_sym_cache, clear_symbol_cache): New.
14494 (look_up_one_symbol): Adjust to per-process symbol cache. *
14495 * server.c (cont_thread, general_thread, step_thread): Change type
14496 to ptid_t.
14497 (attached): Delete.
14498 (multi_process): New.
14499 (last_ptid): Change type to ptid_t.
14500 (struct vstop_notif) <ptid>: Change type to ptid_t.
14501 (queue_stop_reply, push_event): Change `ptid' argument's type to
14502 ptid_t.
14503 (discard_queued_stop_replies): Add `pid' argument.
14504 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14505 changes. Don't reference the `attached' global.
14506 (attach_inferior): Adjust to mywait interface changes.
14507 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14508 features. Handle and report "multiprocess+". Handle
14509 "qAttached:PID".
14510 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14511 changes.
14512 (handle_v_kill): New.
14513 (handle_v_stopped): Adjust to use target_pid_to_str.
14514 (handle_v_requests): Allow multiple attaches and runs when
14515 multiprocess extensions are in effect. Handle "vKill".
14516 (myresume): Adjust to use ptids.
14517 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14518 (handle_status): Adjust to discard_queued_stop_replies interface
14519 change.
14520 (first_thread_of, kill_inferior_callback)
14521 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14522 (main): Call initialize_inferiors. Adjust to use ptids, killing
14523 and detaching from all inferiors. Handle multiprocess packet
14524 variants.
14525 * linux-low.h: Include gdb_proc_service.h.
14526 (struct process_info_private): New.
14527 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14528 <lwpid_of>: Use ptid_get_lwp.
14529 (get_lwp_thread): Adjust.
14530 (struct lwp_info): Add `dead' member.
14531 (find_lwp_pid): Declare.
14532 * linux-low.c (thread_db_active): Delete.
14533 (new_inferior): Adjust comment.
14534 (inferior_pid): Delete.
14535 (linux_add_process): New.
14536 (handle_extended_wait): Adjust.
14537 (add_lwp): Change unsigned long to ptid.
14538 (linux_create_inferior): Add process to processes table. Adjust
14539 to use ptids. Don't set new_inferior here.
14540 (linux_attach_lwp): Rename to ...
14541 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14542 it. Adjust to use ptids.
14543 (linux_attach_lwp): New.
14544 (linux_attach): Add process to processes table. Don't set
14545 new_inferior here.
14546 (struct counter): New.
14547 (second_thread_of_pid_p, last_thread_of_process_p): New.
14548 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14549 multiple processes.
14550 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14551 processes. Remove process from process table.
14552 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14553 to multiple processes.
14554 (any_thread_of): New.
14555 (linux_detach): Add `pid' argument, and handle it. Remove process
14556 from processes table.
14557 (linux_join): Add `pid' argument. Handle it.
14558 (linux_thread_alive): Change unsighed long argument to ptid_t.
14559 Consider dead lwps as not being alive.
14560 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14561 threads we're not interested in.
14562 (same_lwp, find_lwp_pid): New.
14563 (linux_wait_for_lwp): Change `pid' argument's type from int to
14564 ptid_t. Adjust.
14565 (linux_wait_for_event): Rename to ...
14566 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14567 from int to ptid_t. Adjust.
14568 (linux_wait_for_event): New.
14569 (linux_wait_1): Add `ptid' argument. Change return type to
14570 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14571 that exit from the process table.
14572 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14573 Adjust.
14574 (mark_lwp_dead): New.
14575 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14576 stopping all threads, mark its main lwp as dead.
14577 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14578 ptids.
14579 (fetch_register, usr_store_inferior_registers)
14580 (regsets_fetch_inferior_registers)
14581 (regsets_store_inferior_registers, linux_read_memory)
14582 (linux_write_memory): Inline `inferior_pid'.
14583 (linux_look_up_symbols): Adjust to use per-process
14584 `thread_db_active'.
14585 (linux_request_interrupt): Adjust to use ptids.
14586 (linux_read_auxv): Inline `inferior_pid'.
14587 (initialize_low): Don't reference thread_db_active.
14588 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14589 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14590 (ps_getpid): Return the pid of the current inferior.
14591 * thread-db.c (proc_handle, thread_agent): Delete.
14592 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14593 per-process data.
14594 (find_one_thread): Change argument type to ptid_t. Adjust to
14595 per-process data.
14596 (maybe_attach_thread): Adjust to per-process data and ptids.
14597 (thread_db_find_new_threads): Ditto.
14598 (thread_db_init): Ditto.
14599 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14600 processes table. Adjust to use ptids.
14601 (spu_kill, spu_detach): Adjust interface. Remove process from
14602 processes table.
14603 (spu_join, spu_thread_alive): Adjust interface.
14604 (spu_wait): Adjust interface. Remove process from processes
14605 table. Adjust to use ptids.
14606 * win32-low.c (current_inferior_tid): Delete.
14607 (current_inferior_ptid): New.
14608 (debug_event_ptid): New.
14609 (thread_rec): Take a ptid. Adjust.
14610 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14611 (child_delete_thread): Ditto.
14612 (do_initial_child_stuff): Add `attached' argument. Add process to
14613 processes table.
14614 (child_fetch_inferior_registers, child_store_inferior_registers):
14615 Adjust.
14616 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14617 (win32_attach): Pass 1 to do_initial_child_stuff.
14618 (win32_kill): Adjust interface. Remove process from processes
14619 table.
14620 (win32_detach): Ditto.
14621 (win32_join): Adjust interface.
14622 (win32_thread_alive): Take a ptid.
14623 (win32_resume): Adjust to use ptids.
14624 (get_child_debug_event): Ditto.
14625 (win32_wait): Adjust interface. Remove exiting process from
14626 processes table.
14627
bd99dc85
PA
146282009-04-01 Pedro Alves <pedro@codesourcery.com>
14629
14630 Non-stop mode support.
14631
14632 * server.h (non_stop): Declare.
14633 (gdb_client_data, handler_func): Declare.
14634 (delete_file_handler, add_file_handler, start_event_loop):
14635 Declare.
14636 (handle_serial_event, handle_target_event, push_event)
14637 (putpkt_notif): Declare.
14638 * target.h (enum resume_kind): New.
14639 (struct thread_resume): Replace `step' field by `kind' field.
14640 (TARGET_WNOHANG): Define.
14641 (struct target_ops) <wait>: Add `options' argument.
14642 <supports_non_stop, async, start_non_stop>: New fields.
14643 (target_supports_non_stop, target_async): New.
14644 (start_non_stop): Declare.
14645 (mywait): Add `options' argument.
14646 * target.c (mywait): Add `options' argument. Print child exit
14647 notifications here.
14648 (start_non_stop): New.
14649 * server.c (non_stop, own_buf, mem_buf): New globals.
14650 (struct vstop_notif): New.
14651 (notif_queue): New global.
14652 (queue_stop_reply, push_event, discard_queued_stop_replies)
14653 (send_next_stop_reply): New.
14654 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14655 interface changes.
14656 (attach_inferior): In non-stop mode, don't wait for the target
14657 here.
14658 (handle_general_set): Handle QNonStop.
14659 (handle_query): When handling qC, return the current general
14660 thread, instead of the first thread of the list.
14661 (handle_query): If the backend supports non-stop mode, include
14662 QNonStop+ in the qSupported query response.
14663 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14664 and non-stop mode.
14665 (handle_v_attach, handle_v_run): Handle non-stop mode.
14666 (handle_v_stopped): New.
14667 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14668 (myresume): Adjust to use resume_kind. Handle non-stop.
14669 (queue_stop_reply_callback): New.
14670 (handle_status): Handle non-stop mode.
14671 (main): Clear non_stop flag on reconnection. Use the event-loop.
14672 Refactor serial protocol handling from here ...
14673 (process_serial_event): ... to this new function. When GDB
14674 selects any thread, select one here. In non-stop mode, wait until
14675 GDB acks all pending events before exiting.
14676 (handle_serial_event, handle_target_event): New.
14677 * remote-utils.c (remote_open): Install remote_desc in the event
14678 loop.
14679 (remote_close): Remove remote_desc from the event loop.
14680 (putpkt_binary): Rename to...
14681 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14682 (putpkt_binary): New as wrapper around putpkt_binary_1.
14683 (putpkt_notif): New.
14684 (prepare_resume_reply): In non-stop mode, don't change the
14685 general_thread.
14686 * event-loop.c: New.
14687 * Makefile.in (OBJ): Add event-loop.o.
14688 (event-loop.o): New rule.
14689
14690 * linux-low.h (pid_of): Moved here.
14691 (lwpid_of): New.
14692 (get_lwp_thread): Use lwpid_of.
14693 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14694 * linux-low.c (pid_of): Delete.
14695 (inferior_pid): Use lwpid_of.
14696 (linux_event_pipe): New.
14697 (target_is_async_p): New.
14698 (delete_lwp): New.
14699 (handle_extended_wait): Use lwpid_of.
14700 (add_lwp): Don't set lwpid field.
14701 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14702 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14703 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14704 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14705 first. Adjust to linux_wait_for_event interface changes. Use
14706 lwpid_of.
14707 (linux_detach): Don't delete the main lwp here.
14708 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14709 (status_pending_p): Don't consider explicitly suspended lwps.
14710 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14711 pointer. Add OPTIONS argument. Change return type to int. Use
14712 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14713 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14714 pointer. Add status pointer argument. Return a pid instead of a
14715 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14716 changes. In non-stop mode, don't switch to a random thread.
14717 (linux_wait): Rename to...
14718 (linux_wait_1): ... this. Add target_options argument, and handle
14719 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14720 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14721 clean exit and signal exit code. Don't stop all threads in
14722 non-stop mode. In all-stop mode, only stop all threads when
14723 reporting a stop to GDB. Handle explicit thread stop requests.
14724 (async_file_flush, async_file_mark): New.
14725 (linux_wait): New.
14726 (send_sigstop): Use lwpid_of.
14727 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14728 interface changes. In non-stop mode, don't switch to a random
14729 thread.
14730 (linux_resume_one_lwp): Use lwpid_of.
14731 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14732 (linux_resume_one_thread): ... this. Handle resume_stop. In
14733 non-stop mode, don't look for pending flag in all threads.
14734 (resume_status_pending_p): Don't consider explicitly suspended
14735 threads.
14736 (my_waitpid): Reimplement. Emulate __WALL.
14737 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14738 Use lwpid_of.
14739 (sigchld_handler, linux_supports_non_stop, linux_async)
14740 (linux_start_non_stop): New.
14741 (linux_target_ops): Register linux_supports_non_stop, linux_async
14742 and linux_start_non_stop.
14743 (initialize_low): Install SIGCHLD handler.
14744 * thread-db.c (thread_db_create_event, find_one_thread)
14745 (thread_db_get_tls_address): Use lwpid_of.
14746 * win32-low.c (win32_detach): Adjust to use resume_kind.
14747 (win32_wait): Add `options' argument.
14748 * spu-low.c (spu_resume): Adjust to use resume_kind.
14749 (spu_wait): Add `options' argument.
14750
5b1c542e
PA
147512009-04-01 Pedro Alves <pedro@codesourcery.com>
14752
14753 Decouple target code from remote protocol.
14754
14755 * target.h (enum target_waitkind): New.
14756 (struct target_waitstatus): New.
14757 (struct target_ops) <wait>: Return an unsigned long. Take a
14758 target_waitstatus pointer instead of a char pointer.
14759 (mywait): Likewise.
14760 * target.c (mywait): Change prototype to return an unsigned long.
14761 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14762 * server.h (thread_from_wait, old_thread_from_wait): Delete
14763 declarations.
14764 (prepare_resume_reply): Change prototype to take a
14765 target_waitstatus.
14766 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14767 (last_status, last_ptid): New.
14768 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14769 pid instead of a signal.
14770 (attach_inferior): Remove "status" and "signal" parameters.
14771 Adjust.
14772 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14773 not as an address.
14774 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14775 (handle_v_requests, myresume): Remove "status" and "signal"
14776 parameters. Adjust.
14777 (handle_status): New.
14778 (main): Delete local `status'. Adjust.
14779 * remote-utils.c: Include target.h.
14780 (prepare_resume_reply): Change prototype to take a
14781 target_waitstatus. Adjust.
14782
14783 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14784 interface.
14785 * spu-low.c (spu_wait): Adjust.
14786 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14787 Delete.
14788 (win32_wait): Adjust.
14789
2bd7c093
PA
147902009-04-01 Pedro Alves <pedro@codesourcery.com>
14791
14792 * target.h (struct thread_resume): Delete leave_stopped member.
14793 (struct target_ops): Add a `n' argument to the `resume' callback.
14794 * server.c (start_inferior): Adjust.
14795 (handle_v_cont, myresume): Adjust.
14796 * linux-low.c (check_removed_breakpoint): Adjust to resume
14797 interface change, and to removed leave_stopped field.
14798 (resume_ptr): Delete.
14799 (struct thread_resume_array): New.
14800 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14801 resume interface change.
14802 (linux_continue_one_thread, linux_queue_one_thread)
14803 (resume_status_pending_p): Check if the resume field is NULL
14804 instead of checking the leave_stopped member.
14805 (linux_resume): Adjust to the target resume interface change.
14806 * spu-low.c (spu_resume): Adjust to the target resume interface
14807 change.
14808 * win32-low.c (win32_detach, win32_resume): Ditto.
14809
c35fafde
PA
148102009-04-01 Pedro Alves <pedro@codesourcery.com>
14811
14812 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14813 flag.
14814 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14815 pending.
14816 (linux_continue_one_thread): Only preserve the stepping flag if
14817 there's a pending breakpoint.
14818
0a59d50b
PA
148192009-03-31 Pedro Alves <pedro@codesourcery.com>
14820
14821 * server.c (main): After the inferior having exited, call
14822 remote_close before exiting gdbserver.
14823
f04c6d38
TJB
148242009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14825
14826 Fix size of FPSCR in Power 7 processors.
14827 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14828 (PPC_FEATURE_HAS_DFP): New #define.
14829 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14830 size of the FPSCR.
14831
78e5cee6
PA
148322009-03-23 Pedro Alves <pedro@codesourcery.com>
14833
14834 * server.c (handle_query) Whitespace and formatting.
14835
1b3f6016
PA
148362009-03-22 Pedro Alves <pedro@codesourcery.com>
14837
14838 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14839 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14840 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14841 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14842 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14843 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14844 Makefile.in, configure.ac: Fix whitespace throughout.
14845 * configure: Regenerate.
14846
a07b2135
PA
148472009-03-22 Pedro Alves <pedro@codesourcery.com>
14848
14849 * inferiors.c (find_inferior): Make it safe for the callback
14850 function to delete the currently iterated inferior.
14851
67cc2626
PA
148522009-03-22 Pedro Alves <pedro@codesourcery.com>
14853
14854 * Makefile.in (linuw_low_h): Move higher.
14855 (thread-db.o): Depend on $(linux_low_h).
14856
54a0b537
PA
148572009-03-17 Pedro Alves <pedro@codesourcery.com>
14858
14859 Rename "process" to "lwp" throughout.
14860
14861 * linux-low.c (all_processes): Rename to...
14862 (all_lwps): ... this.
14863 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14864 (add_process): Rename to ...
14865 (add_lwp): ... this. Adjust.
14866 (linux_create_inferior): Adjust.
14867 (linux_attach_lwp): Adjust.
14868 (linux_attach): Adjust.
14869 (linux_kill_one_process): Rename to ...
14870 (linux_kill_one_lwp): ... this. Adjust.
14871 (linux_kill): Adjust.
14872 (linux_detach_one_process): Rename to ...
14873 (linux_detach_one_lwp): ... this. Adjust.
14874 (linux_detach): Adjust.
14875 (check_removed_breakpoint): Adjust.
14876 (status_pending_p): Adjust.
14877 (linux_wait_for_process): Rename to ...
14878 (linux_wait_for_lwp): ... this. Adjust.
14879 (linux_wait_for_event): Adjust.
14880 (send_sigstop): Adjust.
14881 (wait_for_sigstop): Adjust.
14882 (stop_all_processes): Rename to ...
14883 (stop_all_lwps): ... this.
14884 (linux_resume_one_process): Rename to ...
14885 (linux_resume_one_lwp): ... this. Adjust.
14886 (linux_set_resume_request, linux_continue_one_thread)
14887 (linux_queue_one_thread, resume_status_pending_p)
14888 (usr_store_inferior_registers, regsets_store_inferior_registers)
14889 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14890 Adjust.
14891 * linux-low.h (get_process): Rename to ...
14892 (get_lwp): ... this. Adjust.
14893 (get_thread_process): Rename to ...
14894 (get_thread_lwp): ... this. Adjust.
14895 (get_process_thread): Rename to ...
14896 (get_lwp_thread): ... this. Adjust.
14897 (struct process_info): Rename to ...
14898 (struct lwp_info): ... this.
14899 (all_processes): Rename to ...
14900 (all_lwps): ... this.
14901 * proc-service.c (ps_lgetregs): Adjust.
14902 * thread-db.c (thread_db_create_event, find_one_thread)
14903 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14904
0b16c5cf
PA
149052009-03-14 Pedro Alves <pedro@codesourcery.com>
14906
14907 * server.c (handle_query): Handle "qAttached".
14908
32de4b9d
NS
149092009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14910
14911 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14912 GPLv3, update license URL.
14913
2aecd87f
DE
149142009-03-01 Doug Evans <dje@google.com>
14915
93efd302 14916 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14917 (server_h): Add gdb_signals.h.
14918 (signals.o): Update.
14919 * server.h (target_signal_from_host,target_signal_to_host_p)
14920 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14921
86b1f9c5
PM
149222009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14923
14924 * remote-utils.c (getpkt): Also generate remote-debug
14925 information if noack_mode is set.
14926
4aa995e1
PA
149272009-02-06 Pedro Alves <pedro@codesourcery.com>
14928
14929 * server.c (handle_query): Report qXfer:siginfo:read and
14930 qXfer:siginfo:write as supported and handle them.
14931 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14932 * linux-low.c (linux_xfer_siginfo): New.
14933 (linux_target_ops): Set it.
14934
62709adf
PA
149352009-01-26 Pedro Alves <pedro@codesourcery.com>
14936
14937 * server.c (gdbserver_usage): Mention --remote-debug.
14938 (main): Accept '--remote-debug' switch.
14939
aef93bd7
DE
149402009-01-18 Doug Evans <dje@google.com>
14941
14942 * regcache.c (new_register_cache): No need to check result of xcalloc.
14943 * server.c (handle_search_memory): Back out calls to xmalloc,
14944 result is checked and error is returned to user upon failure.
14945 (handle_query): Ditto. Add more checks for result of malloc.
14946 (handle_v_cont): Check result of malloc, report error back to
14947 user upon failure.
14948 (handle_v_run): Ditto. Call freeargv.
14949 * server.h (freeargv): Declare.
14950 * utils.c (freeargv): New fn.
14951
54363045
DE
149522009-01-15 Doug Evans <dje@google.com>
14953
f626972c
DE
14954 * gdbreplay.c (perror_with_name): Make arg const char *.
14955 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14956 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14957 * utils.c (perror_with_name): Make arg const char *.
54363045 14958
18aae699
PA
149592009-01-14 Pedro Alves <pedro@codesourcery.com>
14960
14961 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14962 when handling a EXIT_PROCESS_DEBUG_EVENT.
14963
ff703abe
JB
149642009-01-06 Joel Brobecker <brobecker@adacore.com>
14965
14966 * gdbreplay.c (gdbreplay_version): Update copyright year.
14967 * server.c (gdbserver_version): Likewise.
14968
f21cc1a2 149692009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14970
14971 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14972 (handle_extended_wait): Improve comment.
0e21c1ec 14973
bca929d3
DE
149742008-12-13 Doug Evans <dje@google.com>
14975
14976 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14977 * server.h (ATTR_MALLOC): New macro.
14978 (xmalloc,xcalloc,xstrdup): Declare.
14979 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14980 * inferiors.c: Ditto.
14981 * linux-low.c: Ditto.
14982 * mem-break.c: Ditto.
14983 * regcache.c: Ditto.
14984 * remote-utils.c: Ditto.
14985 * server.c: Ditto.
14986 * target.c: Ditto.
14987 * win32-low.c: Ditto.
14988
97438e3f
DE
149892008-12-12 Doug Evans <dje@google.com>
14990
896c7fbb
DE
14991 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14992 in debugging printf.
14993
97438e3f
DE
14994 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14995
e3b886f8
DE
149962008-12-09 Doug Evans <dje@google.com>
14997
14998 * linux-low.h (struct process_info): Delete member tid, unused.
14999 * thread-db.c (find_one_thread): Update.
15000 (maybe_attach_thread): Update.
15001
07e059b5
VP
150022008-12-02 Pedro Alves <pedro@codesourcery.com>
15003
889bf7c5
PA
15004 * target.h (struct target_ops): Add qxfer_osdata member.
15005 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15006 and dirent.h.
15007 (linux_qxfer_osdata): New functions.
15008 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15009 callback.
15010 * server.c (handle_query): Handle "qXfer:osdata:read:".
15011 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15012 (buffer_xml_printf): New functions.
15013 * server.h (struct buffer): New.
15014 (buffer_grow_str, buffer_grow_str0): New macros.
15015 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15016 (buffer_xml_printf): Declare.
07e059b5 15017
4cab47ab
DE
150182008-11-24 Doug Evans <dje@google.com>
15019
15020 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15021
f142445f
DJ
150222008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15023
15024 * server.c (handle_v_run): Always use the supplied argument list.
15025
d0107bb6 150262008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15027
d0107bb6
BW
15028 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15029 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15030
2c4ad781
TJB
150312008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15032
15033 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15034 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15035 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15036 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15037 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15038 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15039 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15040 XML target descriptions.
15041 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15042 when inferior is running on an ISA 2.05 or later processor. Add
15043 special case to return offset for full 64-bit slot of FPSCR when
15044 in 32-bits.
15045
dfb64f85
DJ
150462008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15047
15048 * Makefile.in (SFILES, clean): Added sparc64 files.
15049 (reg-sparc64.o, reg-sparc64.c): New.
15050 * configure.srv (sparc*-*-linux*): New configuration.
15051 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15052 syscall arguments for SPARC.
15053 (regsets_store_inferior_registers): Likewise.
15054 * linux-sparc-low.c: New file.
15055
66b6e1dd
DE
150562008-10-21 Doug Evans <dje@google.com>
15057
15058 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15059 (READLINE_DIR,READLINE_DEP): Delete.
15060 (INTERNAL_CFLAGS): Update.
15061 (LINTFLAGS): Update.
15062
9b710a42
PA
150632008-10-10 Pedro Alves <pedro@codesourcery.com>
15064
15065 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15066 whole argv from the last run, not just argv[0].
15067
5822d809
PA
150682008-09-08 Pedro Alves <pedro@codesourcery.com>
15069
15070 * regcache.c (new_register_cache): Return NULL if the register
15071 cache size isn't known yet.
15072 (free_register_cache): Avoid dereferencing a NULL regcache.
15073
74aac56f
DJ
150742008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15075
15076 * configure.srv: Merge MIPS and MIPS64.
15077
400b20f5
MR
150782008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15079
15080 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15081
677c5bb1
LM
150822008-08-18 Luis Machado <luisgpm@br.ibm.com>
15083
15084 * Makefile.in: Add required vsx dependencies.
15085
15086 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15087 Declare init_registers_powerpc_vsx32l.
15088 Declare init_registers_powerpc_vsx64l.
15089 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15090 (ppc_arch_setup): Check for VSX in hwcap.
15091 (ppc_fill_vsxregset): New function.
15092 (ppc_store_vsxregset): New function.
15093 Add new VSX entry in regset_info target_regsets.
15094
15095 * configure.srv: Add new VSX dependencies.
15096
a6f3e723
SL
150972008-08-12 Pedro Alves <pedro@codesourcery.com>
15098
15099 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15100 (remote_open): Set or clear transport_is_reliable.
15101 (putpkt_binary): Don't expect acks in noack mode.
15102 (getpkt): Don't send ack/nac in noack mode.
15103 * server.c (handle_general_set): Handle QStartNoAckMode.
15104 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15105 qSupported.
15106 (main): Reset noack_mode on every connection.
15107 * server.h (noack_mode): Declare.
15108
a417dc56
RW
151092008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15110
15111 * Makefile.in (GDBREPLAY_OBS): New variable.
15112 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15113
3221518c
UW
151142008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15115 Daniel Jacobowitz <dan@codesourcery.com>
15116
15117 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15118 (usr_store_inferior_registers): Likewise.
15119 (regsets_store_inferior_registers): Likewise.
15120
ec56be1b
PA
151212008-07-31 Rolf Jansen <rj@surtec.com>
15122 Pedro Alves <pedro@codesourcery.com>
15123
15124 * configure.ac: Check for memmem declaration.
15125 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15126 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15127 (disable_packet_qfThreadInfo): Unconditionally compile.
15128 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15129 * configure, config.in: Regenerate.
15130
2fe5e3ff
DE
151312008-07-28 Doug Kwan <dougkwan@google.com>
15132
15133 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15134 (linux_write_memory): Remove declaration of errno.
15135
836acd6d
UW
151362008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15137
15138 * linux-low.c (handle_extended_wait): Do not use "status"
15139 variable uninitialized.
15140
aeba519e
PA
151412008-07-07 Pedro Alves <pedro@codesourcery.com>
15142
15143 * server.c (handle_v_attach): Inhibit reporting dll changes.
15144
db42f210
PA
151452008-06-27 Pedro Alves <pedro@codesourcery.com>
15146
15147 * remote-utils.c (prepare_resume_reply): If requested, don't
15148 output "thread:TID" in the T stop reply.
15149
15150 * server.c (disable_packet_vCont, disable_packet_Tthread)
15151 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15152 (handle_query): If requested, disable support for qC, qfThreadInfo
15153 and qsThreadInfo.
15154 (handle_v_requests): If requested, disable support for vCont.
15155 (gdbserver_show_disableable): New.
15156 (main): Handle --disable-packet and --disable-packet=LIST.
15157
15158 * server.h (disable_packet_vCont, disable_packet_Tthread)
15159 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15160
8e4c5421
CD
151612008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15162
15163 * server.c (gdbserver_usage): Mention --version.
15164
6e23a804
DJ
151652008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15166
15167 * Makefile.in (gdbreplay.o): New rule.
15168
90aa6a40
JM
151692008-06-06 Joseph Myers <joseph@codesourcery.com>
15170
15171 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15172 message, not gdbserver.
15173
c16158bc 151742008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15175 Nathan Sidwell <nathan@codesourcery.com>
15176 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15177
15178 * acinclude.m4: Include ../../config/acx.m4.
15179 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15180 * configure, config.in: Regenerate.
15181 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15182 * server.c (gdbserver_version): Print PKGVERSION.
15183 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15184 (main): Adjust gdbserver_usage calls.
15185 * gdbreplay.c (version, host_name): Add declarations.
15186 (gdbreplay_version, gdbreplay_usage): New.
15187 (main): Accept --version and --help options.
15188
aeb75bf5
DJ
151892008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15190
15191 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15192 (arm_breakpoint_at): Handle Thumb.
15193 (the_low_target): Add comment.
15194
76b233dd
UW
151952008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15196
15197 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15198
08388c79
DE
151992008-05-09 Doug Evans <dje@google.com>
15200
a3c83fae
DE
15201 * server.h (decode_search_memory_packet): Declare.
15202 * remote-utils.c (decode_search_memory_packet): New fn.
15203 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15204 (handle_search_memory): New fn.
15205 (handle_query): Process qSearch:memory packets.
15206
bb9c3d36
UW
152072008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15208
15209 * regcache.c (registers_length): Remove.
15210 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15211 full register packet.
15212 * regcache.h (registers_length): Remove prototype.
15213 * server.h (PBUFSIZ): Define to 16384.
15214
7284e1be
UW
152152008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15216
15217 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15218 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15219 powerpc-64l.o, and powerpc-altivec64l.o.
15220 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15221 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15222 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15223 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15224 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15225 to srv_xmlfiles.
15226
15227 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15228 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15229 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15230 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15231 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15232 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15233 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15234 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15235 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15236 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15237 (clean): Update.
15238
15239 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15240 (init_registers_powerpc_32l): ... this new prototype.
15241 (init_registers_powerpc_32): Remove, replace by ...
15242 (init_registers_powerpc_altivec32l): ... this new prototype.
15243 (init_registers_powerpc_e500): Remove, replace by ...
15244 (init_registers_powerpc_e500l): ... this new prototype.
15245 (init_registers_ppc64): Remove, replace by ...
15246 (init_registers_powerpc_64l): ... this new prototype.
15247 (init_registers_powerpc_64): Remove, replace by ...
15248 (init_registers_powerpc_altivec64l): ... this new prototype.
15249 (ppc_num_regs): Set to 73.
15250 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15251 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15252 (ppc_cannot_store_register): Handle orig_r3 and trap.
15253 (ppc_arch_setup): Update init_registers_... calls.
15254 (ppc_fill_gregset): Handle orig_r3 and trap.
15255
15256 * inferiors.c (clear_inferiors): Reset current_inferior.
15257
fdc59709
PB
152582008-04-23 Paolo Bonzini <bonzini@gnu.org>
15259
889bf7c5
PA
15260 * acinclude.m4: Add override.m4.
15261 * configure: Regenerate.
fdc59709 15262
c9b2f845
UW
152632008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15264
15265 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15266 initial call to init_register_ppc64.
15267
550512b8
UW
152682008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15269
43aaf8b6
PA
15270 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15271 single powerpc*-*-linux* case.
550512b8
UW
15272 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15273
b6430ec3
UW
152742008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15275
15276 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15277 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15278 from reg_xmlfiles.
15279 * linux-ppc-low.c: Include <elf.h>.
15280 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15281 (ppc_hwcap): New global variable.
15282 (ppc_regmap): Remove __SPE__ #ifdef sections.
15283 (ppc_regmap_e500): New global variable.
15284 (ppc_cannot_store_register): Update __SPE__ special case.
15285 (ppc_get_hwcap): New function.
15286 (ppc_arch_setup): Use it to determine whether inferior supports
15287 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15288 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15289 Do not access registers if target does not support AltiVec.
15290 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15291 Do not access registers if target does not support SPE.
15292 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15293
52fa2412
UW
152942008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15295
15296 * linux-low.c (disabled_regsets, num_regsets): New.
15297 (use_regsets_p): Delete.
15298 (linux_wait_for_process): Clear disabled_regsets.
15299 (regsets_fetch_inferior_registers): Check and set it.
15300 (regsets_store_inferior_registers): Likewise.
15301 (linux_fetch_registers, linux_store_registers): Do not use
15302 use_regsets_p.
15303 (initialize_low): Allocate disabled_regsets.
15304
e28b3332
DJ
153052008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15306
15307 * Makefile.in (LIBOBJS): New.
15308 (OBS): Use LIBOBJS.
15309 (memmem.o): New rule.
15310 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15311 * configure: Regenerated.
15312
4536995d
UW
153132008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15314
15315 * server.c (handle_query): Never return "unsupported" for
15316 qXfer:features:read queries.
15317
221c031f
UW
153182008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15319
15320 * server.c (get_features_xml): Fix inverted condition.
15321 (handle_query): Always support qXfer:feature:read.
15322
ccd213ac
DJ
153232008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15324
15325 * server.c (wrapper_argv): New.
15326 (start_inferior): Handle wrapper_argv. If set, expect an extra
15327 trap.
15328 (gdbserver_usage): Document --wrapper.
15329 (main): Parse --wrapper.
15330
6fe305f7
UW
153312008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15332
15333 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15334 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15335 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15336 (ppc_set_pc): Likewise.
15337 (ppc_arch_setup): New function.
15338 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15339 of collect_register.
889bf7c5 15340 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15341
5b0a002e
UW
153422008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15343
15344 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15345 instead of linux-ppc64-low.o.
15346 * linux-ppc64-low.c: Remove file.
15347 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15348 (linux-ppc64-low.o): Remove rule.
15349
15350 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15351 (init_registers_powerpc_64): Likewise.
15352 (ppc_regmap): Conditionally define depending on __powerpc64__.
15353 (ppc_cannot_store_register): Do not special-case "fpscr" when
15354 compiled on __powerpc64__.
15355 (ppc_collect_ptrace_register): New function.
15356 (ppc_supply_ptrace_register): New function.
15357 (ppc_breakpoint): Change type to "unsigned int".
15358 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15359 (the_low_target): Conditionally provide initializers for the
889bf7c5 15360 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15361 collect_ptrace_register and supply_ptrace_register members.
15362
9b4b61c8
UW
153632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15364
15365 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15366 * server.c (gdbserver_xmltarget): Define.
15367 (get_features_xml): Use it to replace "target.xml" and arch_string.
15368
15369 * configure.srv: Remove srv_xmltarget. Add XML files that were
15370 mentioned there to srv_xmlfiles instead. Remove conditional tests
15371 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15372 srv_xmlfiles and srv_regobj to include all possible choices.
15373 * configure.ac (srv_xmltarget): Remove.
15374 (srv_xmlfiles): Do not add "target.xml".
15375 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15376 checks for supplementary target information.
15377 * configure: Regenerate.
15378 * Makefile.in (XML_TARGET): Remove.
15379 (target.xml): Remove rule.
15380 (clean): Do not clean up target.xml.
15381 (.PRECIOUS): Do not mention target.xml.
15382
15383 * target.h (struct target_ops): Remove arch_string member.
15384 * linux-low.c (linux_arch_string): Remove.
15385 (linux_target_ops): Remove arch_string initializer.
15386 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15387 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15388 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15389 * spu-low.c (spu_arch_string): Remove.
15390 (spu_target_ops): Remove arch_string initializer.
15391 * win32-low.c (win32_arch_string): Remove.
15392 (win32_target_ops): Remove arch_string initializer.
15393 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15394 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15395 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15396
ee1a7ae4
UW
153972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15398
15399 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15400 by collect_ptrace_register and supply_ptrace_register hooks.
15401 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15402 instead of checking for the_low_target.left_pad_xfer.
15403 (usr_store_inferior_registers): Use collect_ptrace_register callback
15404 instead of checking for the_low_target.left_pad_xfer.
15405
15406 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15407 (s390_supply_ptrace_register): Likewise.
15408 (s390_fill_gregset): Call s390_collect_ptrace_register.
15409 (the_low_target): Update.
15410
15411 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15412 (ppc_supply_ptrace_register): Likewise.
15413 (the_low_target): Update.
15414
15415 * linux-i386-low.c (the_low_target): Update.
15416 * linux-x86-64-low.c (the_low_target): Update.
15417
d61ddec4
UW
154182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15419
15420 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15421 reg-s390.o and reg-s390x.o.
15422
15423 * linux-low.c (new_inferior): New global variable.
15424 (linux_create_inferior, linux_attach): Set it.
15425 (linux_wait_for_process): Call the_low_target.arch_setup after the
15426 target has stopped for the first time.
15427 (initialize_low): Do not call the_low_target.arch_setup.
15428
15429 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15430 (s390_set_pc): Likewise.
15431 (s390_arch_setup): New function.
15432 (the_low_target): Use s390_arch_setup as arch_setup routine.
15433
15434 * regcache.c (realloc_register_cache): New function.
15435 (set_register_cache): Call it for each existing regcache.
15436
d05b4ac3
UW
154372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15438
15439 * server.h (init_registers): Remove prototype.
15440
15441 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15442 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15443 instead of init_registers ().
15444 * linux-arm-low.c (init_registers_arm): Add prototype.
15445 (init_registers_arm_with_iwmmxt): Likewise.
15446 (the_low_target): Add initializer for arch_setup field.
15447 * linux-cris-low.c (init_registers_cris): Add prototype.
15448 (the_low_target): Add initializer for arch_setup field.
15449 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15450 (the_low_target): Add initializer for arch_setup field.
15451 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15452 (the_low_target): Add initializer for arch_setup field.
15453 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15454 (the_low_target): Add initializer for arch_setup field.
15455 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15456 (the_low_target): Add initializer for arch_setup field.
15457 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15458 (the_low_target): Add initializer for arch_setup field.
15459 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15460 (init_registers_mips64_linux): Likewise.
15461 (the_low_target): Add initializer for arch_setup field.
15462 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15463 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15464 (the_low_target): Add initializer for arch_setup field.
15465 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15466 (init_registers_powerpc_64): Likewise.
15467 (the_low_target): Add initializer for arch_setup field.
15468 * linux-s390-low.c (init_registers_s390): Add prototype.
15469 (init_registers_s390x): Likewise.
15470 (the_low_target): Add initializer for arch_setup field.
15471 * linux-sh-low.c (init_registers_sh): Add prototype.
15472 (the_low_target): Add initializer for arch_setup field.
15473 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15474 (the_low_target): Add initializer for arch_setup field.
15475 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15476 (the_low_target): Add initializer for arch_setup field.
15477
15478 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15479 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15480 instead of init_registers ().
15481 * win32-arm-low.c (init_registers_arm): Add prototype.
15482 (the_low_target): Add initializer for arch_setup field.
15483 * win32-i386-low.c (init_registers_i386): Add prototype.
15484 (the_low_target): Add initializer for arch_setup field.
15485
15486 * spu-low.c (init_registers_spu): Add prototype.
15487 (initialize_low): Call initialie_registers_spu () instead of
15488 initialize_registers ().
15489
fd96d250
PA
154902008-02-19 Pedro Alves <pedro@codesourcery.com>
15491
15492 * server.c (handle_v_requests): When handling the vRun and vAttach
15493 packets, if already debugging a process, don't kill it. Return an
15494 error instead.
15495
d41b6bb4
DJ
154962008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15497
15498 * server.c (handle_query): Correct length check.
15499
5ac588cf
PA
155002008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15501
15502 * win32-low.c (do_initial_child_stuff): Add process handle
15503 parameter. Set current_process_handle and current_process_id from the
15504 parameters. Clear globals.
15505 (win32_create_inferior): Don't set current_process_handle and
15506 current_process_id here. Instead pass them on the call to
15507 do_initial_child_stuff.
15508 (win32_attach): Likewise.
15509 (win32_clear_inferiors): New.
15510 (win32_kill): Don't close the current process handle or the
15511 current thread handle here. Instead call win32_clear_inferiors.
15512 (win32_detach): Don't open a new handle to the process. Call
15513 win32_clear_inferiors.
15514 (win32_join): Don't rely on current_process_handle; open a new
15515 handle using the process id.
15516 (win32_wait): Call win32_clear_inferiors when the inferior process
15517 has exited.
15518
ecd7ecbc
DJ
155192008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15520
15521 * server.c (monitor_show_help): Add "exit".
15522
1525d545
MG
155232008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15524
ecd7ecbc 15525 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15526 (clean): Add reg-xtensa.c.
15527 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15528 * configure.srv (xtensa*-*-linux*) New target.
15529 * linux-xtensa-low.c: New.
15530 * xtensa-xtregs.c: New.
1525d545 15531
59a016f0
PA
155322008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15533
15534 * hostio.c: Don't include errno.h.
15535 (errno_to_fileio_errno): Move to hostio-errno.
15536 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15537 error number outputting to the target->hostio_last_error callback.
15538 (hostio_packet_error): Use FILEIO_EINVAL directly.
15539 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15540 calls to hostio_error.
15541 * hostio-errno.c: New.
15542 * server.h (hostio_last_error_from_errno): Declare.
15543 * target.h (target_ops): Add hostio_last_error member.
15544 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15545 as hostio_last_error handler.
889bf7c5 15546 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15547 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15548 (wince_hostio_last_error): New functions.
15549 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15550 as hostio_last_error handler.
15551 (win32_target_ops) [!_WIN32_WCE]: Register
15552 hostio_last_error_from_errno as hostio_last_error handler.
15553 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15554 (hostio-errno.o): New rule.
15555 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15556 * configure.srv (srv_hostio_err_objs): New variable. Default to
15557 hostio-errno.o.
15558 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15559 * configure: Regenerate.
15560
2d717e4f
DJ
155612008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15562
15563 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15564 (linux_kill, linux_detach): Clean up the process list.
15565 * remote-utils.c (remote_open): Improve port number parsing.
15566 (putpkt_binary, input_interrupt): Only send interrupts if the target
15567 is running.
15568 * server.c (extended_protocol): Make static.
15569 (attached): Define earlier.
15570 (exit_requested, response_needed, program_argv): New variables.
15571 (target_running): New.
15572 (start_inferior): Clear attached here.
15573 (attach_inferior): Set attached here.
15574 (require_running): Define.
15575 (handle_query): Use require_running and target_running. Implement
15576 "monitor exit".
15577 (handle_v_attach, handle_v_run): New.
15578 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15579 (gdbserver_usage): Update.
15580 (main): Redo argument parsing. Handle --debug and --multi. Handle
15581 --attach along with other options or after the port. Save
15582 program_argv. Support no initial program. Resynchronize
15583 communication with GDB after an error. Handle "monitor exit".
15584 Use require_running and target_running. Always allow the extended
15585 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15586 restart in extended mode.
15587 * README: Refer to the GDB manual. Update --attach usage.
15588
7407e2de
AS
155892007-12-20 Andreas Schwab <schwab@suse.de>
15590
15591 * linux-low.c (STACK_SIZE): Define.
15592 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15593 (linux_test_for_tracefork): Likewise.
15594
b65d95c5
DJ
155952007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15596
15597 * linux-low.c (linux_wait_for_event): Update messages. Do not
15598 reinsert auto-delete breakpoints.
15599 * mem-break.c (struct breakpoint): Change return type of handler to
15600 int.
15601 (set_breakpoint_at): Update handler type.
15602 (reinsert_breakpoint_handler): Return 1 instead of calling
15603 delete_breakpoint.
15604 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15605 setting a new one.
15606 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15607 * mem-break.h (set_breakpoint_at): Update handler type.
15608 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15609 * win32-low.c (auto_delete_breakpoint): New.
15610 (get_child_debug_event): Use it.
15611
4e799345
DJ
156122007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15613
15614 * configure.ac: Check for pread and pwrite.
15615 * hostio.c (handle_pread): Fall back to lseek and read.
15616 (handle_pwrite): Fall back to lseek and write.
15617 * config.in, configure: Regenerated.
15618
27524b67
DJ
156192007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15620
15621 * server.c (myresume): Add own_buf argument.
15622 (main): Update calls.
15623
a20d5e98
DJ
156242007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15625
15626 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15627 * remote-utils.c (remote_open): Do not call disable_async_io.
15628 (block_async_io): Delete.
15629 (unblock_async_io): Make static.
15630 (initialize_async_io): New.
15631 * server.c (handle_v_cont): Handle async I/O here.
15632 (myresume): Likewise. Move other common resume tasks here...
15633 (main): ... from here. Call initialize_async_io. Disable async
15634 I/O before the main loop.
15635 * server.h (initialize_async_io): Declare.
15636 (block_async_io, unblock_async_io): Delete prototypes.
15637 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15638
b79d787e
DJ
156392007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15640
15641 * remote-utils.c (readchar): Allow binary data in received messages.
15642
d97903b2
PA
156432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15644
15645 * win32-low.c (attaching): New global.
15646 (win32_create_inferior): Clear the `attaching' global.
15647 (win32_attach): Set the `attaching' global.
15648 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15649 attaching. Only set a breakpoint at the entry point if not
15650 attaching.
15651
311de423
PA
156522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15653
15654 * server.c (main): Don't report dll events on the initial
15655 connection on attaches.
15656
6c2d16d2
PA
156572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15658
15659 * server.c (main): Relax numerical bases supported for the pid of
15660 the --attach command line argument.
15661
5ca906e6
PA
156622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15663
15664 * win32-low.c (win32_attach): Call OpenProcess before
15665 DebugActiveProcess, not after. Add last error output to error
15666 call.
15667
9c6c8194
PA
156682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15669
15670 * win32-low.c (win32_get_thread_context)
15671 (win32_set_thread_context): New functions.
15672 (thread_rec): Use win32_get_thread_context.
15673 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15674 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15675 field.
15676
4d5d1aaa
PA
156772007-12-03 Leo Zayas
15678 Pedro Alves <pedro_alves@portugalmail.pt>
15679
15680 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15681 global variables.
15682 (child_add_thread): Minor cleanup.
15683 (child_continue): Resume artificially suspended threads before
15684 calling ContinueDebugEvent.
15685 (suspend_one_thread): New.
15686 (fake_breakpoint_event): New.
15687 (get_child_debug_event): Change return type to int. Check here if
15688 gdb sent an interrupt request. If a soft interrupt was requested,
15689 fake a breakpoint event. Return 0 if there is no event to handle,
15690 and 1 otherwise.
15691 (win32_wait): Don't check here if gdb sent an interrupt request.
15692 Ensure there is a valid event to handle.
15693 (win32_request_interrupt): Add soft interruption method as last
15694 resort.
15695
c436e841
PA
156962007-12-03 Leo Zayas
15697 Pedro Alves <pedro_alves@portugalmail.pt>
15698
15699 * win32-low.h (win32_thread_info): Add descriptions to the
15700 structure members. Replace `suspend_count' counter by a
15701 `suspended' flag.
15702 * win32-low.c (thread_rec): Update condition of when to get the
15703 context from the inferior. Rely on ContextFlags being set if it
15704 has already been retrieved. Only suspend the inferior thread if
15705 we haven't already. Warn if that fails.
15706 (continue_one_thread): s/suspend_count/suspended/. Only call
15707 ResumeThread once. Warn if that fails.
15708
e7b5fa67
PA
157092007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15710
15711 * win32-low.c (win32_wait): Don't read from the inferior when it
15712 has already exited.
15713
a385171d
PA
157142007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15715
15716 * Makefile.in (win32_low_h): New variable.
15717 (win32-low.o): Add dependency on $(win32_low_h).
15718 (win32-arm-low.o, win32-i386-low.o): New rules.
15719
f80c84b3
DJ
157202007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15721
15722 * hostio.c: Correct copyright year.
15723
a6b151f1
DJ
157242007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15725
15726 * Makefile.in (OBS): Add hostio.o.
15727 (hostio.o): New rule.
15728 * server.h (handle_vFile): Declare.
15729 * hostio.c: New file.
15730 * server.c (handle_v_requests): Take packet_len and new_packet_len
15731 for binary packets. Call handle_vFile.
15732 (main): Update call to handle_v_requests.
15733
f9387fc3
DJ
157342007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15735
15736 * linux-low.c: Include <sched.h>.
15737
51c2684e
DJ
157382007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15739
15740 * linux-low.c (linux_tracefork_grandchild): New.
15741 (linux_tracefork_child): Use clone.
15742 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15743
75f83163
JB
157442007-10-31 Joel Brobecker <brobecker@adacore.com>
15745
15746 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15747
da5898ce
DJ
157482007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15749
15750 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15751
24a09b5f
DJ
157522007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15753
15754 * inferiors.c (change_inferior_id): Delete.
15755 (add_pid_to_list, pull_pid_from_list): New.
15756 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15757 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15758 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15759 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15760 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15761 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15762 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15763 (using_threads): Always set to 1.
15764 (handle_extended_wait): New.
15765 (add_process): Do not set TID.
15766 (linux_create_inferior): Set must_set_ptrace_flags.
15767 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15768 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15769 (linux_thread_alive): Rename TID argument to LWPID.
15770 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15771 (linux_wait_for_event): Do not use TID or check using_threads. Update
15772 call to dead_thread_notify. Call handle_extended_wait.
15773 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15774 (send_sigstop): Delete sigstop_sent.
15775 (wait_for_sigstop): Avoid TID.
15776 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15777 (linux_test_for_tracefork): New.
15778 (linux_lookup_signals): Use thread_db_active and
15779 linux_supports_tracefork_flag.
15780 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15781 * linux-low.h (get_process_thread): Avoid TID.
15782 (struct process_ifo): Move thread_known and tid to the end. Remove
15783 sigstop_sent.
15784 (linux_attach_lwp, thread_db_init): Update prototypes.
15785 * server.h (change_inferior_id): Delete prototype.
15786 (add_pid_to_list, pull_pid_from_list): New prototypes.
15787 * thread-db.c (thread_db_use_events): New.
15788 (find_first_thread): Rename to...
15789 (find_one_thread): ...this. Update callers and messages. Do not
15790 call fatal. Check thread_db_use_events. Do not call
15791 change_inferior_id or new_thread_notify.
15792 (maybe_attach_thread): Update. Do not call new_thread_notify.
15793 (thread_db_init): Set thread_db_use_events. Check use_events.
15794 * utils.c (fatal, warning): Correct message prefix.
15795
30ed0a8f
DJ
157962007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15797
15798 * Makefile.in (clean): Remove new files.
15799 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15800 (powerpc-64.o, powerpc-64.c): New rules.
15801 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15802 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15803 with SPE.
15804 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15805 SPE targets.
15806 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15807 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15808 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15809 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15810 (target_regsets): Add AltiVec and SPE register sets.
15811 * configure.ac: Check for AltiVec and SPE.
15812 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15813 (ppc_fill_vrregset, ppc_store_vrregset): New.
15814 (target_regsets): Add AltiVec register set.
15815 * configure: Regenerated.
15816
fd462a61
DJ
158172007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15818
15819 * linux-low.c (O_LARGEFILE): Define.
15820 (linux_read_memory): Use /proc/PID/mem.
15821 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15822 * configure, config.in: Regenerated.
15823
69f223ed
DJ
158242007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15825
15826 * linux-low.c (linux_wait_for_event): Do not pass signals while
15827 single-stepping.
15828
aec18585
PA
158292007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15830
15831 * win32-low.c (create_process): New.
15832 (win32_create_inferior): Use create_process instead of
15833 CreateProcess. If create_process failed retry appending an ".exe"
15834 suffix. Store the GetLastError result immediatelly after
15835 create_process calls and use it on the call to error.
15836
34d86ddd
PA
158372007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15838
15839 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15840
5a0e3bd0
JB
158412007-08-23 Joel Brobecker <brobecker@adacore.com>
15842
15843 * configure.ac: Switch license to GPLv3.
15844
f88c79e6
MS
158452007-08-01 Michael Snyder <msnyder@access-company.com>
15846
15847 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15848
6b3d9b83
PA
158492007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15850
15851 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15852 typedef.
15853 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15854 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15855 CloseToolhelp32Snapshot.
15856 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15857 CloseToolhelp32Snapshot.
15858
c588c53c
MS
158592007-07-27 Michael Snyder <michael.snyder@access-company.com>
15860
15861 * server.c (main): Check for inferior exit before main loop.
15862
aa0403d9
PA
158632007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15864
15865 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15866 instead of on tmp_desc.
15867
255e7678
DJ
158682007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15869 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15872 (add_thread): Minor cleanups.
15873 (clear_inferiors): Move lower in the file. Clear the DLL
15874 list.
15875 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15876 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15877 (xml_escape_text): New.
15878 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15879 for qSupported.
15880 (handle_v_cont): Report errors.
15881 (gdbserver_version): Update.
15882 (main): Correct size of own_buf. Do not report initial DLL events.
15883 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15884 (unloaded_dll, xml_escape_text): New.
15885 * win32-low.c (enum target_waitkind): Update comments.
15886 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15887 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15888 (win32_EnumProcessModules, win32_GetModuleInformation)
15889 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15890 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15891 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15892 (win32_Module32First, win32_Module32Next, load_toolhelp)
15893 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15894 (get_child_debug_event): Handle DLL events.
15895 (win32_wait): Likewise.
15896
0d37add9
DJ
158972007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15898
15899 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15900 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15901
45e2715e
PA
159022007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15903
15904 * win32-low.c (handle_output_debug_string): Ignore event if not
15905 waiting.
15906
c5674cf1
PA
159072007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15908
15909 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15910
2bbe3cc1
DJ
159112007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15912
15913 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15914
ae13219e
DJ
159152007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15916
15917 * inferiors.c (change_inferior_id): Add comment.
15918 * linux-low.c (check_removed_breakpoint): Add an early
15919 prototype. Improve debug output.
15920 (linux_attach): Doc update.
15921 (linux_detach_one_process, linux_detach): Clean up before releasing
15922 each process.
15923 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15924 * linux-low.h (struct process_info): Doc improvement.
15925 * mem-break.c (delete_all_breakpoints): New.
15926 * mem-break.h (delete_all_breakpoints): New prototype.
15927 * thread-db.c (find_first_thread): New.
15928 (thread_db_create_event): Call it instead of
15929 thread_db_find_new_threads. Clean up unused variables.
15930 (maybe_attach_thread): Remove first thread handling.
15931 (thread_db_find_new_threads): Use find_first_thread.
15932 (thread_db_get_tls_address): Likewise.
15933
4105de34
DJ
159342007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15935
15936 * thread-db.c (thread_db_find_new_threads): Add prototype.
15937 (thread_db_create_event): Check for the main thread before adding
15938 a new thread.
15939 (maybe_attach_thread): Only enable event reporting if TID == 0.
15940 (thread_db_get_tls_address): Check for new threads.
15941
2b876972
DJ
159422007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15943
15944 * linux-low.c (linux_create_inferior): Try execv before execvp.
15945 * spu-low.c (spu_create_inferior): Likewise.
15946
7a245884
DJ
159472007-06-13 Mike Frysinger <vapier@gentoo.org>
15948
15949 * linux-low.c (linux_create_inferior): Change execv to execvp.
15950 * spu-low.c (spu_create_inferior): Likewies.
15951
117ce543
DJ
159522007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15953
15954 * Makefile.in (clean): Clean new files instead of deleted ones.
15955 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15956 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15957 rules.
15958 * configure.srv: Specify XML files and new regformats for MIPS and
15959 MIPS64 GNU/Linux.
15960 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15961 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15962 an entry for the restart register.
15963 (mips_cannot_fetch_register, mips_cannot_store_register)
15964 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15965 register names to match the XML descriptions.
15966 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15967 restart register instead of $0.
15968
0e7f50da
UW
159692007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15970 Markus Deuling <deuling@de.ibm.com>
15971
15972 * remote-utils.c (decode_xfer_write): New function.
15973 * server.h (decode_xfer_write): Add prototype.
15974 * server.c (handle_query): Add PACKET_LEN argument. Support
15975 qXfer:spu:read and qXfer:spu:write packets.
15976 (main): Pass packet_len to handle_query.
15977 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15978 * target.h (target_ops): Add qxfer_spu.
15979
374c1d38
UW
159802007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15981
15982 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15983 accessing non-seekable spufs files.
15984
bb63802a
UW
159852007-05-16 Markus Deuling <deuling@de.ibm.com>
15986
889bf7c5 15987 * server.c (handle_query): Add reply for qC packet.
bb63802a 15988
7390519e
PA
159892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15990 Leo Zayas <lerele@champenstudios@com>
15991
15992 * server.h (check_remote_input_interrupt_request): New function.
15993 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15994 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15995 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15996 (check_remote_input_interrupt_request): New function.
15997 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15998 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15999 winapi_GenerateConsoleCtrlEvent): New typedefs.
16000 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16001 to 250 ms.
16002 (win32_wait): Check for remote interrupt request
16003 with check_remote_input_interrupt_request.
16004 (win32_request_interrupt): New function.
16005 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16006
34b34921
PA
160072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16008
16009 * win32-low.c (debug_registers_changed,
16010 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16011 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16012 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16013 (thread_rec): Get context using the low target.
16014 (child_add_thread): Call thread_added on the low target,
16015 which does the same thing.
16016 (regptr): Delete.
16017 (do_initial_child_stuff): Remove debug registers references.
16018 Set context using the low target. Resume threads after
16019 setting the contexts.
16020 (child_continue): Remove dead variable. Remove debug
16021 registers references.
16022 (child_fetch_inferior_registers): Go through the low target.
16023 (do_child_store_inferior_registers): Remove.
16024 (child_store_inferior_registers): Go through the low target.
16025 (win32_resume): Remove debug registers references.
16026 Set context using the low target.
16027 (handle_exception): Change return type to void. Don't record
16028 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16029 first chance exception.
889bf7c5 16030 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16031 goto loop. Always return after waiting for debug event.
16032 (win32_wait): Convert to switch statement. Handle spurious
16033 events.
16034
16035 * win32-i386-low.c (debug_registers_changed,
16036 debug_registers_used): New.
16037 (initial_stuff): Rename to ...
16038 (i386_initial_stuff): ... this. Clear debug registers
16039 state variables.
16040 (store_debug_registers): Delete.
16041 (i386_get_thread_context): New.
16042 (load_debug_registers): Delete.
16043 (i386_set_thread_context): New.
16044 (i386_thread_added): New.
16045 (single_step): Rename to ...
16046 (i386_single_step): ... this.
16047 (do_fetch_inferior_registers): Rename to ...
16048 (i386_fetch_inferior_register): ... this.
16049 (i386_store_inferior_register): New.
16050 (the_low_target): Adapt to new interface.
16051
16052 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16053 (arm_get_thread_context): New.
16054 (arm_set_thread_context): New.
16055 (regptr): New.
16056 (do_fetch_inferior_registers): Rename to ...
16057 (arm_fetch_inferior_register): ... this.
16058 (arm_store_inferior_register): New.
16059 (arm_wince_breakpoint): Reimplement as unsigned long.
16060 (arm_wince_breakpoint_len): Define.
16061 (the_low_target): Adapt to new interface.
16062
16063 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16064 load_debug_registers. Add get_thread_context, set_thread_context,
16065 thread_added and store_inferior_register. Rename
16066 fetch_inferior_registers to fetch_inferior_register.
16067 (regptr): Remove declaration.
16068
dd6953e1
PA
160692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16070
16071 * linux-low.c (linux_detach): Change return type to int. Return 0.
16072 * spu-low.c (spu_detach): Likewise.
16073
444d6139
PA
160742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16075
16076 * target.h (target_ops): Change return type of detach to int.
16077 Add join.
16078 (join_inferior): New.
16079 * server.c (main): Don't skip detach support on mingw32.
16080 If the inferior doesn't support detaching return error.
16081 Call join_inferior instead of using waitpid.
16082 * linux-low.c (linux_join): New.
16083 (linux_target_op): Add linux_join.
16084 * spu-low.c (spu_join): New.
16085 (spu_target_ops): Add spu_join.
16086 * win32-low.c (win32_detach): Adapt to new interface.
16087 Reopen current_process_handle before detaching. Issue a child
16088 resume before detaching.
16089 (win32_join): New.
16090 (win32_target_op): Add win32_join.
16091
1d5315fe
PA
160922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16093
16094 * win32-low.c (win32-attach): Fix return value.
16095 * target.h (target_ops): Describe ATTACH return values.
16096
bf914831
PA
160972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16098
16099 * win32-low.c (GETPROCADDRESS): Define.
16100 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16101 (winapi_DebugSetProcessKillOnExit): Likewise.
16102 (win32_create_inferior): Force usage of ansi CreateProcessA.
16103 (win32_attach): Use GETPROCADDRESS.
16104 (win32_detach): Likewise.
16105
f72f3e60
PA
161062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16107
16108 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16109
ed50f18f
PA
161102007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16111
16112 * win32-low.c: Commit leftover changes from 2007-03-29.
16113
0c2ead7e
DJ
161142007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16115
16116 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16117 fields short instead of int. Add explicit padding.
16118 (i387_cache_to_fsave): Remove unnecessary casts.
16119 (i387_fsave_to_cache): Doc fix.
16120 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16121
73725ff3
DJ
161222007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16123
16124 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16125 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16126
d99f33d8
PA
161272007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16128
16129 * configure.srv (arm*-*-mingw32ce*): Move near the other
16130 arm targets.
16131
68070c10
PA
161322007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16133
2482afc6 16134 * configure.ac: Add errno checking.
68070c10
PA
16135 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16136 sys/file.h and malloc.h.
16137 (AC_CHECK_DECLS): Add perror.
16138 (srv_mingwce): Handle.
2482afc6 16139 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16140 win32-i386-low.o to srv_tgtobj.
16141 (i[34567]86-*-mingw*): Likewise.
16142 (arm*-*-mingw32ce*): Add case.
16143 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16144 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16145 [__MINGW32CE__] (strerror): New function.
16146 [__MINGW32CE__] (errno): Define to GetLastError.
16147 [__MINGW32CE__] (COUNTOF): New macro.
16148 (remote_open): Remove extra close call.
16149 * mem-break.c (delete_breakpoint_at): New function.
16150 * mem-break.h (delete_breakpoint_at): Declare.
16151 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16152 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16153 [USE_WIN32API] (read, write): Add char* casts.
16154 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16155 * server.h: Include wincecompat.h on Windows CE.
16156 [HAVE_ERRNO_H]: Check.
16157 (perror): Declare if not declared.
16158 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16159 (perror_with_name): Remove errno declaration.
16160 * wincecompat.h: New.
16161 * wincecompat.c: New.
16162 * win32-low.h: New.
16163 * win32-arm-low.c: New.
16164 * win32-i386-low.c: New.
16165 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16166 (OUTMSG2): Make it safe.
16167 (_T): New macro.
16168 (COUNTOF): New macro.
16169 (NUM_REGS): Get it from the low target.
16170 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16171 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16172 (thread_rec): Let low target handle debug registers.
16173 (child_add_thread): Likewise.
16174 (child_init_thread_list): Likewise.
16175 (continue_one_thread): Likewise.
16176 (regptr): New.
16177 (do_child_fetch_inferior_registers): Move to ...
16178 * win32-i386-low.c: ... here, and rename to ...
16179 (do_fetch_inferior_registers): ... this.
889bf7c5 16180 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16181 Go through the low target.
16182 (do_child_store_inferior_registers): Use regptr.
16183 (strwinerror): New function.
16184 (win32_create_inferior): Handle Windows CE.
16185 Use strwinerror instead of strerror on Windows error
16186 codes. Add program to the error output.
16187 Don't close the main thread handle on Windows CE.
16188 (win32_attach): Use coredll.dll on Windows CE.
16189 (win32_kill): Close current process and current
16190 thread handles.
16191 (win32_detach): Use coredll.dll on Windows CE.
16192 (win32_resume): Let low target handle debug registers, and
16193 step request.
16194 (handle_exception): Add/Remove initial breakpoint. Avoid
16195 non-existant WSTOPSIG on Windows CE.
16196 (win32_read_inferior_memory): Cast to remove warning.
16197 (win32_arch_string): Go through the low target.
16198 (initialize_low): Call set_breakpoint_data with the low
16199 target's breakpoint.
16200 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16201 FOP_REGNUM, mappings): Move to ...
16202 * win32-i386-low.c: ... here.
16203 * win32-low.c (win32_thread_info): Move to ...
16204 * win32-low.h: ... here.
16205 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16206 win32-arm-low.c and wincecompat.c.
16207 (all:): Add $EXEEXT.
16208 (install-only:): Likewise.
16209 (gdbserver:): Likewise.
16210 (gdbreplay:): Likewise.
16211 * config.in: Regenerate.
16212 * configure: Regenerate.
16213
41093d81
PA
162142007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16215
16216 * win32-low.c: Rename typedef thread_info to
16217 win32_thread_info throughout.
16218
544afa54
PA
162192007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16220
16221 * win32-i386-low.c: Rename to ...
16222 * win32-low.c: ... this.
16223 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16224 * Makefile.in: Likewise.
16225
bce7165d
PA
162262007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16227
16228 * remote-utils.c (monitor_output): Constify msg parameter.
16229 * server.h (monitor_output): Likewise.
16230 * win32-i386-low.c (handle_output_debug_string): New.
16231 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16232 handle_output_debug_string.
16233 (get_child_debug_event): Likewise.
16234
506c7aa0
DJ
162352007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16236
16237 * server.c (main): Correct strtoul check.
16238
42c81e2a
DJ
162392007-03-27 Jon Ringle <jon@ringle.org>
16240
16241 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16242
9453113a
DJ
162432007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16244
16245 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16246
64a69107
DJ
162472007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16248
16249 * terminal.h: Check HAVE_SGTTY_H.
16250
162512007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16252
16253 * remote-utils.c (remote_open): Print out the assigned port number.
16254
c74d0ad8
DJ
162552007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16256
16257 * remote-utils.c (monitor_output): New function.
16258 * server.c (debug_threads): Define here.
16259 (monitor_show_help): New function.
16260 (handle_query): Handle qRcmd.
16261 (main): Do not handle 'd' packet.
16262 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16263 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16264 of debug_threads.
16265
de7c3b4a
PA
162662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16267
16268 * Makefile.in (EXEEXT): New.
16269 (clean): Use $(EXEEXT).
16270
ef57601b
PA
162712007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16272
16273 * target.h (target_ops): Rename send_signal to request_interrupt,
16274 and remove enum target_signal parameter.
16275 * linux-low.c (linux_request_interrupt): Rename from
16276 linux_send_signal, and always send SIGINT.
16277 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16278 and always send SIGINT.
16279 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16280 of send_signal.
16281 (input_interrupt): Likewise.
16282
820f2bda
PA
162832007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16284
16285 * server.c (get_features_xml): Check if target implemented
16286 arch_string.
16287 * win32-i386-low.c (win32_arch_string): New.
16288 (win32_target_ops): Add win32_arch_string as arch_string member.
16289
ab39bf24
UW
162902007-02-22 Markus Deuling <deuling@de.ibm.com>
16291
16292 * spu-low.c (spu_arch_string): New.
16293 (spu_target_ops): Add spu_arch_string.
16294
61ff6e04
DJ
162952007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16296
16297 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16298 * configure.ac: Do not check for terminal.h.
16299 * configure, config.in: Regenerated.
16300
fb1e4ffc
DJ
163012007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16302
16303 * Makefile.in (OBS): Add $(XML_BUILTIN).
16304 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16305 (clean): Update.
16306 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16307 (arm-with-iwmmxt.c): New.
16308 * config.in, configure: Regenerate.
16309 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16310 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16311 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16312 (arm*-*-linux*): Add iWMMXt and regset support.
16313 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16314 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16315 (arm_store_wmmxregset, target_regsets): New.
16316 * server.c (get_features_xml): Take annex argument. Check builtin
16317 XML documents.
16318 (handle_query): Handle multiple annexes.
16319
0f48aa01
DJ
163202007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16321
16322 * remote-utils.c [USE_WIN32API] (read, write): Define.
16323 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16324 write.
16325
23181151
DJ
163262007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16327
16328 * linux-i386-low.c (the_low_target): Set arch_string.
16329 * linux-x86-64-low.c (the_low_target): Likewise.
16330 * linux-low.c (linux_arch_string): New.
16331 (linux_target_ops): Add it.
16332 * linux-low.h (struct linux_target_ops): Add arch_string.
16333 * server.c (write_qxfer_response): Use const void * for DATA.
16334 (get_features_xml): New.
16335 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16336 * target.h (struct target_ops): Add arch_string method.
16337
9d606399
DJ
163382007-01-03 Denis Pilat <denis.pilat@st.com>
16339 Daniel Jacobowitz <dan@codesourcery.com>
16340
16341 * linux-low.c (linux_kill): Handle being called with no threads.
16342 * win32-i386-low.c (win32_kill): Likewise.
16343 (get_child_debug_event): Clear current_process_handle.
16344
163452006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16346 Daniel Jacobowitz <dan@codesourcery.com>
16347
16348 * remote-utils.c (remote_open): Check the type of specified
16349 serial port devices before opening them.
16350 * server.c (main): Kill the inferior if an error occurs during
16351 the first remote_open.
16352
a5e13d24
DJ
163532006-12-05 Markus Deuling <deuling@de.ibm.com>
16354
16355 * README: Update supported targets.
16356
186947f7
DJ
163572006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16358
16359 * Makefile.in (clean): Remove reg-mips64.c.
16360 (reg-mips64.c, reg-mips64.o): New rules.
16361 * configure.srv: Handle mips64. Include regset support for mips.
16362 * linux-mips-low.c (union mips_register): New.
16363 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16364 (mips_breakpoint, mips_breakpoint_at): Use int.
16365 (mips_collect_register, mips_supply_register)
16366 (mips_collect_register_32bit, mips_supply_register_32bit)
16367 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16368 (mips_store_fpregset, target_regsets): New.
16369 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16370
a13e2c95
UW
163712006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16372
16373 * configure.srv: Add target "spu*-*-*".
16374 * Makefile.in (clean): Remove reg-spu.c.
16375 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16376 * spu-low.c: New file.
16377
cb7283db
DJ
163782006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16379
16380 * configure.ac: Correct td_thr_tls_get_addr test.
16381 * configure: Regenerated.
16382
89be2091
DJ
163832006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16384
16385 * linux-low.c (linux_wait_for_event): Reformat. Use the
16386 pass_signals array.
16387 * remote-utils.c (decode_address_to_semicolon): New.
16388 * server.c (pass_signals, handle_general_set): New.
16389 (handle_query): Mention QPassSignals for qSupported.
16390 (main): Call handle_general_set.
16391 * server.h (pass_signals, decode_address_to_semicolon): New.
16392
000ef4f0
DJ
163932006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16394
16395 * server.c (handle_query): Correct error handling for read_auxv.
16396
b7149293
UW
163972005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16398
16399 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16400 and srv_linux_thread_db to yes.
16401 * linux-s390-low.c (s390_fill_gregset): New function.
16402 (target_regsets): Define data structure.
16403
dae5f5cf
DJ
164042006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16405
16406 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16407 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16408 * config.in, configure: Regenerated.
16409 * inferiors.c (gdb_id_to_thread): New function.
16410 (gdb_id_to_thread_id): Use it.
16411 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16412 * linux-low.h (struct process_info): Add th member.
16413 (thread_db_get_tls_address): New prototype.
16414 * remote-utils.c (decode_address): Make non-static.
16415 * server.c (handle_query): Handle qGetTLSAddr.
16416 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16417 * target.h (struct target_ops): Add get_tls_address.
16418 * thread-db.c (maybe_attach_thread): Save the thread handle.
16419 (thread_db_get_tls_address): New.
16420
32ca6d61
DJ
164212006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16422
16423 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16424 (linux_resume_one_process): Take a siginfo_t *. Update all
16425 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16426 (struct pending_signals): Add a siginfo_t.
16427 (linux_wait_for_process): Always set last_status.
16428 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16429 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16430 * linux-low.h (struct process_info): Add last_status.
16431
5ffff7c1
DJ
164322006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16433
16434 * remote-utils.c (try_rle): New function.
16435 (putpkt_binary): Use it.
16436
8695c747
DJ
164372006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16438
16439 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16440 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16441 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16442 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16443 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16444 point registers.
16445
290fadea
RS
164462006-08-08 Richard Sandiford <richard@codesourcery.com>
16447
16448 * server.c (terminal_fd): New variable.
16449 (old_foreground_pgrp): Likewise.
16450 (restore_old_foreground_pgrp): New function.
16451 (start_inferior): Record the terminal file descriptor in terminal_fd
16452 and its original foreground group in old_foreground_pgrp. Register
16453 restore_old_foreground_pgrp with atexit().
16454
9f2e1e63
DJ
164552006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16456
16457 * server.c (handle_query): Correct qPart to qXfer.
16458
b80864fb
DJ
164592006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16460
16461 * configure.ac: Check for more headers which are missing on
16462 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16463 * configure.srv: Add Cygwin and mingw32.
16464 * remote-utils.c: Don't include headers unconditionally which
16465 are missing on mingw32. Include <winsock.h> for mingw32.
16466 (remote_open): Adjust for mingw32 support. Flush
16467 standard error after writing to it.
16468 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16469 (unblock_async_io, enable_async_io, disable_async_io)
16470 (readchar, getpkt): Update for Winsock support.
16471 (prepare_resume_reply): Expect a protocol signal number.
16472 * server.c: Disable <sys/wait.h> on mingw32.
16473 (start_inferior): Adjust for mingw32 support. Flush
16474 standard error after writing to it.
16475 (attach_inferior): Likewise. Use protocol signal
16476 numbers.
16477 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16478 and names.
16479 * win32-i386-low.c: New file.
16480 * Makefile.in (XM_CLIBS): Set.
16481 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16482 (win32-i386-low.o): New dependency rule.
16483 * linux-low.c (linux_wait): Use target signal numbers.
16484 * target.h (struct target_ops): Doc fix.
16485 * server.h (target_signal_to_name): New prototype.
16486 * gdbreplay.c: Don't include headers unconditionally which
16487 are missing on mingw32. Include <winsock.h> for mingw32.
16488 (remote_close, remote_open): Adjust for Winsock support.
16489 * configure, config.in: Regenerated.
16490
0876f84a
DJ
164912006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16492
16493 * server.c (decode_xfer_read, write_qxfer_response): New.
16494 (handle_query): Take a packet length argument. Handle
16495 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16496 the qSupported response.
16497 (main): Update call to handle_query.
16498
01f9e8fa
DJ
164992006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16500
16501 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16502 (putpkt_binary): Renamed from putpkt and adjusted for binary
16503 data.
16504 (putpkt): New wrapper for putpkt_binary.
16505 (readchar): Don't mask off the high bit.
16506 (decode_X_packet): New function.
16507 * server.c (main): Call putpkt_binary if a handler sets the packet
16508 length. Save the length of the incoming packet. Handle 'X'.
16509 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16510
be2a5f71
DJ
165112006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16512
16513 * server.c (handle_query): Handle qSupported.
16514
ea025f5f
DJ
165152006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16516
16517 * remote-utils.c (all_symbols_looked_up): New variable.
16518 (look_up_one_symbol): Check it.
16519 * server.h (look_up_one_symbol): New declaration.
16520 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16521
9308fc88
DJ
165222006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16523
16524 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16525 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16526 (PTRACE_GET_THREAD_AREA): Define.
16527 (ps_get_thread_area): New function.
16528
52fb6437
NS
165292006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16530
16531 * configure.srv (m68k*-*-uclinux*): New target.
16532 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16533 (linux_resume_one_process): Remove extraneous cast.
16534 (linux_read_offsets): New.
16535 (linux_target_op): Add linux_read_offsets on mmuless systems.
16536 * server.c (handle_query): Add qOffsets logic.
16537 * target.h (struct target_ops): Add read_offsets.
16538
21b0f40c
DJ
165392006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16540
16541 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16542 (PTRACE_GET_THREAD_AREA): Define.
16543 (ps_get_thread_area): New function.
16544 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16545 (linux-x86-64-low.o): Update.
16546
0050a760
DJ
165472006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16548
16549 * configure.ac: Remove checks for prfpregset_t.
16550 * gdb_proc_service.h: New file.
16551 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16552 new "gdb_proc_service.h".
16553 * proc-service.c: Likewise.
16554 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16555 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16556 * Makefile.in (gdb_proc_service_h): Updated.
16557 * configure, config.in: Regenerated.
16558
b92a518e
DJ
165592006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16560
16561 * remote-utils.c (prepare_resume_reply): Move declaration
16562 of gdb_id_from_wait to the top of the block.
16563
545587ee
DJ
165642006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16565
16566 * linux-low.c (regsets_store_inferior_registers): Read the regset
16567 from the target before filling it.
16568
9db87ebd
DJ
165692006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16570
16571 * server.c (attach_inferior): Return SIGTRAP for a successful
16572 attach.
16573
dd24457d
DJ
165742006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16575
16576 * Makefile.in (OBS): Add version.o.
16577 (STAGESTUFF): Delete.
16578 (version.o): Add dependencies.
16579 (version.c): Replace rule.
16580 (clean): Remove version.c.
16581 * server.c (gdbserver_version): New.
16582 (gdbserver_usage): Use printf.
16583 (main): Handle --version and --help.
16584 * server.h (version, host_name): Add declarations.
16585
6f0f660e
EZ
165862005-12-23 Eli Zaretskii <eliz@gnu.org>
16587
889bf7c5
PA
16588 * linux-arm-low.c:
16589 * linux-arm-low.c:
16590 * inferiors.c:
16591 * i387-fp.h:
16592 * i387-fp.c:
16593 * gdbreplay.c:
16594 * regcache.c:
16595 * proc-service.c:
16596 * mem-break.h:
16597 * mem-break.c:
16598 * linux-x86-64-low.c:
16599 * linux-sh-low.c:
16600 * linux-s390-low.c:
16601 * linux-ppc64-low.c:
16602 * linux-ppc-low.c:
16603 * linux-mips-low.c:
16604 * linux-m68k-low.c:
16605 * linux-m32r-low.c:
16606 * linux-low.h:
16607 * linux-low.c:
16608 * linux-ia64-low.c:
16609 * linux-i386-low.c:
16610 * linux-crisv32-low.c:
16611 * thread-db.c:
16612 * terminal.h:
16613 * target.h:
16614 * target.c:
16615 * server.h:
16616 * server.c:
16617 * remote-utils.c:
16618 * regcache.h:
16619 * utils.c:
16620 * Makefile.in:
16621 * configure.ac:
6f0f660e
EZ
16622 * gdbserver.1: Add (C) after Copyright. Update the FSF
16623 address.
16624
9d1fb177
DJ
166252005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16626
16627 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16628 (arm_breakpoint_at): Recognize both breakpoints.
16629 (the_low_target): Use the correct breakpoint instruction.
16630
011a70c2
DJ
166312005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16632
16633 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16634 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16635 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16636 (the_low_target): Update.
16637
7fb85e41
AS
166382005-10-25 Andreas Schwab <schwab@suse.de>
16639
16640 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16641
16642 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16643 (ia64_num_regs): Reduce to 462.
16644
3db0444b
DJ
166452005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16646
16647 * acinclude.m4: Correct quoting.
16648 * aclocal.m4: Regenerated.
16649
16650 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16651 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16652 (thread_db_init): Call thread_db_err_str.
16653 * configure.ac: Check for TD_VERSION.
16654 * config.in, configure: Regenerated.
16655
bee0189a
DJ
166562005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16657
16658 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16659
e9d25b98
DJ
166602005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16661
16662 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16663 is not available. Define HAVE_PTRACE_GETREGS if it is.
16664 * config.in, configure: Regenerated.
16665 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16666 * linux-i386-low.c, linux-m68k-low.c: Update to use
16667 HAVE_PTRACE_GETREGS.
16668 * linux-low.c (regsets_fetch_inferior_registers)
16669 (regsets_store_inferior_registers): Only return 0 if we processed
16670 GENERAL_REGS.
16671 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16672 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16673
a06660f7
DJ
166742005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16675
16676 * inferiors.c (struct thread_info): Add gdb_id.
16677 (add_thread): Add gdb_id argument.
16678 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16679 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16680 calls to add_thread.
16681 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16682 * server.c (handle_query): Use thread_to_gdb_id.
16683 (handle_v_cont, main): Use gdb_id_to_thread_id.
16684 * server.h (add_thread): Update prototype.
16685 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16686 prototypes.
16687
5a1f5858
DJ
166882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16689
16690 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16691 left-padded registers.
16692 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16693 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16694
e122f1f5
SE
166952005-07-01 Steve Ellcey <sje@cup.hp.com>
16696
16697 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16698 * configure: Regenerate.
16699 * config.in: Regenerate.
16700 * server.h (NEED_DECLARATION_STRERROR):
16701 Replace with !HAVE_DECL_STRERROR.
16702
d592fa2f
DJ
167032005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16704
16705 * linux-low.c (linux_wait, linux_send_signal): Don't test
16706 an unsigned long variable for > 0 if it could be MAX_ULONG.
16707 * server.c (myresume): Likewise.
16708 * target.c (set_desired_inferior): Likewise.
16709
ccbd4912
MK
167102005-06-13 Mark Kettenis <kettenis@gnu.org>
16711
16712 * configure.ac: Simplify and improve check for socklen_t.
16713 * configure, config.in: Regenerate.
16714
f450004a
DJ
167152005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16716
16717 * acconfig.h: Remove.
16718 * configure.ac: Add a test for socklen_t. Use three-argument
16719 AC_DEFINE throughout.
16720 * config.in: Regenerated using autoheader 2.59.
16721 * configure: Regenerated.
16722
16723 * gdbreplay.c (socklen_t): Provide a default.
16724 (remote_open): Use socklen_t.
16725 * remote-utils.c (socklen_t): Provide a default.
16726 (remote_open): Use socklen_t.
16727 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16728 unsigned char.
16729
16730 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16731 char for buffers.
16732 * linux-low.c (linux_read_memory, linux_write_memory)
16733 (linux_read_auxv): Likewise.
16734 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16735 (check_mem_write): Likewise.
16736 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16737 Likewise.
16738 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16739 (registers_from_string, register_data): Likewise.
16740 * server.c (handle_query, main): Likewise.
16741 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16742 (decode_M_packet): Likewise.
16743 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16744 * target.h (struct target_ops): Update read_memory, write_memory,
16745 and read_auxv.
16746 (read_inferior_memory, write_inferior_memory): Update.
16747 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16748 to unsigned char *.
16749 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16750 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16751 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16752 linux-s390-low.c, linux-sh-low.c: Update for changes in
16753 read_inferior_memory and the_low_target->breakpoint.
16754
eee84df1
DJ
167552005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16756
16757 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16758 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16759 * configure.srv: Add powerpc64-*-linux*.
16760 * linux-ppc64-low.c: New file.
16761
45b134e5
OF
167622005-05-23 Orjan Friberg <orjanf@axis.com>
16763
16764 * linux-cris-low.c: New file with support for CRIS.
16765 * linux-crisv32-low.c: Ditto for CRISv32.
16766 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16767 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16768 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16769 reg-crisv32.o, and reg-crisv32.c to make rules.
16770 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16771 recognized targets.
16772
48d93c75
UW
167732005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16774
16775 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16776 of sizeof (PTRACE_XFER_TYPE).
16777 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16778
e013ee27
OF
167792005-05-12 Orjan Friberg <orjanf@axis.com>
16780
889bf7c5 16781 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16782 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16783 pointers for hardware watchpoint support.
16784 * linux-low.h (struct linux_target_ops): Ditto.
16785 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16786 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16787 to linux_target_ops.
16788 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16789 reply packet.
16790 * server.c (main): Recognize 'Z' and 'z' packets.
16791
b0ded00b
UW
167922005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16793
16794 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16795 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16796 (the_low_target): Add new members.
16797
8643e2ad
DJ
167982005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16799
16800 * proc-service.c (ps_lgetregs): Search all_processes instead of
16801 all_threads.
16802
fc620387
DJ
168032005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16804
16805 * server.c (start_inferior): Change return type to int.
16806 (attach_inferior): Change sigptr to int *.
16807 (handle_v_cont, handle_v_requests): Change signal to int *.
16808 (main): Change signal to int.
16809
168102005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16811
16812 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16813 * configure.srv: Add m32r*-*-linux*.
16814 * linux-m32r-low.c: New file.
16815
e0e76420
DJ
168162005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16817
16818 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16819
a1928bad
DJ
168202005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16821
16822 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16823 Take unsigned long arguments for PIDs.
16824 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16825 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16826 (wait_for_sigstop, linux_resume_one_process)
16827 (regsets_fetch_inferior_registers, linux_send_signal)
16828 (linux_read_auxv): Likewise. Update the types of variables holding
16829 PIDs. Update format string specifiers.
16830 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16831 * remote-utils.c (prepare_resume_reply): Likewise.
16832 * server.c (cont_thread, general_thread, step_thread)
16833 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16834 unsigned long.
16835 (handle_query): Update format specifiers.
16836 (handle_v_cont, main): Use strtoul for thread IDs.
16837 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16838 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16839 (general_thread, step_thread, thread_from_wait)
16840 (old_thread_from_wait): Update.
16841 * target.h (struct thread_resume): Use unsigned long for THREAD.
16842 (struct target_ops): Use unsigned long for arguments to attach and
16843 thread_alive.
16844
dcdb98d2
DJ
168452005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16846
16847 * acinclude.m4: Include bfd/bfd.m4 directly.
16848 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16849 <agriffis@toolchain.org>.
16850 * aclocal.m4, configure: Regenerated.
16851
bec39cab
AC
168522005-01-07 Andrew Cagney <cagney@gnu.org>
16853
16854 * configure.ac: Rename configure.in, require autoconf 2.59.
16855 * configure: Re-generate.
16856
434c4c77
DJ
168572004-12-08 Daniel Jacobowitz <dan@debian.org>
16858
16859 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16860 LIBS when finished.
16861 * aclocal.m4: Regenerated.
16862 * configure: Regenerated.
16863
db1d3e1b
AS
168642004-11-21 Andreas Schwab <schwab@suse.de>
16865
16866 * linux-m68k-low.c (m68k_num_gregs): Define.
16867 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16868 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16869 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16870 (m68k_breakpoint_at): New. Add to the_low_target.
16871
16872 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16873 srv_linux_thread_db to yes.
16874
43360365
JB
168752004-10-20 Joel Brobecker <brobecker@gnat.com>
16876
16877 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16878 (ARCH_SET_FS): Likewise.
16879 (ARCH_GET_FS): Likewise.
16880 (ARCH_GET_GS): Likewise.
16881
fd500816
DJ
168822004-10-16 Daniel Jacobowitz <dan@debian.org>
16883
16884 * linux-i386-low.c (ps_get_thread_area): New.
16885 * linux-x86-64-low.c (ps_get_thread_area): New.
16886 * linux-low.c: Include <sys/syscall.h>.
16887 (linux_kill_one_process): Don't kill the first thread here.
16888 (linux_kill): Kill the first thread here.
16889 (kill_lwp): New function.
16890 (send_sigstop, linux_send_signal): Use it.
16891 * proc-service.c: Clean up #ifdefs.
16892 (fpregset_info): Delete.
16893 (ps_lgetregs): Update and enable implementation.
16894 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16895 implementations.
16896 * remote-utils.c (struct sym_cache, symbol_cache): New.
16897 (input_interrupt): Print a clearer message.
16898 (async_io_enabled): New variable.
16899 (enable_async_io, disable_async_io): Use it. Update comments.
16900 (look_up_one_symbol): Use the symbol cache.
16901 * thread-db.c (thread_db_look_up_symbols): New function.
16902 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16903
f6de3c42
DJ
169042004-10-16 Daniel Jacobowitz <dan@debian.org>
16905
16906 * configure.in: Test for -rdynamic.
16907 * configure: Regenerated.
16908 * Makefile (INTERNAL_LDFLAGS): New.
16909 (gdbserver, gdbreplay): Use it.
16910
2c0fc042
AC
169112004-09-02 Andrew Cagney <cagney@gnu.org>
16912
16913 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16914
075b3282
DJ
169152004-03-23 Daniel Jacobowitz <drow@mvista.com>
16916
16917 * linux-low.c (linux_wait): Clear all_processes list also.
16918
fa6a77dc
DJ
169192004-03-12 Daniel Jacobowitz <drow@mvista.com>
16920
16921 * linux-low.c: Include <errno.h>. Remove extern declaration of
16922 errno.
16923
6d782a97
DJ
169242004-03-12 Daniel Jacobowitz <drow@mvista.com>
16925
16926 * gdbreplay.c, server.h, utils.c: Update copyright years.
16927
3a7fb99b
DJ
169282004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16929
16930 * server.c (main): Print child status or termination signal from
16931 variable 'signal', not 'sig'.
16932
c3e735a6
DJ
169332004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16934
16935 * linux-low.c (linux_read_memory): Change return type to
16936 int. Check for and return error from ptrace().
16937 * target.c (read_inferior_memory): Change return type to int. Pass
16938 back return status from the_target->read_memory().
16939 * target.h (struct target_ops): Adapt *read_memory() prototype.
16940 Update comment.
16941 (read_inferior_memory): Adapt prototype.
16942 * server.c (main): Return an error packet if
16943 read_inferior_memory() returns an error.
16944
a59d1c82
DJ
169452004-03-04 Daniel Jacobowitz <drow@mvista.com>
16946
16947 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16948 Unify with other clean targets.
16949
dc3f8883
DJ
169502004-02-29 Daniel Jacobowitz <drow@mvista.com>
16951
16952 * server.c (handle_v_cont): Call set_desired_inferior.
16953
89a208da
DJ
169542004-02-29 Daniel Jacobowitz <drow@mvista.com>
16955
16956 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16957
62ea82f5
DJ
169582004-02-29 Daniel Jacobowitz <drow@mvista.com>
16959
16960 * linux-low.c (linux_wait): Unblock async I/O.
16961 (linux_resume): Block and enable async I/O.
16962 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16963 * server.h (block_async_io, unblock_async_io): Add prototypes.
16964
6910d122
DJ
169652004-02-29 Daniel Jacobowitz <drow@mvista.com>
16966
16967 * remote-utils.c (remote_open): Print a status notice after
16968 opening a TCP port.
16969 * server.c (attach_inferior): Print a status notice after
16970 attaching.
16971
169722004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16973
16974 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16975
c89dc5d4
DJ
169762004-02-26 Daniel Jacobowitz <drow@mvista.com>
16977
16978 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16979 error packet.
16980 * server.c, target.h: Update copyright years.
16981
4b8dad4a
RM
169822004-02-25 Roland McGrath <roland@redhat.com>
16983
16984 * target.h (struct target_ops): New member `read_auxv'.
16985 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16986 * linux-low.c (linux_read_auxv): New function.
16987 (linux_target_ops): Initialize `read_auxv' member to that.
16988
d7446758
JB
169892004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16990
16991 Committed by Jim Blandy <jimb@redhat.com>.
16992
16993 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16994 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16995 instead of GPR_SIZE to distiguish s390 and s390x targets.
16996
5544ad89
DJ
169972004-01-31 Daniel Jacobowitz <drow@mvista.com>
16998
16999 * linux-low.c: Update copyright year.
17000 (check_removed_breakpoint): Clear pending_is_breakpoint.
17001 (linux_set_resume_request, linux_queue_one_thread)
17002 (resume_status_pending_p): New functions.
17003 (linux_continue_one_thread): Use process->resume.
17004 (linux_resume): Only resume threads if there are no pending events.
17005 * linux-low.h (struct process_info): Add resume request
17006 pointer.
17007
2a68b70e
DJ
170082004-01-30 Daniel Jacobowitz <drow@mvista.com>
17009
17010 * regcache.c (new_register_cache): Clear the allocated register
17011 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17012
64386c31
DJ
170132003-10-13 Daniel Jacobowitz <drow@mvista.com>
17014
17015 * linux-low.c (linux_resume): Take a struct thread_resume *
17016 argument.
17017 (linux_wait): Update call.
17018 (resume_ptr): New static variable.
17019 (linux_continue_one_thread): Renamed from
17020 linux_continue_one_process. Use resume_ptr.
17021 (linux_resume): Use linux_continue_one_thread.
17022 * server.c (handle_v_cont, handle_v_requests): New functions.
17023 (myresume): New function.
17024 (main): Handle 'v' case.
17025 * target.h (struct thread_resume): New type.
17026 (struct target_ops): Change argument of "resume" to struct
17027 thread_resume *.
17028 (myresume): Delete macro.
17029
c938e9b0
L
170302003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17031
17032 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17033 (uninstall): Support DESTDIR.
17034
7f313d07
BC
17035Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17036
17037 * configure.srv: Add xscale*linux copy of arm*linux entry.
17038
3b2fc2ea
DJ
170392003-07-24 Daniel Jacobowitz <drow@mvista.com>
17040
17041 * linux-arm-low.c (arm_reinsert_addr): New function.
17042 (the_low_target): Add arm_reinsert_addr.
17043
1c0a559e
MK
170442003-07-08 Mark Kettenis <kettenis@gnu.org>
17045
17046 * mem-break.c: Remove whitespace at end of file.
17047
43d5792c
DJ
170482003-06-28 Daniel Jacobowitz <drow@mvista.com>
17049
17050 * configure.in: Check whether we need to prototype strerror.
17051 * server.h: Optionally prototype strerror.
17052 * gdbreplay.c (perror_with_name): Use strerror.
17053 * linux-low.c (linux_attach_lwp): Use strerror.
17054 * utils.c (perror_with_name): Use strerror.
17055 * config.in, configure: Regenerated.
17056
c8a86edf
DJ
170572003-06-28 Daniel Jacobowitz <drow@mvista.com>
17058
17059 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17060 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17061
73d37363
DJ
170622003-06-20 Daniel Jacobowitz <drow@mvista.com>
17063
17064 * Makefile.in (SFILES): Update.
17065 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17066 low-sun3.c: Remove files.
17067
6ad8ae5c
DJ
170682003-06-17 Daniel Jacobowitz <drow@mvista.com>
17069
17070 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17071 (linux_detach_one_process, linux_detach): New functions.
17072 (linux_target_ops): Add linux_detach.
17073 * server.c (main): Handle 'D' packet.
17074 * target.h (struct target_ops): Add "detach" member.
17075 (detach_inferior): Define.
17076
1581182a
MK
170772003-06-13 Mark Kettenis <kettenis@gnu.org>
17078
17079 From Kelley Cook <kelleycook@wideopenwest.com>:
17080 * configure.srv: Accept i[34567]86 variants.
17081
e5379b03
DJ
170822003-06-05 Daniel Jacobowitz <drow@mvista.com>
17083
17084 * linux-low.c (linux_wait_for_event): Correct comment typos.
17085 (linux_resume_one_process): Call check_removed_breakpoint.
17086 (linux_send_signal): New function.
17087 (linux_target_ops): Add linux_send_signal.
17088 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17089 of kill.
17090 * target.h (struct target_ops): Add send_signal.
17091
2ff29de4
JB
170922003-05-29 Jim Blandy <jimb@redhat.com>
17093
17094 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17095 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17096 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17097 away part of the register's value.
17098
254787d4
DJ
170992003-03-26 Daniel Jacobowitz <drow@mvista.com>
17100
17101 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17102 (linux_wait_for_event, linux_init_signals): Likewise.
17103
94e10508
DJ
171042003-03-17 Daniel Jacobowitz <drow@mvista.com>
17105
17106 * configure.in: Check for stdlib.h.
17107 * configure: Regenerated.
17108 * config.in: Regenerated.
17109
4c0711e0
DJ
171102003-01-04 Andreas Schwab <schwab@suse.de>
17111
17112 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17113
ef66e766
AC
171142003-01-02 Andrew Cagney <ac131313@redhat.com>
17115
17116 * Makefile.in: Remove obsolete code.
17117
a1358604
DJ
171182002-11-20 Daniel Jacobowitz <drow@mvista.com>
17119
17120 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17121 defined(PT_FPR0_HI).
17122
23ce3b1c
DJ
171232002-11-17 Stuart Hughes <seh@zee2.com>
17124
17125 * linux-arm-low.c (arm_num_regs): Increase.
17126 (arm_regmap): Include status register.
17127
171282002-11-17 Daniel Jacobowitz <drow@mvista.com>
17129
17130 * linux-low.c (register_addr): Remove incorrect -1 check.
17131
a9fa9f7d
DJ
171322002-08-29 Daniel Jacobowitz <drow@mvista.com>
17133
17134 * linux-low.c (linux_create_inferior): Call setpgid. Return
17135 the new PID.
17136 (unstopped_p, linux_signal_pid): Remove.
17137 (linux_target_ops): Remove linux_signal_pid.
17138 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17139 global instead of target method.
17140 * target.h (struct target_ops): Remove signal_pid. Update comment
17141 for create_inferior.
17142 * server.c (signal_pid): New variable.
17143 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17144 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17145 (attach_inferior): Set signal_pid.
17146
17574093
DJ
171472002-08-23 Daniel Jacobowitz <drow@mvista.com>
17148
17149 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17150
171512002-08-20 Jim Blandy <jimb@redhat.com>
17152
17153 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17154 default for this.
17155
171562002-08-01 Andrew Cagney <cagney@redhat.com>
17157
17158 * Makefile.in: Make chill references obsolete.
17159
171602002-07-24 Kevin Buettner <kevinb@redhat.com>
17161
17162 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17163 * configure: Regenerate.
17164 * config.in: Regenerate.
17165
171662002-07-09 David O'Brien <obrien@FreeBSD.org>
17167
17168 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17169 (perror_with_name, remote_close, remote_open, expect, play): Static.
17170
171712002-07-04 Michal Ludvig <mludvig@suse.cz>
17172
4b8dad4a 17173 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17174 byte offsets instead of an array of indexes.
17175 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17176
171772002-06-13 Daniel Jacobowitz <drow@mvista.com>
17178
17179 * regcache.c: Add comment.
17180
171812002-06-11 Daniel Jacobowitz <drow@mvista.com>
17182
17183 * thread-db.c: New file.
17184 * proc-service.c: New file.
17185 * acinclude.m4: New file.
17186 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17187 proc-service.o, and thread-db.o.
17188 (linux-low.o): Add USE_THREAD_DB.
17189 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17190 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17191 * aclocal.m4: Regenerated.
17192 * config.in: Regenerated.
17193 * configure: Regenerated.
17194 * configure.in: Check for proc_service.h, sys/procfs.h,
17195 thread_db.h, and linux/elf.h headrs.
17196 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17197 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17198 Check for -lthread_db and thread support.
17199 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17200 PowerPC, and SuperH.
17201 * i387-fp.c: Constify arguments.
17202 * i387-fp.h: Likewise.
17203 * inferiors.c: (struct thread_info): Renamed from
17204 `struct inferior_info'. Remove PID member. Use generic inferior
17205 list header. All uses updated.
17206 (inferiors, signal_pid): Removed.
17207 (all_threads): New variable.
17208 (get_thread): Define.
17209 (add_inferior_to_list): New function.
17210 (for_each_inferior): New function.
17211 (change_inferior_id): New function.
17212 (add_inferior): Removed.
17213 (remove_inferior): New function.
17214 (add_thread): New function.
17215 (free_one_thread): New function.
17216 (remove_thread): New function.
17217 (clear_inferiors): Use for_each_inferior and free_one_thread.
17218 (find_inferior): New function.
17219 (find_inferior_id): New function.
17220 (inferior_target_data): Update argument type.
17221 (set_inferior_target_data): Likewise.
17222 (inferior_regcache_data): Likewise.
17223 (set_inferior_regcache_data): Likewise.
17224 * linux-low.c (linux_bp_reinsert): Remove.
17225 (all_processes, stopping_threads, using_thrads)
17226 (struct pending_signals, debug_threads, pid_of): New.
17227 (inferior_pid): Replace with macro.
17228 (struct inferior_linux_data): Remove.
17229 (get_stop_pc, add_process): New functions.
17230 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17231 Use add_process and add_thread.
17232 (linux_attach_lwp): New function, based on old linux_attach. Use
17233 add_process and add_thread. Set stop_expected for new threads.
17234 (linux_attach): New function.
17235 (linux_kill_one_process): New function.
17236 (linux_kill): Kill all LWPs.
17237 (linux_thread_alive): Use find_inferior_id.
17238 (check_removed_breakpoints, status_pending_p): New functions.
17239 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17240 Update. Use WNOHANG. Wait for cloned processes also. Update process
17241 struct for the found process.
17242 (linux_wait_for_event): New function.
17243 (linux_wait): Use it. Support LWPs.
17244 (send_sigstop, wait_for_sigstop, stop_all_processes)
17245 (linux_resume_one_process, linux_continue_one_process): New functions.
17246 (linux_resume): Support LWPs.
17247 (REGISTER_RAW_SIZE): Remove.
17248 (fetch_register): Use register_size instead. Call supply_register.
17249 (usr_store_inferior_registers): Likewise. Call collect_register.
17250 Fix recursive case.
17251 (regsets_fetch_inferior_registers): Improve error message.
17252 (regsets_store_inferior_registers): Add debugging.
17253 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17254 (unstopped_p, linux_signal_pid): New functions.
17255 (linux_target_ops): Add linux_signal_pid.
17256 (linux_init_signals): New function.
17257 (initialize_low): Call it. Initialize using_threads.
17258 * regcache.c (inferior_regcache_data): Add valid
17259 flag.
17260 (get_regcache): Fetch registers lazily. Add fetch argument
17261 and update all callers.
17262 (regcache_invalidate_one, regcache_invalidate): New
17263 functions.
17264 (new_register_cache): Renamed from create_register_cache.
17265 Return the new regcache.
17266 (free_register_cache): Change argument to a void *.
17267 (registers_to_string, registers_from_string): Call get_regcache
17268 with fetch flag set.
17269 (register_data): Make static. Pass fetch flag to get_regcache.
17270 (supply_register): Call get_regcache with fetch flag clear.
17271 (collect_register): Call get_regcache with fetch flag set.
17272 (collect_register_as_string): New function.
17273 * regcache.h: Update.
17274 * remote-utils.c (putpkt): Flush after debug output and use
17275 stderr.
17276 Handle input interrupts while waiting for an ACK.
17277 (input_interrupt): Use signal_pid method.
17278 (getpkt): Flush after debug output and use stderr.
17279 (outreg): Use collect_register_as_string.
17280 (new_thread_notify, dead_thread_notify): New functions.
17281 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17282 and general_thread.
17283 (look_up_one_symbol): Flush after debug output.
17284 * server.c (step_thread, server_waiting): New variables.
17285 (start_inferior): Don't use signal_pid. Update call to mywait.
17286 (attach_inferior): Update call to mywait.
17287 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17288 (main): Don't fetch/store registers explicitly. Use
17289 set_desired_inferior. Support proposed ``Hs'' packet. Update
17290 calls to mywait.
17291 * server.h: Update.
17292 (struct inferior_list, struct_inferior_list_entry): New.
17293 * target.c (set_desired_inferior): New.
17294 (write_inferior_memory): Constify.
17295 (mywait): New function.
17296 * target.h: Update.
17297 (struct target_ops): New signal_pid method.
17298 (mywait): Removed macro, added prototype.
17299
17300 * linux-low.h (regset_func): Removed.
17301 (regset_fill_func, regset_store_func): New.
17302 (enum regset_type): New.
17303 (struct regset_info): Add type field. Use new operation types.
17304 (struct linux_target_ops): stop_pc renamed to get_pc.
17305 Add decr_pc_after_break and breakpoint_at.
17306 (get_process, get_thread_proess, get_process_thread)
17307 (strut process_info, all_processes, linux_attach_lwp)
17308 (thread_db_init): New.
17309
17310 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17311 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17312 (the_low_target): Add new members.
17313 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17314 (i386_store_fpxregset): Constify.
17315 (target_regsets): Add new kind identifier.
17316 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17317 (i386_set_pc): Add debugging.
17318 (i386_breakpoint_at): New function.
17319 (the_low_target): Add new members.
17320 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17321 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17322 (mips_breakpoint_at): New.
17323 (the_low_target): Add new members.
17324 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17325 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17326 (the_low_target): Add new members.
17327 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17328 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17329 (the_low_target): Add new members.
17330 * linux-x86-64-low.c (target_regsets): Add new kind
17331 identifier.
17332
173332002-05-15 Daniel Jacobowitz <drow@mvista.com>
17334
17335 From Martin Pool <mbp@samba.org>:
17336 * server.c (gdbserver_usage): New function.
17337 (main): Call it.
17338
173392002-05-14 Daniel Jacobowitz <drow@mvista.com>
17340
17341 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17342 stop_at -> stop_pc.
17343
173442002-05-04 Andrew Cagney <ac131313@redhat.com>
17345
17346 * Makefile.in: Remove obsolete code.
17347
173482002-04-24 Michal Ludvig <mludvig@suse.cz>
17349
17350 * linux-low.c (regsets_fetch_inferior_registers),
17351 (regsets_store_inferior_registers): Removed cast to int from
17352 ptrace() calls.
17353 * regcache.h: Added declaration of struct inferior_info.
17354
173552002-04-20 Daniel Jacobowitz <drow@mvista.com>
17356
17357 * inferiors.c (struct inferior_info): Add regcache_data.
17358 (add_inferior): Call create_register_cache.
17359 (clear_inferiors): Call free_register_cache.
17360 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17361 * regcache.c (struct inferior_regcache_data): New.
17362 (registers): Remove.
17363 (get_regcache): New function.
17364 (create_register_cache, free_register_cache): New functions.
17365 (set_register_cache): Don't initialize the register cache here.
17366 (registers_to_string, registers_from_string, register_data): Call
17367 get_regcache.
17368 * regcache.h: Add prototypes.
17369 * server.h: Likewise.
17370
173712002-04-20 Daniel Jacobowitz <drow@mvista.com>
17372
17373 * mem-break.c: New file.
17374 * mem-break.h: New file.
17375 * Makefile.in: Add mem-break.o rule; update server.h
17376 dependencies.
17377 * inferiors.c (struct inferior_info): Add target_data
17378 member.
17379 (clear_inferiors): Free target_data member if set.
17380 (inferior_target_data, set_inferior_target_data): New functions.
17381 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17382 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17383 * linux-low.c (linux_bp_reinsert): New variable.
17384 (struct inferior_linux_data): New.
17385 (linux_create_inferior): Use set_inferior_target_data.
17386 (linux_attach): Likewise. Call add_inferior.
17387 (linux_wait_for_one_inferior): New function.
17388 (linux_wait): Call it.
17389 (linux_write_memory): Add const.
17390 (initialize_low): Call set_breakpoint_data.
17391 * linux-low.h (struct linux_target_ops): Add breakpoint
17392 handling members.
17393 * server.c (attach_inferior): Remove extra add_inferior
17394 call.
17395 * server.h: Include mem-break.h. Update inferior.c
17396 prototypes.
17397 * target.c (read_inferior_memory)
17398 (write_inferior_memory): New functions.
17399 * target.h (read_inferior_memory)
17400 (write_inferior_memory): Change macros to prototypes.
17401 (struct target_ops): Update comments. Add const to write_memory
17402 definition.
17403
174042002-04-11 Daniel Jacobowitz <drow@mvista.com>
17405
17406 * linux-low.c (usr_store_inferior_registers): Support
17407 registers which are allowed to fail to store.
17408 * linux-low.h (linux_target_ops): Likewise.
17409 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17410 (ppc_cannot_store_register): FPSCR may not be storable.
17411
174122002-04-09 Daniel Jacobowitz <drow@mvista.com>
17413
17414 * server.h: Include <string.h> if HAVE_STRING_H.
17415 * ChangeLog: Correct paths in last ChangeLog entry.
17416
174172002-04-09 Daniel Jacobowitz <drow@mvista.com>
17418
17419 * linux-low.h: Remove obsolete prototypes.
17420 (struct linux_target_ops): New.
17421 (extern the_low_target): New.
17422 * linux-low.c (num_regs, regmap): Remove declarations.
17423 (register_addr): Use the_low_target explicitly.
17424 (fetch_register): Likewise.
17425 (usr_fetch_inferior_registers): Likewise.
17426 (usr_store_inferior_registers): Likewise.
17427 * linux-arm-low.c (num_regs): Remove.
17428 (arm_num_regs): Define.
17429 (arm_regmap): Renamed from regmap, made static.
17430 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17431 made static.
17432 (arm_cannot_store_register): Renamed from cannot_store_register,
17433 made static.
17434 (the_low_target): New.
17435 * linux-i386-low.c (num_regs): Remove.
17436 (i386_num_regs): Define.
17437 (i386_regmap): Renamed from regmap, made static.
17438 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17439 made static.
17440 (i386_cannot_store_register): Renamed from cannot_store_register,
17441 made static.
17442 (the_low_target): New.
17443 * linux-ia64-low.c (num_regs): Remove.
17444 (ia64_num_regs): Define.
17445 (ia64_regmap): Renamed from regmap, made static.
17446 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17447 made static.
17448 (ia64_cannot_store_register): Renamed from cannot_store_register,
17449 made static.
17450 (the_low_target): New.
17451 * linux-m68k-low.c (num_regs): Remove.
17452 (m68k_num_regs): Define.
17453 (m68k_regmap): Renamed from regmap, made static.
17454 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17455 made static.
17456 (m68k_cannot_store_register): Renamed from cannot_store_register,
17457 made static.
17458 (the_low_target): New.
17459 * linux-mips-low.c (num_regs): Remove.
17460 (mips_num_regs): Define.
17461 (mips_regmap): Renamed from regmap, made static.
17462 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17463 made static.
17464 (mips_cannot_store_register): Renamed from cannot_store_register,
17465 made static.
17466 (the_low_target): New.
17467 * linux-ppc-low.c (num_regs): Remove.
17468 (ppc_num_regs): Define.
17469 (ppc_regmap): Renamed from regmap, made static.
17470 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17471 made static.
17472 (ppc_cannot_store_register): Renamed from cannot_store_register,
17473 made static.
17474 (the_low_target): New.
17475 * linux-s390-low.c (num_regs): Remove.
17476 (s390_num_regs): Define.
17477 (s390_regmap): Renamed from regmap, made static.
17478 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17479 made static.
17480 (s390_cannot_store_register): Renamed from cannot_store_register,
17481 made static.
17482 (the_low_target): New.
17483 * linux-sh-low.c (num_regs): Remove.
17484 (sh_num_regs): Define.
17485 (sh_regmap): Renamed from regmap, made static.
17486 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17487 made static.
17488 (sh_cannot_store_register): Renamed from cannot_store_register,
17489 made static.
17490 (the_low_target): New.
17491 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17492 (the_low_target): New.
17493
174942002-04-09 Daniel Jacobowitz <drow@mvista.com>
17495
17496 * Makefile.in: Add stamp-h target.
17497 * configure.in: Create stamp-h.
17498 * configure: Regenerated.
17499
175002002-04-09 Daniel Jacobowitz <drow@mvista.com>
17501
17502 * inferiors.c: New file.
17503 * target.c: New file.
17504 * target.h: New file.
17505 * Makefile.in: Add target.o and inferiors.o. Update
17506 dependencies.
17507 * linux-low.c (inferior_pid): New static variable,
17508 moved from server.c.
17509 (linux_create_inferior): Renamed from create_inferior.
17510 Call add_inferior. Return 0 on success instead of a PID.
17511 (linux_attach): Renamed from myattach.
17512 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17513 (linux_thread_alive): Renamed from mythread_alive.
17514 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17515 child dies.
17516 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17517 (regsets_store_inferior_registers): Correct error message.
17518 Add missing ``return 0''.
17519 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17520 (linux_store_registers): Renamed from store_inferior_registers.
17521 (linux_read_memory): Renamed from read_inferior_memory.
17522 (linux_write_memory): Renamed from write_inferior_memory.
17523 (linux_target_ops): New structure.
17524 (initialize_low): Call set_target_ops ().
17525 * remote-utils.c (unhexify): New function.
17526 (hexify): New function.
17527 (input_interrupt): Send signals to ``signal_pid''.
17528 * server.c (inferior_pid): Remove.
17529 (start_inferior): Update create_inferior call.
17530 (attach_inferior): Call add_inferior.
17531 (handle_query): New function.
17532 (main): Call handle_query for `q' packets.
17533 * server.h: Include "target.h". Remove obsolete prototypes.
17534 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17535
175362002-04-09 Daniel Jacobowitz <drow@mvista.com>
17537
17538 * Makefile.in: Add WARN_CFLAGS. Update configury
17539 dependencies.
17540 * configure.in: Check for <string.h>
17541 * configure: Regenerate.
17542 * config.in: Regenerate.
17543 * gdbreplay.c: Include needed system headers.
17544 (remote_open): Remove strchr prototype.
17545 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17546 * regcache.c (supply_register): Change buf argument to const void *.
17547 (supply_register_by_name): Likewise.
17548 (collect_register): Change buf argument to void *.
17549 (collect_register_by_name): Likewise.
17550 * regcache.h: Add missing prototypes.
17551 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17552 * server.c (handle_query): New function.
17553 (attached): New static variable, moved out of main.
17554 (main): Quiet longjmp clobber warnings.
17555 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17556 * utils.c (error): Remove NORETURN.
17557 (fatal): Likewise.