gdb: Remove use of VEC from dwarf2read.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3e6ec53a
CB
12019-10-02 Christian Biesinger <cbiesinger@google.com>
2
3 * server.c (server_waiting): Change to bool.
4 (extended_protocol): Likewise.
5 (response_needed): Likewise.
6 (exit_requested): Likewise.
7 (run_once): Likewise.
8 (report_no_resumed): Likewise.
9 (non_stop): Likewise.
10 (disable_packet_vCont): Likewise.
11 (disable_packet_Tthread): Likewise.
12 (disable_packet_qC): Likewise.
13 (disable_packet_qfThreadInfo): Likewise.
14 (handle_general_set): Update.
15 (handle_detach): Update.
16 (handle_monitor_command): Update.
17 (handle_query): Update.
18 (captured_main): Update.
19 (process_serial_event): Update.
20 * server.h (server_waiting): Change to bool.
21 (disable_packet_vCont): Likewise.
22 (disable_packet_Tthread): Likewise.
23 (disable_packet_qC): Likewise.
24 (disable_packet_qfThreadInfo): Likewise.
25 (run_once): Likewise.
26 (non_stop): Likewise.
27 * target.c (target_stop_and_wait): Update.
28
80fd2826
TT
292019-10-02 Tom Tromey <tromey@adacore.com>
30
31 * Makefile.in (SFILES): Add common-inferior.c.
32 (OBS): Add common-inferior.o.
33 * server.c (startup_with_shell): Don't define.
34
46f29a9a
AB
352019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
36
37 * linux-low.c (linux_low_read_btrace): Update for change to
38 std::vector.
39
f9d949fb
CB
402019-09-20 Christian Biesinger <cbiesinger@google.com>
41
42 * debug.c (debug_threads): Remove comment in favor of the header.
43 * debug.h (using_threads): Add declaration.
44 (debug_threads): Add comment.
45 * linux-aarch64-low.c: Include debug.h and remove declaration of
46 debug_threads.
47 * nto-low.c: Likewise.
48 * remote-utils.c: Likewise.
49 * thread-db.c: Likewise.
50
abf516c6
UW
512019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
52
53 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
54 and powerpc-cell64l-ipa.o.
55 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
56 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
57 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
58 (spu*-*-*): Remove.
59
60 * spu-low.c: Remove file.
61
62 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
63 (parse_spufs_run): Remove.
64 (ppc_get_pc): Remove Cell/B.E. support.
65 (ppc_set_pc): Likewise.
66 (ppc_breakpoint_at): Likewise.
67 (ppc_arch_setup): Likewise.
68 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
69 tdesc_powerpc_cell32l.
70 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
71 or init_registers_powerpc_cell32l.
72 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
73 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
74 or init_registers_powerpc_cell32l.
75 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
76 (init_registers_powerpc_cell32l): Remove prototype.
77 (init_registers_powerpc_cell64l): Likewise.
78
79 * target.h (struct target_ops): Remove qxfer_spu member.
80 * server.c (handle_qxfer_spu): Remove.
81 (qxfer_packets): Remove entry for "spu".
82 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
83 * linux-low.c (SPUFS_MAGIC): Remove.
84 (spu_enumerate_spu_ids): Remove.
85 (linux_qxfer_spu): Remove.
86 (linux_target_ops): Remove qxfer_spu member.
87 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
88 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
89 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
90
2d41fa11
SDJ
912019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
92
93 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
94 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
95 * config.in: Regenerate.
96 * configure: Regenerate.
97
d59b55f0
TT
982019-08-15 Tom Tromey <tromey@adacore.com>
99
100 * target.c (target_write_memory): Use gdb::byte_vector.
101
4196ab2a
TT
1022019-08-15 Tom Tromey <tromey@adacore.com>
103
104 * tracepoint.c (write_inferior_data_pointer)
105 (write_inferior_integer, write_inferior_int8)
106 (write_inferior_uinteger, m_tracepoint_action_download)
107 (r_tracepoint_action_download, x_tracepoint_action_download)
108 (l_tracepoint_action_download, clear_inferior_trace_buffer)
109 (download_agent_expr, download_tracepoint_1)
110 (download_trace_state_variables, upload_fast_traceframes): Update.
111 * server.c (gdb_write_memory): Update.
112 * remote-utils.c (relocate_instruction): Update.
113 * proc-service.c (ps_pdwrite): Update.
114 * mem-break.c (remove_memory_breakpoint)
115 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
116 (uninsert_fast_tracepoint_jumps_at)
117 (reinsert_fast_tracepoint_jumps_at): Update.
118 * linux-x86-low.c (append_insns)
119 (i386_install_fast_tracepoint_jump_pad)
120 (amd64_write_goto_address, i386_write_goto_address): Update.
121 * linux-s390-low.c (append_insns, s390_write_goto_address):
122 Update.
123 * linux-ppc-low.c (ppc_relocate_instruction)
124 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
125 (ppc_write_goto_address): Update.
126 * linux-aarch64-low.c (append_insns): Update.
127 * target.h (struct target_ops): Update.
128 (write_inferior_memory): Don't declare.
129 * target.c (target_write_memory): Rename from
130 write_inferior_memory. Remove old target_write_memory.
131
c6778d00
TT
1322019-08-15 Tom Tromey <tromey@adacore.com>
133
134 * target.c (write_inferior_memory): Use std::vector.
135
404f2902
FCE
1362019-08-06 Frank Ch. Eigler <fche@redhat.com>
137
138 PR build/24886
139 * configure.ac: Drop enable-libmcheck support.
140 * configure, config.in: Rebuild.
141 * acinclude.m4: Don't include it.
142
4c5aa8e0
AH
1432019-07-19 Alan Hayward <alan.hayward@arm.com>
144
145 * configure.srv: Remove Arm xml files.
146
7cc17433
AH
1472019-07-19 Alan Hayward <alan.hayward@arm.com>
148
149 * configure.srv: Add new files. Remove xml generated files.
150 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
151 registers.
152 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
153 * linux-aarch32-tdesc.c: New file.
154 * linux-aarch32-tdesc.h: New file.
155 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
156 * linux-arm-low.c (init_registers_arm, tdesc_arm)
157 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
158 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
159 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
160 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
161 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
162 (arm_read_description): Call arm_linux_read_description.
163 (initialize_low_arch): Don't init registers.
164 * linux-arm-tdesc.c: New file.
165 * linux-arm-tdesc.h: New file.
166
166a82be
AH
1672019-07-10 Alan Hayward <alan.hayward@arm.com>
168
169 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
170 Move counter inside for.
171 (arm_read_description): Check ptrace earlier.
172 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
173
268a13a5
TT
1742019-07-09 Tom Tromey <tom@tromey.com>
175
176 * configure: Rebuild.
177 * configure.ac: Change common to gdbsupport.
178 * acinclude.m4: Change common to gdbsupport.
179 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
180 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
181 common to gdbsupport.
182 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
183 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
184 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
185 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
186 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
187 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
188 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
189 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
190 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
191 common to gdbsupport.
192
350fab54
AH
1932019-07-04 Alan Hayward <alan.hayward@arm.com>
194
195 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
196 defines.
197 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
198
2b40fda7
AH
1992019-07-04 Alan Hayward <alan.hayward@arm.com>
200
201 * configure.srv: Remove legacy xml.
202 * linux-aarch64-low.c (initialize_low_arch): Remove
203 initialize_low_tdesc call.
204 * linux-aarch64-tdesc-selftest.c: Remove file.
205 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
206 * linux-x86-low.c (initialize_low_arch): Remove
207 initialize_low_tdesc call.
208 * linux-x86-tdesc-selftest.c: Remove file.
209 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
210
7d10623d
TV
2112019-06-20 Tom de Vries <tdevries@suse.de>
212
213 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
214 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
215
8d6a48df
TV
2162019-06-19 Tom de Vries <tdevries@suse.de>
217
218 * debug.h (debug_write): Change return type to ssize_t.
219 * debug.c (debug_write): Same.
220
73cc7272
TT
2212019-06-14 Tom Tromey <tom@tromey.com>
222
223 * configure.ac: Use new path to gnulib.
224 * configure: Rebuild.
225 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
226 to gnulib.
227
08f10e02
TT
2282019-06-11 Tom Tromey <tom@tromey.com>
229
230 * Makefile.in (SFILES): Add alloc.c.
231 (OBS): Add alloc.o.
232 (IPA_OBJS): Add alloc-ipa.o.
233 (alloc-ipa.o): New target.
234 (%.o: ../%.c): New pattern rule.
235
422186a9
TT
2362019-06-10 Tom Tromey <tromey@adacore.com>
237
238 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
239 end warning with a newline.
240 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
241 newline.
242 * thread-db.c (attach_thread): Don't end warning with a newline.
243 (thread_db_notice_clone): Likewise.
244 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
245 newline.
246 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
247 end warning with a newline.
248
b02f78f9
PA
2492019-06-04 Pedro Alves <palves@redhat.com>
250
251 * server.c (captured_main): Use make_unique_xstrdup.
252
88ed7edb
TT
2532019-06-02 Tom Tromey <tom@tromey.com>
254
255 * gdbreplay.c (fromhex): Remove.
256 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
257
33a6bc35
TT
2582019-05-29 Tom Tromey <tromey@adacore.com>
259
260 * configure: Rebuild.
261
e90a813d
KB
2622019-05-06 Kevin Buettner <kevinb@redhat.com>
263
264 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
265 sign extension code on 32-bit builds.
266
353ea2d1
EZ
2672019-05-03 Eli Zaretskii <eliz@gnu.org>
268
269 * remote-utils.c:
270 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
271
b494cdff
TT
2722019-04-19 Tom Tromey <tom@tromey.com>
273
274 * server.c (struct vstop_notif): Derive from notif_event.
275 <base>: Remove.
276 (queue_stop_reply): Update.
277 (remove_all_on_match_ptid): Change type. Rewrite.
278 (discard_queued_stop_replies): Rewrite.
279 (in_queued_stop_replies_ptid): Change type.
280 (in_queued_stop_replies): Rewrite.
281 (notif_stop): Update.
282 (queue_stop_reply_callback): Update.
283 (captured_main): Don't call initialize_notif.
284 (push_stop_notification): Update.
285 * notif.c (notif_write_event, handle_notif_ack)
286 (notif_event_enque, notif_push): Update.
287 (notif_event_xfree, initialize_notif): Remove.
288 * notif.h (struct notif_event): Include <list>, not
289 "common/queue.h".
290 (struct notif_server) <queue>: Now a std::list.
291 (notif_event_p): Remove typedef.
292 (initialize_notif): Don't declare.
293 (struct notif_event): Add virtual destructor.
294
a7e559cc
AH
2952019-04-17 Alan Hayward <alan.hayward@arm.com>
296
297 * ax.c (ax_vdebug): Call debug_printf.
298 * debug.c (debug_write): New function.
299 * debug.h (debug_write): New declaration.
300 * linux-low.c (sigchld_handler): Call debug_write.
301
aeb2e706
AH
3022019-04-17 Alan Hayward <alan.hayward@arm.com>
303
304 * debug.c (debug_set_output): New function.
305 (debug_vprintf): Send output to debug_file.
306 (debug_flush): Likewise.
307 * debug.h (debug_set_output): New declaration.
308 * server.c (handle_monitor_command): Add debug-file option.
309 (captured_main): Likewise.
310
c1bc0935
AH
3112019-04-17 Alan Hayward <alan.hayward@arm.com>
312
313 * debug.c (remote_debug): Add definition.
314 * debug.h (remote_debug): Add declaration.
315 * hostio.c (remote_debug): Remove declaration.
316 * remote-utils.c (struct ui_file): Likewise.
317 (remote_debug): Likewise.
318 * remote-utils.h (remote_debug): Likewise,
319 * server.c (remote_debug): Remove definition.
320
3f52fdbc
KB
3212019-04-10 Kevin Buettner <kevinb@redhat.com>
322
323 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
324 when using a 64-bit gdbserver.
325
b0319eaa
TT
3262019-04-09 Tom Tromey <tromey@adacore.com>
327
328 * linux-low.c (select_event_lwp): Use find_thread_in_random.
329
eedc3f4f
TT
3302019-04-08 Tom Tromey <tom@tromey.com>
331
332 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
333 throw.
334 (linux_resume_one_lwp): Likewise.
335
230d2906
TT
3362019-04-08 Tom Tromey <tom@tromey.com>
337
338 * gdbreplay.c: Update.
339 * linux-low.c: Update.
340 * server.c: Update.
341
a70b8144
TT
3422019-04-08 Tom Tromey <tom@tromey.com>
343
344 * server.c: Use C++ exception handling.
345 * linux-low.c: Use C++ exception handling.
346 * gdbreplay.c: Use C++ exception handling.
347
3d6e9d23
TT
3482019-04-08 Tom Tromey <tom@tromey.com>
349
350 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
351 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
352 (captured_main, main): Update.
353 * gdbreplay.c (main): Update.
354
0570503d
PFC
3552019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
356
357 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
358 value in argument pointer, return 1 if the entry is found and 0
359 otherwise. Move comment.
360 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
361 * linux-low.h (linux_get_auxv): Declare.
362 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
363
227a9e65
TT
3642019-04-05 Tom Tromey <tromey@adacore.com>
365
366 * server.c (gdbserver_usage): Use upper-case for metasyntactic
367 variables.
368
69f4c9cc
AH
3692019-03-28 Alan Hayward <alan.hayward@arm.com>
370
371 * linux-low.c (AT_HWCAP2): Add define if not already included.
372
974c89e0
AH
3732019-03-26 Alan Hayward <alan.hayward@arm.com>
374
375 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
376 (aarch64_arch_setup): Call linux_get_hwcap.
377 * linux-arm-low.c (arm_get_hwcap): Remove function.
378 (arm_read_description): Call linux_get_hwcap.
379 * linux-low.c (linux_get_auxv): New function.
380 (linux_get_hwcap): Likewise.
381 (linux_get_hwcap2): Likewise.
382 * linux-low.h (linux_get_hwcap): New declaration.
383 (linux_get_hwcap2): Likewise.
384 * linux-ppc-low.c (ppc_get_auxv): Remove function.
385 (ppc_arch_setup): Call linux_get_hwcap.
386 * linux-s390-low.c (s390_get_hwcap): Remove function.
387 (s390_arch_setup): Call linux_get_hwcap.
388
1ef53e6b
AH
3892019-03-22 Alan Hayward <alan.hayward@arm.com>
390 Jiong Wang <jiong.wang@arm.com>
391
392 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
393 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
394 to fail.
395 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
396
ee4fbcfa
AH
3972019-03-22 Alan Hayward <alan.hayward@arm.com>
398 Jiong Wang <jiong.wang@arm.com>
399
400 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
401 (aarch64_get_hwcap): New function.
402 (aarch64_arch_setup): Read APIA hwcap.
403
6dc0ebde
AH
4042019-03-22 Alan Hayward <alan.hayward@arm.com>
405 Jiong Wang <jiong.wang@arm.com>
406
407 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
408 (initialize_low_tracepoint): Likewise.
409 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
410 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
411 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
412 (aarch64_linux_read_description): Likewise.
413 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
414
1163a4b7
JB
4152019-03-12 John Baldwin <jhb@FreeBSD.org>
416
417 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
418 i386_create_target_description for 'segments' parameter.
419 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
420 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
421 * win32-i386-low.c (i386_arch_setup): Likewise.
422
d3a70e03
TT
4232019-03-12 Tom Tromey <tromey@adacore.com>
424
425 * linux-low.c (iterate_over_lwps): Update.
426
37991b4f
TT
4272019-03-06 Tom Tromey <tom@tromey.com>
428
429 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
430 (captured_main): Use SCOPE_EXIT.
431
45950eb6
SDJ
4322019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
433
434 * configure.srv: Use '$enable_unittest' instead of '$development'
435 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
436 case.
437
43ac54fc
TT
4382019-02-27 Tom Tromey <tromey@adacore.com>
439
440 * gdbreplay.c (logchar): Handle \r\n.
441
df0da8a2
AH
4422019-02-07 Alan Hayward <alan.hayward@arm.com>
443
444 * linux-low.c (linux_attach): Add process before lwp.
445 * server.c (attach_inferior): Check if already attached.
446
1a5c2598
TT
4472019-02-07 Tom Tromey <tom@tromey.com>
448
449 * x86-tdesc.h: Rename include guard.
450 * x86-low.h: Add include guard.
451 * wincecompat.h: Rename include guard.
452 * win32-low.h: Add include guard.
453 * utils.h: Rename include guard.
454 * tracepoint.h: Rename include guard.
455 * tdesc.h: Rename include guard.
456 * target.h: Rename include guard.
457 * server.h: Rename include guard.
458 * remote-utils.h: Rename include guard.
459 * regcache.h: Rename include guard.
460 * nto-low.h: Rename include guard.
461 * notif.h: Add include guard.
462 * mem-break.h: Rename include guard.
463 * lynx-low.h: Add include guard.
464 * linux-x86-tdesc.h: Add include guard.
465 * linux-s390-tdesc.h: Add include guard.
466 * linux-ppc-tdesc-init.h: Add include guard.
467 * linux-low.h: Add include guard.
468 * linux-aarch64-tdesc.h: Add include guard.
469 * linux-aarch32-low.h: Add include guard.
470 * inferiors.h: Rename include guard.
471 * i387-fp.h: Rename include guard.
472 * hostio.h: Rename include guard.
473 * gdbthread.h: Rename include guard.
474 * gdb_proc_service.h: Rename include guard.
475 * event-loop.h: Rename include guard.
476 * dll.h: Rename include guard.
477 * debug.h: Rename include guard.
478 * ax.h: Rename include guard.
479
956cc47c
SN
4802018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
481
482 PR gdb/23985
483 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
484 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
485
a0707f3c
TT
4862019-01-25 Tom Tromey <tom@tromey.com>
487
488 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
489
0747795c
TT
4902019-01-25 Tom Tromey <tom@tromey.com>
491
492 * win32-low.c: Fix common/ includes.
493 * win32-i386-low.c: Fix common/ includes.
494 * tracepoint.c: Fix common/ includes.
495 * thread-db.c: Fix common/ includes.
496 * target.h: Fix common/ includes.
497 * symbol.c: Fix common/ includes.
498 * spu-low.c: Fix common/ includes.
499 * server.h: Fix common/ includes.
500 * server.c: Fix common/ includes.
501 * remote-utils.c: Fix common/ includes.
502 * regcache.h: Fix common/ includes.
503 * regcache.c: Fix common/ includes.
504 * nto-x86-low.c: Fix common/ includes.
505 * notif.h: Fix common/ includes.
506 * mem-break.h: Fix common/ includes.
507 * lynx-low.c: Fix common/ includes.
508 * lynx-i386-low.c: Fix common/ includes.
509 * linux-x86-tdesc-selftest.c: Fix common/ includes.
510 * linux-x86-low.c: Fix common/ includes.
511 * linux-low.c: Fix common/ includes.
512 * inferiors.h: Fix common/ includes.
513 * i387-fp.c: Fix common/ includes.
514 * hostio.c: Fix common/ includes.
515 * hostio-errno.c: Fix common/ includes.
516 * gdbthread.h: Fix common/ includes.
517 * gdbreplay.c: Fix common/ includes.
518 * fork-child.c: Fix common/ includes.
519 * event-loop.c: Fix common/ includes.
520 * ax.c:
521 (enum gdb_agent_op): Fix common/ includes.
522
be6d4f74
TT
5232019-01-21 Tom Tromey <tom@tromey.com>
524
525 * tracepoint.c: Fix includes.
526 * remote-utils.c: Fix includes.
527 * linux-x86-low.c: Fix includes.
528
66d91b39
JB
5292019-01-01 Joel Brobecker <brobecker@adacore.com>
530
531 * gdbreplay.c (gdbreplay_version): Update copyright year in
532 version message.
533 * server.c (gdbserver_version): Likewise.
534
754e3168
AH
5352018-12-05 Alan Hayward <alan.hayward@arm.com>
536
537 * linux-low.c (add_lwp): Switch ordering.
538
d105de22
TT
5392018-11-29 Tom Tromey <tom@tromey.com>
540
541 * win32-low.c (win32_join): Take pid, not process.
542 * target.h (struct target_ops) <join>: Change argument type.
543 (join_inferior): Change argument name.
544 * spu-low.c (spu_join): Take pid, not process.
545 * server.c (handle_detach): Preserve pid before destroying
546 process.
547 * lynx-low.c (lynx_join): Take pid, not process.
548 * linux-low.c (linux_join): Take pid, not process.
549
50138245
AH
5502018-11-23 Alan Hayward <alan.hayward@arm.com>
551
552 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
553 (aarch64_cannot_fetch_register): Likewise.
554 (struct linux_target_ops): Update references.
555
64f57f3d
PFC
5562018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
557
558 * linux-ppc-low.c: Include nat/linux-ptrace.h.
559
8d619c01
EBM
5602018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
561
562 * configure.srv (ipa_ppc_linux_regobj): Add
563 powerpc-isa207-htm-vsx32l-ipa.o and
564 powerpc-isa207-htm-vsx64l-ipa.o.
565 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
566 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
567 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
568 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
569 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
570 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
571 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
572 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
573 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
574 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
575 (init_registers_powerpc_isa207_htm_vsx32l)
576 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
577 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
578 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
579 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
580 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
581 (ppc_store_tm_ctarregset): New functions.
582 (ppc_regsets): Add entries for HTM regsets.
583 (ppc_arch_setup): Set htm in features struct when needed. Set
584 sizes for the HTM regsets.
585 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
586 (initialize_low_arch): Call
587 init_registers_powerpc_isa207_htm_vsx32l and
588 init_registers_powerpc_isa207_htm_vsx64l.
589 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
590 PPC_TDESC_ISA207_HTM_VSX.
591 (initialize_low_tracepoint): Call
592 init_registers_powerpc_isa207_htm_vsx32l and
593 init_registers_powerpc_isa207_htm_vsx64l.
594
232bfb86
EBM
5952018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
596
597 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
598 rs6000/power-linux-pmu.xml to srv_xmlfiles.
599 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
600 (ppc_store_pmuregset): New functions.
601 (ppc_regsets): Add entries for ebb and pmu regsets.
602 (ppc_arch_setup): Set isa207 in features struct if the ebb and
603 pmu regsets are available. Set sizes for these regsets.
604
f2cf6173
EBM
6052018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
606
607 * configure.srv (ipa_ppc_linux_regobj): Add
608 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
609 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
610 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
611 rs6000/powerpc-isa207-vsx32l.xml, and
612 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
613 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
614 <PPC_TDESC_ISA207_VSX>: New enum value.
615 (init_registers_powerpc_isa207_vsx32l): Declare.
616 (init_registers_powerpc_isa207_vsx64l): Declare.
617 * linux-ppc-low.c (ppc_fill_tarregset): New function.
618 (ppc_store_tarregset): New function.
619 (ppc_regsets): Add entry for the TAR regset.
620 (ppc_arch_setup): Set isa207 in features struct when needed. Set
621 size for the TAR regsets.
622 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
623 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
624 and init_registers_powerpc_isa207_vsx64l.
625 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
626 (initialize_low_tracepoint): Call
627 init_registers_powerpc_isa207_vsx32l and
628 init_registers_powerpc_isa207_vsx64l.
629
7ca18ed6
EBM
6302018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
631 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
632
633 * configure.srv (ipa_ppc_linux_regobj): Add
634 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
635 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
636 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
637 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
638 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
639 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
640 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
641 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
642 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
643 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
644 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
645 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
646 (ppc_hwcap): Add comment.
647 (ppc_hwcap2): New global.
648 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
649 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
650 (ppc_regsets): Add entries for the DSCR and PPR regsets.
651 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
652 when needed. Set sizes for the the DSCR and PPR regsets.
653 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
654 (initialize_low_arch): Call
655 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
656 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
657 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
658 PPC_TDESC_ISA205_PPR_DSCR_VSX.
659 (initialize_low_tracepoint): Call
660 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
661 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
662
5c849b22
PFC
6632018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
664
665 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
666
8ecfd7bd
SDJ
6672018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
668 Simon Marchi <simark@simark.ca>
669
670 * acinclude.m4: Include "../selftest.m4".
671 * configure: Regenerate.
672 * configure.ac: Use "GDB_AC_SELFTEST".
673 * configure.srv: Use "$enable_unittests" instead of
674 "$development" when checking whether unit tests have been
675 enabled.
676 * server.c (captured_main): Update message informing that
677 selftests have been disabled.
678
96643e35
TT
6792018-10-04 Tom Tromey <tom@tromey.com>
680
681 * configure: Rebuild.
682
da4ae14a
TT
6832018-10-04 Tom Tromey <tom@tromey.com>
684
685 * server.c (handle_status): Rename inner "thread".
686 (process_serial_event): Declare "res" in 'm' case.
687 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
688 (iterate_over_lwps): Rename inner "thread".
689 (linux_qxfer_libraries_svr4): Rename inner "len".
690 * gdbthread.h (find_thread_in_random): Rename inner "thread".
691
7c619dbd
GB
6922018-10-01 Gary Benson <gbenson@redhat.com>
693
694 * gdb_proc_service.h: Moved common code to
695 common/gdb_proc_service.h.
696
3795e814
GB
6972018-10-01 Gary Benson <gbenson@redhat.com>
698
699 * gdb_proc_service.h: Synchronize comments and whitespace with
700 GDB's version of this file.
701
49b036f1
TT
7022018-09-25 Tom Tromey <tom@tromey.com>
703
704 * configure: Rebuild.
705 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
706
8ff03f0b
SM
7072018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
708
709 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
710 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
711 ($(IPA_LIB)): Sort IPA_OBJS.
712
a1cd91dc
SM
7132018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
714
715 * Makefile.in: Remove references to $(ADD_DEPS).
716
752312ba
TT
7172018-09-16 Tom Tromey <tom@tromey.com>
718
719 * remote-utils.c (remote_open): Use GNU style for metasyntactic
720 variables.
721 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
722 variables.
723
f1628857
TT
7242018-09-05 Tom Tromey <tom@tromey.com>
725
726 * configure: Rebuild.
727
ad202fcc
SM
7282018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
729
730 PR build/23399
731 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
732
d3d8724a
TT
7332018-08-27 Tom Tromey <tom@tromey.com>
734
735 PR build/23087:
736 * configure: Rebuild.
737
b4f183d2
TT
7382018-08-27 Tom Tromey <tom@tromey.com>
739
740 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
741 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
742 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
743 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
744 (s390x_emit_stack_adjust): Add casts to unsigned char.
745
4e2aa472
SM
7462018-08-22 Simon Marchi <simon.marchi@ericsson.com>
747
748 PR gdb/23374
749 PR gdb/23375
750 * server.h (struct client_state) <disable_randomization>:
751 Initialize to 1.
752
cf4088a9
SM
7532018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
754
755 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
756 variable.
757 (mips_supply_ptrace_register): Likewise.
758
a0de763e
TT
7592018-07-22 Tom Tromey <tom@tromey.com>
760
761 * configure: Rebuild.
762
b0a7723d
TT
7632018-07-22 Tom Tromey <tom@tromey.com>
764
765 * win32-low.c (win32_create_inferior): Remove unused variables.
766 * gdbreplay.c (remote_open): Remove unused variable.
767 * remote-utils.c (remote_prepare): Remove unused variable.
768 * x86-tdesc.h (X86_TDESC_H): Define.
769 (amd64_expedite_regs): Define conditionally.
770 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
771 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
772 * remote-utils.c (readchar): Remove unused variable.
773
a780ef4f
PA
7742018-07-13 Pedro Alves <palves@redhat.com>
775
776 * linux-low.c (linux_kill): Change parameter to process_info
777 pointer instead of pid. Adjust.
778 * lynx-low.c (lynx_kill): Likewise.
779 * nto-low.c (nto_kill): Likewise.
780 * spu-low.c (spu_kill): Likewise.
781 * win32-low.c (win32_kill): Likewise.
782 * server.c (handle_v_kill, kill_inferior_callback)
783 (detach_or_kill_for_exit): Adjust.
784 * target.c (kill_inferior): Change parameter to process_info
785 pointer instead of pid. Adjust.
786 * target.h (struct target_ops) <kill>: Change parameter to
787 process_info pointer instead of pid. Adjust all implementations
788 and callers.
789 (kill_inferior): Likewise.
790
ef2ddb33
PA
7912018-07-13 Pedro Alves <palves@redhat.com>
792
793 * linux-low.c (linux_detach, linux_join): Change parameter to
794 process_info pointer instead of pid. Adjust.
795 * lynx-low.c (lynx_detach, lynx_join): Likewise.
796 * nto-low.c (nto_detach): Likewise.
797 * spu-low.c (spu_detach, spu_join): Likewise.
798 * win32-low.c (win32_detach, win32_join): Likewise.
799 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
800 * target.h (struct target_ops) <detach, join>: Change parameter to
801 process_info pointer instead of pid. Adjust all implementations
802 and callers.
803 (detach_inferior, join_inferior): Rename 'pid' parameter to
804 'proc'.
805
c7ab0aef
SDJ
8062018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
807 Jan Kratochvil <jan.kratochvil@redhat.com>
808 Paul Fertser <fercerpav@gmail.com>
809 Tsutomu Seki <sekiriki@gmail.com>
810
811 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
812 (OBS): Add 'common/netstuff.o'.
813 (GDBREPLAY_OBS): Likewise.
814 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
815 (remote_open): Implement support for IPv6
816 connections.
817 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
818 and 'wspiapi.h'.
819 (handle_accept_event): Accept connections from IPv6 sources.
820 (remote_prepare): Handle IPv6-style hostnames; implement
821 support for IPv6 connections.
822 (remote_open): Implement support for printing connections from
823 IPv6 sources.
824
31445d10
PA
8252018-07-11 Pedro Alves <palves@redhat.com>
826
827 PR gdb/23377
828 * mem-break.c (any_persistent_commands): Add process_info
829 parameter and use it instead of relying on the current process.
830 Change return type to bool.
831 * mem-break.h (any_persistent_commands): Add process_info
832 parameter and change return type to bool.
833 * server.c (handle_detach): Remove require_running_or_return call.
834 Look up the process_info for the process we're about to detach.
835 If not found, return back error to GDB. Adjust
836 any_persistent_commands call to pass down a process pointer.
837
cb197132
PA
8382018-07-11 Pedro Alves <palves@redhat.com>
839
840 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
841 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
842 instead of collect_register_by_name.
843 * regcache.c (regcache_raw_get_unsigned_by_name): New.
844 * regcache.h (regcache_raw_get_unsigned_by_name): New.
845
1b919490
VB
8462018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
847 Pedro Alves <palves@redhat.com>
848
849 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
850
d7e15655
TT
8512018-07-03 Tom Tromey <tom@tromey.com>
852
853 * linux-low.c: Update.
854 * lynx-low.c: Update.
855 * mem-break.c: Update.
856 * nto-low.c: Update.
857 * remote-utils.c: Update.
858 * server.c: Update.
859 * spu-low.c: Update.
860 * target.c: Update.
861 * win32-low.c: Update.
862
26a57c92
TT
8632018-07-03 Tom Tromey <tom@tromey.com>
864
865 * server.c: Update.
866
0e998d96
TT
8672018-07-03 Tom Tromey <tom@tromey.com>
868
869 * linux-low.c: Update.
870
cc6bcb54
TT
8712018-07-03 Tom Tromey <tom@tromey.com>
872
873 * target.c: Update.
874
e38504b3
TT
8752018-07-03 Tom Tromey <tom@tromey.com>
876
877 * linux-low.c: Update.
878 * linux-mips-low.c: Update.
879 * lynx-low.c: Update.
880 * nto-low.c: Update.
881 * remote-utils.c: Update.
882 * server.c: Update.
883 * spu-low.c: Update.
884 * target.c: Update.
885 * thread-db.c: Update.
886
e99b03dc
TT
8872018-07-03 Tom Tromey <tom@tromey.com>
888
889 * linux-low.c: Update.
890 * linux-mips-low.c: Update.
891 * lynx-low.c: Update.
892 * mem-break.c: Update.
893 * nto-low.c: Update.
894 * remote-utils.c: Update.
895 * server.c: Update.
896 * spu-low.c: Update.
897 * target.c: Update.
898 * tracepoint.c: Update.
899
f2907e49
TT
9002018-07-03 Tom Tromey <tom@tromey.com>
901
902 * linux-low.c: Update.
903 * linux-ppc-low.c: Update.
904 * linux-x86-low.c: Update.
905 * proc-service.c: Update.
906 * server.c: Update.
907 * spu-low.c: Update.
908 * thread-db.c: Update.
909 * win32-low.c: Update.
910
fd79271b
TT
9112018-07-03 Tom Tromey <tom@tromey.com>
912
913 * linux-low.c: Update.
914 * lynx-low.c: Update.
915 * nto-low.c: Update.
916 * remote-utils.c: Update.
917 * spu-low.c: Update.
918 * thread-db.c: Update.
919 * win32-low.c: Update.
920
c0867626
SDJ
9212018-06-29 Joel Brobecker <brobecker@adacore.com>
922
923 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
924 parameter in call to 'amd64_create_target_description'.
925
2512d7ef
JK
9262018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
927
928 * x86-tdesc.h: Remove executable permission flag.
929
d0ac1c44
SM
9302018-06-19 Simon Marchi <simon.marchi@ericsson.com>
931
932 * configure.ac: Remove AC_PREREQ, add missing quoting.
933 * configure: Re-generate.
934 * config.in: Re-generate.
935 * aclocal.m4: Re-generate.
936
c4eb05ff
SM
9372018-06-18 Simon Marchi <simon.marchi@ericsson.com>
938
939 * tracepoint.h (current_traceframe): Remove declaration.
940
02895270
AH
9412018-06-18 Alan Hayward <alan.hayward@arm.com>
942
943 * linux-aarch64-low.c (is_sve_tdesc): New function.
944 (aarch64_sve_regs_copy_to_regcache): Likewise.
945 (aarch64_sve_regs_copy_from_regcache): Likewise.
946 (aarch64_regs_info): Add SVE checks.
947 (initialize_low_arch): Initialize SVE.
948
e9902bfc
AH
9492018-06-18 Alan Hayward <alan.hayward@arm.com>
950
951 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
952
fefa175e
AH
9532018-06-11 Alan Hayward <alan.hayward@arm.com>
954
955 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
956 (initialize_low_tracepoint): Likewise
957 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
958 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
959 param.
960 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
961 checks.
962 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
963
b91ad3ff
AH
9642018-06-11 Alan Hayward <alan.hayward@arm.com>
965
966 * server.h (PBUFSIZ): Increase size
967
f868386e
AH
9682018-06-11 Alan Hayward <alan.hayward@arm.com>
969
970 * regcache.c (regcache::raw_compare): New function.
971 * regcache.h (regcache::raw_compare): New declaration.
972
9c861883
AH
9732018-06-11 Alan Hayward <alan.hayward@arm.com>
974
975 * regcache.c (new_register_cache): Use new.
976 (free_register_cache): Use delete.
977 (register_data): Use const.
978 (supply_register): Move body inside regcache.
979 (regcache::raw_supply): New override function.
980 (collect_register): Move body inside regcache.
981 (regcache::raw_collect): New override function.
982 (regcache::get_register_status): New override function.
983 * regcache.h (struct regcache): Inherit from reg_buffer_common.
984
40591844
TT
9852018-06-09 Tom Tromey <tom@tromey.com>
986
987 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
988 declare queue.
989 (event_queue): Use std::queue.
990 (gdb_event_xfree): Remove.
991 (initialize_event_loop, process_event, wait_for_event): Update.
992
6341380d
SC
9932018-06-08 Stan Cox <scox@redhat.com>
994
995 * win32-low.c (win32_create_inferior): last_ptid and last_status
996 moved to client_state.
997
03349c93
PA
9982018-06-08 Pedro Alves <palves@redhat.com>
999
1000 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1001 common/common-exceptions.o, common/common-utils.o,
1002 common/errors.o, common/print-utils.o and utils.o.
1003 * gdbreplay.c: Include "common-defs.h" instead of the two
1004 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1005 string.h or alloca.h.
1006 (perror_with_name): Delete.
1007 (remote_open): Use xstrdup instead of strdup.
1008 (main): Rename to ...
1009 (captured_main): ... this.
1010 (main): New.
1011
8dcc53b3
TT
10122018-06-08 Tom Tromey <tom@tromey.com>
1013
1014 * linux-low.c (linux_low_read_btrace): Update.
1015
c12a5089
SC
10162018-06-04 Stan Cox <scox@redhat.com>
1017
1018 * server.h (struct client_state): New.
1019 * server.c (cont_thread, general_thread, multi_process)
1020 (report_fork_events, report_vfork_events, report_exec_events)
1021 (report_thread_events, swbreak_feature, hwbreak_feature)
1022 (vCont_supported, disable_randomization, pass_signals)
1023 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1024 Moved to client_state.
1025 * remote-utils.c (remote_debug, noack_mode)
1026 (transport_is_reliable): Moved to client_state.
1027 * tracepoint.c (current_traceframe): Moved to client_state.
1028
1029 Update all callers.
1030 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1031 linux-low.c, remote-utils.h, target.c: Use client_state.
1032
122394f1
AH
10332018-05-31 Alan Hayward <alan.hayward@arm.com>
1034
1035 * configure.srv: Add new c/h file.
1036
95228a0d
AH
10372018-05-31 Alan Hayward <alan.hayward@arm.com>
1038
1039 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1040 null VQ.
1041
d8dab6c3
MR
10422018-05-25 Maciej W. Rozycki <macro@mips.com>
1043
1044 * gdb.arch/mips-fpregset-core.exp: New test.
1045 * gdb.arch/mips-fpregset-core.c: New test source.
1046
81e25b7c
EK
10472018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1048
1049 PR server/23198
1050 * hostio.c (require_int): Do not report overflow for integers
1051 between 0xfffffff and 0x7fffffff.
1052
7e947ad3
MR
10532018-05-22 Maciej W. Rozycki <macro@mips.com>
1054
1055 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1056 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1057 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1058 functions.
1059 (the_low_target): Wire them.
1060
1d75a658
PFC
10612018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1062
1063 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1064 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1065 mode. Call collect_register_by_name with vscr using
1066 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1067 (ppc_store_vrregset): Add and set vscr_offset variable as in
1068 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1069 vscr_offset.
1070
d078308a
PFC
10712018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1072
1073 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1074 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1075 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1076
7273b5fc
PFC
10772018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1078
1079 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1080 (ppc_store_vsxregset): Likewise.
1081 (ppc_fill_vrregset): Likewise.
1082 (ppc_store_vrregset): Likewise.
1083 (ppc_fill_evrregset): Likewise.
1084 (ppc_store_evrregset): Likewise.
1085 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1086 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1087 needed.
1088
2e077f5e
PFC
10892018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1090
1091 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1092 wordsize of the inferior. Call ppc_linux_target_wordsize.
1093
bd64614e
PFC
10942018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1095
1096 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1097 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1098 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1099 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1100 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1101 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1102 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1103 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1104 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1105 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1106 (tdesc_powerpc_e500l): Remove.
1107 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1108 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1109 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1110 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1111 linux-ppc-tdesc.h.
1112 (ppc_arch_setup): Remove target description matching code. Fill a
1113 ppc_linux_features struct and call ppc_linux_match_description
1114 with it.
1115
75d74cca
MR
11162018-05-22 Maciej W. Rozycki <macro@mips.com>
1117
1118 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1119 width of the requested register exceeds the width of the
1120 `ptrace' data type.
1121 (mips_cannot_store_register): Likewise.
1122
e4439e43
MR
11232018-05-21 Maciej W. Rozycki <macro@mips.com>
1124
1125 * linux-mips-low.c (mips_fetch_register): New function. Update
1126 preceding comment.
1127 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1128 (the_low_target): Wire `mips_fetch_register'.
1129
55271bf9
JB
11302018-05-10 Joel Brobecker <brobecker@adacore.com>
1131
1132 * lynx-i386-low.c (LYNXOS_178): New macro.
1133 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1134 the layout on LynxOS-178.
1135 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1136 handle floating point registers that are not supported by
1137 LynxOS-178.
1138
1a34f210
TT
11392018-05-10 Tom Tromey <tom@tromey.com>
1140
1141 * configure: Rebuild.
1142
190852c8
JB
11432018-05-10 Joel Brobecker <brobecker@adacore.com>
1144
1145 PR server/23158:
1146 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1147 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1148 Use it to set the expedite_regs field in the given tdesc.
1149 * x86-tdesc.h: New file.
1150 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1151 Adjust following the addition of the new expedite_regs parameter
1152 to init_target_desc.
1153 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1154 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1155 (i386_linux_read_description, amd64_linux_read_description):
1156 Adjust following the addition of the new expedite_regs parameter
1157 to init_target_desc.
1158 * lynx-i386-low.c: #include "x86-tdesc.h".
1159 (lynx_i386_arch_setup): Adjust following the addition of the new
1160 expedite_regs parameter to init_target_desc.
1161 * nto-x86-low.c: #include "x86-tdesc.h".
1162 (nto_x86_arch_setup): Adjust following the addition of the new
1163 expedite_regs parameter to init_target_desc.
1164 * win32-i386-low.c: #include "x86-tdesc.h".
1165 (i386_arch_setup): Adjust following the addition of the new
1166 expedite_regs parameter to init_target_desc.
1167
7dbac825
JB
11682018-05-10 Joel Brobecker <brobecker@adacore.com>
1169
1170 PR server/23158:
1171 * win32-low.c (win32_create_inferior): Add call to my_wait
1172 setting last_status global.
1173
906994d9
JB
11742018-05-10 Joel Brobecker <brobecker@adacore.com>
1175
1176 PR server/23158:
1177 * win32-low.c (create_process): Only call gdb_tilde_expand if
1178 inferior_cwd is not NULL.
1179
8ee22052
AB
11802018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1181
1182 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1183 registers to the cache if their values have changed.
1184 (i387_xsave_to_cache): Provide default values for x87 control
1185 registers when these features are available, but disabled.
1186 * regcache.c (supply_register_by_name_zeroed): New function.
1187 * regcache.h (supply_register_by_name_zeroed): Declare new
1188 function.
1189
aff689d3
TT
11902018-05-07 Tom Tromey <tom@tromey.com>
1191
1192 * configure: Rebuild.
1193
85e26832
TT
11942018-05-04 Tom Tromey <tom@tromey.com>
1195
1196 * configure: Rebuild.
1197
a3b60e45
JK
11982018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1199 Pedro Alves <palves@redhat.com>
1200
1201 * linux-aarch64-low.c (aarch64_stopped_data_address):
1202 Likewise.
1203
632e107b
TT
12042018-04-27 Tom Tromey <tom@tromey.com>
1205
1206 * configure: Rebuild.
1207
458412c3
TT
12082018-04-23 Tom Tromey <tom@tromey.com>
1209
1210 * configure: Rebuild.
1211
f31c089e
SM
12122018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1213
1214 * Makefile.in (depcomp): Add "..".
1215 (all_deps_files): New and use it.
1216
b319b098
AH
12172018-04-18 Alan Hayward <alan.hayward@arm.com>
1218
1219 * configure.srv (aarch64*-*-linux*): Don't include xml.
1220 (i[34567]86-*-cygwin*): Likewise.
1221 (i[34567]86-*-linux*): Likewise.
1222 (i[34567]86-*-lynxos*): Likewise.
1223 (i[34567]86-*-mingw32ce*): Likewise.
1224 (i[34567]86-*-mingw*): Likewise.
1225 (i[34567]86-*-nto*): Likewise.
1226 (tic6x-*-uclinux): Likewise.
1227 (x86_64-*-linux*): Likewise.
1228 (x86_64-*-mingw*): Likewise.
1229 (x86_64-*-cygwin*): Likewise.
1230
3b74854b
AH
12312018-04-18 Alan Hayward <alan.hayward@arm.com>
1232
1233 * tdesc.c: Remove xml parameter.
1234
e98577a9
AH
12352018-04-18 Alan Hayward <alan.hayward@arm.com>
1236
1237 * server.c (get_features_xml): Remove cast.
1238 * tdesc.c (void target_desc::accept): Fill in function.
1239 (tdesc_get_features_xml): Remove old xml creation.
1240 (print_xml_feature::visit_pre): Add xml vistor.
1241 * tdesc.h (struct target_desc): Make xmltarget mutable.
1242 (tdesc_get_features_xml): Remove declaration.
1243
d278f585
AH
12442018-04-18 Alan Hayward <alan.hayward@arm.com>
1245
1246 * tdesc.c (tdesc_architecture_name): Add new function.
1247 (tdesc_osabi_name): Likewise.
1248 (tdesc_get_features_xml): Use new functions.
1249
eee8a18d
AH
12502018-04-18 Alan Hayward <alan.hayward@arm.com>
1251
1252 * tdesc.c (tdesc_create_flags): Remove.
1253 (tdesc_add_flag): Likewise.
1254 (tdesc_named_type): Likewise.
1255 (tdesc_create_union): Likewise.
1256 (tdesc_create_struct): Likewise.
1257 (tdesc_create_vector): Likewise.
1258 (tdesc_add_bitfield): Likewise.
1259 (tdesc_add_field): Likewise.
1260 (tdesc_set_struct_size): Likewise.
1261
82ec9bc7
AH
12622018-04-18 Alan Hayward <alan.hayward@arm.com>
1263
1264 * tdesc.c (~target_desc): Remove implictly deleted items.
1265 (init_target_desc): Iterate all features.
1266 (tdesc_get_features_xml): Use vector.
1267 (tdesc_create_feature): Create feature.
1268 * tdesc.h (tdesc_feature) Remove
1269 (target_desc): Add features.
1270
ea3e7d71
AH
12712018-04-18 Alan Hayward <alan.hayward@arm.com>
1272
1273 * Makefile.in: Add common/tdesc.c
1274 * tdesc.c (init_target_desc): init all reg_defs from register
1275 vector.
1276 (tdesc_create_reg): Create tdesc_reg.
1277 * tdesc.h (tdesc_feature): Add register vector.
1278
17d08cd4
SM
12792018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1280
1281 * tdesc.h (struct target_desc) <features>: Change type to
1282 std::vector<std::string>.
1283 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1284 changes.
1285 (tdesc_get_features_xml): Likewise.
1286 (tdesc_create_feature): Likewise.
1287
5cd3e386
AH
12882018-03-26 Alan Hayward <alan.hayward@arm.com>
1289
1290 * regcache.c (find_register_by_number): Return a ref.
1291 (find_regno): Use references.
1292 (register_size): Likewise.
1293 (register_data): Likewise.
1294 * tdesc.c (target_desc::~target_desc): Remove free calls.
1295 (target_desc::operator==): Use std::vector compare.
1296 (init_target_desc): Use reference.
1297 (tdesc_create_reg): Use reg constructors.
1298 * tdesc.h (struct target_desc): Replace pointer with object.
1299
dff7492c
AH
13002018-03-23 Alan Hayward <alan.hayward@arm.com>
1301
1302 * regcache.c (find_register_by_number): Make static.
1303 (find_regno): Use find_register_by_number
1304 * regcache.h (struct reg): Remove declaration.
1305
d80e5242
AH
13062018-03-23 Alan Hayward <alan.hayward@arm.com>
1307
1308 * tdesc.c (target_desc::~target_desc): Move to here.
1309 (target_desc::operator==): Likewise.
1310 * tdesc.h (target_desc::~target_desc): Move from here.
1311 (target_desc::operator==): Likewise.
1312
f69c5afb
AA
13132018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1314
1315 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1316
ce29f843
AA
13172018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1318
1319 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1320 S390_TDESC_GS.
1321 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1322 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1323 and init_registers_s390_gs_linux64.
1324
c49bd90b
AA
13252018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1326
1327 * linux-s390-low.c (s390_fill_gs): Remove function.
1328 (s390_fill_gsbc): Remove function.
1329 (s390_regsets): Set fill functions for the guarded storage regsets
1330 to NULL.
1331
7edb9bd3
AA
13322018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1333
1334 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1335 the word size. Add comment.
1336 (s390_get_wordsize): New function.
1337 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1338 pswm with it. Instead, use s390_get_wordsize to determine the
1339 word size first and derive the correct tdesc from that directly.
1340
39be3c7e
SM
13412018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1342
1343 * Makefile.in: Include silent-rules.mk.
1344 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1345 (COMPILE): Add ECHO_CXX.
1346 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1347 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1348 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1349 (version-generated.c): Add ECHO_GEN.
1350 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1351 (IPAGENT_COMPILE): Add ECHO_CXX.
1352 (%-generated.c): Add ECHO_REGDAT.
1353
3ae9ce5d
TT
13542018-03-14 Tom Tromey <tom@tromey.com>
1355
1356 PR cli/14977:
1357 * ax.c (ax_printf): Special case for NULL.
1358
e6a58aa8
SM
13592018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1360
1361 * linux-low.c (linux_qxfer_libraries_svr4): Use
1362 xml_escape_text_append.
1363
f6e8a41e
SM
13642018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1365
1366 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1367
b9671caf
SM
13682018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1369
1370 * server.c (handle_general_set): Remove unnecessary xstrdup.
1371
e80aaf61
SM
13722018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1373
1374 * server.c (parse_debug_format_options): Adjust to
1375 delim_string_to_char_ptr_vec changes.
1376 * thread-db.c (thread_db_load_search): Adjust to
1377 dirnames_to_char_ptr_vec changes.
1378
b1223e78
MM
13792018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1380
1381 * target.h (target_enable_btrace, target_disable_btrace)
1382 (target_read_btrace, target_read_btrace_conf): Turn macro into
1383 inline function. Throw error if target method is not defined.
1384 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1385 check for btrace target method. Be prepared to handle exceptions
1386 from btrace target methods.
1387
81561546
SDJ
13882018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1389
1390 * server.c (captured_main): Change order of error message printed
1391 when the current working directory cannot be found.
1392
25e3c82c
SDJ
13932018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1394
1395 * server.c: Include "filenames.h" and "pathstuff.h".
1396 (program_name): Delete variable.
1397 (program_path): New anonymous class.
1398 (get_exec_wrapper): Use "program_path" instead of
1399 "program_name".
1400 (handle_v_run): Likewise.
1401 (captured_main): Likewise.
1402 (process_serial_event): Likewise.
1403
b4987c95
SDJ
14042018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1405
1406 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1407 (OBJS): Add "pathstuff.o".
1408 * server.c (current_directory): New global variable.
1409 (captured_main): Initialize "current_directory".
1410
f46cd62a
AH
14112018-02-26 Alan Hayward <alan.hayward@arm.com>
1412
1413 * tdesc.c: Use common/tdesc.h.
1414 * tdesc.h: Likewise.
1415
a543c5ca
AH
14162018-02-20 Alan Hayward <alan.hayward@arm.com>
1417 Simon Marchi <simon.marchi@ericsson.com>
1418
1419 * Makefile.in: Switch order of make rules.
1420
b5884fa7
AH
14212018-02-19 Alan Hayward <alan.hayward@arm.com>
1422
1423 * Makefile.in: Add common directory in build.
1424 * configure.ac: Add common reference.
1425 * configure: Regenerate.
1426
de6242d3
MM
14272018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1428
1429 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1430 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1431 * spu-low.c (spu_target_ops): Likewise.
1432 * win32-low.c (win32_target_ops): Likewise.
1433 * server.c (supported_btrace_packets): Report packets unconditionally.
1434 * target.h (target_ops) <supports_btrace>: Remove.
1435 (target_supports_btrace): Remove.
1436
9ee23a85
MM
14372018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1438
1439 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1440 (handle_btrace_disable): Change return type to void. Use exceptions
1441 to report errors.
1442 (handle_btrace_general_set): Catch exception and copy message to
1443 return message.
1444
8ce47547
TT
14452018-02-08 Tom Tromey <tom@tromey.com>
1446
1447 * linux-low.c (install_software_single_step_breakpoints): Use
1448 make_scoped_restore.
1449 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1450 (do_restore_current_thread_cleanup): Remove.
1451 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1452 declare.
1453
45dd3607
TT
14542018-02-08 Tom Tromey <tom@tromey.com>
1455
1456 * mem-break.c (set_raw_breakpoint_at): Use
1457 gdb::unique_xmalloc_ptr.
1458
e671cd59
PA
14592018-01-30 Pedro Alves <palves@redhat.com>
1460
1461 PR gdb/13211
1462 * target.c (target_terminal::terminal_state): Rename to ...
1463 (target_terminal::m_terminal_state): ... this.
1464
a0aad537
JC
14652018-01-19 James Clarke <jrtc27@jrtc27.com>
1466
1467 * linux-low.c (handle_extended_wait): Surround call to
1468 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1469
4d9b86e1
SM
14702018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1471
1472 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1473 linux_ptrace_attach_fail_reason_string now returning an
1474 std::string.
1475 (linux_attach): Likewise.
1476 * thread-db.c (attach_thread): Likewise.
1477
f517c180
EA
14782018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1479
1480 PR gdb/21559
1481 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1482 checking for fs_base/gs_base fields in struct user_regs_struct.
1483 * configure: Regenerate.
1484
9a70f35c
YQ
14852018-01-16 Yao Qi <yao.qi@linaro.org>
1486
1487 PR gdb/18749
1488 * linux-low.c (fetch_register): Call supply_register instead of
1489 error.
1490
605fd3c6
YQ
14912018-01-08 Yao Qi <yao.qi@linaro.org>
1492 Simon Marchi <simon.marchi@ericsson.com>
1493
1494 * Makefile.in (OBS): Remove selftest.o.
1495 * configure.ac: Set srv_selftest_objs if $development is true.
1496 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1497 * configure: Re-generated.
1498 * server.c (captured_main): Wrap variable selftest_filter with
1499 GDB_SELF_TEST.
1500
2cc05030
SM
15012018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1502
1503 * server.c (parse_debug_format_options): Return std::string.
1504 (handle_monitor_command, captured_main): Adjust.
1505
e379cee6
PA
15062018-01-05 Pedro Alves <palves@redhat.com>
1507
1508 PR gdb/18653
1509 * server.c (captured_main): Pass quiet=false to
1510 save_original_signals_state.
1511
82e1e79a
JB
15122018-01-01 Joel Brobecker <brobecker@adacore.com>
1513
1514 * gdbreplay.c (gdbreplay_version): Update copyright year in
1515 version message.
1516 * server.c (gdbserver_version): Likewise.
1517
8e481c3b
TT
15182017-12-08 Tom Tromey <tom@tromey.com>
1519
1520 * ax.c (ax_printf): Update.
1521
a8806230
YQ
15222017-12-07 Yao Qi <yao.qi@linaro.org>
1523
1524 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1525 aarch64_linux_read_description.
1526 * linux-amd64-ipa.c (idx2mask): New array.
1527 (get_ipa_tdesc): Move idx2mask out.
1528 (initialize_low_tracepoint): Initialize target descriptions.
1529 * linux-i386-ipa.c (idx2mask): New array.
1530 (get_ipa_tdesc): Move idx2mask out.
1531 (initialize_low_tracepoint): Initialize target descriptions.
1532
d4a0e8b5
SM
15332017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1534
1535 * tdesc.c (struct tdesc_type): Change return type.
1536 (tdesc_add_flag): Change parameter type.
1537 (tdesc_add_bitfield): Likewise.
1538 (tdesc_add_field): Likewise.
1539 (tdesc_set_struct_size): Likewise.
1540
798a7429
SM
15412017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1542
1543 * regcache.c (registers_to_string): Remove unused variable.
1544
c0e15c9b
SM
15452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1546
1547 * inferiors.c (for_each_inferior_with_data): Remove.
1548 * inferiors.h (for_each_inferior_with_data): Remove.
1549 * server.c (handle_qxfer_threads_worker): Change parameter type.
1550 (handle_qxfer_threads_proper): Use for_each_thread.
1551
f0045347
SM
15522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1553
1554 * inferiors.c (for_each_inferior): Remove.
1555 (clear_inferiors): Use for_each_thread.
1556 * inferiors.h (for_each_inferior): Remove.
1557 * linux-low.c (linux_wait_for_event_filtered): Use
1558 for_each_thread.
1559 (linux_stabilize_threads): Likewise.
1560 * regcache.c (regcache_release): Likewise.
1561 * server.c (gdb_wants_all_threads_stopped): Likewise.
1562 (clear_pending_status_callback): Remove.
1563 (handle_status): Use for_each_thread.
1564 (captured_main): Likewise.
1565 * win32-low.c (child_init_thread_list): Likewise.
1566 (win32_clear_inferiors): Likewise.
1567 (fake_breakpoint_event): Likewise.
1568
9521758b
SM
15692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1570
1571 * inferiors.h (find_inferior): Remove.
1572 * inferiors.c (find_inferior): Remove.
1573
8f86d7aa
SM
15742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1575
1576 * linux-low.c (resume_status_pending_p): Update comment.
1577 (need_step_over_p): Update comment.
1578
e2b44075
SM
15792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1580
1581 * linux-low.c (proceed_one_lwp): Return void, change parameter
1582 type.
1583 (unsuspend_and_proceed_one_lwp): Likewise.
1584 (proceed_all_lwps): Use for_each_thread.
1585 (unstop_all_lwps): Likewise.
1586
c80825ff
SM
15872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1588
1589 * linux-low.c (linux_resume_one_thread): Return void, take
1590 parameter directly.
1591 (linux_resume): Use for_each_thread.
1592
df3e4dbe
SM
15932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1594
1595 * linux-low.c (send_sigstop_callback): Return void, change
1596 parameter type. Rename to...
1597 (send_sigstop): ... this.
1598 (suspend_and_send_sigstop_callback): Return void, change parameter
1599 type. Rename to...
1600 (suspend_and_send_sigstop): ... this.
1601 (stop_all_lwps): Use for_each_thread.
1602
5a6b0a41
SM
16032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1604
1605 * linux-low.c (lwp_running): Return bool, remove unused
1606 argument.
1607 (linux_stabilize_threads): Use find_thread.
1608
39a64da5
SM
16092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1610
1611 * linux-low.c (select_singlestep_lwp_callback): Remove.
1612 (count_events_callback): Remove.
1613 (select_event_lwp_callback): Remove.
1614 (select_event_lwp): Use find_thread/for_each_thread.
1615
a1385b7b
SM
16162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1617
1618 * linux-low.c (not_stopped_callback): Return bool, take filter
1619 argument directly.
1620 (linux_wait_for_event_filtered): Use find_thread.
1621 (linux_wait_1): Likewise.
1622
454296a2
SM
16232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1624
1625 * linux-low.c (same_lwp): Remove.
1626 (find_lwp_pid): Use find_thread.
1627
6b2a85da
SM
16282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1629
1630 * linux-low.c (delete_lwp_callback): Remove.
1631 (linux_mourn): Use for_each_thread.
1632
798a38e8
SM
16332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1634
1635 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1636 args parameter, don't check for pid.
1637 (linux_detach): Use for_each_thread.
1638
e4eb0dec
SM
16392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1640
1641 * linux-low.c (struct counter): Remove.
1642 (second_thread_of_pid_p): Remove.
1643 (last_thread_of_process_p): Use find_thread.
1644
83e1b6c1
SM
16452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1646
1647 * inferiors.c (find_inferior_in_random): Remove.
1648 * inferiors.h (find_inferior_in_random): Remove.
1649 * linux-low.c (status_pending_p_callback): Return bool, accept
1650 parameter ptid directly.
1651 (linux_wait_for_event_filtered): Use find_thread_in_random.
1652 (linux_wait_1): Likewise.
1653
8dc7b443
SM
16542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1655
1656 * inferiors.c (find_inferior_id): Remove.
1657 (find_thread_ptid): Move implemention from find_inferior_id to
1658 here.
1659 * inferiors.h (find_inferior_id): Remove.
1660 * server.c (handle_status): Use find_thread_ptid.
1661 (process_serial_event): Likewise.
1662 * thread-db.c (find_one_thread): Likewise.
1663 (thread_db_thread_handle): Likewise.
1664 * win32-low.c (thread_rec): Likewise.
1665 (child_delete_thread): Likewise.
1666 (win32_thread_alive): Likewise.
1667 (get_child_debug_event): Likewise.
1668
da25033c
SM
16692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1670
1671 * linux-mips-low.c (update_watch_registers_callback): Return
1672 void, remove pid_p parameter, don't check for pid.
1673 (mips_insert_point, mips_remove_point): Use for_each_thread.
1674
c91bb56b
SM
16752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1676
1677 * lynx.low (lynx_delete_thread_callback): Remove.
1678 (lynx_mourn): Use for_each_thread.
1679
634a3254
SM
16802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1681
1682 * regcache.c (regcache_invalidate_one): Remove.
1683 (regcache_invalidate_pid): use for_each_thread.
1684
41272101
TT
16852017-11-26 Tom Tromey <tom@tromey.com>
1686
1687 * linux-low.c (linux_create_inferior): Update.
1688
f5291a6f
UW
16892017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1690
1691 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1692
6654d750
AH
16932017-11-24 Alan Hayward <alan.hayward@arm.com>
1694
1695 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1696 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1697 * linux-aarch64-tdesc-selftest.c: New file.
1698 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1699
17002017-11-24 Alan Hayward <alan.hayward@arm.com>
1701
1702 * configure.srv: Add new file.
1703 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1704 * linux-aarch64-tdesc-selftest.c: New file.
1705 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1706
49bdb7ee
AH
17072017-11-24 Alan Hayward <alan.hayward@arm.com>
1708
1709 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1710 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1711 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1712
d6d7ce56
AH
17132017-11-24 Alan Hayward <alan.hayward@arm.com>
1714
1715 * configure.srv: Add new files.
1716 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1717 aarch64_linux_read_description.
1718 * linux-aarch64-low.c (aarch64_linux_read_description):
1719 Merge with aarch64_arch_setup.
1720 (aarch64_arch_setup): Call aarch64_linux_read_description.
1721 * linux-aarch64-tdesc.c: New file.
1722 * linux-aarch64-tdesc.h: New file.
1723
506fe5f4
YQ
17242017-11-24 Yao Qi <yao.qi@linaro.org>
1725
1726 * configure.srv: Set $srv_regobj for tic6x-linux.
1727 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1728 (tic6x_read_description): Move some code to tic6x_arch_setup.
1729 (tic6x_tdesc_test): New function.
1730 (initialize_low_arch): Call selftests::register_test.
1731
29f9a567
YQ
17322017-11-22 Yao Qi <yao.qi@linaro.org>
1733
1734 * remote-utils.c (prepare_resume_reply): Use memcpy.
1735
578290ec
SM
17362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1737
1738 * linux-low.c (kill_one_lwp_callback): Return void, take
1739 argument directly, don't filter on pid.
1740 (linux_kill): Use for_each_thread.
1741
eca55aec
SM
17422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1743
1744 * linux-low.c (need_step_over_p): Return bool, remove dummy
1745 argument.
1746 (linux_resume, proceed_all_lwps): Use find_thread.
1747
25c28b4d
SM
17482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1749
1750 * linux-low.c (resume_status_pending_p): Return bool, remove
1751 flag_p argument.
1752 (linux_resume): Use find_thread.
1753
5fdda392
SM
17542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1755
1756 * linux-low.c (struct thread_resume_array): Remove.
1757 (linux_set_resume_request): Return void, take arguments
1758 directly.
1759 (linux_resume): Use for_each_thread.
1760
fcb056a5
SM
17612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1762
1763 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1764 return bool, remove data argument.
1765 (linux_stabilize_threads): Use find_thread.
1766
139720c5
SM
17672017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1768
1769 * linux-low.c (unsuspend_one_lwp): Remove.
1770 (unsuspend_all_lwps): Use for_each_thread, inline code from
1771 unsuspend_one_lwp.
1772
6d1e5673
SM
17732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1774
1775 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1776 * linux-low.c (struct iterate_over_lwps_args): Remove.
1777 (iterate_over_lwps_filter): Remove.
1778 (iterate_over_lwps): Use find_thread.
1779
bbf550d5
SM
17802017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1781
1782 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1783 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1784 code from reset_lwp_ptrace_options_callback.
1785
00192f77
SM
17862017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1787
1788 * linux-arm-low.c (struct update_registers_data): Remove.
1789 (update_registers_callback): Return void, take arguments
1790 directly, don't check thread's pid.
1791 (arm_insert_point, arm_remove_point): Use for_each_thread.
1792
2bee2b6c
SM
17932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1794
1795 * win32-low.c (continue_one_thread): Return void, take argument
1796 directly.
1797 (child_continue): Use for_each_thread.
1798
0b360f19
SM
17992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1800
1801 * win32-i386-low.c (update_debug_registers_callback): Rename
1802 to ...
1803 (update_debug_registers): ... this, return void, remove pid_p arg.
1804 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1805
f27866ba
SM
18062017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1807
1808 * inferiors.h (struct process_info): Add constructor, initialize
1809 fields..
1810 <syscalls_to_catch>: Change type to std::vector<int>.
1811 * inferiors.c (add_process): Allocate process_info with new.
1812 (remove_process): Free process_info with delete.
1813 * linux-low.c (handle_extended_wait): Adjust.
1814 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1815 * server.c (handle_general_set): Adjust.
1816
e849ea89
PA
18172017-11-16 Pedro Alves <palves@redhat.com>
1818
1819 * remote-utils.c (remote_close): Block SIGIO signals instead of
1820 uninstalling the SIGIO handler.
1821
1d0aa65c
AH
18222017-11-16 Alan Hayward <alan.hayward@arm.com>
1823
1824 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1825
3491a34c
YQ
18262017-11-16 Yao Qi <yao.qi@linaro.org>
1827
1828 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1829 (tic6x_store_gregset): Likewise.
1830 (tic6x_usrregs_info): Move it up.
1831
a602f924
AH
18322017-11-15 Alan Hayward <alan.hayward@arm.com>
1833
1834 * Makefile.in: Update arch rules.
1835 * configure.srv: Explicitly mark arch/ files.
1836
5616b6c3
AS
18372017-11-13 Andreas Schwab <schwab@suse.de>
1838
1839 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1840 function.
1841 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1842
d1928160
PA
18432017-11-06 Pedro Alves <palves@redhat.com>
1844
1845 * config.in, configure: Regenerate.
1846
bac608e7
SM
18472017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1848
1849 * target.c (struct thread_search): Remove.
1850 (thread_search_callback): Remove.
1851 (prepare_to_access_memory): Use for_each_thread instead of
1852 find_inferior. Inline code from thread_search_callback.
1853
eaddb425
SM
18542017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1855
1856 * server.c (struct visit_actioned_threads_data): Remove.
1857 (visit_actioned_threads): Change prototype to take arguments
1858 directly.
1859 (resume): Use find_thread instead of find_inferior.
1860
99078d34
SM
18612017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1862
1863 * server.c (queue_stop_reply_callback): Change prototype, return
1864 void.
1865 (find_status_pending_thread_callback): Remove.
1866 (handle_status): Replace find_inferior with find_thread and
1867 for_each_thread.
1868
cc628f3d
AH
18692017-10-25 Alan Hayward <alan.hayward@arm.com>
1870
1871 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1872 with REGNO.
1873 (aarch64_store_gregset): Likewise.
1874 (aarch64_fill_fpregset): Likewise.
1875 (aarch64_store_fpregset): Likewise.
1876
4d3bb80e
SM
18772017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1878
1879 * gdbthread.h (find_thread, for_each_thread): New functions.
1880 * inferiors.c (thread_of_pid): Remove.
1881 (find_any_thread_of_pid): Use find_thread.
1882 * linux-low.c (num_lwps): Use for_each_thread.
1883
7a7cdfa0
YQ
18842017-10-17 Yao Qi <yao.qi@linaro.org>
1885
1886 * Makefile.in: Remove one rule.
1887 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1888
e675d170
YQ
18892017-10-17 Yao Qi <yao.qi@linaro.org>
1890
1891 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1892 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1893
7eb4e0f9
YQ
18942017-10-17 Yao Qi <yao.qi@linaro.org>
1895
1896 * configure.srv: Rename arm.o with arch/arm.o.
1897
60d6cfc9
YQ
18982017-10-17 Yao Qi <yao.qi@linaro.org>
1899
1900 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1901 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1902 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1903 (arch-i386.o, arch-amd64.o): Remove rules.
1904 (arch/%.o): New rule.
1905 Update POSTCOMPILE and COMPILE.pre.
1906 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1907 * configure: Re-generated.
1908 * configure.srv: Replace arch-i386.o with arch/i386.o.
1909 Replace arch-amd64.o with arch/amd64.o.
1910
5bfda255
YQ
19112017-10-16 Yao Qi <yao.qi@linaro.org>
1912
1913 * configure: Regenerated.
1914
9c80ecd6
SM
19152017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1916
1917 * inferiors.h: (struct inferior_list): Remove.
1918 (struct inferior_list_entry); Remove.
1919 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1920 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1921 get_first_inferior): Remove.
1922 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1923 find_inferior_id, find_inferior_in_random): Change signature.
1924 * inferiors.c (all_threads): Change type to
1925 std::list<thread_info *>.
1926 (get_thread): Remove macro.
1927 (find_inferior, find_inferior_id): Change signature, implement
1928 using find_thread.
1929 (find_inferior_in_random): Change signature, implement using
1930 find_thread_in_random.
1931 (for_each_inferior, for_each_inferior_with_data): Change
1932 signature, implement using for_each_thread.
1933 (add_inferior_to_list, remove_inferior): Remove.
1934 (add_thread, get_first_thread, thread_of_pid,
1935 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1936 (get_first_inferior, one_inferior_p, clear_inferior_list):
1937 Remove.
1938 (clear_inferiors, get_thread_process): Update.
1939 * gdbthread.h: Include <list>.
1940 (struct thread_info) <entry>: Remove field.
1941 <id>: New field.
1942 (all_threads): Change type to std::list<thread_info *>.
1943 (get_first_inferior): Add doc.
1944 (find_thread, for_each_thread, find_thread_in_random): New
1945 functions.
1946 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1947 * linux-arm-low.c (update_registers_callback): Update.
1948 * linux-low.c (second_thread_of_pid_p): Update.
1949 (kill_one_lwp_callback, linux_detach_lwp_callback,
1950 delete_lwp_callback, status_pending_p_callback, same_lwp,
1951 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1952 iterate_over_lwps, not_stopped_callback,
1953 resume_stopped_resumed_lwps, count_events_callback,
1954 select_singlestep_lwp_callback, select_event_lwp_callback,
1955 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1956 suspend_and_send_sigstop_callback, wait_for_sigstop,
1957 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1958 lwp_running, linux_set_resume_request, resume_status_pending_p,
1959 need_step_over_p, start_step_over, linux_resume_one_thread,
1960 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1961 reset_lwp_ptrace_options_callback): Update.
1962 * linux-mips-low.c (update_watch_registers_callback): Update.
1963 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1964 Update.
1965 (free_register_cache_thread_one): Remove.
1966 (regcache_release): Update.
1967 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1968 handle_qxfer_threads_worker): Update.
1969 (handle_query): Update, use list iterator.
1970 (visit_actioned_threads, handle_pending_status,
1971 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1972 clear_pending_status_callback, set_pending_status_callback,
1973 find_status_pending_thread_callback, handle_status,
1974 process_serial_event): Update.
1975 * target.c (thread_search_callback): Update.
1976 * thread-db.c (thread_db_get_tls_address): Update.
1977 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1978 Update.
1979 * win32-i386-low.c (update_debug_registers_callback): Update.
1980 * win32-low.c (delete_thread_info, child_delete_thread,
1981 continue_one_thread, suspend_one_thread,
1982 get_child_debug_event): Adjust.
1983
9179355e
SM
19842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1985
1986 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1987 * inferiors.h: Include <list>.
1988 (struct process_info) <entry>: Remove field.
1989 <pid>: New field.
1990 (pid_of): Change macro to function.
1991 (ptid_of, lwpid_of): Remove macro.
1992 (all_processes): Change type to std::list<process_info *>.
1993 (ALL_PROCESSES): Remove macro.
1994 (for_each_process, find_process): New function.
1995 * inferiors.c (all_processes): Change type to
1996 std::list<process_info *>.
1997 (find_thread_process): Adjust.
1998 (add_process): Likewise.
1999 (remove_process): Likewise.
2000 (find_process_pid): Likewise.
2001 (get_first_process): Likewise.
2002 (started_inferior_callback): Remove.
2003 (have_started_inferiors_p): Adjust.
2004 (attached_inferior_callback): Remove.
2005 (have_attached_inferiors_p): Adjust.
2006 * linux-low.c (check_zombie_leaders): Likewise.
2007 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2008 (x86_linux_update_xmltarget): Adjust.
2009 * server.c (handle_query): Likewise.
2010 (gdb_reattached_process): Remove.
2011 (handle_status): Adjust.
2012 (kill_inferior_callback): Likewise.
2013 (detach_or_kill_inferior): Remove.
2014 (print_started_pid): Likewise.
2015 (print_attached_pid): Likewise.
2016 (detach_or_kill_for_exit): Update.
2017 (process_serial_event): Likewise.
2018 * linux-arm-low.c (arm_new_fork): Likewise.
2019
c9cb8905
SM
20202017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2021
2022 * dll.h: Include <list>.
2023 (struct dll_info): Add constructor.
2024 <entry>: Remove field.
2025 (all_dlls): Change type to std::list<dll_info>.
2026 * dll.c: Include <algorithm>.
2027 (get_dll): Remove macro.
2028 (all_dlls): Change type to std::list<dll_info *>.
2029 (free_one_dll): Remove.
2030 (match_dll): Likewise.
2031 (loaded_dll): Adjust.
2032 (unloaded_dll): Adjust to all_dlls type change, use
2033 std::find_if. Inline code from match_dll.
2034 (clear_dlls): Adjust to all_dlls type change.
2035 * server.c (emit_dll_description): Remove.
2036 (handle_qxfer_libraries): Adjust to all_dlls type change,
2037 integrate emit_dll_description's functionality.
2038
04ec7890
SM
20392017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2040
2041 * linux-low.h (struct linux_target_ops) <delete_process>: New
2042 field.
2043 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2044 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2045 (struct linux_target_ops): Add delete_process callback.
2046 * linux-arm-low.c (arm_delete_process): New.
2047 (struct linux_target_ops): Add delete_process callback.
2048 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2049 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2050 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2051 * linux-mips-low.c (mips_linux_delete_process): New.
2052 (struct linux_target_ops): Add delete_process callback.
2053 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2054 * linux-s390-low.c (struct linux_target_ops): Likewise.
2055 * linux-sh-low.c (struct linux_target_ops): Likewise.
2056 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2057 * linux-tile-low.c (struct linux_target_ops): Likewise.
2058 * linux-x86-low.c (x86_linux_delete_process): New.
2059 (struct linux_target_ops): Add delete_process callback.
2060 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2061
466eecee
SM
20622017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2063
2064 * linux-aarch64-low.c (the_low_target): Add thread delete
2065 callback.
2066 * linux-arm-low.c (arm_delete_thread): New function.
2067 (the_low_target): Add thread delete callback.
2068 * linux-bfin-low.c (the_low_target): Likewise.
2069 * linux-crisv32-low.c (the_low_target): Likewise.
2070 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2071 set.
2072 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2073 field.
2074 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2075 * linux-mips-low.c (mips_linux_delete_thread): New function.
2076 (the_low_target): Add thread delete callback.
2077 * linux-ppc-low.c (the_low_target): Likewise.
2078 * linux-s390-low.c (the_low_target): Likewise.
2079 * linux-sh-low.c (the_low_target): Likewise.
2080 * linux-tic6x-low.c (the_low_target): Likewise.
2081 * linux-tile-low.c (the_low_target): Likewise.
2082 * linux-x86-low.c (the_low_target): Likewise.
2083 * linux-xtensa-low.c (the_low_target): Likewise.
2084
b79f7801
YZ
20852017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2086
2087 * win32-low.c: Include "common-inferior.h".
2088
bc3b087d
SDJ
20892017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2090
2091 * inferiors.c (set_inferior_cwd): New function.
2092 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2093 (handle_query): Inform that QSetWorkingDir is supported.
2094 * win32-low.c (create_process): Pass the inferior's cwd to
2095 CreateProcess.
2096
d092c5a2
SDJ
20972017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2098
2099 * inferiors.c (current_inferior_cwd): New global variable.
2100 (get_inferior_cwd): New function.
2101 * inferiors.h (struct process_info) <cwd>: New field.
2102
7da0a886
SDJ
21032017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2104
2105 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2106 (OBS): Add gdb_tilde_expand.o.
2107
289a6840
SM
21082017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2109
2110 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2111 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2112
256642e8
PA
21132017-09-29 Pedro Alves <palves@redhat.com>
2114
2115 * ax.c (gdb_parse_agent_expr): Constify.
2116 * ax.h (gdb_parse_agent_expr): Constify.
2117 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2118 Constify.
2119 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2120 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2121 * remote-utils.h (read_ptid): Constify.
2122 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2123 (process_point_options, process_serial_event): Constify.
2124 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2125 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2126 (cmd_qtbuffer): Constify.
2127
5b9ca4d4
PA
21282017-09-29 Pedro Alves <palves@redhat.com>
2129
2130 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2131 fails.
2132
94c207e0
PA
21332017-09-29 Pedro Alves <palves@redhat.com>
2134
2135 * linux-low.c (handle_extended_wait): Pass parent thread instead
2136 of process to thread_db_notice_clone.
2137 * linux-low.h (thread_db_notice_clone): Replace parent process
2138 parameter with parent thread parameter.
2139 * thread-db.c (find_one_thread): Add comment.
2140 (thread_db_notice_clone): Replace parent process parameter with
2141 parent thread parameter. Temporarily switch to the parent thread.
2142
75352e28
SDJ
21432017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2144
2145 * gdbthread.h: Include "common-gdbthread.h".
2146 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2147 "if" when validating the ptid.
2148 * remote-utils.c: Include "gdbthread.h".
2149 (prepare_resume_reply): Use "switch_to_thread".
2150 * target.c (done_accessing_memory): Likewise.
2151
ad339634
AA
21522017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2153
2154 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2155 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2156 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2157 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2158 s390x-gs-linux64-ipa.o to ipa_obj.
2159 * linux-s390-low.c (HWCAP_S390_GS): New define.
2160 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2161 New functions.
2162 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2163 (s390_arch_setup): Check for guarded-storage support and choose
2164 appropriate tdesc.
2165 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2166 init_registers_s390x_gs_linux64.
2167 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2168 enum value.
2169 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2170 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2171
cc4d742f
SM
21722017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2173
2174 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2175
f6327dcb
KB
21762017-09-21 Kevin Buettner <kevinb@redhat.com>
2177
2178 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2179 (thread_db_thread_handle): Declare.
2180 * linux-low.c (linux_target_ops): Initialize thread_handle.
2181 * server.c (handle_qxfer_threads_worker): Add support for
2182 "handle" attribute.
2183 * target.h (struct target_ops): Add new function pointer,
2184 thread_handle.
2185 (target_thread_handle): Define.
2186 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2187 field in lwp.
2188 (thread_db_thread_handle): New function.
2189
86299109
KB
21902017-09-21 Kevin Buettner <kevinb@redhat.com>
2191
2192 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2193 * linux-low.h (thread_db_notice_clone): Declare.
2194 * thread-db.c (thread_db_notice_clone): New function.
2195
f557a88a
PA
21962017-09-21 Pedro Alves <palves@redhat.com>
2197
2198 * server.c (gdb_read_memory, handle_status, process_serial_event)
2199 (handle_serial_event, handle_target_event): Adjust to
2200 set_desired_thread prototype change.
2201 * target.c (set_desired_thread): Remove 'use_general' parameter
2202 and adjust.
2203 * target.h (set_desired_thread): Remove 'use_general' parameter.
2204
223ffa71
TT
22052017-09-20 Tom Tromey <tom@tromey.com>
2206
2207 * target.c (target_terminal::terminal_state): Define.
2208 (target_terminal::init): Rename from target_terminal_init.
2209 (target_terminal::inferior): Rename from
2210 target_terminal_inferior.
2211 (target_terminal::ours): Rename from target_terminal_ours.
2212 (target_terminal::ours_for_output, target_terminal::info): New.
2213
04fd3ba9
SM
22142017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2215
2216 * server.c (accumulate_file_name_length): Remove.
2217 (emit_dll_description): Adjust to std::string change.
2218 (handle_qxfer_libraries): Use std::string to hold document.
2219
5e187554
SM
22202017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2221
2222 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2223 return type of xml_escape_text.
2224 * server.c (emit_dll_description): Likewise.
2225
1526853e
SM
22262017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2227
2228 * server.c (captured_main): Accept argument for --selftest.
2229 Update run_tests call.
2230 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2231 when registering selftests.
2232
c4dfafab
SDJ
22332017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2234
2235 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2236 instead of "VEC" for "target_desc.reg_defs".
2237 (regcache_cpy): Likewise.
2238 (registers_to_string): Likewise.
2239 (registers_from_string): Likewise.
2240 (find_regno): Likewise.
2241 (supply_regblock): Likewise.
2242 (regcache_raw_read_unsigned): Likewise.
2243 * tdesc.c (init_target_desc): Likewise.
2244 (tdesc_create_reg): Likewise.
2245 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2246 (struct target_desc) <reg_defs>: Convert to "std::vector".
2247 (target_desc): Do not initialize "reg_defs".
2248 (~target_desc): Update code to use "std::vector" instead of "VEC"
2249 for "target_desc.reg_defs".
2250 (operator==): Likewise.
2251
124aceb4
SM
22522017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2253
2254 * inferiors.h (thread_to_gdb_id): Remove.
2255 * inferiors.c (thread_to_gdb_id): Remove.
2256 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2257 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2258 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2259 Likewise.
2260 * nto-low.c (nto_fetch_registers, nto_store_registers,
2261 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2262
96cde54f
SM
22632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2264
2265 * inferiors.h (gdb_id_to_thread_id): Remove.
2266 * inferiors.c (gdb_id_to_thread_id): Remove.
2267 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2268 removal. Move pid declaration closer to where it's used.
2269
e8ca139e
SM
22702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2271
2272 * server.c (handle_detach): New function.
2273 (process_serial_event): Move code out, call handle_detach.
2274
f8a4e119
SM
22752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2276
2277 * server.c (require_running): Rename to ...
2278 (require_running_or_return): ... this ...
2279 (require_running_or_break): ... and this.
2280 (handle_query, process_serial_event): Adjust.
2281
0eb0a407
SM
22822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2283
2284 * linux-low.c (linux_set_resume_request): Remove unused
2285 variables.
2286
785922a5
SM
22872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2288
2289 * server.c (first_thread_of): Remove.
2290 (process_serial_event): Replace usage of first_thread_of with
2291 find_any_thread_of_pid.
2292 * tracepoint.c (same_process_p): Remove.
2293 (gdb_agent_about_to_close): Replace usage of same_process_p with
2294 find_any_thread_of_pid.
2295 * linux-x86-low.c (same_process_callback): Remove.
2296 (x86_arch_setup_process_callback): Replace usage of
2297 same_process_callback with find_any_thread_of_pid.
2298 * thread-db.c (any_thread_of): Remove.
2299 (switch_to_process): Replace usage of any_thread_of with
2300 find_any_thread_of_pid.
2301 * inferiors.c (thread_pid_matches_callback): Remove.
2302 (find_thread_process): Adjust to use find_any_thread_of_pid.
2303
a059f00c
SDJ
23042017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2305
2306 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2307 with "!VEC_empty".
a059f00c 2308
cc397f3a
SDJ
23092017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2310
2311 * linux-low.c (handle_extended_wait): Use
2312 "allocate_target_description" instead of "XNEW".
2313 * linux-x86-low.c (initialize_low_arch): Likewise.
2314
22916b07
YQ
23152017-09-05 Yao Qi <yao.qi@linaro.org>
2316
2317 * configure.srv (srv_i386_regobj): Remove.
2318 (srv_amd64_regobj): Remove.
2319 (srv_regobj): Set it to "" for x86 non-linux targets.
2320 * linux-x86-tdesc.c (i386_linux_read_description):
2321 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2322 (init_registers_i386): Remove the declaration.
2323 (tdesc_i386): Remove the declaration.
2324 (lynx_i386_arch_setup): Call i386_create_target_description.
2325 * nto-x86-low.c: Likewise.
2326 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2327 [!__x86_64__]: include arch/i386.h.
2328 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2329
38602d55
YQ
23302017-09-05 Yao Qi <yao.qi@linaro.org>
2331
2332 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2333 i386/amd64-XXX-linux from it.
2334
44b886ff
YQ
23352017-09-05 Yao Qi <yao.qi@linaro.org>
2336
2337 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2338 false.
2339 (ipa_amd64_linux_regobj): Remove.
2340 (ipa_x32_linux_regobj): Remove.
2341
b4570e4b
YQ
23422017-09-05 Yao Qi <yao.qi@linaro.org>
2343
2344 * Makefile.in (arch-amd64.o): New rule.
2345 * configure.srv: Append arch-amd64.o.
2346 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2347 (get_ipa_tdesc): Call amd64_linux_read_description.
2348 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2349 and init_registers_amd64_XXX.
2350 * linux-x86-low.c (x86_linux_read_description): Call
2351 amd64_linux_read_description.
2352 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2353 (initialize_low_arch): Don't call init_registers_x32_XXX and
2354 init_registers_amd64_XXX.
2355 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2356 and tdesc_amd64_XXX.
2357 [__x86_64__] (amd64_tdesc_test): New function.
2358 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2359 and init_registers_amd64_XXX.
2360 * linux-x86-tdesc.c: Include arch/amd64.h.
2361 (xcr0_to_tdesc_idx): New function.
2362 (i386_linux_read_description): New function.
2363 (amd64_get_ipa_tdesc_idx): New function.
2364 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2365 (amd64_get_ipa_tdesc): Declare.
2366
d1f28ea2
YQ
23672017-09-05 Yao Qi <yao.qi@linaro.org>
2368
2369 * configure.srv (srv_i386_linux_xmlfiles): Remove
2370 i386/i386-XXX-linux.xml from it.
2371
25a93583
YQ
23722017-09-05 Yao Qi <yao.qi@linaro.org>
2373
2374 * configure.srv: Set srv_i386_linux_regobj empty if $development
2375 is false.
2376 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2377 initialize_low_tdesc.
2378 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2379 with #if initialize_low_tdesc.
2380 * linux-x86-tdesc-selftest.c: New file.
2381 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2382
5f035c07
YQ
23832017-09-05 Yao Qi <yao.qi@linaro.org>
2384
2385 * Makefile.in (arch-i386.o): New rule.
2386 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2387 (x86_64-*-linux*): Likewise.
2388 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2389 include arch/i386.h.
2390 (i386_linux_read_description): Remove code and call
2391 i386_create_target_description.
2392 * tdesc.c (allocate_target_description): New function.
2393 * tdesc.h (set_tdesc_architecture): Remove declaration.
2394 (set_tdesc_osabi): Likewise.
2395
0abe8a89
YQ
23962017-09-05 Yao Qi <yao.qi@linaro.org>
2397
2398 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2399 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2400 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2401 .xmltarget.
2402 * server.c (get_features_xml): Call tdesc_get_features_xml.
2403 * tdesc.c (set_tdesc_architecture): New function.
2404 (set_tdesc_osabi): New function.
2405 (tdesc_get_features_xml): New function.
2406 (tdesc_create_feature): Add an argument.
2407 * tdesc.h (struct target_desc) <features>: New field.
2408 <arch, osabi>: New field.
2409 (~target_desc): xfree features, arch, and osabi.
2410 (target_desc::oerator==): Don't compare .xmltarget.
2411 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2412 (set_tdesc_osabi): Likewise.
2413 (tdesc_get_features_xml): Likewise.
2414
0a188386
YQ
24152017-09-05 Yao Qi <yao.qi@linaro.org>
2416
2417 * linux-x86-tdesc.c: Include selftest.h.
2418 (i386_tdesc_test): New function.
2419 (initialize_low_tdesc): Call selftests::register_test.
2420 * tdesc.h: Include regdef.h.
2421 (target_desc): Override operator == and !=.
2422
f49ff000
YQ
24232017-09-05 Yao Qi <yao.qi@linaro.org>
2424
2425 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2426 (ipa_obj): Likewise.
2427 * linux-i386-ipa.c: Include common/x86-xstate.h
2428 (get_ipa_tdesc): Call i386_linux_read_description.
2429 (initialize_low_tracepoint): Don't call init_registers_XXX
2430 functions, call initialize_low_tdesc instead.
2431 * linux-x86-low.c (x86_linux_read_description): Call
2432 i386_linux_read_description.
2433 (initialize_low_arch): Don't call init_registers_i386_XXX
2434 functions, call initialize_low_tdesc.
2435 * linux-x86-tdesc.c: New file.
2436 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2437 (i386_get_ipa_tdesc_idx): Declare.
2438 (i386_get_ipa_tdesc): Declare.
2439 (initialize_low_tdesc): Declare.
2440
2b68ef2f
YQ
24412017-09-05 Yao Qi <yao.qi@linaro.org>
2442
2443 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2444 instead of 0.
2445
f7000548
YQ
24462017-09-05 Yao Qi <yao.qi@linaro.org>
2447
2448 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2449 * regcache.c (get_thread_regcache): Use VEC_length.
2450 (init_register_cache): Likewise.
2451 (regcache_cpy): Likewise.
2452 (registers_to_string): Iterate reg_defs via VEC_iterate.
2453 (find_regno): Likewise.
2454 (find_register_by_number): Use VEC_index.
2455 (register_size): Call find_register_by_number.
2456 (register_data): Call find_register_by_number.
2457 (supply_regblock): Use VEC_length.
2458 (regcache_raw_read_unsigned): Likewise.
2459 * tdesc.c (init_target_desc): Iterate reg_defs via
2460 VEC_iterate.
2461 (default_description): Update initializer.
2462 (copy_target_description): Don't update field num_registers.
2463 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2464 <num_registers>: Remove.
2465
50a421ac
SM
24662017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2467
2468 * Makefile.in (.SECONDARY): Define target.
2469
23fdd69e
SM
24702017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2471
2472 * linux-low.c (linux_wait_1): Adjust.
2473 * server.c (queue_stop_reply_callback): Adjust.
2474
0a2dde4a
SDJ
24752017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2476
2477 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2478 QEnvironmentUnset and QEnvironmentReset packets.
2479 (handle_query): Inform remote that QEnvironmentHexEncoded,
2480 QEnvironmentUnset and QEnvironmentReset are supported.
2481
6afd337d
SM
24822017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2483
2484 * inferiors.h (inferior_target_data): Rename to ...
2485 (thread_target_data): ... this.
2486 (inferior_regcache_data): Rename to ...
2487 (thread_regcache_data): ... this.
2488 (set_inferior_regcache_data): Rename to ...
2489 (set_thread_regcache_data): ... this.
2490 * inferiors.c (inferior_target_data): Rename to ...
2491 (thread_target_data): ... this.
2492 (inferior_regcache_data): Rename to ...
2493 (thread_regcache_data): ... this.
2494 (set_inferior_regcache_data): Rename to ...
2495 (set_thread_regcache_data): ... this.
2496 (free_one_thread): Update.
2497 * linux-low.h (get_thread_lwp): Update.
2498 * regcache.c (get_thread_regcache): Update.
2499 (regcache_invalidate_thread): Update.
2500 (free_register_cache_thread): Update.
2501 * win32-i386-low.c (update_debug_registers_callback): Update.
2502 (win32_get_current_dr): Update.
2503 * win32-low.c (thread_rec): Update.
2504 (delete_thread_info): Update.
2505 (continue_one_thread): Update.
2506 (suspend_one_thread): Update.
2507
a160cc46
SM
25082017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2509
2510 * inferiors.c (set_inferior_target_data): Remove.
2511 * inferiors.h (set_inferior_target_data): Remove.
2512
6d580b63
YQ
25132017-08-18 Yao Qi <yao.qi@linaro.org>
2514
2515 * Makefile.in (OBS): Add selftest.o.
2516 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2517 * configure, config.in: Re-generated.
2518 * server.c: Include common/sefltest.h.
2519 (captured_main): Handle option --selftest.
2520
f5a29eb0
YQ
25212017-08-09 Yao Qi <yao.qi@linaro.org>
2522
2523 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2524 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2525 i386-avx-mpx.o and i386-mmx.o.
2526 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2527 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2528 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2529 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2530 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2531 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2532 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2533 i386/amd64-avx-mpx.xml.
2534
57757c2f
YQ
25352017-08-09 Yao Qi <yao.qi@linaro.org>
2536
2537 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2538 and x32-avx-avx512.o.
2539 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2540 i386/x32-avx-avx512.xml.
2541
229d26fc
SM
25422017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2543
2544 * tracepoint.h (enum class fast_tpoint_collect_result): New
2545 enumeration.
2546 (fast_tracepoint_collecting): Change return type to
2547 fast_tpoint_collect_result.
2548 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2549 * linux-low.h: Include tracepoint.h.
2550 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2551 fast_tpoint_collect_result.
2552 * linux-low.c (handle_tracepoints): Adjust.
2553 (linux_fast_tracepoint_collecting): Change return type to
2554 fast_tpoint_collect_result.
2555 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2556 linux_wait_1, stuck_in_jump_pad_callback,
2557 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2558 proceed_one_lwp): Adjust to type change.
2559
2e1e43e1
YQ
25602017-07-10 Yao Qi <yao.qi@linaro.org>
2561
2562 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2563
adc764e7
YQ
25642017-06-29 Yao Qi <yao.qi@linaro.org>
2565
2566 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2567 Remove.
2568 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2569
a206891a
SM
25702017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2571
2572 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2573
9a6c7d9c
SDJ
25742017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2575
2576 * linux-low.c (linux_create_inferior): Adjust code to access the
2577 environment information via 'gdb_environ' class.
2578 * lynx-low.c (lynx_create_inferior): Likewise.
2579 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2580 (get_environ): Return a pointer to 'our_environ'.
2581 (captured_main): Initialize 'our_environ'.
2582 * server.h (get_environ): Adjust prototype.
2583 * spu-low.c (spu_create_inferior): Adjust code to access the
2584 environment information via 'gdb_environ' class.
2585
ae3e2ccf
SM
25862017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2587
2588 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2589 usage of "register" keyword.
2590
3e019bdc
SM
25912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2592
2593 * configure: Re-generate.
2594
8465943a
SM
25952017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2596
2597 * configure: Re-generate.
2598
cf0dd6f0
SM
25992017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2600
2601 * Makefile.in (COMPILE.pre): Add "-x c++".
2602
9845682b
SDJ
26032017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2604
2605 * fork-child.c: Conditionally include <signal.h>.
2606
aefd8b33
SDJ
26072017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2608
2609 * server.c (handle_general_set): Handle new packet
2610 "QStartupWithShell".
2611 (handle_query): Add "QStartupWithShell" to the list of supported
2612 packets.
2613 (gdbserver_usage): Add help text explaining the
2614 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2615 options.
2616 (captured_main): Recognize and act upon the presence of the new
2617 CLI options.
2618
2090129c
SDJ
26192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2620 Pedro Alves <palves@redhat.com>
2621
2622 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2623 * configure: Regenerate.
2624 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2625 "fork-inferior.o".
2626 (i[34567]86-*-lynxos*): Likewise.
2627 (spu*-*-*): Likewise.
2628 * fork-child.c: New file.
2629 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2630 and "environ.h".
2631 (linux_ptrace_fun): New function.
2632 (linux_create_inferior): Adjust function prototype to reflect
2633 change on "target.h". Adjust function code to use
2634 "fork_inferior".
2635 (linux_request_interrupt): Delete "signal_pid".
2636 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2637 (lynx_ptrace_fun): New function.
2638 (lynx_create_inferior): Adjust function prototype to reflect
2639 change on "target.h". Adjust function code to use
2640 "fork_inferior".
2641 * nto-low.c (nto_create_inferior): Adjust function prototype and
2642 code to reflect change on "target.h". Update comments.
2643 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2644 "common-terminal.h" and "environ.h".
2645 (terminal_fd): Moved to fork-child.c.
2646 (old_foreground_pgrp): Likewise.
2647 (restore_old_foreground_pgrp): Likewise.
2648 (last_status): Make it global.
2649 (last_ptid): Likewise.
2650 (our_environ): New variable.
2651 (startup_with_shell): Likewise.
2652 (program_name): Likewise.
2653 (program_argv): Rename to...
2654 (program_args): ...this.
2655 (wrapper_argv): New variable.
2656 (start_inferior): Delete function.
2657 (get_exec_wrapper): New function.
2658 (get_exec_file): Likewise.
2659 (get_environ): Likewise.
2660 (prefork_hook): Likewise.
2661 (post_fork_inferior): Likewise.
2662 (postfork_hook): Likewise.
2663 (postfork_child_hook): Likewise.
2664 (handle_v_run): Update code to deal with arguments coming from the
2665 remote host. Update calls from "start_inferior" to
2666 "create_inferior".
2667 (captured_main): Likewise. Initialize environment variable. Call
2668 "have_job_control".
2669 * server.h (post_fork_inferior): New prototype.
2670 (get_environ): Likewise.
2671 (last_status): Declare.
2672 (last_ptid): Likewise.
2673 (signal_pid): Likewise.
2674 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2675 (spu_ptrace_fun): New function.
2676 (spu_create_inferior): Adjust function prototype to reflect change
2677 on "target.h". Adjust function code to use "fork_inferior".
2678 * target.c (target_terminal_init): New function.
2679 (target_terminal_inferior): Likewise.
2680 (target_terminal_ours): Likewise.
2681 * target.h: Include <vector>.
2682 (struct target_ops) <create_inferior>: Update prototype.
2683 (create_inferior): Update macro.
2684 * utils.c (gdb_flush_out_err): New function.
2685 * win32-low.c (win32_create_inferior): Adjust function prototype
2686 and code to reflect change on "target.h".
2687
043a4934
SDJ
26882017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2689
2690 * inferiors.c (switch_to_thread): New function.
2691
15652511
SDJ
26922017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2693
2694 * Makefile.in (SFILE): Add "common/job-control.c".
2695 (OBS): Add "job-control.o".
2696
21ea5acd
SDJ
26972017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2698
2699 * Makefile: Remove "@host_makefile_frag@".
2700
e13cb306
PA
27012017-05-05 Pedro Alves <palves@redhat.com>
2702
2703 * configure: Regenerate.
2704
c94fee56
SDJ
27052017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2706
2707 * configure: Regenerate.
2708
a0ff9e1a
SM
27092017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2710
2711 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2712 software_single_step change of return type to
2713 std::vector<CORE_ADDR>.
2714 * linux-low.c (install_software_single_step_breakpoints):
2715 Likewise.
2716 * linux-low.h (install_software_single_step_breakpoints):
2717 Likewise.
2718
be628ab8
SDJ
27192017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2720
2721 * remote-utils.c: Include "gdb_termios.h" instead of
2722 "terminal.h".
2723 * terminal.h: Delete file.
2724
7c5ded6a
SDJ
27252017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2726
2727 * server.c: Include <vector>.
2728 <program_argv, wrapper_argv>: Convert to std::vector.
2729 (start_inferior): Rewrite function to use C++.
2730 (handle_v_run): Likewise. Update code that calculates the argv
2731 based on the vRun packet; use C++.
2732 (captured_main): Likewise.
2733
436252de
SM
27342017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2735
2736 * server.c (handle_v_cont): Initialize thread_resume::thread
2737 with null_ptid.
2738
9bf2a700
PA
27392017-04-05 Pedro Alves <palves@redhat.com>
2740
2741 * configure: Regenerate.
2742
a121b7c1
PA
27432017-04-05 Pedro Alves <palves@redhat.com>
2744
2745 * gdbreplay.c (sync_error): Constify.
2746 * linux-x86-low.c (push_opcode): Constify.
2747
21c8a587
PA
27482017-04-05 Pedro Alves <palves@redhat.com>
2749
2750 * win32-low.c (get_child_debug_event)
2751 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2752 Report TARGET_WAITKIND_SPURIOUS instead.
2753
fb32b4f7
PA
27542017-04-05 Pedro Alves <palves@redhat.com>
2755
e79be6e5
SM
2756 * remote-utils.c (remote_prepare, remote_open): Constify.
2757 * remote-utils.h (remote_prepare, remote_open): Constify.
2758 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2759
65dd1e59
SM
27602017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2761
2762 * Makefile.in (clean): Clear .deps.
2763
8fa5b777
SM
27642017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2765
2766 * .gitignore: Remove generated files, replace with wildcard.
2767 * (clean): Replace removal of generated files with wildcard.
2768 (version.c): Replace with...
2769 (version-generated.c): ...this.
2770 (xml-builtin.c): Replace with...
2771 (xml-builtin-generated.c): ...this.
2772 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2773 (%.c: *regformats*): Replace with...
2774 (%-generated.c: *regformats*): ...this.
2775
a12e714b
MF
27762017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2777
2778 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2779 (xtensa_fill_gregset): Call collect_register_by_name for
2780 threadptr register.
2781 (xtensa_store_gregset): Call supply_register_by_name for
2782 threadptr register.
2783
1a09b50a
MF
27842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2785
2786 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2787 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2788 (xtensa_store_gregset): Call supply_register for all registers in
2789 a0_regnum..a0_regnum + C0_NREGS range.
2790
1a01e7c6
SM
27912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2792
2793 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2794 (ax-ipa.o: ax.c): Remove.
2795 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2796 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2797 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2798 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2799 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2800
36bc18a8
SM
28012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2802
2803 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2804 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2805 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2806 (errors-ipa.o: ../common/errors.c): Remove.
2807 (format-ipa.o: ../common/format.c): Remove.
2808 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2809
a8ebe3d5
SM
28102017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2811
2812 * Makefile.in (%-ipa.o: %.c): New rule.
2813 (tracepoint-ipa.o: tracepoint.c): Remove.
2814 (utils-ipa.o: utils.c): Remove.
2815 (remote-utils-ipa.o: remote-utils.c): Remove.
2816 (regcache-ipa.o: regcache.c): Remove.
2817 (i386-linux-ipa.o: i386-linux.c): Remove.
2818 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2819 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2820 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2821 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2822 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2823 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2824 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2825 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2826 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2827 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2828 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2829 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2830 (aarch64-ipa.o: aarch64.c): Remove.
2831 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2832 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2833 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2834 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2835 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2836 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2837 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2838 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2839 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2840 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2841 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2842 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2843 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2844 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2845 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2846 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2847 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2848 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2849 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2850 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2851 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2852 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2853 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2854 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2855 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2856 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2857 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2858 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2859 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2860 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2861 (tdesc-ipa.o: tdesc.c): Remove.
2862 (x32-linux-ipa.o: x32-linux.c): Remove.
2863 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2864 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2865
50cfacb7
SM
28662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2867
2868 * Makefile.in (%.o: ../arch/%.c): New rule.
2869 (arm.o: ../arch/arm.c): Remove.
2870 (arm-linux.o: ../arch/arm-linux.c): Remove.
2871 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2872 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2873
c5a22423
SM
28742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2875
2876 * Makefile.in (%.o: ../nat/%.c): New rule.
2877 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2878 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2879 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2880 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2881 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2882 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2883 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2884 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2885 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2886 (linux-personality.o: ../nat/linux-personality.c): Remove.
2887 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2888 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2889 (x86-linux.o: ../nat/x86-linux.c): Remove.
2890 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2891 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2892
6bda016b
SM
28932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2894
2895 * Makefile.in (%.o: ../common/%.c): New rule.
2896 (signals.o: ../common/signals.c): Remove.
2897 (print-utils.o: ../common/print-utils.c): Remove.
2898 (rsp-low.o: ../common/rsp-low.c): Remove.
2899 (common-utils.o: ../common/common-utils.c): Remove.
2900 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2901 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2902 (vec.o: ../common/vec.c): Remove.
2903 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2904 (xml-utils.o: ../common/xml-utils.c): Remove.
2905 (ptid.o: ../common/ptid.c): Remove.
2906 (buffer.o: ../common/buffer.c): Remove.
2907 (format.o: ../common/format.c): Remove.
2908 (filestuff.o: ../common/filestuff.c): Remove.
2909 (agent.o: ../common/agent.c): Remove.
2910 (errors.o: ../common/errors.c): Remove.
2911 (environ.o: ../common/environ.c): Remove.
2912 (common-debug.o: ../common/common-debug.c): Remove.
2913 (cleanups.o: ../common/cleanups.c): Remove.
2914 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2915 (fileio.o: ../common/fileio.c): Remove.
2916 (common-regcache.o: ../common/common-regcache.c): Remove.
2917 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2918 (new-op.o: ../common/new-op.c): Remove.
2919 (btrace-common.o: ../common/btrace-common.c): Remove.
2920
21122961
SM
29212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2922
2923 * Makefile.in (%.o: ../target/%.c): New rule.
2924 (waitstatus.o: ../target/waitstatus.c): Remove.
2925
c362e621
SM
29262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2927
2928 * Makefile.in
2929 (%.c: ../regformats/%.dat,
2930 (%.c: ../regformats/arm/%.dat,
2931 (%.c: ../regformats/i386/%.dat,
2932 (%.c: ../regformats/rs6000/%.dat): New rules.
2933 (aarch64.c): Remove.
2934 (reg-arm.c): Remove.
2935 (arm-with-iwmmxt.c): Remove.
2936 (arm-with-vfpv2.c): Remove.
2937 (arm-with-vfpv3.c): Remove.
2938 (arm-with-neon.c): Remove.
2939 (reg-bfin.c): Remove.
2940 (reg-cris.c): Remove.
2941 (reg-crisv32.c): Remove.
2942 (i386.c): Remove.
2943 (i386-linux.c): Remove.
2944 (i386-avx.c): Remove.
2945 (i386-avx-linux.c): Remove.
2946 (i386-avx-avx512.c): Remove.
2947 (i386-avx-avx512-linux.c): Remove.
2948 (i386-mpx.c): Remove.
2949 (i386-mpx-linux.c): Remove.
2950 (i386-avx-mpx-avx512-pku.c): Remove.
2951 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2952 (i386-avx-mpx.c): Remove.
2953 (i386-avx-mpx-linux.c): Remove.
2954 (i386-mmx.c): Remove.
2955 (i386-mmx-linux.c): Remove.
2956 (reg-ia64.c): Remove.
2957 (reg-m32r.c): Remove.
2958 (reg-m68k.c): Remove.
2959 (reg-cf.c): Remove.
2960 (mips-linux.c): Remove.
2961 (mips-dsp-linux.c): Remove.
2962 (mips64-linux.c): Remove.
2963 (mips64-dsp-linux.c): Remove.
2964 (nios2-linux.c): Remove.
2965 (powerpc-32.c): Remove.
2966 (powerpc-32l.c): Remove.
2967 (powerpc-altivec32l.c): Remove.
2968 (powerpc-cell32l.c): Remove.
2969 (powerpc-vsx32l.c): Remove.
2970 (powerpc-isa205-32l.c): Remove.
2971 (powerpc-isa205-altivec32l.c): Remove.
2972 (powerpc-isa205-vsx32l.c): Remove.
2973 (powerpc-e500l.c): Remove.
2974 (powerpc-64l.c): Remove.
2975 (powerpc-altivec64l.c): Remove.
2976 (powerpc-cell64l.c): Remove.
2977 (powerpc-vsx64l.c): Remove.
2978 (powerpc-isa205-64l.c): Remove.
2979 (powerpc-isa205-altivec64l.c): Remove.
2980 (powerpc-isa205-vsx64l.c): Remove.
2981 (s390-linux32.c): Remove.
2982 (s390-linux32v1.c): Remove.
2983 (s390-linux32v2.c): Remove.
2984 (s390-linux64.c): Remove.
2985 (s390-linux64v1.c): Remove.
2986 (s390-linux64v2.c): Remove.
2987 (s390-te-linux64.c): Remove.
2988 (s390-vx-linux64.c): Remove.
2989 (s390-tevx-linux64.c): Remove.
2990 (s390x-linux64.c): Remove.
2991 (s390x-linux64v1.c): Remove.
2992 (s390x-linux64v2.c): Remove.
2993 (s390x-te-linux64.c): Remove.
2994 (s390x-vx-linux64.c): Remove.
2995 (s390x-tevx-linux64.c): Remove.
2996 (tic6x-c64xp-linux.c): Remove.
2997 (tic6x-c64x-linux.c): Remove.
2998 (tic6x-c62x-linux.c): Remove.
2999 (reg-sh.c): Remove.
3000 (reg-sparc64.c): Remove.
3001 (reg-spu.c): Remove.
3002 (amd64.c): Remove.
3003 (amd64-linux.c): Remove.
3004 (amd64-avx.c): Remove.
3005 (amd64-avx-linux.c): Remove.
3006 (amd64-avx-avx512.c): Remove.
3007 (amd64-avx-avx512-linux.c): Remove.
3008 (amd64-mpx.c): Remove.
3009 (amd64-mpx-linux.c): Remove.
3010 (amd64-avx-mpx-avx512-pku.c): Remove.
3011 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3012 (amd64-avx-mpx.c): Remove.
3013 (amd64-avx-mpx-linux.c): Remove.
3014 (x32.c): Remove.
3015 (x32-linux.c): Remove.
3016 (x32-avx.c): Remove.
3017 (x32-avx-linux.c): Remove.
3018 (x32-avx-avx512.c): Remove.
3019 (x32-avx-avx512-linux.c): Remove.
3020 (reg-xtensa.c): Remove.
3021 (reg-tilegx.c): Remove.
3022 (reg-tilegx32.c): Remove.
3023
1672e0d9
SDJ
30242017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3025
3026 * Makefile.in (SFILES): Add "common/environ.c".
3027 (OBJS): Add "common/environ.h".
3028
239b6d10
WT
30292017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3030
3031 * configure.ac: Check if the fs_base and gs_base members of
3032 `struct user_regs_struct' exist.
3033 * config.in: Regenerated.
3034 * configure: Likewise.
3035
694b382c
AT
30362017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3037
3038 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3039 target_read_memory.
3040 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3041 (get_next_pcs_syscall_next_pc): Likewise.
3042
7dc53023
LM
30432016-12-23 Luis Machado <lgustavo@codesourcery.com>
3044
3045 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3046 * nto-x86-low.c: Likewise.
3047
ad02e4fe
SM
30482016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3049
3050 * Makefile.in: Include disable-implicit-rules.mk.
3051
dcb07cfa
PA
30522016-11-23 Pedro Alves <palves@redhat.com>
3053
3054 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3055 (debug_vprintf): Use std::chrono::steady_clock instead of
3056 gettimeofday. Use '.' instead of ':'.
3057 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3058 (get_timestamp): Use std::chrono::steady_clock instead of
3059 gettimeofday.
3060
8629c02c
SM
30612016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3062
3063 * Makefile.in: Fix whitespace formatting.
3064
b593ecca
SM
30652016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3066
3067 * Makefile.in (SFILES, OBS): Flatten list and order
3068 alphabetically.
3069
9986ba08
PA
30702016-11-23 Pedro Alves <palves@redhat.com>
3071
3072 * event-loop.c (handle_file_event): Use warning.
3073 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3074 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3075 Use warning.
3076
4eefa7bc
PA
30772016-11-23 Pedro Alves <palves@redhat.com>
3078
3079 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3080 output.
3081 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3082 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3083 debug_printf and debug_flush for debug output.
3084 * server.c (handle_general_set): Likewise.
3085 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3086 output.
3087
5443506e
SM
30882016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3089
3090 * Makefile.in (.c.o): Replace rule with ...
3091 (%.o: %.c): ... this one.
3092
3b165252
SM
30932016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3094
3095 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3096 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3097 make.
3098 * configure.ac: Remove checks for the make program.
3099 * configure: Re-generate.
3100
0bcda685
PA
31012016-10-28 Pedro Alves <palves@redhat.com>
3102
3103 * Makefile.in (CXX_DIALECT): Get from configure.
3104 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3105 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3106 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3107 * config.in: Regenerate.
3108 * configure: Regenerate.
3109
c3805894
YQ
31102016-10-27 Yao Qi <yao.qi@linaro.org>
3111
3112 * linux-low.c (linux_supports_range_stepping): Return true if
3113 can_software_single_step return true.
3114
89342618
YQ
31152016-10-27 Yao Qi <yao.qi@linaro.org>
3116
3117 * inferiors.c (find_inferior_in_random): New function.
3118 * inferiors.h (find_inferior_in_random): Declare.
3119 * linux-low.c (linux_wait_for_event_filtered): Call
3120 find_inferior_in_random instead of find_inferior.
3121
e3652c84
YQ
31222016-10-27 Yao Qi <yao.qi@linaro.org>
3123
3124 * linux-low.c (linux_wait_1): If single-step breakpoints are
3125 inserted, remove them.
3126
5a04c4cf
PA
31272016-10-26 Pedro Alves <palves@redhat.com>
3128
3129 * linux-low.c (handle_extended_wait): Link parent/child fork
3130 threads.
3131 (linux_wait_1): Unlink them.
3132 (linux_set_resume_request): Ignore resume requests for
3133 already-resumed and unhandled fork child threads.
3134 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3135 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3136 New functions.
3137 (handle_v_requests) <vCont>: Don't call require_running.
3138 * server.h (in_queued_stop_replies): New declaration.
3139
cb93dc7f
YQ
31402016-10-24 Yao Qi <yao.qi@linaro.org>
3141
3142 PR server/20733
3143 * linux-aarch64-low.c (append_insns): Cast the return value to
3144 'uint32_t *'.
3145
a1078bea
YQ
31462016-10-10 Yao Qi <yao.qi@linaro.org>
3147
3148 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3149
1fb77080
SDJ
31502016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3151
3152 * target.c (target_supports_multi_process): New function, moved
3153 from...
3154 * target.h (target_supports_multi_process): ... here. Remove
3155 macro.
3156
39b5a3b9
TT
31572016-10-05 Tom Tromey <tom@tromey.com>
3158
3159 PR remote/20655:
3160 * tracepoint.c (handle_tracepoint_bkpts): Check
3161 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3162
c1d0b70a
YQ
31632016-10-05 Yao Qi <yao.qi@linaro.org>
3164
3165 * configure.srv: Update the path of arm-*.xml files.
3166
0a69eedb
YQ
31672016-10-05 Terry Guo <terry.guo@arm.com>
3168 Yao Qi <yao.qi@linaro.org>
3169
3170 * Makefile.in: Adjust the path of rules.
3171 * configure.srv: Update the path of xml files.
3172 * regformats/arm-with-iwmmxt.dat: Regenerated.
3173 * regformats/arm-with-neon.dat: Likewise.
3174 * regformats/arm-with-vfpv2.dat: Likewise.
3175 * regformats/arm-with-vfpv3.dat Likewise.
3176
17e16485
YQ
31772016-09-30 Yao Qi <yao.qi@linaro.org>
3178
3179 PR gdbserver/20627
3180 * target.c (target_stop_and_wait): Don't call
3181 target_continue_no_signal, use resume_stop instead.
3182
edeeb602
YQ
31832016-09-26 Yao Qi <yao.qi@linaro.org>
3184
3185 * linux-low.c (linux_wait_1): Call debug_exit.
3186
503b1c39
PA
31872016-09-23 Pedro Alves <palves@redhat.com>
3188
3189 * Makefile.in (SFILES): Add common/new-op.c.
3190 (OBS): Add common/new-op.o.
3191 (new-op.o): New rule.
3192
74172ecf
SM
31932016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3194
3195 * .gitinore: Ignore more files.
3196
fc6cda2e
YQ
31972016-09-21 Yao Qi <yao.qi@linaro.org>
3198
3199 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3200 23.
3201
bc1e6c81
SDJ
32022016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3203
3204 * server.c (start_inferior): Call target_mourn_inferior instead of
3205 mourn_inferior; pass ptid_t argument to it.
3206 (resume): Likewise.
3207 (handle_target_event): Likewise.
3208 * target.c (target_mourn_inferior): New function.
3209 * target.h (mourn_inferior): Delete macro.
3210
0e00e962
AA
32112016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3212
3213 * linux-low.c (lwp_is_stepping): New function.
3214
1d8cb77d
CL
32152016-09-06 Carl Love <cel@us.ibm.com>
3216
3217 * server.c (start_inferior): Fixed comment, requested comment change
3218 didn't get updated correctly. Removed reference to ptrace () call as
3219 it is only true on Linux systems.
3220
7313bced
CL
32212016-09-06 Carl Love <cel@us.ibm.com>
3222
3223 * server.c (start_inferior): Do not call
3224 function target_post_create_inferior () if the
3225 inferior process has already exited.
3226
cf6de44d
PA
32272016-09-05 Pedro Alves <palves@redhat.com>
3228
3229 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3230 (COMPILE.pre, CC_LD): Use CXX directly.
3231 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3232 * acinclude.m4: Don't include build-with-cxx.m4.
3233 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3234 * configure: Regenerate.
3235
c1da6748
AT
32362016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3237
3238 PR gdb/19495
3239 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3240 call writing data to own_buf.
3241
f2b9e3df
SDJ
32422016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3243
3244 * target.c (mywait): Call target_wait instead of
3245 the_target->wait.
3246 (target_wait): New function.
3247
049a8570
SDJ
32482016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3249
3250 * server.c (start_inferior): New variable 'ptid'. Replace calls
3251 to the_target->resume by target_continue{,_no_signal}, depending
3252 on the case.
3253 * target.c (target_stop_and_wait): Call target_continue_no_signal
3254 instead of the_target->resume.
3255 (target_continue): New function.
3256
3aa5cfa0
AT
32572016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3258
3259 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3260
754653a7
AZ
32612016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3262
3263 PR server/20491
3264 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3265 ps_prochandle.
3266 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3267 * linux-arm-low.c (ps_get_thread_area): Likewise.
3268 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3269 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3270 * linux-mips-low.c (ps_get_thread_area): Likewise.
3271 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3272 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3273 * linux-x86-low.c (ps_get_thread_area): Likewise.
3274 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3275
ed036b40
PA
32762016-08-19 Pedro Alves <palves@redhat.com>
3277
3278 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3279
c8ef42ee
PA
32802016-08-19 Pedro Alves <palves@redhat.com>
3281
3282 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3283 comment. Use memcpy instead of casting through unsigned long.
3284
9c235a72
PA
32852016-08-19 Pedro Alves <palves@redhat.com>
3286
3287 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3288 allocating around 0x80000000.
3289
201506da
PA
32902016-08-19 Pedro Alves <palves@redhat.com>
3291
3292 PR gdb/20415
3293 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3294 (x32-avx512-linux-ipa.o): New rules.
3295 * configure.ac (x86_64-*-linux*): New x32 check.
3296 * configure.srv (ipa_x32_linux_regobj): New.
3297 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3298 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3299 descriptions.
3300 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3301 descriptions.
3302 * configure: Regenerate.
3303
f348d89a
PA
33042016-08-09 Pedro Alves <palves@redhat.com>
3305
3306 PR gdb/18653
3307 * Makefile.in (OBS): Add signals-state-save-restore.o.
3308 (signals-state-save-restore.o): New rule.
3309 * config.in: Regenerate.
3310 * configure: Regenerate.
3311 * linux-low.c: Include "signals-state-save-restore.h".
3312 (linux_create_inferior): Call
3313 restore_original_signals_state.
3314 * server.c: Include "dispositions-save-restore.h".
3315 (captured_main): Call save_original_signals_state.
3316
1baf5149
PA
33172016-08-05 Pedro Alves <palves@redhat.com>
3318
3319 * configure: Regenerate.
3320
fcd4a73d
YQ
33212016-08-04 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-low.c (regsets_fetch_inferior_registers): Check
3324 errno is ESRCH or not.
3325
979659d0
YQ
33262016-08-02 Yao Qi <yao.qi@linaro.org>
3327
3328 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3329 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3330 (thread_db_load_search): Update.
3331 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3332 td_ta_set_event and td_ta_event_getmsg.
3333
6598661d
PA
33342016-07-26 Pedro Alves <palves@redhat.com>
3335
3336 PR server/20414
3337 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3338 of unsigned long for 64-bit registers and use uint32_t instead of
3339 unsigned int for 32-bit registers.
3340
9cf12d57
PA
33412016-07-26 Pedro Alves <palves@redhat.com>
3342
3343 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3344 to 'ptrace'.
3345
305450ed
TT
33462016-07-21 Tom Tromey <tom@tromey.com>
3347
3348 * configure: Rebuild.
3349
2583da7c
YQ
33502016-07-21 Yao Qi <yao.qi@linaro.org>
3351
3352 * mem-break.c (find_gdb_breakpoint): Cast bp to
3353 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3354
21536b36
YQ
33552016-07-21 Yao Qi <yao.qi@linaro.org>
3356
3357 * server.c (handle_v_requests): Support s and S actions
3358 if target_supports_software_single_step return true.
3359
8901d193
YQ
33602016-07-21 Yao Qi <yao.qi@linaro.org>
3361
3362 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3363 is resume_step, call maybe_hw_step.
3364 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3365 and unstop them.
3366 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3367 breakpoints or not.
3368 (proceed_one_lwp): If resume request is resume_step, install
3369 reinsert breakpoints and call maybe_hw_step.
3370
0e9a339e
YQ
33712016-07-21 Yao Qi <yao.qi@linaro.org>
3372
3373 * linux-low.c (proceed_one_lwp): Declare.
3374 (linux_resume_one_thread): Remove local variable 'step'.
3375 Lift code enqueue signal. Call proceed_one_lwp instead of
3376 linux_resume_one_lwp.
3377
4281b351
YQ
33782016-07-21 Yao Qi <yao.qi@linaro.org>
3379
3380 * linux-low.c (linux_resume_one_thread): Call
3381 enqueue_pending_signal.
3382
984a2c04
YQ
33832016-07-21 Yao Qi <yao.qi@linaro.org>
3384
3385 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3386 * inferiors.c (do_restore_current_thread_cleanup): New function.
3387 (make_cleanup_restore_current_thread): Likewise.
3388 * linux-low.c (install_software_single_step_breakpoints): Call
3389 make_cleanup_restore_current_thread. Switch current_thread to
3390 thread.
3391
bec903c9
YQ
33922016-07-21 Yao Qi <yao.qi@linaro.org>
3393
3394 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3395 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3396 (clone_one_breakpoint): Likewise.
3397 (delete_reinsert_breakpoints): Change parameter to thread.
3398 Callers updated.
3399 (has_reinsert_breakpoints): Likewise.
3400 (uninsert_reinsert_breakpoints): Likewise.
3401 (reinsert_reinsert_breakpoints): Likewise.
3402 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3403 (delete_reinsert_breakpoints): Likewise.
3404 (reinsert_reinsert_breakpoints): Likewise.
3405 (uninsert_reinsert_breakpoints): Likewise.
3406 (has_reinsert_breakpoints): Likewise.
3407
63c40ec7
YQ
34082016-07-21 Yao Qi <yao.qi@linaro.org>
3409
3410 * inferiors.c (get_thread_process): Make parameter const.
3411 * inferiors.h (get_thread_process): Update declaration.
3412 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3413 Add new parameters child_thread and parent_thread. Callers
3414 updated.
3415 * mem-break.h (clone_all_breakpoints): Update declaration.
3416
9aa76cd0
YQ
34172016-07-21 Yao Qi <yao.qi@linaro.org>
3418
3419 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3420 <command_list, handler>: Remove.
3421 (struct gdb_breakpoint): New.
3422 (struct other_breakpoint): New.
3423 (struct reinsert_breakpoint): New.
3424 (is_gdb_breakpoint): New function.
3425 (any_persistent_commands): Update command_list if
3426 is_gdb_breakpoint returns true.
3427 (set_breakpoint): Create breakpoints according to their types.
3428 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3429 (set_gdb_breakpoint_1): Likewise.
3430 (set_gdb_breakpoint): Likewise.
3431 (clear_breakpoint_conditions): Change parameter type to
3432 'struct gdb_breakpoint *'.
3433 (clear_breakpoint_commands): Likewise.
3434 (clear_breakpoint_conditions_and_commands): Likewise.
3435 (add_condition_to_breakpoint): Likewise.
3436 (add_breakpoint_condition): Likewise.
3437 (add_commands_to_breakpoint): Likewise.
3438 (check_breakpoints): Check other_breakpoint.
3439 (clone_one_breakpoint): Clone breakpopint according to its type.
3440 * mem-break.h (struct gdb_breakpoint): Declare.
3441 (set_gdb_breakpoint): Update declaration.
3442 (clear_breakpoint_conditions_and_commands): Likewise.
3443 (add_breakpoint_condition): Likewise.
3444 (add_breakpoint_commands): Likewise.
3445 * server.c (process_point_options): Change parameter type to
3446 'struct gdb_breakpoint *'.
3447
811f8301
YQ
34482016-07-21 Yao Qi <yao.qi@linaro.org>
3449
3450 * mem-break.c (set_breakpoint_at): Rename it to ...
3451 (set_breakpoint_type_at): ... it.
3452 (set_breakpoint_at): Call set_breakpoint_type_at.
3453 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3454 * mem-break.h (set_breakpoint_at): Update comments.
3455
b1c51e36
CLT
34562016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3457
3458 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3459 to buf parameter.
3460 (nios2_store_gregset): Likewise.
3461
ced2dffb
PA
34622016-07-01 Pedro Alves <palves@redhat.com>
3463 Antoine Tremblay <antoine.tremblay@ericsson.com>
3464
3465 * linux-low.c: Change interface to take the target lwp_info
3466 pointer directly and return void. Handle detaching from a zombie
3467 thread.
3468 (linux_detach_lwp_callback): New function.
3469 (linux_detach): Detach from the leader thread after detaching from
3470 the clone threads.
3471
2ac09a5b
YQ
34722016-06-28 Yao Qi <yao.qi@linaro.org>
3473
3474 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3475 for variable new_offset.
3476 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3477 (aarch64_ftrace_insn_reloc_cb): Likewise.
3478 (aarch64_ftrace_insn_reloc_tb): Likewise.
3479 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3480 PRIx64 instead of PRIx32.
3481
79e7fd4f
YQ
34822016-06-28 Yao Qi <yao.qi@linaro.org>
3483
3484 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3485 (the_low_target): Install arm_get_syscall_trapinfo.
3486
061fc021
YQ
34872016-06-28 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3490 function.
3491 (the_low_target): Install aarch64_get_syscall_trapinfo.
3492
4cc32bec
YQ
34932016-06-28 Yao Qi <yao.qi@linaro.org>
3494
3495 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3496 Callers updated.
3497 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3498 Remove parameter sysno.
3499 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3500 sysret.
3501
782c1122
AA
35022016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3503
3504 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3505 (s390_emit_ne_goto): Likewise.
3506 (s390_emit_lt_goto): Likewise.
3507 (s390_emit_le_goto): Likewise.
3508 (s390_emit_gt_goto): Likewise.
3509 (s390_emit_ge_goto): Likewise.
3510 (s390x_emit_eq_goto): Likewise.
3511 (s390x_emit_ne_goto): Likewise.
3512 (s390x_emit_lt_goto): Likewise.
3513 (s390x_emit_le_goto): Likewise.
3514 (s390x_emit_gt_goto): Likewise.
3515 (s390x_emit_ge_goto): Likewise.
3516 (s390_emit_ops_impl): Mark variable static.
3517 (s390x_emit_ops): Likewise.
3518
2e7b624b
YQ
35192016-06-17 Yao Qi <yao.qi@linaro.org>
3520
3521 * linux-low.c (handle_extended_wait): Call
3522 uninsert_reinsert_breakpoints for the parent process. Remove
3523 reinsert breakpoints from the child process. Reinsert them to
3524 the parent process when vfork is done.
3525 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3526 (reinsert_reinsert_breakpoints): New function.
3527 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3528 (reinsert_reinsert_breakpoints): Declare.
3529
8a81c5d7
YQ
35302016-06-17 Yao Qi <yao.qi@linaro.org>
3531
3532 * linux-low.c (handle_extended_wait): If the parent is doing
3533 step-over, remove the reinsert breakpoints from the forked child.
3534
f50bf8e5
YQ
35352016-06-17 Yao Qi <yao.qi@linaro.org>
3536
3537 * linux-low.c (unsuspend_all_lwps): Declare.
3538 (linux_low_filter_event): If thread exited, call finish_step_over.
3539 If step-over is finished, unsuspend other threads.
3540
8376a3cb
YQ
35412016-06-17 Yao Qi <yao.qi@linaro.org>
3542
3543 * linux-low.c (linux_resume_one_lwp_throw): Assert
3544 has_reinsert_breakpoints returns false.
3545 * mem-break.c (delete_disabled_breakpoints): Assert
3546 bp type isn't reinsert_breakpoint.
3547
f79b145d
YQ
35482016-06-17 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-low.c (maybe_hw_step): New function.
3551 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3552 (finish_step_over): Switch current_thread to lwp temporarily,
3553 and assert has_reinsert_breakpoints returns true.
3554 (proceed_one_lwp): Call maybe_hw_step.
3555 * mem-break.c (has_reinsert_breakpoints): New function.
3556 * mem-break.h (has_reinsert_breakpoints): Declare.
3557
0ae534d2
JT
35582016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3559
3560 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3561
fcdad592
YQ
35622016-05-17 Yao Qi <yao.qi@linaro.org>
3563
3564 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3565 instead of find_inferior.
3566
9e784964
YQ
35672016-05-05 Yao Qi <yao.qi@linaro.org>
3568
3569 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3570 Initialize res to zero.
3571
cf2ebb6e
YQ
35722016-05-05 Yao Qi <yao.qi@linaro.org>
3573
3574 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3575 to uint32_t.
3576
c1aebf87
UW
35772016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3578
3579 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3580 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3581 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3582
35fd2deb 35832016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3584 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3585
3586 * tracepoint.c (write_inferior_int8): New function.
3587 (cmd_qtenable_disable): Write enable flag using
3588 write_inferior_int8.
3589
484b3c32
YQ
35902016-04-25 Yao Qi <yao.qi@linaro.org>
3591
3592 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3593 (need_step_over_p): Return zero if the LWP has pending signals
3594 can be delivered on software single step target.
3595
85ba7d86
YQ
35962016-04-25 Yao Qi <yao.qi@linaro.org>
3597
3598 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3599 return instead of error.
3600
3539aa13
YQ
36012016-04-22 Yao Qi <yao.qi@linaro.org>
3602
3603 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3604 to 23.
3605
5b061e98
YQ
36062016-04-22 Yao Qi <yao.qi@linaro.org>
3607
3608 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3609 signal when stepping over breakpoint with software single
3610 step.
3611
3451269c
PA
36122016-04-21 Pedro Alves <palves@redhat.com>
3613
3614 * linux-s390-low.c (s390_collect_ptrace_register)
3615 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3616 add casts.
3617 (s390_check_regset): Use void * instead of gdb_byte *.
3618
a2358508
PA
36192016-04-20 Pedro Alves <palves@redhat.com>
3620
3621 * configure: Renegerate.
3622
6885166d
YQ
36232016-04-20 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3626 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3627 number 16.
3628 (arm_store_gregset): Likewise.
3629
2b863f51
WT
36302016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3631
3632 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3633 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3634 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3635 (amd64-avx-mpx-linux.c): New rules.
3636 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3637 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3638 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3639 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3640 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3641 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3642 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3643 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3644 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3645 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3646 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3647 * linux-x86-low.c (x86_linux_read_description): Add case for
3648 X86_XSTATE_AVX_MPX_MASK.
3649 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3650 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3651 init_registers_i386_avx_mpx_linux.
3652 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3653 (initialize_low_tracepoint): Call
3654 init_registers_i386_avx_mpx_linux.
3655 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3656 (initialize_low_tracepoint): Call
3657 init_registers_amd64_avx_mpx_linux.
3658 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3659 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3660 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3661 declarations.
3662
9b30624b
PA
36632016-04-18 Pedro Alves <palves@redhat.com>
3664
3665 * configure: Regenerate.
3666
45e3745e
AT
36672016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3668
3669 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3670 (aarch64_emit_sub): Likewise.
3671
2afc13ff
PA
36722016-04-12 Pedro Alves <palves@redhat.com>
3673
3674 * utils.c (prepare_to_throw_exception): Delete.
3675
6e774b13
SM
36762016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3677
3678 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3679
4dca19f8
MK
36802016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3681
3682 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3683
d0a9981f
MK
36842016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3685
3686 * linux-aarch64-ipa.c: Add <elf.h> include.
3687 * linux-ppc-ipa.c: Add <elf.h> include.
3688 * linux-s390-ipa.c: Add <elf.h> include.
3689
252db07e
MK
36902016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3691
3692 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3693 (get_raw_reg_ptr): Likewise.
3694 (get_trace_state_variable_value_ptr): Likewise.
3695 (set_trace_state_variable_value_ptr): Likewise.
3696 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3697 char *.
3698
14e2b6d9
MK
36992016-03-31 Wei-cheng Wang <cole945@gmail.com>
3700 Marcin Kościelnicki <koriakin@0x04.net>
3701
3702 PR/17221
3703 * linux-ppc-low.c (emit_insns): New function.
3704 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3705 (ppc_emit_prologue): New function.
3706 (ppc_emit_epilogue): New function.
3707 (ppc_emit_add): New function.
3708 (ppc_emit_sub): New function.
3709 (ppc_emit_mul): New function.
3710 (ppc_emit_lsh): New function.
3711 (ppc_emit_rsh_signed): New function.
3712 (ppc_emit_rsh_unsigned): New function.
3713 (ppc_emit_ext): New function.
3714 (ppc_emit_zero_ext): New function.
3715 (ppc_emit_log_not): New function.
3716 (ppc_emit_bit_and): New function.
3717 (ppc_emit_bit_or): New function.
3718 (ppc_emit_bit_xor): New function.
3719 (ppc_emit_bit_not): New function.
3720 (ppc_emit_equal): New function.
3721 (ppc_emit_less_signed): New function.
3722 (ppc_emit_less_unsigned): New function.
3723 (ppc_emit_ref): New function.
3724 (ppc_emit_const): New function.
3725 (ppc_emit_reg): New function.
3726 (ppc_emit_pop): New function.
3727 (ppc_emit_stack_flush): New function.
3728 (ppc_emit_swap): New function.
3729 (ppc_emit_stack_adjust): New function.
3730 (ppc_emit_call): New function.
3731 (ppc_emit_int_call_1): New function.
3732 (ppc_emit_void_call_2): New function.
3733 (ppc_emit_if_goto): New function.
3734 (ppc_emit_goto): New function.
3735 (ppc_emit_eq_goto): New function.
3736 (ppc_emit_ne_goto): New function.
3737 (ppc_emit_lt_goto): New function.
3738 (ppc_emit_le_goto): New function.
3739 (ppc_emit_gt_goto): New function.
3740 (ppc_emit_ge_goto): New function.
3741 (ppc_write_goto_address): New function.
3742 (ppc_emit_ops_impl): New static variable.
3743 (ppc64v1_emit_prologue): New function.
3744 (ppc64v2_emit_prologue): New function.
3745 (ppc64_emit_epilogue): New function.
3746 (ppc64_emit_add): New function.
3747 (ppc64_emit_sub): New function.
3748 (ppc64_emit_mul): New function.
3749 (ppc64_emit_lsh): New function.
3750 (ppc64_emit_rsh_signed): New function.
3751 (ppc64_emit_rsh_unsigned): New function.
3752 (ppc64_emit_ext): New function.
3753 (ppc64_emit_zero_ext): New function.
3754 (ppc64_emit_log_not): New function.
3755 (ppc64_emit_bit_and): New function.
3756 (ppc64_emit_bit_or): New function.
3757 (ppc64_emit_bit_xor): New function.
3758 (ppc64_emit_bit_not): New function.
3759 (ppc64_emit_equal): New function.
3760 (ppc64_emit_less_signed): New function.
3761 (ppc64_emit_less_unsigned): New function.
3762 (ppc64_emit_ref): New function.
3763 (ppc64_emit_const): New function.
3764 (ppc64v1_emit_reg): New function.
3765 (ppc64v2_emit_reg): New function.
3766 (ppc64_emit_pop): New function.
3767 (ppc64_emit_stack_flush): New function.
3768 (ppc64_emit_swap): New function.
3769 (ppc64v1_emit_call): New function.
3770 (ppc64v2_emit_call): New function.
3771 (ppc64v1_emit_int_call_1): New function.
3772 (ppc64v2_emit_int_call_1): New function.
3773 (ppc64v1_emit_void_call_2): New function.
3774 (ppc64v2_emit_void_call_2): New function.
3775 (ppc64_emit_if_goto): New function.
3776 (ppc64_emit_eq_goto): New function.
3777 (ppc64_emit_ne_goto): New function.
3778 (ppc64_emit_lt_goto): New function.
3779 (ppc64_emit_le_goto): New function.
3780 (ppc64_emit_gt_goto): New function.
3781 (ppc64_emit_ge_goto): New function.
3782 (ppc64v1_emit_ops_impl): New static variable.
3783 (ppc64v2_emit_ops_impl): New static variable.
3784 (ppc_emit_ops): New function.
3785 (linux_low_target): Wire in ppc_emit_ops.
3786
a2174ba4
MK
37872016-03-31 Wei-cheng Wang <cole945@gmail.com>
3788 Marcin Kościelnicki <koriakin@0x04.net>
3789
3790 PR/17221
3791 * Makefile.in: Add powerpc-*-ipa.o
3792 * configure.srv: Add ipa_obj for powerpc*-linux.
3793 * linux-ppc-ipa.c: New file.
3794 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3795 includes.
3796 (PPC_FIELD): New macro.
3797 (PPC_SEXT): New macro.
3798 (PPC_OP6): New macro.
3799 (PPC_BO): New macro.
3800 (PPC_LI): New macro.
3801 (PPC_BD): New macro.
3802 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3803 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3804 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3805 (ppc_get_thread_area): New function.
3806 (is_elfv2_inferior): New function.
3807 (gen_ds_form): New function.
3808 (GEN_STD): New macro.
3809 (GEN_STDU): New macro.
3810 (GEN_LD): New macro.
3811 (GEN_LDU): New macro.
3812 (gen_d_form): New function.
3813 (GEN_ADDI): New macro.
3814 (GEN_ADDIS): New macro.
3815 (GEN_LI): New macro.
3816 (GEN_LIS): New macro.
3817 (GEN_ORI): New macro.
3818 (GEN_ORIS): New macro.
3819 (GEN_LWZ): New macro.
3820 (GEN_STW): New macro.
3821 (GEN_STWU): New macro.
3822 (gen_xfx_form): New function.
3823 (GEN_MFSPR): New macro.
3824 (GEN_MTSPR): New macro.
3825 (GEN_MFCR): New macro.
3826 (GEN_MTCR): New macro.
3827 (GEN_SYNC): New macro.
3828 (GEN_LWSYNC): New macro.
3829 (gen_x_form): New function.
3830 (GEN_OR): New macro.
3831 (GEN_MR): New macro.
3832 (GEN_LWARX): New macro.
3833 (GEN_STWCX): New macro.
3834 (GEN_CMPW): New macro.
3835 (gen_md_form): New function.
3836 (GEN_RLDICL): New macro.
3837 (GEN_RLDICR): New macro.
3838 (gen_i_form): New function.
3839 (GEN_B): New macro.
3840 (GEN_BL): New macro.
3841 (gen_b_form): New function.
3842 (GEN_BNE): New macro.
3843 (GEN_LOAD): New macro.
3844 (GEN_STORE): New macro.
3845 (gen_limm): New function.
3846 (gen_atomic_xchg): New function.
3847 (gen_call): New function.
3848 (ppc_relocate_instruction): New function.
3849 (ppc_install_fast_tracepoint_jump_pad): New function.
3850 (ppc_get_min_fast_tracepoint_insn_len): New function.
3851 (ppc_get_ipa_tdesc_idx): New function.
3852 (the_low_target): Wire in the new functions.
3853 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3854 tdescs.
3855 * linux-ppc-tdesc.h: New file.
3856
a13c4696
MK
38572016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3858
3859 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3860 (alloc_jump_pad_buffer): New function.
3861 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3862 (alloc_jump_pad_buffer): New function.
3863 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3864 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3865 (alloc_jump_pad_buffer): New function.
3866 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3867 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3868 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3869 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3870
1cda1512
MK
38712016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3872
3873 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3874 * linux-amd64-ipa.c: Likewise.
3875 * linux-i386-ipa.c: Likewise.
3876 * linux-s390-ipa.c: Likewise.
3877 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3878 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3879 set_trace_state_variable_value_ptr.
3880 (struct ipa_sym_addresses): Likewise.
3881 (symbol_list): Likewise.
3882 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3883 accessing gdb_collect directly.
3884 (gdb_collect_ptr_type): New typedef.
3885 (get_raw_reg_ptr_type): New typedef.
3886 (get_trace_state_variable_value_ptr_type): New typedef.
3887 (set_trace_state_variable_value_ptr_type): New typedef.
3888 (gdb_collect_ptr): New global.
3889 (get_raw_reg_ptr): New global.
3890 (get_trace_state_variable_value_ptr): New global.
3891 (set_trace_state_variable_value_ptr): New global.
3892 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3893 accessing get_raw_reg directly.
3894 (get_get_tsv_func_addr): Likewise for
3895 get_trace_state_variable_value_ptr.
3896 (get_set_tsv_func_addr): Likewise for
3897 set_trace_state_variable_value_ptr.
3898 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3899
72fb5488
SM
39002016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3901
3902 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3903
28170b88
MK
39042016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3905
3906 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3907 packets.
3908 (relocate_instruction): Remove own_buf.
3909 * server.c (own_buf): Make global.
3910 (handle_v_requests): Make global.
3911 * server.h (own_buf): New declaration.
3912 (handle_v_requests): New prototype.
3913
f39e8743
MK
39142016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3915
3916 PR 18377
3917 * linux-s390-low.c (add_insns): New function.
3918 (s390_emit_prologue): New function.
3919 (s390_emit_epilogue): New function.
3920 (s390_emit_add): New function.
3921 (s390_emit_sub): New function.
3922 (s390_emit_mul): New function.
3923 (s390_emit_lsh): New function.
3924 (s390_emit_rsh_signed): New function.
3925 (s390_emit_rsh_unsigned): New function.
3926 (s390_emit_ext): New function.
3927 (s390_emit_log_not): New function.
3928 (s390_emit_bit_and): New function.
3929 (s390_emit_bit_or): New function.
3930 (s390_emit_bit_xor): New function.
3931 (s390_emit_bit_not): New function.
3932 (s390_emit_equal): New function.
3933 (s390_emit_less_signed): New function.
3934 (s390_emit_less_unsigned): New function.
3935 (s390_emit_ref): New function.
3936 (s390_emit_if_goto): New function.
3937 (s390_emit_goto): New function.
3938 (s390_write_goto_address): New function.
3939 (s390_emit_litpool): New function.
3940 (s390_emit_const): New function.
3941 (s390_emit_call): New function.
3942 (s390_emit_reg): New function.
3943 (s390_emit_pop): New function.
3944 (s390_emit_stack_flush): New function.
3945 (s390_emit_zero_ext): New function.
3946 (s390_emit_swap): New function.
3947 (s390_emit_stack_adjust): New function.
3948 (s390_emit_set_r2): New function.
3949 (s390_emit_int_call_1): New function.
3950 (s390_emit_void_call_2): New function.
3951 (s390_emit_eq_goto): New function.
3952 (s390_emit_ne_goto): New function.
3953 (s390_emit_lt_goto): New function.
3954 (s390_emit_le_goto): New function.
3955 (s390_emit_gt_goto): New function.
3956 (s390_emit_ge_goto): New function.
3957 (s390x_emit_prologue): New function.
3958 (s390x_emit_epilogue): New function.
3959 (s390x_emit_add): New function.
3960 (s390x_emit_sub): New function.
3961 (s390x_emit_mul): New function.
3962 (s390x_emit_lsh): New function.
3963 (s390x_emit_rsh_signed): New function.
3964 (s390x_emit_rsh_unsigned): New function.
3965 (s390x_emit_ext): New function.
3966 (s390x_emit_log_not): New function.
3967 (s390x_emit_bit_and): New function.
3968 (s390x_emit_bit_or): New function.
3969 (s390x_emit_bit_xor): New function.
3970 (s390x_emit_bit_not): New function.
3971 (s390x_emit_equal): New function.
3972 (s390x_emit_less_signed): New function.
3973 (s390x_emit_less_unsigned): New function.
3974 (s390x_emit_ref): New function.
3975 (s390x_emit_if_goto): New function.
3976 (s390x_emit_const): New function.
3977 (s390x_emit_call): New function.
3978 (s390x_emit_reg): New function.
3979 (s390x_emit_pop): New function.
3980 (s390x_emit_stack_flush): New function.
3981 (s390x_emit_zero_ext): New function.
3982 (s390x_emit_swap): New function.
3983 (s390x_emit_stack_adjust): New function.
3984 (s390x_emit_int_call_1): New function.
3985 (s390x_emit_void_call_2): New function.
3986 (s390x_emit_eq_goto): New function.
3987 (s390x_emit_ne_goto): New function.
3988 (s390x_emit_lt_goto): New function.
3989 (s390x_emit_le_goto): New function.
3990 (s390x_emit_gt_goto): New function.
3991 (s390x_emit_ge_goto): New function.
3992 (s390_emit_ops): New function.
3993 (struct linux_target_ops): Fill in emit_ops hook.
3994
abd9baf9
MK
39952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3996
3997 PR 18377
3998 * Makefile.in: Add s390 IPA files.
3999 * configure.srv: Build IPA for s390.
4000 * linux-s390-ipa.c: New file.
4001 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4002 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4003 (tdesc_s390_linux32): Likewise.
4004 (init_registers_s390_linux32v1): Likewise.
4005 (tdesc_s390_linux32v1): Likewise.
4006 (init_registers_s390_linux32v2): Likewise.
4007 (tdesc_s390_linux32v2): Likewise.
4008 (init_registers_s390_linux64): Likewise.
4009 (tdesc_s390_linux64): Likewise.
4010 (init_registers_s390_linux64v1): Likewise.
4011 (tdesc_s390_linux64v1): Likewise.
4012 (init_registers_s390_linux64v2): Likewise.
4013 (tdesc_s390_linux64v2): Likewise.
4014 (init_registers_s390_te_linux64): Likewise.
4015 (tdesc_s390_te_linux64): Likewise.
4016 (init_registers_s390_vx_linux64): Likewise.
4017 (tdesc_s390_vx_linux64): Likewise.
4018 (init_registers_s390_tevx_linux64): Likewise.
4019 (tdesc_s390_tevx_linux64): Likewise.
4020 (init_registers_s390x_linux64): Likewise.
4021 (tdesc_s390x_linux64): Likewise.
4022 (init_registers_s390x_linux64v1): Likewise.
4023 (tdesc_s390x_linux64v1): Likewise.
4024 (init_registers_s390x_linux64v2): Likewise.
4025 (tdesc_s390x_linux64v2): Likewise.
4026 (init_registers_s390x_te_linux64): Likewise.
4027 (tdesc_s390x_te_linux64): Likewise.
4028 (init_registers_s390x_vx_linux64): Likewise.
4029 (tdesc_s390x_vx_linux64): Likewise.
4030 (init_registers_s390x_tevx_linux64): Likewise.
4031 (tdesc_s390x_tevx_linux64): Likewise.
4032 (have_hwcap_s390_vx): New static variable.
4033 (s390_arch_setup): Fill have_hwcap_s390_vx.
4034 (s390_get_thread_area): New function.
4035 (s390_ft_entry_gpr_esa): New const.
4036 (s390_ft_entry_gpr_zarch): New const.
4037 (s390_ft_entry_misc): New const.
4038 (s390_ft_entry_fr): New const.
4039 (s390_ft_entry_vr): New const.
4040 (s390_ft_main_31): New const.
4041 (s390_ft_main_64): New const.
4042 (s390_ft_exit_fr): New const.
4043 (s390_ft_exit_vr): New const.
4044 (s390_ft_exit_misc): New const.
4045 (s390_ft_exit_gpr_esa): New const.
4046 (s390_ft_exit_gpr_zarch): New const.
4047 (append_insns): New function.
4048 (s390_relocate_instruction): New function.
4049 (s390_install_fast_tracepoint_jump_pad): New function.
4050 (s390_get_min_fast_tracepoint_insn_len): New function.
4051 (s390_get_ipa_tdesc_idx): New function.
4052 (struct linux_target_ops): Wire in the above functions.
4053 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4054 * linux-s390-tdesc.h: New file.
4055
a4105d04
MK
40562016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4057
4058 * linux-s390-low.c (s390_supports_tracepoints): New function.
4059 (struct linux_target_ops): Fill supports_tracepoints hook.
4060
35ac8b3e
YQ
40612016-03-18 Yao Qi <yao.qi@linaro.org>
4062
4063 * linux-low.c (lwp_signal_can_be_delivered): New function.
4064 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4065
94610ec4
YQ
40662016-03-18 Yao Qi <yao.qi@linaro.org>
4067
4068 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4069 0 if signal is enqueued. Remove 'signal' from one debugging
4070 message. Move one debugging message to some lines below.
4071 Remove code setting 'signal' to 0.
4072
80aea927
YQ
40732016-03-18 Yao Qi <yao.qi@linaro.org>
4074
4075 * linux-low.c (linux_low_filter_event): Remove redundant
4076 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4077
b04fd3be
MK
40782016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4079
4080 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4081 (struct linux_target_ops): Wire in the above.
4082
c40c8d4b
YQ
40832016-03-03 Yao Qi <yao.qi@linaro.org>
4084
4085 * linux-low.c: Update comments to start_step_over.
4086
0f8288ae
YQ
40872016-03-03 Yao Qi <yao.qi@linaro.org>
4088
4089 PR server/19736
4090 * linux-low.c (handle_extended_wait): Set child suspended
4091 if event_lwp->bp_reinsert isn't zero.
4092
fdbd04a8
YQ
40932016-03-02 Yao Qi <yao.qi@linaro.org>
4094
4095 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4096 enqueue_pending_signal.
4097
6896a8fa
MK
40982016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4099
4100 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4101 is actually loaded.
4102
ab503087
MK
41032016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4104
4105 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4106 (s390_regmap_3264) [!__s390x__]: New global.
4107 (s390_collect_ptrace_register): Skip map entries containing -1.
4108 (s390_supply_ptrace_register): Ditto.
4109 (s390_fill_gprs_high): New function.
4110 (s390_store_gprs_high): New function.
4111 (s390_regsets): Add NT_S390_HIGH_GPRS.
4112 (s390_get_hwcap): Enable on 31-bit.
4113 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4114 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4115 Detect NT_S390_HIGH_GPRS.
4116 (s390_usrregs_info_3264): Enable on 31-bit.
4117 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4118 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4119
ae91f625
MK
41202016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4121
4122 PR gdb/13808
4123 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4124 * configure.srv: Ditto.
4125 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4126 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4127 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4128 (init_registers_amd64_linux): Remove prototype.
4129 (tdesc_amd64_linux): Remove declaration.
4130 (get_ipa_tdesc): New function.
4131 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4132 initialize remaining tdescs.
4133 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4134 (init_registers_i386_linux): Remove prototype.
4135 (tdesc_i386_linux): Remove declaration.
4136 (get_ipa_tdesc): New function.
4137 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4138 initialize remaining tdescs.
4139 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4140 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4141 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4142 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4143 (x86_get_ipa_tdesc_idx): New function.
4144 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4145 * linux-x86-tdesc.h: New file.
4146 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4147 (target_get_ipa_tdesc_idx): New macro.
4148 * tracepoint.c (ipa_tdesc_idx): New macro.
4149 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4150 (symbol_list): Add ipa_tdesc_idx.
4151 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4152 (ipa_tdesc): Remove.
4153 (ipa_tdesc_idx): New variable.
4154 (get_context_regcache): Use get_ipa_tdesc.
4155 (gdb_collect): Ditto.
4156 (gdb_probe): Ditto.
4157 * tracepoint.h (get_ipa_tdesc): New prototype.
4158 (ipa_tdesc): Remove.
4159
e7ad2f14
PA
41602016-02-24 Pedro Alves <palves@redhat.com>
4161
4162 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4163 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4164 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4165 Factor out common code between the USE_SIGTRAP_SIGINFO and
4166 !USE_SIGTRAP_SIGINFO blocks.
4167 (linux_low_filter_event): Call save_stop_reason instead of
4168 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4169 Update comments.
4170 (linux_wait_1): Update comments.
4171
657f9cde
WW
41722016-02-24 Wei-cheng Wang <cole945@gmail.com>
4173
4174 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4175 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4176 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4177 ppc_insert_point, ppc_remove_point.
4178
b00b61e1
MK
41792016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4180
4181 * linux-s390-low.c (s390_supports_z_point_type): New function.
4182 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4183
553cb527
YQ
41842016-02-16 Yao Qi <yao.qi@linaro.org>
4185
4186 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4187 PC. Get pc from regcache_read_pc.
4188
a5652c21
YQ
41892016-02-12 Yao Qi <yao.qi@linaro.org>
4190
4191 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4192 or linux_get_pc_32bit.
4193 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4194
ed443b61
YQ
41952016-02-12 Yao Qi <yao.qi@linaro.org>
4196
4197 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4198 arm_linux_get_next_pcs_fixup.
4199
020ecd38
MK
42002016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4201
4202 * tracepoint.c (x_tracepoint_action_download): Change
4203 write_inferior_data_ptr to write_inferior_data_pointer.
4204 (cmd_qtstart): Likewise.
4205 (write_inferior_data_ptr): Remove.
4206 (download_agent_expr): Change write_inferior_data_ptr to
4207 write_inferior_data_pointer.
4208 (download_tracepoint_1): Likewise.
4209 (download_tracepoint): Likewise.
4210 (download_trace_state_variables): Likewise.
4211
7cae9051
WW
42122016-02-11 Wei-cheng Wang <cole945@gmail.com>
4213 Marcin Kościelnicki <koriakin@0x04.net>
4214
4215 * tracepoint.c (struct tracepoint_action_ops): Remove.
4216 (struct tracepoint_action): Remove ops.
4217 (m_tracepoint_action_download, r_tracepoint_action_download)
4218 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4219 size and offset accordingly.
4220 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4221 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4222 (tracepoint_action_send, tracepoint_action_download): New functions.
4223 Helpers for trace action handlers.
4224 (add_tracepoint_action): Remove setup actions ops.
4225 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4226
9f6a71b4
YQ
42272016-02-10 Yao Qi <yao.qi@linaro.org>
4228
4229 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4230
1e94266c
SM
42312016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4232
4233 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4234 to AC_OUTPUT.
4235 * configure: Regenerate.
4236
8adce034
SM
42372016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4238
4239 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4240 void * to gdb_byte *.
4241 * linux-low.c (siginfo_fixup): Likewise.
4242 (linux_xfer_siginfo): Likewise.
4243 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4244 Likewise.
4245 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4246
93813b37
WT
42472016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4248
4249 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4250 to srv_tgtobj.
4251 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4252 to srv_tgtobj.
4253 * linux-x86-low.c [__x86_64__]: Include
4254 "nat/amd64-linux-siginfo.h".
4255 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4256 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4257 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4258 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4259 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4260 (cpt_si_fd, si_timerid, si_overrun): Move from
4261 nat/amd64-linux-siginfo.c.
4262 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4263
8424cc97
SM
42642016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4265
4266 * server.c (skip_to_semicolon): Remove.
4267 (process_point_options): Use strchrnul instead of
4268 skip_to_semicolon.
4269
4d18591b
YQ
42702016-01-26 Yao Qi <yao.qi@linaro.org>
4271
4272 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4273 * linux-low.c (install_software_single_step_breakpoints): Don't
4274 call regcache_read_pc.
4275 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4276 argument pc.
4277
d8020970
YQ
42782016-01-26 Yao Qi <yao.qi@linaro.org>
4279
4280 * linux-low.c (install_software_single_step_breakpoints): Call
4281 regcache_read_pc instead of get_pc.
4282
8b207339
YQ
42832016-01-26 Yao Qi <yao.qi@linaro.org>
4284
4285 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4286 (unblock_async_io): Rename to ...
4287 (block_unblock_async_io): ... it. New function.
4288 (enable_async_io): Don't install SIGIO handler. Unblock it
4289 instead.
4290 (disable_async_io): Don't ignore SIGIO. Block it instead.
4291 (initialize_async_io): Install SIGIO handler. Don't call
4292 unblock_async_io.
4293
18879fef
YQ
42942016-01-26 Yao Qi <yao.qi@linaro.org>
4295
4296 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4297 first character is '\003', call *the_target->request_interrupt.
4298
a0f8e08a
YQ
42992016-01-25 Yao Qi <yao.qi@linaro.org>
4300
4301 * remote-utils.c (new_thread_notify): Remove.
4302 (dead_thread_notify): Likewise.
4303 * remote-utils.h (new_thread_notify): Remove declaration.
4304 (dead_thread_notify): Likewise.
4305
cc5fd9ab
MK
43062016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4307
4308 * gdb.trace/pending.exp: Fix expected message on continue.
4309
99e8eb11
MK
43102016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4311
4312 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4313 it works properly on big-endian machines where sizeof (CORE_ADDR)
4314 != sizeof (void *).
4315
a994041d
PA
43162016-01-21 Pedro Alves <palves@redhat.com>
4317
4318 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4319 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4320 * configure: Regenerate.
4321
f7a6a40d
YQ
43222016-01-21 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4325 is_thumb and set it according to CPSR saved on the stack.
4326 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4327 arm_sigreturn_next_pc.
4328
6f69e520
YQ
43292016-01-18 Yao Qi <yao.qi@linaro.org>
4330
4331 * linux-low.c (linux_set_pc_64bit): New function.
4332 (linux_get_pc_64bit): New function.
4333 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4334 Declare.
4335 * linux-sparc-low.c (debug_threads): Remove declaration.
4336 (sparc_get_pc): Remove.
4337 (the_low_target): Use linux_get_pc_64bit instead of
4338 sparc_get_pc.
4339 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4340 (the_low_target): Use linux_get_pc_64bit and
4341 linux_set_pc_64bit.
4342
276d4552
YQ
43432016-01-18 Yao Qi <yao.qi@linaro.org>
4344
4345 * linux-arm-low.c (debug_threads): Remove declaration.
4346 (arm_get_pc, arm_set_pc): Remove.
4347 (the_low_target): Use linux_get_pc_32bit and
4348 linux_set_pc_32bit.
4349 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4350 (the_low_target): Use linux_get_pc_32bit and
4351 linux_set_pc_32bit.
4352 * linux-cris-low.c (debug_threads): Remove declaration.
4353 (cris_get_pc, cris_set_pc,): Remove.
4354 (the_low_target): Use linux_get_pc_32bit and
4355 linux_set_pc_32bit.
4356 * linux-crisv32-low.c (debug_threads): Remove declaration.
4357 (cris_get_pc, cris_set_pc): Remove.
4358 (the_low_target): Use linux_get_pc_32bit and
4359 linux_set_pc_32bit.
4360 * linux-low.c: Include inttypes.h.
4361 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4362 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4363 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4364 (the_low_target): Use linux_get_pc_32bit and
4365 linux_set_pc_32bit.
4366 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4367 (the_low_target): Use linux_get_pc_32bit and
4368 linux_set_pc_32bit.
4369 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4370 (the_low_target): Use linux_get_pc_32bit and
4371 linux_set_pc_32bit.
4372 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4373 (the_low_target): Use linux_get_pc_32bit and
4374 linux_set_pc_32bit.
4375 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4376 (the_low_target): Use linux_get_pc_32bit and
4377 linux_set_pc_32bit.
4378
eb0edac8
GB
43792016-01-18 Gary Benson <gbenson@redhat.com>
4380
4381 * configure.ac (AC_FUNC_FORK): New check.
4382 * config.in: Regenerate.
4383 * configure: Likewise.
4384
1b451dda
YQ
43852016-01-14 Yao Qi <yao.qi@linaro.org>
4386
4387 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4388 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4389 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4390 arm_get_next_pcs_ctor.
4391
82075af2
JS
43922016-01-12 Josh Stone <jistone@redhat.com>
4393 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4394
4395 * inferiors.h: Include "gdb_vecs.h".
4396 (struct process_info): Add syscalls_to_catch.
4397 * inferiors.c (remove_process): Free syscalls_to_catch.
4398 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4399 syscall_return stops.
4400 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4401 * server.c (handle_general_set): Handle QCatchSyscalls.
4402 (handle_query): Report support for QCatchSyscalls.
4403 * target.h (struct target_ops): Add supports_catch_syscall.
4404 (target_supports_catch_syscall): New macro.
4405 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4406 (struct lwp_info): Add syscall_state.
4407 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4408 Maintain syscall_state and syscalls_to_catch across exec.
4409 (get_syscall_trapinfo): New function, proxy to the_low_target.
4410 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4411 (linux_low_filter_event): Toggle syscall_state entry/return for
4412 syscall traps, and set it ignored for all others.
4413 (gdb_catching_syscalls_p): New function.
4414 (gdb_catch_this_syscall_p): New function.
4415 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4416 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4417 (linux_supports_catch_syscall): New function.
4418 (linux_target_ops): Install it.
4419 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4420 (the_low_target): Install it.
4421
8f13a3ce
MF
44222016-01-12 Mike Frysinger <vapier@gentoo.org>
4423
4424 * acinclude.m4: Include new ../warning.m4 file.
4425 * configure: Regenerated.
4426 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4427
5b3da067
MF
44282016-01-12 Mike Frysinger <vapier@gentoo.org>
4429
4430 * ax.c (is_goto_target): Mark static.
4431 * linux-low.c (register_addr): Likewise.
4432 (linux_fetch_registers, linux_store_registers): Likewise.
4433 * mem-break.c (any_persistent_commands): Fix old prototype.
4434 (add_commands_to_breakpoint): Mark static.
4435 * regcache.c (find_register_by_name): Delete unused func.
4436 * remote-utils.c (hex_or_minus_one): Mark static.
4437 * server.c (monitor_show_help): Mark static.
4438 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4439 handle_v_requests): Likewise.
4440
bc504a31
PA
44412016-01-12 Pedro Alves <palves@redhat.com>
4442
4443 Remove use of the registered trademark symbol throughout.
4444
5a0dd67a
YQ
44452016-01-08 Yao Qi <yao.qi@linaro.org>
4446
4447 * remote-utils.c (getpkt): If c is '\003', call target hook
4448 request_interrupt.
4449
b2ca446f
YQ
44502016-01-06 Yao Qi <yao.qi@linaro.org>
4451
4452 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4453 linux-aarch32-low.c.
4454 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4455 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4456 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4457 (thumb2_breakpoint): Declare.
4458 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4459 linux-aarch32-low.h.
4460 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4461 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4462 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4463
edd88788
JB
44642016-01-01 Joel Brobecker <brobecker@adacore.com>
4465
4466 * gdbreplay.c (gdbreplay_version): Change copyright year in
4467 version message.
4468 * server.c (gdbserver_version): Likewise.
4469
65da7f14
PP
44702015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4471
4472 * server.c (crc32_table): Delete.
4473 (crc32): Use libiberty's xcrc32 function.
4474
4abd5ed2
JB
44752015-12-22 Joel Brobecker <brobecker@adacore.com>
4476
4477 * lynx-low.c (lynx_delete_thread_callback): New function.
4478 (lynx_mourn): Properly delete our process and all of its
4479 threads. Remove call to clear_inferiors.
4480
0e50fe5c
JB
44812015-12-22 Joel Brobecker <brobecker@adacore.com>
4482
4483 * target.c (thread_search_callback): Add check that
4484 the thread_stopped target callback is not NULL before
4485 calling it.
4486
35adc03f
YQ
44872015-12-21 Yao Qi <yao.qi@linaro.org>
4488
4489 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4490 arm breakpoint.
4491
bd2b2909
AT
44922015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4493
4494 * server.c (handle_query): Call target_supports_software_single_step.
4495
7fe5e27e
AT
44962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4497
4498 * linux-low.c (single_step): New function.
4499 (linux_resume_one_lwp_throw): Call single_step.
4500 (start_step_over): Likewise.
4501
d9311bfa
AT
45022015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4503
4504 * Makefile.in (SFILES): Append arch/arm-linux.c,
4505 arch/arm-get-next-pcs.c.
4506 (arm-linux.o): New rule.
4507 (arm-get-next-pcs.o): New rule.
4508 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4509 arm-linux.o.
4510 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4511 to linux-aarch32-low.c.
4512 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4513 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4514 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4515 (thumb2_breakpoint_len): Likewise.
4516 (arm_is_thumb_mode): Make non-static.
4517 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4518 from linux-aarch32-low.c.
4519 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4520 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4521 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4522 (thumb2_breakpoint_len): Likewise.
4523 (arm_is_thumb_mode): New declaration.
4524 * linux-arm-low.c: Include arch/arm-linux.h
4525 aarch/arm-get-next-pcs.h, sys/syscall.h.
4526 (get_next_pcs_ops): New struct.
4527 (get_next_pcs_addr_bits_remove): New function.
4528 (get_next_pcs_is_thumb): New function.
4529 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4530 (arm_sigreturn_next_pc): Likewise.
4531 (get_next_pcs_syscall_next_pc): Likewise.
4532 (arm_gdbserver_get_next_pcs): Likewise.
4533 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4534 Initialize.
4535 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4536 * server.h: Include gdb_vecs.h.
4537
68ce2059
AT
45382015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4539
4540 * Makefile.in (SFILES): Append common/common-regcache.c.
4541 (OBS): Append common-regcache.o.
4542 (common-regcache.o): New rule.
4543 * regcache.c (init_register_cache): Initialize cache to
4544 REG_UNAVAILABLE.
4545 (regcache_raw_read_unsigned): New function.
4546 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4547 register_status enum.
4548
fa5308bd
AT
45492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4550
4551 * linux-aarch64-low.c (the_low_targets): Rename
4552 breakpoint_reinsert_addr to get_next_pcs.
4553 * linux-arm-low.c (the_low_targets): Likewise.
4554 * linux-bfin-low.c (the_low_targets): Likewise.
4555 * linux-cris-low.c (the_low_targets): Likewise.
4556 * linux-crisv32-low.c (the_low_targets): Likewise.
4557 * linux-low.c (can_software_single_step): Likewise.
4558 (install_software_single_step_breakpoints): New function.
4559 (start_step_over): Use install_software_single_step_breakpoints.
4560 * linux-low.h: New CORE_ADDR vector.
4561 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4562 get_next_pcs.
4563 * linux-mips-low.c (the_low_targets): Likewise.
4564 * linux-nios2-low.c (the_low_targets): Likewise.
4565 * linux-sparc-low.c (the_low_targets): Likewise.
4566
4a6ed09b
PA
45672015-12-17 Pedro Alves <palves@redhat.com>
4568
4569 * linux-low.c (linux_kill_one_lwp): Remove references to
4570 LinuxThreads.
4571 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4572 to 'kill'.
4573 (linux_init_signals): Delete.
4574 (initialize_low): Adjust.
4575 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4576
7544db95
PA
45772015-12-16 Pedro Alves <palves@redhat.com>
4578
4579 * configure.ac (compiler warning flags): When testing a
4580 -Wno-foo option, check whether -Wfoo works instead.
4581 * configure: Regenerate.
4582
8020350c
DB
45832015-12-11 Don Breazeal <donb@codesourcery.com>
4584
4585 * server.c (process_serial_event): Don't exit from gdbserver
4586 in remote mode if there are still active inferiors.
4587
db91f502
YQ
45882015-12-11 Yao Qi <yao.qi@linaro.org>
4589
4590 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4591 arm_breakpoint_at if the process is 32-bit.
4592
b37a6290
YQ
45932015-12-11 Yao Qi <yao.qi@linaro.org>
4594
4595 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4596 arm breakpoint.
4597
17b1509a
YQ
45982015-12-07 Yao Qi <yao.qi@linaro.org>
4599
4600 * configure.srv: Append arm.o to srv_tgtobj for
4601 aarch64*-*-linux* target.
4602 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4603 from linux-arm-low.c.
4604 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4605 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4606 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4607 (thumb2_breakpoint_len): Likewise.
4608 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4609 (arm_breakpoint_kinds): Likewise.
4610 (arm_breakpoint_kind_from_pc): Likewise.
4611 (arm_sw_breakpoint_from_kind): Likewise.
4612 (arm_breakpoint_kind_from_current_state): Likewise.
4613 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4614 (arm_sw_breakpoint_from_kind): Declare.
4615 (arm_breakpoint_kind_from_current_state): Declare.
4616 (arm_breakpoint_at): Declare.
4617 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4618 arm_sw_breakpoint_from_kind if process is 32-bit.
4619 (aarch64_breakpoint_kind_from_pc): New function.
4620 (aarch64_breakpoint_kind_from_current_state): New function.
4621 (the_low_target): Initialize fields breakpoint_kind_from_pc
4622 and breakpoint_kind_from_current_state.
4623 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4624 linux-aarch32-low.c.
4625 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4626 (arm_breakpoint, arm_breakpoint_len): Likewise.
4627 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4628 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4629 (arm_is_thumb_mode): Likewise.
4630 (arm_breakpoint_at): Likewise.
4631 (arm_breakpoint_kind_from_pc): Likewise.
4632 (arm_sw_breakpoint_from_kind): Likewise.
4633 (arm_breakpoint_kind_from_current_state): Likewise.
4634
4635 Revert:
4636 2015-08-04 Yao Qi <yao.qi@linaro.org>
4637
4638 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4639 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4640 * server.c (extended_protocol): Remove "static".
4641 * server.h (extended_protocol): Declare it.
4642
ece66d65
JS
46432015-12-04 Josh Stone <jistone@redhat.com>
4644
4645 * target.h (struct target_ops) <arch_setup>: Rename to ...
4646 (struct target_ops) <post_create_inferior>: ... this.
4647 (target_arch_setup): Rename to ...
4648 (target_post_create_inferior): ... this, calling post_create_inferior.
4649 * server.c (start_inferior): Update target_arch_setup calls to
4650 target_post_create_inferior.
4651 * linux-low.c (linux_low_ptrace_options): Forward declare.
4652 (linux_arch_setup): Update its comment for general use.
4653 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4654 (struct linux_target_ops): Use linux_post_create_inferior.
4655 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4656 to post_create_inferior.
4657 * nto-low.c (struct nto_target_ops): Likewise.
4658 * spu-low.c (struct spu_target_ops): Likewise.
4659 * win32-low.c (struct win32_target_ops): Likewise.
4660
e58c48b4
AT
46612015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4662
4663 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4664
fbec8956
AT
46652015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4666
4667 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4668 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4669 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4670 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4671 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4672 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4673 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4674 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4675 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4676 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4677 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4678 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4679
9b4c5f87
AT
46802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4681
4682 * linux-low.c (linux_look_up_symbols): Don't call
4683 linux_supports_traceclone.
4684 * linux-low.h (thread_db_init): Remove use_events argument.
4685 * thread-db.c (thread_db_use_event): Remove global variable.
4686 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4687 (struct thread_db) <td_create_bp>: Remove field.
4688 (thread_db_create_event): Remove function.
4689 (thread_db_enable_reporting): Likewise.
4690 (find_one_thread): Don't check for thread_db_use_events.
4691 (attach_thread): Likewise.
4692 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4693 (try_thread_db_load_1): Don't check for thread_db_use_events.
4694 (thread_db_init): Remove use_events argument and thread events
4695 handling.
4696 (remove_thread_event_breakpoints): Remove function.
4697 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4698
7d00775e
AT
46992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4700
4701 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4702 New function.
4703 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4704 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4705 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4706 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4707 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4708 Initialize.
4709 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4710 New function.
4711 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4712 * linux-low.c (can_hardware_single_step): Use
4713 supports_hardware_single_step.
4714 (can_software_single_step): New function.
4715 (start_step_over): Call can_software_single_step.
4716 (linux_supports_hardware_single_step): New function.
4717 (struct target_ops) <supports_software_single_step>: Initialize.
4718 * linux-low.h (struct linux_target_ops)
4719 <supports_hardware_single_step>: Initialize.
4720 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4721 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4722 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4723 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4724 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4725 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4726 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4727 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4728 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4729 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4730 Initialize.
4731 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4732 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4733 Initialize.
4734 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4735 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4736 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4737 New function.
4738 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4739 * target.h (struct target_ops): <supports_software_single_step>:
4740 New field.
4741 (target_supports_software_single_step): New macro.
4742
2d97cd35
AT
47432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4744
4745 * linux-low.c (linux_wait_1): Fix pc advance condition.
4746 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4747 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4748
769ef81f
AT
47492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4750
4751 * linux-arm-low.c (arm_is_thumb_mode): New function.
4752 (arm_breakpoint_at): Use arm_is_thumb_mode.
4753 (arm_breakpoint_kind_from_current_state): New function.
4754 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4755 Initialize.
4756 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4757 (linux_breakpoint_kind_from_current_state): New function.
4758 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4759 * linux-low.h (struct linux_target_ops)
4760 <breakpoint_kind_from_current_state>: New field.
4761 * target.h (struct target_ops): Likewise.
4762 (target_breakpoint_kind_from_current_state): New macro.
4763
1bebeeca
PA
47642015-11-30 Pedro Alves <palves@redhat.com>
4765
4766 * linux-low.c (linux_resume): Wake up the event loop before
4767 returning.
4768
a67a9fae
PA
47692015-11-30 Pedro Alves <palves@redhat.com>
4770
4771 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4772 check.
4773 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4774 to -1.
4775 * target.c (struct thread_search): New structure.
4776 (thread_search_callback): New function.
4777 (prev_general_thread): New global.
4778 (prepare_to_access_memory, done_accessing_memory): New functions.
4779 * target.h (prepare_to_access_memory, done_accessing_memory):
4780 Replace macros with function declarations.
4781
f2faf941
PA
47822015-11-30 Pedro Alves <palves@redhat.com>
4783
4784 PR 14618
4785 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4786 report TARGET_WAITKIND_NO_RESUMED.
4787 * remote-utils.c (prepare_resume_reply): Handle
4788 TARGET_WAITKIND_NO_RESUMED.
4789 * server.c (report_no_resumed): New global.
4790 (handle_query) <qSupported>: Handle "no-resumed+". Report
4791 "no-resumed+" support.
4792 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4793 return error if the client doesn't support no-resumed events.
4794 (push_stop_notification): New function.
4795 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4796 events if the client supports them.
4797
a681f9c9
PA
47982015-11-30 Pedro Alves <palves@redhat.com>
4799
4800 * linux-low.c (thread_still_has_status_pending_p): Don't check
4801 vCont;t here.
4802 (lwp_resumed): New function.
4803 (status_pending_p_callback): Return early if the LWP is not
4804 supposed to be resumed.
4805
65706a29
PA
48062015-11-30 Pedro Alves <palves@redhat.com>
4807
4808 * linux-low.c (handle_extended_wait): Assert that the LWP's
4809 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4810 thread create events, leave the new child's status pending.
4811 (linux_low_filter_event): If GDB wants to hear about thread exit
4812 events, leave the LWP marked dead and don't delete it.
4813 (linux_wait_for_event_filtered): Don't check for thread exit.
4814 (filter_exit_event): New function.
4815 (linux_wait_1): Use it, when returning an exit event.
4816 (linux_resume_one_lwp_throw): Assert that the LWP's
4817 waitstatus is TARGET_WAITKIND_IGNORE.
4818 * remote-utils.c (prepare_resume_reply): Handle
4819 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4820 * server.c (report_thread_events): New global.
4821 (handle_general_set): Handle QThreadEvents.
4822 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4823 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4824 TARGET_WAITKIND_THREAD_EXITED.
4825 * server.h (report_thread_events): Declare.
4826
56cf4bed
PA
48272015-11-30 Pedro Alves <palves@redhat.com>
4828
4829 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4830 the thread's last_resume_kind was resume_stop.
4831
500c1d85
PA
48322015-11-30 Pedro Alves <palves@redhat.com>
4833
4834 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4835 before returning.
4836
de979965
PA
48372015-11-30 Pedro Alves <palves@redhat.com>
4838
4839 * server.c (handle_v_requests): Handle vCtrlC.
4840
34c65914
PA
48412015-11-30 Pedro Alves <palves@redhat.com>
4842
4843 * gdbthread.h (find_any_thread_of_pid): Declare.
4844 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4845 functions.
4846 * server.c (handle_query): If current_thread is NULL, look for
4847 another thread of the selected process.
4848
79efa585 48492015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4850 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4851
4852 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4853 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4854 name in reply.
4855 * target.h (struct target_ops) <thread_name>: New field.
4856 (target_thread_name): New macro.
4857
80d82c19
JB
48582015-11-23 Joel Brobecker <brobecker@adacore.com>
4859
4860 * regcache.h (regcache_invalidate_pid): Add declaration.
4861 * regcache.c (regcache_invalidate_pid): New function, extracted
4862 from regcache_invalidate.
4863 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4864 Add trivial documentation comment.
4865 * lynx-low.c: Use regcache_invalidate_pid instead of
4866 regcache_invalidate.
4867
64da5dd5
JB
48682015-11-23 Joel Brobecker <brobecker@adacore.com>
4869
4870 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4871 and Elf64_auxv_t if the target is Android.
4872
37ce4055
DE
48732015-11-22 Doug Evans <xdje42@gmail.com>
4874
4875 * target.h: #include <sys/types.h>.
4876
06e03fff
PA
48772015-11-19 Pedro Alves <palves@redhat.com>
4878
4879 * linux-low.c (linux_process_qsupported): Change prototype.
4880 Adjust.
4881 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4882 Change prototype.
4883 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4884 and adjust to loop over all features.
4885 * server.c (handle_query) <qSupported>: Adjust to call
4886 target_process_qsupported once, passing it a vector of unprocessed
4887 features.
4888 * target.h (struct target_ops) <process_qsupported>: Change
4889 prototype.
4890 (target_process_qsupported): Adjust.
4891
9a084706
PA
48922015-11-19 Pedro Alves <palves@redhat.com>
4893
4894 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4895 mode.
4896 * configure: Regenerate.
4897
dad44a1f
PA
48982015-11-19 Pedro Alves <palves@redhat.com>
4899
4900 * configure: Regenerate.
4901
231c0592
YQ
49022015-11-19 Yao Qi <yao.qi@linaro.org>
4903
4904 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4905 type to uint32_t.
4906
6c1c9a8b
YQ
49072015-11-19 Yao Qi <yao.qi@linaro.org>
4908
4909 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4910 (struct aarch64_operand): Move enum out.
4911
9caa3311
YQ
49122015-11-19 Yao Qi <yao.qi@linaro.org>
4913
4914 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4915 struct user_fpsimd_state *.
4916 (aarch64_store_fpregset): Likewise.
4917
6a69a054
YQ
49182015-11-19 Yao Qi <yao.qi@linaro.org>
4919
4920 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4921 struct user_pt_regs *.
4922 (aarch64_store_gregset): Likewise.
4923
1798301e
PA
49242015-11-18 Pedro Alves <palves@redhat.com>
4925
4926 * Makefile.in (all_object_files): Add $IPA_OBJS.
4927
ce7715e2
PA
49282015-11-17 Pedro Alves <palves@redhat.com>
4929
4930 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4931 GDB_SIGNAL_0 and gdb_signal_to_string.
4932
c0879059
PA
49332015-11-17 Pedro Alves <palves@redhat.com>
4934
4935 * win32-low.c (handle_output_debug_string): Remove parameter.
4936 (win32_kill): Remove our_status local and adjust call to
4937 handle_output_debug_string.
4938 (get_child_debug_event): Adjust call to
4939 handle_output_debug_string.
4940
1996e237
SM
49412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4942
4943 * linux-mips-low.c (mips_fill_gregset): Add cast.
4944 (mips_store_gregset): Likewise.
4945 (mips_fill_fpregset): Likewise.
4946 (mips_store_fpregset): Likewise.
4947
cbec665b
SM
49482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4949
4950 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4951 priv.
4952
eb3e3c67
SM
49532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4954
4955 * linux-mips-low.c (mips_linux_new_thread): Change type of
4956 watch_type to enum target_hw_bp_type.
4957
171de4b8
SM
49582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4959
4960 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4961 Change return type to arm_hwbp_type.
4962
04248ead
SM
49632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4964
4965 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4966 (arm_store_gregset): Likewise.
4967 * linux-arm-low.c (arm_get_hwcap): Likewise.
4968 (arm_read_description): Likewise.
4969
04b3479c
SM
49702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4971
4972 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4973
2bc84e8a
SM
49742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4975
4976 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4977 (ppc_fill_vsxregset): Likewise.
4978 (ppc_store_vsxregset): Likewise.
4979 (ppc_fill_vrregset): Likewise.
4980 (ppc_store_vrregset): Likewise.
4981 (ppc_fill_evrregset): Likewise.
4982 (ppc_store_evrregset): Likewise.
4983
e6c5bb05
SM
49842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4985
4986 * linux-ppc-low.c (ppc_usrregs_info): Remove
4987 forward-declaration.
4988 (ppc_arch_setup): Move lower in file.
4989
7ea45d72
SM
49902015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4991
4992 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4993 (ps_pdwrite): Likewise.
4994
69291610
HW
49952015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4996
4997 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4998 to after assert checks.
4999
b42945fd
SM
50002015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5001
5002 * proc-service.c (ps_pdread): Add/adjust casts.
5003 (ps_pdwrite): Add/adjust casts.
5004
d6f85c84
SM
50052015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5006
5007 * server.c (handle_search_memory_1): Cast return value of
5008 memmem.
5009
f98cd059
SM
50102015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5011
5012 * server.c (write_qxfer_response): Change type of data to
5013 gdb_byte *.
5014
d2412fa5
PA
50152015-10-29 Pedro Alves <palves@redhat.com>
5016
5017 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5018
c17414a2
PA
50192015-10-29 Pedro Alves <palves@redhat.com>
5020
5021 * tracepoint.c (clear_installed_tracepoints): Add casts.
5022
e053fbc4
PA
50232015-10-29 Pedro Alves <palves@redhat.com>
5024
5025 * server.c (handle_v_cont, process_serial_event): Add enum
5026 gdb_signal casts to signal parsing code.
5027
add67df8
PA
50282015-10-29 Pedro Alves <palves@redhat.com>
5029
5030 * linux-low.h (NULL_REGSET): Define.
5031 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5032 * linux-arm-low.c (arm_regsets): Likewise.
5033 * linux-crisv32-low.c (cris_regsets): Likewise.
5034 * linux-m68k-low.c (m68k_regsets): Likewise.
5035 * linux-mips-low.c (mips_regsets): Likewise.
5036 * linux-nios2-low.c (nios2_regsets): Likewise.
5037 * linux-ppc-low.c (ppc_regsets): Likewise.
5038 * linux-s390-low.c (s390_regsets): Likewise.
5039 * linux-sh-low.c (sh_regsets): Likewise.
5040 * linux-sparc-low.c (sparc_regsets): Likewise.
5041 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5042 * linux-tile-low.c (tile_regsets): Likewise.
5043 * linux-x86-low.c (x86_regsets): Likewise.
5044 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5045
50bc912a
PA
50462015-10-29 Pedro Alves <palves@redhat.com>
5047
5048 * linux-low.h (NULL_REGSET): Define.
5049 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5050 * linux-arm-low.c (arm_regsets): Likewise.
5051 * linux-crisv32-low.c (cris_regsets): Likewise.
5052 * linux-m68k-low.c (m68k_regsets): Likewise.
5053 * linux-mips-low.c (mips_regsets): Likewise.
5054 * linux-nios2-low.c (nios2_regsets): Likewise.
5055 * linux-ppc-low.c (ppc_regsets): Likewise.
5056 * linux-s390-low.c (s390_regsets): Likewise.
5057 * linux-sh-low.c (sh_regsets): Likewise.
5058 * linux-sparc-low.c (sparc_regsets): Likewise.
5059 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5060 * linux-tile-low.c (tile_regsets): Likewise.
5061 * linux-x86-low.c (x86_regsets): Likewise.
5062 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5063
682b2546
DE
50642015-10-26 Doug Evans <dje@google.com>
5065
5066 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5067
963843d4
DE
50682015-10-26 Doug Evans <dje@google.com>
5069
5070 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5071
d41401ac
DE
50722015-10-26 Doug Evans <dje@google.com>
5073
5074 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5075 for debug_printf.
5076 (attach_thread, find_new_threads_callback): Ditto.
5077
3db28855
AT
50782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5079
5080 * mem-break.h (set_breakpoint_data): Remove.
5081
fb78e89c
AT
50822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5083
5084 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5085 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5086 (initialize_low): Remove set_breakpoint_data call.
5087 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5088 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5089 (initialize_low): Remove set_breakpoint_data call.
5090 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5091 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5092 (initialize_low): Remove set_breakpoint_data call.
5093
2e6ee069
AT
50942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5095
5096 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5097 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5098 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5099 * target.h (target_breakpoint_kind_from_pc): New macro.
5100
1652a986
AT
51012015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5102
5103 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5104 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5105 the default breakpoint kind.
5106
abeead09
AT
51072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5108
5109 * linux-arm-low.c (arm_supports_z_point_type): Add software
5110 breakpoint support.
5111
b0b4b501
AT
51122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5113
5114 * linux-arm-low.c: Refactor breakpoint definitions.
5115 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5116 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5117
8689682c
AT
51182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5119
5120 * Makefile.in: Add arm.c/o.
5121 * configure.srv: Likewise.
5122 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5123 (arm_breakpoint_kind_from_pc): New function.
5124 (arm_sw_breakpoint_from_kind): Return proper kind.
5125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5126
27165294
AT
51272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5128
5129 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5130 removal.
5131 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5132 (struct raw_breakpoint) <size>: Remove.
5133 (struct raw_breakpoint) <kind>: Add.
5134 (bp_size): New function.
5135 (bp_opcode): Likewise.
5136 (find_raw_breakpoint_at): Adjust for kind.
5137 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5138 (remove_memory_breakpoint): Adjust for kind call bp_size.
5139 (set_raw_breakpoint_at): Adjust for kind.
5140 (set_breakpoint): Likewise.
5141 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5142 (delete_raw_breakpoint): Adjust for kind.
5143 (delete_breakpoint): Likewise.
5144 (find_gdb_breakpoint): Likewise.
5145 (set_gdb_breakpoint_1): Likewise.
5146 (set_gdb_breakpoint): Likewise.
5147 (delete_gdb_breakpoint_1): Likewise.
5148 (delete_gdb_breakpoint): Likewise.
5149 (uninsert_raw_breakpoint): Likewise.
5150 (reinsert_raw_breakpoint): Likewise.
5151 (set_breakpoint_data): Remove.
5152 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5153 (check_mem_read): Adjust for kind call bp_size.
5154 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5155 (clone_one_breakpoint): Adjust for kind.
5156 * mem-break.h (set_gdb_breakpoint): Likewise.
5157 (delete_gdb_breakpoint): Likewise.
5158 * server.c (process_serial_event): Likewise.
5159
dd373349
AT
51602015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5161
5162 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5163 (struct linux_target_ops) <breakpoint>: Remove.
5164 (struct linux_target_ops) <breakpoint_len>: Remove.
5165 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5166 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5167 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5168 (arm_sw_breakpoint_from_kind): New function.
5169 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5170 (struct linux_target_ops) <breakpoint>: Remove.
5171 (struct linux_target_ops) <breakpoint_len>: Remove.
5172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5174 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5175 (struct linux_target_ops) <breakpoint>: Remove.
5176 (struct linux_target_ops) <breakpoint_len>: Remove.
5177 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5178 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5179 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5180 (struct linux_target_ops) <breakpoint>: Remove.
5181 (struct linux_target_ops) <breakpoint_len>: Remove.
5182 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5183 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5184 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5185 and sw_breakpoint_from_kind to increment the pc.
5186 (linux_breakpoint_kind_from_pc): New function.
5187 (linux_sw_breakpoint_from_kind): New function.
5188 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5189 (initialize_low): Call breakpoint_kind_from_pc and
5190 sw_breakpoint_from_kind to replace breakpoint_data/len.
5191 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5192 New field.
5193 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5194 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5195 (struct linux_target_ops) <breakpoint>: Remove.
5196 (struct linux_target_ops) <breakpoint_len>: Remove.
5197 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5198 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5199 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5200 (struct linux_target_ops) <breakpoint>: Remove.
5201 (struct linux_target_ops) <breakpoint_len>: Remove.
5202 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5203 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5204 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5205 (struct linux_target_ops) <breakpoint>: Remove.
5206 (struct linux_target_ops) <breakpoint_len>: Remove.
5207 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5208 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5209 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5210 (struct linux_target_ops) <breakpoint>: Remove.
5211 (struct linux_target_ops) <breakpoint_len>: Remove.
5212 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5213 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5214 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5215 (struct linux_target_ops) <breakpoint>: Remove.
5216 (struct linux_target_ops) <breakpoint_len>: Remove.
5217 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5218 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5219 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5220 (struct linux_target_ops) <breakpoint>: Remove.
5221 (struct linux_target_ops) <breakpoint_len>: Remove.
5222 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5223 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5224 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5225 (struct linux_target_ops) <breakpoint>: Remove.
5226 (struct linux_target_ops) <breakpoint_len>: Remove.
5227 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5228 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5229 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5230 (struct linux_target_ops) <breakpoint>: Remove.
5231 (struct linux_target_ops) <breakpoint_len>: Remove.
5232 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5233 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5234 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5235 (struct linux_target_ops) <breakpoint>: Remove.
5236 (struct linux_target_ops) <breakpoint_len>: Remove.
5237 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5238 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5239 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5240 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5241 (struct linux_target_ops) <breakpoint>: Remove.
5242 (struct linux_target_ops) <breakpoint_len>: Remove.
5243 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5244 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5245 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5246 (struct linux_target_ops) <breakpoint>: Remove.
5247 (struct linux_target_ops) <breakpoint_len>: Remove.
5248 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5249 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5250
4cd98a19
AT
52512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5252
5253 * linux-cris-low.c (cris_get_pc): Remove void arg.
5254
774ee6d2
AR
52552015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5256
5257 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5258 variable name.
5259
833dcd29
AR
52602015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5261
5262 * inferiors.c (thread_pid_matches_callback): New function.
5263 (find_thread_process): New function.
5264 (remove_thread): Reset current_thread.
5265 (remove_process): Assert threads have been removed first.
5266
8d689ee5
YQ
52672015-10-15 Yao Qi <yao.qi@linaro.org>
5268
5269 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5270 if it is 3.
5271 (aarch64_remove_point): Likewise.
5272 * regcache.c (regcache_register_size): New function.
5273
1c2e1515
YQ
52742015-10-12 Yao Qi <yao.qi@linaro.org>
5275
5276 * linux-aarch64-low.c: Update all callers as emit_load_store
5277 is renamed to aarch64_emit_load_store.
5278
e1c587c3
YQ
52792015-10-12 Yao Qi <yao.qi@linaro.org>
5280
5281 * linux-aarch64-low.c: Update all callers of function renaming
5282 from emit_insn to aarch64_emit_insn.
5283
b6542f81
YQ
52842015-10-12 Yao Qi <yao.qi@linaro.org>
5285
5286 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5287 arch/aarch64-insn.h.
5288 (struct aarch64_memory_operand): Likewise.
5289 (ENCODE): Likewise.
5290 (emit_insn): Move to arch/aarch64-insn.c.
5291 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5292 (emit_load_store): Move to arch/aarch64-insn.c.
5293 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5294 (can_encode_int32): Remove.
5295
246994ce
YQ
52962015-10-12 Yao Qi <yao.qi@linaro.org>
5297
5298 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5299 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5300 (aarch64_relocate_instruction): Likewise.
5301 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5302 (struct aarch64_insn_visitor): Likewise.
5303
0badd99f
YQ
53042015-10-12 Yao Qi <yao.qi@linaro.org>
5305
5306 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5307 (struct aarch64_insn_visitor): New.
5308 (struct aarch64_insn_relocation_data): New.
5309 (aarch64_ftrace_insn_reloc_b): New function.
5310 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5311 (aarch64_ftrace_insn_reloc_cb): Likewise.
5312 (aarch64_ftrace_insn_reloc_tb): Likewise.
5313 (aarch64_ftrace_insn_reloc_adr): Likewise.
5314 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5315 (aarch64_ftrace_insn_reloc_others): Likewise.
5316 (visitor): New.
5317 (aarch64_relocate_instruction): Use visitor.
5318
dfaffe9d
YQ
53192015-10-12 Yao Qi <yao.qi@linaro.org>
5320
5321 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5322 int. Add argument buf.
5323 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5324 aarch64_relocate_instruction.
5325
70b439f0
YQ
53262015-10-12 Yao Qi <yao.qi@linaro.org>
5327
5328 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5329 argument insn. Remove local variable insn. Don't call
5330 target_read_uint32.
5331 (aarch64_install_fast_tracepoint_jump_pad): Call
5332 target_read_uint32.
5333
7781c06f
YQ
53342015-09-30 Yao Qi <yao.qi@linaro.org>
5335
5336 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5337 (emit_load_store_pair): Likewise.
5338
9a3c8263
SM
53392015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5340
5341 * dll.c (match_dll): Add cast(s).
5342 (unloaded_dll): Likewise.
5343 * linux-low.c (second_thread_of_pid_p): Likewise.
5344 (delete_lwp_callback): Likewise.
5345 (count_events_callback): Likewise.
5346 (select_event_lwp_callback): Likewise.
5347 (linux_set_resume_request): Likewise.
5348 * server.c (accumulate_file_name_length): Likewise.
5349 (emit_dll_description): Likewise.
5350 (handle_qxfer_threads_worker): Likewise.
5351 (visit_actioned_threads): Likewise.
5352 * thread-db.c (any_thread_of): Likewise.
5353 * tracepoint.c (same_process_p): Likewise.
5354 (match_blocktype): Likewise.
5355 (build_traceframe_info_xml): Likewise.
5356
224c3ddb
SM
53572015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5358
5359 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5360 assignment.
5361 (gdb_unparse_agent_expr): Likewise.
5362 * hostio.c (require_data): Likewise.
5363 (handle_pread): Likewise.
5364 * linux-low.c (disable_regset): Likewise.
5365 (fetch_register): Likewise.
5366 (store_register): Likewise.
5367 (get_dynamic): Likewise.
5368 (linux_qxfer_libraries_svr4): Likewise.
5369 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5370 (set_fast_tracepoint_jump): Likewise.
5371 (uninsert_fast_tracepoint_jumps_at): Likewise.
5372 (reinsert_fast_tracepoint_jumps_at): Likewise.
5373 (validate_inserted_breakpoint): Likewise.
5374 (clone_agent_expr): Likewise.
5375 * regcache.c (init_register_cache): Likewise.
5376 * remote-utils.c (putpkt_binary_1): Likewise.
5377 (decode_M_packet): Likewise.
5378 (decode_X_packet): Likewise.
5379 (look_up_one_symbol): Likewise.
5380 (relocate_instruction): Likewise.
5381 (monitor_output): Likewise.
5382 * server.c (handle_search_memory): Likewise.
5383 (handle_qxfer_exec_file): Likewise.
5384 (handle_qxfer_libraries): Likewise.
5385 (handle_qxfer): Likewise.
5386 (handle_query): Likewise.
5387 (handle_v_cont): Likewise.
5388 (handle_v_run): Likewise.
5389 (captured_main): Likewise.
5390 * target.c (write_inferior_memory): Likewise.
5391 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5392 * tracepoint.c (init_trace_buffer): Likewise.
5393 (add_tracepoint_action): Likewise.
5394 (add_traceframe): Likewise.
5395 (add_traceframe_block): Likewise.
5396 (cmd_qtdpsrc): Likewise.
5397 (cmd_qtdv): Likewise.
5398 (cmd_qtstatus): Likewise.
5399 (response_source): Likewise.
5400 (response_tsv): Likewise.
5401 (cmd_qtnotes): Likewise.
5402 (gdb_collect): Likewise.
5403 (initialize_tracepoint): Likewise.
5404
afbe19f8
PL
54052015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5406
5407 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5408 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5409 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5410 <NOP>: New.
5411 (enum aarch64_condition_codes): New enum.
5412 (w0): New static global.
5413 (fp): Likewise.
5414 (lr): Likewise.
5415 (struct aarch64_memory_operand) <type>: New
5416 MEMORY_OPERAND_POSTINDEX type.
5417 (postindex_memory_operand): New helper function.
5418 (emit_ret): New function.
5419 (emit_load_store_pair): New function, factored out of emit_stp
5420 with support for MEMORY_OPERAND_POSTINDEX.
5421 (emit_stp): Rewrite using emit_load_store_pair.
5422 (emit_ldp): New function.
5423 (emit_load_store): Likewise.
5424 (emit_ldr): Mention post-index instruction in comment.
5425 (emit_ldrh): New function.
5426 (emit_ldrb): New function.
5427 (emit_ldrsw): Mention post-index instruction in comment.
5428 (emit_str): Likewise.
5429 (emit_subs): New function.
5430 (emit_cmp): Likewise.
5431 (emit_and): Likewise.
5432 (emit_orr): Likewise.
5433 (emit_orn): Likewise.
5434 (emit_eor): Likewise.
5435 (emit_mvn): Likewise.
5436 (emit_lslv): Likewise.
5437 (emit_lsrv): Likewise.
5438 (emit_asrv): Likewise.
5439 (emit_mul): Likewise.
5440 (emit_sbfm): Likewise.
5441 (emit_sbfx): Likewise.
5442 (emit_ubfm): Likewise.
5443 (emit_ubfx): Likewise.
5444 (emit_csinc): Likewise.
5445 (emit_cset): Likewise.
5446 (emit_nop): Likewise.
5447 (emit_ops_insns): New helper function.
5448 (emit_pop): Likewise.
5449 (emit_push): Likewise.
5450 (aarch64_emit_prologue): New function.
5451 (aarch64_emit_epilogue): Likewise.
5452 (aarch64_emit_add): Likewise.
5453 (aarch64_emit_sub): Likewise.
5454 (aarch64_emit_mul): Likewise.
5455 (aarch64_emit_lsh): Likewise.
5456 (aarch64_emit_rsh_signed): Likewise.
5457 (aarch64_emit_rsh_unsigned): Likewise.
5458 (aarch64_emit_ext): Likewise.
5459 (aarch64_emit_log_not): Likewise.
5460 (aarch64_emit_bit_and): Likewise.
5461 (aarch64_emit_bit_or): Likewise.
5462 (aarch64_emit_bit_xor): Likewise.
5463 (aarch64_emit_bit_not): Likewise.
5464 (aarch64_emit_equal): Likewise.
5465 (aarch64_emit_less_signed): Likewise.
5466 (aarch64_emit_less_unsigned): Likewise.
5467 (aarch64_emit_ref): Likewise.
5468 (aarch64_emit_if_goto): Likewise.
5469 (aarch64_emit_goto): Likewise.
5470 (aarch64_write_goto_address): Likewise.
5471 (aarch64_emit_const): Likewise.
5472 (aarch64_emit_call): Likewise.
5473 (aarch64_emit_reg): Likewise.
5474 (aarch64_emit_pop): Likewise.
5475 (aarch64_emit_stack_flush): Likewise.
5476 (aarch64_emit_zero_ext): Likewise.
5477 (aarch64_emit_swap): Likewise.
5478 (aarch64_emit_stack_adjust): Likewise.
5479 (aarch64_emit_int_call_1): Likewise.
5480 (aarch64_emit_void_call_2): Likewise.
5481 (aarch64_emit_eq_goto): Likewise.
5482 (aarch64_emit_ne_goto): Likewise.
5483 (aarch64_emit_lt_goto): Likewise.
5484 (aarch64_emit_le_goto): Likewise.
5485 (aarch64_emit_gt_goto): Likewise.
5486 (aarch64_emit_ge_got): Likewise.
5487 (aarch64_emit_ops_impl): New static global variable.
5488 (aarch64_emit_ops): New target function, return
5489 &aarch64_emit_ops_impl.
5490 (struct linux_target_ops): Install it.
5491
bb903df0
PL
54922015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5493
5494 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5495 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5496 aarch64-ipa.o.
5497 * linux-aarch64-ipa.c: New file.
5498 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5499 and endian.h.
5500 (aarch64_get_thread_area): New target method.
5501 (extract_signed_bitfield): New helper function.
5502 (aarch64_decode_ldr_literal): New function.
5503 (enum aarch64_opcodes): New enum.
5504 (struct aarch64_register): New struct.
5505 (struct aarch64_operand): New struct.
5506 (x0): New static global.
5507 (x1): Likewise.
5508 (x2): Likewise.
5509 (x3): Likewise.
5510 (x4): Likewise.
5511 (w2): Likewise.
5512 (ip0): Likewise.
5513 (sp): Likewise.
5514 (xzr): Likewise.
5515 (aarch64_register): New helper function.
5516 (register_operand): Likewise.
5517 (immediate_operand): Likewise.
5518 (struct aarch64_memory_operand): New struct.
5519 (offset_memory_operand): New helper function.
5520 (preindex_memory_operand): Likewise.
5521 (enum aarch64_system_control_registers): New enum.
5522 (ENCODE): New macro.
5523 (emit_insn): New helper function.
5524 (emit_b): New function.
5525 (emit_bcond): Likewise.
5526 (emit_cb): Likewise.
5527 (emit_tb): Likewise.
5528 (emit_blr): Likewise.
5529 (emit_stp): Likewise.
5530 (emit_ldp_q_offset): Likewise.
5531 (emit_stp_q_offset): Likewise.
5532 (emit_load_store): Likewise.
5533 (emit_ldr): Likewise.
5534 (emit_ldrsw): Likewise.
5535 (emit_str): Likewise.
5536 (emit_ldaxr): Likewise.
5537 (emit_stxr): Likewise.
5538 (emit_stlr): Likewise.
5539 (emit_data_processing_reg): Likewise.
5540 (emit_data_processing): Likewise.
5541 (emit_add): Likewise.
5542 (emit_sub): Likewise.
5543 (emit_mov): Likewise.
5544 (emit_movk): Likewise.
5545 (emit_mov_addr): Likewise.
5546 (emit_mrs): Likewise.
5547 (emit_msr): Likewise.
5548 (emit_sevl): Likewise.
5549 (emit_wfe): Likewise.
5550 (append_insns): Likewise.
5551 (can_encode_int32_in): New helper function.
5552 (aarch64_relocate_instruction): New function.
5553 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5554 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5555 (struct linux_target_ops): Install aarch64_get_thread_area,
5556 aarch64_install_fast_tracepoint_jump_pad and
5557 aarch64_get_min_fast_tracepoint_insn_len.
5558
787749ea
PL
55592015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5560
5561 * Makefile.in (aarch64-insn.o): New rule.
5562 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5563
9812b2e6
YQ
55642015-09-21 Yao Qi <yao.qi@linaro.org>
5565
5566 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5567
18fe412b
YQ
55682015-09-21 Yao Qi <yao.qi@linaro.org>
5569
5570 * tracepoint.c (max_jump_pad_size): Remove.
5571
a0cc84cd
YQ
55722015-09-18 Yao Qi <yao.qi@linaro.org>
5573
5574 * linux-aarch64-low.c: Don't include sys/uio.h.
5575 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5576
d78908cf
WW
55772015-09-16 Wei-cheng Wang <cole945@gmail.com>
5578
5579 * tracepoint.c (eval_result_type): Change prototype.
5580 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5581
d57e0d50
PA
55822015-09-15 Pedro Alves <palves@redhat.com>
5583
5584 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5585 Check whether to report exec events instead of checking whether
5586 multiprocess is enabled.
5587
5a676acc
PA
55882015-09-15 Pedro Alves <palves@redhat.com>
5589
5590 PR remote/18965
5591 * remote-utils.c (prepare_resume_reply): Merge
5592 TARGET_WAITKIND_VFORK_DONE switch case with the
5593 TARGET_WAITKIND_FORKED case.
5594
7c5d0fad
YQ
55952015-09-15 Yao Qi <yao.qi@linaro.org>
5596
5597 * server.c (handle_query): Check string comparison using
5598 "else if" instead of "if".
5599
750ce8d1
YQ
56002015-09-15 Yao Qi <yao.qi@linaro.org>
5601
5602 * server.c (vCont_supported): New global variable.
5603 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5604 matches. Append ";vContSupported+" to own_buf.
5605 (handle_v_requests): Append ";s;S" to own_buf if target supports
5606 hardware single step or vCont_supported is false.
5607 (capture_main): Set vCont_supported to zero.
5608
70b90b91
YQ
56092015-09-15 Yao Qi <yao.qi@linaro.org>
5610
5611 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5612 it to ...
5613 (linux_supports_hardware_single_step): ... New function.
5614 (linux_target_ops): Update.
5615 * lynx-low.c (lynx_target_ops): Set field
5616 supports_hardware_single_step to target_can_do_hardware_single_step.
5617 * nto-low.c (nto_target_ops): Likewise.
5618 * spu-low.c (spu_target_ops): Likewise.
5619 * win32-low.c (win32_target_ops): Likewise.
5620 * target.c (target_can_do_hardware_single_step): New function.
5621 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5622 Remove. <supports_hardware_single_step>: New field.
5623 (target_supports_conditional_breakpoints): Remove.
5624 (target_supports_hardware_single_step): New macro.
5625 (target_can_do_hardware_single_step): Declare.
5626 * server.c (handle_query): Use target_supports_hardware_single_step
5627 instead of target_supports_conditional_breakpoints.
5628
ade90bde
YQ
56292015-09-15 Yao Qi <yao.qi@linaro.org>
5630
5631 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5632 function.
5633 (struct linux_target_ops the_low_target): Install
5634 aarch64_linux_siginfo_fixup.
5635
94585166
DB
56362015-09-11 Don Breazeal <donb@codesourcery.com>
5637 Luis Machado <lgustavo@codesourcery.com>
5638
5639 * linux-low.c (linux_mourn): Static declaration.
5640 (linux_arch_setup): Move in front of
5641 handle_extended_wait.
5642 (linux_arch_setup_thread): New function.
5643 (handle_extended_wait): Handle exec events. Call
5644 linux_arch_setup_thread. Make event_lwp argument a
5645 pointer-to-a-pointer.
5646 (check_zombie_leaders): Do not check stopped threads.
5647 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5648 (linux_low_filter_event): Add lwp and thread for exec'ing
5649 non-leader thread if leader thread has been deleted.
5650 Refactor code into linux_arch_setup_thread and call it.
5651 Pass child lwp pointer by reference to handle_extended_wait.
5652 (linux_wait_for_event_filtered): Update comment.
5653 (linux_wait_1): Prevent clobbering exec event status.
5654 (linux_supports_exec_events): New function.
5655 (linux_target_ops) <supports_exec_events>: Initialize new member.
5656 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5657 new member.
5658 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5659 * server.c (report_exec_events): New global variable.
5660 (handle_query): Handle qSupported query for exec-events feature.
5661 (captured_main): Initialize report_exec_events.
5662 * server.h (report_exec_events): Declare new global variable.
5663 * target.h (struct target_ops) <supports_exec_events>: New
5664 member.
5665 (target_supports_exec_events): New macro.
5666 * win32-low.c (win32_target_ops) <supports_exec_events>:
5667 Initialize new member.
5668
0568462b
MM
56692015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5670
5671 * linux-low.c (linux_low_enable_btrace): Remove.
5672 (linux_target_ops): Replace linux_low_enable_btrace with
5673 linux_enable_btrace.
5674
39edd165
YQ
56752015-09-03 Yao Qi <yao.qi@linaro.org>
5676
5677 * linux-aarch64-low.c (aarch64_insert_point): Call
5678 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5679 returns true.
5680
1db33b5a
UW
56812015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5682
5683 * linux-low.c (check_stopped_by_breakpoint): Use
5684 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5685
ab290430
PA
56862015-08-27 Pedro Alves <palves@redhat.com>
5687
5688 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5689
8d749320
SM
56902015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5691
6711b7f8
SM
5692 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5693 the XNEW-family equivalent.
8d749320
SM
5694 (compile_bytecodes): Likewise.
5695 * dll.c (loaded_dll): Likewise.
5696 * event-loop.c (append_callback_event): Likewise.
5697 (create_file_handler): Likewise.
5698 (create_file_event): Likewise.
5699 * hostio.c (handle_open): Likewise.
5700 * inferiors.c (add_thread): Likewise.
5701 (add_process): Likewise.
5702 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5703 * linux-arm-low.c (arm_new_process): Likewise.
5704 (arm_new_thread): Likewise.
5705 * linux-low.c (add_to_pid_list): Likewise.
5706 (linux_add_process): Likewise.
5707 (handle_extended_wait): Likewise.
5708 (add_lwp): Likewise.
5709 (enqueue_one_deferred_signal): Likewise.
5710 (enqueue_pending_signal): Likewise.
5711 (linux_resume_one_lwp_throw): Likewise.
5712 (linux_resume_one_thread): Likewise.
5713 (linux_read_memory): Likewise.
5714 (linux_write_memory): Likewise.
5715 * linux-mips-low.c (mips_linux_new_process): Likewise.
5716 (mips_linux_new_thread): Likewise.
5717 (mips_add_watchpoint): Likewise.
5718 * linux-x86-low.c (initialize_low_arch): Likewise.
5719 * lynx-low.c (lynx_add_process): Likewise.
5720 * mem-break.c (set_raw_breakpoint_at): Likewise.
5721 (set_breakpoint): Likewise.
5722 (add_condition_to_breakpoint): Likewise.
5723 (add_commands_to_breakpoint): Likewise.
5724 (clone_agent_expr): Likewise.
5725 (clone_one_breakpoint): Likewise.
5726 * regcache.c (new_register_cache): Likewise.
5727 * remote-utils.c (look_up_one_symbol): Likewise.
5728 * server.c (queue_stop_reply): Likewise.
5729 (start_inferior): Likewise.
5730 (queue_stop_reply_callback): Likewise.
5731 (handle_target_event): Likewise.
5732 * spu-low.c (fetch_ppc_memory): Likewise.
5733 (store_ppc_memory): Likewise.
5734 * target.c (set_target_ops): Likewise.
5735 * thread-db.c (thread_db_load_search): Likewise.
5736 (try_thread_db_load_1): Likewise.
5737 * tracepoint.c (add_tracepoint): Likewise.
5738 (add_tracepoint_action): Likewise.
5739 (create_trace_state_variable): Likewise.
5740 (cmd_qtdpsrc): Likewise.
5741 (cmd_qtro): Likewise.
5742 (add_while_stepping_state): Likewise.
5743 * win32-low.c (child_add_thread): Likewise.
5744 (get_image_name): Likewise.
5745
ed8b7b42
YQ
57462015-08-25 Yao Qi <yao.qi@linaro.org>
5747
5748 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5749
db3cb7cb
YQ
57502015-08-25 Yao Qi <yao.qi@linaro.org>
5751
5752 * Makefile.in (aarch64-linux.o): New rule.
5753 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5754 srv_tgtobj.
5755 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5756 (aarch64_init_debug_reg_state): Make it extern.
5757 (aarch64_linux_prepare_to_resume): Remove.
5758
f6011a1c
YQ
57592015-08-25 Yao Qi <yao.qi@linaro.org>
5760
5761 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5762 lwp_arch_private_info and ptid_of_lwp.
5763
88e2cf7e
YQ
57642015-08-25 Yao Qi <yao.qi@linaro.org>
5765
5766 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5767 Find proc_info by find_process_pid. All callers updated.
5768
5e35436e
YQ
57692015-08-25 Yao Qi <yao.qi@linaro.org>
5770
5771 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5772 Remove.
5773 (debug_reg_change_callback): Remove.
5774 (aarch64_notify_debug_reg_change): Remove.
5775
4a8a7965
YQ
57762015-08-25 Yao Qi <yao.qi@linaro.org>
5777
5778 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5779 Call current_lwp_ptid.
5780
32a271ee
YQ
57812015-08-25 Yao Qi <yao.qi@linaro.org>
5782
5783 * linux-aarch64-low.c (debug_reg_change_callback): Use
5784 debug_printf.
5785
0d51c8d7
YQ
57862015-08-25 Yao Qi <yao.qi@linaro.org>
5787
5788 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5789
31a43dd5
YQ
57902015-08-25 Yao Qi <yao.qi@linaro.org>
5791
5792 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5793
8ee52567
YQ
57942015-08-25 Yao Qi <yao.qi@linaro.org>
5795
5796 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5797 the code.
5798
ff3f0f45
YQ
57992015-08-25 Yao Qi <yao.qi@linaro.org>
5800
5801 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5802 Remove.
5803 (debug_reg_change_callback): Remove argument entry and add argument
5804 lwp. Remove local variable thread. Don't print thread id in the
5805 debugging output. Don't check whether pid of thread equals to pid.
5806 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5807 iterate_over_lwps instead find_inferior.
5808
3d40fbb5
PA
58092015-08-24 Pedro Alves <palves@redhat.com>
5810
5811 * inferiors.c (get_first_process): New function.
5812 * inferiors.h (get_first_process): New declaration.
5813 * remote-utils.c (read_ptid): Default to the first process in the
5814 list, instead of to the current thread's process.
5815
438e1e42
PA
58162015-08-24 Pedro Alves <palves@redhat.com>
5817
5818 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5819 * event-loop.c: Likewise.
5820 * remote-utils.c: Likewise.
5821 * tracepoint.c: Likewise.
5822
a8c6d4fc
PA
58232015-08-24 Pedro Alves <palves@redhat.com>
5824
5825 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5826 ptid_get_lwp.
5827
99b0bb12
PA
58282015-08-21 Pedro Alves <palves@redhat.com>
5829
5830 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5831 instead of literal 1.
5832
f8904751
PA
58332015-08-21 Pedro Alves <palves@redhat.com>
5834
5835 * tdesc.c (default_description): Explicitly zero-initialize.
5836
465a859e
PA
58372015-08-21 Pedro Alves <palves@redhat.com>
5838
5839 PR gdb/18749
5840 * inferiors.c (remove_thread): Discard any pending stop reply for
5841 this thread.
5842 * server.c (remove_all_on_match_pid): Rename to ...
5843 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5844 instead of a pid.
5845 (discard_queued_stop_replies): Change parameter to a ptid. Now
5846 extern.
5847 (handle_v_kill, kill_inferior_callback, captured_main)
5848 (process_serial_event): Adjust.
5849 * server.h (discard_queued_stop_replies): Declare.
5850
f0db101d
PA
58512015-08-21 Pedro Alves <palves@redhat.com>
5852
5853 * linux-low.c (wait_for_sigstop): Always switch to no thread
5854 selected if the previously current thread dies.
5855 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5856 process instead of the current thread's.
5857 * remote-utils.c (input_interrupt): Don't check if there's no
5858 current thread.
5859 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5860 current thread to the general thread fails, error out.
5861 (handle_qxfer_auxv, handle_qxfer_libraries)
5862 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5863 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5864 (handle_query): Check if there's a thread selected instead of
5865 checking whether there's any thread in the thread list.
5866 (handle_qxfer_threads, handle_qxfer_btrace)
5867 (handle_qxfer_btrace_conf): Don't error out early if there's no
5868 thread in the thread list.
5869 (handle_v_cont, myresume): Don't set the current thread to the
5870 continue thread.
5871 (process_serial_event) <Hg handling>: Also set thread_id if the
5872 previous general thread is still alive.
5873 (process_serial_event) <g/G handling>: If setting the current
5874 thread to the general thread fails, error out.
5875 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5876 thread's lwp instead of the current thread's.
5877 * target.c (set_desired_thread): If the desired thread was not
5878 found, leave the current thread pointing to NULL. Return an int
5879 (boolean) indicating success.
5880 * target.h (set_desired_thread): Change return type to int.
5881
40045d91
MF
58822015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5883
5884 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5885 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5886 #includes.
5887 (ps_get_thread_area): New function.
5888
45face3b
GB
58892015-08-19 Gary Benson <gbenson@redhat.com>
5890
5891 * hostio.c (handle_pread): Do not attempt to read more data
5892 than hostio_reply_with_data can fit in a packet.
5893
16d5f642
JB
58942015-08-18 Joel Brobecker <brobecker@adacore.com>
5895
5896 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5897
a738da3a
MF
58982015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5899
5900 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5901
33ebda9d
PA
59022015-08-06 Pedro Alves <palves@redhat.com>
5903
5904 * tracepoint.c (expr_eval_result): Now an int.
5905
a44892be
PA
59062015-08-06 Pedro Alves <palves@redhat.com>
5907
5908 * gdbthread.h (struct regcache): Forward declare.
5909 (struct thread_info) <regcache_data>: Now a struct regcache
5910 pointer.
5911 * inferiors.c (inferior_regcache_data)
5912 (set_inferior_regcache_data): Now work with struct regcache
5913 pointers.
5914 * inferiors.h (struct regcache): Forward declare.
5915 (inferior_regcache_data, set_inferior_regcache_data): Now work
5916 with struct regcache pointers.
5917 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5918 (free_register_cache_thread): Remove struct regcache pointer
5919 casts.
5920
608a1e46
PA
59212015-08-06 Pedro Alves <palves@redhat.com>
5922
5923 * server.c (captured_main): On error, print the exception message
5924 to stderr, and if run_once is set, throw a quit.
5925
f0ce0d3a
PA
59262015-08-06 Pedro Alves <palves@redhat.com>
5927
5928 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5929 the current thread.
5930
bf47e248
PA
59312015-08-06 Pedro Alves <palves@redhat.com>
5932
5933 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5934 reading beyond the passed in buffer length.
5935
b6b9ffcc
PL
59362015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5937
5938 * tracepoint.c (symbol_list) <required>: Remove.
5939
863d01bd
PA
59402015-08-06 Pedro Alves <palves@redhat.com>
5941
5942 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5943 count if stopping and suspending threads.
5944 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5945 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5946 (linux_detach): Complete an ongoing step-over.
5947 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5948 throughout.
5949 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5950 (linux_wait_1): If passing a signal to the inferior after
5951 finishing a step-over, unsuspend and re-resume all lwps. If we
5952 see a single-step event but the thread should be continuing, don't
5953 pass the trap to gdb.
5954 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5955 internal_error instead of gdb_assert.
5956 (enqueue_pending_signal): New function.
5957 (check_ptrace_stopped_lwp_gone): Add debug output.
5958 (start_step_over): Use internal_error instead of gdb_assert.
5959 (complete_ongoing_step_over): New function.
5960 (linux_resume_one_thread): Don't resume a suspended thread.
5961 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5962 it stepping.
5963
00db26fa
PA
59642015-08-06 Pedro Alves <palves@redhat.com>
5965
5966 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5967 (linux_thread_alive): Use lwp_is_marked_dead.
5968 (extended_event_reported): Delete.
5969 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5970 instead of extended_event_reported.
5971 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5972 as well.
5973 (lwp_is_marked_dead): New function.
5974 (lwp_running): Use lwp_is_marked_dead.
5975 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5976 comment.
5977
ad071a30
PA
59782015-08-06 Pedro Alves <palves@redhat.com>
5979
5980 * linux-low.c (linux_wait_1): Move fork event output out of the
5981 !report_to_gdb check. Pass event_child->waitstatus to
5982 target_waitstatus_to_string instead of ourstatus.
5983
524b57e6
YQ
59842015-08-04 Yao Qi <yao.qi@linaro.org>
5985
5986 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5987 if current_thread is 32 bit.
5988
6085d6f6
YQ
59892015-08-04 Yao Qi <yao.qi@linaro.org>
5990
5991 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5992 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5993 * server.c (extended_protocol): Remove "static".
5994 * server.h (extended_protocol): Declare it.
5995
8a7e4587
YQ
59962015-08-04 Yao Qi <yao.qi@linaro.org>
5997
5998 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5999 both aarch64 and aarch32.
6000 (aarch64_set_pc): Likewise.
6001
3b53ae99
YQ
60022015-08-04 Yao Qi <yao.qi@linaro.org>
6003
6004 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6005 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6006 arm-with-neon.xml to srv_xmlfiles.
6007 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6008 (is_64bit_tdesc): New function.
6009 (aarch64_linux_read_description): New function.
6010 (aarch64_arch_setup): Call aarch64_linux_read_description.
6011 (regs_info): Rename to regs_info_aarch64.
6012 (aarch64_regs_info): Return right regs_info.
6013 (initialize_low_arch): Call initialize_low_arch_aarch32.
6014
bd9e6534
YQ
60152015-08-04 Yao Qi <yao.qi@linaro.org>
6016
6017 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6018 * linux-aarch32-low.c: New file.
6019 * linux-aarch32-low.h: New file.
6020 * linux-arm-low.c (arm_fill_gregset): Move it to
6021 linux-aarch32-low.c.
6022 (arm_store_gregset): Likewise.
6023 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6024 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6025 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6026 (regs_info): Rename to regs_info_arm.
6027 (arm_regs_info): Return regs_info_aarch32 if
6028 have_ptrace_getregset is 1 and target description is
6029 arm_with_neon or arm_with_vfpv3.
6030 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6031 Call initialize_low_arch_aarch32 instead.
6032
ded48a5e
YQ
60332015-08-04 Yao Qi <yao.qi@linaro.org>
6034
6035 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6036 * linux-low.c: ... here.
6037 * linux-low.h (have_ptrace_getregset): Declare it.
6038
96e9210f
PA
60392015-08-04 Pedro Alves <palves@redhat.com>
6040
6041 * thread-db.c (struct thread_db): Use new typedefs.
6042 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6043 CHK calls.
6044 (disable_thread_event_reporting): Cast result of dlsym to
6045 destination function pointer type.
6046 (thread_db_mourn): Use td_ta_delete_ftype.
6047
af60a1ef
SL
60482015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6049
6050 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6051 arch variant.
6052 (CDX_BREAKPOINT): Define for R2.
6053 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6054 (the_low_target): Add comments.
6055
e8b41681
YQ
60562015-07-30 Yao Qi <yao.qi@linaro.org>
6057
6058 * linux-arm-low.c (arm_hwcap): Remove it.
6059 (arm_read_description): New local variable arm_hwcap. Don't
6060 set arm_hwcap to zero.
6061
89abb039
YQ
60622015-07-30 Yao Qi <yao.qi@linaro.org>
6063
6064 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6065 Use regcache->tdesc instead.
6066 (arm_store_wmmxregset): Likewise.
6067 (arm_fill_vfpregset): Likewise.
6068 (arm_store_vfpregset): Likewise.
6069
deca266c
YQ
60702015-07-30 Yao Qi <yao.qi@linaro.org>
6071
6072 * linux-arm-low.c: Include arch/arm.h.
6073 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6074 (arm_store_gregset): Likewise.
6075
aa58a496
SM
60762015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6077
6078 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6079 ptrace's 4th parameter.
6080
50904b25
YQ
60812015-07-27 Yao Qi <yao.qi@linaro.org>
6082
6083 * configure.srv (case aarch64*-*-linux*): Don't set
6084 srv_linux_usrregs.
6085
5826e159
PA
60862015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6087
6088 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6089 sys/ptrace.h.
6090 * linux-arm-low.c: Likewise.
6091 * linux-cris-low.c: Likewise.
6092 * linux-crisv32-low.c: Likewise.
6093 * linux-low.c: Likewise.
6094 * linux-m68k-low.c: Likewise.
6095 * linux-mips-low.c: Likewise.
6096 * linux-nios2-low.c: Likewise.
6097 * linux-s390-low.c: Likewise.
6098 * linux-sparc-low.c: Likewise.
6099 * linux-tic6x-low.c: Likewise.
6100 * linux-tile-low.c: Likewise.
6101 * linux-x86-low.c: Likewise.
6102
54019719
PA
61032015-07-24 Pedro Alves <palves@redhat.com>
6104
6105 * config.in: Regenerate.
6106 * configure: Regenerate.
6107
eb7aa561
PA
61082015-07-24 Pedro Alves <palves@redhat.com>
6109
6110 * acinclude.m4: Include ../ptrace.m4.
6111 * configure.ac: Call GDB_AC_PTRACE.
6112 * config.in, configure: Regenerate.
6113
55d7b841
YQ
61142015-07-24 Yao Qi <yao.qi@linaro.org>
6115
6116 * linux-low.c (linux_create_inferior): Remove setting to
6117 proc->priv->new_inferior.
6118 (linux_attach): Likewise.
6119 (linux_low_filter_event): Likewise.
6120 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6121
c06cbd92
YQ
61222015-07-24 Yao Qi <yao.qi@linaro.org>
6123
6124 * linux-low.c (linux_arch_setup): New function.
6125 (linux_low_filter_event): If proc->tdesc is NULL and
6126 proc->attached is true, call the_low_target.arch_setup.
6127 Otherwise, keep status pending, and return.
6128 (linux_resume_one_lwp_throw): Don't call get_pc if
6129 thread->while_stepping isn't NULL. Don't call
6130 get_thread_regcache if proc->tdesc is NULL.
6131 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6132 (linux_target_ops): Install arch_setup.
6133 * server.c (start_inferior): Call the_target->arch_setup.
6134 * target.h (struct target_ops) <arch_setup>: New field.
6135 (target_arch_setup): New marco.
6136 * lynx-low.c (lynx_target_ops): Update.
6137 * nto-low.c (nto_target_ops): Update.
6138 * spu-low.c (spu_target_ops): Update.
6139 * win32-low.c (win32_target_ops): Update.
6140
5ae3ebba
YQ
61412015-07-24 Yao Qi <yao.qi@linaro.org>
6142
6143 * linux-low.c (linux_add_process): Don't set
6144 proc->priv->new_inferior.
6145 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6146 (linux_attach): Likewise.
6147
eb97750b
YQ
61482015-07-24 Yao Qi <yao.qi@linaro.org>
6149
6150 * server.c (start_inferior): Code refactor.
6151
51aee833
YQ
61522015-07-24 Yao Qi <yao.qi@linaro.org>
6153
6154 * server.c (process_serial_event): Set general_thread.
6155
af1b22f3
YQ
61562015-07-21 Yao Qi <yao.qi@linaro.org>
6157
6158 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6159 aarch64_linux_get_debug_reg_capacity.
6160
554717a3
YQ
61612015-07-17 Yao Qi <yao.qi@linaro.org>
6162
6163 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6164 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6165 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6166 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6167 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6168 (AARCH64_HWP_ALIGNMENT): Likewise.
6169 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6170 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6171 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6172 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6173 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6174 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6175 (struct aarch64_debug_reg_state): Likewise.
6176 (struct arch_lwp_info): Likewise.
6177 (aarch64_align_watchpoint): Likewise.
6178 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6179 (aarch64_watchpoint_length): Likewise.
6180 (aarch64_point_encode_ctrl_reg): Likewise
6181 (aarch64_point_is_aligned): Likewise.
6182 (aarch64_align_watchpoint): Likewise.
6183 (aarch64_linux_set_debug_regs):
6184 (aarch64_dr_state_insert_one_point): Likewise.
6185 (aarch64_dr_state_remove_one_point): Likewise.
6186 (aarch64_handle_breakpoint): Likewise.
6187 (aarch64_handle_aligned_watchpoint): Likewise.
6188 (aarch64_handle_unaligned_watchpoint): Likewise.
6189 (aarch64_handle_watchpoint): Likewise.
6190
c67ca4de
YQ
61912015-07-17 Yao Qi <yao.qi@linaro.org>
6192
6193 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6194 and don't aarch64_get_debug_reg_state. All callers update.
6195 (aarch64_handle_aligned_watchpoint): Likewise.
6196 (aarch64_handle_unaligned_watchpoint): Likewise.
6197 (aarch64_handle_watchpoint): Likewise.
6198 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6199 (aarch64_remove_point): Likewise.
6200
25abf979
YQ
62012015-07-17 Yao Qi <yao.qi@linaro.org>
6202
6203 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6204 debug_printf.
6205 (aarch64_handle_unaligned_watchpoint): Likewise.
6206
db1ff28b
JK
62072015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6208
6209 Revert the previous 3 commits:
6210 Move gdb_regex* to common/
6211 Move linux_find_memory_regions_full & co.
6212 gdbserver build-id attribute generator
6213
700ca40f
JK
62142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6215 Jan Kratochvil <jan.kratochvil@redhat.com>
6216
6217 gdbserver build-id attribute generator.
6218 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6219 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6220 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6221 (find_phdr): New.
6222 (get_dynamic): Use find_pdhr to traverse program headers.
6223 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6224 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6225 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6226 (get_hex_build_id): New.
6227 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6228 to reply XML document.
6229
9904185c
JK
62302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6231 Jan Kratochvil <jan.kratochvil@redhat.com>
6232
6233 * target.c: Include target/target-utils.h and fcntl.h.
6234 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6235 (target_fileio_read_stralloc): New functions.
6236
6e5b4429
JK
62372015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6238
6239 * Makefile.in (OBS): Add gdb_regex.o.
6240 (gdb_regex.o): New.
6241 * config.in: Rebuilt.
6242 * configure: Rebuilt.
6243
ddc98fbf
JK
62442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6245 Jan Kratochvil <jan.kratochvil@redhat.com>
6246
6247 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6248 * Makefile.in (OBS): Add target-utils.o.
6249 (linux-maps.o, target-utils.o): New.
6250 * configure.srv (srv_linux_obj): Add linux-maps.o.
6251
e57bb7a0
PL
62522015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6253
6254 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6255 function, return 1.
6256 (the_low_target): Install it.
6257
586b02a9
PA
62582015-07-14 Pedro Alves <palves@redhat.com>
6259
6260 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6261 Instead, ignore ECHILD, and throw an error for other errnos.
6262
58c1b36c
PA
62632015-07-10 Pedro Alves <palves@redhat.com>
6264
6265 * event-loop.c (struct callback_event) <data>: Change type to
6266 gdb_client_data instance instead of gdb_client_data pointer.
6267 (append_callback_event): Adjust.
6268
421530db
PL
62692015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6270
6271 * linux-aarch64-low.c: Add comments for each linux_target_ops
6272 method. Remove comments already covered in target_ops and
6273 linux_target_ops definitions.
6274 (the_low_target): Add comments for each unimplemented method.
6275
c2d65f38
YQ
62762015-07-09 Yao Qi <yao.qi@linaro.org>
6277
6278 * linux-aarch64-low.c (aarch64_regmap): Remove.
6279 (aarch64_usrregs_info): Remove.
6280 (regs_info): Set field usrregs to NULL.
6281
b20a6524
MM
62822015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6283
6284 * linux-low.c: Include "rsp-low.h"
6285 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6286 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6287 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6288 (handle_btrace_enable_pt): New.
6289 (handle_btrace_general_set): Support "pt".
6290 (handle_btrace_conf_general_set): Support "pt:size".
6291
96c97461
PL
62922015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6293
6294 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6295 Z_PACKET_SW_BP.
6296
37d66942
PL
62972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6298
6299 * linux-aarch64-low.c: Remove comment about endianness.
6300 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6301 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6302 memcmp.
6303
dc06243f
GB
63042015-06-24 Gary Benson <gbenson@redhat.com>
6305
6306 * linux-i386-ipa.c (stdint.h): Do not include.
6307 * lynx-i386-low.c (stdint.h): Likewise.
6308 * lynx-ppc-low.c (stdint.h): Likewise.
6309 * mem-break.c (stdint.h): Likewise.
6310 * thread-db.c (stdint.h): Likewise.
6311 * tracepoint.c (stdint.h): Likewise.
6312 * win32-low.c (stdint.h): Likewise.
6313
124e13d9
SM
63142015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6315
6316 * server.c (write_qxfer_response): Update call to
6317 remote_escape_output.
6318
909c2cda
JK
63192015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6320 Jan Kratochvil <jan.kratochvil@redhat.com>
6321
6322 Merge multiple hex conversions.
6323 * gdbreplay.c (tohex): Rename to 'fromhex'.
6324 (logchar): Use fromhex.
6325
24c05f46
JK
63262015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6327
6328 * server.c (handle_qxfer_libraries): Set `version' attribute for
6329 <library-list>.
6330
14d2069a
GB
63312015-06-10 Gary Benson <gbenson@redhat.com>
6332
6333 * target.h (struct target_ops) <multifs_open>: New field.
6334 <multifs_unlink>: Likewise.
6335 <multifs_readlink>: Likewise.
6336 * linux-low.c (nat/linux-namespaces.h): New include.
6337 (linux_target_ops): Initialize the_target->multifs_open,
6338 the_target->multifs_unlink and the_target->multifs_readlink.
6339 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6340 * hostio.c (hostio_fs_pid): New static variable.
6341 (hostio_handle_new_gdb_connection): New function.
6342 (handle_setfs): Likewise.
6343 (handle_open): Use the_target->multifs_open as appropriate.
6344 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6345 (handle_readlink): Use the_target->multifs_readlink as
6346 appropriate.
6347 (handle_vFile): Handle vFile:setfs packets.
6348 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6349 after target_handle_new_gdb_connection.
6350
4b8b5e72
GB
63512015-06-10 Gary Benson <gbenson@redhat.com>
6352
6353 * configure.ac (AC_CHECK_FUNCS): Add setns.
6354 * config.in: Regenerate.
6355 * configure: Likewise.
6356 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6357 (linux-namespaces.o): New rule.
6358 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6359
3ac2e371
GB
63602015-06-09 Gary Benson <gbenson@redhat.com>
6361
6362 * hostio.c (handle_open): Process mode argument with
6363 fileio_to_host_mode.
6364
ca9b78ce
YQ
63652015-06-01 Yao Qi <yao.qi@linaro.org>
6366
6367 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6368 * linux-x86-low.c: Likewise.
6369
bfacd19d
DB
63702015-05-28 Don Breazeal <donb@codesourcery.com>
6371
6372 * linux-low.c (handle_extended_wait): Initialize
6373 thread_info.last_resume_kind for new fork children.
6374
452003ef
PA
63752015-05-15 Pedro Alves <palves@redhat.com>
6376
6377 * target.h (target_handle_new_gdb_connection): Rewrite using if
6378 wrapped in do/while.
6379
1041a03c
JB
63802015-05-14 Joel Brobecker <brobecker@adacore.com>
6381
6382 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6383 * configure, config.in: Regenerate.
6384 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6385 Declare typedef.
6386
c269dbdb
DB
63872015-05-12 Don Breazeal <donb@codesourcery.com>
6388
6389 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6390 PTRACE_EVENT_VFORK_DONE.
6391 (linux_low_ptrace_options, extended_event_reported): Add vfork
6392 events.
6393 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6394 and "vforkdone" for RSP 'T' Stop Reply Packet.
6395 * server.h (report_vfork_events): Declare
6396 global variable.
6397
3a8a0396
DB
63982015-05-12 Don Breazeal <donb@codesourcery.com>
6399
6400 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6401 (the_low_target) <new_fork>: Initialize new member.
6402 * linux-arm-low.c (arm_new_fork): New function.
6403 (the_low_target) <new_fork>: Initialize new member.
6404 * linux-low.c (handle_extended_wait): Call new target function
6405 new_fork.
6406 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6407 * linux-mips-low.c (mips_add_watchpoint): New function
6408 extracted from mips_insert_point.
6409 (the_low_target) <new_fork>: Initialize new member.
6410 (mips_linux_new_fork): New function.
6411 (mips_insert_point): Call mips_add_watchpoint.
6412 * linux-x86-low.c (x86_linux_new_fork): New function.
6413 (the_low_target) <new_fork>: Initialize new member.
6414
de0d863e
DB
64152015-05-12 Don Breazeal <donb@codesourcery.com>
6416
6417 * linux-low.c (handle_extended_wait): Implement return value,
6418 rename argument 'event_child' to 'event_lwp', handle
6419 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6420 (linux_low_ptrace_options): New function.
6421 (linux_low_filter_event): Call linux_low_ptrace_options,
6422 use different argument fo linux_enable_event_reporting,
6423 use return value from handle_extended_wait.
6424 (extended_event_reported): New function.
6425 (linux_wait_1): Call extended_event_reported and set
6426 status to report fork events.
6427 (linux_write_memory): Add pid to debug message.
6428 (reset_lwp_ptrace_options_callback): New function.
6429 (linux_handle_new_gdb_connection): New function.
6430 (linux_target_ops): Initialize new structure member.
6431 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6432 * lynx-low.c: Initialize new structure member.
6433 * remote-utils.c (prepare_resume_reply): Implement stop reason
6434 "fork" for "T" stop message.
6435 * server.c (handle_query): Call handle_new_gdb_connection.
6436 * server.h (report_fork_events): Declare global flag.
6437 * target.h (struct target_ops) <handle_new_gdb_connection>:
6438 New member.
6439 (target_handle_new_gdb_connection): New macro.
6440 * win32-low.c: Initialize new structure member.
6441
ddcbc397
DB
64422015-05-12 Don Breazeal <donb@codesourcery.com>
6443
6444 * mem-break.c (APPEND_TO_LIST): Define macro.
6445 (clone_agent_expr): New function.
6446 (clone_one_breakpoint): New function.
6447 (clone_all_breakpoints): New function.
6448 * mem-break.h: Declare new functions.
6449
89245bc0
DB
64502015-05-12 Don Breazeal <donb@codesourcery.com>
6451
6452 * linux-low.c (linux_supports_fork_events): New function.
6453 (linux_supports_vfork_events): New function.
6454 (linux_target_ops): Initialize new structure members.
6455 (initialize_low): Call linux_check_ptrace_features.
6456 * lynx-low.c (lynx_target_ops): Initialize new structure
6457 members.
6458 * server.c (report_fork_events, report_vfork_events):
6459 New global flags.
6460 (handle_query): Add new features to qSupported packet and
6461 response.
6462 (captured_main): Initialize new global variables.
6463 * target.h (struct target_ops) <supports_fork_events>:
6464 New member.
6465 <supports_vfork_events>: New member.
6466 (target_supports_fork_events): New macro.
6467 (target_supports_vfork_events): New macro.
6468 * win32-low.c (win32_target_ops): Initialize new structure
6469 members.
6470
835205d0
GB
64712015-05-12 Gary Benson <gbenson@redhat.com>
6472
6473 * server.c (handle_qxfer_exec_file): Use current process
6474 if annex is empty.
6475
21e94bd9
SL
64762015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6477
6478 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6479 Remove HAVE_PTRACE_GETREGS conditionals.
6480 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6481 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6482
45614f15
YQ
64832015-05-08 Yao Qi <yao.qi@linaro.org>
6484
6485 * linux-low.c (linux_supports_conditional_breakpoints): New
6486 function.
6487 (linux_target_ops): Install new target method.
6488 * lynx-low.c (lynx_target_ops): Install NULL hook for
6489 supports_conditional_breakpoints.
6490 * nto-low.c (nto_target_ops): Likewise.
6491 * spu-low.c (spu_target_ops): Likewise.
6492 * win32-low.c (win32_target_ops): Likewise.
6493 * server.c (handle_query): Check
6494 target_supports_conditional_breakpoints.
6495 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6496 New field.
6497 (target_supports_conditional_breakpoints): New macro.
6498
80ad801e
PA
64992015-05-06 Pedro Alves <palves@redhat.com>
6500
6501 PR server/18081
6502 * server.c (start_inferior): If the process exits, mourn it.
6503
819843c7
GB
65042015-04-21 Gary Benson <gbenson@redhat.com>
6505
6506 * hostio.c (fileio_open_flags_to_host): Factored out to
6507 fileio_to_host_openflags in common/fileio.c. Single use
6508 updated.
6509
a2d5a9d7
MF
65102015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6511
6512 * linux-xtensa-low.c (xtensa_fill_gregset)
6513 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6514 XCHAL_HAVE_LOOP.
6515
deb44829
MF
65162015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6517
6518 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6519 (regs_info): Replace usrregs pointer with NULL.
6520
e57f1de3
GB
65212015-04-17 Gary Benson <gbenson@redhat.com>
6522
6523 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6524 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6525 * server.c (handle_qxfer_exec_file): New function.
6526 (qxfer_packets): Add exec-file entry.
6527 (handle_query): Report qXfer:exec-file:read as supported packet.
6528
62828379
RN
65292015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6530
6531 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6532
b88bb450
GB
65332015-04-09 Gary Benson <gbenson@redhat.com>
6534
6535 * hostio-errno.c (errno_to_fileio_error): Remove function.
6536 Update caller to use remote_fileio_to_fio_error.
6537
c8f4bfdd
YQ
65382015-04-09 Yao Qi <yao.qi@linaro.org>
6539
6540 * linux-low.c (linux_insert_point): Call
6541 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6542 (linux_remove_point): Call remove_memory_breakpoint if type is
6543 raw_bkpt_type_sw.
6544 * linux-x86-low.c (x86_insert_point): Don't call
6545 insert_memory_breakpoint.
6546 (x86_remove_point): Don't call remove_memory_breakpoint.
6547
41f98f02
PA
65482015-04-01 Pedro Alves <palves@redhat.com>
6549 Cleber Rosa <crosa@redhat.com>
6550
6551 * server.c (gdbserver_usage): Reorganize and extend the usage
6552 message.
6553
2bf6fb9d
PA
65542015-03-24 Pedro Alves <palves@redhat.com>
6555
6556 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6557 output. Also dump TRAP_TRACE.
6558 (linux_low_filter_event): In debug output, distinguish a
6559 resume_stop SIGSTOP from a delayed SIGSTOP.
6560
369f6daa
GB
65612015-03-24 Gary Benson <gbenson@redhat.com>
6562
6563 * linux-x86-low.c (x86_linux_new_thread): Moved to
6564 nat/x86-linux.c.
6565 (x86_linux_prepare_to_resume): Likewise.
6566
8e5d4070
GB
65672015-03-24 Gary Benson <gbenson@redhat.com>
6568
6569 * Makefile.in (x86-linux-dregs.o): New rule.
6570 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6571 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6572 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6573 (x86_linux_dr_get): Likewise.
6574 (x86_linux_dr_set): Likewise.
6575 (update_debug_registers_callback): Likewise.
6576 (x86_linux_dr_set_addr): Likewise.
6577 (x86_linux_dr_get_addr): Likewise.
6578 (x86_linux_dr_set_control): Likewise.
6579 (x86_linux_dr_get_control): Likewise.
6580 (x86_linux_dr_get_status): Likewise.
6581 (x86_linux_update_debug_registers): Likewise.
6582
2b95d440
GB
65832015-03-24 Gary Benson <gbenson@redhat.com>
6584
6585 * linux-x86-low.c (x86_linux_update_debug_registers):
6586 New function, factored out from...
6587 (x86_linux_prepare_to_resume): ...this.
6588
14b0bc68
GB
65892015-03-24 Gary Benson <gbenson@redhat.com>
6590
6591 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6592 (x86_linux_dr_set): Likewise.
6593 (update_debug_registers_callback): Likewise.
6594 (x86_linux_dr_set_addr): Likewise.
6595 (x86_linux_dr_get_addr): Likewise.
6596 (x86_linux_dr_set_control): Likewise.
6597 (x86_linux_dr_get_control): Likewise.
6598 (x86_linux_dr_get_status): Likewise.
6599 (x86_linux_prepare_to_resume): Likewise.
6600
5dfe6ca8
GB
66012015-03-24 Gary Benson <gbenson@redhat.com>
6602
6603 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6604 Use perror_with_name. Pass string through gettext.
6605 (x86_linux_dr_set): Likewise.
6606
d33472ad
GB
66072015-03-24 Gary Benson <gbenson@redhat.com>
6608
6609 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6610 (x86_linux_dr_set_addr): ...this.
6611 (x86_dr_low_get_addr): Rename to...
6612 (x86_linux_dr_get_addr): ...this.
6613 (x86_dr_low_set_control): Rename to...
6614 (x86_linux_dr_set_control): ...this.
6615 (x86_dr_low_get_control): Rename to...
6616 (x86_linux_dr_get_control): ...this.
6617 (x86_dr_low_get_status): Rename to...
6618 (x86_linux_dr_get_status): ...this.
6619 (x86_dr_low): Update with new function names.
6620
4b134ca1
GB
66212015-03-24 Gary Benson <gbenson@redhat.com>
6622
6623 * Makefile.in (x86-linux.o): New rule.
6624 * configure.srv: Add x86-linux.o to relevant targets.
6625 * linux-low.c (lwp_set_arch_private_info): New function.
6626 (lwp_arch_private_info): Likewise.
6627 * linux-x86-low.c: Include nat/x86-linux.h.
6628 (arch_lwp_info): Removed structure.
6629 (update_debug_registers_callback):
6630 Use lwp_set_debug_registers_changed.
6631 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6632 and lwp_set_debug_registers_changed.
6633 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6634
34c703da
GB
66352015-03-24 Gary Benson <gbenson@redhat.com>
6636
6637 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6638 * linux-arm-low.c (arm_new_thread): Likewise.
6639 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6640 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6641 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6642 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6643
cff068da
GB
66442015-03-24 Gary Benson <gbenson@redhat.com>
6645
6646 * linux-low.c (ptid_of_lwp): New function.
6647 (lwp_is_stopped): Likewise.
6648 (lwp_stop_reason): Likewise.
6649 * linux-x86-low.c (update_debug_registers_callback):
6650 Use lwp_is_stopped.
6651 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6652 lwp_stop_reason.
6653
b2f7c7e8
GB
66542015-03-24 Gary Benson <gbenson@redhat.com>
6655
6656 * linux-low.h (linux_stop_lwp): Remove declaration.
6657
6d4ee8c6
GB
66582015-03-24 Gary Benson <gbenson@redhat.com>
6659
6660 * linux-low.h: Include nat/linux-nat.h.
6661 * linux-low.c (iterate_over_lwps_args): New structure.
6662 (iterate_over_lwps_filter): New function.
6663 (iterate_over_lwps): Likewise.
6664 * linux-x86-low.c (update_debug_registers_callback):
6665 Update signature to what iterate_over_lwps expects.
6666 Remove PID check that iterate_over_lwps now performs.
6667 (x86_dr_low_set_addr): Use iterate_over_lwps.
6668 (x86_dr_low_set_control): Likewise.
6669
70a0bb6b
GB
66702015-03-24 Gary Benson <gbenson@redhat.com>
6671
6672 * linux-x86-low.c (x86_debug_reg_state): New function.
6673 (x86_linux_prepare_to_resume): Use the above.
6674
7b669087
GB
66752015-03-24 Gary Benson <gbenson@redhat.com>
6676
6677 * linux-low.c (current_lwp_ptid): New function.
6678 * linux-x86-low.c: Include nat/linux-nat.h.
6679 (x86_dr_low_get_addr): Use current_lwp_ptid.
6680 (x86_dr_low_get_control): Likewise.
6681 (x86_dr_low_get_status): Likewise.
6682
eef49a3d
PA
66832015-03-20 Pedro Alves <palves@redhat.com>
6684
6685 * tracepoint.c (cmd_qtstatus): Make "str" const.
6686
b2333d22
PA
66872015-03-20 Pedro Alves <palves@redhat.com>
6688
6689 * server.c (handle_general_set): Make "req_str" const.
6690
23f238d3
PA
66912015-03-19 Pedro Alves <palves@redhat.com>
6692
6693 * linux-low.c (linux_resume_one_lwp): Rename to ...
6694 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6695 instead call perror_with_name.
6696 (check_ptrace_stopped_lwp_gone): New function.
6697 (linux_resume_one_lwp): Reimplement as wrapper around
6698 linux_resume_one_lwp_throw that swallows errors if the LWP is
6699 gone.
6700
91baf43f
PA
67012015-03-19 Pedro Alves <palves@redhat.com>
6702
6703 * linux-low.c (count_events_callback, select_event_lwp_callback):
6704 No longer check whether the thread has resume_stop as last resume
6705 kind.
6706
8bf3b159
PA
67072015-03-19 Pedro Alves <palves@redhat.com>
6708
6709 * linux-low.c (count_events_callback, select_event_lwp_callback):
6710 Use the lwp's status_pending_p field, not the thread's.
6711
b90fc188
PA
67122015-03-19 Pedro Alves <palves@redhat.com>
6713
6714 * linux-low.c (select_event_lwp_callback): Update comments to
6715 no longer mention SIGTRAP.
6716
464b0089
GB
67172015-03-18 Gary Benson <gbenson@redhat.com>
6718
6719 * server.c (handle_query): Do not report vFile:fstat as supported.
6720
aa9e327f
GB
67212015-03-11 Gary Benson <gbenson@redhat.com>
6722
6723 * hostio.c (sys/types.h): New include.
6724 (sys/stat.h): Likewise.
6725 (common-remote-fileio.h): Likewise.
6726 (handle_fstat): New function.
6727 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6728
791c0056
GB
67292015-03-11 Gary Benson <gbenson@redhat.com>
6730
6731 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6732 struct stat.st_blocks and struct stat.st_blksize.
6733 * configure: Regenerate.
6734 * config.in: Likewise.
6735 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6736 (OBS): Add common-remote-fileio.o.
6737 (common-remote-fileio.o): New rule.
6738
9a9df970
PA
67392015-03-09 Pedro Alves <palves@redhat.com>
6740
6741 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6742 'struct sockaddr' pointer in 'accept' call.
6743
9eb1356e
PA
67442015-03-09 Pedro Alves <palves@redhat.com>
6745
6746 Revert:
6747 2015-03-07 Pedro Alves <palves@redhat.com>
6748 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6749 or <winsock2.h> here. Instead include "gdb_socket.h".
6750 (remote_open): Use union gdb_sockaddr_u.
6751 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6752 or <winsock2.h> here. Instead include "gdb_socket.h".
6753 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6754 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6755 or <sys/un.h>.
6756 (init_named_socket, gdb_agent_helper_thread): Use union
6757 gdb_sockaddr_u.
6758
aac331e4
PA
67592015-03-07 Pedro Alves <palves@redhat.com>
6760
6761 * configure.ac (build_warnings): Move
6762 -Wdeclaration-after-statement to the C-specific set.
6763 * configure: Regenerate.
6764
366c75fc
PA
67652015-03-07 Pedro Alves <palves@redhat.com>
6766
6767 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6768 or <winsock2.h> here. Instead include "gdb_socket.h".
6769 (remote_open): Use union gdb_sockaddr_u.
6770 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6771 or <winsock2.h> here. Instead include "gdb_socket.h".
6772 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6773 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6774 or <sys/un.h>.
6775 (init_named_socket, gdb_agent_helper_thread): Use union
6776 gdb_sockaddr_u.
6777
492d29ea
PA
67782015-03-07 Pedro Alves <palves@redhat.com>
6779
6780 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6781 instead.
6782
60a191ed
YQ
67832015-03-06 Yao Qi <yao.qi@linaro.org>
6784
6785 * linux-aarch64-low.c (aarch64_insert_point): Use
6786 show_debug_regs as a boolean.
6787 (aarch64_remove_point): Likewise.
6788
f5771b1d
PA
67892015-03-05 Pedro Alves <palves@redhat.com>
6790
6791 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6792 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6793 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6794 * nto-low.c (nto_target_ops): Likewise.
6795 * spu-low.c (spu_target_ops): Likewise.
6796 * win32-low.c (win32_target_ops): Likewise.
6797
3e572f71
PA
67982015-03-04 Pedro Alves <palves@redhat.com>
6799
72f4393d 6800 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6801 Decide whether a breakpoint triggered based on the SIGTRAP's
6802 siginfo.si_code.
72f4393d
L
6803 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6804 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6805 (linux_low_filter_event): Check for breakpoints before checking
6806 watchpoints.
6807 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6808 siginfo.si_code.
72f4393d
L
6809 (linux_stopped_by_sw_breakpoint)
6810 (linux_supports_stopped_by_sw_breakpoint)
6811 (linux_stopped_by_hw_breakpoint)
6812 (linux_supports_stopped_by_hw_breakpoint): New functions.
6813 (linux_target_ops): Install new target methods.
3e572f71 6814
1ec68e26
PA
68152015-03-04 Pedro Alves <palves@redhat.com>
6816
6817 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6818 * server.c (swbreak_feature, hwbreak_feature): New globals.
6819 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6820 (captured_main): Clear swbreak_feature and hwbreak_feature.
6821 * server.h (swbreak_feature, hwbreak_feature): Declare.
6822 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6823 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6824 supports_stopped_by_hw_breakpoint>: New fields.
6825 (target_supports_stopped_by_sw_breakpoint)
6826 (target_stopped_by_sw_breakpoint)
6827 (target_supports_stopped_by_hw_breakpoint)
6828 (target_stopped_by_hw_breakpoint): Declare.
6829
15c66dd6
PA
68302015-03-04 Pedro Alves <palves@redhat.com>
6831
6832 enum lwp_stop_reason -> enum target_stop_reason
6833 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6834 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6835 (linux_wait_1, stuck_in_jump_pad_callback)
6836 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6837 (linux_stopped_by_watchpoint):
6838 * linux-low.h (enum lwp_stop_reason): Delete.
6839 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6840 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6841
98fc70d6
YQ
68422015-03-04 Yao Qi <yao.qi@linaro.org>
6843
6844 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6845
dd2ac174
GB
68462015-03-03 Gary Benson <gbenson@redhat.com>
6847
6848 * hostio.c (handle_vFile): Fix prefix lengths.
6849
d68e53f4
MM
68502015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6851
6852 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6853 ptr_bits.
6854
bf2d68ab
AA
68552015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6856
6857 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6858 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6859 (clean): Add "rm -f" for above C files.
6860 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6861 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6862 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6863 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6864 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6865 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6866 (init_registers_s390x_vx_linux64)
6867 (init_registers_s390x_tevx_linux64)
6868 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6869 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6870 declarations.
6871 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6872 (s390_store_vxrs_high): New functions.
6873 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6874 NT_S390_VXRS_HIGH.
6875 (s390_arch_setup): Add logic for selecting one of the new target
6876 descriptions. Activate the new vector regsets if applicable.
6877 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6878 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6879 and init_registers_s390x_tevx_linux64.
6880
c966a859
PA
68812015-03-01 Pedro Alves <palves@redhat.com>
6882
6883 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6884 parameter.
6885
4180215b
PA
68862015-02-27 Pedro Alves <palves@redhat.com>
6887
6888 * linux-x86-low.c (u_debugreg_offset): New function.
6889 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6890
749bab01
PA
68912015-02-27 Pedro Alves <palves@redhat.com>
6892
6893 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6894 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6895 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6896 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6897 (ps_lsetfpregs, ps_getpid)
6898 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6899 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6900 (ps_lsetxregs, ps_plog): Declare.
6901
3c14e5a3
PA
69022015-02-27 Pedro Alves <palves@redhat.com>
6903
6904 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6905 IP_AGENT_EXPORT_FUNC.
6906 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6907 IP_AGENT_EXPORT_FUNC.
6908 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6909 (IP_AGENT_EXPORT): Delete.
6910 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6911 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6912 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6913 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6914 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6915 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6916 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6917 (traceframe_read_count, traceframe_write_count)
6918 (traceframes_created, trace_state_variables, get_raw_reg)
6919 (get_trace_state_variable_value, set_trace_state_variable_value)
6920 (ust_loaded, helper_thread_id, cmd_buf): Use
6921 IPA_SYM_EXPORTED_NAME.
6922 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6923 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6924 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6925 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6926 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6927 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6928 EXTERN_C_PUSH/EXTERN_C_POP.
6929 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6930 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6931 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6932 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6933 (traceframe_write_count, traceframe_read_count)
6934 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6935 (about_to_request_buffer_space, get_trace_state_variable_value)
6936 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6937 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6938 EXTERN_C_PUSH/EXTERN_C_POP.
6939 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6940 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6941 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6942 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6943 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6944 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6945 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6946 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6947 Define.
6948 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6949 (IP_AGENT_EXPORT_VAR_DECL): Define.
6950 (tracing): Declare.
6951 (gdb_agent_get_raw_reg): Declare.
6952
fe978cb0
PA
69532015-02-27 Tom Tromey <tromey@redhat.com>
6954 Pedro Alves <palves@redhat.com>
6955
6956 Rename symbols whose names are reserved C++ keywords throughout.
6957
3bc3d82a
PA
69582015-02-27 Pedro Alves <palves@redhat.com>
6959
6960 * Makefile.in (COMPILER): New, get it from autoconf.
6961 (CXX): Get from autoconf instead.
6962 (COMPILE.pre): Use COMPILER.
6963 (CC-LD): Rename to ...
6964 (CC_LD): ... this. Use COMPILER.
6965 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6966 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6967 * acinclude.m4: Include build-with-cxx.m4.
6968 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6969 Disable -Werror by default if building in C++ mode.
6970 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6971 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6972 the C++ compiler. Save/restore CXXFLAGS too.
6973 * configure: Regenerate.
6974
07697489
PA
69752015-02-27 Pedro Alves <palves@redhat.com>
6976
6977 * acinclude.m4: Include libiberty.m4.
6978 * configure.ac: Call libiberty_INIT.
6979 * config.in, configure: Regenerate.
6980
9beb7c4e
PA
69812015-02-26 Pedro Alves <palves@redhat.com>
6982
6983 * linux-low.c (linux_wait_1): When incrementing the PC past a
6984 program breakpoint always use the_low_target.breakpoint_len as
6985 increment, rather than the maximum between that and
6986 the_low_target.decr_pc_after_break.
6987
8090aef2
PA
69882015-02-23 Pedro Alves <palves@redhat.com>
6989
6990 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6991 thread was doing a step-over; always adjust the PC if
6992 we stepped over a permanent breakpoint.
6993 (linux_wait_1): If we stepped over breakpoint that was on top of a
6994 permanent breakpoint, manually advance the PC past it.
6995
bc9540e8
PA
69962015-02-23 Pedro Alves <palves@redhat.com>
6997
6998 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6999 modes.
7000 (x86_fill_gregset, x86_store_gregset): Use it when handling
7001 $orig_eax.
7002
2db9a427
PA
70032015-02-20 Pedro Alves <palves@redhat.com>
7004
7005 * thread-db.c: Include "nat/linux-procfs.h".
7006 (thread_db_init): Skip listing new threads if the kernel supports
7007 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7008
afa8d396
PA
70092015-02-20 Pedro Alves <palves@redhat.com>
7010
7011 * linux-low.c (status_pending_p_callback): Use ptid_match.
7012
c9587f88
AT
70132015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7014
7015 PR breakpoints/16812
7016 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7017 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7018 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7019
b05ec7a5
AT
70202015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7021
7022 PR breakpoints/15956
7023 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7024
d33501a5
MM
70252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7026
7027 * linux-low.c (linux_low_btrace_conf): Print size.
7028 * server.c (handle_btrace_conf_general_set): New.
7029 (hanle_general_set): Call handle_btrace_conf_general_set.
7030 (handle_query): Report Qbtrace-conf:bts:size as supported.
7031
f4abbc16
MM
70322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7033
7034 * linux-low.c (linux_low_enable_btrace): Update parameters.
7035 (linux_low_btrace_conf): New.
7036 (linux_target_ops)<to_btrace_conf>: Initialize.
7037 * server.c (current_btrace_conf): New.
7038 (handle_btrace_enable): Rename to ...
7039 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7040 to target_enable_btrace. Update comment. Update users.
7041 (handle_qxfer_btrace_conf): New.
7042 (qxfer_packets): Add btrace-conf entry.
7043 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7044 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7045 (target_ops)<read_btrace_conf>: New.
7046 (target_enable_btrace): Update parameters.
7047 (target_read_btrace_conf): New.
7048
043c3577
MM
70492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7050
7051 * server.c (handle_btrace_general_set): Remove call to
7052 target_supports_btrace.
7053 (supported_btrace_packets): New.
7054 (handle_query): Call supported_btrace_packets.
7055 * target.h: include btrace-common.h.
7056 (btrace_target_info): Removed.
7057 (supports_btrace, target_supports_btrace): Update parameters.
7058
734b0e4b
MM
70592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7060
7061 * Makefile.in (SFILES): Add common/btrace-common.c.
7062 (OBS): Add common/btrace-common.o.
7063 (btrace-common.o): Add build rules.
7064 * linux-low: Include btrace-common.h.
7065 (linux_low_read_btrace): Use struct btrace_data. Call
7066 btrace_data_init and btrace_data_fini.
7067
d6c146e9
PA
70682015-02-06 Pedro Alves <palves@redhat.com>
7069
7070 * thread-db.c (find_new_threads_callback): Add debug output.
7071
20ba1ce6
PA
70722015-02-04 Pedro Alves <palves@redhat.com>
7073
7074 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7075 (resume_stopped_resumed_lwps): New function.
7076 (linux_wait_for_event_filtered): Use it.
7077
8cc73a39
SDJ
70782015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7079
7080 * Makefile.in (SFILES): Add linux-personality.c.
7081 (linux-personality.o): New rule.
7082 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7083 list of objects to be built.
7084 * linux-low.c: Include nat/linux-personality.h.
7085 (linux_create_inferior): Remove code to disable address space
7086 randomization (moved to ../nat/linux-personality.c). Create
7087 cleanup to disable address space randomization.
7088
fb23d554
SDJ
70892015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7090
7091 * Makefile.in (posix-strerror.o): New rule.
7092 (mingw-strerror.o): Likewise.
7093 * configure: Regenerated.
7094 * configure.ac: Source file ../common/common.host. Initialize new
7095 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7096
cdf43629
YQ
70972015-01-14 Yao Qi <yao@codesourcery.com>
7098
7099 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7100 (ppc-linux.o): New rule.
7101 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7102 * configure.ac: AC_CHECK_FUNCS(getauxval).
7103 * config.in: Re-generated.
7104 * configure: Re-generated.
7105 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7106 ppc64_64bit_inferior_p
7107
514c5338
YQ
71082015-01-14 Yao Qi <yao@codesourcery.com>
7109
7110 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7111 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7112 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7113 (PT_ORIG_R3, PT_TRAP): Likewise.
7114 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7115 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7116 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7117
3368c1e5
JB
71182015-01-10 Joel Brobecker <brobecker@adacore.com>
7119
7120 * i387-fp.c (i387_cache_to_xsave): In look over
7121 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7122 zmmh_low_space field by use of zmmh_high_space.
7123
582511be
PA
71242015-01-09 Pedro Alves <palves@redhat.com>
7125
7126 * linux-low.c (step_over_bkpt): Move higher up in the file.
7127 (handle_extended_wait): Don't store the stop_pc here.
7128 (get_stop_pc): Adjust comments and rename to ...
7129 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7130 stopped for a software breakpoint or hardware breakpoint.
7131 (thread_still_has_status_pending_p): New function.
7132 (status_pending_p_callback): Use
7133 thread_still_has_status_pending_p. If the event is no longer
7134 interesting, resume the LWP.
7135 (handle_tracepoints): Add assert.
7136 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7137 (wstatus_maybe_breakpoint): New function.
7138 (cancel_breakpoint): Delete function.
7139 (check_stopped_by_watchpoint): New function, factored out from
7140 linux_low_filter_event.
7141 (lp_status_maybe_breakpoint): Delete function.
7142 (linux_low_filter_event): Remove filter_ptid argument.
7143 Leave thread group exits pending here. Store the LWP's stop PC.
7144 Always leave events pending.
7145 (linux_wait_for_event_filtered): Pull all events out of the
7146 kernel, and leave them all pending.
7147 (count_events_callback, select_event_lwp_callback): Consider all
7148 events.
7149 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7150 (select_event_lwp): Only give preference to the stepping LWP in
7151 all-stop mode. Adjust comments.
7152 (ignore_event): New function.
7153 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7154 references to cancel_breakpoints. Adjust to renames. Also give
7155 equal priority to all LWPs that have had events in non-stop mode.
7156 If reporting a software breakpoint event, unadjust the LWP's PC.
7157 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7158 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7159 Adjust.
7160 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7161 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7162 (linux_stopped_by_watchpoint): Adjust.
7163 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7164 * linux-low.h (enum lwp_stop_reason): New.
7165 (struct lwp_info) <stop_pc>: Adjust comment.
7166 <stopped_by_watchpoint>: Delete field.
7167 <stop_reason>: New field.
7168 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7169 * mem-break.c (software_breakpoint_inserted_here)
7170 (hardware_breakpoint_inserted_here): New function.
7171 * mem-break.h (software_breakpoint_inserted_here)
7172 (hardware_breakpoint_inserted_here): Declare.
7173 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7174 (cancel_breakpoints): Delete.
7175 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7176 (upload_fast_traceframes): Remove references to
7177 cancel_breakpoints.
7178
a33e3959
PA
71792015-01-09 Pedro Alves <palves@redhat.com>
7180
7181 * thread-db.c (find_new_threads_callback): Ignore thread if the
7182 kernel thread ID is -1.
7183
8784d563
PA
71842015-01-09 Pedro Alves <palves@redhat.com>
7185
7186 * linux-low.c (linux_attach_fail_reason_string): Move to
7187 nat/linux-ptrace.c, and rename.
7188 (linux_attach_lwp): Update comment.
7189 (attach_proc_task_lwp_callback): New function.
7190 (linux_attach): Adjust to rename and use
7191 linux_proc_attach_tgid_threads.
7192 (linux_attach_fail_reason_string): Delete declaration.
7193
76f2b779
JB
71942015-01-01 Joel Brobecker <brobecker@adacore.com>
7195
7196 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7197 * server.c (gdbserver_version): Likewise.
7198
fafcc06a
SDJ
71992014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7200
7201 * remote-utils.c: Include ctype.h.
7202 (input_interrupt): Explicitly handle the case when the char
7203 received is the NUL byte. Improve the printing of non-ASCII
7204 characters.
7205
beed38b8
JB
72062014-12-16 Joel Brobecker <brobecker@adacore.com>
7207
7208 * linux-low.c (linux_low_filter_event): Update call to
7209 linux_enable_event_reporting following the addition of
7210 a new parameter to that function.
7211
bf330350
CU
72122014-12-16 Catalin Udma <catalin.udma@freescale.com>
7213
7214 PR server/17457
7215 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7216 (AARCH64_FPCR_REGNO): Likewise.
7217 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7218 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7219 (aarch64_store_fpregset): Likewise.
7220
5227d625
JB
72212014-12-15 Joel Brobecker <brobecker@adacore.com>
7222
7223 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7224 Remove FIXME comment about assumption about N.
7225
f93b65a0
JB
72262014-12-13 Joel Brobecker <brobecker@adacore.com>
7227
7228 * configure.ac: If large-file support is disabled in GDBserver,
7229 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7230 * configure: Regenerate.
7231
e5a9158d
AA
72322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7233
7234 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7235 warning upon ENODATA from ptrace.
7236 * linux-s390-low.c (s390_store_tdb): New.
7237 (s390_regsets): Add regset for NT_S390_TDB.
7238
feea5f36
AA
72392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7240
7241 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7242 without a fill_function.
7243 * linux-s390-low.c (s390_fill_last_break): Remove.
7244 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7245 (s390_arch_setup): Use regset's size instead of fill_function for
7246 loop end condition.
7247
098dbe61
AA
72482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7249
7250 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7251 the regset's store function when ptrace returned an error.
7252 * regcache.c (get_thread_regcache): Invalidate register cache
7253 before fetching inferior's registers.
7254
28eef672
AA
72552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7256
7257 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7258 while-loop as for-loop.
7259 (regsets_store_inferior_registers): Likewise.
7260
bdca27a2
YQ
72612014-11-28 Yao Qi <yao@codesourcery.com>
7262
7263 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7264 * config.in, configure: Re-generate.
7265 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7266 is defined.
7267
9c232dda
YQ
72682014-11-21 Yao Qi <yao@codesourcery.com>
7269
7270 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7271 (AC_CHECK_HEADERS): Remove malloc.h.
7272 * configure: Re-generated.
7273 * config.in: Re-generated.
7274 * server.h: Don't include alloca.h and malloc.h.
7275 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7276 Don't include malloc.h.
7277
43968415
JB
72782014-11-17 Joel Brobecker <brobecker@adacore.com>
7279
7280 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7281 corresponding ERRNO check in same block.
7282
40e91bc7
PA
72832014-11-12 Pedro Alves <palves@redhat.com>
7284
7285 * server.c (cont_thread): Update comment.
7286 (start_inferior, attach_inferior): No longer clear cont_thread.
7287 (handle_v_cont): No longer set cont_thread.
7288 (captured_main): Clear cont_thread each time a GDB connects.
7289
c2c118cf
PA
72902014-11-12 Pedro Alves <palves@redhat.com>
7291
7292 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7293 thread, and don't resume all threads if the Hc thread has exited.
7294
78708b7c
PA
72952014-11-12 Pedro Alves <palves@redhat.com>
7296
7297 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7298 the process group instead of to a specific LWP.
7299
a2abc7de
PA
73002014-10-15 Pedro Alves <palves@redhat.com>
7301
7302 PR server/17487
7303 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7304 parameter.
7305 (arm_set_thread_context): Delete.
7306 (the_low_target): Adjust.
7307 * win32-i386-low.c (debug_registers_changed)
7308 (debug_registers_used): Delete.
7309 (update_debug_registers_callback): New function.
7310 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7311 needing to update their debug registers.
7312 (win32_get_current_dr): New function.
7313 (x86_dr_low_get_addr, x86_dr_low_get_control)
7314 (x86_dr_low_get_status): Fetch the debug register from the thread
7315 record's context.
7316 (i386_initial_stuff): Adjust.
7317 (i386_get_thread_context): Remove current_event parameter. Don't
7318 clear debug_registers_changed nor copy DR values to
7319 debug_reg_state.
7320 (i386_set_thread_context): Delete.
7321 (i386_prepare_to_resume): New function.
7322 (i386_thread_added): Mark the thread as needing to update irs
7323 debug registers.
7324 (the_low_target): Remove i386_set_thread_context and install
7325 i386_prepare_to_resume.
7326 * win32-low.c (win32_get_thread_context): Adjust.
7327 (win32_set_thread_context): Use SetThreadContext
7328 directly.
7329 (win32_prepare_to_resume): New function.
7330 (win32_require_context): New function, factored out from ...
7331 (thread_rec): ... this.
7332 (continue_one_thread): Call win32_prepare_to_resume on each thread
7333 we're about to continue.
7334 (win32_resume): Call win32_prepare_to_resume on the event thread.
7335 * win32-low.h (struct win32_thread_info)
7336 <debug_registers_changed>: New field.
7337 (struct win32_target_ops): Change prototype of set_thread_context,
7338 delete set_thread_context and add prepare_to_resume.
7339 (win32_require_context): New declaration.
7340
a442d071
GB
73412014-10-08 Gary Benson <gbenson@redhat.com>
7342
7343 * server.h: Do not include common-exceptions.h.
7344
6f1947e8
GB
73452014-10-08 Gary Benson <gbenson@redhat.com>
7346
7347 * server.h: Do not include cleanups.h.
7348
63b434a4
JH
73492014-09-30 James Hogan <james.hogan@imgtec.com>
7350
7351 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7352 mips64-dsp-linux.c.
7353
c4d9ceb6
YQ
73542014-09-23 Yao Qi <yao@codesourcery.com>
7355
7356 * linux-low.c (lp_status_maybe_breakpoint): New function.
7357 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7358 (count_events_callback): Likewise.
7359 (select_event_lwp_callback): Likewise.
7360 (cancel_breakpoints_callback): Likewise.
7361
89a5711c
DB
73622014-09-19 Don Breazeal <donb@codesourcery.com>
7363
7364 * linux-low.c (handle_extended_wait): Call
7365 linux_ptrace_get_extended_event.
7366 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7367 linux_is_extended_waitstatus.
7368
bffc0964
JB
73692014-09-16 Joel Brobecker <brobecker@adacore.com>
7370
7371 * Makefile.in (CPPFLAGS): Define.
7372 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7373 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7374
0bfdf32f
GB
73752014-09-16 Gary Benson <gbenson@redhat.com>
7376
7377 * inferiors.h (current_inferior): Renamed as...
7378 (current_thread): New variable. All uses updated.
7379 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7380 (maybe_move_out_of_jump_pad): Likewise.
7381 (cancel_breakpoint): Likewise.
7382 (linux_low_filter_event): Likewise.
7383 (wait_for_sigstop): Likewise.
7384 (linux_resume_one_lwp): Likewise.
7385 (need_step_over_p): Likewise.
7386 (start_step_over): Likewise.
7387 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7388 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7389 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7390 and save_inferior as saved_thread.
7391 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7392 saved_thread.
7393 (regcache_invalidate_thread): Likewise.
7394 * remote-utils.c (prepare_resume_reply): Likewise.
7395 * thread-db.c (thread_db_get_tls_address): Likewise.
7396 (disable_thread_event_reporting): Likewise.
7397 (remove_thread_event_breakpoints): Likewise.
7398 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7399 as saved_thread.
7400 * target.h (set_desired_inferior): Renamed as...
7401 (set_desired_thread): New declaration. All uses updated.
7402 * server.c (myresume): Updated comment to reference thread instead
7403 of inferior.
7404 (handle_serial_event): Likewise.
7405 (handle_target_event): Likewise.
7406
361c8ade
GB
74072014-09-12 Tom Tromey <tromey@redhat.com>
7408 Gary Benson <gbenson@redhat.com>
7409
7410 * regcache.h: Include common-regcache.h.
7411 (regcache_read_pc): Don't declare.
7412 * regcache.c (get_thread_regcache_for_ptid): New function.
7413
bd9269f7
GB
74142014-09-11 Tom Tromey <tromey@redhat.com>
7415 Gary Benson <gbenson@redhat.com>
7416
7417 * symbol.c: New file.
7418 * Makefile.in (SFILES): Add symbol.c.
7419 (OBS): Add symbol.o.
7420
f8c1d06b
GB
74212014-09-11 Gary Benson <gbenson@redhat.com>
7422
7423 * target.c (target_stop_ptid, target_continue_ptid): New
7424 functions.
7425
721ec300
GB
74262014-09-11 Tom Tromey <tromey@redhat.com>
7427 Gary Benson <gbenson@redhat.com>
7428
7429 * target.h: Include target/target.h.
7430 * target.c (target_read_memory, target_read_uint32)
7431 (target_write_memory): New functions.
7432
c5e92cca
GB
74332014-09-11 Gary Benson <gbenson@redhat.com>
7434
7435 * server.h (debug_hw_points): Don't declare.
7436 * server.c (debug_hw_points): Don't define. Replace all uses
7437 with show_debug_regs.
7438 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7439 all uses with show_debug_regs.
7440
2e4bb98a
EBM
74412014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7442
7443 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7444 endianness into account.
7445 (ppc_supply_ptrace_register): Likewise.
7446
ac740bc7
JH
74472014-09-03 James Hogan <james.hogan@imgtec.com>
7448
7449 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7450 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7451
97ea6506
GB
74522014-09-03 Gary Benson <gbenson@redhat.com>
7453
7454 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7455 ALL_DEBUG_ADDRESS_REGISTERS.
7456
df7e5265
GB
74572014-09-02 Gary Benson <gbenson@redhat.com>
7458
7459 * i386-low.h: Renamed as...
7460 * x86-low.h: New file. All type, function and variable name
7461 prefixes changed from "i386_" to "x86_". All references updated.
7462 * i386-low.c: Renamed as...
7463 * x86-low.c: New file. All type, function and variable name
7464 prefixes changed from "i386_" to "x86_". All references updated.
7465
ed859da7
GB
74662014-09-02 Gary Benson <gbenson@redhat.com>
7467
7468 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7469 (x86_linux_new_thread): Likewise.
7470
860789c7
GB
74712014-08-29 Gary Benson <gbenson@redhat.com>
7472
7473 * server.h (setjmp.h): Do not include.
7474 (toplevel): Do not declare.
7475 (common-exceptions.h): Include.
7476 (cleanups.h): Likewise.
7477 * server.c (toplevel): Do not define.
7478 (exit_code): New static global.
7479 (detach_or_kill_for_exit_cleanup): New function.
7480 (main): New function. Original main renamed to...
7481 (captured_main): New function.
7482 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7483
ff55e1b5
GB
74842014-08-29 Gary Benson <gbenson@redhat.com>
7485
7486 * Makefile.in (SFILES): Add common/common-exceptions.c.
7487 (OBS): Add common-exceptions.o.
7488 (common-exceptions.o): New rule.
7489 * utils.c (prepare_to_throw_exception): New function.
7490
e9bcb658
GB
74912014-08-29 Gary Benson <gbenson@redhat.com>
7492
7493 * config.in: Regenerate.
7494 * configure: Likewise.
7495
e3180625
GB
74962014-08-29 Gary Benson <gbenson@redhat.com>
7497
7498 * Makefile.in (SFILES): Add common/cleanups.c.
7499 (OBS): cleanups.o.
7500 (cleanups.o): New rule.
7501
e3d6ba5d
GB
75022014-08-29 Gary Benson <gbenson@redhat.com>
7503
7504 * utils.c (internal_vwarning): New function.
7505
7096e886
GB
75062014-08-28 Gary Benson <gbenson@redhat.com>
7507
7508 * utils.h (fatal): Remove declaration.
7509 * utils.c (fatal): Remove function.
7510
14ce3192
GB
75112014-08-28 Gary Benson <gbenson@redhat.com>
7512
7513 * tracepoint.c (gdb_agent_init): Replace fatal with
7514 perror_with_name.
7515 (initialize_tracepoint): Likewise.
7516
50278d59
GB
75172014-08-28 Gary Benson <gbenson@redhat.com>
7518
7519 * remote-utils.c (remote_prepare): Replace fatal with error.
7520
aa96c426
GB
75212014-08-28 Gary Benson <gbenson@redhat.com>
7522
7523 * linux-low.c (linux_async): Replace fatal with warning.
7524 Tidy up and return.
7525 (linux_start_non_stop): Return -1 if linux_async failed.
7526
f7160e97
GB
75272014-08-28 Gary Benson <gbenson@redhat.com>
7528
7529 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7530 gdb_assert.
7531 (i386_dr_low_get_addr): Remove vague comment.
7532 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7533 gdb_assert.
7534
38e08fca
GB
75352014-08-28 Gary Benson <gbenson@redhat.com>
7536
7537 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7538 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7539 internal_error.
7540 (linux_resume_one_lwp): Likewise.
7541 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7542 gdb_assert.
7543 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7544 with internal_error.
7545 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7546 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7547 (find_register_by_name): Replace fatal with internal_error.
7548 (find_regno): Likewise.
7549 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7550 * thread-db.c (thread_db_create_event): Likewise.
7551 (thread_db_load_search): Likewise.
7552 (try_thread_db_load_1): Likewise.
7553 * tracepoint.c (get_jump_space_head): Replace fatal with
7554 internal_error.
7555 (claim_trampoline_space): Likewise.
7556 (have_fast_tracepoint_trampoline_buffer): Likewise.
7557 (cmd_qtstart): Likewise.
7558 (stop_tracing): Likewise.
7559 (fast_tracepoint_collecting): Likewise.
7560 (target_malloc): Likewise.
7561 (download_tracepoint): Likewise.
7562 (download_trace_state_variables): Replace check with gdb_assert.
7563 (upload_fast_traceframes): Replace fatal with internal_error.
7564
34abf635
GB
75652014-08-19 Tom Tromey <tromey@redhat.com>
7566 Gary Benson <gbenson@redhat.com>
7567
7568 * Makefile.in (SFILES): Add common/common-debug.c.
7569 (OBS): Add common-debug.o.
7570 (common-debug.o): New rule.
7571 * debug.h (debug_printf): Don't declare.
7572 * debug.c (debug_printf): Renamed and rewritten as...
7573 (debug_vprintf): New function.
7574
f6e94d78
GB
75752014-08-19 Gary Benson <gbenson@redhat.com>
7576
7577 * utils.h: Do not include print-utils.h.
7578
9239eeab
GB
75792014-08-19 Tom Tromey <tromey@redhat.com>
7580 Gary Benson <gbenson@redhat.com>
7581
7582 * server.h: Add static assertion.
7583 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7584
ef87c8bb
GB
75852014-08-19 Tom Tromey <tromey@redhat.com>
7586 Gary Benson <gbenson@redhat.com>
7587
7588 * Makefile.in (SFILES): Add common/errors.c.
7589 (OBS): Add errors.o.
7590 (IPA_OBS): Add errors-ipa.o.
7591 (errors.o): New rule.
7592 (errors-ipa.o): Likewise.
7593 * utils.h (perror_with_name, error, warning): Don't declare.
7594 * utils.c (warning): Renamed and rewritten as...
7595 (vwarning): New function.
7596 (error): Renamed and rewritten as...
7597 (verror): New function.
7598 (internal_error): Renamed and rewritten as...
7599 (internal_verror): New function.
7600
bb974a24
GB
76012014-08-07 Gary Benson <gbenson@redhat.com>
7602
7603 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7604 * configure: Regenerate.
7605 * config.in: Likewise.
7606 * server.h: Do not include errno.h.
7607 * event-loop.c: Likewise.
7608 * hostio-errno.c: Likewise.
7609 * linux-low.c: Likewise.
7610 * remote-utils.c: Likewise.
7611 * spu-low.c: Likewise.
7612 * utils.c: Likewise.
7613 * gdbreplay.c: Unconditionally include errno.h.
7614
6d3d12eb
GB
76152014-08-07 Gary Benson <gbenson@redhat.com>
7616
7617 * server.h: Do not include string.h.
7618 * event-loop.c: Likewise.
7619 * linux-low.c: Likewise.
7620 * regcache.c: Likewise.
7621 * remote-utils.c: Likewise.
7622 * spu-low.c: Likewise.
7623 * utils.c: Likewise.
7624
dccbb609
GB
76252014-08-07 Gary Benson <gbenson@redhat.com>
7626
7627 * server.h: Do not include gdb_assert.h.
7628
e76df0d0
GB
76292014-08-07 Gary Benson <gbenson@redhat.com>
7630
7631 * server.h: Do not include common-utils.h.
7632
4cb9c816
GB
76332014-08-07 Gary Benson <gbenson@redhat.com>
7634
7635 * server.h: Do not include ptid.h.
7636 * notif.h: Likewise.
7637
3995eeee
GB
76382014-08-07 Gary Benson <gbenson@redhat.com>
7639
7640 * server.h: Do not include gdb_locale.h.
7641
cb9f1a9b
GB
76422014-08-07 Gary Benson <gbenson@redhat.com>
7643
7644 * server.h: Do not include gdb/signals.h.
7645 * win32-low.c: Likewise.
7646
a5fceff8
GB
76472014-08-07 Gary Benson <gbenson@redhat.com>
7648
7649 * server.h: Do not include pathmax.h.
7650
b9391142
GB
76512014-08-07 Gary Benson <gbenson@redhat.com>
7652
7653 * server.h: Do not include libiberty.h.
7654 * linux-bfin-low.c: Likewise.
7655
0e443c87
GB
76562014-08-07 Gary Benson <gbenson@redhat.com>
7657
7658 * server.h: Do not include ansidecl.h.
7659
8ebb3f56
GB
76602014-08-07 Gary Benson <gbenson@redhat.com>
7661
7662 * linux-x86-low.c: Do not include stddef.h.
7663 * lynx-ppc-low.c: Likewise.
7664 * tracepoint.c: Likewise.
7665
8980bdf6
GB
76662014-08-07 Gary Benson <gbenson@redhat.com>
7667
7668 * server.h: Do not include stdarg.h.
7669 * nto-low.c: Likewise.
7670
d7096f71
GB
76712014-08-07 Gary Benson <gbenson@redhat.com>
7672
7673 * server.h: Do not include stdlib.h.
7674 * inferiors.c: Likewise.
7675 * linux-low.c: Likewise.
7676 * regcache.c: Likewise.
7677 * spu-low.c: Likewise.
7678 * tracepoint.c: Likewise.
7679 * utils.c: Likewise.
7680
d02f550d
GB
76812014-08-07 Gary Benson <gbenson@redhat.com>
7682
7683 * server.h: Do not include stdio.h.
7684 * linux-low.c: Likewise.
7685 * remote-utils.c: Likewise.
7686 * spu-low.c: Likewise.
7687 * utils.c: Likewise.
7688 * wincecompat.c: Likewise.
7689
87f6c4e3
GB
76902014-08-06 Gary Benson <gbenson@redhat.com>
7691
7692 * regcache.c (init_register_cache): Move conditionals inside if.
7693
7089dca4
GB
76942014-08-06 Gary Benson <gbenson@redhat.com>
7695
7696 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7697
462f517e
GB
76982014-07-31 Gary Benson <gbenson@redhat.com>
7699
7700 * ax.h: Do not include server.h.
7701 * gdbthread.h: Likewise.
7702 * lynx-low.h: Likewise.
7703 * notif.h: Likewise.
7704
976411d6
GB
77052014-07-30 Gary Benson <gbenson@redhat.com>
7706
7707 * server.h: Include common-defs.h.
7708 Do not include config.h or build-gnulib-gdbserver/config.h.
7709
d41f6d8e
GB
77102014-07-30 Gary Benson <gbenson@redhat.com>
7711
7712 * hostio-errno.c: Move server.h to top of includes list.
7713 * inferiors.c: Likewise.
7714 * linux-x86-low.c: Likewise.
7715 * notif.c: Include server.h.
7716
314c6a35
TT
77172014-07-24 Tom Tromey <tromey@redhat.com>
7718 Gary Benson <gbenson@redhat.com>
7719
7720 * server.h (CORE_ADDR): Now unsigned.
7721
69ff6be5
PA
77222014-07-16 Pedro Alves <palves@redhat.com>
7723
7724 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7725
ce9e3fe7
PA
77262014-07-15 Pedro Alves <palves@redhat.com>
7727
7728 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7729 copy.
7730
e76126e8
PA
77312014-07-11 Pedro Alves <palves@redhat.com>
7732
7733 * linux-low.c (kill_wait_lwp): New function, based on
7734 kill_one_lwp_callback, but use my_waitpid directly.
7735 (kill_one_lwp_callback, linux_kill): Use it.
7736
8e9db26e
PA
77372014-06-23 Pedro Alves <palves@redhat.com>
7738
7739 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7740 before setting DR0..DR3.
7741
698b3e08
GB
77422014-06-20 Gary Benson <gbenson@redhat.com>
7743
7744 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7745 * configure: Regenerated.
7746 * config.in: Likewise.
7747
125f8a3d
GB
77482014-06-20 Gary Benson <gbenson@redhat.com>
7749
7750 * Makefile.in (SFILES): Update locations for files moved
7751 from common to nat.
7752 (object file files): Reordered.
7753
42995dbd
GB
77542014-06-20 Gary Benson <gbenson@redhat.com>
7755
7756 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7757 (i386_dr_low_set_addr): Likewise.
7758 (i386_dr_low_get_addr): Likewise.
7759 (i386_dr_low_can_set_control): Likewise.
7760 (i386_dr_low_set_control): Likewise.
7761 (i386_dr_low_get_control): Likewise.
7762 (i386_dr_low_get_status): Likewise.
7763 (i386_get_debug_register_length): Likewise.
7764 * linux-x86-low.c (i386_dr_low_set_addr):
7765 Changed signature. Made static.
7766 (i386_dr_low_get_addr): Likewise.
7767 (i386_dr_low_set_control): Likewise.
7768 (i386_dr_low_get_control): Likewise.
7769 (i386_dr_low_get_status): Likewise.
7770 (i386_dr_low): New global variable.
7771 * win32-i386-low.c (i386_dr_low_set_addr):
7772 Changed signature. Made static.
7773 (i386_dr_low_get_addr): Likewise.
7774 (i386_dr_low_set_control): Likewise.
7775 (i386_dr_low_get_control): Likewise.
7776 (i386_dr_low_get_status): Likewise.
7777 (i386_dr_low): New global variable.
7778
e1d2394b
MS
77792014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7780
7781 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7782 * Makefile.in (AR, AR_FLAGS): Define.
7783 * configure: Regenerate.
7784
3a8ee006
GB
77852014-06-19 Gary Benson <gbenson@redhat.com>
7786
7787 * Makefile.in (i386-dregs.o): New rule.
7788 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7789 * i386-low.c (target.h): Remove include.
7790 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7791 (DR_CONTROL_SHIFT): Likewise.
7792 (DR_CONTROL_SIZE): Likewise.
7793 (DR_RW_EXECUTE): Likewise.
7794 (DR_RW_WRITE): Likewise.
7795 (DR_RW_READ): Likewise.
7796 (DR_RW_IORW): Likewise.
7797 (DR_LEN_1): Likewise.
7798 (DR_LEN_2): Likewise.
7799 (DR_LEN_4): Likewise.
7800 (DR_LEN_8): Likewise.
7801 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7802 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7803 (DR_ENABLE_SIZE): Likewise.
7804 (DR_LOCAL_SLOWDOWN): Likewise.
7805 (DR_GLOBAL_SLOWDOWN): Likewise.
7806 (DR_CONTROL_RESERVED): Likewise.
7807 (I386_DR_CONTROL_MASK): Likewise.
7808 (I386_DR_VACANT): Likewise.
7809 (I386_DR_LOCAL_ENABLE): Likewise.
7810 (I386_DR_GLOBAL_ENABLE): Likewise.
7811 (I386_DR_DISABLE): Likewise.
7812 (I386_DR_SET_RW_LEN): Likewise.
7813 (I386_DR_GET_RW_LEN): Likewise.
7814 (I386_DR_WATCH_HIT): Likewise.
7815 (i386_wp_op_t): Likewise.
7816 (i386_show_dr): Likewise.
7817 (i386_length_and_rw_bits): Likewise.
7818 (i386_insert_aligned_watchpoint): Likewise.
7819 (i386_remove_aligned_watchpoint): Likewise.
7820 (i386_handle_nonaligned_watchpoint): Likewise.
7821 i386_update_inferior_debug_regs(): Likewise.
7822 (i386_dr_insert_watchpoint): Likewise.
7823 (i386_dr_remove_watchpoint): Likewise.
7824 (i386_dr_region_ok_for_watchpoint): Likewise.
7825 (i386_dr_stopped_data_address): Likewise.
7826 (i386_dr_stopped_by_watchpoint): Likewise.
7827
8f26655c
GB
78282014-06-19 Gary Benson <gbenson@redhat.com>
7829
7830 * i386-low.c (i386_dr_show): Renamed to
7831 i386_show_dr and made static. All uses updated.
7832 (i386_dr_length_and_rw_bits): Renamed to
7833 i386_length_and_rw_bits and made static.
7834 All uses updated.
7835 (i386_dr_insert_aligned_watchpoint): Renamed to
7836 i386_insert_aligned_watchpoint and made static.
7837 All uses updated.
7838 (i386_dr_remove_aligned_watchpoint): Renamed to
7839 i386_remove_aligned_watchpoint and made static.
7840 All uses updated.
7841 (i386_dr_update_inferior_debug_regs): Renamed to
7842 i386_update_inferior_debug_regs and made static.
7843 All uses updated.
7844
b9228891
GB
78452014-06-18 Gary Benson <gbenson@redhat.com>
7846
5171def3
GB
7847 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7848 (i386_dr_low_can_set_control): Likewise.
7849 (i386_get_debug_register_length): Likewise.
7850 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7851 (i386_dr_low_can_set_control): Likewise.
7852 (i386_get_debug_register_length): Likewise.
7853
78542014-06-17 Gary Benson <gbenson@redhat.com>
7855
b9228891
GB
7856 * i386-low.h (i386-dregs.h): New include.
7857 (DR_FIRSTADDR): Now in i386-dregs.h.
7858 (DR_LASTADDR): Likewise.
7859 (DR_NADDR): Likewise.
7860 (DR_STATUS): Likewise.
7861 (DR_CONTROL): Likewise.
7862 (i386_debug_reg_state): Likewise.
7863 (i386_dr_insert_watchpoint): Likewise.
7864 (i386_dr_remove_watchpoint): Likewise.
7865 (i386_dr_region_ok_for_watchpoint): Likewise.
7866 (i386_dr_stopped_data_address): Likewise.
7867 (i386_dr_stopped_by_watchpoint): Likewise.
7868 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7869
4be83cc2
GB
78702014-06-18 Gary Benson <gbenson@redhat.com>
7871
7872 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7873 i386_dr_insert_watchpoint.
7874 (i386_low_remove_watchpoint): Renamed to
7875 i386_dr_remove_watchpoint.
7876 (i386_low_region_ok_for_watchpoint): Renamed to
7877 i386_dr_region_ok_for_watchpoint.
7878 (i386_low_stopped_data_address): Renamed to
7879 i386_dr_stopped_data_address.
7880 (i386_low_stopped_by_watchpoint): Renamed to
7881 i386_dr_stopped_by_watchpoint.
7882 * i386-low.c (i386_show_dr): Renamed to
7883 i386_dr_show and made nonstatic. All uses updated.
7884 (i386_length_and_rw_bits): Renamed to
7885 i386_dr_length_and_rw_bits and made nonstatic.
7886 All uses updated.
7887 (i386_insert_aligned_watchpoint): Renamed to
7888 i386_dr_insert_aligned_watchpoint and made nonstatic.
7889 All uses updated.
7890 (i386_remove_aligned_watchpoint): Renamed to
7891 i386_dr_remove_aligned_watchpoint and made nonstatic.
7892 All uses updated.
7893 (i386_update_inferior_debug_regs): Renamed to
7894 i386_dr_update_inferior_debug_regs and made nonstatic.
7895 All uses updated.
7896 (i386_low_insert_watchpoint): Renamed to
7897 i386_dr_insert_watchpoint. All uses updated.
7898 (i386_low_remove_watchpoint): Renamed to
7899 i386_dr_remove_watchpoint. All uses updated.
7900 (i386_low_region_ok_for_watchpoint): Renamed to
7901 i386_dr_region_ok_for_watchpoint. All uses updated.
7902 (i386_low_stopped_data_address): Renamed to
7903 i386_dr_stopped_data_address. All uses updated.
7904 (i386_low_stopped_by_watchpoint): Renamed to
7905 i386_dr_stopped_by_watchpoint. All uses updated.
7906
131aa0d4
GB
79072014-06-18 Gary Benson <gbenson@redhat.com>
7908
7909 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7910 (i386_dr_low_can_set_control): Likewise.
7911 (i386_insert_aligned_watchpoint): New check.
7912
d9305f7f
GB
79132014-06-18 Gary Benson <gbenson@redhat.com>
7914
7915 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7916 Renamed to state.
7917
e927c9fc
GB
79182014-06-18 Gary Benson <gbenson@redhat.com>
7919
7920 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7921 instead of fatal and error.
7922 (i386_handle_nonaligned_watchpoint): Likewise.
7923
1b6d4134
GB
79242014-06-18 Gary Benson <gbenson@redhat.com>
7925
7926 * i386-low.c (i386_get_debug_register_length): New macro.
7927 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7928 (i386_show_dr): Use debug_printf instead of fprintf. Use
7929 phex to format values.
7930
6e62758f
GB
79312014-06-18 Gary Benson <gbenson@redhat.com>
7932
7933 * i386-low.h: Comment changes.
7934 * i386-low.c: Likewise.
7935
fc6e2f03
GB
79362014-06-18 Gary Benson <gbenson@redhat.com>
7937
7938 * i386-low.c: Whitespace changes.
7939
f9d1eeed
TT
79402014-06-12 Tom Tromey <tromey@redhat.com>
7941
7942 * utils.c (freeargv): Remove.
7943
0b04e523
TT
79442014-06-12 Tom Tromey <tromey@redhat.com>
7945
7946 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7947 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7948 (parse_debug_format_options): Likewise.
7949 (gdbserver_usage): Likewise.
7950 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7951 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7952 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7953 against libiberty.
7954 ($(LIBGNU)): Depend on libiberty.
7955 (all-lib): Recurse into all subdirs.
7956 (install-only): Invoke "install" target in subdirs.
7957 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7958 targets.
7959 * configure: Rebuild.
7960 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7961 for vasprintf, vsnprintf, or gettimeofday.
7962 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7963 srv_tgtobj.
7964
270c9937
JB
79652014-06-05 Joel Brobecker <brobecker@adacore.com>
7966
7967 * development.sh: Delete.
7968 * Makefile.in (config.status): Adjust dependency on development.sh.
7969 * configure.ac: Adjust development.sh source call.
7970 * configure: Regenerate.
7971
0a261ed8
PA
79722014-06-02 Pedro Alves <palves@redhat.com>
7973
7974 * ax.c (gdb_free_agent_expr): New function.
7975 * ax.h (gdb_free_agent_expr): New declaration.
7976 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7977 list.
7978 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7979 static.
7980 (clear_breakpoint_conditions_and_commands): New function.
7981 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7982 (clear_breakpoint_conditions_and_commands): New declaration.
7983
e9dae05e
RR
79842014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7985
7986 * linux-aarch64-low.c (asm/ptrace.h): Include.
7987
5876f503
JK
79882014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7989
7990 Fix TLS access for -static -pthread.
7991 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7992 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7993 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7994
802e8e6d
PA
79952014-05-20 Pedro Alves <palves@redhat.com>
7996
7997 * linux-aarch64-low.c (aarch64_insert_point)
7998 (aarch64_remove_point): No longer check whether the type is
7999 supported here. Adjust to new interface.
8000 (the_low_target): Install aarch64_supports_z_point_type as
8001 supports_z_point_type method.
8002 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8003 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8004 instead of a Z packet char. Adjust.
8005 (arm_supports_z_point_type): New function.
8006 (arm_insert_point, arm_remove_point): Adjust to new interface.
8007 (the_low_target): Install arm_supports_z_point_type.
8008 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8009 (cris_insert_point, cris_remove_point): Adjust to new interface.
8010 Don't check whether the type is supported here.
8011 (the_low_target): Install cris_supports_z_point_type.
8012 * linux-low.c (linux_supports_z_point_type): New function.
8013 (linux_insert_point, linux_remove_point): Adjust to new interface.
8014 * linux-low.h (struct linux_target_ops) <insert_point,
8015 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8016 raw_breakpoint pointer parameter.
8017 <supports_z_point_type>: New method.
8018 * linux-mips-low.c (mips_supports_z_point_type): New function.
8019 (mips_insert_point, mips_remove_point): Adjust to new interface.
8020 Use mips_supports_z_point_type.
8021 (the_low_target): Install mips_supports_z_point_type.
8022 * linux-ppc-low.c (the_low_target): Install NULL as
8023 supports_z_point_type method.
8024 * linux-s390-low.c (the_low_target): Install NULL as
8025 supports_z_point_type method.
8026 * linux-sparc-low.c (the_low_target): Install NULL as
8027 supports_z_point_type method.
8028 * linux-x86-low.c (x86_supports_z_point_type): New function.
8029 (x86_insert_point): Adjust to new insert_point interface. Use
8030 insert_memory_breakpoint. Adjust to new
8031 i386_low_insert_watchpoint interface.
8032 (x86_remove_point): Adjust to remove_point interface. Use
8033 remove_memory_breakpoint. Adjust to new
8034 i386_low_remove_watchpoint interface.
8035 (the_low_target): Install x86_supports_z_point_type.
8036 * lynx-low.c (lynx_target_ops): Install NULL as
8037 supports_z_point_type callback.
8038 * nto-low.c (nto_supports_z_point_type): New.
8039 (nto_insert_point, nto_remove_point): Adjust to new interface.
8040 (nto_target_ops): Install nto_supports_z_point_type.
8041 * mem-break.c: Adjust intro comment.
8042 (struct raw_breakpoint) <raw_type, size>: New fields.
8043 <inserted>: Update comment.
8044 <shlib_disabled>: Delete field.
8045 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8046 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8047 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8048 (raw_bkpt_type_to_target_hw_bp_type): New function.
8049 (find_enabled_raw_code_breakpoint_at): New function.
8050 (find_raw_breakpoint_at): New type and size parameters. Use them.
8051 (insert_memory_breakpoint): New function, based off
8052 set_raw_breakpoint_at.
8053 (remove_memory_breakpoint): New function.
8054 (set_raw_breakpoint_at): Reimplement.
8055 (set_breakpoint): New, based on set_breakpoint_at.
8056 (set_breakpoint_at): Reimplement.
8057 (delete_raw_breakpoint): Go through the_target->remove_point
8058 instead of assuming memory breakpoints.
8059 (find_gdb_breakpoint_at): Delete.
8060 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8061 (find_gdb_breakpoint): New function.
8062 (set_gdb_breakpoint_at): Delete.
8063 (z_type_supported): New function.
8064 (set_gdb_breakpoint_1): New function, loosely based off
8065 set_gdb_breakpoint_at.
8066 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8067 (delete_gdb_breakpoint_at): Delete.
8068 (delete_gdb_breakpoint_1): New function, loosely based off
8069 delete_gdb_breakpoint_at.
8070 (delete_gdb_breakpoint): New function.
8071 (clear_gdb_breakpoint_conditions): Rename to ...
8072 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8073 breakpoint.
8074 (add_condition_to_breakpoint): Make static.
8075 (add_breakpoint_condition): Take a struct breakpoint pointer
8076 instead of an address. Adjust.
8077 (gdb_condition_true_at_breakpoint): Rename to ...
8078 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8079 z_type parameter.
8080 (gdb_condition_true_at_breakpoint): Reimplement.
8081 (add_breakpoint_commands): Take a struct breakpoint pointer
8082 instead of an address. Adjust.
8083 (gdb_no_commands_at_breakpoint): Rename to ...
8084 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8085 parameter. Return true if no breakpoint was found. Change debug
8086 output.
8087 (gdb_no_commands_at_breakpoint): Reimplement.
8088 (run_breakpoint_commands): Rename to ...
8089 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8090 and change return type to boolean.
8091 (run_breakpoint_commands): New function.
8092 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8093 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8094 breakpoint. Go through the_target->remove_point instead of
8095 assuming memory breakpoint.
8096 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8097 software and hardware breakpoints.
8098 (reinsert_raw_breakpoint): Go through the_target->insert_point
8099 instead of assuming memory breakpoint.
8100 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8101 software and hardware breakpoints.
8102 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8103 Check both software and hardware breakpoints.
8104 (validate_inserted_breakpoint): Assert the breakpoint is a
8105 software breakpoint. Set the inserted flag to -1 instead of
8106 setting shlib_disabled.
8107 (delete_disabled_breakpoints): Adjust.
8108 (validate_breakpoints): Only validate software breakpoints.
8109 Adjust to inserted flag change.
8110 (check_mem_read, check_mem_write): Skip breakpoint types other
8111 than software breakpoints. Adjust to inserted flag change.
8112 * mem-break.h (enum raw_bkpt_type): New enum.
8113 (raw_breakpoint, struct process_info): Forward declare.
8114 (Z_packet_to_target_hw_bp_type): Delete declaration.
8115 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8116 (set_gdb_breakpoint, delete_gdb_breakpoint)
8117 (clear_breakpoint_conditions): New declarations.
8118 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8119 (breakpoint_inserted_here): Update comment.
8120 (add_breakpoint_condition, add_breakpoint_commands): Replace
8121 address parameter with a breakpoint pointer parameter.
8122 (gdb_breakpoint_here): Update comment.
8123 (delete_gdb_breakpoint_at): Delete.
8124 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8125 * server.c (process_point_options): Take a struct breakpoint
8126 pointer instead of an address. Adjust.
8127 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8128 delete_gdb_breakpoint.
8129 * spu-low.c (spu_target_ops): Install NULL as
8130 supports_z_point_type method.
8131 * target.h: Include mem-break.h.
8132 (struct target_ops) <prepare_to_access_memory>: Update comment.
8133 <supports_z_point_type>: New field.
8134 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8135 instead of a char. Also take a raw breakpoint pointer.
8136 * win32-arm-low.c (the_low_target): Install NULL as
8137 supports_z_point_type.
8138 * win32-i386-low.c (i386_supports_z_point_type): New function.
8139 (i386_insert_point, i386_remove_point): Adjust to new interface.
8140 (the_low_target): Install i386_supports_z_point_type.
8141 * win32-low.c (win32_supports_z_point_type): New function.
8142 (win32_insert_point, win32_remove_point): Adjust to new interface.
8143 (win32_target_ops): Install win32_supports_z_point_type.
8144 * win32-low.h (struct win32_target_ops):
8145 <supports_z_point_type>: New method.
8146 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8147 instead of a char. Also take a raw breakpoint pointer.
8148
932539e3
PA
81492014-05-20 Pedro Alves <palves@redhat.com>
8150
8151 * mem-break.h: Include break-common.h.
8152 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8153 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8154 (Z_packet_to_target_hw_bp_type): New declaration.
8155 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8156 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8157 (Z_PACKET_ACCESS_WP): Delete macros.
8158 (Z_packet_to_hw_type): Delete function.
8159 * i386-low.h: Don't include break-common.h here.
8160 (Z_packet_to_hw_type): Delete declaration.
8161 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8162 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8163 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8164 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8165 * linux-aarch64-low.c: Don't include break-common.h here.
8166 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8167 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8168 (Z_packet_to_target_hw_bp_type): Delete function.
8169 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8170 function.
8171 (mips_insert_point, mips_remove_point): Use
8172 Z_packet_to_target_hw_bp_type.
8173
4ff0d3d8
PA
81742014-05-20 Pedro Alves <palves@redhat.com>
8175
8176 * linux-aarch64-low.c: Include break-common.h.
8177 (enum target_point_type): Delete.
8178 (Z_packet_to_point_type): Rename to ...
8179 (Z_packet_to_target_hw_bp_type): ... this, and return a
8180 target_hw_bp_type instead.
8181 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8182 instead of an enum target_point_type.
8183 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8184 breakpoint type.
8185 (aarch64_dr_state_insert_one_point)
8186 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8187 (aarch64_handle_aligned_watchpoint)
8188 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8189 Take an enum target_hw_bp_type instead of an enum
8190 target_point_type.
8191 (aarch64_supports_z_point_type): New function.
8192 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8193 use Z_packet_to_target_hw_bp_type.
8194
786dc519
JB
81952014-05-20 Joel Brobecker <brobecker@adacore.com>
8196
8197 * configure.ac: Only use -Werror by default when DEVELOPMENT
8198 is true.
8199 * configure: Regenerate.
8200
9e0aa64f
JK
82012014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8202
8203 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8204 * linux-x86-low.c (X86_64_USER_REGS): New.
8205 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8206
2b577b92
YQ
82072014-04-28 Yao Qi <yao@codesourcery.com>
8208
8209 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8210 name.
8211
94611da2
PA
82122014-04-25 Pedro Alves <palves@redhat.com>
8213
8214 PR server/16255
8215 * linux-low.c (linux_attach_fail_reason_string): New function.
8216 (linux_attach_lwp): Delete.
8217 (linux_attach_lwp_1): Rename to ...
8218 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8219 argument. Remove "initial" parameter. Return int instead of
8220 void. Don't error or warn here.
8221 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8222 failure to attach to the tgid. Call warning when failing to
8223 attach to an lwp.
8224 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8225 argument. Remove "initial" parameter. Return int instead of
8226 void. Don't error or warn here.
8227 (linux_attach_fail_reason_string): New declaration.
8228 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8229 interface change. Use linux_attach_fail_reason_string.
8230
01f9f808
MS
82312014-04-24 Michael Sturm <michael.sturm@mintel.com>
8232 Walfred Tedeschi <walfred.tedeschi@intel.com>
8233
8234 * Makefile.in: Added rules to handle new files
8235 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8236 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8237 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8238 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8239 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8240 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8241 x32-avx512-linux.o.
8242 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8243 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8244 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8245 i386/x32-avx512.xml.
8246 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8247 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8248 i386/x32-avx512-linux.xml.
8249 * i387-fp.c (num_avx512_k_registers): New constant for number
8250 of K registers.
8251 (num_avx512_zmmh_low_registers): New constant for number of
8252 lower ZMM registers (0-15).
8253 (num_avx512_zmmh_high_registers): New constant for number of
8254 higher ZMM registers (16-31).
8255 (num_avx512_ymmh_registers): New contant for number of higher
8256 YMM registers (ymm16-31 added by avx521 on x86_64).
8257 (num_avx512_xmm_registers): New constant for number of higher
8258 XMM registers (xmm16-31 added by AVX512 on x86_64).
8259 (struct i387_xsave): Add space for AVX512 registers.
8260 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8261 Add code to handle AVX512 registers.
8262 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8263 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8264 prototypei from generated file.
8265 (tdesc_amd64_avx512_linux): Likewise.
8266 (init_registers_x32_avx512_linux): Likewise.
8267 (tdesc_x32_avx512_linux): Likewise.
8268 (init_registers_i386_avx512_linux): Likewise.
8269 (tdesc_i386_avx512_linux): Likewise.
8270 (x86_64_regmap): Add AVX512 registers.
8271 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8272 mask.
8273 (initialize_low_arch): Add code to initialize AVX512 registers.
8274
51aa91f9
PA
82752014-04-23 Pedro Alves <palves@redhat.com>
8276
8277 * mem-break.c (find_gdb_breakpoint_at): Make static.
8278 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8279
a4165e94
PA
82802014-04-23 Pedro Alves <palves@redhat.com>
8281
8282 * i386-low.c: Don't include break-common.h here.
8283 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8284 prototype to take target_hw_bp_type as argument instead of a Z
8285 packet char.
8286 * i386-low.h: Include break-common.h here.
8287 (Z_packet_to_hw_type): Declare.
8288 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8289 prototypes.
8290 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8291 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8292 (x86_remove_point): Convert the packet number to a
8293 target_hw_bp_type before calling i386_low_remove_watchpoint.
8294 * win32-i386-low.c (i386_insert_point): Convert the packet number
8295 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8296 (i386_remove_point): Convert the packet number to a
8297 target_hw_bp_type before calling i386_low_remove_watchpoint.
8298
b8acf843
PA
82992014-04-23 Pedro Alves <palves@redhat.com>
8300
8301 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8302
d708bcd1
PA
83032014-04-10 Pedro Alves <palves@redhat.com>
8304
8305 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8306 Check if the condition or command is NULL before checking if the
8307 breakpoint is known. On success, return true.
8308 * mem-break.h (add_breakpoint_condition): Document return.
8309 (add_breakpoint_commands): Add describing comment.
8310 * server.c (skip_to_semicolon): New function.
8311 (process_point_options): Use it.
8312
2eec7d5b
PA
83132014-04-09 Pedro Alves <palves@redhat.com>
8314
8315 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8316 to lwpid_of.
8317
fa96cb38
PA
83182014-02-27 Pedro Alves <palves@redhat.com>
8319
8320 PR 12702
8321 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8322 macros.
8323 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8324 output.
8325 (last_thread_of_process_p): Take a PID argument instead of a
8326 thread pointer.
8327 (linux_wait_for_lwp): Delete.
8328 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8329 functions.
8330 (linux_low_filter_event): New function, party factored out from
8331 linux_wait_for_event.
8332 (linux_wait_for_event): Rename to ...
8333 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8334 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8335 sigsuspend. Check for zombie leaders.
8336 (linux_wait_for_event): Reimplement as wrapper around
8337 linux_wait_for_event_filtered.
8338 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8339 a normal or signal exit is seen, it's the whole process exiting.
8340 (wait_for_sigstop): No longer a for_each_inferior callback.
8341 Rewrite on top of linux_wait_for_event_filtered.
8342 (stop_all_lwps): Call wait_for_sigstop directly.
8343 * server.c (resume, handle_target_event): Handle
8344 TARGET_WAITKIND_NO_RESUMED.
8345
d763de10
JB
83462014-02-26 Joel Brobecker <brobecker@adacore.com>
8347
8348 * win32-low.c (psapi_get_dll_name,
8349 * win32_CreateToolhelp32Snapshot): Delete.
8350 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8351 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8352 Delete.
8353 (handle_load_dll): Add function description.
8354 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8355
850a0f76
JB
83562014-02-26 Joel Brobecker <brobecker@adacore.com>
8357
8358 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8359 Add comment.
8360 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8361 base address when calling win32_add_one_solib.
8362 (handle_load_dll): Delete local variable load_addr.
8363 Remove 0x1000 offset applied to DLL base address when calling
8364 win32_add_one_solib.
8365 (handle_unload_dll): Add comment.
8366
f25b3fc3
JB
83672014-02-26 Joel Brobecker <brobecker@adacore.com>
8368
8369 * win32-low.c (win32_add_all_dlls): Renames
8370 win32_ensure_ntdll_loaded. Rewrite function documentation.
8371 Adjust implementation to always load all DLLs.
8372 Add 0x1000 offset to DLL base address when calling
8373 win32_add_one_solib.
8374 (child_initialization_done): New static global.
8375 (do_initial_child_stuff): Set child_initialization_done to
8376 zero during child initialization, and 1 after. Replace call
8377 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8378 Add comment.
8379 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8380 (handle_unload_dll): Add function documentation.
8381 (get_child_debug_event): Ignore load and unload DLL events
8382 during child initialization.
8383
d86d4aaf
DE
83842014-02-20 Doug Evans <dje@google.com>
8385
3bc32da3 8386 Remove global all_lwps.
d86d4aaf
DE
8387 * inferiors.h (ptid_of): Move here from linux-low.h.
8388 (pid_of, lwpid_of): Ditto.
8389 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8390 parameter is a struct thread_info * now.
8391 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8392 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8393 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8394 directly.
8395 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8396 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8397 * linux-arm-low.c (update_registers_callback): Update, "entry"
8398 parameter is a struct thread_info * now.
8399 Fetch lwpid from current_inferior directly.
8400 (arm_insert_point): Pass &all_threads to find_inferior instead of
8401 &all_lwps.
8402 (arm_remove_point): Ditto.
8403 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8404 (arm_prepare_to_resume): Fetch pid from thread.
8405 (arm_read_description): Fetch lwpid from current_inferior directly.
8406 * linux-low.c (all_lwps): Delete.
8407 (delete_lwp): Delete call to remove_inferior.
8408 (handle_extended_wait): Fetch lwpid from thread.
8409 (add_lwp): Don't set lwp->entry.id. Remove call to
8410 add_inferior_to_list.
8411 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8412 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8413 (kill_one_lwp_callback): Ditto.
8414 (linux_kill): Don't dereference NULL pointer.
8415 Fetch ptid,lwpid from thread.
8416 (get_detach_signal): Fetch ptid from thread.
8417 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8418 Simplify call to regcache_invalidate_thread.
8419 (delete_lwp_callback): Update, "entry" parameter is a
8420 struct thread_info * now. Fetch pid from thread.
8421 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8422 (status_pending_p_callback): Update, "entry" parameter is a
8423 struct thread_info * now. Fetch ptid from thread.
8424 (find_lwp_pid): Update, "entry" parameter is a
8425 struct thread_info * now.
8426 (linux_wait_for_lwp): Fetch pid from thread.
8427 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8428 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8429 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8430 (dequeue_one_deferred_signal): Ditto.
8431 (cancel_breakpoint): Fetch ptid from current_inferior.
8432 (linux_wait_for_event): Pass &all_threads to find_inferior,
8433 not &all_lwps. Fetch ptid, lwpid from thread.
8434 (count_events_callback): Update, "entry" parameter is a
8435 struct thread_info * now.
8436 (select_singlestep_lwp_callback): Ditto.
8437 (select_event_lwp_callback): Ditto.
8438 (cancel_breakpoints_callback): Ditto.
8439 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8440 not &all_lwps.
8441 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8442 (unsuspend_one_lwp): Update, "entry" parameter is a
8443 struct thread_info * now.
8444 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8445 not &all_lwps.
8446 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8447 Fetch lwpid from thread, not lwp.
8448 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8449 Pass &all_threads to find_inferior, not &all_lwps.
8450 (send_sigstop): Fetch lwpid from thread, not lwp.
8451 (send_sigstop_callback): Update, "entry" parameter is a
8452 struct thread_info * now.
8453 (suspend_and_send_sigstop_callback): Ditto.
8454 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8455 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8456 struct thread_info * now.
8457 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8458 from thread, lwp.
8459 (lwp_running): Update, "entry" parameter is a
8460 struct thread_info * now.
8461 (stop_all_lwps): Fetch ptid from thread.
8462 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8463 (linux_resume_one_lwp): Fetch lwpid from thread.
8464 (linux_set_resume_request): Update, "entry" parameter is a
8465 struct thread_info * now. Fetch pid, lwpid from thread.
8466 (resume_status_pending_p): Update, "entry" parameter is a
8467 struct thread_info * now.
8468 (need_step_over_p): Ditto. Fetch lwpid from thread.
8469 (start_step_over): Fetch lwpid from thread.
8470 (linux_resume_one_thread): Update, "entry" parameter is a
8471 struct thread_info * now. Fetch lwpid from thread.
8472 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8473 (proceed_one_lwp): Update, "entry" parameter is a
8474 struct thread_info * now. Fetch lwpid from thread.
8475 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8476 struct thread_info * now.
8477 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8478 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8479 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8480 directly.
8481 (regsets_store_inferior_registers): Ditto.
8482 (fetch_register, store_register): Ditto.
8483 (linux_read_memory, linux_write_memory): Ditto.
8484 (linux_request_interrupt): Ditto.
8485 (linux_read_auxv): Ditto.
8486 (linux_xfer_siginfo): Ditto.
8487 (linux_qxfer_spu): Ditto.
8488 (linux_qxfer_libraries_svr4): Ditto.
8489 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8490 moved to inferiors.h.
8491 (get_lwp): Delete.
8492 (get_thread_lwp): Update.
8493 (struct lwp_info): Delete member "entry". Simplify comment for
8494 member "thread".
8495 (all_lwps): Delete.
8496 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8497 current_inferior directly.
8498 (update_watch_registers_callback): Update, "entry" parameter is a
8499 struct thread_info * now. Fetch pid from thread.
8500 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8501 (mips_insert_point): Fetch lwpid from current_inferior.
8502 Pass &all_threads to find_inferior, not &all_lwps.
8503 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8504 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8505 directly.
8506 (mips_stopped_data_address): Ditto.
8507 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8508 directly.
8509 * linux-tile-low.c (tile_arch_setup): Ditto.
8510 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8511 (update_debug_registers_callback): Update, "entry" parameter is a
8512 struct thread_info * now. Fetch pid from thread.
8513 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8514 Pass &all_threads to find_inferior, not &all_lwps.
8515 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8516 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8517 Pass &all_threads to find_inferior, not &all_lwps.
8518 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8519 (i386_dr_low_get_status): Ditto.
8520 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8521 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8522 (x86_linux_read_description): Ditto.
8523 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8524
3b8361aa
DE
85252014-02-20 Doug Evans <dje@google.com>
8526
8527 * inferiors.c (get_first_inferior): Fix buglet.
8528
f7667f0d
DE
85292014-02-19 Doug Evans <dje@google.com>
8530
8531 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8532 * inferiors.c (add_thread): Change result type to struct thread_info *.
8533 All callers updated.
8534 (add_lwp): Call add_thread here instead of in callers.
8535 All callers updated.
8536 * linux-low.h (get_lwp_thread): Rewrite.
8537 (struct lwp_info): New member "thread".
8538
b3312d80
DE
85392014-02-19 Doug Evans <dje@google.com>
8540
8541 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8542 All callers updated.
8543
ecc6f45c
DE
85442014-02-19 Doug Evans <dje@google.com>
8545
8546 * inferiors.c (add_thread): Fix whitespace.
8547
649ebbca
DE
85482014-02-19 Doug Evans <dje@google.com>
8549
8550 * dll.c (clear_dlls): Replace accessing list implemention details
8551 with API function.
8552 * gdbthread.h (get_first_thread): Declare.
8553 * inferiors.c (for_each_inferior_with_data): New function.
8554 (get_first_thread): New function.
8555 (find_thread_ptid): Simplify.
8556 (get_first_inferior): New function.
8557 (clear_list): Delete.
8558 (one_inferior_p): New function.
8559 (clear_inferior_list): New function.
8560 (clear_inferiors): Update.
8561 * inferiors.h (for_each_inferior_with_data): Declare.
8562 (clear_inferior_list): Declare.
8563 (one_inferior_p): Declare.
8564 (get_first_inferior): Declare.
8565 * linux-low.c (linux_wait_for_event): Replace accessing list
8566 implemention details with API function.
8567 * server.c (target_running): Ditto.
8568 (accumulate_file_name_length): New function.
8569 (emit_dll_description): New function.
8570 (handle_qxfer_libraries): Replace accessing list implemention
8571 details with API function.
8572 (handle_qxfer_threads_worker): New function.
8573 (handle_qxfer_threads_proper): Replace accessing list implemention
8574 details with API function.
8575 (handle_query): Ditto.
8576 (visit_actioned_threads_callback_ftype): New typedef.
8577 (visit_actioned_threads_data): New struct.
8578 (visit_actioned_threads): Rewrite to be find_inferior callback.
8579 (resume): Call find_inferior.
8580 (handle_status): Replace accessing list implemention
8581 details with API function.
8582 (process_serial_event): Replace accessing list implemention details
8583 with API function.
8584 * target.c (set_desired_inferior): Replace accessing list implemention
8585 details with API function.
8586 * tracepoint.c (same_process_p): New function.
8587 (gdb_agent_about_to_close): Replace accessing list implemention
8588 details with API function.
8589 * win32-low.c (child_delete_thread): Replace accessing list
8590 implemention details with API function.
8591 (match_dll_by_basename): New function.
8592 (dll_is_loaded_by_basename): New function.
8593 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8594 details call to dll_is_loaded_by_basename.
8595
80894984
DE
85962014-02-19 Doug Evans <dje@google.com>
8597
8598 * dll.h (struct dll_info): Add comment.
8599 * gdbthread.h (struct thread_info): Add comment.
8600 (current_ptid): Simplify.
8601 * inferiors.c (add_process): Update.
8602 (remove_process): Update.
8603 * inferiors.h (struct process_info): Rename member "head" to "entry".
8604 * linux-low.c (delete_lwp): Update.
8605 (add_lwp): Update.
8606 (last_thread_of_process_p): Update.
8607 (kill_one_lwp_callback, linux_kill): Update.
8608 (status_pending_p_callback): Update.
8609 (wait_for_sigstop): Update. Simplify read of ptid.
8610 (start_step_over): Update.
8611 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8612 (get_lwp_thread): Update.
8613 (struct lwp_info): Rename member "head" to "entry".
8614 * regcache.h (inferior_list_entry): Delete.
8615 * server.c (kill_inferior_callback): Update.
8616 (detach_or_kill_inferior_callback): Update.
8617 (print_started_pid): Update.
8618 (print_attached_pid): Update.
8619 (process_serial_event): Simplify read of ptid.
8620 * thread-db.c (thread_db_create_event): Update.
8621 (thread_db_get_tls_address): Update.
8622 * win32-low.c (current_inferior_ptid): Simplify.
8623
46917d26
TT
86242014-02-19 Tom Tromey <tromey@redhat.com>
8625
8626 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8627 argument.
8628 (target_supports_btrace): Update.
8629
0759a81e
YQ
86302014-02-14 Yao Qi <yao@codesourcery.com>
8631
8632 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8633 (rsp-low-ipa.o): New target.
8634
a7191e8b
TT
86352014-02-12 Tom Tromey <tromey@redhat.com>
8636
8637 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8638 convert_ascii_to_int.
8639 * regcache.c (registers_to_string): Likewise.
8640 * remote-utils.c (decode_M_packet): Likewise.
8641 * server.c (process_serial_event): Likewise.
8642
ff0e980e
TT
86432014-02-12 Tom Tromey <tromey@redhat.com>
8644
8645 * server.c (handle_query, handle_v_run): Use hex2bin, not
8646 unhexify.
8647 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8648
e9371aff
TT
86492014-02-12 Tom Tromey <tromey@redhat.com>
8650
8651 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8652 convert_int_to_ascii.
8653 * regcache.c (registers_to_string, collect_register_as_string):
8654 Likewise.
8655 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8656 Likewise.
8657 * server.c (process_serial_event): Likewise.
8658 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8659 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8660
971dc0b8
TT
86612014-02-12 Tom Tromey <tromey@redhat.com>
8662
8663 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8664 bin2hex, not hexify.
8665 * tracepoint.c (cmd_qtstatus): Likewise.
8666
0a822afb
TT
86672014-02-12 Tom Tromey <tromey@redhat.com>
8668
8669 * remote-utils.c (monitor_output): Pass explicit length to
8670 hexify.
8671
9c3d6531
TT
86722014-02-12 Tom Tromey <tromey@redhat.com>
8673
8674 * tracepoint.c: Include rsp-low.h.
8675 * server.c: Include rsp-low.h.
8676 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8677 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8678 declare.
8679 * remote-utils.c: Include rsp-low.h.
8680 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8681 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8682 (convert_int_to_ascii, convert_ascii_to_int): Move to
8683 common/rsp-low.c.
8684 * regcache.c: Include rsp-low.h.
8685 * ax.c: Include rsp-low.h.
8686 * Makefile.in (SFILES): Add common/rsp-low.c.
8687 (OBS): Add rsp-low.o.
8688 (rsp-low.o): New target.
8689
01fd3ea5
TT
86902014-02-12 Tom Tromey <tromey@redhat.com>
8691
8692 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8693 Include print-utils.h.
8694 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8695 (plongest, thirty_two, phex_nz): Remove.
8696 * Makefile.in (SFILES): Add common/print-utils.c.
8697 (OBS): Add print-utils.o.
8698 (print-utils-ipa.o): New target.
8699 (print-utils.o): New target.
8700 (IPA_OBJS): Add print-utils-ipa.o.
8701
e99dc820
TT
87022014-02-06 Tom Tromey <tromey@redhat.com>
8703
8704 * Makefile.in (SFILES): Fix indentation.
8705
ee1e2d4f
DE
87062014-02-05 Doug Evans <dje@google.com>
8707
8708 * linux-low.c (linux_wait_for_event): Improve comment.
8709 (linux_wait_1): Keep current_inferior in sync with event_child.
8710
f5a02773
DE
87112014-01-22 Doug Evans <dje@google.com>
8712
8713 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8714
87ce2a04
DE
87152014-01-22 Doug Evans <dje@google.com>
8716
8717 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8718 * configure: Regenerate.
8719 * config.in: Regenerate.
8720 * Makefile.in (SFILES): Add debug.c.
8721 (OBS): Add debug.o.
8722 * debug.c: New file.
8723 * debug.h: New file.
8724 * linux-aarch64-low.c (*): Update all debugging printfs to use
8725 debug_printf instead of fprintf.
8726 * linux-arm-low.c (*): Ditto.
8727 * linux-cris-low.c (*): Ditto.
8728 * linux-crisv32-low.c (*): Ditto.
8729 * linux-m32r-low.c (*): Ditto.
8730 * linux-sparc-low.c (*): Ditto.
8731 * linux-x86.c (*): Ditto.
8732 * linux-low.c (*): Ditto.
8733 (linux_wait_1): Add calls to debug_enter, debug_exit.
8734 (linux_wait): Remove redundant debugging printf.
8735 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8736 (linux_resume, unstop_all_lwps): Ditto.
8737 * mem-break.c (*): Update all debugging printfs to use
8738 debug_printf instead of fprintf.
8739 * remote-utils.c (*): Ditto.
8740 * thread-db.c (*): Ditto.
8741 * server.c #include <ctype.h>, "gdb_vecs.h".
8742 (debug_threads): Moved to debug.c.
8743 (*): Update all debugging printfs to use debug_printf instead of
8744 fprintf.
8745 (start_inferior): Replace call to fflush with call to debug_flush.
8746 (monitor_show_help): Mention set debug-format.
8747 (parse_debug_format_options): New function.
8748 (handle_monitor_command): Handle "monitor set debug-format".
8749 (gdbserver_usage): Mention --debug-format.
8750 (main): Parse --debug-format.
8751 * server.h (debug_threads): Declaration moved to debug.h.
8752 #include "debug.h".
8753 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8754 trace_debug_1 that uses debug_printf.
8755 (tracepoint_look_up_symbols): Update all debugging printfs to use
8756 debug_printf instead of fprintf.
8757
e671835b
BS
87582014-01-20 Baruch Siach <baruch@tkos.co.il>
8759
8760 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8761 sys/ptrace.h.
8762
b5737fa9
PA
87632014-01-17 Pedro Alves <palves@redhat.com>
8764
ea38d2a9 8765 PR build/16445
c7faa97a
PA
8766 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8767 defined after including gdb_proc_service.h.
b5737fa9 8768
40ed484e
DE
87692014-01-16 Doug Evans <dje@google.com>
8770
8771 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8772 (match_dll): Use it.
8773
969c39fb
MM
87742014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8775
8776 * target.h (target_ops) <read_btrace>: Change parameters and
8777 return type to allow error reporting.
8778 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8779 trace reading errors on.
8780 * linux-low.c (linux_low_read_btrace): Pass trace reading
8781 errors on.
8782 (linux_low_disable_btrace): New.
8783
ab7f45ba
DE
87842014-01-15 Doug Evans <dje@google.com>
8785
8786 * inferiors.c (thread_id_to_gdb_id): Delete.
8787 * inferiors.h (thread_id_to_gdb_id): Delete.
8788
66af0f44
EZ
87892014-01-13 Eli Zaretskii <eliz@gnu.org>
8790
8791 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8792 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8793 versions.
8794
9939e131
PA
87952014-01-08 Pedro Alves <palves@redhat.com>
8796
8797 * server.c (handle_status): Don't discard previous queued stop
8798 replies or thread's pending status here.
8799 (main) <disconnection>: Do it here instead.
8800
b7ea362b
PA
88012014-01-08 Pedro Alves <palves@redhat.com>
8802
8803 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8804 * server.c (visit_actioned_threads, handle_pending_status): New
8805 function.
8806 (handle_v_cont): Factor out parts to ...
8807 (resume): ... this new function. If in all-stop, and a thread
8808 being resumed has a pending status, report it without actually
8809 resuming.
8810 (myresume): Adjust to use the new 'resume' function.
8811 (clear_pending_status_callback, set_pending_status_callback)
8812 (find_status_pending_thread_callback): New functions.
8813 (handle_status): Handle the case of multiple threads having
8814 interesting statuses to report. Report threads' real last signal
8815 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8816 with an interesting thread to report the status for, instead of
8817 always reporting the status of the first thread.
8818
28498c42
JB
88192014-01-01 Joel Brobecker <brobecker@adacore.com>
8820
8821 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8822 * gdbreplay.c (gdbreplay_version): Likewise.
8823
f45c82da
YZ
88242013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8825
8826 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8827 iov.iov_len with the real length in use.
8828
379a5e2d
JB
88292013-12-13 Joel Brobecker <brobecker@adacore.com>
8830
8831 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8832 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8833 for all targets that use win32-low.c.
8834 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8835 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8836
4210d83e
PA
88372013-12-13 Pedro Alves <palves@redhat.com>
8838
8839 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8840 if equal to TARGET_WAITKIND_LOADED.
8841 * win32-low.c (cached_status): New static global.
8842 (win32_wait): Add declaration.
8843 (do_initial_child_stuff): Flush all initial pending debug events
8844 up to the initial breakpoint.
8845 (win32_wait): If CACHED_STATUS was set, return that instead
8846 of doing a real wait. Remove the code resuming the execution
8847 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8848 during the initial phase. Also remove the code changing
8849 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8850 TARGET_WAITKIND_STOPPED.
8851
e7f0d979
YQ
88522013-12-11 Yao Qi <yao@codesourcery.com>
8853
8854 * notif.c (handle_notif_ack): Return 0 if no notification
8855 matches.
8856
ebcf782c
DE
88572013-11-20 Doug Evans <dje@google.com>
8858
8859 * linux-low.c (linux_set_resume_request): Fix comment.
8860
20ad9378
DE
88612013-11-20 Doug Evans <dje@google.com>
8862
8863 * linux-low.c (resume_status_pending_p): Tweak comment.
8864
a196ebeb
WT
88652013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8866
8867 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8868 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8869 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8870 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8871 (srv_amd64_regobj): Add amd64-mpx.o.
8872 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8873 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8874 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8875 * i387-fp.c (num_pl_bnd_register) Added constant.
8876 (num_pl_bnd_cfg_registers) Added constant.
8877 (struct i387_xsave) Added reserved area and MPX fields.
8878 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8879 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8880 function.
8881 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8882 (init_registers_amd64_mpx_linux): Declare new function.
8883 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8884 (x86_64_regmap): Add MPX registers.
8885 (x86_linux_read_description): Add MPX case.
8886 (initialize_low_arch): Initialize MPX targets.
8887
0080a2f6
TT
88882013-11-18 Tom Tromey <tromey@redhat.com>
8889
8890 * configure: Rebuild.
8891 * configure.ac: Don't check for stdlib.h.
8892 * gdbreplay.c: Unconditionally include stdlib.h.
8893
2978b111
TT
88942013-11-18 Tom Tromey <tromey@redhat.com>
8895
8896 * config.in: Rebuild.
8897 * configure: Rebuild.
8898 * configure.ac: Don't use AC_HEADER_DIRENT.
8899
a3d08894
TT
89002013-11-18 Tom Tromey <tromey@redhat.com>
8901
8902 * server.h: Don't check HAVE_STRING_H.
8903 * gdbreplay.c: Don't check HAVE_STRING_H.
8904 * configure: Rebuild.
8905
0a5dd17d
TT
89062013-11-18 Tom Tromey <tromey@redhat.com>
8907
8908 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8909 LIBGNU.
8910
1bd2f0ba
TT
89112013-11-08 Tom Tromey <tromey@redhat.com>
8912
8913 * configure, config.in: Rebuild.
8914 * configure.ac: Remove unused configury.
8915
3266f10b
TT
89162013-11-08 Tom Tromey <tromey@redhat.com>
8917
8918 * acinclude.m4: Include common.m4, codeset.m4.
8919 * configure, config.in: Rebuild.
8920 * configure.ac: Use GDB_AC_COMMON.
8921
6682d959
AA
89222013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8923
8924 * linux-s390-low.c (HWCAP_S390_TE): New define.
8925 (s390_arch_setup): Consider the TE field in the HWCAP for
8926 determining 'have_regset_tdb'.
8927
fd0a4d76
SDJ
89282013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8929
8930 PR gdb/16014
8931 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8932 call to sizeof.
8933
1a3d890b
PA
89342013-10-02 Pedro Alves <palves@redhat.com>
8935
8936 * server.c (process_serial_event): Don't output "GDBserver
8937 exiting" if GDB is connected through stdio.
8938 * target.c (mywait): Likewise, be silent if GDB is connected
8939 through stdio.
8940
97ad4581
JB
89412013-10-01 Joel Brobecker <brobecker@adacore.com>
8942
8943 * lynx-low.c (lynx_add_threads_after_attach): New function.
8944 (lynx_attach): Remove call to add_thread. Add call to
8945 lynx_add_threads_after_attach instead.
8946
5b4e221c
MF
89472013-09-28 Mike Frysinger <vapier@gentoo.org>
8948
8949 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8950 * config.in, configure: Regenerated.
8951
ee47b2f8
YQ
89522013-09-18 Yao Qi <yao@codesourcery.com>
8953
8954 PR server/15959
8955 * server.c (start_inferior): Clear 'resume_info'.
8956
d6707650 89572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8958
d6707650
JW
8959 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8960 for each register.
8961
9243dd0e 89622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8963
9243dd0e
JW
8964 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8965 linux-tile-low.o to srv_tgtobj.
8966
c623a6ef
WN
89672013-09-16 Will Newton <will.newton@linaro.org>
8968
8969 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8970 out regs.
8971
fb71d39e
PA
89722013-09-06 Pedro Alves <palves@redhat.com>
8973
8974 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8975 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8976 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8977 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8978 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8979 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8980
8e7e9910
PA
89812013-09-06 Pedro Alves <palves@redhat.com>
8982
8983 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8984 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8985
7c3a12ca
PA
89862013-09-06 Pedro Alves <palves@redhat.com>
8987
8988 * linux-amd64-ipa.c: Include tracepoint.h.
8989 * linux-i386-ipa.c: Include tracepoint.h.
8990
8eb3d7b6
RW
89912013-09-06 Ricard Wanderlof <ricardw@axis.com>
8992
8993 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8994 (ps_get_thread_area): New function.
8995
eddddb9d
RW
89962013-09-06 Ricard Wanderlof <ricardw@axis.com>
8997
8998 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8999 (initialize_low_arch): Call init_registers_crisv32 rather than
9000 init_register_crisv32.
9001
533b0600
PA
90022013-09-05 Pedro Alves <palves@redhat.com>
9003
9004 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9005 to ...
9006 * hostio.h: ... this new file.
9007 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9008 win32-low.c: Include hostio.h.
9009
0ce3d3b5
PA
90102013-09-05 Pedro Alves <palves@redhat.com>
9011
9012 * server.h (gdb_client_data, handler_func, callback_handler_func)
9013 (delete_file_handler, add_file_handler, append_callback_event)
9014 (delete_callback_event, start_event_loop, initialize_event_loop):
9015 Move to event-loop.h and include it.
9016 * event-loop.h: New file.
9017
799cdc37
PA
90182013-09-05 Pedro Alves <palves@redhat.com>
9019
9020 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9021 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9022 (loaded_dll, unloaded_dll): Move to ...
9023 * dll.h: ... this new file.
9024 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9025
6a6bbd9d
PA
90262013-09-05 Pedro Alves <palves@redhat.com>
9027
9028 * server.h (current_process, get_thread_process, all_processes)
9029 (add_inferior_to_list, for_each_inferior, current_inferior)
9030 (remove_inferior, add_process, remove_process, find_process_pid)
9031 (have_started_inferiors_p, have_attached_inferiors_p)
9032 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9033 (clear_inferiors, find_inferior, find_inferior_id)
9034 (inferior_target_data, set_inferior_target_data)
9035 (inferior_regcache_data, set_inferior_regcache_data): Move to
9036 inferiors.h, and include it.
9037 * inferiors.h: New file.
9038
f699aaba
PA
90392013-09-05 Pedro Alves <palves@redhat.com>
9040
9041 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9042 Move ...
72f4393d 9043 * ax.h: ... here.
f699aaba 9044
c144c7a0
PA
90452013-09-05 Pedro Alves <palves@redhat.com>
9046
9047 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9048 tracepoint.h.
9049 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9050 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9051 (handle_tracepoint_general_set, handle_tracepoint_query)
9052 (tracepoint_finished_step, tracepoint_was_hit)
9053 (release_while_stepping_state_list, current_traceframe)
9054 (in_readonly_region, traceframe_read_mem)
9055 (fetch_traceframe_registers, traceframe_read_sdata)
9056 (traceframe_read_info, struct fast_tpoint_collect_status)
9057 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9058 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9059 (supply_fast_tracepoint_registers)
9060 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9061 (ipa_tdesc, claim_trampoline_space)
9062 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9063 (agent_mem_read, agent_get_trace_state_variable_value)
9064 (agent_set_trace_state_variable_value, agent_tsv_read)
9065 (agent_mem_read_string, get_raw_reg_func_addr)
9066 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9067 * tracepoint.h: ... this new file.
9068
ff42e6ab
PA
90692013-09-05 Pedro Alves <palves@redhat.com>
9070
9071 * server.h (perror_with_name, error, fatal, warning, paddress)
9072 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9073 include it.
9074 * utils.h: New file.
9075
541af0f4
PA
90762013-09-05 Pedro Alves <palves@redhat.com>
9077
9078 * server.h (remote_debug, noack_mode, transport_is_reliable)
9079 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9080 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9081 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9082 (write_enn, initialize_async_io, enable_async_io)
9083 (disable_async_io, check_remote_input_interrupt_request)
9084 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9085 (dead_thread_notify, prepare_resume_reply)
9086 (decode_address_to_semicolon, decode_address, decode_m_packet)
9087 (decode_M_packet, decode_X_packet, decode_xfer_write)
9088 (decode_search_memory_packet, unhexify, hexify)
9089 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9090 (look_up_one_symbol, relocate_instruction)
9091 (monitor_output): Move to remote-utils.h, and include it.
9092 * remote-utils.h: New file.
9093
eebdf26b
PA
90942013-09-05 Pedro Alves <palves@redhat.com>
9095
9096 * server.h (_): Delete.
9097
3aafd2ff
PA
90982013-09-02 Pedro Alves <palves@redhat.com>
9099
9100 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9101 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9102 allocated.
9103 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9104
cee83bcb
PM
91052013-09-02 Pierre Muller <muller@sourceware.org>
9106
9107 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9108 or WriteProcessMemory complete successfully and handle
9109 ERROR_PARTIAL_COPY error.
9110
9a13b2fa
PA
91112013-09-02 Pedro Alves <palves@redhat.com>
9112
9113 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9114 error instead of EIO.
9115
602e3198
JK
91162013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9117
9118 PR server/15604
9119 * linux-low.c: Include filestuff.h.
9120 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9121 * lynx-low.c: Include filestuff.h.
9122 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9123 * server.c: Include filestuff.h.
9124 (main): Call notice_open_fds.
9125 * spu-low.c: Include filestuff.h.
9126 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9127
96d7229d
LM
91282013-08-22 Luis Machado <lgustavo@codesourcery.com>
9129
9130 * Makefile.in: Explain why ../target and ../nat are not
9131 listed as include file search paths.
9132 (linux-waitpid.o): New object file rule.
9133 * configure.srv (srv_native_linux_obj): New variable.
9134 Replace all occurrences of linux native object files with
9135 $srv_native_linux_obj.
9136 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9137 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9138 (linux_enable_event_reporting): Remove declaration.
9139 (my_waitpid): Moved to common/linux-waitpid.c.
9140 (linux_wait_for_event): Pass ptid when calling
9141 linux_enable_event_reporting.
9142 (linux_supports_tracefork_flag): Remove.
9143 (linux_enable_event_reporting): Likewise.
9144 (linux_tracefork_grandchild): Remove.
9145 (STACK_SIZE): Moved to common/linux-ptrace.c.
9146 (linux_tracefork_child): Remove.
9147 (linux_test_for_tracefork): Remove.
9148 (linux_look_up_symbols): Call linux_supports_traceclone.
9149 (initialize_low): Remove call to linux_test_for_tracefork.
9150 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9151 common/linux-ptrace.h.
9152 (PTRACE_TYPE_ARG4): Likewise.
9153 Include linux-ptrace.h.
9154
32940073
PA
91552013-08-21 Pedro Alves <palves@redhat.com>
9156
9157 * config.in: Renegerate.
9158
33b60d58 91592013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9160
33b60d58
LM
9161 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9162 (SFILES): Remove $(srcdir)/common/target-common.c and
9163 add $(srcdir)/target/waitstatus.c.
9164 (OBS): Remove target-common.o and add waitstatus.o.
9165 (server_h): Remove $(srcdir)/../common/target-common.h and
9166 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9167 and $(srcdir)/../target/waitstatus.h.
9168 (target-common.o): Remove.
9169 (waitstatus.o): New target object file.
9170 * target.h: Do not include target-common.h and
9171 include target/resume.h, target/wait.h and
9172 target/waitstatus.h.
9173
b8e1b30e
LM
91742013-08-13 Luis Machado <lgustavo@codesourcery.com>
9175
9176 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9177 to PTRACE_TYPE_ARG3.
9178 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9179 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9180 PTRACE_TYPE_ARG4.
9181 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9182 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9183
7a60ad40
YQ
91842013-07-27 Jie Zhang <jie@codesourcery.com>
9185 Daniel Jacobowitz <dan@codesourcery.com>
9186 Yao Qi <yao@codesourcery.com>
9187
9188 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9189 (mips-linux-watch.o): New rule.
9190 (mips_linux_watch_h): New variable.
9191 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9192 srv_tgtobj.
9193 * linux-mips-low.c: Include mips-linux-watch.h.
9194 (struct arch_process_info, struct arch_lwp_info): New.
9195 (update_watch_registers_callback): New function.
9196 (mips_linux_new_process, mips_linux_new_thread) New functions.
9197 (mips_linux_prepare_to_resume, mips_insert_point): New
9198 functions.
9199 (mips_remove_point, mips_stopped_by_watchpoint): New
9200 functions.
9201 (rsp_bp_type_to_target_hw_bp_type): New function.
9202 (mips_stopped_data_address): New function.
9203 (the_low_target): Add watchpoint support functions.
9204
de6f69ad
YQ
92052013-07-27 Yao Qi <yao@codesourcery.com>
9206
9207 * i386-low.c: Include break-common.h.
9208 (enum target_hw_bp_type): Remove.
9209
3360c0bf
LM
92102013-07-24 Luis Machado <lgustavo@codesourcery.com>
9211
9212 * Makefile.in (SFILES): /common/target-common.c.
9213 (OBS): Add target-common.o.
9214 (server_h): Add $(srcdir)/../common/target-common.h.
9215 (target-common.o): New target.
9216 * server.c (queue_stop_reply_callback): Free
9217 status string after use.
9218 * target.c (target_waitstatus_to_string): Remove.
9219 * target.h: Include target-common.h.
9220 (resume_kind): Likewise.
9221 (target_waitkind): Likewise.
9222 (target_waitstatus): Likewise.
9223 (TARGET_WNOHANG): Likewise.
9224
bd885420
YQ
92252013-07-04 Yao Qi <yao@codesourcery.com>
9226
9227 * Makefile.in (host_alias): Use @host_noncanonical@.
9228 (target_alias): Use @target_noncanonical@.
9229 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9230 ACX_NONCANONICAL_HOST.
9231 * configure: Regenerated.
9232
9233 Revert:
9234 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9235
9236 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9237 * configure: Rebuild.
9238 * Makefile.in (version_host, version_target): Get from configure.
9239 (version.c): Use $(version_host) and $(version_target).
9240
17ef446e
PA
92412013-07-03 Pedro Alves <palves@redhat.com>
9242
9243 * Makefile.in (config.status): Depend on development.sh.
9244 * acinclude.m4: Include libmcheck.m4.
9245 * configure: Regenerate.
9246
7a9a7487
MG
92472013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9248
9249 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9250 attribute inside the parentheses.
9251 (winapi_DebugSetProcessKillOnExit): Ditto.
9252 (winapi_DebugBreakProcess): Ditto.
9253 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9254
49b64de6
MG
92552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9256
9257 * notif.h (notif_event): Add a dummy member to avoid compiler
9258 errors.
9259
d5749ee7
PA
92602013-07-01 Pedro Alves <palves@redhat.com>
9261
9262 * hostio.c (HOSTIO_PATH_MAX): Define.
9263 (require_filename, handle_open, handle_unlink, handle_readlink):
9264 Use it.
9265
d8d2a3ee
PA
92662013-07-01 Pedro Alves <palves@redhat.com>
9267
9268 * server.h: Include "pathmax.h".
9269 * linux-low.c: Don't include sys/param.h.
9270 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9271 MAXPATHLEN.
9272 * win32-low.c: Don't include sys/param.h.
9273 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9274
bc7dea8d
PA
92752013-07-01 Pedro Alves <palves@redhat.com>
9276
9277 * event-loop.c: Don't check HAVE_UNISTD_H before including
9278 <unistd.h>.
9279 * gdbreplay.c: Likewise.
9280 * remote-utils.c: Likewise.
9281 * server.c: Likewise.
9282 * configure.ac: Don't check for unistd.h.
9283 * configure: Regenerate.
9284
d6c2da54
TT
92852013-06-28 Tom Tromey <tromey@redhat.com>
9286
9287 * Makefile.in (version.c): Use version.in, not
9288 common/version.in.
9289
257b6bec
MG
92902013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9291
9292 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9293 * configure: Rebuild.
9294 * Makefile.in (version_host, version_target): Get from configure.
9295 (version.c): Use $(version_host) and $(version_target).
9296
86ebe149
DK
92972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9298
9299 Fix trace-status to output user name without trailing colon.
9300 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9301
f30aa5af
DK
93022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9303
9304 Fix trace-status to output proper start-time and stop-time.
9305 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9306 output start time and stop time in hex as gdb expects.
9307
28a93511
YQ
93082013-06-26 Pedro Alves <pedro@codesourcery.com>
9309
9310 * tracepoint.c (build_traceframe_info_xml): Output trace state
9311 variables present in the trace buffer.
9312
01208463
TT
93132013-06-24 Tom Tromey <tromey@redhat.com>
9314
9315 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9316 create-version.sh.
9317 (version.o): Remove.
9318 * gdbreplay.c: Include version.h.
9319 (version, host_name): Don't declare.
9320 * server.h: Include version.h.
9321 (version, host_name): Don't declare.
9322
760256f9
PA
93232013-06-12 Pedro Alves <palves@redhat.com>
9324
9325 * linux-x86-low.c (linux_is_elf64): Delete global.
9326 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9327 with local linux_pid_exe_is_elf_64_file use.
9328
030031ee
PA
93292013-06-11 Pedro Alves <palves@redhat.com>
9330
9331 * linux-low.c (regset_disabled, disable_regset): New functions.
9332 (regsets_fetch_inferior_registers)
9333 (regsets_store_inferior_registers): Use them.
9334 (initialize_regsets_info); Don't allocate the disabled_regsets
9335 array here.
9336 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9337 comment.
9338
5da6eb0a
PA
93392013-06-11 Pedro Alves <palves@redhat.com>
9340
9341 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9342 xmalloc.
9343
7e5aaa09
PA
93442013-06-11 Pedro Alves <palves@redhat.com>
9345
9346 * linux-x86-low.c (initialize_low_arch): Call
9347 init_registers_x32_avx_linux.
9348
d878444c
JK
93492013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9350
9351 Fix compatibility with Android Bionic.
9352 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9353 it is not empty.
9354
3aee8918
PA
93552013-06-07 Pedro Alves <palves@redhat.com>
9356
5f2b57b5 9357 PR server/14823
3aee8918
PA
9358 * Makefile.in (OBS): Add tdesc.o.
9359 (IPA_OBJS): Add tdesc-ipa.o.
9360 (tdesc-ipa.o): New rule.
9361 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9362 interface.
9363 * linux-low.c (new_inferior): Delete.
9364 (disabled_regsets, num_regsets): Delete.
9365 (linux_add_process): Adjust to set the new per-process
9366 new_inferior flag.
9367 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9368 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9369 was a stop. When calling arch_setup, switch the current inferior
9370 to the thread that got an event.
9371 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9372 (regsets_fetch_inferior_registers)
9373 (regsets_store_inferior_registers): New regsets_info parameter.
9374 Adjust to use it.
9375 (linux_register_in_regsets): New regs_info parameter. Adjust to
9376 use it.
9377 (register_addr, fetch_register, store_register): New usrregs_info
9378 parameter. Adjust to use it.
9379 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9380 parameter regs_info. Adjust to use it.
9381 (linux_fetch_registers): Get the current inferior's regs_info, and
9382 adjust to use it.
9383 (linux_store_registers): Ditto.
9384 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9385 (initialize_low): Don't initialize the target_regsets here. Call
9386 initialize_low_arch.
9387 * linux-low.h (target_regsets): Delete declaration.
9388 (struct regsets_info): New.
9389 (struct usrregs_info): New.
9390 (struct regs_info): New.
9391 (struct process_info_private) <new_inferior>: New field.
9392 (struct linux_target_ops): Delete the num_regs, regmap, and
9393 regset_bitmap fields. New field regs_info.
9394 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9395 * i387-fp.c (num_xmm_registers): Delete.
9396 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9397 calls to new interface.
9398 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9399 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9400 Infer the number of xmm registers from the regcache's target
9401 description.
9402 * i387-fp.h (num_xmm_registers): Delete.
9403 * inferiors.c (add_thread): Don't install the thread's regcache
9404 here.
9405 * proc-service.c (gregset_info): Fetch the current inferior's
9406 regs_info. Adjust to use it.
9407 * regcache.c: Include tdesc.h.
9408 (register_bytes, reg_defs, num_registers)
9409 (gdbserver_expedite_regs): Delete.
9410 (get_thread_regcache): If the thread doesn't have a regcache yet,
9411 create one, instead of aborting gdbserver.
9412 (regcache_invalidate_one): Rename to ...
9413 (regcache_invalidate_thread): ... this.
9414 (regcache_invalidate_one): New.
9415 (regcache_invalidate): Only invalidate registers of the current
9416 process.
9417 (init_register_cache): Add target_desc parameter, and use it.
9418 (new_register_cache): Ditto. Assert the target description has a
9419 non zero registers_size.
9420 (regcache_cpy): Add assertions. Adjust.
9421 (realloc_register_cache, set_register_cache): Delete.
9422 (registers_to_string, registers_from_string): Adjust.
9423 (find_register_by_name, find_regno, find_register_by_number)
9424 (register_cache_size): Add target_desc parameter, and use it.
9425 (free_register_cache_thread, free_register_cache_thread_one)
9426 (regcache_release, register_cache_size): New.
9427 (register_size): Add target_desc parameter, and use it.
9428 (register_data, supply_register, supply_register_zeroed)
9429 (supply_regblock, supply_register_by_name, collect_register)
9430 (collect_register_as_string, collect_register_by_name): Adjust.
9431 * regcache.h (struct target_desc): Forward declare.
9432 (struct regcache) <tdesc>: New field.
9433 (init_register_cache, new_register_cache): Add target_desc
9434 parameter.
9435 (regcache_invalidate_thread): Declare.
9436 (regcache_invalidate_one): Delete declaration.
9437 (regcache_release): Declare.
9438 (find_register_by_number, register_cache_size, register_size)
9439 (find_regno): Add target_desc parameter.
9440 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9441 declarations.
9442 * remote-utils.c: Include tdesc.h.
9443 (outreg, prepare_resume_reply): Adjust.
9444 * server.c: Include tdesc.h.
9445 (gdbserver_xmltarget): Delete declaration.
9446 (get_features_xml, process_serial_event): Adjust.
9447 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9448 declare.
9449 (struct process_info) <tdesc>: New field.
9450 (ipa_tdesc): Declare.
9451 * tdesc.c: New file.
9452 * tdesc.h: New file.
9453 * tracepoint.c: Include tdesc.h.
9454 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9455 (get_context_regcache): Adjust to pass ipa_tdesc down.
9456 (do_action_at_tracepoint): Adjust to get the register cache size
9457 from the context regcache's description.
9458 (traceframe_walk_blocks): Adjust to get the register cache size
9459 from the current trace frame's description.
9460 (traceframe_get_pc): Adjust to get current trace frame's
9461 description and pass it down.
9462 (gdb_collect): Adjust to get the register cache size from the
9463 IPA's description.
9464 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9465 (gdbserver_xmltarget): Delete.
9466 (initialize_low_tracepoint): Set the ipa's target description.
9467 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9468 (initialize_low_tracepoint): Set the ipa's target description.
9469 * linux-x86-low.c: Include tdesc.h.
9470 [__x86_64__] (is_64bit_tdesc): New.
9471 (ps_get_thread_area, x86_get_thread_area): Use it.
9472 (i386_cannot_store_register): Rename to ...
9473 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9474 (i386_cannot_fetch_register): Rename to ...
9475 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9476 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9477 to new interface.
9478 (target_regsets): Rename to ...
9479 (x86_regsets): ... this.
9480 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9481 interface.
9482 (x86_siginfo_fixup): Use is_64bit_tdesc.
9483 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9484 (tdesc_x32_avx_linux, tdesc_x32_linux)
9485 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9486 Declare.
9487 (x86_linux_update_xmltarget): Delete.
9488 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9489 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9490 (AMD64_LINUX_USER64_CS): New.
9491 (x86_linux_read_description): New, based on
9492 x86_linux_update_xmltarget.
9493 (same_process_callback): New.
9494 (x86_arch_setup_process_callback): New.
9495 (x86_linux_update_xmltarget): New.
9496 (x86_regsets_info): New.
9497 (amd64_linux_regs_info): New.
9498 (i386_linux_usrregs_info): New.
9499 (i386_linux_regs_info): New.
9500 (x86_linux_regs_info): New.
9501 (x86_arch_setup): Reimplement.
9502 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9503 (x86_emit_ops): Ditto.
9504 (the_low_target): Adjust. Install x86_linux_regs_info,
9505 x86_cannot_fetch_register, and x86_cannot_store_register.
9506 (initialize_low_arch): New.
9507 * linux-ia64-low.c (tdesc_ia64): Declare.
9508 (ia64_fetch_register): Adjust.
9509 (ia64_usrregs_info, regs_info): New globals.
9510 (ia64_regs_info): New function.
9511 (the_low_target): Adjust.
9512 (initialize_low_arch): New function.
9513 * linux-sparc-low.c (tdesc_sparc64): Declare.
9514 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9515 Adjust.
9516 (sparc_arch_setup): New function.
9517 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9518 (the_low_target): Adjust.
9519 (initialize_low_arch): New function.
9520 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9521 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9522 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9523 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9524 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9525 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9526 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9527 (tdesc_powerpc_isa205_vsx64l): Declare.
9528 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9529 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9530 (ppc_set_pc, ppc_get_hwcap): Adjust.
9531 (ppc_usrregs_info): Forward declare.
9532 (!__powerpc64__) ppc_regmap_adjusted: New global.
9533 (ppc_arch_setup): Adjust to the current process'es target
9534 description.
9535 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9536 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9537 (ppc_store_evrregset): Adjust.
9538 (target_regsets): Rename to ...
9539 (ppc_regsets): ... this, and make static.
9540 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9541 (ppc_regs_info): New function.
9542 (the_low_target): Adjust.
9543 (initialize_low_arch): New function.
9544 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9545 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9546 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9547 (tdesc_s390x_linux64v2): Declare.
9548 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9549 (s390_fill_gregset, s390_store_last_break): Adjust.
9550 (target_regsets): Rename to ...
9551 (s390_regsets): ... this, and make static.
9552 (s390_get_pc, s390_set_pc): Adjust.
9553 (s390_get_hwcap): New target_desc parameter, and use it.
9554 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9555 (s390_arch_setup): Adjust to set the current process'es target
9556 description. Don't adjust the regmap.
9557 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9558 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9559 (regs_info_3264): New globals.
9560 (s390_regs_info): New function.
9561 (the_low_target): Adjust.
9562 (initialize_low_arch): New function.
9563 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9564 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9565 [__mips64] (init_registers_mips_linux)
9566 (init_registers_mips_dsp_linux): Delete defines.
9567 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9568 (have_dsp): New global.
9569 (mips_read_description): New, based on mips_arch_setup.
9570 (mips_arch_setup): Reimplement.
9571 (get_usrregs_info): New function.
9572 (mips_cannot_fetch_register, mips_cannot_store_register)
9573 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9574 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9575 (target_regsets): Rename to ...
9576 (mips_regsets): ... this, and make static.
9577 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9578 (dsp_regs_info, regs_info): New globals.
9579 (mips_regs_info): New function.
9580 (the_low_target): Adjust.
9581 (initialize_low_arch): New function.
9582 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9583 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9584 Declare.
9585 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9586 (arm_read_description): New, with bits factored from
9587 arm_arch_setup.
9588 (arm_arch_setup): Reimplement.
9589 (target_regsets): Rename to ...
9590 (arm_regsets): ... this, and make static.
9591 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9592 (arm_regs_info): New function.
9593 (the_low_target): Adjust.
9594 (initialize_low_arch): New function.
9595 * linux-m68k-low.c (tdesc_m68k): Declare.
9596 (target_regsets): Rename to ...
9597 (m68k_regsets): ... this, and make static.
9598 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9599 (m68k_regs_info): New function.
9600 (m68k_arch_setup): New function.
9601 (the_low_target): Adjust.
9602 (initialize_low_arch): New function.
9603 * linux-sh-low.c (tdesc_sharch): Declare.
9604 (target_regsets): Rename to ...
9605 (sh_regsets): ... this, and make static.
9606 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9607 (sh_regs_info, sh_arch_setup): New functions.
9608 (the_low_target): Adjust.
9609 (initialize_low_arch): New function.
9610 * linux-bfin-low.c (tdesc_bfin): Declare.
9611 (bfin_arch_setup): New function.
9612 (bfin_usrregs_info, regs_info): New globals.
9613 (bfin_regs_info): New function.
9614 (the_low_target): Adjust.
9615 (initialize_low_arch): New function.
9616 * linux-cris-low.c (tdesc_cris): Declare.
9617 (cris_arch_setup): New function.
9618 (cris_usrregs_info, regs_info): New globals.
9619 (cris_regs_info): New function.
9620 (the_low_target): Adjust.
9621 (initialize_low_arch): New function.
9622 * linux-cris-low.c (tdesc_crisv32): Declare.
9623 (cris_arch_setup): New function.
9624 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9625 (cris_regs_info): New function.
9626 (the_low_target): Adjust.
9627 (initialize_low_arch): New function.
9628 * linux-m32r-low.c (tdesc_m32r): Declare.
9629 (m32r_arch_setup): New function.
9630 (m32r_usrregs_info, regs_info): New globals.
9631 (m32r_regs_info): Adjust.
9632 (initialize_low_arch): New function.
9633 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9634 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9635 (tic6x_usrregs_info): Forward declare.
9636 (tic6x_read_description): New function, based on ...
9637 (tic6x_arch_setup): ... this. Reimplement.
9638 (target_regsets): Rename to ...
9639 (tic6x_regsets): ... this, and make static.
9640 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9641 (tic6x_regs_info): New function.
9642 (the_low_target): Adjust.
9643 (initialize_low_arch): New function.
9644 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9645 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9646 (target_regsets): Rename to ...
9647 (xtensa_regsets): ... this, and make static.
9648 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9649 globals.
9650 (xtensa_arch_setup, xtensa_regs_info): New functions.
9651 (the_low_target): Adjust.
9652 (initialize_low_arch): New function.
9653 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9654 (nios2_arch_setup): Set the current process'es tdesc.
9655 (target_regsets): Rename to ...
9656 (nios2_regsets): ... this.
9657 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9658 (nios2_regs_info): New function.
9659 (the_low_target): Adjust.
9660 (initialize_low_arch): New function.
a261b8f5
PA
9661 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9662 (aarch64_arch_setup): Set the current process'es tdesc.
9663 (target_regsets): Rename to ...
9664 (aarch64_regsets): ... this.
9665 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9666 (aarch64_regs_info): New function.
9667 (the_low_target): Adjust.
9668 (initialize_low_arch): New function.
3aee8918
PA
9669 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9670 globals.
9671 (target_regsets): Rename to ...
9672 (tile_regsets): ... this.
9673 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9674 (tile_regs_info): New function.
9675 (tile_arch_setup): Set the current process'es tdesc.
9676 (the_low_target): Adjust.
9677 (initialize_low_arch): New function.
9678 * spu-low.c (tdesc_spu): Declare.
9679 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9680 * win32-arm-low.c (tdesc_arm): Declare.
9681 (arm_arch_setup): New function.
9682 (the_low_target): Install arm_arch_setup instead of
9683 init_registers_arm.
9684 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9685 (init_windows_x86): Rename to ...
9686 (i386_arch_setup): ... this. Set `win32_tdesc'.
9687 (the_low_target): Adjust.
9688 * win32-low.c (win32_tdesc): New global.
9689 (child_add_thread): Don't create the thread cache here.
9690 (do_initial_child_stuff): Set the new process'es tdesc.
9691 * win32-low.h (struct target_desc): Forward declare.
9692 (win32_tdesc): Declare.
9693 * lynx-i386-low.c (tdesc_i386): Declare global.
9694 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9695 * lynx-low.c (lynx_tdesc): New global.
9696 (lynx_add_process): Set the new process'es tdesc.
9697 * lynx-low.h (struct target_desc): Forward declare.
9698 (lynx_tdesc): Declare global.
9699 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9700 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9701 * nto-low.c (nto_tdesc): New global.
9702 (do_attach): Set the new process'es tdesc.
9703 * nto-low.h (struct target_desc): Forward declare.
9704 (nto_tdesc): Declare.
9705 * nto-x86-low.c (tdesc_i386): Declare.
9706 (nto_x86_arch_setup): Set `nto_tdesc'.
9707
b1fbec62
GB
97082013-06-04 Gary Benson <gbenson@redhat.com>
9709
9710 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9711 to qSupported response when appropriate.
9712 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9713 with nonzero-length annex.
9714 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9715 arguments supplied in annex.
9716
d1ec4ce7
DE
97172013-05-31 Doug Evans <dje@google.com>
9718
ac44adcb 9719 PR server/15594
d1ec4ce7
DE
9720 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9721 64 bits in 64-cross-32 environment.
9722
9b25f2d3
PA
97232013-05-28 Pedro Alves <palves@redhat.com>
9724
9725 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9726 (aarch64-without-fpu.c): Delete rule.
9727 * configure.srv (aarch64*-*-linux*): Remove references to
9728 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9729 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9730 declaration.
9731
6740dc9c
PA
97322013-05-24 Pedro Alves <palves@redhat.com>
9733
9734 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9735 instead of strchr/decode_address. Error if the range isn't split
9736 with a ','. Don't assume there's be a ':' in the action.
9737
c2d6af84
PA
97382013-05-23 Yao Qi <yao@codesourcery.com>
9739 Pedro Alves <palves@redhat.com>
9740
9741 * linux-low.c (lwp_in_step_range): New function.
9742 (linux_wait_1): If the thread was range stepping and stopped
9743 outside the stepping range, report the stop to GDB. Otherwise,
9744 continue stepping. Add range stepping debug output.
9745 (linux_set_resume_request): Copy the step range from the resume
9746 request to the lwp.
9747 (linux_supports_range_stepping): New.
9748 (linux_target_ops) <supports_range_stepping>: Set to
9749 linux_supports_range_stepping.
9750 * linux-low.h (struct linux_target_ops)
9751 <supports_range_stepping>: New field.
9752 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9753 * linux-x86-low.c (x86_supports_range_stepping): New.
9754 (the_low_target) <supports_range_stepping>: Set to
9755 x86_supports_range_stepping.
9756 * server.c (handle_v_cont): Handle 'r' action.
9757 (handle_v_requests): Append ";r" if the target supports range
9758 stepping.
9759 * target.h (struct thread_resume) <step_range_start,
9760 step_range_end>: New fields.
9761 (struct target_ops) <supports_range_stepping>:
9762 New field.
9763 (target_supports_range_stepping): New macro.
9764
58794e1a
JB
97652013-05-17 Joel Brobecker <brobecker@adacore.com>
9766
9767 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9768 confusion in comment.
9769
d631c5a7
JB
97702013-05-17 Joel Brobecker <brobecker@adacore.com>
9771
9772 * lynx-low.c (struct process_info_private): New type.
9773 (lynx_add_process): New function.
9774 (lynx_create_inferior, lynx_attach): Replace calls to
9775 add_process by calls to lynx_add_process.
9776 (lynx_resume): If PTID is null, then try using
9777 current_process()->private->last_wait_event_ptid.
9778 Add comments.
9779 (lynx_clear_inferiors): Delete. The contents of that function
9780 has been inlined in lynx_mourn;
9781 (lynx_wait_1): Save the ptid in the process's private data.
9782 (lynx_mourn): Free the process' private data. Replace call
9783 to lynx_clear_inferiors by call to clear_inferiors.
9784
96f7a20f
YQ
97852013-05-17 Yao Qi <yao@codesourcery.com>
9786
9787 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9788 the right place.
9789
db0dfaa0
LM
97902013-05-16 Luis Machado <lgustavo@codesourcery.com>
9791
9792 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9793 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9794 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9795 PT_TEXT_END_ADDR guards. Update comments.
9796 (linux_target_op) <read_offsets>: Conditionally define to
9797 linux_read_offsets if the target is UCLIBC and if it defines
9798 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9799
68f5f838
SL
98002013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9801 Andrew Jenner <andrew@codesourcery.com>
9802
9803 * Makefile.in (SFILES): Add linux-nios2-low.c.
9804 (clean): Add action to delete nios2-linux.c.
9805 (nios2-linux.c): New rule.
9806 * configure.srv: Add nios2*-*-linux*.
9807 * linux-nios2-low.c: New.
9808
1ebff1fd
HAQ
98092013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9810
9811 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9812
f6150862
HZ
98132013-04-25 Hui Zhu <hui@codesourcery.com>
9814
9815 PR gdb/15186
f6150862
HZ
9816 * ax.c (ax_printf): Add fflush.
9817
614c279d
TT
98182013-04-22 Tom Tromey <tromey@redhat.com>
9819
9820 * Makefile.in (SFILES): Add filestuff.c.
9821 (OBS): Add filestuff.o.
9822 (filestuff.o): New target.
9823 * config.in, configure: Rebuild.
9824 * configure.ac: Check for fdwalk, pipe2.
9825
7d4e5717
PA
98262013-04-17 Pedro Alves <palves@redhat.com>
9827
9828 * configure.ac (USE_THREAD_DB): Delete variable.
9829 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9830 Don't AC_SUBST USE_THREAD_DB.
9831 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9832 * config.in, configure: Regenerate.
9833
d5c93e41
PA
98342013-04-16 Pedro Alves <palves@redhat.com>
9835
9836 * linux-low.h (struct lwp_info) <thread_known>: Move under
9837 the USE_THREAD_DB #ifdef.
9838
04f5fe89
PA
98392013-04-16 Pedro Alves <palves@redhat.com>
9840
9841 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9842 (linux-low.o): Delete rule.
9843 * linux-low.h: Always include "gdb_thread_db.h" instead of
9844 conditionally including thread_db.h.
9845 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9846 HAVE_THREAD_DB_H.
9847
480b27bf
JK
98482013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9849
9850 * Makefile.in (install-only): Fix make install regression.
9851
43662968
JK
98522013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9853
9854 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9855 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9856 installation.
9857 * gdbserver.1: Remove.
9858
3e74e146
PA
98592013-03-22 Pedro Alves <palves@redhat.com>
9860
9861 * linux-low.c (handle_extended_wait): Don't call
9862 linux_enable_event_reporting.
9863
a8347a2a
TT
98642013-03-15 Tony Theodore <tonyt@logyst.com>
9865
9866 PR build/9098:
9867 * Makefile.in (SHELL): Use @SHELL@.
9868
eeb56fa7
SDJ
98692013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9870
9871 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9872 compiler warning.
9873
4fa7e2ff
JB
98742013-03-13 Joel Brobecker <brobecker@adacore.com>
9875
9876 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9877 Remove extraneous NULL element.
9878
8ddb1965
YQ
98792013-03-13 Yao Qi <yao@codesourcery.com>
9880
9881 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9882 'V' block in trace frame.
9883
9accd112
MM
98842013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9885
9886 * target.h (struct target_ops): Add btrace ops.
9887 (target_supports_btrace): New macro.
9888 (target_enable_btrace): New macro.
9889 (target_disable_btrace): New macro.
9890 (target_read_btrace): New macro.
9891 * gdbthread.h (struct thread_info): Add btrace field.
9892 * server.c: Include btrace-common.h.
9893 (handle_btrace_general_set): New function.
9894 (handle_btrace_enable): New function.
9895 (handle_btrace_disable): New function.
9896 (handle_general_set): Call handle_btrace_general_set.
9897 (handle_qxfer_btrace): New function.
9898 (struct qxfer qxfer_packets[]): Add btrace entry.
9899 * inferiors.c (remove_thread): Disable btrace.
9900 * linux-low: Include linux-btrace.h.
9901 (linux_low_enable_btrace): New function.
9902 (linux_low_read_btrace): New function.
9903 (linux_target_ops): Add btrace ops.
9904 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9905 Add srv_linux_btrace=yes.
9906 (x86_64-*-linux*): Add linux-btrace.o.
9907 Add srv_linux_btrace=yes.
9908 * configure.ac: Define HAVE_LINUX_BTRACE.
9909 * config.in: Regenerated.
9910 * configure: Regenerated.
9911
5cc22e4c
MM
99122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9913
9914 * server.c (handle_qxfer): Preserve error message if -3 is
9915 returned.
9916 (qxfer): Document the -3 return value.
9917
7c97f91e
MM
99182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9919
9920 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9921 (linux_btrace_h): New variable.
9922 (linux-btrace.o): New rule.
9923
be9a119c 99242013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9925 Hafiz Abid Qadeer <abidh@codesourcery.com>
9926
9927 * tracepoint.c (trace_buffer_size): New global.
9928 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9929 (init_trace_buffer): Change to one-argument function. Allocate
9930 trace buffer memory.
9931 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9932 handle QTBuffer:size packet.
9933 (cmd_bigqtbuffer_size): New function.
9934 (initialize_tracepoint): Call init_trace_buffer with
9935 DEFAULT_TRACE_BUFFER_SIZE.
9936 * server.c (handle_query): Add QTBuffer:size in the
9937 supported packets.
9938
e64f7499
YQ
99392013-03-07 Yao Qi <yao@codesourcery.com>
9940
9941 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9942 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9943 of -1.
9944 (cmd_qtsp): Adjust condition. Do post increment.
9945 Set cur_action and cur_step_action back to 0.
9946
f0ae6fc3
PA
99472013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9948
9949 PR server/15236
9950 * linux-low.c (linux_write_memory): Return early success if LEN is
9951 zero.
9952
b5b0b0af
CV
99532013-03-05 Corinna Vinschen <vinschen@redhat.de>
9954
334ad4a8 9955 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9956
589bc927
TT
99572013-02-28 Tom Tromey <tromey@redhat.com>
9958
9959 * configure.ac: Invoke AC_SYS_LARGEFILE.
9960 * configure, config.in: Rebuild.
9961
dfe07582
CV
99622013-02-28 Corinna Vinschen <vinschen@redhat.com>
9963
9964 * win32-low.c: Throughout, fix format strings and casts of
9965 printf-like functions to avoid type related warnings on all
9966 platforms.
9967 (get_child_debug_event): Print dwDebugEventCode as hex since
9968 that's how it's usually documented.
9969
736cd585
YQ
99702013-02-28 Yao Qi <yao@codesourcery.com>
9971
9972 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9973 pulongest.
9974
e1f58301
JW
99752013-02-27 Jiong Wang <jiwang@tilera.com>
9976
9977 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9978 (reg-tilegx32.c): New rule.
9979 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9980 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9981 different register info initializer according to elf class.
9982 (init_registers_tilgx32): New function. The tilegx32 register info
9983 initializer.
9984 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9985 (tile_store_gregset): Likewise.
9986
d171ca78
YQ
99872013-02-27 Yao Qi <yao@codesourcery.com>
9988
9989 * server.c (process_point_options): Print debug message when
9990 debug_threads is true.
9991
282bbdf3
YQ
99922013-02-26 Yao Qi <yao@codesourcery.com>
9993
9994 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9995
aca22551
PA
99962013-02-19 Pedro Alves <palves@redhat.com>
9997 Kai Tietz <ktietz@redhat.com>
9998
9999 PR gdb/15161
10000
10001 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10002 instead of strtoul to extract address from packet.
10003 (process_serial_event) <'z'>: Likewise.
10004
4f3cee1c
YQ
100052013-02-18 Yao Qi <yao@codesourcery.com>
10006
10007 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10008
8e1d55a3
PA
100092013-02-14 Pedro Alves <palves@redhat.com>
10010
10011 Plug memory leak.
10012
10013 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10014 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10015
458820da
PA
100162013-02-14 Pedro Alves <palves@redhat.com>
10017
10018 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10019
baea0dae
PA
100202013-02-14 Pedro Alves <palves@redhat.com>
10021
10022 * tracepoint.c (save_string): Delete.
10023 (add_tracepoint_action): Use savestring instead of save_string.
10024
0b1afbb3
PA
100252013-02-12 Pedro Alves <palves@redhat.com>
10026
10027 * linux-xtensa-low.c: Ditto.
10028 * xtensa-xtregs.c: Ditto.
10029
8a4ac37e
PA
100302013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10031
10032 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10033 thread_db.
10034
148de6bb
MS
100352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10036
10037 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10038 aarch64_num_wp_regs and aarch64_num_bp_regs to
10039 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10040
55fac6e0
MS
100412013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10042
10043 * linux-aarch64-low.c (ps_get_thread_area): Replace
10044 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10045
176eb98c
MS
100462013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10047 Marcus Shawcroft <marcus.shawcroft@arm.com>
10048 Nigel Stephens <nigel.stephens@arm.com>
10049 Yufeng Zhang <yufeng.zhang@arm.com>
10050
10051 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10052 (aarch64.c, aarch64-without-fpu.c): New targets.
10053 * configure.srv (aarch64*-*-linux*): New.
10054 * linux-aarch64-low.c: New file.
10055
56f7af9c
MS
100562013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10057
43aaf8b6 10058 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10059 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10060 (dequeue_one_deferred_signal, linux_resume_one_thread)
10061 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10062 (linux_tracefork_grandchild, linux_test_for_tracefork)
10063 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10064 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10065 where the argument is 0.
10066
60f662b0
YQ
100672013-01-25 Yao Qi <yao@codesourcery.com>
10068
10069 * event-loop.c: Include "queue.h".
10070 (gdb_event_p): New typedef.
10071 (struct gdb_event) <next_event>: Remove.
10072 (event_queue): Change to QUEUE(gdb_event_p).
10073 (async_queue_event): Remove.
10074 (gdb_event_xfree): New.
10075 (initialize_event_loop): New.
10076 (process_event): Use API from QUEUE.
10077 (wait_for_event): Likewise.
10078 * server.c (main): Call initialize_event_loop.
10079 * server.h (initialize_event_loop): Declare.
10080
5ae4861a
YQ
100812013-01-18 Yao Qi <yao@codesourcery.com>
10082
10083 * ax.h (struct eval_agent_expr_context): New.
10084 (gdb_eval_agent_expr): Update declaration.
10085 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10086 TFRAME. Add new argument CTX.
10087 * server.h (struct eval_agent_expr_context): Declare.
10088 (agent_mem_read, agent_tsv_read): Update declaration.
10089 (agent_mem_read_string): Likewise.
10090 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10091 (add_traceframe_block): Add new argument TPOINT.
10092 Increase TPOINT->traceframe_usage.
10093 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10094 eval_tracepoint_agent_expr.
10095 (condition_true_at_tracepoint): Likewise.
10096 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10097 (agent_mem_read_string, agent_tsv_read): Likewise.
10098
85e00e85
YQ
100992013-01-16 Yao Qi <yao@codesourcery.com>
10100
10101 * linux-low.c (linux_resume_one_lwp): Don't check
10102 'lwp->bp_reinsert != 0'.
10103
4039cf45
JB
101042013-01-07 Joel Brobecker <brobecker@adacore.com>
10105 Pedro Alves <palves@redhat.com>
10106
10107 * lynx-low.c (ptrace_request_to_str): Define a temporary
10108 macro and use it to simplify this function's implementation.
10109
9044dee2
JB
101102013-01-07 Joel Brobecker <brobecker@adacore.com>
10111
10112 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10113 sets errno.
10114
e6352c8f
JB
101152013-01-07 Joel Brobecker <brobecker@adacore.com>
10116
10117 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10118
50681a27
JB
101192013-01-07 Joel Brobecker <brobecker@adacore.com>
10120
10121 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10122
3f6e77ef
JB
101232013-01-07 Joel Brobecker <brobecker@adacore.com>
10124
10125 * lynx-low.c (lynx_resume): Use the resume_info parameter
10126 to determine the ptid for the lynx_ptrace call, unless
10127 it is equal to minus_one_ptid, in which case we use the
10128 ptid of the current_inferior.
10129 (lynx_wait_1): After having received a thread create/exit
10130 event, resume the inferior's execution using the signaling
10131 thread's ptid, rather than the old ptid.
10132
7fda33ae
JB
101332013-01-07 Joel Brobecker <brobecker@adacore.com>
10134
10135 * lynx-low.c (lynx_resume): Delete variable ret.
10136
b9786c74
JB
101372013-01-01 Joel Brobecker <brobecker@adacore.com>
10138
10139 * gdbreplay.c (gdbreplay_version): Update copyright year.
10140 * server.c (gdbserver_version): Likewise.
10141
8b93d60f
JB
101422012-12-17 Joel Brobecker <brobecker@adacore.com>
10143
10144 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10145 new thread.
10146
037335a7
JB
101472012-12-17 Joel Brobecker <brobecker@adacore.com>
10148
10149 * lynx-low.c (ptrace_request_to_str): Add handling for
10150 PTRACE_GETTRACESIG.
10151
52d4cbd8
JB
101522012-12-17 Joel Brobecker <brobecker@adacore.com>
10153
10154 * lynx-low.c (lynx_attach): Delete variable new_process.
10155
ab8f6ca9
JB
101562012-12-17 Joel Brobecker <brobecker@adacore.com>
10157
10158 * lynx-low.c (lynx_create_inferior): Delete variable
10159 new_process.
10160
78cbc024
JB
101612012-12-17 Joel Brobecker <brobecker@adacore.com>
10162
10163 * lynx-low.c (ptrace_request_to_str): Do not handle
10164 PTRACE_GETTHREADLIST if this macro does not exist.
10165
14a00470
YQ
101662012-12-15 Yao Qi <yao@codesourcery.com>
10167
10168 * Makefile.in (OBS): Add notif.o.
10169 * notif.c, notif.h: New.
10170 * server.c: Include "notif.h".
10171 (struct vstop_notif) <next>: Remove.
10172 <base>: New field.
10173 (queue_stop_reply): Update.
10174 (push_event, send_next_stop_reply): Remove.
10175 (discard_queued_stop_replies): Update.
10176 (notif_stop): New variable.
10177 (handle_v_stopped): Remove.
10178 (handle_v_requests): Don't call handle_v_stopped. Call
10179 handle_ack_notif instead.
10180 (queue_stop_reply_callback): Call notif_event_enque instead
10181 of queue_stop_reply.
10182 (handle_status): Don't call send_next_stop_reply, call
10183 notif_write_event instead.
10184 (kill_inferior_callback): Likewise.
10185 (detach_or_kill_inferior_callback): Likewise.
10186 (main): Call initialize_notif.
10187 (process_serial_event): Call QUEUE_is_empty.
10188 (handle_target_event): Call notif_push instead of push event.
10189 * server.h (push_event): Remove declaration.
10190
61c125b9
TT
101912012-12-10 Tom Tromey <tromey@redhat.com>
10192
10193 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10194 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10195 macros.
10196 (.c.o): Rewrite.
10197 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10198 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10199 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10200 (amd64-linux-ipa.o, ax.o): Rewrite.
10201 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10202 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10203 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10204 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10205 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10206 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10207 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10208 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10209 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10210 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10211 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10212 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10213 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10214 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10215 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10216 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10217 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10218 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10219 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10220 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10221 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10222 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10223 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10224 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10225 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10226 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10227 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10228 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10229 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10230 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10231 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10232 (reg-tilegx.o): Remove.
10233 (all_object_files): New macro.
10234 Include .deps files.
10235 * aclocal.m4, configure: Rebuild.
10236 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10237 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10238 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10239
e90e9ad9
TT
102402012-12-05 Tom Tromey <tromey@redhat.com>
10241
10242 PR gdb/14917:
10243 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10244
02d403bf 102452012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10246
10247 * configure.ac: Check for linux/perf_event.h.
10248 * config.in: Regenerated.
10249 * configure: Regenerated.
10250
0270a750
PA
102512012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10252
10253 * hostio.c (handle_readlink): Decrease buffer size
10254 parameter passed to readlink by one byte.
10255
8c29b58e
YQ
102562012-11-26 Yao Qi <yao@codesourcery.com>
10257
10258 * configure.ac (build_warnings): Append '-Wempty-body'.
10259 * configure: Regenerated.
10260 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10261 body.
10262
8bdce1ff
PM
102632012-11-15 Pierre Muller <muller@sourceware.org>
10264
10265 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10266 * config.in: Regenerate.
10267 * configure: Regenerate.
10268 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10269 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10270 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10271 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10272 header.
10273 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10274 instead of <sys/wait.h> header.
10275 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10276
02d403bf 102772012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10278
10279 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10280 (various make rules): Remove -DGDBSERVER
10281
fbd5db48
YQ
102822012-11-09 Yao Qi <yao@codesourcery.com>
10283
10284 * spu-low.c (current_ptid): Move it to ..
10285 * gdbthread.h: ... here. New.
10286 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10287 * server.c (myresume, process_serial_event): Likewise.
10288 * thread-db.c (thread_db_find_new_threads): Likewise.
10289 * tracepoint.c (run_inferior_command): Likewise.
10290
b3dc46ff
AB
102912012-10-01 Andrew Burgess <aburgess@broadcom.com>
10292
10293 * server.c (handle_search_memory_1): Include access length in
10294 warning message.
10295
07c04788
HPN
102962012-09-05 Michael Brandt <michael.brandt@axis.com>
10297
10298 * linux-crisv32-low.c: Fix compile errors.
10299
918d227b
YQ
103002012-09-04 Yao Qi <yao@codesourcery.com>
10301
10302 * tracepoint.c (cmd_qtsv): Adjust debug message.
10303 Don't check CUR_TPOINT.
10304
18c1b81a
YQ
103052012-08-28 Yao Qi <yao@codesourcery.com>
10306
10307 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10308 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10309 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10310 Remove declarations of xmalloc, xreallloc, xstrdup and
10311 freeargv.
10312 * Makefile.in (libiberty_h): New.
10313 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10314 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10315
dc82f37b
YQ
103162012-08-23 Yao Qi <yao@codesourcery.com>
10317
10318 * server.h: Remove declaration of 'xsnprintf'.
10319
406b1477
KS
103202012-08-22 Keith Seitz <keiths@redhat.com>
10321
10322 * server.h: Include build-gnulib-gbserver/config.h.
10323 * gdbreplay.c: Likewise.
10324
e6712ff1
DE
103252012-08-08 Doug Evans <dje@google.com>
10326
10327 * Makefile.in (SFILES): Add gdb_vecs.c.
10328 (OBS): Add gdb_vecs.o.
10329 (gdb_vecs_h, host_defs_h): New variables.
10330 (thread-db.o): Add $(gdb_vecs_h) dependency.
10331 (gdb_vecs.o): New rule.
10332 * thread-db.c: #include "gdb_vecs.h".
10333 (thread_db_load_search): Use a vector to iterate over path elements.
10334 Handle text appearing after "$pdir".
10335
10336 * configure.ac: Add check for strstr.
10337 * config.in: Regenerate.
10338 * configure: Regenerate.
10339
7c3270ae
UW
103402012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10341
10342 * hostio.c (handle_pread): If pread fails, fall back to attempting
10343 lseek/read.
10344 (handle_pwrite): Likewise for pwrite.
10345
b62e2b27
UW
103462012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10347
10348 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10349 between unsupported TYPE and unimplementable ADDR/LEN combination.
10350 (arm_insert_point): Act on new return value.
10351
78a99e91
PA
103522012-07-31 Pedro Alves <palves@redhat.com>
10353
10354 * server.c (process_point_options): Only skip tokens if we find
10355 one that is unrecognized. Don't treat 'X' specially while
10356 skipping unrecognized tokens.
10357
fcf303ab
UW
103582012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10359
10360 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10361 to 4-byte-align HW breakpoint addresses for Thumb.
10362
7255706c
YQ
103632012-07-27 Yao Qi <yao@codesourcery.com>
10364
10365 PR remote/14161.
10366
10367 * server.h: Declare gdb_agent_about_to_close.
10368 * target.c (kill_inferior): Include "agent.h".
10369 New. Send command 'kill'.
10370 * target.h (kill_inferior): Removed macro.
10371 * tracepoint.c (gdb_agent_about_to_close): New.
10372 (gdb_agent_helper_thread): Handle command 'close'.
10373 Wait endlessly until the inferior stops.
10374 Install gdb_agent_remove_socket to atexit hook.
10375 (agent_socket_name): New static variable.
10376 (gdb_agent_socket_init): Replace local variable 'name' with
10377 'agent_socket_name'.
10378 (gdb_agent_remove_socket): New.
10379
5a3f286f
YQ
103802012-07-27 Yao Qi <yao@codesourcery.com>
10381
10382 * server.c (process_point_options): Stop at 'X' when parsing.
10383
961bd387
ME
103842012-07-19 Michael Eager <eager@eagercon.com>
10385
a261b8f5 10386 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10387 to hw_execute.
10388 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10389 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10390 hardware breakpoint.
10391
aa7c7447
JK
103922012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10393
10394 * gdbserver/linux-low.c (initialize_low): Call
10395 linux_ptrace_init_warnings.
10396
7f216e7c
DE
103972012-07-02 Doug Evans <dje@google.com>
10398
10399 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10400 pointer to int.
10401
d3ce09f5
SS
104022012-07-02 Stan Shebs <stan@codesourcery.com>
10403
10404 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10405 (ax.o): Add it to build rule.
10406 (ax-ipa.o): Ditto.
10407 (OBS): Add format.o.
10408 (IPA_OBS): Add format.o.
10409 * server.c (handle_query): Claim support for breakpoint commands.
10410 (process_point_options): Add command case.
10411 (process_serial_event): Leave running if there are printfs in
10412 effect.
10413 * mem-break.h (any_persistent_commands): Declare.
10414 (add_breakpoint_commands): Declare.
10415 (gdb_no_commands_at_breakpoint): Declare.
10416 (run_breakpoint_commands): Declare.
10417 * mem-break.c (struct point_command_list): New struct.
10418 (struct breakpoint): New field command_list.
10419 (any_persistent_commands): New function.
10420 (add_commands_to_breakpoint): New function.
10421 (add_breakpoint_commands): New function.
10422 (gdb_no_commands_at_breakpoint): New function.
10423 (run_breakpoint_commands): New function.
10424 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10425 locally.
10426 * ax.c: Include format.h.
10427 (ax_printf): New function.
10428 (gdb_eval_agent_expr): Add printf opcode.
10429
2f8f6aed
YQ
104302012-06-13 Yao Qi <yao@codesourcery.com>
10431
10432 * server.c (start_inferior): Remove duplicated writes to fields
10433 'last_resume_kind' and 'last_status' of 'current_inferior'.
10434
0c9070b3
YQ
104352012-06-12 Yao Qi <yao@codesourcery.com>
10436 Pedro Alves <palves@redhat.com>
10437
10438 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10439 comment.
10440 * server.c (handle_v_cont): Extend comment.
10441
c52daf70
YQ
104422012-06-11 Yao Qi <yao@codesourcery.com>
10443
10444 * linux-low.c (linux_attach): Add 'static'.
10445
d38bbb0a
YQ
104462012-06-06 Yao Qi <yao@codesourcery.com>
10447
10448 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10449
89dc0afd
JK
104502012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10451
10452 Fix gcc -flto compilation warning.
10453 * server.c (main): Make variable multi_mode and attach volatile.
10454
75f62ce7
TJB
104552012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10456
10457 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10458 if the platform doesn't know about it.
10459
65f479b6
PA
104602012-05-30 Jeff Kenton <jkenton@tilera.com>
10461
10462 * Makefile.in (SFILES): Add linux-tile-low.c.
10463 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10464 * configure.srv: Handle tilegx-*-linux*.
10465 * linux-tile-low.c: New file.
10466
0c5bf5a9
JK
104672012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10468
10469 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10470
a493e3e2
PA
104712012-05-24 Pedro Alves <palves@redhat.com>
10472
10473 PR gdb/7205
10474
43aaf8b6 10475 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10476
2ea28649
PA
104772012-05-24 Pedro Alves <palves@redhat.com>
10478
10479 PR gdb/7205
10480
10481 Replace target_signal with gdb_signal throughout.
10482
8d409d16
MR
104832012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10484
10485 * linux-low.c (linux_store_registers): Avoid the copying sequence
10486 when no data has been retrieved by ptrace.
10487
23512c01
MGD
104882012-05-22 Will Deacon <will.deacon@arm.com>
10489
10490 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10491 Include asm/ptrace.h.
10492 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10493 already defined.
10494
4934b29e
MR
104952012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10496
10497 * linux-low.c (linux_store_registers): Don't re-retrieve data
10498 with ptrace that has already been obtained from /proc. Always
10499 copy any data retrieved with ptrace to the buffer supplied.
10500
bde24c0a
PA
105012012-05-11 Yao Qi <yao@codesourcery.com>
10502 Pedro Alves <palves@redhat.com>
10503
10504 * linux-low.c (enum stopping_threads_kind): New.
10505 (stopping_threads): Change type to `enum stopping_threads_kind'.
10506 (handle_extended_wait): If stopping and suspending threads, leave
10507 the new_lwp suspended too.
10508 (linux_wait_for_event): Adjust.
10509 (stop_all_lwps): Set `stopping_threads' to
10510 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10511 whether we're suspending threads or just stopping them. Assert no
10512 recursion happens.
10513
623b6bdf
YQ
105142012-04-29 Yao Qi <yao@codesourcery.com>
10515
10516 * server.h: Move some code to ...
10517 * gdbthread.h: ... here. New.
10518 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10519 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10520 (nto-low.o, win32-low.o): Likewise.
10521 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10522 * regcache.c, remote-utils.c, server.c: Likewise.
10523 * target.c, tracepoint.c, win32-low.c: Likewise.
10524
f15f9948
TJB
105252012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10526
10527 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10528 (PTRACE_ARG4_TYPE): Likewise.
10529 (PTRACE_XFER_TYPE): Likewise.
10530 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10531 ptrace to PTRACE_ARG3_TYPE.
10532 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10533 (PTRACE_ARG4_TYPE): Likewise.
10534 (PTRACE_XFER_TYPE): Likewise.
10535 (linux_detach_one_lwp): Cast fourth argument of
10536 ptrace to long then PTRACE_ARG4_TYPE.
10537 (regsets_fetch_inferior_registers): Cast third argument of
10538 ptrace to long then PTRACE_ARG3_TYPE.
10539 (regsets_store_inferior_registers): Likewise.
10540
38ea300a
PA
105412012-04-20 Pedro Alves <palves@redhat.com>
10542
10543 * configure: Regenerate.
10544
c971b7fa
PA
105452012-04-19 Pedro Alves <palves@redhat.com>
10546
43aaf8b6 10547 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10548 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10549 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10550 (all, install-only, uninstall, clean-info, all-lib, clean): No
10551 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10552 (maintainer-clean realclean distclean): Use subdir_do.
10553 (subdir_do): New.
10554 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10555 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10556 * acinclude.m4: Include acx_configure_dir.m4.
10557 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10558 calls. Call AC_PROG_RANLIB. Configure gnulib using
10559 ACX_CONFIGURE_DIR.
10560 (GNULIB): New.
10561 (GNULIB_STDINT_H): Adjust.
10562 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10563 * gdbreplay.c: Include build-gnulib/config.h.
10564 * server.h: Likewise.
10565 * aclocal.m4: Regenerate.
10566 * config.in: Regenerate.
10567 * configure: Regenerate.
c971b7fa 10568
809277f8
PA
105692012-04-19 Pedro Alves <palves@redhat.com>
10570
10571 * Makefile.in (LIBGNU, INCGNU): Adjust.
10572 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10573 (all, install-only, uninstall, clean-info, all-lib, clean)
10574 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10575 * configure.ac: Adjust AC_OUTPUT output.
10576 * aclocal.m4: Regenerate.
10577 * configure: Regenerate.
10578
fd9bb8b8
PA
105792012-04-19 Pedro Alves <palves@redhat.com>
10580
10581 * Makefile.in (generated_files): New.
10582 (server_h): Remove the explicit dependency on config.h, and depend
10583 on $generated_files.
10584
1c298c66
PA
105852012-04-19 Pedro Alves <palves@redhat.com>
10586
10587 * Makefile.in (INCGNU): Add -Ignulib.
10588
57c4b50b
PA
105892012-04-19 Pedro Alves <palves@redhat.com>
10590
10591 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10592 (INCGNU): ... this, and spell out -I here.
10593 (GNULIB_LIB): Rename to ...
10594 (LIBGNU): ... this.
10595 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10596
1030e047
PA
105972012-04-19 Pedro Alves <palves@redhat.com>
10598
10599 * config.in: Regenerate.
10600
447d4319
PA
106012012-04-19 Pedro Alves <palves@redhat.com>
10602
10603 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10604 * server.h (memmem): Remove declaration.
10605 * config.in: Regenerate.
10606 * configure: Regenerate.
10607
aad9eab9
YQ
106082012-04-19 Yao Qi <yao@codesourcery.com>
10609
10610 * Makefile.in (SFILES): Add common/vec.c.
10611 (OBS): Add vec.o.
10612 (vec.o): New rule.
10613
3e10640f
YQ
106142012-04-19 Yao Qi <yao@codesourcery.com>
10615
10616 * remote-utils.c (prepare_resume_reply): Replace with macro
10617 target_core_of_thread.
10618 * server.c (handle_qxfer_threads_proper): Likewise.
10619 * target.h (traget_core_of_thread): New macro.
10620
71622373
PA
106212012-04-18 Pedro Alves <palves@redhat.com>
10622
10623 * aclocal.m4: Regenerate.
10624 * configure: Regenerate.
10625
80d26939
YQ
106262012-04-16 Yao Qi <yao@codesourcery.com>
10627
10628 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10629 duplicated on address.
10630
42476b70
YQ
106312012-04-16 Yao Qi <yao@codesourcery.com>
10632
10633 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10634 (struct tracepoint_action_ops) <send>: New field.
10635 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10636 (agent_expr_send, x_tracepoint_action_send): New.
10637 (l_tracepoint_action_send): New.
10638 (cmd_qtdp): Download and install tracepoint
10639 according to `use_agent'.
10640 (run_inferior_command): Add one more parameter `len'.
10641 Update callers.
10642 (tracepoint_send_agent): New.
10643 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10644
7bc83639
YQ
106452012-04-16 Yao Qi <yao@codesourcery.com>
10646
10647 * tracepoint.c (download_tracepoints): Moved to ...
10648 (cmd_qtstart): ... here.
10649
5f18041e
YQ
106502012-04-14 Yao Qi <yao@codesourcery.com>
10651
10652 * tracepoint.c: Include inttypes.h.
10653 (struct collect_memory_action): Use sized types.
10654 (struct tracepoint): Likewise.
10655 (cmd_qtdp, stop_tracing): Update print specifiers.
10656 (cmd_qtp, response_tracepoint): Likewise.
10657 (collect_data_at_tracepoint): Likewise.
10658 (collect_data_at_step): Likewise.
10659
55a8c076
YQ
106602012-04-14 Yao Qi <yao@codesourcery.com>
10661
10662 Import gnulib module inttypes.
10663 * aclocal.m4, config.in, configure: Regenerated.
10664
dc750257
YQ
106652012-04-14 Yao Qi <yao@codesourcery.com>
10666
10667 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10668 Makefile and config.status at last.
10669
0ab5faf9
YQ
106702012-04-13 Yao Qi <yao@codesourcery.com>
10671
10672 * tracepoint.c: Include stdint.h unconditionally.
10673
18f5fd81
TJB
106742012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10675
10676 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10677 on BFD_HAVE_SYS_PROCFS_TYPE.
10678 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10679 * configure: Regenerate.
10680 * config.in: Likewise.
10681
4d47af5c
L
106822012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10683
10684 * Makefile.in (clean): Also remove x32.c x32-linux.c
10685 x32-avx.c x32-avx-linux.c.
10686 (x32.o): New target.
10687 (x32.c): Likewise.
10688 (x32-linux.o): Likewise.
10689 (x32-linux.c): Likewise.
10690 (x32-avx.o): Likewise.
10691 (x32-avx.c): Likewise.
10692 (x32-avx-linux.o): Likewise.
10693 (x32-avx-linux.c): Likewise.
10694
10695 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10696 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10697 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10698 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10699 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10700 i386/x32-avx-linux.xml.
10701
10702 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10703 (init_registers_x32_avx_linux): Likwise.
10704 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10705 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10706
ecedbe58
PA
107072012-04-13 Pedro Alves <palves@redhat.com>
10708
10709 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10710 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10711 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10712 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10713 the sub-make.
10714
c92b5177
L
107152012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10716
10717 * linux-x86-low.c (compat_x32_clock_t): New.
10718 (compat_x32_siginfo_t): Likewise.
10719 (compat_x32_siginfo_from_siginfo): Likewise.
10720 (siginfo_from_compat_x32_siginfo): Likewise.
10721 (linux_is_elf64): Likewise.
10722 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10723 and siginfo_from_compat_x32_siginfo for x32.
10724 (x86_arch_setup): Set linux_is_elf64.
10725
214d508e
L
107262012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10727
10728 PR gdb/13969
10729 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10730 e_machine field.
10731 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10732 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10733 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10734 compatible with process.
10735
c9a1864a
YQ
107362012-04-12 Yao Qi <yao@codesourcery.com>
10737
10738 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10739 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10740 (install-only, install-info, clean): Handle sub dir gnulib.
10741 (all-lib, am--refresh): New targets.
10742 (memmem.o): Remove target.
10743 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10744 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10745 (AC_REPLACE_FUNCS): Remove memmem.
10746 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10747 (AC_OUTPUT): Generate Makefile in gnulib/.
10748 * aclocal.m4, config.in, configure: Regenerated.
10749
367ba2c2
MR
107502012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10751
10752 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10753
9d236627
PA
107542012-04-05 Pedro Alves <palves@redhat.com>
10755
10756 -Werror=strict-aliasing
10757
10758 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10759 pointer.
10760
111217b3
PA
107612012-04-04 Pedro Alves <palves@redhat.com>
10762
10763 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10764 (sparc_store_gregset_from_stack, sparc_store_gregset)
10765 (sparc_breakpoint_at): Fix formatting.
10766
8365dcf5
TJB
107672012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10768
10769 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10770 are available.
10771 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10772 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10773 * config.in: Regenerate.
10774 * configure: Likewise.
10775
689cc2ae
PA
107762012-03-29 Pedro Alves <palves@redhat.com>
10777
10778 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10779 Correct ptrace arguments.
10780
c14dfd32
PA
107812012-03-28 Pedro Alves <palves@redhat.com>
10782
10783 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10784 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10785 (IA64_FR1_REGNUM): New defines.
10786 (ia64_fetch_register): New.
10787 (the_low_target): Install it.
10788 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10789 field.
10790 * linux-low.c (linux_fetch_registers): Try the
10791 the_low_target.fetch_register hook first.
10792
10793 * linux-arm-low.c (the_low_target): Adjust.
10794 * linux-bfin-low.c (the_low_target): Adjust.
10795 * linux-cris-low.c (the_low_target): Adjust.
10796 * linux-crisv32-low.c (the_low_target): Adjust.
10797 * linux-m32r-low.c (the_low_target): Adjust.
10798 * linux-m68k-low.c (the_low_target): Adjust.
10799 * linux-mips-low.c (the_low_target): Adjust.
10800 * linux-ppc-low.c (the_low_target): Adjust.
10801 * linux-s390-low.c (the_low_target): Adjust.
10802 * linux-sh-low.c (the_low_target): Adjust.
10803 * linux-sparc-low.c (the_low_target): Adjust.
10804 * linux-tic6x-low.c (the_low_target): Adjust.
10805 * linux-x86-low.c (the_low_target): Adjust.
10806 * linux-xtensa-low.c (the_low_target): Adjust.
10807
63c88e13
PA
108082012-03-26 Pedro Alves <palves@redhat.com>
10809
10810 * server.c (handle_qxfer_libraries): Don't bail early if
10811 the_target->qxfer_libraries_svr4 is not NULL.
10812
fb723180
PA
108132012-03-26 Pedro Alves <palves@redhat.com>
10814
10815 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10816
0afae3cf
PA
108172012-03-23 Pedro Alves <palves@redhat.com>
10818
10819 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10820 "library-list-svr4" element's start tag when the the DSO list is
10821 empty.
10822
485f1ee4
PA
108232012-03-23 Pedro Alves <palves@redhat.com>
10824
10825 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10826 a variable whose type size is the same as the inferior's pointer
10827 size.
10828
a5362b9a
TS
108292012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10830
10831 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10832 struct siginfo.
10833 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10834 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10835 * linux-low.h: Include <signal.h>.
10836 (struct siginfo): Remove forward declaration.
10837 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10838 struct siginfo.
10839
d226c142
MF
108402012-03-21 Mike Frysinger <vapier@gentoo.org>
10841
10842 * .gitignore: Ignore more files.
10843
122f36ef
PA
108442012-03-19 Pedro Alves <palves@redhat.com>
10845 Jan Kratochvil <jan.kratochvil@redhat.com>
10846
10847 * server.c (cont_thread, general_thread): Add describing comments.
10848 (start_inferior): Clear `cont_thread'.
10849 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10850 of a process.
10851
fc3e5175
YQ
108522012-03-15 Yao Qi <yao@codesourcery.com>
10853
10854 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10855 handling to ...
10856 (cmd_qtdp): ... here.
10857
8d0d92cd
YQ
108582012-03-15 Yao Qi <yao@codesourcery.com>
10859
10860 * tracepoint.c (struct tracepoint_action_ops): New.
10861 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10862 (m_tracepoint_action_download): New.
10863 (r_tracepoint_action_download): New.
10864 (x_tracepoint_action_download): New.
10865 (l_tracepoint_action_download): New.
10866 (add_tracepoint_action): Install `action->ops' according type.
10867 (download_tracepoint_1): Move code `download' function pointer
10868 of various tracepoint_action_ops.
10869
87b0bb13
JK
108702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10871
10872 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10873 linux_ptrace_attach_warnings.
10874
5f572dec
JK
108752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10876
10877 * Makefile.in (linux-ptrace.o): New.
10878 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10879 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10880 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10881 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10882 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10883 of these targets.
10884 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10885
f4647387
YQ
108862012-03-08 Yao Qi <yao@codesourcery.com>
10887 Pedro Alves <palves@redhat.com>
10888
10889 Fix PR server/13392.
10890 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10891 offset of JMP insn.
10892 * tracepoint.c (remove_tracepoint): New.
10893 (cmd_qtdp): Call remove_tracepoint when failed to install.
10894
9b224c5e
PA
108952012-03-07 Pedro Alves <palves@redhat.com>
10896
10897 * linux-low.c (get_detach_signal): New.
10898 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10899 Pass on pending signals to PTRACE_DETACH. Check the result of the
10900 ptrace call.
10901 * server.c (program_signals, program_signals_p): New.
10902 (handle_general_set): Handle QProgramSignals.
10903 * server.h (program_signals, program_signals_p): Declare.
10904
e237a7e2
JK
109052012-03-05 Pedro Alves <palves@redhat.com>
10906 Jan Kratochvil <jan.kratochvil@redhat.com>
10907
10908 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10909 New comment why.
10910
5808517f
YQ
109112012-03-03 Yao Qi <yao@codesourcery.com>
10912
10913 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10914 agent_look_up_symbols.
10915
58b4daa5
YQ
109162012-03-03 Yao Qi <yao@codesourcery.com>
10917
10918 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10919 (linux-x86-low.o): Likewise.
10920 * server.h: Remove in_process_agent_loaded.
10921 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10922 common/agent.c.
10923 Update callers.
10924
8ffcbaaf
YQ
109252012-03-03 Yao Qi <yao@codesourcery.com>
10926
10927 * tracepoint.c (gdb_agent_capability): New global.
10928 (in_process_agent_loaded_ust): Renamed to
10929 `in_process_agent_supports_ust'.
10930 Update callers.
10931 (in_process_agent_supports_ust): Call agent_capability_check.
10932 (clear_installed_tracepoints): Assert that agent supports
10933 agent.
10934
d1feda86
YQ
109352012-03-03 Yao Qi <yao@codesourcery.com>
10936
10937 * linux-low.c (linux_supports_agent): New.
10938 (linux_target_ops): Initialize field `supports_agent' with
10939 linux_supports_agent.
10940 * target.h (struct target_ops) <supports_agent>: New.
10941 (target_supports_agent): New macro.
10942 * server.c (handle_general_set): Handle packet 'QAgent'.
10943 (handle_query): Send `QAgent+'.
10944 * Makefile.in (server.o): Depends on agent.h.
10945
2fa291ac
YQ
109462012-03-03 Yao Qi <yao@codesourcery.com>
10947
10948 * Makefile.in (OBS): Add agent.o.
10949 Add new rule for agent.o.
10950 Track dependence of tracepoint.c on agent.h.
10951 * tracepoint.c (run_inferior_command_1):
10952 (run_inferior_command): Call agent_run_command.
10953 (gdb_ust_connect_sync_socket): Deleted. Move it to
10954 common/agent.c.
10955 (resume_thread, stop_thread): Likewise.
10956 (gdb_ust_socket_init): Renamed to ...
10957 (gdb_agent_socket_init): ... New.
10958 (gdb_ust_thread): Renamed to ...
10959 (gdb_agent_helper_thread): ... New.
10960 (gdb_ust_init): Move some code to ...
10961 (gdb_agent_init): ... here. New.
10962 [HAVE_UST]: Call gdb_ust_init.
10963 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10964 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10965 * config.in, configure: Regenerated.
10966
05044653
PA
109672012-03-02 Pedro Alves <palves@redhat.com>
10968
10969 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10970 * linux-low.c (struct simple_pid_list): New.
10971 (stopped_pids): New a struct simple_pid_list pointer.
10972 (add_to_pid_list, pull_pid_from_list): New.
10973 (handle_extended_wait): Don't assume the first signal new children
10974 report is SIGSTOP. Adjust call to pull_pid_from_list.
10975 (linux_wait_for_lwp): Adjust.
10976
8d00225b
YQ
109772012-03-02 Yao Qi <yao@codesourcery.com>
10978
10979 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10980 debug log.
10981
19560ba5
YQ
109822012-03-02 Yao Qi <yao@codesourcery.com>
10983
10984 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10985 `stop_pc' and `tpoint'. Update caller.
10986
1faeff08
MR
109872012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10988
10989 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10990 * linux-low.c (use_linux_regsets): New macro.
10991 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10992 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10993 (linux_register_in_regsets): New function.
10994 (usr_fetch_inferior_registers): Skip registers covered by
10995 regsets.
10996 (usr_store_inferior_registers): Likewise.
10997 (usr_fetch_inferior_registers): New macro.
10998 (usr_store_inferior_registers): Likewise.
10999 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11000 (linux_store_registers): Likewise.
11001 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11002 prototype.
11003 (init_registers_mips64_dsp_linux): Likewise.
11004 (init_registers_mips_linux): New macro.
11005 (init_registers_mips_dsp_linux): Likewise.
11006 (mips_dsp_num_regs): Likewise.
11007 (DSP_BASE, DSP_CONTROL): New fallback macros.
11008 (mips_base_regs): New macro.
11009 (mips_regmap): Use it. Fix the size.
11010 (mips_dsp_regmap): New variable.
11011 (mips_dsp_regset_bitmap): Likewise.
11012 (mips_arch_setup): New function.
11013 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11014 than mips_regmap.
11015 (mips_cannot_store_register): Likewise.
11016 (the_low_target): Update .arch_setup, .num_regs and .regmap
11017 initializers. Add .regset_bitmap initializer.
11018 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11019 initializer.
11020 * linux-bfin-low.c (the_low_target): Likewise.
11021 * linux-cris-low.c (the_low_target): Likewise.
11022 * linux-crisv32-low.c (the_low_target): Likewise.
11023 * linux-ia64-low.c (the_low_target): Likewise.
11024 * linux-m32r-low.c (the_low_target): Likewise.
11025 * linux-m68k-low.c (the_low_target): Likewise.
11026 * linux-ppc-low.c (the_low_target): Likewise.
11027 * linux-s390-low.c (the_low_target): Likewise.
11028 * linux-sh-low.c (the_low_target): Likewise.
11029 * linux-sparc-low.c (the_low_target): Likewise.
11030 * linux-tic6x-low.c (the_low_target): Likewise.
11031 * linux-x86-low.c (the_low_target): Likewise.
11032 * linux-xtensa-low.c (the_low_target): Likewise.
11033 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11034 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11035 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11036 srv_xmlfiles.
11037 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11038 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11039
c03e6ccc
YQ
110402012-02-29 Yao Qi <yao@codesourcery.com>
11041 Pedro Alves <palves@redhat.com>
11042
11043 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11044 `step_over_finished' is true.
11045
644cebc9
PA
110462012-02-27 Pedro Alves <palves@redhat.com>
11047
11048 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11049 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11050
c14d7ab2
PA
110512012-02-27 Pedro Alves <palves@redhat.com>
11052
11053 PR server/9684
11054 * linux-low.c (pid_is_stopped): New.
11055 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11056
412c89dd
LM
110572012-02-25 Luis Machado <lgustavo@codesourcery.com>
11058
11059 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11060 of conditions.
11061
b745defe
MR
110622012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11063
11064 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11065
9f3a5c85
LM
110662012-02-24 Luis Machado <lgustavo@codesourcery>
11067
11068 * server.c (handle_query): Advertise support for target-side
11069 breakpoint condition evaluation.
11070 (process_point_options): New function.
11071 (process_serial_event): When inserting a breakpoint, check for
11072 a target-side condition that should be evaluated.
11073
11074 * mem-break.c: Include regcache.h and ax.h.
11075 (point_cond_list_t): New data structure.
11076 (breakpoint) <cond_list>: New field.
11077 (find_gdb_breakpoint_at): Make non-static.
11078 (delete_gdb_breakpoint_at): Clear any target-side
11079 conditions.
11080 (clear_gdb_breakpoint_conditions): New function.
11081 (add_condition_to_breakpoint): Likewise.
11082 (add_breakpoint_condition): Likewise.
11083 (gdb_condition_true_at_breakpoint): Likewise.
11084 (gdb_breakpoint_here): Return result directly instead
11085 of going through a local variable.
11086
11087 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11088 (clear_gdb_breakpoint_conditions): Likewise.
11089 (add_breakpoint_condition): Likewise.
11090 (gdb_condition_true_at_breakpoint): Likewise.
11091
11092 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11093 (need_step_over_p): Take target-side breakpoint condition into
11094 consideration.
11095
5e1dc496
LM
110962012-02-24 Luis Machado <lgustavo@codesourcery>
11097
11098 * server.h: Include tracepoint.h.
11099 (agent_mem_read, agent_get_trace_state_variable_value,
11100 agent_set_trace_state_variable_value,
11101 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11102 get_set_tsv_func_addr): New prototypes.
11103
11104 * ax.h: New include file.
11105 * ax.c: New source file.
11106
11107 * tracepoint.c: Include ax.h.
11108 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11109 agent_expr, eval_result_type): Move to ax.h.
11110 (parse_agent_expr): Rename to ...
11111 (gdb_parse_agent_expr): ... this, make it non-static and move
11112 to ax.h.
11113 (unparse_agent_expr) Rename to ...
11114 (gdb_unparse_agent_expr): ... this, make it non-static and move
11115 to ax.h.
11116 (eval_agent_expr): Rename to ...
11117 (eval_tracepoint_agent_expr): ... this.
11118 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11119 forward declarations.
11120 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11121 (agent_get_trace_state_variable_value): New function.
11122 (agent_set_trace_state_variable_value): New function.
11123 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11124 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11125 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11126 (condition_true_at_tracepoint): Likewise.
11127 (parse_agent_expr): Rename to ...
11128 (gdb_parse_agent_expr): ... this and move to ax.c.
11129 (unparse_agent_expr): Rename to ...
11130 (gdb_unparse_agent_expr): ... this and move to ax.c.
11131 (gdb_agent_op_name): Move to ax.c.
11132 (eval_agent_expr): Rename to ...
11133 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11134 and move to ax.c.
11135 (eval_tracepoint_agent_expr): New function.
11136 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11137 non-static.
5e1dc496
LM
11138 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11139 ax.c.
11140 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11141 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11142 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11143 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11144 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11145 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11146 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11147 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11148 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11149 (compile_bytecodes): Remove forward declaration.
11150 (is_goto_target): Move to ax.c.
11151 (compile_bytecodes): Move to ax.c and call
11152 agent_get_trace_state_variable_value (...) and
11153 agent_set_trace_state_variable_value (...).
11154
11155 * Makefile.in: Update ax.c and IPA dependencies.
11156
277e4e52
PA
111572012-02-24 Pedro Alves <palves@redhat.com>
11158
11159 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11160 (cmd_bigqtbuffer_circular): ... this. Only handle
11161 'QTBuffer:circular:'.
11162 (handle_tracepoint_general_set): Adjust.
11163
bf4c19f7
YQ
111642012-02-16 Yao Qi <yao@codesourcery.com>
11165
11166 * inferiors.c: Move code to ...
11167 * dll.c: .... here. New.
11168 * server.h: Declare clear_dlls.
11169 * Makefile.in (SFILES): Add dll.c.
11170 (OBS): Add dll.o
11171 (dll.o): New rule.
11172
d73f2619
YQ
111732012-02-11 Yao Qi <yao@codesourcery.com>
11174
11175 * server.c: (handle_monitor_command): Add a new parameter
11176 `own_buf'.
11177 (handle_query): Update caller.
11178
f8255c2a
JB
111792012-02-09 Joel Brobecker <brobecker@adacore.com>
11180
11181 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11182 * configure, config.in: Regenerate.
11183 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11184 is not defined.
11185
da84f473
PA
111862012-02-02 Pedro Alves <palves@redhat.com>
11187
11188 Try SIGKILL first, then PTRACE_KILL.
11189 * linux-low.c (linux_kill_one_lwp): New.
11190 (linux_kill_one_lwp): Rename to ...
11191 (kill_one_lwp_callback): ... this. Use the new
11192 linux_kill_one_lwp.
11193
e886a173
PA
111942012-02-02 Pedro Alves <palves@redhat.com>
11195
11196 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11197 inferior.
11198
be07f1a2
PA
111992012-01-27 Pedro Alves <palves@redhat.com>
11200
11201 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11202 (elf_64_file_p): Make static.
11203 (linux_pid_exe_is_elf_64_file): New.
11204 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11205 Delete declarations.
11206 (linux_pid_exe_is_elf_64_file): Declare.
11207 * linux-x86-low.c (x86_arch_setup): Use
11208 linux_pid_exe_is_elf_64_file.
11209
d8301ad1
JK
112102012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11211
11212 * linux-low.c (linux_wait_for_event_1): Rename to ...
11213 (linux_wait_for_event): ... here and merge it with former
11214 linux_wait_for_event - new variable wait_ptid, use it.
11215 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11216
01b17894
PA
112172012-01-23 Pedro Alves <palves@redhat.com>
11218
11219 * server.c (main): Avoid yet another case of infinite loop while
11220 detaching/killing after a longjmp.
11221
e825046f
JK
112222012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11223
11224 Code cleanup.
11225 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11226
b9e7b9c3
UW
112272012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11228
11229 * hostio.c (handle_readlink): New function.
11230 (handle_vFile): Call it to handle "vFile:readlink" packets.
11231
901f9912
UW
112322012-01-20 Pedro Alves <palves@redhat.com>
11233 Ulrich Weigand <ulrich.weigand@linaro.org>
11234
11235 * server.c (handle_v_requests): Only support vAttach and vRun to
11236 start multiple processes when in extended protocol mode.
11237
fc1ab1a0
PA
112382012-01-17 Pedro Alves <palves@redhat.com>
11239
11240 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11241 memalign plus mprotect to allocate the scratch buffer.
11242
7d5d4e98
PA
112432012-01-13 Pedro Alves <palves@redhat.com>
11244
11245 * server.c (attach_inferior): Clear `cont_thread'.
11246
f128d5e9
PA
112472012-01-13 Pedro Alves <palves@redhat.com>
11248
11249 * server.c (main): Avoid infinite loop while detaching/killing
11250 after a longjmp.
11251
06db92f0
DE
112522012-01-09 Doug Evans <dje@google.com>
11253
11254 * server.c (start_inferior): Set last_ptid in --wrapper case.
11255
32d92999
YQ
112562012-01-06 Yao Qi <yao@codesourcery.com>
11257
11258 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11259 defined.
11260 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11261
5e0a92a9
YQ
112622012-01-04 Yao Qi <yao@codesourcery.com>
11263
11264 * tracepoint.c (cmd_qtdp): Print debug message
11265 for static tracepoint.
11266
ae639e8c
YQ
112672012-01-04 Yao Qi <yao@codesourcery.com>
11268
11269 * tracepoint.c (trace_vdebug): Differentiate debug message
11270 between gdbserver and IPA.
11271
f72429c5
YQ
112722012-01-03 Yao Qi <yao@codesourcery.com>
11273
11274 * tracepoint.c (tracepoint_was_hit): Don't collect for
11275 static tracepoint.
11276
12c3e59c
JB
112772012-01-02 Joel Brobecker <brobecker@adacore.com>
11278
11279 * terminal.h: Reformat copyright header.
11280
67827812
JB
112812012-01-02 Joel Brobecker <brobecker@adacore.com>
11282
11283 * server.c (gdbserver_version): Update copyright year.
11284 * gdbreplay.c (gdbreplay_version): Likewise.
11285
3e52c33d
JK
112862011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11287
11288 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11289
11290 Revert:
11291 2011-12-18 Hui Zhu <teawater@gmail.com>
11292 * linux-low.c (linux_create_inferior): Save return value to ret.
11293
66f1260e
HZ
112942011-12-18 Hui Zhu <teawater@gmail.com>
11295
11296 * linux-low.c (linux_create_inferior): Save return value to ret.
11297
e77616d7
DE
112982011-12-16 Doug Evans <dje@google.com>
11299
e7b06c57
DE
11300 * linux-low.c (linux_create_inferior): If stdio connection,
11301 redirect stdin from /dev/null, stdout to stderr.
11302 * remote-utils.c (remote_is_stdio): New static global.
11303 (remote_connection_is_stdio): New function.
11304 (remote_prepare): Handle stdio connection.
11305 (remote_open): Ditto.
11306 (remote_close): Don't close stdin for stdio connections.
11307 (read_prim,write_prim): New functions. Replace all calls to
11308 read/write to these.
11309 * server.c (main): Watch for "-" argument. Move call to
11310 remote_prepare before start_inferior.
11311 * server.h (STDIO_CONNECTION_NAME): New macro.
11312 (remote_connection_is_stdio): Declare.
11313
e77616d7
DE
11314 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11315 in debugging output.
11316
82067193
YQ
113172011-12-15 Yao Qi <yao@codesourcery.com>
11318
11319 * tracepoint.c: Include sys/syscall.h.
11320 (gdb_ust_thread): Remove preprocessor conditional.
11321
82bfbe7e
PA
113222011-12-14 Pedro Alves <pedro@codesourcery.com>
11323
11324 * linux-low.c (linux_detach_one_lwp): Call
11325 the_low_target.prepare_to_resume before detaching.
11326
712c6575
YQ
113272011-12-14 Yao Qi <yao@codesourcery.com>
11328
11329 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11330 of write.
11331
d54d1edf
YQ
113322011-12-14 Yao Qi <yao@codesourcery.com>
11333
11334 * i386-low.c (i386_low_stopped_data_address): Initialize local
11335 variable `control'.
11336
6210a125
PA
113372011-12-13 Pedro Alves <pedro@codesourcery.com>
11338
11339 PR remote/13492
11340
11341 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11342 DR_CONTROL unless necessary. Extend comments.
11343 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11344 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11345
2ece8244
YQ
113462011-12-13 Yao Qi <yao@codesourcery.com>
11347
11348 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11349 macros.
11350 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11351
784867a5
JK
113522011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11353
11354 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11355 Print new debug message for such case.
11356
6bf36717
JK
113572011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11358
11359 Fix overlapping memcpy.
11360 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11361 the read_inferior_memory transfer.
11362 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11363 write_inferior_memory transfer.
11364 (set_fast_tracepoint_jump): New variable buf. Use it for the
11365 read_inferior_memory and write_inferior_memory transfers.
11366 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11367 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11368 Use it for the write_inferior_memory transfer.
11369 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11370 buffers.
11371
50275556
MR
113722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11373
11374 * linux-low.c (fetch_register, store_register): Make code
11375 consistent, fix formatting.
11376
7325beb4
MR
113772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11378
11379 * linux-low.c (usr_store_inferior_registers): Factor out code
11380 to handle individual registers into...
11381 (store_register): ... this new function.
11382
c642a434
UW
113832011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11384
11385 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11386 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11387 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11388 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11389 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11390 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11391 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11392 (srv_xmlfiles): Add new XML files.
11393
11394 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11395 and <sys/uio.h>.
11396 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11397 (init_registers_s390_linux32v1): Add prototype.
11398 (init_registers_s390_linux32v2): Likewise.
11399 (init_registers_s390_linux64v1): Likewise.
11400 (init_registers_s390_linux64v2): Likewise.
11401 (init_registers_s390x_linux64v1): Likewise.
11402 (init_registers_s390x_linux64v2): Likewise.
11403 (s390_num_regs): Increment to 52.
11404 (s390_regmap): Add orig_r2 register.
11405 (s390_num_regs_3264): Increment to 68.
11406 (s390_regmap_3264): Add orig_r2 register.
11407 (s390_collect_ptrace_register): Handle orig_r2 register.
11408 (s390_supply_ptrace_register): Likewise.
11409 (s390_fill_last_break): New function.
11410 (s390_store_last_break): Likewise.
11411 (s390_fill_system_call): New function.
11412 (s390_store_system_call): Likewise.
11413 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11414 register sets.
11415 (s390_check_regset): New function.
11416 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11417 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11418 Update target_regsets for available register sets.
11419
2268b414
JK
114202011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11421 Jan Kratochvil <jan.kratochvil@redhat.com>
11422
11423 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11424 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11425 New.
11426 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11427 * linux-low.h (struct process_info_private): New member r_debug.
11428 * server.c (handle_qxfer_libraries): Call
11429 the_target->qxfer_libraries_svr4.
11430 (handle_qxfer_libraries_svr4): New function.
11431 (qxfer_packets): New entry "libraries-svr4".
11432 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11433 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11434 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11435 PACKET_qXfer_libraries_svr4.
11436
d6db1fab
UW
114372011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11438
11439 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11440 PSW address/mask between 8-byte and 16-byte formats.
11441 (s390_supply_ptrace_register): Likewise.
11442 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11443 basic addressing mode bit.
11444
242f5f1c
SS
114452011-11-24 Stan Shebs <stan@codesourcery.com>
11446
11447 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11448
f196051f
SS
114492011-11-17 Stan Shebs <stan@codesourcery.com>
11450
11451 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11452 (tracing_start_time): New global.
11453 (tracing_stop_time): New global.
11454 (tracing_user_name): New global.
11455 (tracing_notes): New global.
11456 (tracing_stop_note): New global.
11457 (cmd_qtstart): Set traceframe_usage, start_time.
11458 (stop_tracing): Set stop_time.
11459 (cmd_qtstatus): Report additional status.
11460 (cmd_qtp): New function.
11461 (handle_tracepoint_query): Call it.
11462 (cmd_qtnotes): New function.
11463 (handle_tracepoint_general_set): Call it.
11464 (get_timestamp): Rename from tsv_get_timestamp.
11465
405f8e94
SS
114662011-11-14 Stan Shebs <stan@codesourcery.com>
11467 Kwok Cheung Yeung <kcy@codesourcery.com>
11468
11469 * linux-x86-low.c (small_jump_insn): New.
11470 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11471 trampoline and error message, build a trampoline and issue a small
11472 jump instruction to it.
11473 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11474 trampoline and error message.
11475 (x86_get_min_fast_tracepoint_insn_len): New.
11476 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11477 * linux-low.h (struct linux_target_ops): Add arguments to
11478 install_fast_tracepoint_jump_pad operation, add new operation.
11479 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11480 arguments.
11481 (linux_get_min_fast_tracepoint_insn_len): New function.
11482 (linux_target_op): Add new operation.
11483 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11484 (gdb_trampoline_buffer_end): Ditto.
11485 (gdb_trampoline_buffer_error): Ditto.
11486 (struct ipa_sym_addresses): Add fields for new IPA variables.
11487 (symbol_list): Add entries for new IPA variables.
11488 (struct tracepoint): Add fields to hold the address range of the
11489 trampoline used by the tracepoint.
11490 (trampoline_buffer_head): New static variable.
11491 (trampoline_buffer_tail): Ditto.
11492 (claim_trampoline_space): New function.
11493 (have_fast_tracepoint_trampoline_buffer): New function.
11494 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11495 structure.
11496 (install_fast_tracepoint): Ditto, also add error buffer argument.
11497 (cmd_qtminftpilen): New function.
11498 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11499 (fast_tracepoint_from_trampoline_address): New function.
11500 (fast_tracepoint_collecting): Handle trampoline as part of jump
11501 pad space.
11502 (set_trampoline_buffer_space): New function.
11503 (initialize_tracepoint): Initialize new IPA variables.
11504 * target.h (struct target_ops): Add arguments to
11505 install_fast_tracepoint_jump_pad operation, add new
11506 get_min_fast_tracepoint_insn_len operation.
11507 (target_get_min_fast_tracepoint_insn_len): New.
11508 (install_fast_tracepoint_jump_pad): Add arguments.
11509 * server.h (IPA_BUFSIZ): Define.
11510 * linux-i386-ipa.c: Include extra header files.
11511 (initialize_fast_tracepoint_trampoline_buffer): New function.
11512 (initialize_low_tracepoint): Call it.
11513 * server.h (set_trampoline_buffer_space): Declare.
11514 (claim_trampoline_space): Ditto.
11515 (have_fast_tracepoint_trampoline_buffer): Ditto.
11516
1e4d1764
YQ
115172011-11-14 Yao Qi <yao@codesourcery.com>
11518
11519 * server.c (handle_query): Handle InstallInTrace for qSupported.
11520 * tracepoint.c (add_tracepoint): Sort list.
11521 (install_tracepoint, download_tracepoint): New.
11522 (cmd_qtdp): Call them to install and download tracepoints.
11523 (sort_tracepoints): Removed.
11524 (cmd_qtstart): Update.
11525
5c73ff4e
YQ
115262011-11-14 Yao Qi <yao@codesourcery.com>
11527
11528 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11529 * mem-break.h: Declare.
11530 * tracepoint.c (cmd_qtstart): Move some code to ...
11531 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11532 New.
11533 (download_tracepoints): Move some code to ...
11534 (download_tracepoint_1): ... here. New.
11535
86a30030
YQ
115362011-11-08 Yao Qi <yao@codesourcery.com>
11537
11538 * remote-utils.c (relocate_instruction): A comment fix.
11539
8d26e50c
JB
115402011-11-07 Joel Brobecker <brobecker@adacore.com>
11541
11542 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11543 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11544 dr_status_mirror and dr_control_mirror from debug_reg_state.
11545 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11546 (i386_initial_stuff): Remove use of deleted globals.
11547 (i386_get_thread_context, i386_set_thread_context,
11548 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11549 from debug_reg_state.
11550
a59306a3
YQ
115512011-11-05 Yao Qi <yao@codesourcery.com>
11552
11553 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11554 address as TPOINT's.
11555
3065dfb6
SS
115562011-11-02 Stan Shebs <stan@codesourcery.com>
11557
11558 * tracepoint.c (agent_mem_read_string): New function.
11559 (eval_agent_expr): Call it for tracenz.
11560 * server.c (handle_query): Report support for tracenz.
11561
fd0d8c7c
YQ
115622011-11-02 Yao Qi <yao@codesourcery.com>
11563
11564 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11565
609086b1
YQ
115662011-11-02 Yao Qi <yao@codesourcery.com>
11567
11568 * target.h: Fix a typo in comment.
11569
b9fd1791
PA
115702011-10-31 Pedro Alves <pedro@codesourcery.com>
11571
11572 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11573 clobber the breakpoints' shadows with fast tracepoint jumps.
11574 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11575 * target.c (write_inferior_memory): Also pass MYADDR down to
11576 check_mem_write.
11577
03583c20
UW
115782011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11579
11580 * configure.ac: Check support for personality routine.
11581 * configure: Regenerate.
11582 * config.in: Likewise.
11583 * linux-low.c: Include <sys/personality.h>.
11584 Define ADDR_NO_RANDOMIZE if necessary.
11585 (linux_create_inferior): Disable address space randomization when
11586 forking inferior, if requested.
11587 (linux_supports_disable_randomization): New function.
11588 (linux_target_ops): Install it.
11589 * server.h (disable_randomization): Declare.
11590 * server.c (disable_randomization): New global variable.
11591 (handle_general_set): Handle QDisableRandomization.
11592 (handle_query): Likewise for qSupported.
11593 (main): Support --disable-randomization and --no-disable-randomization
11594 command line arguments.
11595 * target.h (struct target_ops): Add supports_disable_randomization.
11596 (target_supports_disable_randomization): New macro.
11597
723b724b
MF
115982011-09-29 Mike Frysinger <vapier@gentoo.org>
11599
11600 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11601 ifdef check.
11602 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11603 [!PT_GETDSBT] (target_loadmap): New definition.
11604 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11605 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11606 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11607 and PT_GETDSBT to LINUX_LOADMAP.
11608 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11609 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11610
55329a5c 116112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11612
11613 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11614 (arm_linux_hwbp_cap): New static variable.
11615 (arm_linux_get_hwbp_cap): Replace by ...
11616 (arm_linux_init_hwbp_cap): ... this new function.
11617 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11618 (arm_linux_get_hw_watchpoint_count): Likewise.
11619 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11620 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11621 (arm_prepare_to_resume): Use perror_with_name instead of error.
11622
55329a5c 116232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11624
11625 * linux-arm-low.c: Include <signal.h>.
11626 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11627 (struct arm_linux_hwbp_cap): New data type.
11628 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11629 (struct arm_linux_hw_breakpoint): New data type.
11630 (MAX_BPTS, MAX_WPTS): Define.
11631 (struct arch_process_info, struct arch_lwp_info): New data types.
11632 (arm_linux_get_hwbp_cap): New function.
11633 (arm_linux_get_hw_breakpoint_count): Likewise.
11634 (arm_linux_get_hw_watchpoint_count): Likewise.
11635 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11636 (arm_hwbp_control_initialize): Likewise.
11637 (arm_hwbp_control_is_enabled): Likewise.
11638 (arm_hwbp_control_is_initialized): Likewise.
11639 (arm_hwbp_control_disable): Likewise.
11640 (arm_linux_hw_breakpoint_equal): Likewise.
11641 (arm_linux_hw_point_initialize): Likewise.
11642 (struct update_registers_data): New data structure.
11643 (update_registers_callback: New function.
11644 (arm_insert_point): Likewise.
11645 (arm_remove_point): Likewise.
11646 (arm_stopped_by_watchpoint): Likewise.
11647 (arm_stopped_data_address): Likewise.
11648 (arm_new_process): Likewise.
11649 (arm_new_thread): Likewise.
11650 (arm_prepare_to_resume): Likewise.
11651 (the_low_target): Register arm_insert_point, arm_remove_point,
11652 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11653 arm_new_thread, and arm_prepare_to_resume.
11654
6b9801d4
SS
116552011-09-15 Stan Shebs <stan@codesourcery.com>
11656
11657 * server.h (struct emit_ops): Add compare-goto fields.
11658 * tracepoint.c (gdb_agent_op_sizes): New table.
11659 (emit_eq_goto): New function.
11660 (emit_ne_goto): New function.
11661 (emit_lt_goto): New function.
11662 (emit_le_goto): New function.
11663 (emit_gt_goto): New function.
11664 (emit_ge_goto): New function.
11665 (is_goto_target): New function.
11666 (compile_bytecodes): Recognize special cases of compare-goto
11667 combinations and call specialized emitters for them.
11668 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11669 (amd64_emit_ne_goto): New function.
11670 (amd64_emit_lt_goto): New function.
11671 (amd64_emit_le_goto): New function.
11672 (amd64_emit_gt_goto): New function.
11673 (amd64_emit_ge_goto): New function.
11674 (amd64_emit_ops): Add the new functions.
11675 (i386_emit_eq_goto): New function.
11676 (i386_emit_ne_goto): New function.
11677 (i386_emit_lt_goto): New function.
11678 (i386_emit_le_goto): New function.
11679 (i386_emit_gt_goto): New function.
11680 (i386_emit_ge_goto): New function.
11681 (i386_emit_ops): Add the new functions.
11682
bf15cbda
SS
116832011-09-08 Stan Shebs <stan@codesourcery.com>
11684
11685 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11686 (i386_emit_epilogue): Restore %ebx.
11687
943ca1dd
JZ
116882011-08-31 Jie Zhang <jzhang918@gmail.com>
11689
11690 * server.c (step_thread): Remove definition.
11691 (process_serial_event): Don't handle Hs.
11692 * server.h (step_thread): Remove declaration.
11693 * target.c (set_desired_inferior): Remove use of step_thread.
11694
e3deef73
LM
116952011-08-24 Luis Machado <lgustavo@codesourcery.com>
11696
11697 * linux-low.c: Include linux-procfs.h.
11698 (linux_attach_lwp_1): Update comments.
11699 (linux_attach): Scan for existing threads when attaching to a
11700 process that is the tgid.
11701 * Makefile.in: Update dependencies.
11702
13da1c97
LM
117032011-08-24 Luis Machado <lgustavo@codesourcery.com>
11704
11705 * configure.srv: Add linux-procfs.o dependencies.
11706
881127c9
YQ
117072011-08-14 Yao Qi <yao@codesourcery.com>
11708
11709 * target.h (struct target_ops): Fix indent.
11710 * win32-low.c (win32_target_ops): Fix comment.
11711
58dbd541
YQ
117122011-08-14 Andrew Jenner <andrew@codesourcery.com>
11713 Yao Qi <yao@codesourcery.com>
11714
11715 * Makefile.in (clean): Remove tic6x-*.c files.
11716 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11717 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11718 (tic6x-c64xp-linux.c): Likewise.
11719 * configure.srv: Add support for tic6x-*-uclinux.
11720 * linux-tic6x-low.c: New.
11721 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11722
78d85199
YQ
117232011-08-14 Andrew Stubbs <ams@codesourcery.com>
11724 Yao Qi <yao@codesourcery.com>
11725
11726 * target.h (struct target_ops): Add read_loadmap.
11727 * linux-low.c (struct target_loadseg): New type.
11728 (struct target_loadmap): New type.
11729 (linux_read_loadmap): New function.
11730 (linux_target_ops): Add linux_read_loadmap.
11731 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11732 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11733 to NULL.
78d85199 11734
a959a88d
EZ
117352011-08-05 Eli Zaretskii <eliz@gnu.org>
11736
11737 * win32-low.c: Include <stdint.h>.
11738
1ced966e
PA
117392011-07-22 Pedro Alves <pedro@codesourcery.com>
11740
11741 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11742 to the inferior here.
11743 (i386_remove_aligned_watchpoint): Ditto.
11744 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11745 fit part of the watchpoint in the debug registers.
11746 (i386_update_inferior_debug_regs): New.
11747 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11748 registers, and only update the inferior on success.
11749 (i386_low_remove_watchpoint): Ditto.
11750
d26e3629
KY
117512011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11752
11753 * linux-low.c (compare_ints, unique, list_threads, show_process,
11754 linux_core_of_thread): Delete.
11755 (linux_target_ops): Change linux_core_of_thread to
11756 linux_common_core_of_thread.
11757 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11758 * utils.c (malloc_failure): Change type of argument.
11759 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11760 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11761 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11762 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11763 (IPA_OBJS): Add common-utils-ipa.o.
11764 (ptid_h, linux_osdata_h): New macros.
11765 (server_h): Add common/common-utils.h, common/xml-utils.h,
11766 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11767 common/ptid.h.
11768 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11769 ptid.o, buffer.o): New rules.
11770 (linux-low.o): Add common/linux-osdata.h as a dependency.
11771 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11772 * configure.ac: Add AC_HEADER_DIRENT check.
11773 * config.in: Regenerate.
11774 * configure: Regenerate.
11775 * remote-utils.c (xml_escape_text): Delete.
11776 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11777 buffer_xml_printf): Move to common/buffer.c.
11778 * server.c (main): Remove call to initialize_inferiors.
11779 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11780 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11781 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11782 internal_error, gdb_assert, gdb_assert_fail): Delete.
11783 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11784 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11785 common/buffer.h.
11786 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11787 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11788 initialize_inferiors): Delete.
11789
2275a1a7
PA
117902011-07-20 Pedro Alves <pedro@codesourcery.com>
11791
11792 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11793 symbol error.
11794
0a5b1e09
PA
117952011-05-31 Pedro Alves <pedro@codesourcery.com>
11796
11797 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11798 assertion.
11799 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11800
6938fd34
YQ
118012011-05-26 Yao Qi <yao@codesourcery.com>
11802
11803 * Makefile.in (thread-db.o): Track dependence to
11804 common/gdb_thread_db.h.
11805 * thread-db.c: include gdb_thread_db.h from right place.
11806
b481f9e0
TT
118072011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11808
11809 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11810 __FILE__ and __LINE__ to internal_error.
11811
98a5dd13
DE
118122011-05-13 Doug Evans <dje@google.com>
11813
11814 * thread-db.c (try_thread_db_load_from_sdir): New function.
11815 (try_thread_db_load_from_dir): New function.
11816 (thread_db_load_search): Handle $sdir, ignore $pdir.
11817 Remove trying of system directories if search of
11818 libthread-db-search-path fails, that is now done via $sdir.
11819
d248b706
KY
118202011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11821
11822 * server.c (handle_query): Add EnableDisableTracepoints to the list
11823 of supported features.
43aaf8b6 11824 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11825 tracepoints.
43aaf8b6
PA
11826 (cmd_qtenable_disable): New.
11827 (cmd_qtstart): Install tracepoints even if disabled.
11828 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11829 receiving a QTEnable or QTDisable packet.
11830 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11831 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11832 tracepoints.
11833 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11834
84e578fb
DE
118352011-05-10 Doug Evans <dje@google.com>
11836
11837 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11838
71f55dd8
DE
118392011-05-04 Doug Evans <dje@google.com>
11840
11841 * linux-low.c (linux_join): Skip process lookup.
11842 * spu-low.c (spu_join): Ditto.
11843 * server.c (join_inferiors_callback): Delete.
11844 (process_serial_event): For 'D' packet (detach) call join_inferior
11845 directly.
11846
4d393d60
JM
118472011-05-04 Joseph Myers <joseph@codesourcery.com>
11848
11849 * README: Don't mention xscale*-*-linux*.
11850 * configure.srv (xscale*-*-linux*): Don't handle target.
11851
b00ad6ff
NF
118522011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11853
11854 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11855 casting pointers.
11856 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11857 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11858 (i386_emit_void_call_2): Likewise.
11859
af96c192
YQ
118602011-04-26 Yao Qi <yao@codesourcery.com>
11861
43aaf8b6
PA
11862 * linux-low.c: Move common macros to linux-ptrace.h.
11863 Include linux-ptrace.h.
af96c192
YQ
11864 * Makefile.in (linux_ptrace_h): New.
11865 (linux-low.o): Depends on linux-ptrace.h.
11866
03f2bd59
JK
118672011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11868
11869 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11870 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11871 (remote_prepare): New function with most of the TCP code from ...
11872 (remote_open): ... here. Detect PORT here unconditionally. Move also
11873 setting transport_is_reliable.
11874 * server.c (run_once): New variable.
11875 (gdbserver_usage): Document it.
11876 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11877 the first run if RUN_ONCE.
11878 * server.h (run_once, remote_prepare): New declarations.
11879
7a9dd1b2
TT
118802011-04-19 Tom Tromey <tromey@redhat.com>
11881
11882 * win32-low.c (handle_load_dll): Remove duplicate "the".
11883
81239425
PM
118842011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11885
11886 Remove support for old Cygwin 1.5 versions.
11887 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11888 function to avoid warning.
11889 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11890 warning.
11891
9e0627f1
PM
118922011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11893
11894 * gdbserver/server.h (Macro _): Define it if not available.
11895
588eebee
MS
118962011-03-14 Michael Snyder <msnyder@vmware.com>
11897
348af9f7 11898 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11899
43f70d4c
JB
119002011-03-10 Joel Brobecker <brobecker@adacore.com>
11901
11902 * Makefile.in (maintainer-clean realclean distclean): Remove
11903 "make ... subdir_do" command.
11904
348af9f7
MS
119052011-03-10 Michael Snyder <msnyder@vmware.com>
11906
11907 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11908
11909 * server.c (handle_v_run): Free alloced buffer on early return.
11910
e637a4f5
YQ
119112011-03-09 Yao Qi <yao@codesourcery.com>
11912
11913 Revert:
11914 2011-03-04 Yao Qi <yao@codesourcery.com>
11915
11916 * Makefile.in: Remove GNU make feature --directory.
11917
11918 2011-03-05 Yao Qi <yao@codesourcery.com>
11919
11920 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11921 (subdir_do): New make target. Copied from gdb/Makefile.
11922 (maintainer-clean, realclean, distclean, clean): Call corresponding
11923 make targets in common/Makefile.
11924
11925 2011-02-11 Yao Qi <yao@codesourcery.com>
11926
11927 * configure.ac: Call AC_PROG_RANLIB.
11928 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11929 * configure: Regenerate.
11930
e6edda56
JK
119312011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11932
11933 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11934
e5141119
JB
119352011-03-06 Yao Qi <yao@codesourcery.com>
11936
11937 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11938
64794aa4
JB
119392011-03-05 Yao Qi <yao@codesourcery.com>
11940
11941 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11942 (subdir_do): New make target. Copied from gdb/Makefile.
11943 (maintainer-clean, realclean, distclean, clean): Call corresponding
11944 make targets in common/Makefile.
11945
7a762829
YQ
119462011-03-04 Yao Qi <yao@codesourcery.com>
11947
11948 * Makefile.in: Remove GNU make feature --directory.
11949
348af9f7
MS
119502011-03-04 Michael Snyder <msnyder@vmware.com>
11951
11952 * server.c (queue_stop_reply): Call xmalloc not malloc.
11953
119542011-03-02 Michael Snyder <msnyder@vmware.com>
11955
11956 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11957
9f72fee2
MS
119582011-02-28 Michael Snyder <msnyder@vmware.com>
11959
588eebee
MS
11960 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11961 (cmd_qtframe): Ditto.
11962 (cmd_qtbuffer): Ditto.
11963 (cmd_bigqtbuffer): Ditto.
11964
9f72fee2
MS
11965 * utils.c (decimal2str): Initialize 'width' to nine, then
11966 don't mess with it.
11967
8040bd49
UW
119682011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11969
11970 * hostio.c (require_data): Free *data, not data.
11971
7e52cbd0
JK
119722011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11973
11974 * hostio.c (require_data): Use free, not xfree.
11975
9130f83e
MS
119762011-02-27 Michael Snyder <msnyder@vmware.com>
11977
4b812f4e
MS
11978 * server.c (handle_query): Discard unused value.
11979
9130f83e
MS
11980 * hostio.c (require_data): Free malloc memory before returning
11981 error.
11982
69d37113
MS
119832011-02-26 Michael Snyder <msnyder@vmware.com>
11984
11985 * linux-low.c (list_threads): Call closedir for dirent.
11986
35f5825a
MS
119872011-02-27 Michael Snyder <msnyder@vmware.com>
11988
2a589cef
MS
11989 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11990 a case statement falls through.
11991
0adea5f7
MS
11992 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11993
35f5825a
MS
11994 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11995 in comparison.
11996
238f1c74
MS
119972011-02-26 Michael Snyder <msnyder@vmware.com>
11998
11999 * utils.c (decimal2str): Eliminate dead code and dead param.
12000 (pulongest): Drop dead param from call to decimal2str.
12001 (plongest): Ditto.
12002
633ff500
JB
120032011-02-24 Joel Brobecker <brobecker@adacore.com>
12004
12005 Revert the following patch (not approved yet):
12006 2011-02-21 Hui Zhu <teawater@gmail.com>
12007 * tracepoint.c (tp_printf): New function.
12008 (eval_agent_expr): Handle gdb_agent_op_printf.
12009
f9c6ff72
HZ
120102011-02-21 Hui Zhu <teawater@gmail.com>
12011
12012 * tracepoint.c (tp_printf): New function.
12013 (eval_agent_expr): Handle gdb_agent_op_printf.
12014
94d5e490
TT
120152011-02-18 Tom Tromey <tromey@redhat.com>
12016
12017 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12018 (tracepoint.o): Likewise.
12019 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12020 (gdb_agent_op_names): Likewise.
12021
c7f96d2b
TT
120222011-02-18 Tom Tromey <tromey@redhat.com>
12023
12024 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12025 gdb_agent_op_rot>: New constants.
12026 (gdb_agent_op_names): Add pick and roll.
12027 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12028 cases.
12029
0feedb2c
JK
120302011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12031
12032 * aclocal.m4: Regenerated with aclocal-1.11.1.
12033
b3b9301e
PA
120342011-02-14 Pedro Alves <pedro@codesourcery.com>
12035
12036 * server.c (handle_qxfer_traceframe_info): New.
12037 (qxfer_packets): Register "traceframe-info".
12038 (handle_query): Report support for qXfer:traceframe-info:read+.
12039 * tracepoint.c (match_blocktype): New.
12040 (traceframe_find_block_type): Rename to ...
12041 (traceframe_walk_blocks): ... this. Add callback filter argument,
12042 and use it.
12043 (traceframe_find_block_type): New, reimplemented on top of
12044 traceframe_walk_blocks.
12045 (build_traceframe_info_xml): New.
12046 (traceframe_read_info): New.
12047 * server.h (traceframe_read_info): Declare.
12048
4f3e6fb7
YQ
120492011-02-11 Yao Qi <yao@codesourcery.com>
12050
12051 * configure.ac: Call AC_PROG_RANLIB.
12052 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12053 * configure: Regenerate.
12054
764880b7
PA
120552011-02-07 Pedro Alves <pedro@codesourcery.com>
12056
12057 * server.c (gdb_read_memory): Change return semantics to allow
12058 partial transfers.
12059 (handle_search_memory_1): Adjust.
12060 (process_serial_event) <'m' packet>: Handle partial transfers.
12061 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12062
1c79eb8a
PA
120632011-01-28 Pedro Alves <pedro@codesourcery.com>
12064
12065 * regcache.c (init_register_cache): Initialize
12066 regcache->register_status.
12067 (free_register_cache): Release regcache->register_status.
12068 (regcache_cpy): Copy register_status.
12069 (registers_to_string): Print 'x's for unavailable registers.
12070 (supply_register): Mark the register's status valid or
12071 unavailable, depending on whether a buffer was passed in or not.
12072 (supply_register_zeroed): New.
12073 (supply_regblock): Mark the registers' status valid or
12074 unavailable, depending on whether a buffer was passed in or not.
12075 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12076 (struct regcache): New `register_status' field.
12077 (supply_register_zeroed): Declare.
12078 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12079 supply_register_zeroed, rather than passing a NULL buffer to
12080 supply_register.
12081 * tracepoint.c (fetch_traceframe_registers): Update comment.
12082
85724a0e
PA
120832011-01-28 Pedro Alves <pedro@codesourcery.com>
12084
12085 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12086 buffer explicit.
12087
d08aafef
PA
120882011-01-25 Pedro Alves <pedro@codesourcery.com>
12089
12090 * server.h (decode_xfer_write): Change prototype.
12091 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12092 and don't extract the annex here.
12093 * server.c (decode_xfer_read): Remove `annex' parameter,
12094 and don't extract the annex here.
12095 (decode_xfer): New.
12096 (struct qxfer): New.
12097 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12098 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12099 (handle_qxfer_statictrace): New functions, abstracted out from
12100 handle_query, and made to use the struct qxfer interface.
12101 (handle_threads_qxfer_proper): Rename to ...
12102 (handle_qxfer_threads_proper): ... this.
12103 (handle_threads_qxfer): Rename to ...
12104 (handle_qxfer_threads): ... this. Adjust.
12105 (qxfer_packets): New array.
12106 (handle_qxfer): New function.
12107 (handle_query): Use handle_qxfer.
12108
493e2a69
MS
121092011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12110
12111 * gdbreplay.c: Shorten lines of >= 80 columns.
12112 * linux-low.c: Ditto.
12113 * linux-ppc-low.c: Ditto.
12114 * linux-s390-low.c: Ditto.
12115 * linux-sparc-low.c: Ditto.
12116 * linux-x86-low.c: Ditto.
12117 * linux-xtensa-low.c: Ditto.
12118 * mem-break.c: Ditto.
12119 * nto-low.c: Ditto.
12120 * regcache.h: Ditto.
12121 * remote-utils.c: Ditto.
12122 * server.c: Ditto.
12123 * server.h: Ditto.
12124 * thread-db.c: Ditto.
12125 * tracepoint.c: Ditto.
12126 * utils.c: Ditto.
12127 * win32-low.h: Ditto.
12128
44944448
JB
121292011-01-05 Joel Brobecker <brobecker@adacore.com>
12130
12131 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12132 update.
12133
71ce852c
JB
121342011-01-01 Joel Brobecker <brobecker@adacore.com>
12135
12136 * server.c (gdbserver_version): Update copyright year in version
12137 output.
12138 * gdbreplay.c (gdbreplay_version): Ditto.
12139
eb826dc6
MF
121402010-12-29 Jie Zhang <jie.zhang@analog.com>
12141
12142 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12143 * linux-bfin-low.c: New file.
12144 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12145 PT_DATA_ADDR for BFIN targets.
12146 * Makefile.in (SFILES): Add linux-bfin-low.c.
12147 (clean): Remove reg-bfin.c.
12148 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12149 * README: Mention supported Blackfin targets.
12150
39ab222a
MF
121512010-12-23 Mike Frysinger <vapier@gentoo.org>
12152
12153 * .gitignore: New file.
12154
a1f2ce7d
MF
121552010-11-16 Mike Frysinger <vapier@gentoo.org>
12156
12157 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12158
f474844c
JZ
121592010-10-22 Jie Zhang <jie@codesourcery.com>
12160
12161 * Makefile.in: Add FLAGS_TO_PASS variable.
12162 (install): Remove dependency of install-only and recursively
12163 invoke make for install-only.
12164
f1048712
DE
121652010-10-04 Doug Evans <dje@google.com>
12166
12167 * Makefile.in (uninstall): Use $(DESTDIR).
12168
b53a1623
PA
121692010-09-24 Pedro Alves <pedro@codesourcery.com>
12170
e6ee044d
PA
12171 PR gdb/11842
12172
b53a1623
PA
12173 * linux-x86-low.c (compat_siginfo_from_siginfo)
12174 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12175 si_code is < 0. Check for si_code == SI_TIMER before checking for
12176 si_code < 0.
12177
fa1bd1e4
JB
121782010-09-13 Joel Brobecker <brobecker@adacore.com>
12179
12180 * lynx-i386-low.c: New file.
12181 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12182
47fac8f8
JB
121832010-09-13 Joel Brobecker <brobecker@adacore.com>
12184
12185 * lynx-low.c (ptrace_request_to_str): Remove handling for
12186 request values that have been removed in LynxOS 5.x.
12187
1adfc54d
JB
121882010-09-13 Joel Brobecker <brobecker@adacore.com>
12189
12190 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12191 <ptrace.h>
12192
c2a66c29
NS
121932010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12194
12195 * configure.ac: Add --enable-inprocess-agent option.
12196 * configure: Rebuilt.
12197
32fcada3
YQ
121982010-09-06 Yao Qi <yao@codesourcery.com>
12199
12200 * linux-low.c (linux_kill): Remove unused variable.
12201 (linux_stabilize_threads): Likewise.
12202 * server.c (start_inferior): Likewise.
12203 (queue_stop_reply_callback): Likewise.
12204 * tracepoint.c (do_action_at_tracepoint): Likewise.
12205
0cccb683
YQ
122062010-09-06 Yao Qi <yao@codesourcery.com>
12207
12208 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12209 on return.
12210
423ec54c
JK
122112010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12212
12213 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12214
12ac6819
PA
122152010-09-06 Pedro Alves <pedro@codesourcery.com>
12216
12217 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12218 "$(IPA_DEPFILES)".
12219
8ed54b31
JB
122202010-09-01 Joel Brobecker <brobecker@adacore.com>
12221
12222 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12223 gdbserver/lynx-ppc-low.c: New files.
12224 * Makefile.in (lynx_low_h): New variable.
12225 (lynx-low.o, lynx-ppc-low.o): New rules.
12226 * configure.ac: On LynxOS, link with -lnetinet.
12227 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12228 * configure: regenerate.
12229
bb0116a4
JB
122302010-09-01 Joel Brobecker <brobecker@adacore.com>
12231
12232 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12233 * configure.ac: Add check for vasprintf and vsnprintf.
12234 * configure, config.in: Regenerate.
12235 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12236
a778ab81 122372010-09-01 Joel Brobecker <brobecker@adacore.com>
12238
12239 * gdbreplay.c: Move include of alloca.h up, next to include of
12240 malloc.h.
12241 * server.h: Add include of malloc.h.
12242 * mem-break.c: Remove include of malloc.h.
12243 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12244
8b034a19 122452010-09-01 Joel Brobecker <brobecker@adacore.com>
12246
12247 * Makefile.in (memmem.o): Build with -Wno-error.
12248
122492010-09-01 Joel Brobecker <brobecker@adacore.com>
12250
12251 * utils.c (xsnprintf): Make non-static.
12252 * server.h: Add xsnprintf declaration.
12253 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12254 replace calls to snprintf by calls to xsnprintf throughout.
12255
122562010-09-01 Joel Brobecker <brobecker@adacore.com>
12257
12258 * configure.ac: Add configure check for alloca.
12259 * configure, config.in: Regenerate.
12260 * server.h: Include alloca.h if it exists.
12261 * gdbreplay.c: Include alloca.h if it exists.
12262
1a981360
PA
122632010-08-28 Pedro Alves <pedro@codesourcery.com>
12264
12265 * linux-low.c (__SIGRTMIN): Define if not already defined.
12266 (linux_create_inferior): Check for __ANDROID__ rather than
12267 __SIGRTMIN.
12268 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12269 are already deferred.
12270 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12271 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12272 stopped and already has a pending signal to report.
12273 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12274 a pending signal to report or is moving out of a jump pad.
12275 (linux_init_signals): Check for __ANDROID__ rather than
12276 __SIGRTMIN.
12277
b4d51a55
PA
122782010-08-28 Pedro Alves <pedro@codesourcery.com>
12279
12280 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12281 debug_threads check. Avoid a linear search when not doing debug
12282 output.
12283
ec48365d
PA
122842010-08-27 Pedro Alves <pedro@codesourcery.com>
12285
12286 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12287 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12288 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12289 (process_event): Change local fd's type to gdb_fildes_t.
12290 (create_file_handler): Adjust prototype.
12291 (delete_file_handler): Adjust prototype.
12292 (handle_file_event): Adjust prototype. Use pfildes.
12293 (create_file_event): Adjsut prototype.
12294 * remote-utils.c (remote_desc, listen_desc): Change type to
12295 gdb_fildes_t.
12296 * server.h: New gdb_fildes_t typedef.
12297 [USE_WIN32API]: Include winsock2.h.
12298 (delete_file_handler, add_file_handler): Adjust prototypes.
12299 (pfildes): Declare.
12300 * utils.c (pfildes): New.
12301
854d88f0
PA
123022010-08-27 Pedro Alves <pedro@codesourcery.com>
12303
12304 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12305 * configure: Regenerate.
12306
0146f85b
PA
123072010-08-27 Pedro Alves <pedro@codesourcery.com>
12308
12309 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12310 (linux_done_accessing_memory): ... this.
12311 (linux_target_ops): Adjust.
12312 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12313 * nto-low.c (nto_target_ops): Adjust comment.
12314 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12315 * spu-low.c (spu_target_ops): Adjust comment.
12316 * target.h (target_ops): Rename unprepare_to_access_memory field
12317 to done_accessing_memory.
12318 (unprepare_to_access_memory): Rename to ...
12319 (done_accessing_memory): ... this.
12320
90d74c30
PA
123212010-08-26 Pedro Alves <pedro@codesourcery.com>
12322
12323 * linux-low.c (linux_prepare_to_access_memory): New.
12324 (linux_unprepare_to_access_memory): New.
12325 (linux_target_ops): Install them.
12326 * server.c (read_memory): Rename to ...
12327 (gdb_read_memory): ... this. Use
12328 prepare_to_access_memory/prepare_to_access_memory.
12329 (write_memory): Rename to ...
12330 (gdb_write_memory): ... this. Use
12331 prepare_to_access_memory/prepare_to_access_memory.
12332 (handle_search_memory_1): Adjust.
12333 (process_serial_event): Adjust.
12334 * target.h (struct target_ops): New fields
12335 prepare_to_access_memory and unprepare_to_access_memory.
12336 (prepare_to_access_memory, unprepare_to_access_memory): New.
12337 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12338 prepare_to_access_memory/prepare_to_access_memory.
12339 * nto-low.c (nto_target_ops): Adjust.
12340 * spu-low.c (spu_target_ops): Adjust.
12341 * win32-low.c (win32_target_ops): Adjust.
12342
fd467969
PA
123432010-08-26 Pedro Alves <pedro@codesourcery.com>
12344
12345 * Makefile.in (WARN_CFLAGS): Get it from configure.
12346 (WERROR_CFLAGS): New.
12347 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12348 * configure.ac: Introduce --enable-werror, which adds -Werror to
12349 the compiler command line. Enabled by default. Disable with
12350 --disable-werror. Add -Wdeclaration-after-statement
12351 Wpointer-arith and -Wformat-nonliteral to warning flags.
12352 * configure: Regenerate.
12353
331e2f5f
PA
123542010-08-26 Pedro Alves <pedro@codesourcery.com>
12355
12356 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12357
e581f2b4
PA
123582010-08-26 Pedro Alves <pedro@codesourcery.com>
12359
12360 * gdbreplay.c (remote_error): New.
12361 (gdbchar): New.
12362 (expect): Use gdbchar. Check for error reading from GDB.
12363 Clarify sync error output.
12364 (play): Check for errors writing to GDB.
12365 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12366 * remote-utils.c (getpkt): Check for errors writing to the remote
12367 descriptor.
12368
3c11dd79
PA
123692010-08-25 Pedro Alves <pedro@codesourcery.com>
12370
12371 * linux-low.c (linux_wait_1): Move non-debugging code out of
12372 `debug_threads' control.
12373
d20a8ad9
PA
123742010-08-25 Pedro Alves <pedro@codesourcery.com>
12375
12376 * linux-low.c (linux_wait_1): Don't set last_status here.
12377 * server.c (push_event, queue_stop_reply_callback): Assert we're
12378 not pushing a TARGET_WAITKIND_IGNORE event.
12379 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12380 (myresume, handle_target_event): Set the thread's last_resume_kind
12381 and last_status from the target returned status.
12382
964e4306
PA
123832010-08-25 Pedro Alves <pedro@codesourcery.com>
12384
12385 PR threads/10729
12386
12387 * linux-x86-low.c (update_debug_registers_callback): New.
12388 (i386_dr_low_set_addr): Use it.
12389 (i386_dr_low_get_addr): New.
12390 (i386_dr_low_set_control): Use update_debug_registers_callback.
12391 (i386_dr_low_get_control): New.
12392 (i386_dr_low_get_status): Adjust.
12393 * linux-low.c (linux_stop_lwp): New.
12394 * linux-low.h (linux_stop_lwp): Declare.
12395
12396 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12397 argument instead of a i386_debug_reg_state.
12398 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12399 a i386_debug_reg_state.
12400 (i386_insert_aligned_watchpoint): Adjust.
12401 (i386_remove_aligned_watchpoint): Adjust.
12402 (i386_low_stopped_data_address): Read the debug registers from the
12403 inferior instead of from the mirrors.
12404 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12405 (i386_dr_low_get_addr): Declare.
12406 (i386_dr_low_get_control): Declare.
12407 (i386_dr_low_get_status): Change prototype.
12408
12409 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12410 (i386_dr_low_get_addr): New.
12411 (i386_dr_low_get_control): New.
12412 (i386_dr_low_get_status): Adjust prototype. Return
12413 dr_status_mirror.
12414 (i386_initial_stuff): Clear dr_status_mirror and
12415 dr_control_mirror.
12416 (i386_get_thread_context): Adjust.
12417 (i386_set_thread_context): Adjust.
12418 (i386_thread_added): Adjust.
12419
5f21a75b
PA
124202010-08-24 Pedro Alves <pedro@codesourcery.com>
12421
12422 * linux-low.h (linux_thread_area): Delete declaration.
12423
3e4c1235
TS
124242010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12425
12426 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12427 after its termination.
12428
1971b033
PA
124292010-08-09 Pedro Alves <pedro@codesourcery.com>
12430
12431 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12432 (gdb_wants_all_stopped): Delete.
12433 (linux_wait_1): Don't call them.
12434 * server.c (handle_v_cont): Tag all threads as want-stopped.
12435 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12436 stopped as "client-wants-stopped".
12437
310444ac
PA
124382010-07-31 Pedro Alves <pedro@codesourcery.com>
12439
12440 * Makefile.in (signals_h): New.
12441 (server_h): Depend on it.
12442 (server.o): Don't depend on $(signals_def).
12443 (signals.o): Depend on $(signals_def).
12444
a19cae16
JK
124452010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12446
12447 * Makefile.in (signals_def): New.
12448 (server_h): Append include/gdb/signals.h and signals_def.
12449 (server.o): Append signals_def.
12450
30d50328
JK
124512010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12452
12453 * server.c (handle_target_event): Use target_signal_to_host for
12454 resume_info.sig initialization.
12455 * target.h (struct thread_resume) <sig>: New comment.
12456
5c3216e2
OS
124572010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12458
c6f46ca0
OS
12459 * server.c (handle_query): strcpy() the returned string from paddress()
12460 instead of sprintf().
5c3216e2
OS
12461 * utils.c (paddress): Return phex_nz().
12462
6bd31874
JB
124632010-07-07 Joel Brobecker <brobecker@adacore.com>
12464
12465 * server.c (handle_v_cont): Call mourn_inferior if process
12466 just exited.
12467 (myresume): Likewise.
12468
0fb4aa4b
PA
124692010-07-01 Pedro Alves <pedro@codesourcery.com>
12470
12471 Static tracepoints, and integration with UST.
12472
12473 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12474 * mem-break.c (uninsert_all_breakpoints)
12475 (reinsert_all_breakpoints): New.
12476 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12477 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12478 (gdb_agent_ust_loaded, helper_thread_id)
12479 (gdb_agent_helper_thread_id): New macros.
12480 (struct ipa_sym_addresses): Add addr_ust_loaded,
12481 addr_helper_thread_id, addr_cmd_buf.
12482 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12483 (in_process_agent_loaded_ust): New.
12484 (write_e_ust_not_loaded): New.
12485 (maybe_write_ipa_ust_not_loaded): New.
12486 (struct collect_static_trace_data_action): New.
12487 (enum tracepoint_type) <static_tracepoint>: New.
12488 (struct tracepoint) <handle>: Mention static tracepoints.
12489 (struct static_tracepoint_ctx): New.
12490 (CMD_BUF_SIZE): New.
12491 (add_tracepoint_action): Handle static tracepoint actions.
12492 (unprobe_marker_at): New.
12493 (clear_installed_tracepoints): Handle static tracepoints.
12494 (cmd_qtdp): Handle static tracepoints.
12495 (probe_marker_at): New.
12496 (cmd_qtstart): Handle static tracepoints.
12497 (response_tracepoint): Handle static tracepoints.
12498 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12499 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12500 (get_context_regcache): Handle static tracepoints.
12501 (do_action_at_tracepoint): Handle static tracepoint actions.
12502 (traceframe_find_block_type): Handle static trace data blocks.
12503 (traceframe_read_sdata): New.
12504 (download_tracepoints): Download static tracepoint actions.
12505 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12506 (GDB_PROBE_NAME): New.
12507 (ust_ops): New.
12508 (GET_UST_SYM): New.
12509 (USTF): New.
12510 (dlsym_ust): New.
12511 (ust_marker_to_static_tracepoint): New.
12512 (gdb_probe): New.
12513 (collect_ust_data_at_tracepoint): New.
12514 (gdb_ust_probe): New.
12515 (UNIX_PATH_MAX, SOCK_DIR): New.
12516 (gdb_ust_connect_sync_socket): New.
12517 (resume_thread, stop_thread): New.
12518 (run_inferior_command): New.
12519 (init_named_socket): New.
12520 (gdb_ust_socket_init): New.
12521 (cstr_to_hexstr): New.
12522 (next_st): New.
12523 (first_marker, next_marker): New.
12524 (response_ust_marker): New.
12525 (cmd_qtfstm, cmd_qtsstm): New.
12526 (unprobe_marker_at, probe_marker_at): New.
12527 (cmd_qtstmat, gdb_ust_thread): New.
12528 (gdb_ust_init): New.
12529 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12530 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12531 (ST_REGENTRY): New.
12532 (x86_64_st_collect_regmap): New.
12533 (X86_64_NUM_ST_COLLECT_GREGS): New.
12534 (AMD64_RIP_REGNUM): New.
12535 (supply_static_tracepoint_registers): New.
12536 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12537 (ST_REGENTRY): New.
12538 (i386_st_collect_regmap): New.
12539 (i386_NUM_ST_COLLECT_GREGS): New.
12540 (supply_static_tracepoint_registers): New.
12541 * server.c (handle_query): Handle qXfer:statictrace:read.
12542 <qSupported>: Report support for StaticTracepoints, and
12543 qXfer:statictrace:read features.
12544 * server.h (traceframe_read_sdata)
12545 (supply_static_tracepoint_registers): Declare.
12546 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12547 (unpack_varlen_hex): Include in IPA build.
12548 * Makefile.in (ustlibs, ustinc): New.
12549 (IPA_OBJS): Add remote-utils-ipa.o.
12550 ($(IPA_LIB)): Link -ldl and -lpthread.
12551 (UST_CFLAGS): New.
12552 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12553 * config.in, configure: Regenerate.
12554
9e4344e5
PA
125552010-06-20 Ian Lance Taylor <iant@google.com>
12556 Pedro Alves <pedro@codesourcery.com>
12557
12558 * linux-x86-low.c (always_true): Delete.
12559 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12560 trying to fool the compiler with always_true.
12561
c6beb2cb
PA
125622010-06-20 Pedro Alves <pedro@codesourcery.com>
12563
12564 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12565 conditions in gdbserver.
12566
d2ed6730
UW
125672010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12568
12569 * spu-low.c (spu_read_memory): Wrap around local store limit.
12570 (spu_write_memory): Likewise.
12571
4e29fb54
PA
125722010-06-15 Pedro Alves <pedro@codesourcery.com>
12573
12574 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12575 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12576 LONGEST uses.
12577 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12578 uses.
12579 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12580 uses with LONGEST uses.
12581
6a271cae
PA
125822010-06-14 Stan Shebs <stan@codesourcery.com>
12583 Pedro Alves <pedro@codesourcery.com>
12584
12585 Bytecode compiler.
12586
12587 * linux-x86-low.c: Include limits.h.
12588 (add_insns): New.
12589 (always_true): New.
12590 (EMIT_ASM): New.
12591 (EMIT_ASM32): New.
12592 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12593 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12594 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12595 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12596 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12597 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12598 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12599 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12600 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12601 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12602 (amd64_emit_void_call_2): New.
12603 (amd64_emit_ops): New.
12604 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12605 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12606 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12607 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12608 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12609 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12610 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12611 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12612 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12613 (i386_emit_stack_adjust, i386_emit_int_call_1)
12614 (i386_emit_void_call_2): New.
12615 (i386_emit_ops): New.
12616 (x86_emit_ops): New.
12617 (the_low_target): Install x86_emit_ops.
12618 * server.h (struct emit_ops): New.
12619 (get_raw_reg_func_addr): Declare.
12620 (current_insn_ptr, emit_error): Declare.
12621 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12622 (set_trace_state_variable_value): New defines.
12623 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12624 addr_get_trace_state_variable_value and
12625 addr_set_trace_state_variable_value.
12626 (symbol_list): New fields for get_raw_reg,
12627 get_trace_state_variable_value and set_trace_state_variable_value.
12628 (condfn): New typedef.
12629 (struct tracepoint): New field `compiled_cond'.
12630 (do_action_at_tracepoint): Clear compiled_cond.
12631 (get_trace_state_variable_value, set_trace_state_variable_value):
12632 Export in the IPA.
12633 (condition_true_at_tracepoint): If there's a compiled condition,
12634 run that.
12635 (current_insn_ptr, emit_error): New globals.
12636 (struct bytecode_address): New.
12637 (get_raw_reg_func_addr): New.
12638 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12639 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12640 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12641 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12642 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12643 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12644 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12645 (compile_tracepoint_condition, compile_bytecodes): New.
12646 * target.h (emit_ops): Forward declare.
12647 (struct target_ops): New field emit_ops.
12648 (target_emit_ops): New.
12649 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12650 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12651 * linux-low.c (linux_emit_ops): New.
12652 (linux_target_ops): Install it.
12653 * linux-low.h (struct linux_target_ops): New field emit_ops.
12654
92b72907
UW
126552010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12656
12657 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12658 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12659
fa593d66
PA
126602010-06-01 Pedro Alves <pedro@codesourcery.com>
12661 Stan Shebs <stan@codesourcery.com>
12662
12663 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12664 (all): Depend on $(extra_libraries).
12665 (install-only): Install the IPA.
12666 (IPA_OBJS, IPA_LIB): New.
12667 (clean): Remove the IPA lib.
12668 (IPAGENT_CFLAGS): New.
12669 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12670 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12671 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12672 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12673 * configure.ac: Check for atomic builtins support in the compiler.
12674 (IPA_DEPFILES, extra_libraries): Define.
12675 * configure.srv (ipa_obj): Add description.
12676 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12677 (i[34567]86-*-linux*): Set ipa_obj.
12678 (x86_64-*-linux*): Set ipa_obj.
12679 * linux-low.c (stabilizing_threads): New.
12680 (supports_fast_tracepoints): New.
12681 (linux_detach): Stabilize threads before detaching.
12682 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12683 the lwp is either not stabilizing, or is moving out of a jump pad.
12684 (linux_fast_tracepoint_collecting): New.
12685 (maybe_move_out_of_jump_pad): New.
12686 (enqueue_one_deferred_signal): New.
12687 (dequeue_one_deferred_signal): New.
12688 (linux_wait_for_event_1): If moving out of a jump pad, defer
12689 pending signals to later.
12690 (linux_stabilize_threads): New.
12691 (linux_wait_1): Check if threads need moving out of jump pads, and
12692 do it if so.
12693 (stuck_in_jump_pad_callback): New.
12694 (move_out_of_jump_pad_callback): New.
12695 (lwp_running): New.
12696 (linux_resume_one_lwp): Handle moving out of jump pads.
12697 (linux_set_resume_request): Dequeue deferred signals.
12698 (need_step_over_p): Also step over fast tracepoint jumps.
12699 (start_step_over): Also uninsert fast tracepoint jumps.
12700 (finish_step_over): Also reinsert fast tracepoint jumps.
12701 (linux_install_fast_tracepoint_jump): New.
12702 (linux_target_ops): Install linux_stabilize_threads and
12703 linux_install_fast_tracepoint_jump_pad.
12704 * linux-low.h (linux_target_ops) <get_thread_area,
12705 install_fast_tracepoint_jump_pad>: New fields.
12706 (struct lwp_info) <collecting_fast_tracepoint,
12707 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12708 (linux_get_thread_area): Declare.
12709 * linux-x86-low.c (jump_insn): New.
12710 (x86_get_thread_area): New.
12711 (append_insns): New.
12712 (push_opcode): New.
12713 (amd64_install_fast_tracepoint_jump_pad): New.
12714 (i386_install_fast_tracepoint_jump_pad): New.
12715 (x86_install_fast_tracepoint_jump_pad): New.
12716 (the_low_target): Install x86_get_thread_area and
12717 x86_install_fast_tracepoint_jump_pad.
12718 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12719 (struct fast_tracepoint_jump): New.
12720 (fast_tracepoint_jump_insn): New.
12721 (fast_tracepoint_jump_shadow): New.
12722 (find_fast_tracepoint_jump_at): New.
12723 (fast_tracepoint_jump_here): New.
12724 (delete_fast_tracepoint_jump): New.
12725 (set_fast_tracepoint_jump): New.
12726 (uninsert_fast_tracepoint_jumps_at): New.
12727 (reinsert_fast_tracepoint_jumps_at): New.
12728 (set_breakpoint_at): Use write_inferior_memory.
12729 (uninsert_raw_breakpoint): Use write_inferior_memory.
12730 (check_mem_read): Mask out fast tracepoint jumps.
12731 (check_mem_write): Mask out fast tracepoint jumps.
12732 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12733 (set_fast_tracepoint_jump): Declare.
12734 (delete_fast_tracepoint_jump)
12735 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12736 (reinsert_fast_tracepoint_jumps_at): Declare.
12737 * regcache.c: Don't compile many functions when building the
12738 in-process agent library.
12739 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12740 the register buffer in the heap.
12741 (free_register_cache): If the register buffer isn't owned by the
12742 regcache, don't free it.
12743 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12744 pre-existing register caches.
12745 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12746 type.
12747 (convert_ascii_to_int): : Constify `from' parameter type.
12748 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12749 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12750 the needed buffer in-place.
12751 (relocate_instruction): New.
12752 * server.c (handle_query) <qSymbols>: If the target supports
12753 tracepoints, give it a chance of looking up symbols. Report
12754 support for fast tracepoints.
12755 (handle_status): Stabilize threads.
12756 (process_serial_event): Adjust.
12757 * server.h (struct fast_tracepoint_jump): Forward declare.
12758 (struct process_info) <fast_tracepoint_jumps>: New field.
12759 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12760 (decode_X_packet, decode_M_packet): Adjust.
12761 (relocate_instruction): Declare.
12762 (in_process_agent_loaded): Declare.
12763 (tracepoint_look_up_symbols): Declare.
12764 (struct fast_tpoint_collect_status): Declare.
12765 (fast_tracepoint_collecting): Declare.
12766 (force_unlock_trace_buffer): Declare.
12767 (handle_tracepoint_bkpts): Declare.
12768 (initialize_low_tracepoint)
12769 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12770 * target.h (struct target_ops) <stabilize_threads,
12771 install_fast_tracepoint_jump_pad>: New fields.
12772 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12773 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12774 [HAVE_STDINT_H]: Include stdint.h.
12775 (trace_debug_1): Rename to ...
12776 (trace_vdebug): ... this.
12777 (trace_debug): Rename to ...
12778 (trace_debug_1): ... this. Add `level' parameter.
12779 (trace_debug): New.
12780 (ATTR_USED, ATTR_NOINLINE): New.
12781 (IP_AGENT_EXPORT): New.
12782 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12783 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12784 (about_to_request_buffer_space, trace_buffer_is_full)
12785 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12786 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12787 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12788 (traceframe_write_count, traceframes_created)
12789 (trace_state_variables)
12790 New renaming defines.
12791 (struct ipa_sym_addresses): New.
12792 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12793 (symbol_list): New.
12794 (ipa_sym_addrs): New.
12795 (all_tracepoint_symbols_looked_up): New.
12796 (in_process_agent_loaded): New.
12797 (write_e_ipa_not_loaded): New.
12798 (maybe_write_ipa_not_loaded): New.
12799 (tracepoint_look_up_symbols): New.
12800 (debug_threads) [IN_PROCESS_AGENT]: New.
12801 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12802 (UNKNOWN_SIDE_EFFECTS): New.
12803 (stop_tracing): New.
12804 (flush_trace_buffer): New.
12805 (stop_tracing_bkpt): New.
12806 (flush_trace_buffer_bkpt): New.
12807 (read_inferior_integer): New.
12808 (read_inferior_uinteger): New.
12809 (read_inferior_data_pointer): New.
12810 (write_inferior_data_pointer): New.
12811 (write_inferior_integer): New.
12812 (write_inferior_uinteger): New.
12813 (struct collect_static_trace_data_action): Delete.
12814 (enum tracepoint_type): New.
12815 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12816 <actions_str, step_actions, step_actions_str>: Only include in
12817 GDBserver.
fa593d66
PA
12818 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12819 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12820 (tracepoints): Use IP_AGENT_EXPORT.
12821 (last_tracepoint): Don't include in the IPA.
12822 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12823 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12824 (alloced_trace_state_variables): New.
12825 (trace_state_variables): Use IP_AGENT_EXPORT.
12826 (traceframe_t): Delete unused variable.
12827 (circular_trace_buffer): Don't include in the IPA.
12828 (trace_buffer_start): Delete.
12829 (struct trace_buffer_control): New.
12830 (trace_buffer_free): Delete.
12831 (struct ipa_trace_buffer_control): New.
12832 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12833 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12834 New.
12835 (trace_buffer_ctrl): New.
12836 (TRACE_BUFFER_CTRL_CURR): New.
12837 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12838 Reimplement as macros.
12839 (trace_buffer_wrap): Delete.
12840 (traceframe_write_count, traceframe_read_count)
12841 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12842 (struct tracepoint_hit_ctx) <type>: New field.
12843 (struct fast_tracepoint_ctx): New.
12844 (memory_barrier): New.
12845 (cmpxchg): New.
12846 (record_tracepoint_error): Update atomically in the IPA.
12847 (clear_inferior_trace_buffer): New.
12848 (about_to_request_buffer_space): New.
12849 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12850 updating the same buffer.
12851 (add_tracepoint): Default the tracepoint's type to trap
12852 tracepoint, and orig_size to -1.
12853 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12854 internal variables.
12855 (create_trace_state_variable): New parameter `gdb'. Handle it.
12856 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12857 (cmd_qtdp): Handle fast tracepoints.
12858 (cmd_qtdv): Adjust.
12859 (max_jump_pad_size): New.
12860 (gdb_jump_pad_head): New.
12861 (get_jump_space_head): New.
12862 (claim_jump_space): New.
12863 (sort_tracepoints): New.
12864 (MAX_JUMP_SIZE): New.
12865 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12866 IPA.
12867 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12868 support. Upload fast traceframes, and delete internal IPA
12869 breakpoints.
12870 (stop_tracing_handler): New.
12871 (flush_trace_buffer_handler): New.
12872 (cmd_qtstop): Upload fast tracepoints.
12873 (response_tracepoint): Handle fast tracepoints.
12874 (tracepoint_finished_step): Upload fast traceframes. Set the
12875 tracepoint hit context's tracepoint type.
12876 (handle_tracepoint_bkpts): New.
12877 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12878 type. Add comment about fast tracepoints.
12879 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12880 non-existing action_str field.
12881 (get_context_regcache): Handle fast tracepoints.
12882 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12883 to the regcache.
12884 (fast_tracepoint_from_jump_pad_address): New.
12885 (fast_tracepoint_from_ipa_tpoint_address): New.
12886 (collecting_t): New.
12887 (force_unlock_trace_buffer): New.
12888 (fast_tracepoint_collecting): New.
12889 (collecting): New.
12890 (gdb_collect): New.
12891 (write_inferior_data_ptr): New.
12892 (target_tp_heap): New.
12893 (target_malloc): New.
12894 (download_agent_expr): New.
12895 (UALIGN): New.
12896 (download_tracepoints): New.
12897 (download_trace_state_variables): New.
12898 (upload_fast_traceframes): New.
12899 (IPA_FIRST_TRACEFRAME): New.
12900 (IPA_NEXT_TRACEFRAME_1): New.
12901 (IPA_NEXT_TRACEFRAME): New.
12902 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12903 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12904 (gdb_jump_pad_buffer_end): New.
12905 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12906 (initialize_tracepoint): Adjust.
12907 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12908 buffer. Initialize the low module.
12909 * utils.c (PREFIX, TOOLNAME): New.
12910 (malloc_failure): Use PREFIX.
12911 (error): In the IPA, an error causes an exit.
12912 (fatal, warning): Use PREFIX.
12913 (internal_error): Use TOOLNAME.
12914 (NUMCELLS): Increase to 10.
12915 * configure, config.in: Regenerate.
12916
d149dd1d
PA
129172010-06-01 Pedro Alves <pedro@codesourcery.com>
12918
12919 * server.c (handle_query) <qSupported>: Do two passes over the
12920 qSupported string to avoid nesting strtok.
12921
f6528abd
JK
129222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12923
12924 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12925 (CDEPS): New.
12926 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12927 -Wl,--dynamic-list.
12928 * configure: Regenerate.
12929 * proc-service.list: New.
12930
ca2a87a0
JK
129312010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12932
12933 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12934 New comment.
12935
363a6e9f
OS
129362010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12937
12938 * gdbreplay.c (remote_open): Check error return from socket() call by
12939 its equality to -1 not by it being negative.
12940 * remote-utils.c (remote_open): Likewise.
12941
d23b6cb1
PA
129422010-05-23 Pedro Alves <pedro@codesourcery.com>
12943
12944 * config.h: Regenerate.
12945
28d3cf85
MK
129462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12947
12948 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12949 doesn't provide PTRACE_GET_THREAD_AREA.
12950
fea36a59
MK
129512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12952
12953 * linux-m68k-low.c: Include <asm/ptrace.h>
12954 (ps_get_thread_area): Implement.
12955
24b066ba
DE
129562010-05-03 Doug Evans <dje@google.com>
12957
12958 * event-loop.c (struct callback_event): New struct.
12959 (callback_list): New global.
12960 (append_callback_event, delete_callback_event): New functions.
12961 (process_callback): New function.
12962 (start_event_loop): Call it.
12963 * remote-utils.c (NOT_SCHEDULED): Define.
12964 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12965 moved out of readchar.
12966 (readchar): Rewrite. Call reschedule before returning.
12967 (reset_readchar): New function.
12968 (remote_close): Call it.
12969 (process_remaining, reschedule): New functions.
12970 * server.h (callback_handler_func): New typedef.
12971 (append_callback_event, delete_callback_event): Declare.
12972
9836d6ea
PA
129732010-05-03 Pedro Alves <pedro@codesourcery.com>
12974
12975 * proc-service.c (ps_pglobal_lookup): Use
12976 thread_db_look_up_one_symbol.
12977 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12978 parameter. Use it instead of all_symbols_looked_up.
12979 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12980 field.
12981 (all_symbols_looked_up): Don't declare.
12982 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12983 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12984 field.
12985 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12986 Set all_symbols_looked_up here.
12987 (thread_db_look_up_one_symbol): New.
12988 (thread_db_get_tls_address): Adjust.
12989 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12990 thread_db object on the heap, and tentatively set it in the
12991 process structure.
12992 (thread_db_init): Don't set all_symbols_looked_up here.
12993 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12994
7984d532
PA
129952010-05-03 Pedro Alves <pedro@codesourcery.com>
12996
12997 * linux-low.c (linux_kill, linux_detach): Adjust.
12998 (status_pending_p_callback): Remove redundant statement. Check
12999 for !TARGET_WAITIKIND_IGNORE, instead of
13000 TARGET_WAITKIND_STOPPED.
13001 (handle_tracepoints): Make sure LWP is locked. Adjust.
13002 (linux_wait_for_event_1): Adjust.
13003 (linux_cancel_breakpoints): New.
13004 (unsuspend_one_lwp): New.
13005 (unsuspend_all_lwps): New.
13006 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13007 (send_sigstop_callback): Change return type to int, add new
13008 `except' parameter and handle it.
13009 (suspend_and_send_sigstop_callback): New.
13010 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13011 pass them down. If SUSPEND, also increment the lwp's suspend
13012 count.
13013 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13014 (need_step_over_p): Don't consider suspended LWPs.
13015 (start_step_over): Adjust.
13016 (proceed_one_lwp): Change return type to int, add new `except'
13017 parameter and handle it.
13018 (unsuspend_and_proceed_one_lwp): New.
13019 (proceed_all_lwps): Use find_inferior instead of
13020 for_each_inferior.
13021 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13022 also decrement the suspend count of LWPs. Pass `except' down,
13023 instead of hacking its suspend count.
13024 (linux_pause_all): Add `freeze' parameter. Adjust.
13025 (linux_unpause_all): New.
13026 (linux_target_ops): Install linux_unpause_all.
13027 * server.c (handle_status): Adjust.
13028 * target.h (struct target_ops): New fields `unpause_all' and
13029 `cancel_breakpoints'. Add new parameter to `pause_all'.
13030 (pause_all): Add new `freeze' parameter.
13031 (unpause_all): New.
13032 (cancel_breakpoints): New.
13033 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13034 cancel breakpoints.
13035 (cmd_qtstart): Pause threads.
13036 (stop_tracing): Pause threads, and cancel breakpoints.
13037 * win32-low.c (win32_target_ops): Adjust.
13038
e471f25b
PA
130392010-05-03 Pedro Alves <pedro@codesourcery.com>
13040
13041 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13042 the inferior right away from here...
13043 (linux_wait_1): ... to here, and adjust to check the thread's
13044 last_resume_kind instead of the lwp's step or stop_expected flags.
13045
1915ef4f
PA
130462010-05-02 Pedro Alves <pedro@codesourcery.com>
13047
13048 * README: Use consistent `GDB' and `GDBserver' spellings.
13049
f9e39928
PA
130502010-05-02 Pedro Alves <pedro@codesourcery.com>
13051
13052 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13053 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13054 (linux_detach_one_lwp): Assume the lwp is stopped.
13055 (any_thread_of): Delete.
13056 (linux_detach): Stop all lwps here. Don't blindly delete all
13057 breakpoints.
13058 (delete_lwp_callback): New.
13059 (linux_mourn): Delete all lwps of the process that is gone.
13060 (linux_wait_1): Don't delete the last lwp of the process here.
13061 * mem-break.h (mark_breakpoints_out): Declare.
13062 * mem-break.c (mark_breakpoints_out): New.
13063 (free_all_breakpoints): Use it.
13064 * server.c (handle_target_event): If the process is gone, mark
13065 breakpoints out.
13066 * thread-db.c (struct thread_db) <create_bp>: New field.
13067 (thread_db_enable_reporting): Fix prototype. Store a thread event
13068 breakpoint reference in the thread_db struct.
13069 (thread_db_load_search): Clear the thread_db object.
13070 (try_thread_db_load_1): Ditto.
13071 (switch_to_process): New.
13072 (disable_thread_event_reporting): Use it.
13073 (remove_thread_event_breakpoints): New.
13074 (thread_db_detach, thread_db_mourn): Use it.
13075
1e7fc18c
PA
130762010-05-01 Pedro Alves <pedro@codesourcery.com>
13077
13078 * linux-low.c (linux_enable_event_reporting): New.
13079 (linux_wait_for_event_1, handle_extended_wait): Use it.
13080
02fc4de7
PA
130812010-04-30 Pedro Alves <pedro@codesourcery.com>
13082
13083 * linux-low.c (linux_kill_one_lwp, linux_kill)
13084 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13085 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13086 SIGSTOP even if the LWP is stopped.
13087 (send_sigstop_callback): New.
13088 (stop_all_lwps): Use send_sigstop_callback instead.
13089 (linux_resume_one_thread): Adjust.
13090 (proceed_one_lwp): Still proceed an LWP that the client has
13091 requested to stop, if we haven't reported it as stopped yet. Make
13092 sure that LWPs the client want stopped, have a pending SIGSTOP.
13093
bc3b5632
DE
130942010-04-26 Doug Evans <dje@google.com>
13095
ae1ada35
DE
13096 * server.c (handle_general_set): Make static.
13097
bc3b5632
DE
13098 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13099 Print received char after testing for error/eof instead of before.
13100 (input_interrupt): Tweak comment.
13101
65730243
DE
131022010-04-23 Doug Evans <dje@google.com>
13103
13104 * server.c (start_inferior): Print inferior argv if --debug.
13105
a8ae7dc0
AR
131062010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13107
13108 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13109 * nto-x86-low.c: Include server.h
13110
1c07cc19
PM
131112010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13112
13113 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13114 be consistent with other sources of this directory.
13115 (init_registers_amd64): Correct name of source file of this function
13116 in the comment.
13117
e0a61e09
PM
131182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13119
13120 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13121 64-bit executables.
13122
54709339
PM
131232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13124
13125 * win32-i386-low.c: Add 64-bit support.
13126 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13127 (init_registers_amd64): Declare.
13128 (mappings): Add 64-bit version of array.
13129 (init_windows_x86): New function.
13130 (the_low_target): Change init_arch field to init_windows_x86.
13131
e8f0053d
PM
131322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13133
13134 * win32-low.c: Adapt to support also 64-bit architecture.
13135 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13136 (get_image_name): Use SIZE_T type for local variable `done'.
13137 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13138 (toolhelp_get_dll_name): Idem.
13139 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13140 Use uintptr_t typecast to avoid warning.
13141 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13142 (handle_exception): Use phex_nz to avoid warning.
13143 (win32_wait): Remove unused local variable `process'.
13144
c481e77e
PM
131452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13146
13147 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13148 `amd64-avx.o'.
13149
12ea4b69
PM
131502010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13151
13152 * configure.ac: Use `ws2_32' library for srv_mingw.
13153 * configure: Regenerate.
13154 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13155 * remote-utils.c: Likewise.
13156
f6d1620c
L
131572010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13158
13159 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13160 if __x86_64__ is defined.
13161
8e642873
PM
131622010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13163
13164 * configure: Regenerate.
13165
711e434b
PM
131662010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13167
13168 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13169 * target.h (target_ops): New get_tib_address field.
13170 * win32-low.h (win32_thread_info): Add thread_local_base field.
13171 * win32-low.c (child_add_thread): Add tlb argument.
13172 Set thread_local_base field to TLB.
13173 (get_child_debug_event): Adapt to child_add_thread change.
13174 (win32_get_tib_address): New function.
13175 (win32_target_ops): Set get_tib_address field to
13176 win32_get_tib_address.
13177 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13178
505106cd
PA
131792010-04-12 Pedro Alves <pedro@codesourcery.com>
13180
505106cd
PA
13181 * linux-low.c (linux_mourn): Also remove the process.
13182 * server.c (handle_target_event): Don't remove the process here.
13183 * nto-low.c (nto_mourn): New.
13184 (nto_target_ops): Install it.
13185 * spu-low.c (spu_mourn): New.
13186 (spu_target_ops): Install it.
13187 * win32-low.c (win32_mourn): New.
13188 (win32_target_ops): Install it.
13189
e8470a06
PA
131902010-04-12 Pedro Alves <pedro@codesourcery.com>
13191
13192 * server.h (buffer_xml_printf): Remove redundant `;'.
13193
45ba0d02
PA
131942010-04-12 Pedro Alves <pedro@codesourcery.com>
13195
13196 * regcache.c (set_register_cache): Invalidate regcaches before
13197 changing the register cache layout.
13198 (regcache_invalidate_one): Allow a NULL regcache.
13199 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13200 regcaches before changing the register cache layout or the target
13201 regsets.
13202
59e04013
L
132032010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13204
13205 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13206 variable warning on Linux/x86-64.
13207
8336d594
PA
132082010-04-11 Pedro Alves <pedro@codesourcery.com>
13209
13210 GDBserver disconnected tracing support.
13211
13212 * linux-low.c (linux_remove_process): Delete.
13213 (add_lwp): Don't set last_resume_kind here.
13214 (linux_kill): Use `mourn'.
13215 (linux_detach): Use `thread_db_detach', and `mourn'.
13216 (linux_mourn): New.
13217 (linux_attach_lwp_1): Adjust comment.
13218 (linux_attach): last_resume_kind moved the thread_info; adjust.
13219 (status_pending_p_callback): Adjust.
13220 (linux_wait_for_event_1): Adjust.
13221 (count_events_callback, select_singlestep_lwp_callback)
13222 (select_event_lwp_callback, cancel_breakpoints_callback)
13223 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13224 (proceed_one_lwp): Adjust.
13225 (linux_async): Add debug output.
13226 (linux_thread_stopped): New.
13227 (linux_pause_all): New.
13228 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13229 linux_pause_all.
13230 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13231 (thread_db_free): Delete declaration.
13232 (thread_db_detach, thread_db_mourn): Declare.
13233 * thread-db.c (thread_db_init): Use thread_db_mourn.
13234 (thread_db_free): Delete, split in two.
13235 (disable_thread_event_reporting): New.
13236 (thread_db_detach): New.
13237 (thread_db_mourn): New.
13238
13239 * server.h (struct thread_info) <last_resume_kind>: New field.
13240 <attached>: Add comment.
13241 <gdb_detached>: New field.
13242 (handler_func): Change return type to int.
13243 (handle_serial_event, handle_target_event): Ditto.
13244 (gdb_connected): Declare.
13245 (tracing): Delete.
13246 (disconnected_tracing): Declare.
13247 (stop_tracing): Declare.
13248
13249 * server.c (handle_query) <qSupported>: Report support for
13250 disconnected tracing.
13251 (queue_stop_reply_callback): Account for running threads.
13252 (gdb_wants_thread_stopped): New.
13253 (gdb_wants_all_threads_stopped): New.
13254 (gdb_reattached_process): New.
13255 (handle_status): Clear the `gdb_detached' flag of all processes.
13256 In all-stop, stop all threads.
13257 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13258 (process_serial_event): If the remote connection breaks, or if an
13259 exit was forced with "monitor exit", force an event loop exit.
13260 Handle disconnected tracing on detach.
13261 (handle_serial_event): Adjust.
13262 (handle_target_event): If GDB isn't connected, forward events back
13263 to the inferior, unless the last process exited, in which case,
13264 exit gdbserver. Adjust interface.
13265
13266 * remote-utils.c (remote_open): Don't block in accept. Instead
13267 register an event loop source on the listen socket file
13268 descriptor. Refactor bits into ...
13269 (listen_desc): ... this new global.
13270 (gdb_connected): ... this new function.
13271 (enable_async_notification): ... this new function.
13272 (handle_accept_event): ... this new function.
13273 (remote_close): Clear remote_desc.
13274
13275 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13276
13277 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13278 New fields.
13279 (mourn_inferior): Define.
13280 (target_process_qsupported): Avoid the dangling else problem.
13281 (thread_stopped): Define.
13282 (pause_all): Define.
13283 (target_waitstatus_to_string): Declare.
13284 * target.c (target_waitstatus_to_string): New.
13285
13286 * tracepoint.c (tracing): Make extern.
13287 (disconnected_tracing): New.
13288 (stop_tracing): Make extern. Handle tracing stops due to GDB
13289 disconnecting.
13290 (cmd_qtdisconnected): New.
13291 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13292 (handle_tracepoint_general_set): Handle QTDisconnected.
13293
13294 * event-loop.c (event_handler_func): Change return type to int.
13295 (process_event): Bail out if the event handler wants the event
13296 loop to stop.
13297 (handle_file_event): Ditto.
13298 (start_event_loop): Bail out if the event handler wants the event
13299 loop to stop.
13300
13301 * nto-low.c (nto_target_ops): Adjust.
13302 * spu-low.c (spu_wait): Don't remove the process here.
13303 (spu_target_ops): Adjust.
13304 * win32-low.c (win32_wait): Don't remove the process here.
13305 (win32_target_ops): Adjust.
13306
5d267c4c
PA
133072010-04-11 Pedro Alves <pedro@codesourcery.com>
13308
13309 * regcache.c (realloc_register_cache): Invalidate inferior's
13310 regcache before recreating it.
13311
623ccd72
PA
133122010-04-09 Pedro Alves <pedro@codesourcery.com>
13313
13314 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13315
219f2f23
PA
133162010-04-09 Stan Shebs <stan@codesourcery.com>
13317 Pedro Alves <pedro@codesourcery.com>
13318
13319 * server.h (LONGEST): New.
13320 (struct thread_info) <while_stepping>: New field.
13321 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13322 Declare.
13323 (initialize_tracepoint, handle_tracepoint_general_set)
13324 (handle_tracepoint_query, tracepoint_finished_step)
13325 (tracepoint_was_hit, release_while_stepping_state_list):
13326 (current_traceframe): Declare.
13327 * server.c (handle_general_set): Handle tracepoint packets.
13328 (read_memory): New.
13329 (write_memory): New.
13330 (handle_search_memory_1): Use read_memory.
13331 (handle_query): Report support for conditional tracepoints, trace
13332 state variables, and tracepoint sources. Handle tracepoint
13333 queries.
13334 (main): Initialize the tracepoints module.
13335 (process_serial_event): Handle traceframe reads/writes.
13336
13337 * linux-low.c (handle_tracepoints): New.
13338 (linux_wait_1): Call it.
13339 (linux_resume_one_lwp): Handle while-stepping.
13340 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13341 (linux_target_ops): Install them.
13342 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13343 New field.
13344 * linux-x86-low.c (x86_supports_tracepoints): New.
13345 (the_low_target). Install it.
13346
13347 * mem-break.h (delete_breakpoint): Declare.
13348 * mem-break.c (delete_breakpoint): Make external.
13349
13350 * target.h (struct target_ops): Add `supports_tracepoints',
13351 `read_pc', and `write_pc' fields.
13352 (target_supports_tracepoints): Define.
13353 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13354 (phex_nz): New.
13355
13356 * regcache.h (struct regcache) <registers_owned>: New field.
13357 (init_register_cache, regcache_cpy): Declare.
13358 (regcache_read_pc, regcache_write_pc): Declare.
13359 (register_cache_size): Declare.
13360 (supply_regblock): Declare.
13361 * regcache.c (init_register_cache): New.
13362 (new_register_cache): Use it.
13363 (regcache_cpy): New.
13364 (register_cache_size): New.
13365 (supply_regblock): New.
13366 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13367
219f2f23
PA
13368 * tracepoint.c: New.
13369
13370 * Makefile.in (OBS): Add tracepoint.o.
13371 (tracepoint.o): New rule.
13372
3a13a53b
L
133732010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13374
13375 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13376 (i386-mmx.o): New.
13377 (i386-mmx.c): Likewise.
13378 (i386-mmx-linux.o): Likewise.
13379 (i386-mmx-linux.c): Likewise.
13380
13381 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13382 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13383 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13384 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13385
13386 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13387 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13388 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13389
1570b33e
L
133902010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13391
13392 * Makefile.in (clean): Updated.
13393 (i386-avx.o): New.
13394 (i386-avx.c): Likewise.
13395 (i386-avx-linux.o): Likewise.
13396 (i386-avx-linux.c): Likewise.
13397 (amd64-avx.o): Likewise.
13398 (amd64-avx.c): Likewise.
13399 (amd64-avx-linux.o): Likewise.
13400 (amd64-avx-linux.c): Likewise.
13401
13402 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13403 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13404 (srv_amd64_regobj): Add amd64-avx.o.
13405 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13406 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13407 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13408 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13409 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13410 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13411 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13412
13413 * i387-fp.c: Include "i386-xstate.h".
13414 (i387_xsave): New.
13415 (i387_cache_to_xsave): Likewise.
13416 (i387_xsave_to_cache): Likewise.
13417 (x86_xcr0): Likewise.
13418
13419 * i387-fp.h (i387_cache_to_xsave): Likewise.
13420 (i387_xsave_to_cache): Likewise.
13421 (x86_xcr0): Likewise.
13422
13423 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13424 * linux-crisv32-low.c (target_regsets): Likewise.
13425 * linux-m68k-low.c (target_regsets): Likewise.
13426 * linux-mips-low.c (target_regsets): Likewise.
13427 * linux-ppc-low.c (target_regsets): Likewise.
13428 * linux-s390-low.c (target_regsets): Likewise.
13429 * linux-sh-low.c (target_regsets): Likewise.
13430 * linux-sparc-low.c (target_regsets): Likewise.
13431 * linux-xtensa-low.c (target_regsets): Likewise.
13432
13433 * linux-low.c: Include <sys/uio.h>.
13434 (regsets_fetch_inferior_registers): Support nt_type.
13435 (regsets_store_inferior_registers): Likewise.
13436 (linux_process_qsupported): New.
13437 (linux_target_ops): Add linux_process_qsupported.
13438
13439 * linux-low.h (regset_info): Add nt_type.
13440 (linux_target_ops): Add process_qsupported.
13441
13442 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13443 and <sys/uio.h>.
13444 (init_registers_i386_avx_linux): New.
13445 (init_registers_amd64_avx_linux): Likewise.
13446 (xmltarget_i386_linux_no_xml): Likewise.
13447 (xmltarget_amd64_linux_no_xml): Likewise.
13448 (PTRACE_GETREGSET): Likewise.
13449 (PTRACE_SETREGSET): Likewise.
13450 (x86_fill_xstateregset): Likewise.
13451 (x86_store_xstateregset): Likewise.
13452 (use_xml): Likewise.
13453 (x86_linux_update_xmltarget): Likewise.
13454 (x86_linux_process_qsupported): Likewise.
13455 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13456 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13457 init_registers_i386_linux here. Call
13458 x86_linux_update_xmltarget.
13459 (the_low_target): Add x86_linux_process_qsupported.
13460
13461 * server.c (handle_query): Call target_process_qsupported.
13462
13463 * target.h (target_ops): Add process_qsupported.
13464 (target_process_qsupported): New.
13465
fc7238bb
PA
134662010-04-03 Pedro Alves <pedro@codesourcery.com>
13467
13468 * inferiors.c (add_thread): Set last_status kind to
13469 TARGET_WAITKIND_IGNORE.
13470 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13471 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13472 (linux_wait_1): Move `thread' local definition to block that uses
13473 it. Don't NULL initialize `event_child'.
13474 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13475 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13476 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13477
bdabb078
PA
134782010-04-01 Pedro Alves <pedro@codesourcery.com>
13479
13480 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13481 an extended waitstatus, or by a watchpoint.
13482 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13483 thread was stepping or has been stopped by a watchpoint.
13484
d3bbe7a0
PA
134852010-04-01 Pedro Alves <pedro@codesourcery.com>
13486
13487 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13488 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13489 of another, then delete the previous, and validate all
13490 breakpoints.
13491 (validate_inserted_breakpoint): New.
13492 (delete_disabled_breakpoints): New.
13493 (validate_breakpoints): New.
13494 (check_mem_read): Validate breakpoints before trusting their
13495 shadow. Delete disabled breakpoints.
13496 (check_mem_write): Validate breakpoints before trusting they
13497 should be inserted. Delete disabled breakpoints.
13498 * mem-break.h (validate_breakpoints):
13499 * server.c (handle_query): Validate breakpoints when we see a
13500 qSymbol query.
13501
8b07ae33
PA
135022010-04-01 Pedro Alves <pedro@codesourcery.com>
13503
13504 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13505 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13506 if we could tell there's a GDB breakpoint at stop_pc.
13507 (need_step_over_p): Don't do a step over if we find a GDB
13508 breakpoint at the resume PC.
13509
13510 * mem-break.c (struct raw_breakpoint): New.
13511 (enum bkpt_type): New type `gdb_breakpoint'.
13512 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13513 fields. New field `raw'.
13514 (find_raw_breakpoint_at): New.
13515 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13516 breakpoint instead.
13517 (set_breakpoint_at): Adjust.
13518 (delete_raw_breakpoint): New.
13519 (release_breakpoint): New.
13520 (delete_breakpoint): Rename to...
13521 (delete_breakpoint_1): ... this. Add proc parameter. Use
13522 release_breakpoint. Return ENOENT.
13523 (delete_breakpoint): Reimplement.
13524 (find_breakpoint_at): Delete.
13525 (find_gdb_breakpoint_at): New.
13526 (delete_breakpoint_at): Delete.
13527 (set_gdb_breakpoint_at): New.
13528 (delete_gdb_breakpoint_at): New.
13529 (gdb_breakpoint_here): New.
13530 (set_reinsert_breakpoint): Use release_breakpoint.
13531 (uninsert_breakpoint): Rename to ...
13532 (uninsert_raw_breakpoint): ... this.
13533 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13534 (reinsert_raw_breakpoint): Change parameter type to
13535 raw_breakpoint.
13536 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13537 instead.
13538 (check_breakpoints): Adjust. Use release_breakpoint.
13539 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13540 (breakpoint_inserted_here): Ditto.
13541 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13542 Don't trust the breakpoint's shadow if it is not inserted.
13543 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13544 (delete_all_breakpoints): Adjust.
13545 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13546 use delete_breakpoint_1.
13547
13548 * mem-break.h (breakpoints_supported): Delete declaration.
13549 (set_gdb_breakpoint_at): Declare.
13550 (gdb_breakpoint_here): Declare.
13551 (delete_breakpoint_at): Delete.
13552 (delete_gdb_breakpoint_at): Declare.
13553
13554 * server.h (struct raw_breakpoint): Forward declare.
13555 (struct process_info): New field `raw_breakpoints'.
13556
13557 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13558 breakpoints.
13559
6bf5e0ba
PA
135602010-03-24 Pedro Alves <pedro@codesourcery.com>
13561
13562 * linux-low.c (status_pending_p_callback): Fix comment.
13563 (linux_wait_for_event_1): Move most of the internal breakpoint
13564 handling from here...
13565 (linux_wait_1): ... to here.
13566 (count_events_callback): New.
13567 (select_singlestep_lwp_callback): New.
13568 (select_event_lwp_callback): New.
13569 (cancel_breakpoints_callback): New.
13570 (select_event_lwp): New.
13571 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13572 priority to all LWPs that have had events that should be reported
13573 to the client. Cancel breakpoints when about to reporting the
13574 event to the client, not while stopping lwps. No longer cancel
13575 finished single-steps here.
13576 (cancel_finished_single_step): Delete.
13577 (cancel_finished_single_steps): Delete.
13578
414a389f
PA
135792010-03-24 Pedro Alves <pedro@codesourcery.com>
13580
13581 * mem-break.c (enum bkpt_type): New.
13582 (struct breakpoint): New field `type'.
13583 (set_breakpoint_at): Change return type to struct breakpoint
13584 pointer. Set type to `other_breakpoint' by default.
13585 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13586 in the breakpoint list.
13587 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13588 (reinsert_breakpoint): Rename to ...
13589 (reinsert_raw_breakpoint): ... this.
13590 (reinsert_breakpoints_at): Adjust.
13591 * mem-break.h (struct breakpoint): Declare.
13592 (set_breakpoint_at): Change return type to struct breakpoint
13593 pointer.
13594
2280c721
PA
135952010-03-24 Pedro Alves <pedro@codesourcery.com>
13596
13597 * server.c (handle_query): Assign, not compare.
13598
d50171e4
PA
135992010-03-24 Pedro Alves <pedro@codesourcery.com>
13600
13601 Teach linux gdbserver to step-over-breakpoints.
13602
13603 * linux-low.c (can_hardware_single_step): New.
13604 (supports_breakpoints): New.
13605 (handle_extended_wait): If stopping threads, read the stop pc of
13606 the new cloned LWP.
13607 (get_pc): New.
13608 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13609 low target doesn't support retrieving the PC.
13610 (add_lwp): Set last_resume_kind to resume_continue.
13611 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13612 (linux_attach): Don't clear stop_expected. Set the lwp's
13613 last_resume_kind to resume_stop.
13614 (linux_detach_one_lwp): Don't check for removed breakpoints.
13615 (check_removed_breakpoint): Delete.
13616 (status_pending_p): Rename to ...
13617 (status_pending_p_callback): ... this. Don't check for removed
13618 breakpoints. Don't consider threads that are stopped from GDB's
13619 perspective.
13620 (linux_wait_for_lwp): Always read the stop_pc here.
13621 (cancel_breakpoint): New.
13622 (step_over_bkpt): New global.
13623 (linux_wait_for_event_1): Implement stepping over breakpoints.
13624 (gdb_wants_lwp_stopped): New.
13625 (gdb_wants_all_stopped): New.
13626 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13627 single-step traps here. Store the thread's last reported target
13628 wait status.
13629 (send_sigstop): Don't clear stop_expected. Always set it,
13630 instead.
13631 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13632 (cancel_finished_single_step): New.
13633 (cancel_finished_single_steps): New.
13634 (wait_for_sigstop): Don't cancel finished single-step traps here.
13635 (linux_resume_one_lwp): Don't check for removed breakpoints.
13636 Don't set `step' on non-hardware step archs.
13637 (linux_set_resume_request): Ignore resume_stop requests if already
13638 stopping or stopped. Set the lwp's last_resume_kind.
13639 (resume_status_pending_p): Don't check for removed breakpoints.
13640 (need_step_over_p): New.
13641 (start_step_over): New.
13642 (finish_step_over): New.
13643 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13644 requests. Clear the thread's last reported target waitstatus.
13645 Don't use the `suspended' flag. Don't consider pending breakpoints.
13646 (linux_resume): Start a step-over if necessary.
13647 (proceed_one_lwp): New.
13648 (proceed_all_lwps): New.
13649 (unstop_all_lwps): New.
13650 * linux-low.h (struct lwp_info): Rewrite comment for the
13651 `suspended' flag. Add the `stop_pc' field. Delete the
13652 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13653 Add `'last_resume_kind' and `need_step_over' fields.
13654 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13655 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13656 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13657 (set_raw_breakpoint_at): New.
13658 (set_breakpoint_at): Rewrite to use it.
13659 (reinsert_breakpoint_handler): Delete.
13660 (set_reinsert_breakpoint): New.
13661 (reinsert_breakpoint_by_bp): Delete.
13662 (delete_reinsert_breakpoints): New.
13663 (uninsert_breakpoint): Rewrite.
13664 (uninsert_breakpoints_at): New.
13665 (reinsert_breakpoint): Rewrite.
13666 (reinsert_breakpoints_at): New.
13667 (check_breakpoints): Rewrite.
13668 (breakpoint_here): New.
13669 (breakpoint_inserted_here): New.
13670 (check_mem_read): Adjust.
13671 * mem-break.h (breakpoints_supported, breakpoint_here)
13672 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13673 (reinsert_breakpoint_by_bp): Delete declaration.
13674 (delete_reinsert_breakpoints): Declare.
13675 (reinsert_breakpoint): Delete declaration.
13676 (reinsert_breakpoints_at): Declare.
13677 (uninsert_breakpoint): Delete declaration.
13678 (uninsert_breakpoints_at): Declare.
13679 (check_breakpoints): Adjust prototype.
13680 * server.h: Adjust include order.
13681 (struct thread_info): Declare here. Add a `last_status' field.
13682
30ba68cb
MS
136832010-03-23 Michael Snyder <msnyder@vmware.com>
13684
13685 * server.c (crc32): New function.
13686 (handle_query): Add handling for 'qCRC:' request.
13687
b9a881c2
PA
136882010-03-23 Pedro Alves <pedro@codesourcery.com>
13689
13690 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13691 lwp had been stopped by a watchpoint.
13692
e92d13d5
PA
136932010-03-16 Pedro Alves <pedro@codesourcery.com>
13694
13695 * server.h (internal_error): Declare.
13696 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13697 * utils.c (internal_error): New function.
13698
64daa791
AS
136992010-03-15 Andreas Schwab <schwab@redhat.com>
13700
13701 * configure.srv: Fix typo setting srv_regobj.
13702
f52cd8cd
PA
137032010-03-15 Pedro Alves <pedro@codesourcery.com>
13704
13705 * linux-low.c (fetch_register): Avoid passing a non string literal
13706 format to `error'.
13707 (usr_store_inferior_registers): Ditto.
13708
93ae6fdc
PA
137092010-03-14 Pedro Alves <pedro@codesourcery.com>
13710
13711 * linux-low.c (linux_write_memory): Bail out early if peeking
13712 memory failed.
13713
c3adc08c
PA
137142010-03-14 Pedro Alves <pedro@codesourcery.com>
13715
13716 * linux-low.h (struct lwp_info): New fields
13717 `stopped_by_watchpoint' and `stopped_data_address'.
13718 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13719 here, and cache them in the lwp object.
13720 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13721 directly.
13722 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13723 field.
13724 (linux_stopped_by_watchpoint): Rewrite.
13725 (linux_stopped_data_address): Rewrite.
13726
bce522a2
PA
137272010-03-06 Simo Melenius <simo.melenius@iki.fi>
13728
13729 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13730 switching the current inferior, not before.
13731
90884b2b
L
137322010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13733
13734 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13735 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13736 i386-linux.c and amd64-linux.c.
13737 (reg-i386.o): Removed.
13738 (reg-i386.c): Likewise.
13739 (reg-i386-linux.o): Likewise.
13740 (reg-i386-linux.c): Likewise.
13741 (reg-x86-64.o): Likewise.
13742 (reg-x86-64.c): Likewise.
13743 (reg-x86-64-linux.o): Likewise.
13744 (reg-x86-64-linux.c): Likewise.
13745 (i386.o): New.
13746 (i386.c): Likewise.
13747 (i386-linux.o): Likewise.
13748 (i386-linux.c): Likewise.
13749 (amd64.o): Likewise.
13750 (amd64.c): Likewise.
13751 (amd64-linux.o): Likewise.
13752 (amd64-linux.c): Likewise.
13753
13754 * configure.srv (srv_i386_regobj): New.
13755 (srv_i386_linux_regobj): Likewise.
13756 (srv_amd64_regobj): Likewise.
13757 (srv_amd64_linux_regobj): Likewise.
13758 (srv_i386_32bit_xmlfiles): Likewise.
13759 (srv_i386_64bit_xmlfiles): Likewise.
13760 (srv_i386_xmlfiles): Likewise.
13761 (srv_amd64_xmlfiles): Likewise.
13762 (srv_i386_linux_xmlfiles): Likewise.
13763 (srv_amd64_linux_xmlfiles): Likewise.
13764 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13765 srv_xmlfiles to $srv_i386_xmlfiles.
13766 (i[34567]86-*-mingw32ce*): Likewise.
13767 (i[34567]86-*-mingw*): Likewise.
13768 (i[34567]86-*-nto*): Likewise.
13769 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13770 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13771 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13772 (x86_64-*-linux*): Likewise.
13773
13774 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13775 (init_registers_amd64_linux): New.
13776 (x86_arch_setup): Replace init_registers_x86_64_linux with
13777 init_registers_amd64_linux.
13778
193f13e6
MK
137792010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13780
13781 * configure.ac: Check for libdl. If it is not available link against
13782 static libthread_db.
13783 * configure: Regenerate.
13784
85d721b8
PA
137852010-02-22 Pedro Alves <pedro@codesourcery.com>
13786
13787 PR9605
13788
13789 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13790 handing a read watchpoint.
13791 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13792
6076632b
DE
137932010-02-12 Doug Evans <dje@google.com>
13794
13795 * linux-low.c (linux_supports_tracefork_flag): Document.
13796 (linux_look_up_symbols): Add comment.
13797
3327ccf7
L
137982010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13799
13800 * regcache.c (supply_register): Clear regcache if buf is NULL.
13801
0718675c 138022010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13803 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13804
13805 * inferiors.c (find_inferior): Add function documentation.
13806 (unloaded_dll): Handle the case where the unloaded dll has not
13807 been previously registered in the dll list.
13808
177321bd
DJ
138092010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13810
13811 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13812 (thumb2_breakpoint): New.
13813 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13814
2b009048
DJ
138152010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13816
13817 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13818 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13819 breakpoints.
13820
3be029c7
PA
138212010-01-21 Pedro Alves <pedro@codesourcery.com>
13822
13823 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13824
18f5de3b
JK
138252010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13826
13827 * linux-s390-low.c (s390_collect_ptrace_register)
13828 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13829
3743bb4f
DE
138302010-01-21 Doug Evans <dje@google.com>
13831
14ce3065
DE
13832 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13833 (PTRACE_ARG4_TYPE): New macro.
13834 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13835 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13836 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13837 (usr_store_inferior_registers): Ditto.
13838 (linux_read_memory, linux_write_memory): Ditto.
13839 (linux_test_for_tracefork): Ditto.
13840
3743bb4f
DE
13841 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13842 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13843
8b315be5
PA
138442010-01-21 Pedro Alves <pedro@codesourcery.com>
13845
13846 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13847 target.
13848
85492558
PA
138492010-01-21 Pedro Alves <pedro@codesourcery.com>
13850
13851 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13852 prototype to take a regcache. Adjust.
13853
442ea881
PA
138542010-01-20 Pedro Alves <pedro@codesourcery.com>
13855
13856 * regcache.h (struct thread_info): Forward declare.
13857 (struct regcache): New.
13858 (new_register_cache): Adjust prototype.
13859 (get_thread_regcache): Declare.
13860 (free_register_cache): Adjust prototype.
13861 (registers_to_string, registers_from_string): Ditto.
13862 (supply_register, supply_register_by_name, collect_register)
13863 (collect_register_as_string, collect_register_by_name): Ditto.
13864 * regcache.c (struct inferior_regcache_data): Delete.
13865 (get_regcache): Rename to ...
13866 (get_thread_regcache): ... this. Adjust. Switch inferior before
13867 fetching registers.
13868 (regcache_invalidate_one): Adjust.
13869 (regcache_invalidate): Fix prototype.
13870 (new_register_cache): Return the new register cache.
13871 (free_register_cache): Change prototype.
13872 (realloc_register_cache): Adjust.
13873 (registers_to_string): Change prototype to take a regcache. Adjust.
13874 (registers_from_string): Ditto.
13875 (register_data): Ditto.
13876 (supply_register): Ditto.
13877 (supply_register_by_name): Ditto.
13878 (collect_register): Ditto.
13879 (collect_register_as_string): Ditto.
13880 (collect_register_by_name): Ditto.
13881 * server.c (process_serial_event): Adjust.
13882 * linux-low.h (regset_fill_func, regset_store_func): Change
13883 prototype.
13884 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13885 Change prototype.
13886 * linux-low.c (get_stop_pc): Adjust.
13887 (check_removed_breakpoint): Adjust.
13888 (linux_wait_for_event): Adjust.
13889 (linux_resume_one_lwp): Adjust.
13890 (fetch_register): Add regcache parameter. Adjust.
13891 (usr_store_inferior_registers): Ditto.
13892 (regsets_fetch_inferior_registers): Ditto.
13893 (regsets_store_inferior_registers): Ditto.
13894 (linux_fetch_registers, linux_store_registers): Ditto.
13895 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13896 regcache. Adjust.
43aaf8b6
PA
13897 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13898 Ditto.
442ea881
PA
13899 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13900 prototype to take a regcache.
13901 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13902 * remote-utils.c (convert_ascii_to_int, outreg)
13903 (prepare_resume_reply): Change prototype to take a regcache.
13904 Adjust.
13905 * target.h (struct target_ops) <fetch_registers, store_registers>:
13906 Change prototype to take a regcache.
13907 (fetch_inferior_registers, store_inferior_registers): Change
13908 prototype to take a regcache. Adjust.
13909 * proc-service.c (ps_lgetregs): Adjust.
13910 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13911 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13912 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13913 take a regcache. Adjust.
13914 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13915 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13916 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13917 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13918 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13919 (cris_cannot_fetch_register):
13920 (cris_breakpoint_at): Change prototype to take a regcache.
13921 Adjust.
13922 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13923 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13924 to take a regcache. Adjust.
13925 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13926 Adjust.
13927 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13928 take a regcache. Adjust.
13929 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13930 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13931 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13932 * linux-mips-low.c (mips_get_pc):
13933 (mips_set_pc): Change prototype to take a regcache. Adjust.
13934 (mips_reinsert_addr): Adjust.
13935 (mips_collect_register): Change prototype to take a regcache.
13936 Adjust.
13937 (mips_supply_register):
13938 (mips_collect_register_32bit, mips_supply_register_32bit)
13939 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13940 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13941 * linux-ppc-low.c (ppc_supply_ptrace_register)
13942 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13943 (parse_spufs_run): Adjust.
13944 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13945 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13946 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13947 take a regcache. Adjust.
13948 * linux-s390-low.c (s390_collect_ptrace_register)
13949 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13950 (s390_set_pc): Change prototype to take a regcache. Adjust.
13951 (s390_arch_setup): Adjust.
13952 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13953 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13954 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13955 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13956 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13957 regcache. Adjust.
13958 (sparc_breakpoint_at): Adjust.
13959 * linux-xtensa-low.c (xtensa_fill_gregset):
13960 (xtensa_store_gregset):
13961 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13962 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13963 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13964 prototype to take a regcache. Adjust.
13965 * win32-arm-low.c (arm_fetch_inferior_register)
13966 (arm_store_inferior_register): Change prototype to take a
13967 regcache. Adjust.
13968 * win32-i386-low.c (i386_fetch_inferior_register)
13969 (i386_store_inferior_register): Change prototype to take a
13970 regcache. Adjust.
13971 * win32-low.c (child_fetch_inferior_registers)
13972 (child_store_inferior_registers): Change prototype to take a
13973 regcache. Adjust.
13974 (win32_wait): Adjust.
13975 (win32_fetch_inferior_registers): Change prototype to take a
13976 regcache. Adjust.
13977 (win32_store_inferior_registers): Adjust.
13978 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13979 store_inferior_register>: Change prototype to take a regcache.
13980
60c3d7b0
DE
139812010-01-20 Doug Evans <dje@google.com>
13982
13983 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13984 #ifdef.
13985 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13986 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13987
dc146f7c
VP
139882010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13989
13990 * linux-low.c (linux_core_of_thread): New.
13991 (compare_ints, show_process, list_threads): New.
13992 (linux_qxfer_osdata): Report threads and cores.
13993 (linux_target_op): Register linux_core_of_thread.
13994 * remote-utils.c (prepare_resume_reply): Report the core.
13995 (buffer_xml_printf): Support %d specifier.
13996 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13997 New.
13998 (handle_query): Handle qXfer:threads. Announce availability
13999 thereof.
14000 * target.h (struct target_ops): New field core_of_thread.
14001
7803799a
UW
140022010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14003
14004 * Makefile.in (clean): Remove new generated files.
14005 (reg-s390.o, reg-s390.c): Remove rules.
14006 (reg-s390x.o, reg-s390x.c): Likewise.
14007 (s390-linux32.o, s390-linux32.c): Add rules.
14008 (s390-linux64.o, s390-linux64.c): Likewise.
14009 (s390x-linux64.o, s390x-linux64.c): Likewise.
14010 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14011 * linux-s390-low.c: Include <elf.h>.
14012 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14013 (init_registers_s390): Remove prototype.
14014 (init_registers_s390x): Likewise.
14015 (init_registers_s390_linux32): Add prototype.
14016 (init_registers_s390_linux64): Likewise.
14017 (init_registers_s390x_linux64): Likewise.
14018 (s390_num_regs_3264): New define.
14019 (s390_regmap_3264): New global variable.
14020 (s390_cannot_fetch_register): Remove obsolete check.
14021 (s390_cannot_store_register): Likewise.
14022 (s390_collect_ptrace_register): Handle upper/lower register halves.
14023 (s390_supply_ptrace_register): Likewise.
14024 (s390_fill_gregset): Update to register number changes.
14025 (s390_get_hwcap): New routine.
14026 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14027 Install appropriate regmap and register set.
14028
6e7ffa39
JB
140292010-01-01 Joel Brobecker <brobecker@adacore.com>
14030
14031 * server.c (gdbserver_version): Update copyright year to 2010.
14032 * gdbreplay.c (gdbreplay_version): Likewise.
14033
957f3f49
DE
140342009-12-28 Doug Evans <dje@google.com>
14035
14036 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14037 elf/external.h. Include <elf.h> instead but only if necessary.
14038
ca5c370d
PA
140392009-12-28 Pedro Alves <pedro@codesourcery.com>
14040
14041 * linux-low.c (linux_remove_process): Remove `detaching'
14042 parameter. Don't release/detach from thread_db here.
14043 (linux_kill): Release/detach from thread_db here, ...
14044 (linux_detach): ... and here, before actually detaching.
14045 (linux_wait_1): ... and here, when a process exits.
14046 * thread-db.c (any_thread_of): New.
14047 (thread_db_free): Switch the current inferior to a thread of the
14048 passed in process.
14049
4ee62156
DE
140502009-12-21 Doug Evans <dje@google.com>
14051
d90e6a88
DE
14052 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14053
c5f62d5f
DE
14054 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14055 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14056 warning ifndef __NR_tkill. Move setting of errno there too.
14057 Delete unnecessary resetting of errno after syscall.
14058 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14059
10e86dd7
DE
14060 * configure.ac: Check for dladdr.
14061 * config.in: Regenerate.
14062 * configure: Regenerate.
14063 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14064 (try_thread_db_load): Update.
14065
4ee62156
DE
14066 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14067
00f515da
DE
140682009-12-18 Doug Evans <dje@google.com>
14069
e9464885
DE
14070 * event-loop.c: Include unistd.h if it exists.
14071
07d4f67e
DE
14072 * linux-low.c (my_waitpid): Move definition away from being in
14073 between linux_tracefork_child/linux_test_for_tracefork.
14074
00f515da
DE
14075 * gdb_proc_service.h (psaddr_t): Fix type.
14076 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14077 signature to match glibc.
14078
1de1badb
DE
140792009-12-16 Doug Evans <dje@google.com>
14080
14081 * linux-low.c (linux_read_memory): Fix argument to read.
14082
aeeb81d1
PA
140832009-11-26 Pedro Alves <pedro@codesourcery.com>
14084
14085 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14086 events, don't leave current_inferior pointing at null.
14087
10357975
PA
140882009-11-26 Pedro Alves <pedro@codesourcery.com>
14089
14090 * win32-low.c (LOG): Delete.
14091 (OUTMSG): Output to stderr.
14092 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14093 on compile time LOG macro.
14094 (win32_wait): Fix debug output.
14095
cf6e3471
PA
140962009-11-26 Pedro Alves <pedro@codesourcery.com>
14097
14098 * win32-low.c (win32_add_one_solib): If the dll name is
14099 "ntdll.dll", prepend the system directory to the dll path.
14100
0c85e18e
MK
141012009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14102
14103 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14104
9ac544ce 141052009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14106 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14107
14108 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14109 * configure.ac: Check for __mcoldfire__ and set
14110 gdb_cv_m68k_is_coldfire.
14111 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14112 reg-cf.o and reg-m68k.o.
14113 * configure: Regenerated.
14114
fd7dd3e6
PA
141152009-11-16 Pedro Alves <pedro@codesourcery.com>
14116
14117 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14118 Pass it to thread_db_free.
14119 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14120 proper `detaching' argument to linux_remove_process.
14121 * linux-low.h (thread_db_free): Add `detaching' parameter.
14122 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14123 to thread_db_free.
14124 (thread_db_free): Add `detaching' parameter. Only
14125 call td_ta_clear_event if detaching from process.
14126
75aa492e
MK
141272009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14128
14129 * thread-db.c (thread_db_free): Fix typo.
14130
21e1bee4
PP
141312009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14132
14133 PR gdb/10838
14134 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14135
8838b45e
NS
141362009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14137
14138 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14139 with an i686 compiler.
14140 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14141 needed.
14142 * configure: Rebuilt.
14143
8a35fb51
SL
141442009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14145
14146 PR gdb/10783
14147
14148 * server.c (handle_search_memory_1): Correct read_addr initialization
14149 in loop for searching subsequent chunks.
14150
96f15937
PP
141512009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14152
14153 * configure.ac: New --with-libthread-db option.
14154 * thread-db.c: Allow direct dependence on libthread_db.
14155 (thread_db_free): Adjust.
14156 * config.in: Regenerate.
14157 * configure: Likewise.
889bf7c5 14158
5f7d1694
PP
141592009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14160
14161 PR gdb/10757
14162 * thread-db.c (attach_thread): New function.
14163 (maybe_attach_thread): Return success/failure.
14164 (find_new_threads_callback): Adjust.
889bf7c5
PA
14165 (thread_db_find_new_threads): Loop until no new threads.
14166
88e3b899
PA
141672009-10-13 Pedro Alves <pedro@codesourcery.com>
14168
14169 * proc-service.c (ps_lgetregs): Formatting.
14170
cdbfd419
PP
141712009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14172
14173 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14174 * configure.ac: Adjust.
14175 * linux-low.h (struct process_info_private): Move members to struct
14176 thread_db.
14177 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14178 * linux-low.c (linux_remove_process): Adjust.
14179 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14180 * server.c (handle_query): Move code ...
14181 (handle_monitor_command): ... here. New function.
14182 * target.h (struct target_ops): New member.
14183 * thread-db.c (struct thread_db): New.
14184 (libthread_db_search_path): New variable.
14185 (thread_db_create_event, thread_db_enable_reporting)
14186 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14187 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14188 (try_thread_db_load_1, dladdr_to_soname): New functions.
14189 (try_thread_db_load, thread_db_load_search): New functions.
14190 (thread_db_init): Search for libthread_db.
14191 (thread_db_free): New function.
14192 (thread_db_handle_monitor_command): Likewise.
14193 * config.in: Regenerate.
14194 * configure: Regenerate.
889bf7c5 14195
4168d2d6
UW
141962009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14197
14198 * spu-low.c (spu_kill): Wait for inferior to terminate.
14199 Call clear_inferiors.
14200 (spu_detach): Call clear_inferiors.
14201
81ecdfbb
RW
142022009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14203
14204 * aclocal.m4: Regenerate.
14205 * config.in: Likewise.
14206 * configure: Likewise.
14207
0b9ff2c0
UW
142082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14209
14210 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14211 (parse_spufs_run): New function.
14212 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14213 (ppc_breakpoint_at): Handle SPU breakpoints.
14214
efcbbd14
UW
142152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14216
14217 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14218 (SPUFS_MAGIC): Define.
14219 (spu_enumerate_spu_ids): New function.
14220 (linux_qxfer_spu): New function.
14221 (linux_target_ops): Install linux_qxfer_spu.
14222
f4d9bade
UW
142232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14224
14225 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14226 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14227 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14228 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14229 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14230 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14231 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14232 (init_registers_powerpc_cell32l): Add prototype.
14233 (init_registers_powerpc_cell64l): Likewise.
14234 (ppc_arch_setup): Detect Cell/B.E. architecture.
14235
96e946ca
RW
142362009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14237
14238 * Makefile.in (datarootdir): New variable.
14239
58d6951d
DJ
142402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14241
14242 * linux-low.c (linux_write_memory): Update debugging output.
14243 * Makefile.in (clean): Add new descriptions.
14244 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14245 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14246 * configure.srv: Add new files for arm*-*-linux*.
14247 * linux-arm-low.c: Add new declarations.
14248 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14249 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14250 (HWCAP_VFPv3D16): New.
14251 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14252 instead of __IWMMXT__.
14253 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14254 (arm_arch_setup): New.
14255 (target_regsets): Remove #ifdef. Add VFP regset.
14256 (the_low_target): Use arm_arch_setup.
14257
12b42a12
DJ
142582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14259
14260 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14261 the main thread again.
14262
ac8c974e
AR
142632009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14264
14265 Adding Neutrino gdbserver.
14266 * configure: Regenerated.
14267 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14268 * configure.srv (i[34567]86-*-nto*): New target.
14269 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14270 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14271 (nto_comctrl) [__QNX__]: New function.
14272 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14273
4424e0c3 142742009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14275
14276 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14277 srv_tgtobj.
14278
912cf4ba
PA
142792009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14280 Pedro Alves <pedro@codesourcery.com>
14281
14282 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14283 don't support CONTEXT_EXTENDED_REGISTERS.
14284 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14285 (the_low_target): Install them.
14286 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14287 failing with ERROR_PIPE_NOT_CONNECTED.
14288
aa5ca48f
DE
142892009-06-30 Doug Evans <dje@google.com>
14290 Pierre Muller <muller@ics.u-strasbg.fr>
14291
14292 Add h/w watchpoint support to x86-linux, win32-i386.
14293 * Makefile.in (SFILES): Add i386-low.c
14294 (i386_low_h): Define.
14295 (i386-low.o): Add dependencies.
14296 (linux-x86-low.o): Add i386-low.h dependency.
14297 (win32-i386-low.o): Ditto.
14298 * i386-low.c: New file.
14299 * i386-low.h: New file.
14300 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14301 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14302 * linux-low.c (linux_add_process): Initialize arch_private.
14303 (linux_remove_process): Free arch_private.
14304 (add_lwp): Initialize arch_private.
14305 (delete_lwp): Free arch_private.
14306 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14307 provided.
14308 * linux-low.h (process_info_private): New member arch_private.
14309 (lwp_info): New member arch_private.
14310 (linux_target_ops): New members new_process, new_thread,
14311 prepare_to_resume.
14312 (ptid_of): New macro.
14313 * linux-x86-low.c: Include stddef.h, i386-low.h.
14314 (arch_process_info): New struct.
14315 (arch_lwp_info): New struct.
14316 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14317 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14318 (i386_dr_low_get_status): New function.
14319 (x86_insert_point, x86_remove_point): New functions.
14320 (x86_stopped_by_watchpoint): New function.
14321 (x86_stopped_data_address): New function.
14322 (x86_linux_new_process, x86_linux_new_thread): New functions.
14323 (x86_linux_prepare_to_resume): New function.
14324 (the_low_target): Add entries for insert_point, remove_point,
14325 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14326 prepare_to_resume.
14327 * server.c (debug_hw_points): New global.
14328 (monitor_show_help): Document set debug-hw-points.
14329 (handle_query): Process "set debug-hw-points".
14330 * server.h (debug_hw_points): Declare.
14331 (paddress): Declare.
14332 * utils.c (NUMCELLS, CELLSIZE): New macros.
14333 (get_sell, xsnprintf, paddress): New functions.
14334 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14335 remove_point, stopped_by_watchpoint, stopped_data_address.
14336 * win32-i386-low.c: Include i386-low.h.
14337 (debug_reg_state): Replaces dr.
14338 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14339 (i386_dr_low_get_status): New function.
14340 (i386_insert_point, i386_remove_point): New functions.
14341 (i386_stopped_by_watchpoint): New function.
14342 (i386_stopped_data_address): New function.
14343 (i386_initial_stuff): Update.
14344 (get_thread_context,set_thread_context,i386_thread_added): Update.
14345 (the_low_target): Add entries for insert_point,
14346 remove_point, stopped_by_watchpoint, stopped_data_address.
14347 * win32-low.c (win32_insert_watchpoint): New function.
14348 (win32_remove_watchpoint): New function.
14349 (win32_stopped_by_watchpoint): New function.
14350 (win32_stopped_data_address): New function.
14351 (win32_target_ops): Add entries for insert_watchpoint,
14352 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14353 * win32-low.h (win32_target_ops): New members insert_point,
14354 remove_point, stopped_by_watchpoint, stopped_data_address.
14355
d993e290
PA
143562009-06-25 Pedro Alves <pedro@codesourcery.com>
14357
14358 * server.c (process_serial_event): Re-return unsupported, not
14359 error, if the type isn't recognized. Re-allow supporting only
14360 insert or remove packets. Also call require_running for
14361 breakpoints. Add missing break statement to default case. Tidy.
14362 * target.h (struct target_ops): Rename insert_watchpoint to
14363 insert_point, and remove_watchpoint to remove_point.
14364
14365 * linux-low.h (struct linux_target_ops): Likewise.
14366 * linux-low.c (linux_insert_watchpoint): Rename to ...
14367 (linux_insert_point): ... this. Adjust.
14368 (linux_remove_watchpoint): Rename to ...
14369 (linux_remove_point): ... this. Adjust.
14370 (linux_target_ops): Adjust.
14371 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14372 (cris_insert_point): ... this.
14373 (cris_remove_watchpoint): Rename to ...
14374 (cris_remove_point): ... this.
14375 (the_low_target): Adjust.
14376
0f54c268
PM
143772009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14378
14379 * server.c (handle_v_kill): Pass signal_pid to
14380 kill_inferior if multi_process is zero.
14381
c6314022
AR
143822009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14383
14384 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14385 * target.h (target_ops): Comment for *_watchpoint to make it clear
14386 the functions can get types '0' and '1'.
14387
4463ce24
AR
143882009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14389
14390 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14391 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14392 * regcache.c (get_regcache): Likewise.
14393 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14394 * win32-low.c (child_fetch_inferior_registers): Remove check for
14395 regno 0.
14396
cf8fd78b
PA
143972009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14398 Pedro Alves <pedro@codesourcery.com>
14399
14400 * target.h (struct target_ops) <supports_multi_process>: New
14401 callback.
14402 (target_supports_multi_process): New.
14403 * server.c (handle_query): Even if GDB reports support, only
14404 enable multi-process if the target also supports it. Report
14405 multi-process support only if the target backend supports it.
14406 * linux-low.c (linux_supports_multi_process): New function.
14407 (linux_target_ops): Install it as target_supports_multi_process
14408 callback.
14409
47c0c975
DE
144102009-05-24 Doug Evans <dje@google.com>
14411
e09875d4
DE
14412 Global renaming of find_thread_pid to find_thread_ptid.
14413 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14414 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14415 All callers updated.
14416
e27d73f6
DE
14417 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14418 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14419 directly.
14420
47c0c975
DE
14421 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14422 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14423 (linux_resume_one_lwp): Ditto.
14424
2acc282a
DE
144252009-05-23 Doug Evans <dje@google.com>
14426
14427 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14428 from struct inferior_list_entry * to struct lwp_info *.
14429 All callers updated.
14430
9f1036c1
DE
144312009-05-13 Doug Evans <dje@google.com>
14432
14433 * linux-x86-low.c: Don't include assert.h.
14434 (x86_siginfo_fixup): Use fatal, not assert.
14435 (x86_arch_setup): Fix comment.
14436
d0722149
DE
144372009-05-12 Doug Evans <dje@google.com>
14438
14439 Biarch support for i386/amd64 gdbserver.
14440 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14441 Add linux-x86-low.c.
14442 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14443 (linux-x86-low.o): Add.
14444 * linux-x86-64-low.c: Delete.
14445 * linux-i386-low.c: Delete.
14446 * linux-x86-low.c: New file.
14447 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14448 linux-x86-low.o.
14449 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14450 linux-x86-low.o.
14451 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14452 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14453 (linux_child_pid_to_exec_file): New function.
14454 (elf_64_header_p, elf_64_file_p): New functions.
14455 (siginfo_fixup): New function.
14456 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14457 give target a chance to convert layout.
14458 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14459 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14460
fdeb2a12
DE
144612009-05-07 Doug Evans <dje@google.com>
14462
14463 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14464 (regsets_store_inferior_registers): Ditto.
14465
a6dbe5df
PA
144662009-05-06 Pedro Alves <pedro@codesourcery.com>
14467
14468 PR server/10048
14469
14470 * linux-low.c (must_set_ptrace_flags): Delete.
14471 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14472 of the global.
14473 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14474 `lwp->must_set_ptrace_flags' instead.
ba42693b 14475 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14476 (linux_wait_1): ... not here.
14477
5091eb23
DE
144782009-04-30 Doug Evans <dje@google.com>
14479
9f767825
DE
14480 * inferiors.c (started_inferior_callback): New function.
14481 (attached_inferior_callback): New function.
14482 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14483 * server.c (print_started_pid, print_attached_pid): New functions.
14484 (detach_or_kill_for_exit): New function.
14485 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14486 * server.h (have_started_inferiors_p): Declare.
14487 (have_attached_inferiors_p): Declare.
14488
5091eb23
DE
14489 * inferiors.c (remove_process): Fix memory leak, free process.
14490 * linux-low.c (linux_remove_process): New function.
14491 (linux_kill): Call it instead of remove_process.
14492 (linux_detach, linux_wait_1): Ditto.
14493
155c8968
PA
144942009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14495
14496 * configure.srv: Add x86 Windows CE target.
14497
7fe519cb
UW
144982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14499
14500 * inferiors.c (get_thread_process): Make global.
14501 * server.h (get_thread_process): Add prototype.
14502 * thread-db.c (find_one_thread): Use get_thread_process
14503 instead of current_process.
14504 (thread_db_get_tls_address): Do not crash if called when
14505 thread layer is not yet initialized.
14506
5472f405
UW
145072009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14508
14509 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14510 * spu-low.c (current_tid): Rename to ...
14511 (current_ptid): ... this.
14512 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14513 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14514 ptid_get_lwp (current_ptid) instead of current_tid.
14515 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14516 instead of current_tid. Use find_process_pid to verify pid
14517 argument is valid. Pass proper argument to remove_process.
14518 (spu_thread_alive): Compare current_ptid instead of current_tid.
14519 (spu_resume): Likewise.
14520
55ac2b99
PA
145212009-04-02 Pedro Alves <pedro@codesourcery.com>
14522
14523 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14524 variable.
14525
95954743
PA
145262009-04-01 Pedro Alves <pedro@codesourcery.com>
14527
14528 Implement the multiprocess extensions, and add linux multiprocess
14529 support.
14530
14531 * server.h (ULONGEST): Declare.
14532 (struct ptid, ptid_t): New.
14533 (minus_one_ptid, null_ptid): Declare.
14534 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14535 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14536 (struct inferior_list_entry): Change `id' type from unsigned from
14537 to ptid_t.
14538 (struct sym_cache, struct breakpoint, struct
14539 process_info_private): Forward declare.
14540 (struct process_info): Declare.
14541 (current_process): Declare.
14542 (all_processes): Declare.
14543 (initialize_inferiors): Declare.
14544 (add_thread): Adjust to use ptid_t.
14545 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14546 (add_process, remove_process, find_thread_pid): Declare.
14547 (find_inferior_id): Adjust to use ptid_t.
14548 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14549 (multi_process): Declare.
14550 (push_event): Adjust to use ptid_t.
14551 (read_ptid, write_ptid): Declare.
14552 (prepare_resume_reply): Adjust to use ptid_t.
14553 (clear_symbol_cache): Declare.
14554 * inferiors.c (all_processes): New.
14555 (null_ptid, minus_one_ptid): New.
14556 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14557 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14558 (add_thread): Change unsigned long to ptid. Remove gdb_id
14559 parameter. Adjust.
14560 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14561 (gdb_id_to_thread): Rename to ...
14562 (find_thread_pid): ... this. Change unsigned long to ptid.
14563 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14564 (loaded_dll, pull_pid_from_list): Adjust.
14565 (add_process, remove_process, find_process_pid)
14566 (get_thread_process, current_process, initialize_inferiors): New.
14567 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14568 (struct target_waitstatus) <related_pid>: Ditto.
14569 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14570 return type to int.
14571 (struct target_ops) <join>: Add `pid' argument.
14572 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14573 (struct target_ops) <wait>: Add `ptid' field. Change return type
14574 to ptid.
14575 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14576 (mywait): Add `ptid' argument. Change return type to ptid_t.
14577 (target_pid_to_str): Declare.
14578 * target.c (set_desired_inferior): Adjust to use ptids.
14579 (mywait): Add new `ptid' argument. Adjust.
14580 (target_pid_to_str): New.
14581 * mem-break.h (free_all_breakpoints): Declare.
14582 * mem-break.c (breakpoints): Delelete.
14583 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14584 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14585 to use per-process breakpoint list.
14586 (free_all_breakpoints): New.
14587 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14588 (symbol_cache, all_symbols_looked_up): Delete.
14589 (hexchars): New.
14590 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14591 read_ptid): New.
14592 (prepare_resume_reply): Change ptid argument's type from unsigned
14593 long to ptid_t. Adjust. Implement W;process and X;process.
14594 (free_sym_cache, clear_symbol_cache): New.
14595 (look_up_one_symbol): Adjust to per-process symbol cache. *
14596 * server.c (cont_thread, general_thread, step_thread): Change type
14597 to ptid_t.
14598 (attached): Delete.
14599 (multi_process): New.
14600 (last_ptid): Change type to ptid_t.
14601 (struct vstop_notif) <ptid>: Change type to ptid_t.
14602 (queue_stop_reply, push_event): Change `ptid' argument's type to
14603 ptid_t.
14604 (discard_queued_stop_replies): Add `pid' argument.
14605 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14606 changes. Don't reference the `attached' global.
14607 (attach_inferior): Adjust to mywait interface changes.
14608 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14609 features. Handle and report "multiprocess+". Handle
14610 "qAttached:PID".
14611 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14612 changes.
14613 (handle_v_kill): New.
14614 (handle_v_stopped): Adjust to use target_pid_to_str.
14615 (handle_v_requests): Allow multiple attaches and runs when
14616 multiprocess extensions are in effect. Handle "vKill".
14617 (myresume): Adjust to use ptids.
14618 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14619 (handle_status): Adjust to discard_queued_stop_replies interface
14620 change.
14621 (first_thread_of, kill_inferior_callback)
14622 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14623 (main): Call initialize_inferiors. Adjust to use ptids, killing
14624 and detaching from all inferiors. Handle multiprocess packet
14625 variants.
14626 * linux-low.h: Include gdb_proc_service.h.
14627 (struct process_info_private): New.
14628 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14629 <lwpid_of>: Use ptid_get_lwp.
14630 (get_lwp_thread): Adjust.
14631 (struct lwp_info): Add `dead' member.
14632 (find_lwp_pid): Declare.
14633 * linux-low.c (thread_db_active): Delete.
14634 (new_inferior): Adjust comment.
14635 (inferior_pid): Delete.
14636 (linux_add_process): New.
14637 (handle_extended_wait): Adjust.
14638 (add_lwp): Change unsigned long to ptid.
14639 (linux_create_inferior): Add process to processes table. Adjust
14640 to use ptids. Don't set new_inferior here.
14641 (linux_attach_lwp): Rename to ...
14642 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14643 it. Adjust to use ptids.
14644 (linux_attach_lwp): New.
14645 (linux_attach): Add process to processes table. Don't set
14646 new_inferior here.
14647 (struct counter): New.
14648 (second_thread_of_pid_p, last_thread_of_process_p): New.
14649 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14650 multiple processes.
14651 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14652 processes. Remove process from process table.
14653 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14654 to multiple processes.
14655 (any_thread_of): New.
14656 (linux_detach): Add `pid' argument, and handle it. Remove process
14657 from processes table.
14658 (linux_join): Add `pid' argument. Handle it.
14659 (linux_thread_alive): Change unsighed long argument to ptid_t.
14660 Consider dead lwps as not being alive.
14661 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14662 threads we're not interested in.
14663 (same_lwp, find_lwp_pid): New.
14664 (linux_wait_for_lwp): Change `pid' argument's type from int to
14665 ptid_t. Adjust.
14666 (linux_wait_for_event): Rename to ...
14667 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14668 from int to ptid_t. Adjust.
14669 (linux_wait_for_event): New.
14670 (linux_wait_1): Add `ptid' argument. Change return type to
14671 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14672 that exit from the process table.
14673 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14674 Adjust.
14675 (mark_lwp_dead): New.
14676 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14677 stopping all threads, mark its main lwp as dead.
14678 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14679 ptids.
14680 (fetch_register, usr_store_inferior_registers)
14681 (regsets_fetch_inferior_registers)
14682 (regsets_store_inferior_registers, linux_read_memory)
14683 (linux_write_memory): Inline `inferior_pid'.
14684 (linux_look_up_symbols): Adjust to use per-process
14685 `thread_db_active'.
14686 (linux_request_interrupt): Adjust to use ptids.
14687 (linux_read_auxv): Inline `inferior_pid'.
14688 (initialize_low): Don't reference thread_db_active.
14689 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14690 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14691 (ps_getpid): Return the pid of the current inferior.
14692 * thread-db.c (proc_handle, thread_agent): Delete.
14693 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14694 per-process data.
14695 (find_one_thread): Change argument type to ptid_t. Adjust to
14696 per-process data.
14697 (maybe_attach_thread): Adjust to per-process data and ptids.
14698 (thread_db_find_new_threads): Ditto.
14699 (thread_db_init): Ditto.
14700 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14701 processes table. Adjust to use ptids.
14702 (spu_kill, spu_detach): Adjust interface. Remove process from
14703 processes table.
14704 (spu_join, spu_thread_alive): Adjust interface.
14705 (spu_wait): Adjust interface. Remove process from processes
14706 table. Adjust to use ptids.
14707 * win32-low.c (current_inferior_tid): Delete.
14708 (current_inferior_ptid): New.
14709 (debug_event_ptid): New.
14710 (thread_rec): Take a ptid. Adjust.
14711 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14712 (child_delete_thread): Ditto.
14713 (do_initial_child_stuff): Add `attached' argument. Add process to
14714 processes table.
14715 (child_fetch_inferior_registers, child_store_inferior_registers):
14716 Adjust.
14717 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14718 (win32_attach): Pass 1 to do_initial_child_stuff.
14719 (win32_kill): Adjust interface. Remove process from processes
14720 table.
14721 (win32_detach): Ditto.
14722 (win32_join): Adjust interface.
14723 (win32_thread_alive): Take a ptid.
14724 (win32_resume): Adjust to use ptids.
14725 (get_child_debug_event): Ditto.
14726 (win32_wait): Adjust interface. Remove exiting process from
14727 processes table.
14728
bd99dc85
PA
147292009-04-01 Pedro Alves <pedro@codesourcery.com>
14730
14731 Non-stop mode support.
14732
14733 * server.h (non_stop): Declare.
14734 (gdb_client_data, handler_func): Declare.
14735 (delete_file_handler, add_file_handler, start_event_loop):
14736 Declare.
14737 (handle_serial_event, handle_target_event, push_event)
14738 (putpkt_notif): Declare.
14739 * target.h (enum resume_kind): New.
14740 (struct thread_resume): Replace `step' field by `kind' field.
14741 (TARGET_WNOHANG): Define.
14742 (struct target_ops) <wait>: Add `options' argument.
14743 <supports_non_stop, async, start_non_stop>: New fields.
14744 (target_supports_non_stop, target_async): New.
14745 (start_non_stop): Declare.
14746 (mywait): Add `options' argument.
14747 * target.c (mywait): Add `options' argument. Print child exit
14748 notifications here.
14749 (start_non_stop): New.
14750 * server.c (non_stop, own_buf, mem_buf): New globals.
14751 (struct vstop_notif): New.
14752 (notif_queue): New global.
14753 (queue_stop_reply, push_event, discard_queued_stop_replies)
14754 (send_next_stop_reply): New.
14755 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14756 interface changes.
14757 (attach_inferior): In non-stop mode, don't wait for the target
14758 here.
14759 (handle_general_set): Handle QNonStop.
14760 (handle_query): When handling qC, return the current general
14761 thread, instead of the first thread of the list.
14762 (handle_query): If the backend supports non-stop mode, include
14763 QNonStop+ in the qSupported query response.
14764 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14765 and non-stop mode.
14766 (handle_v_attach, handle_v_run): Handle non-stop mode.
14767 (handle_v_stopped): New.
14768 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14769 (myresume): Adjust to use resume_kind. Handle non-stop.
14770 (queue_stop_reply_callback): New.
14771 (handle_status): Handle non-stop mode.
14772 (main): Clear non_stop flag on reconnection. Use the event-loop.
14773 Refactor serial protocol handling from here ...
14774 (process_serial_event): ... to this new function. When GDB
14775 selects any thread, select one here. In non-stop mode, wait until
14776 GDB acks all pending events before exiting.
14777 (handle_serial_event, handle_target_event): New.
14778 * remote-utils.c (remote_open): Install remote_desc in the event
14779 loop.
14780 (remote_close): Remove remote_desc from the event loop.
14781 (putpkt_binary): Rename to...
14782 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14783 (putpkt_binary): New as wrapper around putpkt_binary_1.
14784 (putpkt_notif): New.
14785 (prepare_resume_reply): In non-stop mode, don't change the
14786 general_thread.
14787 * event-loop.c: New.
14788 * Makefile.in (OBJ): Add event-loop.o.
14789 (event-loop.o): New rule.
14790
14791 * linux-low.h (pid_of): Moved here.
14792 (lwpid_of): New.
14793 (get_lwp_thread): Use lwpid_of.
14794 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14795 * linux-low.c (pid_of): Delete.
14796 (inferior_pid): Use lwpid_of.
14797 (linux_event_pipe): New.
14798 (target_is_async_p): New.
14799 (delete_lwp): New.
14800 (handle_extended_wait): Use lwpid_of.
14801 (add_lwp): Don't set lwpid field.
14802 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14803 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14804 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14805 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14806 first. Adjust to linux_wait_for_event interface changes. Use
14807 lwpid_of.
14808 (linux_detach): Don't delete the main lwp here.
14809 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14810 (status_pending_p): Don't consider explicitly suspended lwps.
14811 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14812 pointer. Add OPTIONS argument. Change return type to int. Use
14813 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14814 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14815 pointer. Add status pointer argument. Return a pid instead of a
14816 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14817 changes. In non-stop mode, don't switch to a random thread.
14818 (linux_wait): Rename to...
14819 (linux_wait_1): ... this. Add target_options argument, and handle
14820 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14821 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14822 clean exit and signal exit code. Don't stop all threads in
14823 non-stop mode. In all-stop mode, only stop all threads when
14824 reporting a stop to GDB. Handle explicit thread stop requests.
14825 (async_file_flush, async_file_mark): New.
14826 (linux_wait): New.
14827 (send_sigstop): Use lwpid_of.
14828 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14829 interface changes. In non-stop mode, don't switch to a random
14830 thread.
14831 (linux_resume_one_lwp): Use lwpid_of.
14832 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14833 (linux_resume_one_thread): ... this. Handle resume_stop. In
14834 non-stop mode, don't look for pending flag in all threads.
14835 (resume_status_pending_p): Don't consider explicitly suspended
14836 threads.
14837 (my_waitpid): Reimplement. Emulate __WALL.
14838 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14839 Use lwpid_of.
14840 (sigchld_handler, linux_supports_non_stop, linux_async)
14841 (linux_start_non_stop): New.
14842 (linux_target_ops): Register linux_supports_non_stop, linux_async
14843 and linux_start_non_stop.
14844 (initialize_low): Install SIGCHLD handler.
14845 * thread-db.c (thread_db_create_event, find_one_thread)
14846 (thread_db_get_tls_address): Use lwpid_of.
14847 * win32-low.c (win32_detach): Adjust to use resume_kind.
14848 (win32_wait): Add `options' argument.
14849 * spu-low.c (spu_resume): Adjust to use resume_kind.
14850 (spu_wait): Add `options' argument.
14851
5b1c542e
PA
148522009-04-01 Pedro Alves <pedro@codesourcery.com>
14853
14854 Decouple target code from remote protocol.
14855
14856 * target.h (enum target_waitkind): New.
14857 (struct target_waitstatus): New.
14858 (struct target_ops) <wait>: Return an unsigned long. Take a
14859 target_waitstatus pointer instead of a char pointer.
14860 (mywait): Likewise.
14861 * target.c (mywait): Change prototype to return an unsigned long.
14862 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14863 * server.h (thread_from_wait, old_thread_from_wait): Delete
14864 declarations.
14865 (prepare_resume_reply): Change prototype to take a
14866 target_waitstatus.
14867 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14868 (last_status, last_ptid): New.
14869 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14870 pid instead of a signal.
14871 (attach_inferior): Remove "status" and "signal" parameters.
14872 Adjust.
14873 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14874 not as an address.
14875 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14876 (handle_v_requests, myresume): Remove "status" and "signal"
14877 parameters. Adjust.
14878 (handle_status): New.
14879 (main): Delete local `status'. Adjust.
14880 * remote-utils.c: Include target.h.
14881 (prepare_resume_reply): Change prototype to take a
14882 target_waitstatus. Adjust.
14883
14884 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14885 interface.
14886 * spu-low.c (spu_wait): Adjust.
14887 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14888 Delete.
14889 (win32_wait): Adjust.
14890
2bd7c093
PA
148912009-04-01 Pedro Alves <pedro@codesourcery.com>
14892
14893 * target.h (struct thread_resume): Delete leave_stopped member.
14894 (struct target_ops): Add a `n' argument to the `resume' callback.
14895 * server.c (start_inferior): Adjust.
14896 (handle_v_cont, myresume): Adjust.
14897 * linux-low.c (check_removed_breakpoint): Adjust to resume
14898 interface change, and to removed leave_stopped field.
14899 (resume_ptr): Delete.
14900 (struct thread_resume_array): New.
14901 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14902 resume interface change.
14903 (linux_continue_one_thread, linux_queue_one_thread)
14904 (resume_status_pending_p): Check if the resume field is NULL
14905 instead of checking the leave_stopped member.
14906 (linux_resume): Adjust to the target resume interface change.
14907 * spu-low.c (spu_resume): Adjust to the target resume interface
14908 change.
14909 * win32-low.c (win32_detach, win32_resume): Ditto.
14910
c35fafde
PA
149112009-04-01 Pedro Alves <pedro@codesourcery.com>
14912
14913 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14914 flag.
14915 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14916 pending.
14917 (linux_continue_one_thread): Only preserve the stepping flag if
14918 there's a pending breakpoint.
14919
0a59d50b
PA
149202009-03-31 Pedro Alves <pedro@codesourcery.com>
14921
14922 * server.c (main): After the inferior having exited, call
14923 remote_close before exiting gdbserver.
14924
f04c6d38
TJB
149252009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14926
14927 Fix size of FPSCR in Power 7 processors.
14928 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14929 (PPC_FEATURE_HAS_DFP): New #define.
14930 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14931 size of the FPSCR.
14932
78e5cee6
PA
149332009-03-23 Pedro Alves <pedro@codesourcery.com>
14934
14935 * server.c (handle_query) Whitespace and formatting.
14936
1b3f6016
PA
149372009-03-22 Pedro Alves <pedro@codesourcery.com>
14938
14939 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14940 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14941 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14942 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14943 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14944 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14945 Makefile.in, configure.ac: Fix whitespace throughout.
14946 * configure: Regenerate.
14947
a07b2135
PA
149482009-03-22 Pedro Alves <pedro@codesourcery.com>
14949
14950 * inferiors.c (find_inferior): Make it safe for the callback
14951 function to delete the currently iterated inferior.
14952
67cc2626
PA
149532009-03-22 Pedro Alves <pedro@codesourcery.com>
14954
14955 * Makefile.in (linuw_low_h): Move higher.
14956 (thread-db.o): Depend on $(linux_low_h).
14957
54a0b537
PA
149582009-03-17 Pedro Alves <pedro@codesourcery.com>
14959
14960 Rename "process" to "lwp" throughout.
14961
14962 * linux-low.c (all_processes): Rename to...
14963 (all_lwps): ... this.
14964 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14965 (add_process): Rename to ...
14966 (add_lwp): ... this. Adjust.
14967 (linux_create_inferior): Adjust.
14968 (linux_attach_lwp): Adjust.
14969 (linux_attach): Adjust.
14970 (linux_kill_one_process): Rename to ...
14971 (linux_kill_one_lwp): ... this. Adjust.
14972 (linux_kill): Adjust.
14973 (linux_detach_one_process): Rename to ...
14974 (linux_detach_one_lwp): ... this. Adjust.
14975 (linux_detach): Adjust.
14976 (check_removed_breakpoint): Adjust.
14977 (status_pending_p): Adjust.
14978 (linux_wait_for_process): Rename to ...
14979 (linux_wait_for_lwp): ... this. Adjust.
14980 (linux_wait_for_event): Adjust.
14981 (send_sigstop): Adjust.
14982 (wait_for_sigstop): Adjust.
14983 (stop_all_processes): Rename to ...
14984 (stop_all_lwps): ... this.
14985 (linux_resume_one_process): Rename to ...
14986 (linux_resume_one_lwp): ... this. Adjust.
14987 (linux_set_resume_request, linux_continue_one_thread)
14988 (linux_queue_one_thread, resume_status_pending_p)
14989 (usr_store_inferior_registers, regsets_store_inferior_registers)
14990 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14991 Adjust.
14992 * linux-low.h (get_process): Rename to ...
14993 (get_lwp): ... this. Adjust.
14994 (get_thread_process): Rename to ...
14995 (get_thread_lwp): ... this. Adjust.
14996 (get_process_thread): Rename to ...
14997 (get_lwp_thread): ... this. Adjust.
14998 (struct process_info): Rename to ...
14999 (struct lwp_info): ... this.
15000 (all_processes): Rename to ...
15001 (all_lwps): ... this.
15002 * proc-service.c (ps_lgetregs): Adjust.
15003 * thread-db.c (thread_db_create_event, find_one_thread)
15004 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15005
0b16c5cf
PA
150062009-03-14 Pedro Alves <pedro@codesourcery.com>
15007
15008 * server.c (handle_query): Handle "qAttached".
15009
32de4b9d
NS
150102009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15011
15012 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15013 GPLv3, update license URL.
15014
2aecd87f
DE
150152009-03-01 Doug Evans <dje@google.com>
15016
93efd302 15017 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15018 (server_h): Add gdb_signals.h.
15019 (signals.o): Update.
15020 * server.h (target_signal_from_host,target_signal_to_host_p)
15021 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15022
86b1f9c5
PM
150232009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15024
15025 * remote-utils.c (getpkt): Also generate remote-debug
15026 information if noack_mode is set.
15027
4aa995e1
PA
150282009-02-06 Pedro Alves <pedro@codesourcery.com>
15029
15030 * server.c (handle_query): Report qXfer:siginfo:read and
15031 qXfer:siginfo:write as supported and handle them.
15032 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15033 * linux-low.c (linux_xfer_siginfo): New.
15034 (linux_target_ops): Set it.
15035
62709adf
PA
150362009-01-26 Pedro Alves <pedro@codesourcery.com>
15037
15038 * server.c (gdbserver_usage): Mention --remote-debug.
15039 (main): Accept '--remote-debug' switch.
15040
aef93bd7
DE
150412009-01-18 Doug Evans <dje@google.com>
15042
15043 * regcache.c (new_register_cache): No need to check result of xcalloc.
15044 * server.c (handle_search_memory): Back out calls to xmalloc,
15045 result is checked and error is returned to user upon failure.
15046 (handle_query): Ditto. Add more checks for result of malloc.
15047 (handle_v_cont): Check result of malloc, report error back to
15048 user upon failure.
15049 (handle_v_run): Ditto. Call freeargv.
15050 * server.h (freeargv): Declare.
15051 * utils.c (freeargv): New fn.
15052
54363045
DE
150532009-01-15 Doug Evans <dje@google.com>
15054
f626972c
DE
15055 * gdbreplay.c (perror_with_name): Make arg const char *.
15056 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15057 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15058 * utils.c (perror_with_name): Make arg const char *.
54363045 15059
18aae699
PA
150602009-01-14 Pedro Alves <pedro@codesourcery.com>
15061
15062 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15063 when handling a EXIT_PROCESS_DEBUG_EVENT.
15064
ff703abe
JB
150652009-01-06 Joel Brobecker <brobecker@adacore.com>
15066
15067 * gdbreplay.c (gdbreplay_version): Update copyright year.
15068 * server.c (gdbserver_version): Likewise.
15069
f21cc1a2 150702009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15071
15072 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15073 (handle_extended_wait): Improve comment.
0e21c1ec 15074
bca929d3
DE
150752008-12-13 Doug Evans <dje@google.com>
15076
15077 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15078 * server.h (ATTR_MALLOC): New macro.
15079 (xmalloc,xcalloc,xstrdup): Declare.
15080 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15081 * inferiors.c: Ditto.
15082 * linux-low.c: Ditto.
15083 * mem-break.c: Ditto.
15084 * regcache.c: Ditto.
15085 * remote-utils.c: Ditto.
15086 * server.c: Ditto.
15087 * target.c: Ditto.
15088 * win32-low.c: Ditto.
15089
97438e3f
DE
150902008-12-12 Doug Evans <dje@google.com>
15091
896c7fbb
DE
15092 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15093 in debugging printf.
15094
97438e3f
DE
15095 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15096
e3b886f8
DE
150972008-12-09 Doug Evans <dje@google.com>
15098
15099 * linux-low.h (struct process_info): Delete member tid, unused.
15100 * thread-db.c (find_one_thread): Update.
15101 (maybe_attach_thread): Update.
15102
07e059b5
VP
151032008-12-02 Pedro Alves <pedro@codesourcery.com>
15104
889bf7c5
PA
15105 * target.h (struct target_ops): Add qxfer_osdata member.
15106 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15107 and dirent.h.
15108 (linux_qxfer_osdata): New functions.
15109 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15110 callback.
15111 * server.c (handle_query): Handle "qXfer:osdata:read:".
15112 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15113 (buffer_xml_printf): New functions.
15114 * server.h (struct buffer): New.
15115 (buffer_grow_str, buffer_grow_str0): New macros.
15116 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15117 (buffer_xml_printf): Declare.
07e059b5 15118
4cab47ab
DE
151192008-11-24 Doug Evans <dje@google.com>
15120
15121 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15122
f142445f
DJ
151232008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15124
15125 * server.c (handle_v_run): Always use the supplied argument list.
15126
d0107bb6 151272008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15128
d0107bb6
BW
15129 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15130 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15131
2c4ad781
TJB
151322008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15133
15134 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15135 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15136 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15137 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15138 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15139 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15140 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15141 XML target descriptions.
15142 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15143 when inferior is running on an ISA 2.05 or later processor. Add
15144 special case to return offset for full 64-bit slot of FPSCR when
15145 in 32-bits.
15146
dfb64f85
DJ
151472008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15148
15149 * Makefile.in (SFILES, clean): Added sparc64 files.
15150 (reg-sparc64.o, reg-sparc64.c): New.
15151 * configure.srv (sparc*-*-linux*): New configuration.
15152 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15153 syscall arguments for SPARC.
15154 (regsets_store_inferior_registers): Likewise.
15155 * linux-sparc-low.c: New file.
15156
66b6e1dd
DE
151572008-10-21 Doug Evans <dje@google.com>
15158
15159 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15160 (READLINE_DIR,READLINE_DEP): Delete.
15161 (INTERNAL_CFLAGS): Update.
15162 (LINTFLAGS): Update.
15163
9b710a42
PA
151642008-10-10 Pedro Alves <pedro@codesourcery.com>
15165
15166 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15167 whole argv from the last run, not just argv[0].
15168
5822d809
PA
151692008-09-08 Pedro Alves <pedro@codesourcery.com>
15170
15171 * regcache.c (new_register_cache): Return NULL if the register
15172 cache size isn't known yet.
15173 (free_register_cache): Avoid dereferencing a NULL regcache.
15174
74aac56f
DJ
151752008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15176
15177 * configure.srv: Merge MIPS and MIPS64.
15178
400b20f5
MR
151792008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15180
15181 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15182
677c5bb1
LM
151832008-08-18 Luis Machado <luisgpm@br.ibm.com>
15184
15185 * Makefile.in: Add required vsx dependencies.
15186
15187 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15188 Declare init_registers_powerpc_vsx32l.
15189 Declare init_registers_powerpc_vsx64l.
15190 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15191 (ppc_arch_setup): Check for VSX in hwcap.
15192 (ppc_fill_vsxregset): New function.
15193 (ppc_store_vsxregset): New function.
15194 Add new VSX entry in regset_info target_regsets.
15195
15196 * configure.srv: Add new VSX dependencies.
15197
a6f3e723
SL
151982008-08-12 Pedro Alves <pedro@codesourcery.com>
15199
15200 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15201 (remote_open): Set or clear transport_is_reliable.
15202 (putpkt_binary): Don't expect acks in noack mode.
15203 (getpkt): Don't send ack/nac in noack mode.
15204 * server.c (handle_general_set): Handle QStartNoAckMode.
15205 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15206 qSupported.
15207 (main): Reset noack_mode on every connection.
15208 * server.h (noack_mode): Declare.
15209
a417dc56
RW
152102008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15211
15212 * Makefile.in (GDBREPLAY_OBS): New variable.
15213 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15214
3221518c
UW
152152008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15216 Daniel Jacobowitz <dan@codesourcery.com>
15217
15218 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15219 (usr_store_inferior_registers): Likewise.
15220 (regsets_store_inferior_registers): Likewise.
15221
ec56be1b
PA
152222008-07-31 Rolf Jansen <rj@surtec.com>
15223 Pedro Alves <pedro@codesourcery.com>
15224
15225 * configure.ac: Check for memmem declaration.
15226 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15227 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15228 (disable_packet_qfThreadInfo): Unconditionally compile.
15229 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15230 * configure, config.in: Regenerate.
15231
2fe5e3ff
DE
152322008-07-28 Doug Kwan <dougkwan@google.com>
15233
15234 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15235 (linux_write_memory): Remove declaration of errno.
15236
836acd6d
UW
152372008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15238
15239 * linux-low.c (handle_extended_wait): Do not use "status"
15240 variable uninitialized.
15241
aeba519e
PA
152422008-07-07 Pedro Alves <pedro@codesourcery.com>
15243
15244 * server.c (handle_v_attach): Inhibit reporting dll changes.
15245
db42f210
PA
152462008-06-27 Pedro Alves <pedro@codesourcery.com>
15247
15248 * remote-utils.c (prepare_resume_reply): If requested, don't
15249 output "thread:TID" in the T stop reply.
15250
15251 * server.c (disable_packet_vCont, disable_packet_Tthread)
15252 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15253 (handle_query): If requested, disable support for qC, qfThreadInfo
15254 and qsThreadInfo.
15255 (handle_v_requests): If requested, disable support for vCont.
15256 (gdbserver_show_disableable): New.
15257 (main): Handle --disable-packet and --disable-packet=LIST.
15258
15259 * server.h (disable_packet_vCont, disable_packet_Tthread)
15260 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15261
8e4c5421
CD
152622008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15263
15264 * server.c (gdbserver_usage): Mention --version.
15265
6e23a804
DJ
152662008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15267
15268 * Makefile.in (gdbreplay.o): New rule.
15269
90aa6a40
JM
152702008-06-06 Joseph Myers <joseph@codesourcery.com>
15271
15272 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15273 message, not gdbserver.
15274
c16158bc 152752008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15276 Nathan Sidwell <nathan@codesourcery.com>
15277 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15278
15279 * acinclude.m4: Include ../../config/acx.m4.
15280 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15281 * configure, config.in: Regenerate.
15282 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15283 * server.c (gdbserver_version): Print PKGVERSION.
15284 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15285 (main): Adjust gdbserver_usage calls.
15286 * gdbreplay.c (version, host_name): Add declarations.
15287 (gdbreplay_version, gdbreplay_usage): New.
15288 (main): Accept --version and --help options.
15289
aeb75bf5
DJ
152902008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15291
15292 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15293 (arm_breakpoint_at): Handle Thumb.
15294 (the_low_target): Add comment.
15295
76b233dd
UW
152962008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15297
15298 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15299
08388c79
DE
153002008-05-09 Doug Evans <dje@google.com>
15301
a3c83fae
DE
15302 * server.h (decode_search_memory_packet): Declare.
15303 * remote-utils.c (decode_search_memory_packet): New fn.
15304 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15305 (handle_search_memory): New fn.
15306 (handle_query): Process qSearch:memory packets.
15307
bb9c3d36
UW
153082008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15309
15310 * regcache.c (registers_length): Remove.
15311 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15312 full register packet.
15313 * regcache.h (registers_length): Remove prototype.
15314 * server.h (PBUFSIZ): Define to 16384.
15315
7284e1be
UW
153162008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15317
15318 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15319 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15320 powerpc-64l.o, and powerpc-altivec64l.o.
15321 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15322 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15323 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15324 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15325 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15326 to srv_xmlfiles.
15327
15328 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15329 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15330 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15331 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15332 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15333 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15334 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15335 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15336 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15337 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15338 (clean): Update.
15339
15340 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15341 (init_registers_powerpc_32l): ... this new prototype.
15342 (init_registers_powerpc_32): Remove, replace by ...
15343 (init_registers_powerpc_altivec32l): ... this new prototype.
15344 (init_registers_powerpc_e500): Remove, replace by ...
15345 (init_registers_powerpc_e500l): ... this new prototype.
15346 (init_registers_ppc64): Remove, replace by ...
15347 (init_registers_powerpc_64l): ... this new prototype.
15348 (init_registers_powerpc_64): Remove, replace by ...
15349 (init_registers_powerpc_altivec64l): ... this new prototype.
15350 (ppc_num_regs): Set to 73.
15351 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15352 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15353 (ppc_cannot_store_register): Handle orig_r3 and trap.
15354 (ppc_arch_setup): Update init_registers_... calls.
15355 (ppc_fill_gregset): Handle orig_r3 and trap.
15356
15357 * inferiors.c (clear_inferiors): Reset current_inferior.
15358
fdc59709
PB
153592008-04-23 Paolo Bonzini <bonzini@gnu.org>
15360
889bf7c5
PA
15361 * acinclude.m4: Add override.m4.
15362 * configure: Regenerate.
fdc59709 15363
c9b2f845
UW
153642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15365
15366 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15367 initial call to init_register_ppc64.
15368
550512b8
UW
153692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15370
43aaf8b6
PA
15371 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15372 single powerpc*-*-linux* case.
550512b8
UW
15373 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15374
b6430ec3
UW
153752008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15376
15377 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15378 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15379 from reg_xmlfiles.
15380 * linux-ppc-low.c: Include <elf.h>.
15381 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15382 (ppc_hwcap): New global variable.
15383 (ppc_regmap): Remove __SPE__ #ifdef sections.
15384 (ppc_regmap_e500): New global variable.
15385 (ppc_cannot_store_register): Update __SPE__ special case.
15386 (ppc_get_hwcap): New function.
15387 (ppc_arch_setup): Use it to determine whether inferior supports
15388 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15389 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15390 Do not access registers if target does not support AltiVec.
15391 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15392 Do not access registers if target does not support SPE.
15393 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15394
52fa2412
UW
153952008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15396
15397 * linux-low.c (disabled_regsets, num_regsets): New.
15398 (use_regsets_p): Delete.
15399 (linux_wait_for_process): Clear disabled_regsets.
15400 (regsets_fetch_inferior_registers): Check and set it.
15401 (regsets_store_inferior_registers): Likewise.
15402 (linux_fetch_registers, linux_store_registers): Do not use
15403 use_regsets_p.
15404 (initialize_low): Allocate disabled_regsets.
15405
e28b3332
DJ
154062008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15407
15408 * Makefile.in (LIBOBJS): New.
15409 (OBS): Use LIBOBJS.
15410 (memmem.o): New rule.
15411 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15412 * configure: Regenerated.
15413
4536995d
UW
154142008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15415
15416 * server.c (handle_query): Never return "unsupported" for
15417 qXfer:features:read queries.
15418
221c031f
UW
154192008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15420
15421 * server.c (get_features_xml): Fix inverted condition.
15422 (handle_query): Always support qXfer:feature:read.
15423
ccd213ac
DJ
154242008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15425
15426 * server.c (wrapper_argv): New.
15427 (start_inferior): Handle wrapper_argv. If set, expect an extra
15428 trap.
15429 (gdbserver_usage): Document --wrapper.
15430 (main): Parse --wrapper.
15431
6fe305f7
UW
154322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15433
15434 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15435 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15436 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15437 (ppc_set_pc): Likewise.
15438 (ppc_arch_setup): New function.
15439 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15440 of collect_register.
889bf7c5 15441 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15442
5b0a002e
UW
154432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15444
15445 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15446 instead of linux-ppc64-low.o.
15447 * linux-ppc64-low.c: Remove file.
15448 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15449 (linux-ppc64-low.o): Remove rule.
15450
15451 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15452 (init_registers_powerpc_64): Likewise.
15453 (ppc_regmap): Conditionally define depending on __powerpc64__.
15454 (ppc_cannot_store_register): Do not special-case "fpscr" when
15455 compiled on __powerpc64__.
15456 (ppc_collect_ptrace_register): New function.
15457 (ppc_supply_ptrace_register): New function.
15458 (ppc_breakpoint): Change type to "unsigned int".
15459 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15460 (the_low_target): Conditionally provide initializers for the
889bf7c5 15461 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15462 collect_ptrace_register and supply_ptrace_register members.
15463
9b4b61c8
UW
154642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15465
15466 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15467 * server.c (gdbserver_xmltarget): Define.
15468 (get_features_xml): Use it to replace "target.xml" and arch_string.
15469
15470 * configure.srv: Remove srv_xmltarget. Add XML files that were
15471 mentioned there to srv_xmlfiles instead. Remove conditional tests
15472 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15473 srv_xmlfiles and srv_regobj to include all possible choices.
15474 * configure.ac (srv_xmltarget): Remove.
15475 (srv_xmlfiles): Do not add "target.xml".
15476 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15477 checks for supplementary target information.
15478 * configure: Regenerate.
15479 * Makefile.in (XML_TARGET): Remove.
15480 (target.xml): Remove rule.
15481 (clean): Do not clean up target.xml.
15482 (.PRECIOUS): Do not mention target.xml.
15483
15484 * target.h (struct target_ops): Remove arch_string member.
15485 * linux-low.c (linux_arch_string): Remove.
15486 (linux_target_ops): Remove arch_string initializer.
15487 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15488 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15489 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15490 * spu-low.c (spu_arch_string): Remove.
15491 (spu_target_ops): Remove arch_string initializer.
15492 * win32-low.c (win32_arch_string): Remove.
15493 (win32_target_ops): Remove arch_string initializer.
15494 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15495 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15496 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15497
ee1a7ae4
UW
154982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15499
15500 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15501 by collect_ptrace_register and supply_ptrace_register hooks.
15502 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15503 instead of checking for the_low_target.left_pad_xfer.
15504 (usr_store_inferior_registers): Use collect_ptrace_register callback
15505 instead of checking for the_low_target.left_pad_xfer.
15506
15507 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15508 (s390_supply_ptrace_register): Likewise.
15509 (s390_fill_gregset): Call s390_collect_ptrace_register.
15510 (the_low_target): Update.
15511
15512 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15513 (ppc_supply_ptrace_register): Likewise.
15514 (the_low_target): Update.
15515
15516 * linux-i386-low.c (the_low_target): Update.
15517 * linux-x86-64-low.c (the_low_target): Update.
15518
d61ddec4
UW
155192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15520
15521 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15522 reg-s390.o and reg-s390x.o.
15523
15524 * linux-low.c (new_inferior): New global variable.
15525 (linux_create_inferior, linux_attach): Set it.
15526 (linux_wait_for_process): Call the_low_target.arch_setup after the
15527 target has stopped for the first time.
15528 (initialize_low): Do not call the_low_target.arch_setup.
15529
15530 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15531 (s390_set_pc): Likewise.
15532 (s390_arch_setup): New function.
15533 (the_low_target): Use s390_arch_setup as arch_setup routine.
15534
15535 * regcache.c (realloc_register_cache): New function.
15536 (set_register_cache): Call it for each existing regcache.
15537
d05b4ac3
UW
155382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15539
15540 * server.h (init_registers): Remove prototype.
15541
15542 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15543 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15544 instead of init_registers ().
15545 * linux-arm-low.c (init_registers_arm): Add prototype.
15546 (init_registers_arm_with_iwmmxt): Likewise.
15547 (the_low_target): Add initializer for arch_setup field.
15548 * linux-cris-low.c (init_registers_cris): Add prototype.
15549 (the_low_target): Add initializer for arch_setup field.
15550 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15551 (the_low_target): Add initializer for arch_setup field.
15552 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15553 (the_low_target): Add initializer for arch_setup field.
15554 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15555 (the_low_target): Add initializer for arch_setup field.
15556 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15557 (the_low_target): Add initializer for arch_setup field.
15558 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15559 (the_low_target): Add initializer for arch_setup field.
15560 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15561 (init_registers_mips64_linux): Likewise.
15562 (the_low_target): Add initializer for arch_setup field.
15563 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15564 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15565 (the_low_target): Add initializer for arch_setup field.
15566 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15567 (init_registers_powerpc_64): Likewise.
15568 (the_low_target): Add initializer for arch_setup field.
15569 * linux-s390-low.c (init_registers_s390): Add prototype.
15570 (init_registers_s390x): Likewise.
15571 (the_low_target): Add initializer for arch_setup field.
15572 * linux-sh-low.c (init_registers_sh): Add prototype.
15573 (the_low_target): Add initializer for arch_setup field.
15574 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15575 (the_low_target): Add initializer for arch_setup field.
15576 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15577 (the_low_target): Add initializer for arch_setup field.
15578
15579 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15580 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15581 instead of init_registers ().
15582 * win32-arm-low.c (init_registers_arm): Add prototype.
15583 (the_low_target): Add initializer for arch_setup field.
15584 * win32-i386-low.c (init_registers_i386): Add prototype.
15585 (the_low_target): Add initializer for arch_setup field.
15586
15587 * spu-low.c (init_registers_spu): Add prototype.
15588 (initialize_low): Call initialie_registers_spu () instead of
15589 initialize_registers ().
15590
fd96d250
PA
155912008-02-19 Pedro Alves <pedro@codesourcery.com>
15592
15593 * server.c (handle_v_requests): When handling the vRun and vAttach
15594 packets, if already debugging a process, don't kill it. Return an
15595 error instead.
15596
d41b6bb4
DJ
155972008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15598
15599 * server.c (handle_query): Correct length check.
15600
5ac588cf
PA
156012008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15602
15603 * win32-low.c (do_initial_child_stuff): Add process handle
15604 parameter. Set current_process_handle and current_process_id from the
15605 parameters. Clear globals.
15606 (win32_create_inferior): Don't set current_process_handle and
15607 current_process_id here. Instead pass them on the call to
15608 do_initial_child_stuff.
15609 (win32_attach): Likewise.
15610 (win32_clear_inferiors): New.
15611 (win32_kill): Don't close the current process handle or the
15612 current thread handle here. Instead call win32_clear_inferiors.
15613 (win32_detach): Don't open a new handle to the process. Call
15614 win32_clear_inferiors.
15615 (win32_join): Don't rely on current_process_handle; open a new
15616 handle using the process id.
15617 (win32_wait): Call win32_clear_inferiors when the inferior process
15618 has exited.
15619
ecd7ecbc
DJ
156202008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15621
15622 * server.c (monitor_show_help): Add "exit".
15623
1525d545
MG
156242008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15625
ecd7ecbc 15626 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15627 (clean): Add reg-xtensa.c.
15628 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15629 * configure.srv (xtensa*-*-linux*) New target.
15630 * linux-xtensa-low.c: New.
15631 * xtensa-xtregs.c: New.
1525d545 15632
59a016f0
PA
156332008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15634
15635 * hostio.c: Don't include errno.h.
15636 (errno_to_fileio_errno): Move to hostio-errno.
15637 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15638 error number outputting to the target->hostio_last_error callback.
15639 (hostio_packet_error): Use FILEIO_EINVAL directly.
15640 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15641 calls to hostio_error.
15642 * hostio-errno.c: New.
15643 * server.h (hostio_last_error_from_errno): Declare.
15644 * target.h (target_ops): Add hostio_last_error member.
15645 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15646 as hostio_last_error handler.
889bf7c5 15647 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15648 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15649 (wince_hostio_last_error): New functions.
15650 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15651 as hostio_last_error handler.
15652 (win32_target_ops) [!_WIN32_WCE]: Register
15653 hostio_last_error_from_errno as hostio_last_error handler.
15654 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15655 (hostio-errno.o): New rule.
15656 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15657 * configure.srv (srv_hostio_err_objs): New variable. Default to
15658 hostio-errno.o.
15659 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15660 * configure: Regenerate.
15661
2d717e4f
DJ
156622008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15663
15664 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15665 (linux_kill, linux_detach): Clean up the process list.
15666 * remote-utils.c (remote_open): Improve port number parsing.
15667 (putpkt_binary, input_interrupt): Only send interrupts if the target
15668 is running.
15669 * server.c (extended_protocol): Make static.
15670 (attached): Define earlier.
15671 (exit_requested, response_needed, program_argv): New variables.
15672 (target_running): New.
15673 (start_inferior): Clear attached here.
15674 (attach_inferior): Set attached here.
15675 (require_running): Define.
15676 (handle_query): Use require_running and target_running. Implement
15677 "monitor exit".
15678 (handle_v_attach, handle_v_run): New.
15679 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15680 (gdbserver_usage): Update.
15681 (main): Redo argument parsing. Handle --debug and --multi. Handle
15682 --attach along with other options or after the port. Save
15683 program_argv. Support no initial program. Resynchronize
15684 communication with GDB after an error. Handle "monitor exit".
15685 Use require_running and target_running. Always allow the extended
15686 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15687 restart in extended mode.
15688 * README: Refer to the GDB manual. Update --attach usage.
15689
7407e2de
AS
156902007-12-20 Andreas Schwab <schwab@suse.de>
15691
15692 * linux-low.c (STACK_SIZE): Define.
15693 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15694 (linux_test_for_tracefork): Likewise.
15695
b65d95c5
DJ
156962007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15697
15698 * linux-low.c (linux_wait_for_event): Update messages. Do not
15699 reinsert auto-delete breakpoints.
15700 * mem-break.c (struct breakpoint): Change return type of handler to
15701 int.
15702 (set_breakpoint_at): Update handler type.
15703 (reinsert_breakpoint_handler): Return 1 instead of calling
15704 delete_breakpoint.
15705 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15706 setting a new one.
15707 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15708 * mem-break.h (set_breakpoint_at): Update handler type.
15709 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15710 * win32-low.c (auto_delete_breakpoint): New.
15711 (get_child_debug_event): Use it.
15712
4e799345
DJ
157132007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15714
15715 * configure.ac: Check for pread and pwrite.
15716 * hostio.c (handle_pread): Fall back to lseek and read.
15717 (handle_pwrite): Fall back to lseek and write.
15718 * config.in, configure: Regenerated.
15719
27524b67
DJ
157202007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15721
15722 * server.c (myresume): Add own_buf argument.
15723 (main): Update calls.
15724
a20d5e98
DJ
157252007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15726
15727 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15728 * remote-utils.c (remote_open): Do not call disable_async_io.
15729 (block_async_io): Delete.
15730 (unblock_async_io): Make static.
15731 (initialize_async_io): New.
15732 * server.c (handle_v_cont): Handle async I/O here.
15733 (myresume): Likewise. Move other common resume tasks here...
15734 (main): ... from here. Call initialize_async_io. Disable async
15735 I/O before the main loop.
15736 * server.h (initialize_async_io): Declare.
15737 (block_async_io, unblock_async_io): Delete prototypes.
15738 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15739
b79d787e
DJ
157402007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15741
15742 * remote-utils.c (readchar): Allow binary data in received messages.
15743
d97903b2
PA
157442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15745
15746 * win32-low.c (attaching): New global.
15747 (win32_create_inferior): Clear the `attaching' global.
15748 (win32_attach): Set the `attaching' global.
15749 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15750 attaching. Only set a breakpoint at the entry point if not
15751 attaching.
15752
311de423
PA
157532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15754
15755 * server.c (main): Don't report dll events on the initial
15756 connection on attaches.
15757
6c2d16d2
PA
157582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15759
15760 * server.c (main): Relax numerical bases supported for the pid of
15761 the --attach command line argument.
15762
5ca906e6
PA
157632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15764
15765 * win32-low.c (win32_attach): Call OpenProcess before
15766 DebugActiveProcess, not after. Add last error output to error
15767 call.
15768
9c6c8194
PA
157692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15770
15771 * win32-low.c (win32_get_thread_context)
15772 (win32_set_thread_context): New functions.
15773 (thread_rec): Use win32_get_thread_context.
15774 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15775 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15776 field.
15777
4d5d1aaa
PA
157782007-12-03 Leo Zayas
15779 Pedro Alves <pedro_alves@portugalmail.pt>
15780
15781 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15782 global variables.
15783 (child_add_thread): Minor cleanup.
15784 (child_continue): Resume artificially suspended threads before
15785 calling ContinueDebugEvent.
15786 (suspend_one_thread): New.
15787 (fake_breakpoint_event): New.
15788 (get_child_debug_event): Change return type to int. Check here if
15789 gdb sent an interrupt request. If a soft interrupt was requested,
15790 fake a breakpoint event. Return 0 if there is no event to handle,
15791 and 1 otherwise.
15792 (win32_wait): Don't check here if gdb sent an interrupt request.
15793 Ensure there is a valid event to handle.
15794 (win32_request_interrupt): Add soft interruption method as last
15795 resort.
15796
c436e841
PA
157972007-12-03 Leo Zayas
15798 Pedro Alves <pedro_alves@portugalmail.pt>
15799
15800 * win32-low.h (win32_thread_info): Add descriptions to the
15801 structure members. Replace `suspend_count' counter by a
15802 `suspended' flag.
15803 * win32-low.c (thread_rec): Update condition of when to get the
15804 context from the inferior. Rely on ContextFlags being set if it
15805 has already been retrieved. Only suspend the inferior thread if
15806 we haven't already. Warn if that fails.
15807 (continue_one_thread): s/suspend_count/suspended/. Only call
15808 ResumeThread once. Warn if that fails.
15809
e7b5fa67
PA
158102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15811
15812 * win32-low.c (win32_wait): Don't read from the inferior when it
15813 has already exited.
15814
a385171d
PA
158152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15816
15817 * Makefile.in (win32_low_h): New variable.
15818 (win32-low.o): Add dependency on $(win32_low_h).
15819 (win32-arm-low.o, win32-i386-low.o): New rules.
15820
f80c84b3
DJ
158212007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15822
15823 * hostio.c: Correct copyright year.
15824
a6b151f1
DJ
158252007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15826
15827 * Makefile.in (OBS): Add hostio.o.
15828 (hostio.o): New rule.
15829 * server.h (handle_vFile): Declare.
15830 * hostio.c: New file.
15831 * server.c (handle_v_requests): Take packet_len and new_packet_len
15832 for binary packets. Call handle_vFile.
15833 (main): Update call to handle_v_requests.
15834
f9387fc3
DJ
158352007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15836
15837 * linux-low.c: Include <sched.h>.
15838
51c2684e
DJ
158392007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15840
15841 * linux-low.c (linux_tracefork_grandchild): New.
15842 (linux_tracefork_child): Use clone.
15843 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15844
75f83163
JB
158452007-10-31 Joel Brobecker <brobecker@adacore.com>
15846
15847 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15848
da5898ce
DJ
158492007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15850
15851 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15852
24a09b5f
DJ
158532007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15854
15855 * inferiors.c (change_inferior_id): Delete.
15856 (add_pid_to_list, pull_pid_from_list): New.
15857 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15858 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15859 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15860 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15861 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15862 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15863 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15864 (using_threads): Always set to 1.
15865 (handle_extended_wait): New.
15866 (add_process): Do not set TID.
15867 (linux_create_inferior): Set must_set_ptrace_flags.
15868 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15869 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15870 (linux_thread_alive): Rename TID argument to LWPID.
15871 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15872 (linux_wait_for_event): Do not use TID or check using_threads. Update
15873 call to dead_thread_notify. Call handle_extended_wait.
15874 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15875 (send_sigstop): Delete sigstop_sent.
15876 (wait_for_sigstop): Avoid TID.
15877 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15878 (linux_test_for_tracefork): New.
15879 (linux_lookup_signals): Use thread_db_active and
15880 linux_supports_tracefork_flag.
15881 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15882 * linux-low.h (get_process_thread): Avoid TID.
15883 (struct process_ifo): Move thread_known and tid to the end. Remove
15884 sigstop_sent.
15885 (linux_attach_lwp, thread_db_init): Update prototypes.
15886 * server.h (change_inferior_id): Delete prototype.
15887 (add_pid_to_list, pull_pid_from_list): New prototypes.
15888 * thread-db.c (thread_db_use_events): New.
15889 (find_first_thread): Rename to...
15890 (find_one_thread): ...this. Update callers and messages. Do not
15891 call fatal. Check thread_db_use_events. Do not call
15892 change_inferior_id or new_thread_notify.
15893 (maybe_attach_thread): Update. Do not call new_thread_notify.
15894 (thread_db_init): Set thread_db_use_events. Check use_events.
15895 * utils.c (fatal, warning): Correct message prefix.
15896
30ed0a8f
DJ
158972007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15898
15899 * Makefile.in (clean): Remove new files.
15900 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15901 (powerpc-64.o, powerpc-64.c): New rules.
15902 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15903 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15904 with SPE.
15905 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15906 SPE targets.
15907 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15908 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15909 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15910 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15911 (target_regsets): Add AltiVec and SPE register sets.
15912 * configure.ac: Check for AltiVec and SPE.
15913 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15914 (ppc_fill_vrregset, ppc_store_vrregset): New.
15915 (target_regsets): Add AltiVec register set.
15916 * configure: Regenerated.
15917
fd462a61
DJ
159182007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15919
15920 * linux-low.c (O_LARGEFILE): Define.
15921 (linux_read_memory): Use /proc/PID/mem.
15922 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15923 * configure, config.in: Regenerated.
15924
69f223ed
DJ
159252007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15926
15927 * linux-low.c (linux_wait_for_event): Do not pass signals while
15928 single-stepping.
15929
aec18585
PA
159302007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15931
15932 * win32-low.c (create_process): New.
15933 (win32_create_inferior): Use create_process instead of
15934 CreateProcess. If create_process failed retry appending an ".exe"
15935 suffix. Store the GetLastError result immediatelly after
15936 create_process calls and use it on the call to error.
15937
34d86ddd
PA
159382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15939
15940 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15941
5a0e3bd0
JB
159422007-08-23 Joel Brobecker <brobecker@adacore.com>
15943
15944 * configure.ac: Switch license to GPLv3.
15945
f88c79e6
MS
159462007-08-01 Michael Snyder <msnyder@access-company.com>
15947
15948 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15949
6b3d9b83
PA
159502007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15951
15952 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15953 typedef.
15954 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15955 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15956 CloseToolhelp32Snapshot.
15957 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15958 CloseToolhelp32Snapshot.
15959
c588c53c
MS
159602007-07-27 Michael Snyder <michael.snyder@access-company.com>
15961
15962 * server.c (main): Check for inferior exit before main loop.
15963
aa0403d9
PA
159642007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15965
15966 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15967 instead of on tmp_desc.
15968
255e7678
DJ
159692007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15970 Daniel Jacobowitz <dan@codesourcery.com>
15971
15972 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15973 (add_thread): Minor cleanups.
15974 (clear_inferiors): Move lower in the file. Clear the DLL
15975 list.
15976 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15977 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15978 (xml_escape_text): New.
15979 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15980 for qSupported.
15981 (handle_v_cont): Report errors.
15982 (gdbserver_version): Update.
15983 (main): Correct size of own_buf. Do not report initial DLL events.
15984 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15985 (unloaded_dll, xml_escape_text): New.
15986 * win32-low.c (enum target_waitkind): Update comments.
15987 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15988 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15989 (win32_EnumProcessModules, win32_GetModuleInformation)
15990 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15991 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15992 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15993 (win32_Module32First, win32_Module32Next, load_toolhelp)
15994 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15995 (get_child_debug_event): Handle DLL events.
15996 (win32_wait): Likewise.
15997
0d37add9
DJ
159982007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15999
16000 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16001 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16002
45e2715e
PA
160032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16004
16005 * win32-low.c (handle_output_debug_string): Ignore event if not
16006 waiting.
16007
c5674cf1
PA
160082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16009
16010 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16011
2bbe3cc1
DJ
160122007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16013
16014 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16015
ae13219e
DJ
160162007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16017
16018 * inferiors.c (change_inferior_id): Add comment.
16019 * linux-low.c (check_removed_breakpoint): Add an early
16020 prototype. Improve debug output.
16021 (linux_attach): Doc update.
16022 (linux_detach_one_process, linux_detach): Clean up before releasing
16023 each process.
16024 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16025 * linux-low.h (struct process_info): Doc improvement.
16026 * mem-break.c (delete_all_breakpoints): New.
16027 * mem-break.h (delete_all_breakpoints): New prototype.
16028 * thread-db.c (find_first_thread): New.
16029 (thread_db_create_event): Call it instead of
16030 thread_db_find_new_threads. Clean up unused variables.
16031 (maybe_attach_thread): Remove first thread handling.
16032 (thread_db_find_new_threads): Use find_first_thread.
16033 (thread_db_get_tls_address): Likewise.
16034
4105de34
DJ
160352007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16036
16037 * thread-db.c (thread_db_find_new_threads): Add prototype.
16038 (thread_db_create_event): Check for the main thread before adding
16039 a new thread.
16040 (maybe_attach_thread): Only enable event reporting if TID == 0.
16041 (thread_db_get_tls_address): Check for new threads.
16042
2b876972
DJ
160432007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16044
16045 * linux-low.c (linux_create_inferior): Try execv before execvp.
16046 * spu-low.c (spu_create_inferior): Likewise.
16047
7a245884
DJ
160482007-06-13 Mike Frysinger <vapier@gentoo.org>
16049
16050 * linux-low.c (linux_create_inferior): Change execv to execvp.
16051 * spu-low.c (spu_create_inferior): Likewies.
16052
117ce543
DJ
160532007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16054
16055 * Makefile.in (clean): Clean new files instead of deleted ones.
16056 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16057 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16058 rules.
16059 * configure.srv: Specify XML files and new regformats for MIPS and
16060 MIPS64 GNU/Linux.
16061 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16062 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16063 an entry for the restart register.
16064 (mips_cannot_fetch_register, mips_cannot_store_register)
16065 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16066 register names to match the XML descriptions.
16067 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16068 restart register instead of $0.
16069
0e7f50da
UW
160702007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16071 Markus Deuling <deuling@de.ibm.com>
16072
16073 * remote-utils.c (decode_xfer_write): New function.
16074 * server.h (decode_xfer_write): Add prototype.
16075 * server.c (handle_query): Add PACKET_LEN argument. Support
16076 qXfer:spu:read and qXfer:spu:write packets.
16077 (main): Pass packet_len to handle_query.
16078 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16079 * target.h (target_ops): Add qxfer_spu.
16080
374c1d38
UW
160812007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16082
16083 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16084 accessing non-seekable spufs files.
16085
bb63802a
UW
160862007-05-16 Markus Deuling <deuling@de.ibm.com>
16087
889bf7c5 16088 * server.c (handle_query): Add reply for qC packet.
bb63802a 16089
7390519e
PA
160902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16091 Leo Zayas <lerele@champenstudios@com>
16092
16093 * server.h (check_remote_input_interrupt_request): New function.
16094 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16095 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16096 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16097 (check_remote_input_interrupt_request): New function.
16098 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16099 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16100 winapi_GenerateConsoleCtrlEvent): New typedefs.
16101 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16102 to 250 ms.
16103 (win32_wait): Check for remote interrupt request
16104 with check_remote_input_interrupt_request.
16105 (win32_request_interrupt): New function.
16106 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16107
34b34921
PA
161082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16109
16110 * win32-low.c (debug_registers_changed,
16111 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16112 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16113 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16114 (thread_rec): Get context using the low target.
16115 (child_add_thread): Call thread_added on the low target,
16116 which does the same thing.
16117 (regptr): Delete.
16118 (do_initial_child_stuff): Remove debug registers references.
16119 Set context using the low target. Resume threads after
16120 setting the contexts.
16121 (child_continue): Remove dead variable. Remove debug
16122 registers references.
16123 (child_fetch_inferior_registers): Go through the low target.
16124 (do_child_store_inferior_registers): Remove.
16125 (child_store_inferior_registers): Go through the low target.
16126 (win32_resume): Remove debug registers references.
16127 Set context using the low target.
16128 (handle_exception): Change return type to void. Don't record
16129 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16130 first chance exception.
889bf7c5 16131 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16132 goto loop. Always return after waiting for debug event.
16133 (win32_wait): Convert to switch statement. Handle spurious
16134 events.
16135
16136 * win32-i386-low.c (debug_registers_changed,
16137 debug_registers_used): New.
16138 (initial_stuff): Rename to ...
16139 (i386_initial_stuff): ... this. Clear debug registers
16140 state variables.
16141 (store_debug_registers): Delete.
16142 (i386_get_thread_context): New.
16143 (load_debug_registers): Delete.
16144 (i386_set_thread_context): New.
16145 (i386_thread_added): New.
16146 (single_step): Rename to ...
16147 (i386_single_step): ... this.
16148 (do_fetch_inferior_registers): Rename to ...
16149 (i386_fetch_inferior_register): ... this.
16150 (i386_store_inferior_register): New.
16151 (the_low_target): Adapt to new interface.
16152
16153 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16154 (arm_get_thread_context): New.
16155 (arm_set_thread_context): New.
16156 (regptr): New.
16157 (do_fetch_inferior_registers): Rename to ...
16158 (arm_fetch_inferior_register): ... this.
16159 (arm_store_inferior_register): New.
16160 (arm_wince_breakpoint): Reimplement as unsigned long.
16161 (arm_wince_breakpoint_len): Define.
16162 (the_low_target): Adapt to new interface.
16163
16164 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16165 load_debug_registers. Add get_thread_context, set_thread_context,
16166 thread_added and store_inferior_register. Rename
16167 fetch_inferior_registers to fetch_inferior_register.
16168 (regptr): Remove declaration.
16169
dd6953e1
PA
161702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16171
16172 * linux-low.c (linux_detach): Change return type to int. Return 0.
16173 * spu-low.c (spu_detach): Likewise.
16174
444d6139
PA
161752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16176
16177 * target.h (target_ops): Change return type of detach to int.
16178 Add join.
16179 (join_inferior): New.
16180 * server.c (main): Don't skip detach support on mingw32.
16181 If the inferior doesn't support detaching return error.
16182 Call join_inferior instead of using waitpid.
16183 * linux-low.c (linux_join): New.
16184 (linux_target_op): Add linux_join.
16185 * spu-low.c (spu_join): New.
16186 (spu_target_ops): Add spu_join.
16187 * win32-low.c (win32_detach): Adapt to new interface.
16188 Reopen current_process_handle before detaching. Issue a child
16189 resume before detaching.
16190 (win32_join): New.
16191 (win32_target_op): Add win32_join.
16192
1d5315fe
PA
161932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16194
16195 * win32-low.c (win32-attach): Fix return value.
16196 * target.h (target_ops): Describe ATTACH return values.
16197
bf914831
PA
161982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16199
16200 * win32-low.c (GETPROCADDRESS): Define.
16201 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16202 (winapi_DebugSetProcessKillOnExit): Likewise.
16203 (win32_create_inferior): Force usage of ansi CreateProcessA.
16204 (win32_attach): Use GETPROCADDRESS.
16205 (win32_detach): Likewise.
16206
f72f3e60
PA
162072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16208
16209 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16210
ed50f18f
PA
162112007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16212
16213 * win32-low.c: Commit leftover changes from 2007-03-29.
16214
0c2ead7e
DJ
162152007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16216
16217 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16218 fields short instead of int. Add explicit padding.
16219 (i387_cache_to_fsave): Remove unnecessary casts.
16220 (i387_fsave_to_cache): Doc fix.
16221 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16222
73725ff3
DJ
162232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16226 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16227
d99f33d8
PA
162282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16229
16230 * configure.srv (arm*-*-mingw32ce*): Move near the other
16231 arm targets.
16232
68070c10
PA
162332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16234
2482afc6 16235 * configure.ac: Add errno checking.
68070c10
PA
16236 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16237 sys/file.h and malloc.h.
16238 (AC_CHECK_DECLS): Add perror.
16239 (srv_mingwce): Handle.
2482afc6 16240 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16241 win32-i386-low.o to srv_tgtobj.
16242 (i[34567]86-*-mingw*): Likewise.
16243 (arm*-*-mingw32ce*): Add case.
16244 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16245 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16246 [__MINGW32CE__] (strerror): New function.
16247 [__MINGW32CE__] (errno): Define to GetLastError.
16248 [__MINGW32CE__] (COUNTOF): New macro.
16249 (remote_open): Remove extra close call.
16250 * mem-break.c (delete_breakpoint_at): New function.
16251 * mem-break.h (delete_breakpoint_at): Declare.
16252 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16253 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16254 [USE_WIN32API] (read, write): Add char* casts.
16255 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16256 * server.h: Include wincecompat.h on Windows CE.
16257 [HAVE_ERRNO_H]: Check.
16258 (perror): Declare if not declared.
16259 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16260 (perror_with_name): Remove errno declaration.
16261 * wincecompat.h: New.
16262 * wincecompat.c: New.
16263 * win32-low.h: New.
16264 * win32-arm-low.c: New.
16265 * win32-i386-low.c: New.
16266 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16267 (OUTMSG2): Make it safe.
16268 (_T): New macro.
16269 (COUNTOF): New macro.
16270 (NUM_REGS): Get it from the low target.
16271 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16272 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16273 (thread_rec): Let low target handle debug registers.
16274 (child_add_thread): Likewise.
16275 (child_init_thread_list): Likewise.
16276 (continue_one_thread): Likewise.
16277 (regptr): New.
16278 (do_child_fetch_inferior_registers): Move to ...
16279 * win32-i386-low.c: ... here, and rename to ...
16280 (do_fetch_inferior_registers): ... this.
889bf7c5 16281 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16282 Go through the low target.
16283 (do_child_store_inferior_registers): Use regptr.
16284 (strwinerror): New function.
16285 (win32_create_inferior): Handle Windows CE.
16286 Use strwinerror instead of strerror on Windows error
16287 codes. Add program to the error output.
16288 Don't close the main thread handle on Windows CE.
16289 (win32_attach): Use coredll.dll on Windows CE.
16290 (win32_kill): Close current process and current
16291 thread handles.
16292 (win32_detach): Use coredll.dll on Windows CE.
16293 (win32_resume): Let low target handle debug registers, and
16294 step request.
16295 (handle_exception): Add/Remove initial breakpoint. Avoid
16296 non-existant WSTOPSIG on Windows CE.
16297 (win32_read_inferior_memory): Cast to remove warning.
16298 (win32_arch_string): Go through the low target.
16299 (initialize_low): Call set_breakpoint_data with the low
16300 target's breakpoint.
16301 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16302 FOP_REGNUM, mappings): Move to ...
16303 * win32-i386-low.c: ... here.
16304 * win32-low.c (win32_thread_info): Move to ...
16305 * win32-low.h: ... here.
16306 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16307 win32-arm-low.c and wincecompat.c.
16308 (all:): Add $EXEEXT.
16309 (install-only:): Likewise.
16310 (gdbserver:): Likewise.
16311 (gdbreplay:): Likewise.
16312 * config.in: Regenerate.
16313 * configure: Regenerate.
16314
41093d81
PA
163152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16316
16317 * win32-low.c: Rename typedef thread_info to
16318 win32_thread_info throughout.
16319
544afa54
PA
163202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16321
16322 * win32-i386-low.c: Rename to ...
16323 * win32-low.c: ... this.
16324 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16325 * Makefile.in: Likewise.
16326
bce7165d
PA
163272007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16328
16329 * remote-utils.c (monitor_output): Constify msg parameter.
16330 * server.h (monitor_output): Likewise.
16331 * win32-i386-low.c (handle_output_debug_string): New.
16332 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16333 handle_output_debug_string.
16334 (get_child_debug_event): Likewise.
16335
506c7aa0
DJ
163362007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16337
16338 * server.c (main): Correct strtoul check.
16339
42c81e2a
DJ
163402007-03-27 Jon Ringle <jon@ringle.org>
16341
16342 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16343
9453113a
DJ
163442007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16345
16346 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16347
64a69107
DJ
163482007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16349
16350 * terminal.h: Check HAVE_SGTTY_H.
16351
163522007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16353
16354 * remote-utils.c (remote_open): Print out the assigned port number.
16355
c74d0ad8
DJ
163562007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16357
16358 * remote-utils.c (monitor_output): New function.
16359 * server.c (debug_threads): Define here.
16360 (monitor_show_help): New function.
16361 (handle_query): Handle qRcmd.
16362 (main): Do not handle 'd' packet.
16363 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16364 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16365 of debug_threads.
16366
de7c3b4a
PA
163672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16368
16369 * Makefile.in (EXEEXT): New.
16370 (clean): Use $(EXEEXT).
16371
ef57601b
PA
163722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16373
16374 * target.h (target_ops): Rename send_signal to request_interrupt,
16375 and remove enum target_signal parameter.
16376 * linux-low.c (linux_request_interrupt): Rename from
16377 linux_send_signal, and always send SIGINT.
16378 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16379 and always send SIGINT.
16380 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16381 of send_signal.
16382 (input_interrupt): Likewise.
16383
820f2bda
PA
163842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16385
16386 * server.c (get_features_xml): Check if target implemented
16387 arch_string.
16388 * win32-i386-low.c (win32_arch_string): New.
16389 (win32_target_ops): Add win32_arch_string as arch_string member.
16390
ab39bf24
UW
163912007-02-22 Markus Deuling <deuling@de.ibm.com>
16392
16393 * spu-low.c (spu_arch_string): New.
16394 (spu_target_ops): Add spu_arch_string.
16395
61ff6e04
DJ
163962007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16397
16398 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16399 * configure.ac: Do not check for terminal.h.
16400 * configure, config.in: Regenerated.
16401
fb1e4ffc
DJ
164022007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16403
16404 * Makefile.in (OBS): Add $(XML_BUILTIN).
16405 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16406 (clean): Update.
16407 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16408 (arm-with-iwmmxt.c): New.
16409 * config.in, configure: Regenerate.
16410 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16411 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16412 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16413 (arm*-*-linux*): Add iWMMXt and regset support.
16414 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16415 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16416 (arm_store_wmmxregset, target_regsets): New.
16417 * server.c (get_features_xml): Take annex argument. Check builtin
16418 XML documents.
16419 (handle_query): Handle multiple annexes.
16420
0f48aa01
DJ
164212007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16422
16423 * remote-utils.c [USE_WIN32API] (read, write): Define.
16424 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16425 write.
16426
23181151
DJ
164272007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16428
16429 * linux-i386-low.c (the_low_target): Set arch_string.
16430 * linux-x86-64-low.c (the_low_target): Likewise.
16431 * linux-low.c (linux_arch_string): New.
16432 (linux_target_ops): Add it.
16433 * linux-low.h (struct linux_target_ops): Add arch_string.
16434 * server.c (write_qxfer_response): Use const void * for DATA.
16435 (get_features_xml): New.
16436 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16437 * target.h (struct target_ops): Add arch_string method.
16438
9d606399
DJ
164392007-01-03 Denis Pilat <denis.pilat@st.com>
16440 Daniel Jacobowitz <dan@codesourcery.com>
16441
16442 * linux-low.c (linux_kill): Handle being called with no threads.
16443 * win32-i386-low.c (win32_kill): Likewise.
16444 (get_child_debug_event): Clear current_process_handle.
16445
164462006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16447 Daniel Jacobowitz <dan@codesourcery.com>
16448
16449 * remote-utils.c (remote_open): Check the type of specified
16450 serial port devices before opening them.
16451 * server.c (main): Kill the inferior if an error occurs during
16452 the first remote_open.
16453
a5e13d24
DJ
164542006-12-05 Markus Deuling <deuling@de.ibm.com>
16455
16456 * README: Update supported targets.
16457
186947f7
DJ
164582006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16459
16460 * Makefile.in (clean): Remove reg-mips64.c.
16461 (reg-mips64.c, reg-mips64.o): New rules.
16462 * configure.srv: Handle mips64. Include regset support for mips.
16463 * linux-mips-low.c (union mips_register): New.
16464 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16465 (mips_breakpoint, mips_breakpoint_at): Use int.
16466 (mips_collect_register, mips_supply_register)
16467 (mips_collect_register_32bit, mips_supply_register_32bit)
16468 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16469 (mips_store_fpregset, target_regsets): New.
16470 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16471
a13e2c95
UW
164722006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16473
16474 * configure.srv: Add target "spu*-*-*".
16475 * Makefile.in (clean): Remove reg-spu.c.
16476 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16477 * spu-low.c: New file.
16478
cb7283db
DJ
164792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16480
16481 * configure.ac: Correct td_thr_tls_get_addr test.
16482 * configure: Regenerated.
16483
89be2091
DJ
164842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16485
16486 * linux-low.c (linux_wait_for_event): Reformat. Use the
16487 pass_signals array.
16488 * remote-utils.c (decode_address_to_semicolon): New.
16489 * server.c (pass_signals, handle_general_set): New.
16490 (handle_query): Mention QPassSignals for qSupported.
16491 (main): Call handle_general_set.
16492 * server.h (pass_signals, decode_address_to_semicolon): New.
16493
000ef4f0
DJ
164942006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16495
16496 * server.c (handle_query): Correct error handling for read_auxv.
16497
b7149293
UW
164982005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16499
16500 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16501 and srv_linux_thread_db to yes.
16502 * linux-s390-low.c (s390_fill_gregset): New function.
16503 (target_regsets): Define data structure.
16504
dae5f5cf
DJ
165052006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16506
16507 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16508 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16509 * config.in, configure: Regenerated.
16510 * inferiors.c (gdb_id_to_thread): New function.
16511 (gdb_id_to_thread_id): Use it.
16512 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16513 * linux-low.h (struct process_info): Add th member.
16514 (thread_db_get_tls_address): New prototype.
16515 * remote-utils.c (decode_address): Make non-static.
16516 * server.c (handle_query): Handle qGetTLSAddr.
16517 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16518 * target.h (struct target_ops): Add get_tls_address.
16519 * thread-db.c (maybe_attach_thread): Save the thread handle.
16520 (thread_db_get_tls_address): New.
16521
32ca6d61
DJ
165222006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16523
16524 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16525 (linux_resume_one_process): Take a siginfo_t *. Update all
16526 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16527 (struct pending_signals): Add a siginfo_t.
16528 (linux_wait_for_process): Always set last_status.
16529 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16530 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16531 * linux-low.h (struct process_info): Add last_status.
16532
5ffff7c1
DJ
165332006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * remote-utils.c (try_rle): New function.
16536 (putpkt_binary): Use it.
16537
8695c747
DJ
165382006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16539
16540 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16541 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16542 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16543 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16544 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16545 point registers.
16546
290fadea
RS
165472006-08-08 Richard Sandiford <richard@codesourcery.com>
16548
16549 * server.c (terminal_fd): New variable.
16550 (old_foreground_pgrp): Likewise.
16551 (restore_old_foreground_pgrp): New function.
16552 (start_inferior): Record the terminal file descriptor in terminal_fd
16553 and its original foreground group in old_foreground_pgrp. Register
16554 restore_old_foreground_pgrp with atexit().
16555
9f2e1e63
DJ
165562006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16557
16558 * server.c (handle_query): Correct qPart to qXfer.
16559
b80864fb
DJ
165602006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16561
16562 * configure.ac: Check for more headers which are missing on
16563 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16564 * configure.srv: Add Cygwin and mingw32.
16565 * remote-utils.c: Don't include headers unconditionally which
16566 are missing on mingw32. Include <winsock.h> for mingw32.
16567 (remote_open): Adjust for mingw32 support. Flush
16568 standard error after writing to it.
16569 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16570 (unblock_async_io, enable_async_io, disable_async_io)
16571 (readchar, getpkt): Update for Winsock support.
16572 (prepare_resume_reply): Expect a protocol signal number.
16573 * server.c: Disable <sys/wait.h> on mingw32.
16574 (start_inferior): Adjust for mingw32 support. Flush
16575 standard error after writing to it.
16576 (attach_inferior): Likewise. Use protocol signal
16577 numbers.
16578 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16579 and names.
16580 * win32-i386-low.c: New file.
16581 * Makefile.in (XM_CLIBS): Set.
16582 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16583 (win32-i386-low.o): New dependency rule.
16584 * linux-low.c (linux_wait): Use target signal numbers.
16585 * target.h (struct target_ops): Doc fix.
16586 * server.h (target_signal_to_name): New prototype.
16587 * gdbreplay.c: Don't include headers unconditionally which
16588 are missing on mingw32. Include <winsock.h> for mingw32.
16589 (remote_close, remote_open): Adjust for Winsock support.
16590 * configure, config.in: Regenerated.
16591
0876f84a
DJ
165922006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16593
16594 * server.c (decode_xfer_read, write_qxfer_response): New.
16595 (handle_query): Take a packet length argument. Handle
16596 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16597 the qSupported response.
16598 (main): Update call to handle_query.
16599
01f9e8fa
DJ
166002006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16601
16602 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16603 (putpkt_binary): Renamed from putpkt and adjusted for binary
16604 data.
16605 (putpkt): New wrapper for putpkt_binary.
16606 (readchar): Don't mask off the high bit.
16607 (decode_X_packet): New function.
16608 * server.c (main): Call putpkt_binary if a handler sets the packet
16609 length. Save the length of the incoming packet. Handle 'X'.
16610 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16611
be2a5f71
DJ
166122006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16613
16614 * server.c (handle_query): Handle qSupported.
16615
ea025f5f
DJ
166162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16617
16618 * remote-utils.c (all_symbols_looked_up): New variable.
16619 (look_up_one_symbol): Check it.
16620 * server.h (look_up_one_symbol): New declaration.
16621 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16622
9308fc88
DJ
166232006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16624
16625 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16626 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16627 (PTRACE_GET_THREAD_AREA): Define.
16628 (ps_get_thread_area): New function.
16629
52fb6437
NS
166302006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16631
16632 * configure.srv (m68k*-*-uclinux*): New target.
16633 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16634 (linux_resume_one_process): Remove extraneous cast.
16635 (linux_read_offsets): New.
16636 (linux_target_op): Add linux_read_offsets on mmuless systems.
16637 * server.c (handle_query): Add qOffsets logic.
16638 * target.h (struct target_ops): Add read_offsets.
16639
21b0f40c
DJ
166402006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16641
16642 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16643 (PTRACE_GET_THREAD_AREA): Define.
16644 (ps_get_thread_area): New function.
16645 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16646 (linux-x86-64-low.o): Update.
16647
0050a760
DJ
166482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16649
16650 * configure.ac: Remove checks for prfpregset_t.
16651 * gdb_proc_service.h: New file.
16652 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16653 new "gdb_proc_service.h".
16654 * proc-service.c: Likewise.
16655 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16656 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16657 * Makefile.in (gdb_proc_service_h): Updated.
16658 * configure, config.in: Regenerated.
16659
b92a518e
DJ
166602006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16661
16662 * remote-utils.c (prepare_resume_reply): Move declaration
16663 of gdb_id_from_wait to the top of the block.
16664
545587ee
DJ
166652006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16666
16667 * linux-low.c (regsets_store_inferior_registers): Read the regset
16668 from the target before filling it.
16669
9db87ebd
DJ
166702006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16671
16672 * server.c (attach_inferior): Return SIGTRAP for a successful
16673 attach.
16674
dd24457d
DJ
166752006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16676
16677 * Makefile.in (OBS): Add version.o.
16678 (STAGESTUFF): Delete.
16679 (version.o): Add dependencies.
16680 (version.c): Replace rule.
16681 (clean): Remove version.c.
16682 * server.c (gdbserver_version): New.
16683 (gdbserver_usage): Use printf.
16684 (main): Handle --version and --help.
16685 * server.h (version, host_name): Add declarations.
16686
6f0f660e
EZ
166872005-12-23 Eli Zaretskii <eliz@gnu.org>
16688
889bf7c5
PA
16689 * linux-arm-low.c:
16690 * linux-arm-low.c:
16691 * inferiors.c:
16692 * i387-fp.h:
16693 * i387-fp.c:
16694 * gdbreplay.c:
16695 * regcache.c:
16696 * proc-service.c:
16697 * mem-break.h:
16698 * mem-break.c:
16699 * linux-x86-64-low.c:
16700 * linux-sh-low.c:
16701 * linux-s390-low.c:
16702 * linux-ppc64-low.c:
16703 * linux-ppc-low.c:
16704 * linux-mips-low.c:
16705 * linux-m68k-low.c:
16706 * linux-m32r-low.c:
16707 * linux-low.h:
16708 * linux-low.c:
16709 * linux-ia64-low.c:
16710 * linux-i386-low.c:
16711 * linux-crisv32-low.c:
16712 * thread-db.c:
16713 * terminal.h:
16714 * target.h:
16715 * target.c:
16716 * server.h:
16717 * server.c:
16718 * remote-utils.c:
16719 * regcache.h:
16720 * utils.c:
16721 * Makefile.in:
16722 * configure.ac:
6f0f660e
EZ
16723 * gdbserver.1: Add (C) after Copyright. Update the FSF
16724 address.
16725
9d1fb177
DJ
167262005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16727
16728 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16729 (arm_breakpoint_at): Recognize both breakpoints.
16730 (the_low_target): Use the correct breakpoint instruction.
16731
011a70c2
DJ
167322005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16733
16734 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16735 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16736 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16737 (the_low_target): Update.
16738
7fb85e41
AS
167392005-10-25 Andreas Schwab <schwab@suse.de>
16740
16741 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16742
16743 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16744 (ia64_num_regs): Reduce to 462.
16745
3db0444b
DJ
167462005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16747
16748 * acinclude.m4: Correct quoting.
16749 * aclocal.m4: Regenerated.
16750
16751 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16752 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16753 (thread_db_init): Call thread_db_err_str.
16754 * configure.ac: Check for TD_VERSION.
16755 * config.in, configure: Regenerated.
16756
bee0189a
DJ
167572005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16758
16759 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16760
e9d25b98
DJ
167612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16762
16763 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16764 is not available. Define HAVE_PTRACE_GETREGS if it is.
16765 * config.in, configure: Regenerated.
16766 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16767 * linux-i386-low.c, linux-m68k-low.c: Update to use
16768 HAVE_PTRACE_GETREGS.
16769 * linux-low.c (regsets_fetch_inferior_registers)
16770 (regsets_store_inferior_registers): Only return 0 if we processed
16771 GENERAL_REGS.
16772 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16773 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16774
a06660f7
DJ
167752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16776
16777 * inferiors.c (struct thread_info): Add gdb_id.
16778 (add_thread): Add gdb_id argument.
16779 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16780 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16781 calls to add_thread.
16782 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16783 * server.c (handle_query): Use thread_to_gdb_id.
16784 (handle_v_cont, main): Use gdb_id_to_thread_id.
16785 * server.h (add_thread): Update prototype.
16786 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16787 prototypes.
16788
5a1f5858
DJ
167892005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16790
16791 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16792 left-padded registers.
16793 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16794 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16795
e122f1f5
SE
167962005-07-01 Steve Ellcey <sje@cup.hp.com>
16797
16798 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16799 * configure: Regenerate.
16800 * config.in: Regenerate.
16801 * server.h (NEED_DECLARATION_STRERROR):
16802 Replace with !HAVE_DECL_STRERROR.
16803
d592fa2f
DJ
168042005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16805
16806 * linux-low.c (linux_wait, linux_send_signal): Don't test
16807 an unsigned long variable for > 0 if it could be MAX_ULONG.
16808 * server.c (myresume): Likewise.
16809 * target.c (set_desired_inferior): Likewise.
16810
ccbd4912
MK
168112005-06-13 Mark Kettenis <kettenis@gnu.org>
16812
16813 * configure.ac: Simplify and improve check for socklen_t.
16814 * configure, config.in: Regenerate.
16815
f450004a
DJ
168162005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16817
16818 * acconfig.h: Remove.
16819 * configure.ac: Add a test for socklen_t. Use three-argument
16820 AC_DEFINE throughout.
16821 * config.in: Regenerated using autoheader 2.59.
16822 * configure: Regenerated.
16823
16824 * gdbreplay.c (socklen_t): Provide a default.
16825 (remote_open): Use socklen_t.
16826 * remote-utils.c (socklen_t): Provide a default.
16827 (remote_open): Use socklen_t.
16828 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16829 unsigned char.
16830
16831 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16832 char for buffers.
16833 * linux-low.c (linux_read_memory, linux_write_memory)
16834 (linux_read_auxv): Likewise.
16835 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16836 (check_mem_write): Likewise.
16837 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16838 Likewise.
16839 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16840 (registers_from_string, register_data): Likewise.
16841 * server.c (handle_query, main): Likewise.
16842 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16843 (decode_M_packet): Likewise.
16844 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16845 * target.h (struct target_ops): Update read_memory, write_memory,
16846 and read_auxv.
16847 (read_inferior_memory, write_inferior_memory): Update.
16848 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16849 to unsigned char *.
16850 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16851 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16852 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16853 linux-s390-low.c, linux-sh-low.c: Update for changes in
16854 read_inferior_memory and the_low_target->breakpoint.
16855
eee84df1
DJ
168562005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16857
16858 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16859 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16860 * configure.srv: Add powerpc64-*-linux*.
16861 * linux-ppc64-low.c: New file.
16862
45b134e5
OF
168632005-05-23 Orjan Friberg <orjanf@axis.com>
16864
16865 * linux-cris-low.c: New file with support for CRIS.
16866 * linux-crisv32-low.c: Ditto for CRISv32.
16867 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16868 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16869 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16870 reg-crisv32.o, and reg-crisv32.c to make rules.
16871 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16872 recognized targets.
16873
48d93c75
UW
168742005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16875
16876 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16877 of sizeof (PTRACE_XFER_TYPE).
16878 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16879
e013ee27
OF
168802005-05-12 Orjan Friberg <orjanf@axis.com>
16881
889bf7c5 16882 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16883 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16884 pointers for hardware watchpoint support.
16885 * linux-low.h (struct linux_target_ops): Ditto.
16886 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16887 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16888 to linux_target_ops.
16889 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16890 reply packet.
16891 * server.c (main): Recognize 'Z' and 'z' packets.
16892
b0ded00b
UW
168932005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16894
16895 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16896 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16897 (the_low_target): Add new members.
16898
8643e2ad
DJ
168992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16900
16901 * proc-service.c (ps_lgetregs): Search all_processes instead of
16902 all_threads.
16903
fc620387
DJ
169042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16905
16906 * server.c (start_inferior): Change return type to int.
16907 (attach_inferior): Change sigptr to int *.
16908 (handle_v_cont, handle_v_requests): Change signal to int *.
16909 (main): Change signal to int.
16910
169112005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16912
16913 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16914 * configure.srv: Add m32r*-*-linux*.
16915 * linux-m32r-low.c: New file.
16916
e0e76420
DJ
169172005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16918
16919 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16920
a1928bad
DJ
169212005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16922
16923 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16924 Take unsigned long arguments for PIDs.
16925 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16926 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16927 (wait_for_sigstop, linux_resume_one_process)
16928 (regsets_fetch_inferior_registers, linux_send_signal)
16929 (linux_read_auxv): Likewise. Update the types of variables holding
16930 PIDs. Update format string specifiers.
16931 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16932 * remote-utils.c (prepare_resume_reply): Likewise.
16933 * server.c (cont_thread, general_thread, step_thread)
16934 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16935 unsigned long.
16936 (handle_query): Update format specifiers.
16937 (handle_v_cont, main): Use strtoul for thread IDs.
16938 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16939 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16940 (general_thread, step_thread, thread_from_wait)
16941 (old_thread_from_wait): Update.
16942 * target.h (struct thread_resume): Use unsigned long for THREAD.
16943 (struct target_ops): Use unsigned long for arguments to attach and
16944 thread_alive.
16945
dcdb98d2
DJ
169462005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16947
16948 * acinclude.m4: Include bfd/bfd.m4 directly.
16949 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16950 <agriffis@toolchain.org>.
16951 * aclocal.m4, configure: Regenerated.
16952
bec39cab
AC
169532005-01-07 Andrew Cagney <cagney@gnu.org>
16954
16955 * configure.ac: Rename configure.in, require autoconf 2.59.
16956 * configure: Re-generate.
16957
434c4c77
DJ
169582004-12-08 Daniel Jacobowitz <dan@debian.org>
16959
16960 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16961 LIBS when finished.
16962 * aclocal.m4: Regenerated.
16963 * configure: Regenerated.
16964
db1d3e1b
AS
169652004-11-21 Andreas Schwab <schwab@suse.de>
16966
16967 * linux-m68k-low.c (m68k_num_gregs): Define.
16968 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16969 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16970 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16971 (m68k_breakpoint_at): New. Add to the_low_target.
16972
16973 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16974 srv_linux_thread_db to yes.
16975
43360365
JB
169762004-10-20 Joel Brobecker <brobecker@gnat.com>
16977
16978 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16979 (ARCH_SET_FS): Likewise.
16980 (ARCH_GET_FS): Likewise.
16981 (ARCH_GET_GS): Likewise.
16982
fd500816
DJ
169832004-10-16 Daniel Jacobowitz <dan@debian.org>
16984
16985 * linux-i386-low.c (ps_get_thread_area): New.
16986 * linux-x86-64-low.c (ps_get_thread_area): New.
16987 * linux-low.c: Include <sys/syscall.h>.
16988 (linux_kill_one_process): Don't kill the first thread here.
16989 (linux_kill): Kill the first thread here.
16990 (kill_lwp): New function.
16991 (send_sigstop, linux_send_signal): Use it.
16992 * proc-service.c: Clean up #ifdefs.
16993 (fpregset_info): Delete.
16994 (ps_lgetregs): Update and enable implementation.
16995 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16996 implementations.
16997 * remote-utils.c (struct sym_cache, symbol_cache): New.
16998 (input_interrupt): Print a clearer message.
16999 (async_io_enabled): New variable.
17000 (enable_async_io, disable_async_io): Use it. Update comments.
17001 (look_up_one_symbol): Use the symbol cache.
17002 * thread-db.c (thread_db_look_up_symbols): New function.
17003 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17004
f6de3c42
DJ
170052004-10-16 Daniel Jacobowitz <dan@debian.org>
17006
17007 * configure.in: Test for -rdynamic.
17008 * configure: Regenerated.
17009 * Makefile (INTERNAL_LDFLAGS): New.
17010 (gdbserver, gdbreplay): Use it.
17011
2c0fc042
AC
170122004-09-02 Andrew Cagney <cagney@gnu.org>
17013
17014 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17015
075b3282
DJ
170162004-03-23 Daniel Jacobowitz <drow@mvista.com>
17017
17018 * linux-low.c (linux_wait): Clear all_processes list also.
17019
fa6a77dc
DJ
170202004-03-12 Daniel Jacobowitz <drow@mvista.com>
17021
17022 * linux-low.c: Include <errno.h>. Remove extern declaration of
17023 errno.
17024
6d782a97
DJ
170252004-03-12 Daniel Jacobowitz <drow@mvista.com>
17026
17027 * gdbreplay.c, server.h, utils.c: Update copyright years.
17028
3a7fb99b
DJ
170292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17030
17031 * server.c (main): Print child status or termination signal from
17032 variable 'signal', not 'sig'.
17033
c3e735a6
DJ
170342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17035
17036 * linux-low.c (linux_read_memory): Change return type to
17037 int. Check for and return error from ptrace().
17038 * target.c (read_inferior_memory): Change return type to int. Pass
17039 back return status from the_target->read_memory().
17040 * target.h (struct target_ops): Adapt *read_memory() prototype.
17041 Update comment.
17042 (read_inferior_memory): Adapt prototype.
17043 * server.c (main): Return an error packet if
17044 read_inferior_memory() returns an error.
17045
a59d1c82
DJ
170462004-03-04 Daniel Jacobowitz <drow@mvista.com>
17047
17048 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17049 Unify with other clean targets.
17050
dc3f8883
DJ
170512004-02-29 Daniel Jacobowitz <drow@mvista.com>
17052
17053 * server.c (handle_v_cont): Call set_desired_inferior.
17054
89a208da
DJ
170552004-02-29 Daniel Jacobowitz <drow@mvista.com>
17056
17057 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17058
62ea82f5
DJ
170592004-02-29 Daniel Jacobowitz <drow@mvista.com>
17060
17061 * linux-low.c (linux_wait): Unblock async I/O.
17062 (linux_resume): Block and enable async I/O.
17063 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17064 * server.h (block_async_io, unblock_async_io): Add prototypes.
17065
6910d122
DJ
170662004-02-29 Daniel Jacobowitz <drow@mvista.com>
17067
17068 * remote-utils.c (remote_open): Print a status notice after
17069 opening a TCP port.
17070 * server.c (attach_inferior): Print a status notice after
17071 attaching.
17072
170732004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17074
17075 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17076
c89dc5d4
DJ
170772004-02-26 Daniel Jacobowitz <drow@mvista.com>
17078
17079 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17080 error packet.
17081 * server.c, target.h: Update copyright years.
17082
4b8dad4a
RM
170832004-02-25 Roland McGrath <roland@redhat.com>
17084
17085 * target.h (struct target_ops): New member `read_auxv'.
17086 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17087 * linux-low.c (linux_read_auxv): New function.
17088 (linux_target_ops): Initialize `read_auxv' member to that.
17089
d7446758
JB
170902004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17091
17092 Committed by Jim Blandy <jimb@redhat.com>.
17093
17094 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17095 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17096 instead of GPR_SIZE to distiguish s390 and s390x targets.
17097
5544ad89
DJ
170982004-01-31 Daniel Jacobowitz <drow@mvista.com>
17099
17100 * linux-low.c: Update copyright year.
17101 (check_removed_breakpoint): Clear pending_is_breakpoint.
17102 (linux_set_resume_request, linux_queue_one_thread)
17103 (resume_status_pending_p): New functions.
17104 (linux_continue_one_thread): Use process->resume.
17105 (linux_resume): Only resume threads if there are no pending events.
17106 * linux-low.h (struct process_info): Add resume request
17107 pointer.
17108
2a68b70e
DJ
171092004-01-30 Daniel Jacobowitz <drow@mvista.com>
17110
17111 * regcache.c (new_register_cache): Clear the allocated register
17112 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17113
64386c31
DJ
171142003-10-13 Daniel Jacobowitz <drow@mvista.com>
17115
17116 * linux-low.c (linux_resume): Take a struct thread_resume *
17117 argument.
17118 (linux_wait): Update call.
17119 (resume_ptr): New static variable.
17120 (linux_continue_one_thread): Renamed from
17121 linux_continue_one_process. Use resume_ptr.
17122 (linux_resume): Use linux_continue_one_thread.
17123 * server.c (handle_v_cont, handle_v_requests): New functions.
17124 (myresume): New function.
17125 (main): Handle 'v' case.
17126 * target.h (struct thread_resume): New type.
17127 (struct target_ops): Change argument of "resume" to struct
17128 thread_resume *.
17129 (myresume): Delete macro.
17130
c938e9b0
L
171312003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17132
17133 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17134 (uninstall): Support DESTDIR.
17135
7f313d07
BC
17136Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17137
17138 * configure.srv: Add xscale*linux copy of arm*linux entry.
17139
3b2fc2ea
DJ
171402003-07-24 Daniel Jacobowitz <drow@mvista.com>
17141
17142 * linux-arm-low.c (arm_reinsert_addr): New function.
17143 (the_low_target): Add arm_reinsert_addr.
17144
1c0a559e
MK
171452003-07-08 Mark Kettenis <kettenis@gnu.org>
17146
17147 * mem-break.c: Remove whitespace at end of file.
17148
43d5792c
DJ
171492003-06-28 Daniel Jacobowitz <drow@mvista.com>
17150
17151 * configure.in: Check whether we need to prototype strerror.
17152 * server.h: Optionally prototype strerror.
17153 * gdbreplay.c (perror_with_name): Use strerror.
17154 * linux-low.c (linux_attach_lwp): Use strerror.
17155 * utils.c (perror_with_name): Use strerror.
17156 * config.in, configure: Regenerated.
17157
c8a86edf
DJ
171582003-06-28 Daniel Jacobowitz <drow@mvista.com>
17159
17160 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17161 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17162
73d37363
DJ
171632003-06-20 Daniel Jacobowitz <drow@mvista.com>
17164
17165 * Makefile.in (SFILES): Update.
17166 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17167 low-sun3.c: Remove files.
17168
6ad8ae5c
DJ
171692003-06-17 Daniel Jacobowitz <drow@mvista.com>
17170
17171 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17172 (linux_detach_one_process, linux_detach): New functions.
17173 (linux_target_ops): Add linux_detach.
17174 * server.c (main): Handle 'D' packet.
17175 * target.h (struct target_ops): Add "detach" member.
17176 (detach_inferior): Define.
17177
1581182a
MK
171782003-06-13 Mark Kettenis <kettenis@gnu.org>
17179
17180 From Kelley Cook <kelleycook@wideopenwest.com>:
17181 * configure.srv: Accept i[34567]86 variants.
17182
e5379b03
DJ
171832003-06-05 Daniel Jacobowitz <drow@mvista.com>
17184
17185 * linux-low.c (linux_wait_for_event): Correct comment typos.
17186 (linux_resume_one_process): Call check_removed_breakpoint.
17187 (linux_send_signal): New function.
17188 (linux_target_ops): Add linux_send_signal.
17189 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17190 of kill.
17191 * target.h (struct target_ops): Add send_signal.
17192
2ff29de4
JB
171932003-05-29 Jim Blandy <jimb@redhat.com>
17194
17195 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17196 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17197 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17198 away part of the register's value.
17199
254787d4
DJ
172002003-03-26 Daniel Jacobowitz <drow@mvista.com>
17201
17202 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17203 (linux_wait_for_event, linux_init_signals): Likewise.
17204
94e10508
DJ
172052003-03-17 Daniel Jacobowitz <drow@mvista.com>
17206
17207 * configure.in: Check for stdlib.h.
17208 * configure: Regenerated.
17209 * config.in: Regenerated.
17210
4c0711e0
DJ
172112003-01-04 Andreas Schwab <schwab@suse.de>
17212
17213 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17214
ef66e766
AC
172152003-01-02 Andrew Cagney <ac131313@redhat.com>
17216
17217 * Makefile.in: Remove obsolete code.
17218
a1358604
DJ
172192002-11-20 Daniel Jacobowitz <drow@mvista.com>
17220
17221 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17222 defined(PT_FPR0_HI).
17223
23ce3b1c
DJ
172242002-11-17 Stuart Hughes <seh@zee2.com>
17225
17226 * linux-arm-low.c (arm_num_regs): Increase.
17227 (arm_regmap): Include status register.
17228
172292002-11-17 Daniel Jacobowitz <drow@mvista.com>
17230
17231 * linux-low.c (register_addr): Remove incorrect -1 check.
17232
a9fa9f7d
DJ
172332002-08-29 Daniel Jacobowitz <drow@mvista.com>
17234
17235 * linux-low.c (linux_create_inferior): Call setpgid. Return
17236 the new PID.
17237 (unstopped_p, linux_signal_pid): Remove.
17238 (linux_target_ops): Remove linux_signal_pid.
17239 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17240 global instead of target method.
17241 * target.h (struct target_ops): Remove signal_pid. Update comment
17242 for create_inferior.
17243 * server.c (signal_pid): New variable.
17244 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17245 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17246 (attach_inferior): Set signal_pid.
17247
17574093
DJ
172482002-08-23 Daniel Jacobowitz <drow@mvista.com>
17249
17250 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17251
172522002-08-20 Jim Blandy <jimb@redhat.com>
17253
17254 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17255 default for this.
17256
172572002-08-01 Andrew Cagney <cagney@redhat.com>
17258
17259 * Makefile.in: Make chill references obsolete.
17260
172612002-07-24 Kevin Buettner <kevinb@redhat.com>
17262
17263 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17264 * configure: Regenerate.
17265 * config.in: Regenerate.
17266
172672002-07-09 David O'Brien <obrien@FreeBSD.org>
17268
17269 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17270 (perror_with_name, remote_close, remote_open, expect, play): Static.
17271
172722002-07-04 Michal Ludvig <mludvig@suse.cz>
17273
4b8dad4a 17274 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17275 byte offsets instead of an array of indexes.
17276 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17277
172782002-06-13 Daniel Jacobowitz <drow@mvista.com>
17279
17280 * regcache.c: Add comment.
17281
172822002-06-11 Daniel Jacobowitz <drow@mvista.com>
17283
17284 * thread-db.c: New file.
17285 * proc-service.c: New file.
17286 * acinclude.m4: New file.
17287 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17288 proc-service.o, and thread-db.o.
17289 (linux-low.o): Add USE_THREAD_DB.
17290 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17291 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17292 * aclocal.m4: Regenerated.
17293 * config.in: Regenerated.
17294 * configure: Regenerated.
17295 * configure.in: Check for proc_service.h, sys/procfs.h,
17296 thread_db.h, and linux/elf.h headrs.
17297 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17298 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17299 Check for -lthread_db and thread support.
17300 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17301 PowerPC, and SuperH.
17302 * i387-fp.c: Constify arguments.
17303 * i387-fp.h: Likewise.
17304 * inferiors.c: (struct thread_info): Renamed from
17305 `struct inferior_info'. Remove PID member. Use generic inferior
17306 list header. All uses updated.
17307 (inferiors, signal_pid): Removed.
17308 (all_threads): New variable.
17309 (get_thread): Define.
17310 (add_inferior_to_list): New function.
17311 (for_each_inferior): New function.
17312 (change_inferior_id): New function.
17313 (add_inferior): Removed.
17314 (remove_inferior): New function.
17315 (add_thread): New function.
17316 (free_one_thread): New function.
17317 (remove_thread): New function.
17318 (clear_inferiors): Use for_each_inferior and free_one_thread.
17319 (find_inferior): New function.
17320 (find_inferior_id): New function.
17321 (inferior_target_data): Update argument type.
17322 (set_inferior_target_data): Likewise.
17323 (inferior_regcache_data): Likewise.
17324 (set_inferior_regcache_data): Likewise.
17325 * linux-low.c (linux_bp_reinsert): Remove.
17326 (all_processes, stopping_threads, using_thrads)
17327 (struct pending_signals, debug_threads, pid_of): New.
17328 (inferior_pid): Replace with macro.
17329 (struct inferior_linux_data): Remove.
17330 (get_stop_pc, add_process): New functions.
17331 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17332 Use add_process and add_thread.
17333 (linux_attach_lwp): New function, based on old linux_attach. Use
17334 add_process and add_thread. Set stop_expected for new threads.
17335 (linux_attach): New function.
17336 (linux_kill_one_process): New function.
17337 (linux_kill): Kill all LWPs.
17338 (linux_thread_alive): Use find_inferior_id.
17339 (check_removed_breakpoints, status_pending_p): New functions.
17340 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17341 Update. Use WNOHANG. Wait for cloned processes also. Update process
17342 struct for the found process.
17343 (linux_wait_for_event): New function.
17344 (linux_wait): Use it. Support LWPs.
17345 (send_sigstop, wait_for_sigstop, stop_all_processes)
17346 (linux_resume_one_process, linux_continue_one_process): New functions.
17347 (linux_resume): Support LWPs.
17348 (REGISTER_RAW_SIZE): Remove.
17349 (fetch_register): Use register_size instead. Call supply_register.
17350 (usr_store_inferior_registers): Likewise. Call collect_register.
17351 Fix recursive case.
17352 (regsets_fetch_inferior_registers): Improve error message.
17353 (regsets_store_inferior_registers): Add debugging.
17354 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17355 (unstopped_p, linux_signal_pid): New functions.
17356 (linux_target_ops): Add linux_signal_pid.
17357 (linux_init_signals): New function.
17358 (initialize_low): Call it. Initialize using_threads.
17359 * regcache.c (inferior_regcache_data): Add valid
17360 flag.
17361 (get_regcache): Fetch registers lazily. Add fetch argument
17362 and update all callers.
17363 (regcache_invalidate_one, regcache_invalidate): New
17364 functions.
17365 (new_register_cache): Renamed from create_register_cache.
17366 Return the new regcache.
17367 (free_register_cache): Change argument to a void *.
17368 (registers_to_string, registers_from_string): Call get_regcache
17369 with fetch flag set.
17370 (register_data): Make static. Pass fetch flag to get_regcache.
17371 (supply_register): Call get_regcache with fetch flag clear.
17372 (collect_register): Call get_regcache with fetch flag set.
17373 (collect_register_as_string): New function.
17374 * regcache.h: Update.
17375 * remote-utils.c (putpkt): Flush after debug output and use
17376 stderr.
17377 Handle input interrupts while waiting for an ACK.
17378 (input_interrupt): Use signal_pid method.
17379 (getpkt): Flush after debug output and use stderr.
17380 (outreg): Use collect_register_as_string.
17381 (new_thread_notify, dead_thread_notify): New functions.
17382 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17383 and general_thread.
17384 (look_up_one_symbol): Flush after debug output.
17385 * server.c (step_thread, server_waiting): New variables.
17386 (start_inferior): Don't use signal_pid. Update call to mywait.
17387 (attach_inferior): Update call to mywait.
17388 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17389 (main): Don't fetch/store registers explicitly. Use
17390 set_desired_inferior. Support proposed ``Hs'' packet. Update
17391 calls to mywait.
17392 * server.h: Update.
17393 (struct inferior_list, struct_inferior_list_entry): New.
17394 * target.c (set_desired_inferior): New.
17395 (write_inferior_memory): Constify.
17396 (mywait): New function.
17397 * target.h: Update.
17398 (struct target_ops): New signal_pid method.
17399 (mywait): Removed macro, added prototype.
17400
17401 * linux-low.h (regset_func): Removed.
17402 (regset_fill_func, regset_store_func): New.
17403 (enum regset_type): New.
17404 (struct regset_info): Add type field. Use new operation types.
17405 (struct linux_target_ops): stop_pc renamed to get_pc.
17406 Add decr_pc_after_break and breakpoint_at.
17407 (get_process, get_thread_proess, get_process_thread)
17408 (strut process_info, all_processes, linux_attach_lwp)
17409 (thread_db_init): New.
17410
17411 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17412 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17413 (the_low_target): Add new members.
17414 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17415 (i386_store_fpxregset): Constify.
17416 (target_regsets): Add new kind identifier.
17417 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17418 (i386_set_pc): Add debugging.
17419 (i386_breakpoint_at): New function.
17420 (the_low_target): Add new members.
17421 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17422 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17423 (mips_breakpoint_at): New.
17424 (the_low_target): Add new members.
17425 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17426 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17427 (the_low_target): Add new members.
17428 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17429 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17430 (the_low_target): Add new members.
17431 * linux-x86-64-low.c (target_regsets): Add new kind
17432 identifier.
17433
174342002-05-15 Daniel Jacobowitz <drow@mvista.com>
17435
17436 From Martin Pool <mbp@samba.org>:
17437 * server.c (gdbserver_usage): New function.
17438 (main): Call it.
17439
174402002-05-14 Daniel Jacobowitz <drow@mvista.com>
17441
17442 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17443 stop_at -> stop_pc.
17444
174452002-05-04 Andrew Cagney <ac131313@redhat.com>
17446
17447 * Makefile.in: Remove obsolete code.
17448
174492002-04-24 Michal Ludvig <mludvig@suse.cz>
17450
17451 * linux-low.c (regsets_fetch_inferior_registers),
17452 (regsets_store_inferior_registers): Removed cast to int from
17453 ptrace() calls.
17454 * regcache.h: Added declaration of struct inferior_info.
17455
174562002-04-20 Daniel Jacobowitz <drow@mvista.com>
17457
17458 * inferiors.c (struct inferior_info): Add regcache_data.
17459 (add_inferior): Call create_register_cache.
17460 (clear_inferiors): Call free_register_cache.
17461 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17462 * regcache.c (struct inferior_regcache_data): New.
17463 (registers): Remove.
17464 (get_regcache): New function.
17465 (create_register_cache, free_register_cache): New functions.
17466 (set_register_cache): Don't initialize the register cache here.
17467 (registers_to_string, registers_from_string, register_data): Call
17468 get_regcache.
17469 * regcache.h: Add prototypes.
17470 * server.h: Likewise.
17471
174722002-04-20 Daniel Jacobowitz <drow@mvista.com>
17473
17474 * mem-break.c: New file.
17475 * mem-break.h: New file.
17476 * Makefile.in: Add mem-break.o rule; update server.h
17477 dependencies.
17478 * inferiors.c (struct inferior_info): Add target_data
17479 member.
17480 (clear_inferiors): Free target_data member if set.
17481 (inferior_target_data, set_inferior_target_data): New functions.
17482 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17483 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17484 * linux-low.c (linux_bp_reinsert): New variable.
17485 (struct inferior_linux_data): New.
17486 (linux_create_inferior): Use set_inferior_target_data.
17487 (linux_attach): Likewise. Call add_inferior.
17488 (linux_wait_for_one_inferior): New function.
17489 (linux_wait): Call it.
17490 (linux_write_memory): Add const.
17491 (initialize_low): Call set_breakpoint_data.
17492 * linux-low.h (struct linux_target_ops): Add breakpoint
17493 handling members.
17494 * server.c (attach_inferior): Remove extra add_inferior
17495 call.
17496 * server.h: Include mem-break.h. Update inferior.c
17497 prototypes.
17498 * target.c (read_inferior_memory)
17499 (write_inferior_memory): New functions.
17500 * target.h (read_inferior_memory)
17501 (write_inferior_memory): Change macros to prototypes.
17502 (struct target_ops): Update comments. Add const to write_memory
17503 definition.
17504
175052002-04-11 Daniel Jacobowitz <drow@mvista.com>
17506
17507 * linux-low.c (usr_store_inferior_registers): Support
17508 registers which are allowed to fail to store.
17509 * linux-low.h (linux_target_ops): Likewise.
17510 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17511 (ppc_cannot_store_register): FPSCR may not be storable.
17512
175132002-04-09 Daniel Jacobowitz <drow@mvista.com>
17514
17515 * server.h: Include <string.h> if HAVE_STRING_H.
17516 * ChangeLog: Correct paths in last ChangeLog entry.
17517
175182002-04-09 Daniel Jacobowitz <drow@mvista.com>
17519
17520 * linux-low.h: Remove obsolete prototypes.
17521 (struct linux_target_ops): New.
17522 (extern the_low_target): New.
17523 * linux-low.c (num_regs, regmap): Remove declarations.
17524 (register_addr): Use the_low_target explicitly.
17525 (fetch_register): Likewise.
17526 (usr_fetch_inferior_registers): Likewise.
17527 (usr_store_inferior_registers): Likewise.
17528 * linux-arm-low.c (num_regs): Remove.
17529 (arm_num_regs): Define.
17530 (arm_regmap): Renamed from regmap, made static.
17531 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17532 made static.
17533 (arm_cannot_store_register): Renamed from cannot_store_register,
17534 made static.
17535 (the_low_target): New.
17536 * linux-i386-low.c (num_regs): Remove.
17537 (i386_num_regs): Define.
17538 (i386_regmap): Renamed from regmap, made static.
17539 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17540 made static.
17541 (i386_cannot_store_register): Renamed from cannot_store_register,
17542 made static.
17543 (the_low_target): New.
17544 * linux-ia64-low.c (num_regs): Remove.
17545 (ia64_num_regs): Define.
17546 (ia64_regmap): Renamed from regmap, made static.
17547 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17548 made static.
17549 (ia64_cannot_store_register): Renamed from cannot_store_register,
17550 made static.
17551 (the_low_target): New.
17552 * linux-m68k-low.c (num_regs): Remove.
17553 (m68k_num_regs): Define.
17554 (m68k_regmap): Renamed from regmap, made static.
17555 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17556 made static.
17557 (m68k_cannot_store_register): Renamed from cannot_store_register,
17558 made static.
17559 (the_low_target): New.
17560 * linux-mips-low.c (num_regs): Remove.
17561 (mips_num_regs): Define.
17562 (mips_regmap): Renamed from regmap, made static.
17563 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17564 made static.
17565 (mips_cannot_store_register): Renamed from cannot_store_register,
17566 made static.
17567 (the_low_target): New.
17568 * linux-ppc-low.c (num_regs): Remove.
17569 (ppc_num_regs): Define.
17570 (ppc_regmap): Renamed from regmap, made static.
17571 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17572 made static.
17573 (ppc_cannot_store_register): Renamed from cannot_store_register,
17574 made static.
17575 (the_low_target): New.
17576 * linux-s390-low.c (num_regs): Remove.
17577 (s390_num_regs): Define.
17578 (s390_regmap): Renamed from regmap, made static.
17579 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17580 made static.
17581 (s390_cannot_store_register): Renamed from cannot_store_register,
17582 made static.
17583 (the_low_target): New.
17584 * linux-sh-low.c (num_regs): Remove.
17585 (sh_num_regs): Define.
17586 (sh_regmap): Renamed from regmap, made static.
17587 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17588 made static.
17589 (sh_cannot_store_register): Renamed from cannot_store_register,
17590 made static.
17591 (the_low_target): New.
17592 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17593 (the_low_target): New.
17594
175952002-04-09 Daniel Jacobowitz <drow@mvista.com>
17596
17597 * Makefile.in: Add stamp-h target.
17598 * configure.in: Create stamp-h.
17599 * configure: Regenerated.
17600
176012002-04-09 Daniel Jacobowitz <drow@mvista.com>
17602
17603 * inferiors.c: New file.
17604 * target.c: New file.
17605 * target.h: New file.
17606 * Makefile.in: Add target.o and inferiors.o. Update
17607 dependencies.
17608 * linux-low.c (inferior_pid): New static variable,
17609 moved from server.c.
17610 (linux_create_inferior): Renamed from create_inferior.
17611 Call add_inferior. Return 0 on success instead of a PID.
17612 (linux_attach): Renamed from myattach.
17613 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17614 (linux_thread_alive): Renamed from mythread_alive.
17615 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17616 child dies.
17617 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17618 (regsets_store_inferior_registers): Correct error message.
17619 Add missing ``return 0''.
17620 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17621 (linux_store_registers): Renamed from store_inferior_registers.
17622 (linux_read_memory): Renamed from read_inferior_memory.
17623 (linux_write_memory): Renamed from write_inferior_memory.
17624 (linux_target_ops): New structure.
17625 (initialize_low): Call set_target_ops ().
17626 * remote-utils.c (unhexify): New function.
17627 (hexify): New function.
17628 (input_interrupt): Send signals to ``signal_pid''.
17629 * server.c (inferior_pid): Remove.
17630 (start_inferior): Update create_inferior call.
17631 (attach_inferior): Call add_inferior.
17632 (handle_query): New function.
17633 (main): Call handle_query for `q' packets.
17634 * server.h: Include "target.h". Remove obsolete prototypes.
17635 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17636
176372002-04-09 Daniel Jacobowitz <drow@mvista.com>
17638
17639 * Makefile.in: Add WARN_CFLAGS. Update configury
17640 dependencies.
17641 * configure.in: Check for <string.h>
17642 * configure: Regenerate.
17643 * config.in: Regenerate.
17644 * gdbreplay.c: Include needed system headers.
17645 (remote_open): Remove strchr prototype.
17646 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17647 * regcache.c (supply_register): Change buf argument to const void *.
17648 (supply_register_by_name): Likewise.
17649 (collect_register): Change buf argument to void *.
17650 (collect_register_by_name): Likewise.
17651 * regcache.h: Add missing prototypes.
17652 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17653 * server.c (handle_query): New function.
17654 (attached): New static variable, moved out of main.
17655 (main): Quiet longjmp clobber warnings.
17656 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17657 * utils.c (error): Remove NORETURN.
17658 (fatal): Likewise.
This page took 3.679268 seconds and 4 git commands to generate.