Add libctf to src-release.sh:GDB_SUPPORT_DIRS
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
fec4e896
CB
12019-10-16 Christian Biesinger <cbiesinger@google.com>
2
3 * server.c: Include xml-builtin.h.
4 (get_xml_features): Don't declare xml_builtins here.
5
00975ff6
AB
62019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
7
8 * Makefile.in: Remove references to vec-ipa.o.
9
0dc32745
AB
102019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
11
12 * Makefile.in: Remove references to vec.c.
13
3e6ec53a
CB
142019-10-02 Christian Biesinger <cbiesinger@google.com>
15
16 * server.c (server_waiting): Change to bool.
17 (extended_protocol): Likewise.
18 (response_needed): Likewise.
19 (exit_requested): Likewise.
20 (run_once): Likewise.
21 (report_no_resumed): Likewise.
22 (non_stop): Likewise.
23 (disable_packet_vCont): Likewise.
24 (disable_packet_Tthread): Likewise.
25 (disable_packet_qC): Likewise.
26 (disable_packet_qfThreadInfo): Likewise.
27 (handle_general_set): Update.
28 (handle_detach): Update.
29 (handle_monitor_command): Update.
30 (handle_query): Update.
31 (captured_main): Update.
32 (process_serial_event): Update.
33 * server.h (server_waiting): Change to bool.
34 (disable_packet_vCont): Likewise.
35 (disable_packet_Tthread): Likewise.
36 (disable_packet_qC): Likewise.
37 (disable_packet_qfThreadInfo): Likewise.
38 (run_once): Likewise.
39 (non_stop): Likewise.
40 * target.c (target_stop_and_wait): Update.
41
80fd2826
TT
422019-10-02 Tom Tromey <tromey@adacore.com>
43
44 * Makefile.in (SFILES): Add common-inferior.c.
45 (OBS): Add common-inferior.o.
46 * server.c (startup_with_shell): Don't define.
47
46f29a9a
AB
482019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
49
50 * linux-low.c (linux_low_read_btrace): Update for change to
51 std::vector.
52
f9d949fb
CB
532019-09-20 Christian Biesinger <cbiesinger@google.com>
54
55 * debug.c (debug_threads): Remove comment in favor of the header.
56 * debug.h (using_threads): Add declaration.
57 (debug_threads): Add comment.
58 * linux-aarch64-low.c: Include debug.h and remove declaration of
59 debug_threads.
60 * nto-low.c: Likewise.
61 * remote-utils.c: Likewise.
62 * thread-db.c: Likewise.
63
abf516c6
UW
642019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
65
66 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
67 and powerpc-cell64l-ipa.o.
68 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
69 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
70 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
71 (spu*-*-*): Remove.
72
73 * spu-low.c: Remove file.
74
75 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
76 (parse_spufs_run): Remove.
77 (ppc_get_pc): Remove Cell/B.E. support.
78 (ppc_set_pc): Likewise.
79 (ppc_breakpoint_at): Likewise.
80 (ppc_arch_setup): Likewise.
81 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
82 tdesc_powerpc_cell32l.
83 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
84 or init_registers_powerpc_cell32l.
85 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
86 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
87 or init_registers_powerpc_cell32l.
88 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
89 (init_registers_powerpc_cell32l): Remove prototype.
90 (init_registers_powerpc_cell64l): Likewise.
91
92 * target.h (struct target_ops): Remove qxfer_spu member.
93 * server.c (handle_qxfer_spu): Remove.
94 (qxfer_packets): Remove entry for "spu".
95 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
96 * linux-low.c (SPUFS_MAGIC): Remove.
97 (spu_enumerate_spu_ids): Remove.
98 (linux_qxfer_spu): Remove.
99 (linux_target_ops): Remove qxfer_spu member.
100 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
101 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
102 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
103
2d41fa11
SDJ
1042019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
105
106 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
107 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
108 * config.in: Regenerate.
109 * configure: Regenerate.
110
d59b55f0
TT
1112019-08-15 Tom Tromey <tromey@adacore.com>
112
113 * target.c (target_write_memory): Use gdb::byte_vector.
114
4196ab2a
TT
1152019-08-15 Tom Tromey <tromey@adacore.com>
116
117 * tracepoint.c (write_inferior_data_pointer)
118 (write_inferior_integer, write_inferior_int8)
119 (write_inferior_uinteger, m_tracepoint_action_download)
120 (r_tracepoint_action_download, x_tracepoint_action_download)
121 (l_tracepoint_action_download, clear_inferior_trace_buffer)
122 (download_agent_expr, download_tracepoint_1)
123 (download_trace_state_variables, upload_fast_traceframes): Update.
124 * server.c (gdb_write_memory): Update.
125 * remote-utils.c (relocate_instruction): Update.
126 * proc-service.c (ps_pdwrite): Update.
127 * mem-break.c (remove_memory_breakpoint)
128 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
129 (uninsert_fast_tracepoint_jumps_at)
130 (reinsert_fast_tracepoint_jumps_at): Update.
131 * linux-x86-low.c (append_insns)
132 (i386_install_fast_tracepoint_jump_pad)
133 (amd64_write_goto_address, i386_write_goto_address): Update.
134 * linux-s390-low.c (append_insns, s390_write_goto_address):
135 Update.
136 * linux-ppc-low.c (ppc_relocate_instruction)
137 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
138 (ppc_write_goto_address): Update.
139 * linux-aarch64-low.c (append_insns): Update.
140 * target.h (struct target_ops): Update.
141 (write_inferior_memory): Don't declare.
142 * target.c (target_write_memory): Rename from
143 write_inferior_memory. Remove old target_write_memory.
144
c6778d00
TT
1452019-08-15 Tom Tromey <tromey@adacore.com>
146
147 * target.c (write_inferior_memory): Use std::vector.
148
404f2902
FCE
1492019-08-06 Frank Ch. Eigler <fche@redhat.com>
150
151 PR build/24886
152 * configure.ac: Drop enable-libmcheck support.
153 * configure, config.in: Rebuild.
154 * acinclude.m4: Don't include it.
155
4c5aa8e0
AH
1562019-07-19 Alan Hayward <alan.hayward@arm.com>
157
158 * configure.srv: Remove Arm xml files.
159
7cc17433
AH
1602019-07-19 Alan Hayward <alan.hayward@arm.com>
161
162 * configure.srv: Add new files. Remove xml generated files.
163 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
164 registers.
165 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
166 * linux-aarch32-tdesc.c: New file.
167 * linux-aarch32-tdesc.h: New file.
168 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
169 * linux-arm-low.c (init_registers_arm, tdesc_arm)
170 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
171 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
172 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
173 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
174 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
175 (arm_read_description): Call arm_linux_read_description.
176 (initialize_low_arch): Don't init registers.
177 * linux-arm-tdesc.c: New file.
178 * linux-arm-tdesc.h: New file.
179
166a82be
AH
1802019-07-10 Alan Hayward <alan.hayward@arm.com>
181
182 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
183 Move counter inside for.
184 (arm_read_description): Check ptrace earlier.
185 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
186
268a13a5
TT
1872019-07-09 Tom Tromey <tom@tromey.com>
188
189 * configure: Rebuild.
190 * configure.ac: Change common to gdbsupport.
191 * acinclude.m4: Change common to gdbsupport.
192 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
193 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
194 common to gdbsupport.
195 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
196 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
197 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
198 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
199 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
200 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
201 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
202 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
203 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
204 common to gdbsupport.
205
350fab54
AH
2062019-07-04 Alan Hayward <alan.hayward@arm.com>
207
208 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
209 defines.
210 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
211
2b40fda7
AH
2122019-07-04 Alan Hayward <alan.hayward@arm.com>
213
214 * configure.srv: Remove legacy xml.
215 * linux-aarch64-low.c (initialize_low_arch): Remove
216 initialize_low_tdesc call.
217 * linux-aarch64-tdesc-selftest.c: Remove file.
218 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
219 * linux-x86-low.c (initialize_low_arch): Remove
220 initialize_low_tdesc call.
221 * linux-x86-tdesc-selftest.c: Remove file.
222 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
223
7d10623d
TV
2242019-06-20 Tom de Vries <tdevries@suse.de>
225
226 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
227 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
228
8d6a48df
TV
2292019-06-19 Tom de Vries <tdevries@suse.de>
230
231 * debug.h (debug_write): Change return type to ssize_t.
232 * debug.c (debug_write): Same.
233
73cc7272
TT
2342019-06-14 Tom Tromey <tom@tromey.com>
235
236 * configure.ac: Use new path to gnulib.
237 * configure: Rebuild.
238 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
239 to gnulib.
240
08f10e02
TT
2412019-06-11 Tom Tromey <tom@tromey.com>
242
243 * Makefile.in (SFILES): Add alloc.c.
244 (OBS): Add alloc.o.
245 (IPA_OBJS): Add alloc-ipa.o.
246 (alloc-ipa.o): New target.
247 (%.o: ../%.c): New pattern rule.
248
422186a9
TT
2492019-06-10 Tom Tromey <tromey@adacore.com>
250
251 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
252 end warning with a newline.
253 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
254 newline.
255 * thread-db.c (attach_thread): Don't end warning with a newline.
256 (thread_db_notice_clone): Likewise.
257 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
258 newline.
259 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
260 end warning with a newline.
261
b02f78f9
PA
2622019-06-04 Pedro Alves <palves@redhat.com>
263
264 * server.c (captured_main): Use make_unique_xstrdup.
265
88ed7edb
TT
2662019-06-02 Tom Tromey <tom@tromey.com>
267
268 * gdbreplay.c (fromhex): Remove.
269 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
270
33a6bc35
TT
2712019-05-29 Tom Tromey <tromey@adacore.com>
272
273 * configure: Rebuild.
274
e90a813d
KB
2752019-05-06 Kevin Buettner <kevinb@redhat.com>
276
277 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
278 sign extension code on 32-bit builds.
279
353ea2d1
EZ
2802019-05-03 Eli Zaretskii <eliz@gnu.org>
281
282 * remote-utils.c:
283 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
284
b494cdff
TT
2852019-04-19 Tom Tromey <tom@tromey.com>
286
287 * server.c (struct vstop_notif): Derive from notif_event.
288 <base>: Remove.
289 (queue_stop_reply): Update.
290 (remove_all_on_match_ptid): Change type. Rewrite.
291 (discard_queued_stop_replies): Rewrite.
292 (in_queued_stop_replies_ptid): Change type.
293 (in_queued_stop_replies): Rewrite.
294 (notif_stop): Update.
295 (queue_stop_reply_callback): Update.
296 (captured_main): Don't call initialize_notif.
297 (push_stop_notification): Update.
298 * notif.c (notif_write_event, handle_notif_ack)
299 (notif_event_enque, notif_push): Update.
300 (notif_event_xfree, initialize_notif): Remove.
301 * notif.h (struct notif_event): Include <list>, not
302 "common/queue.h".
303 (struct notif_server) <queue>: Now a std::list.
304 (notif_event_p): Remove typedef.
305 (initialize_notif): Don't declare.
306 (struct notif_event): Add virtual destructor.
307
a7e559cc
AH
3082019-04-17 Alan Hayward <alan.hayward@arm.com>
309
310 * ax.c (ax_vdebug): Call debug_printf.
311 * debug.c (debug_write): New function.
312 * debug.h (debug_write): New declaration.
313 * linux-low.c (sigchld_handler): Call debug_write.
314
aeb2e706
AH
3152019-04-17 Alan Hayward <alan.hayward@arm.com>
316
317 * debug.c (debug_set_output): New function.
318 (debug_vprintf): Send output to debug_file.
319 (debug_flush): Likewise.
320 * debug.h (debug_set_output): New declaration.
321 * server.c (handle_monitor_command): Add debug-file option.
322 (captured_main): Likewise.
323
c1bc0935
AH
3242019-04-17 Alan Hayward <alan.hayward@arm.com>
325
326 * debug.c (remote_debug): Add definition.
327 * debug.h (remote_debug): Add declaration.
328 * hostio.c (remote_debug): Remove declaration.
329 * remote-utils.c (struct ui_file): Likewise.
330 (remote_debug): Likewise.
331 * remote-utils.h (remote_debug): Likewise,
332 * server.c (remote_debug): Remove definition.
333
3f52fdbc
KB
3342019-04-10 Kevin Buettner <kevinb@redhat.com>
335
336 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
337 when using a 64-bit gdbserver.
338
b0319eaa
TT
3392019-04-09 Tom Tromey <tromey@adacore.com>
340
341 * linux-low.c (select_event_lwp): Use find_thread_in_random.
342
eedc3f4f
TT
3432019-04-08 Tom Tromey <tom@tromey.com>
344
345 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
346 throw.
347 (linux_resume_one_lwp): Likewise.
348
230d2906
TT
3492019-04-08 Tom Tromey <tom@tromey.com>
350
351 * gdbreplay.c: Update.
352 * linux-low.c: Update.
353 * server.c: Update.
354
a70b8144
TT
3552019-04-08 Tom Tromey <tom@tromey.com>
356
357 * server.c: Use C++ exception handling.
358 * linux-low.c: Use C++ exception handling.
359 * gdbreplay.c: Use C++ exception handling.
360
3d6e9d23
TT
3612019-04-08 Tom Tromey <tom@tromey.com>
362
363 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
364 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
365 (captured_main, main): Update.
366 * gdbreplay.c (main): Update.
367
0570503d
PFC
3682019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
369
370 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
371 value in argument pointer, return 1 if the entry is found and 0
372 otherwise. Move comment.
373 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
374 * linux-low.h (linux_get_auxv): Declare.
375 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
376
227a9e65
TT
3772019-04-05 Tom Tromey <tromey@adacore.com>
378
379 * server.c (gdbserver_usage): Use upper-case for metasyntactic
380 variables.
381
69f4c9cc
AH
3822019-03-28 Alan Hayward <alan.hayward@arm.com>
383
384 * linux-low.c (AT_HWCAP2): Add define if not already included.
385
974c89e0
AH
3862019-03-26 Alan Hayward <alan.hayward@arm.com>
387
388 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
389 (aarch64_arch_setup): Call linux_get_hwcap.
390 * linux-arm-low.c (arm_get_hwcap): Remove function.
391 (arm_read_description): Call linux_get_hwcap.
392 * linux-low.c (linux_get_auxv): New function.
393 (linux_get_hwcap): Likewise.
394 (linux_get_hwcap2): Likewise.
395 * linux-low.h (linux_get_hwcap): New declaration.
396 (linux_get_hwcap2): Likewise.
397 * linux-ppc-low.c (ppc_get_auxv): Remove function.
398 (ppc_arch_setup): Call linux_get_hwcap.
399 * linux-s390-low.c (s390_get_hwcap): Remove function.
400 (s390_arch_setup): Call linux_get_hwcap.
401
1ef53e6b
AH
4022019-03-22 Alan Hayward <alan.hayward@arm.com>
403 Jiong Wang <jiong.wang@arm.com>
404
405 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
406 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
407 to fail.
408 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
409
ee4fbcfa
AH
4102019-03-22 Alan Hayward <alan.hayward@arm.com>
411 Jiong Wang <jiong.wang@arm.com>
412
413 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
414 (aarch64_get_hwcap): New function.
415 (aarch64_arch_setup): Read APIA hwcap.
416
6dc0ebde
AH
4172019-03-22 Alan Hayward <alan.hayward@arm.com>
418 Jiong Wang <jiong.wang@arm.com>
419
420 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
421 (initialize_low_tracepoint): Likewise.
422 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
423 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
424 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
425 (aarch64_linux_read_description): Likewise.
426 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
427
1163a4b7
JB
4282019-03-12 John Baldwin <jhb@FreeBSD.org>
429
430 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
431 i386_create_target_description for 'segments' parameter.
432 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
433 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
434 * win32-i386-low.c (i386_arch_setup): Likewise.
435
d3a70e03
TT
4362019-03-12 Tom Tromey <tromey@adacore.com>
437
438 * linux-low.c (iterate_over_lwps): Update.
439
37991b4f
TT
4402019-03-06 Tom Tromey <tom@tromey.com>
441
442 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
443 (captured_main): Use SCOPE_EXIT.
444
45950eb6
SDJ
4452019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
446
447 * configure.srv: Use '$enable_unittest' instead of '$development'
448 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
449 case.
450
43ac54fc
TT
4512019-02-27 Tom Tromey <tromey@adacore.com>
452
453 * gdbreplay.c (logchar): Handle \r\n.
454
df0da8a2
AH
4552019-02-07 Alan Hayward <alan.hayward@arm.com>
456
457 * linux-low.c (linux_attach): Add process before lwp.
458 * server.c (attach_inferior): Check if already attached.
459
1a5c2598
TT
4602019-02-07 Tom Tromey <tom@tromey.com>
461
462 * x86-tdesc.h: Rename include guard.
463 * x86-low.h: Add include guard.
464 * wincecompat.h: Rename include guard.
465 * win32-low.h: Add include guard.
466 * utils.h: Rename include guard.
467 * tracepoint.h: Rename include guard.
468 * tdesc.h: Rename include guard.
469 * target.h: Rename include guard.
470 * server.h: Rename include guard.
471 * remote-utils.h: Rename include guard.
472 * regcache.h: Rename include guard.
473 * nto-low.h: Rename include guard.
474 * notif.h: Add include guard.
475 * mem-break.h: Rename include guard.
476 * lynx-low.h: Add include guard.
477 * linux-x86-tdesc.h: Add include guard.
478 * linux-s390-tdesc.h: Add include guard.
479 * linux-ppc-tdesc-init.h: Add include guard.
480 * linux-low.h: Add include guard.
481 * linux-aarch64-tdesc.h: Add include guard.
482 * linux-aarch32-low.h: Add include guard.
483 * inferiors.h: Rename include guard.
484 * i387-fp.h: Rename include guard.
485 * hostio.h: Rename include guard.
486 * gdbthread.h: Rename include guard.
487 * gdb_proc_service.h: Rename include guard.
488 * event-loop.h: Rename include guard.
489 * dll.h: Rename include guard.
490 * debug.h: Rename include guard.
491 * ax.h: Rename include guard.
492
956cc47c
SN
4932018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
494
495 PR gdb/23985
496 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
497 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
498
a0707f3c
TT
4992019-01-25 Tom Tromey <tom@tromey.com>
500
501 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
502
0747795c
TT
5032019-01-25 Tom Tromey <tom@tromey.com>
504
505 * win32-low.c: Fix common/ includes.
506 * win32-i386-low.c: Fix common/ includes.
507 * tracepoint.c: Fix common/ includes.
508 * thread-db.c: Fix common/ includes.
509 * target.h: Fix common/ includes.
510 * symbol.c: Fix common/ includes.
511 * spu-low.c: Fix common/ includes.
512 * server.h: Fix common/ includes.
513 * server.c: Fix common/ includes.
514 * remote-utils.c: Fix common/ includes.
515 * regcache.h: Fix common/ includes.
516 * regcache.c: Fix common/ includes.
517 * nto-x86-low.c: Fix common/ includes.
518 * notif.h: Fix common/ includes.
519 * mem-break.h: Fix common/ includes.
520 * lynx-low.c: Fix common/ includes.
521 * lynx-i386-low.c: Fix common/ includes.
522 * linux-x86-tdesc-selftest.c: Fix common/ includes.
523 * linux-x86-low.c: Fix common/ includes.
524 * linux-low.c: Fix common/ includes.
525 * inferiors.h: Fix common/ includes.
526 * i387-fp.c: Fix common/ includes.
527 * hostio.c: Fix common/ includes.
528 * hostio-errno.c: Fix common/ includes.
529 * gdbthread.h: Fix common/ includes.
530 * gdbreplay.c: Fix common/ includes.
531 * fork-child.c: Fix common/ includes.
532 * event-loop.c: Fix common/ includes.
533 * ax.c:
534 (enum gdb_agent_op): Fix common/ includes.
535
be6d4f74
TT
5362019-01-21 Tom Tromey <tom@tromey.com>
537
538 * tracepoint.c: Fix includes.
539 * remote-utils.c: Fix includes.
540 * linux-x86-low.c: Fix includes.
541
66d91b39
JB
5422019-01-01 Joel Brobecker <brobecker@adacore.com>
543
544 * gdbreplay.c (gdbreplay_version): Update copyright year in
545 version message.
546 * server.c (gdbserver_version): Likewise.
547
754e3168
AH
5482018-12-05 Alan Hayward <alan.hayward@arm.com>
549
550 * linux-low.c (add_lwp): Switch ordering.
551
d105de22
TT
5522018-11-29 Tom Tromey <tom@tromey.com>
553
554 * win32-low.c (win32_join): Take pid, not process.
555 * target.h (struct target_ops) <join>: Change argument type.
556 (join_inferior): Change argument name.
557 * spu-low.c (spu_join): Take pid, not process.
558 * server.c (handle_detach): Preserve pid before destroying
559 process.
560 * lynx-low.c (lynx_join): Take pid, not process.
561 * linux-low.c (linux_join): Take pid, not process.
562
50138245
AH
5632018-11-23 Alan Hayward <alan.hayward@arm.com>
564
565 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
566 (aarch64_cannot_fetch_register): Likewise.
567 (struct linux_target_ops): Update references.
568
64f57f3d
PFC
5692018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
570
571 * linux-ppc-low.c: Include nat/linux-ptrace.h.
572
8d619c01
EBM
5732018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
574
575 * configure.srv (ipa_ppc_linux_regobj): Add
576 powerpc-isa207-htm-vsx32l-ipa.o and
577 powerpc-isa207-htm-vsx64l-ipa.o.
578 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
579 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
580 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
581 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
582 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
583 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
584 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
585 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
586 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
587 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
588 (init_registers_powerpc_isa207_htm_vsx32l)
589 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
590 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
591 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
592 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
593 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
594 (ppc_store_tm_ctarregset): New functions.
595 (ppc_regsets): Add entries for HTM regsets.
596 (ppc_arch_setup): Set htm in features struct when needed. Set
597 sizes for the HTM regsets.
598 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
599 (initialize_low_arch): Call
600 init_registers_powerpc_isa207_htm_vsx32l and
601 init_registers_powerpc_isa207_htm_vsx64l.
602 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
603 PPC_TDESC_ISA207_HTM_VSX.
604 (initialize_low_tracepoint): Call
605 init_registers_powerpc_isa207_htm_vsx32l and
606 init_registers_powerpc_isa207_htm_vsx64l.
607
232bfb86
EBM
6082018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
609
610 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
611 rs6000/power-linux-pmu.xml to srv_xmlfiles.
612 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
613 (ppc_store_pmuregset): New functions.
614 (ppc_regsets): Add entries for ebb and pmu regsets.
615 (ppc_arch_setup): Set isa207 in features struct if the ebb and
616 pmu regsets are available. Set sizes for these regsets.
617
f2cf6173
EBM
6182018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
619
620 * configure.srv (ipa_ppc_linux_regobj): Add
621 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
622 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
623 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
624 rs6000/powerpc-isa207-vsx32l.xml, and
625 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
626 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
627 <PPC_TDESC_ISA207_VSX>: New enum value.
628 (init_registers_powerpc_isa207_vsx32l): Declare.
629 (init_registers_powerpc_isa207_vsx64l): Declare.
630 * linux-ppc-low.c (ppc_fill_tarregset): New function.
631 (ppc_store_tarregset): New function.
632 (ppc_regsets): Add entry for the TAR regset.
633 (ppc_arch_setup): Set isa207 in features struct when needed. Set
634 size for the TAR regsets.
635 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
636 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
637 and init_registers_powerpc_isa207_vsx64l.
638 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
639 (initialize_low_tracepoint): Call
640 init_registers_powerpc_isa207_vsx32l and
641 init_registers_powerpc_isa207_vsx64l.
642
7ca18ed6
EBM
6432018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
644 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
645
646 * configure.srv (ipa_ppc_linux_regobj): Add
647 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
648 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
649 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
650 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
651 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
652 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
653 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
654 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
655 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
656 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
657 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
658 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
659 (ppc_hwcap): Add comment.
660 (ppc_hwcap2): New global.
661 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
662 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
663 (ppc_regsets): Add entries for the DSCR and PPR regsets.
664 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
665 when needed. Set sizes for the the DSCR and PPR regsets.
666 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
667 (initialize_low_arch): Call
668 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
669 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
670 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
671 PPC_TDESC_ISA205_PPR_DSCR_VSX.
672 (initialize_low_tracepoint): Call
673 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
674 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
675
5c849b22
PFC
6762018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
677
678 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
679
8ecfd7bd
SDJ
6802018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
681 Simon Marchi <simark@simark.ca>
682
683 * acinclude.m4: Include "../selftest.m4".
684 * configure: Regenerate.
685 * configure.ac: Use "GDB_AC_SELFTEST".
686 * configure.srv: Use "$enable_unittests" instead of
687 "$development" when checking whether unit tests have been
688 enabled.
689 * server.c (captured_main): Update message informing that
690 selftests have been disabled.
691
96643e35
TT
6922018-10-04 Tom Tromey <tom@tromey.com>
693
694 * configure: Rebuild.
695
da4ae14a
TT
6962018-10-04 Tom Tromey <tom@tromey.com>
697
698 * server.c (handle_status): Rename inner "thread".
699 (process_serial_event): Declare "res" in 'm' case.
700 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
701 (iterate_over_lwps): Rename inner "thread".
702 (linux_qxfer_libraries_svr4): Rename inner "len".
703 * gdbthread.h (find_thread_in_random): Rename inner "thread".
704
7c619dbd
GB
7052018-10-01 Gary Benson <gbenson@redhat.com>
706
707 * gdb_proc_service.h: Moved common code to
708 common/gdb_proc_service.h.
709
3795e814
GB
7102018-10-01 Gary Benson <gbenson@redhat.com>
711
712 * gdb_proc_service.h: Synchronize comments and whitespace with
713 GDB's version of this file.
714
49b036f1
TT
7152018-09-25 Tom Tromey <tom@tromey.com>
716
717 * configure: Rebuild.
718 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
719
8ff03f0b
SM
7202018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
721
722 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
723 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
724 ($(IPA_LIB)): Sort IPA_OBJS.
725
a1cd91dc
SM
7262018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
727
728 * Makefile.in: Remove references to $(ADD_DEPS).
729
752312ba
TT
7302018-09-16 Tom Tromey <tom@tromey.com>
731
732 * remote-utils.c (remote_open): Use GNU style for metasyntactic
733 variables.
734 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
735 variables.
736
f1628857
TT
7372018-09-05 Tom Tromey <tom@tromey.com>
738
739 * configure: Rebuild.
740
ad202fcc
SM
7412018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
742
743 PR build/23399
744 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
745
d3d8724a
TT
7462018-08-27 Tom Tromey <tom@tromey.com>
747
748 PR build/23087:
749 * configure: Rebuild.
750
b4f183d2
TT
7512018-08-27 Tom Tromey <tom@tromey.com>
752
753 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
754 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
755 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
756 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
757 (s390x_emit_stack_adjust): Add casts to unsigned char.
758
4e2aa472
SM
7592018-08-22 Simon Marchi <simon.marchi@ericsson.com>
760
761 PR gdb/23374
762 PR gdb/23375
763 * server.h (struct client_state) <disable_randomization>:
764 Initialize to 1.
765
cf4088a9
SM
7662018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
767
768 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
769 variable.
770 (mips_supply_ptrace_register): Likewise.
771
a0de763e
TT
7722018-07-22 Tom Tromey <tom@tromey.com>
773
774 * configure: Rebuild.
775
b0a7723d
TT
7762018-07-22 Tom Tromey <tom@tromey.com>
777
778 * win32-low.c (win32_create_inferior): Remove unused variables.
779 * gdbreplay.c (remote_open): Remove unused variable.
780 * remote-utils.c (remote_prepare): Remove unused variable.
781 * x86-tdesc.h (X86_TDESC_H): Define.
782 (amd64_expedite_regs): Define conditionally.
783 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
784 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
785 * remote-utils.c (readchar): Remove unused variable.
786
a780ef4f
PA
7872018-07-13 Pedro Alves <palves@redhat.com>
788
789 * linux-low.c (linux_kill): Change parameter to process_info
790 pointer instead of pid. Adjust.
791 * lynx-low.c (lynx_kill): Likewise.
792 * nto-low.c (nto_kill): Likewise.
793 * spu-low.c (spu_kill): Likewise.
794 * win32-low.c (win32_kill): Likewise.
795 * server.c (handle_v_kill, kill_inferior_callback)
796 (detach_or_kill_for_exit): Adjust.
797 * target.c (kill_inferior): Change parameter to process_info
798 pointer instead of pid. Adjust.
799 * target.h (struct target_ops) <kill>: Change parameter to
800 process_info pointer instead of pid. Adjust all implementations
801 and callers.
802 (kill_inferior): Likewise.
803
ef2ddb33
PA
8042018-07-13 Pedro Alves <palves@redhat.com>
805
806 * linux-low.c (linux_detach, linux_join): Change parameter to
807 process_info pointer instead of pid. Adjust.
808 * lynx-low.c (lynx_detach, lynx_join): Likewise.
809 * nto-low.c (nto_detach): Likewise.
810 * spu-low.c (spu_detach, spu_join): Likewise.
811 * win32-low.c (win32_detach, win32_join): Likewise.
812 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
813 * target.h (struct target_ops) <detach, join>: Change parameter to
814 process_info pointer instead of pid. Adjust all implementations
815 and callers.
816 (detach_inferior, join_inferior): Rename 'pid' parameter to
817 'proc'.
818
c7ab0aef
SDJ
8192018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
820 Jan Kratochvil <jan.kratochvil@redhat.com>
821 Paul Fertser <fercerpav@gmail.com>
822 Tsutomu Seki <sekiriki@gmail.com>
823
824 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
825 (OBS): Add 'common/netstuff.o'.
826 (GDBREPLAY_OBS): Likewise.
827 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
828 (remote_open): Implement support for IPv6
829 connections.
830 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
831 and 'wspiapi.h'.
832 (handle_accept_event): Accept connections from IPv6 sources.
833 (remote_prepare): Handle IPv6-style hostnames; implement
834 support for IPv6 connections.
835 (remote_open): Implement support for printing connections from
836 IPv6 sources.
837
31445d10
PA
8382018-07-11 Pedro Alves <palves@redhat.com>
839
840 PR gdb/23377
841 * mem-break.c (any_persistent_commands): Add process_info
842 parameter and use it instead of relying on the current process.
843 Change return type to bool.
844 * mem-break.h (any_persistent_commands): Add process_info
845 parameter and change return type to bool.
846 * server.c (handle_detach): Remove require_running_or_return call.
847 Look up the process_info for the process we're about to detach.
848 If not found, return back error to GDB. Adjust
849 any_persistent_commands call to pass down a process pointer.
850
cb197132
PA
8512018-07-11 Pedro Alves <palves@redhat.com>
852
853 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
854 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
855 instead of collect_register_by_name.
856 * regcache.c (regcache_raw_get_unsigned_by_name): New.
857 * regcache.h (regcache_raw_get_unsigned_by_name): New.
858
1b919490
VB
8592018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
860 Pedro Alves <palves@redhat.com>
861
862 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
863
d7e15655
TT
8642018-07-03 Tom Tromey <tom@tromey.com>
865
866 * linux-low.c: Update.
867 * lynx-low.c: Update.
868 * mem-break.c: Update.
869 * nto-low.c: Update.
870 * remote-utils.c: Update.
871 * server.c: Update.
872 * spu-low.c: Update.
873 * target.c: Update.
874 * win32-low.c: Update.
875
26a57c92
TT
8762018-07-03 Tom Tromey <tom@tromey.com>
877
878 * server.c: Update.
879
0e998d96
TT
8802018-07-03 Tom Tromey <tom@tromey.com>
881
882 * linux-low.c: Update.
883
cc6bcb54
TT
8842018-07-03 Tom Tromey <tom@tromey.com>
885
886 * target.c: Update.
887
e38504b3
TT
8882018-07-03 Tom Tromey <tom@tromey.com>
889
890 * linux-low.c: Update.
891 * linux-mips-low.c: Update.
892 * lynx-low.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 * thread-db.c: Update.
899
e99b03dc
TT
9002018-07-03 Tom Tromey <tom@tromey.com>
901
902 * linux-low.c: Update.
903 * linux-mips-low.c: Update.
904 * lynx-low.c: Update.
905 * mem-break.c: Update.
906 * nto-low.c: Update.
907 * remote-utils.c: Update.
908 * server.c: Update.
909 * spu-low.c: Update.
910 * target.c: Update.
911 * tracepoint.c: Update.
912
f2907e49
TT
9132018-07-03 Tom Tromey <tom@tromey.com>
914
915 * linux-low.c: Update.
916 * linux-ppc-low.c: Update.
917 * linux-x86-low.c: Update.
918 * proc-service.c: Update.
919 * server.c: Update.
920 * spu-low.c: Update.
921 * thread-db.c: Update.
922 * win32-low.c: Update.
923
fd79271b
TT
9242018-07-03 Tom Tromey <tom@tromey.com>
925
926 * linux-low.c: Update.
927 * lynx-low.c: Update.
928 * nto-low.c: Update.
929 * remote-utils.c: Update.
930 * spu-low.c: Update.
931 * thread-db.c: Update.
932 * win32-low.c: Update.
933
c0867626
SDJ
9342018-06-29 Joel Brobecker <brobecker@adacore.com>
935
936 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
937 parameter in call to 'amd64_create_target_description'.
938
2512d7ef
JK
9392018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
940
941 * x86-tdesc.h: Remove executable permission flag.
942
d0ac1c44
SM
9432018-06-19 Simon Marchi <simon.marchi@ericsson.com>
944
945 * configure.ac: Remove AC_PREREQ, add missing quoting.
946 * configure: Re-generate.
947 * config.in: Re-generate.
948 * aclocal.m4: Re-generate.
949
c4eb05ff
SM
9502018-06-18 Simon Marchi <simon.marchi@ericsson.com>
951
952 * tracepoint.h (current_traceframe): Remove declaration.
953
02895270
AH
9542018-06-18 Alan Hayward <alan.hayward@arm.com>
955
956 * linux-aarch64-low.c (is_sve_tdesc): New function.
957 (aarch64_sve_regs_copy_to_regcache): Likewise.
958 (aarch64_sve_regs_copy_from_regcache): Likewise.
959 (aarch64_regs_info): Add SVE checks.
960 (initialize_low_arch): Initialize SVE.
961
e9902bfc
AH
9622018-06-18 Alan Hayward <alan.hayward@arm.com>
963
964 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
965
fefa175e
AH
9662018-06-11 Alan Hayward <alan.hayward@arm.com>
967
968 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
969 (initialize_low_tracepoint): Likewise
970 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
971 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
972 param.
973 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
974 checks.
975 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
976
b91ad3ff
AH
9772018-06-11 Alan Hayward <alan.hayward@arm.com>
978
979 * server.h (PBUFSIZ): Increase size
980
f868386e
AH
9812018-06-11 Alan Hayward <alan.hayward@arm.com>
982
983 * regcache.c (regcache::raw_compare): New function.
984 * regcache.h (regcache::raw_compare): New declaration.
985
9c861883
AH
9862018-06-11 Alan Hayward <alan.hayward@arm.com>
987
988 * regcache.c (new_register_cache): Use new.
989 (free_register_cache): Use delete.
990 (register_data): Use const.
991 (supply_register): Move body inside regcache.
992 (regcache::raw_supply): New override function.
993 (collect_register): Move body inside regcache.
994 (regcache::raw_collect): New override function.
995 (regcache::get_register_status): New override function.
996 * regcache.h (struct regcache): Inherit from reg_buffer_common.
997
40591844
TT
9982018-06-09 Tom Tromey <tom@tromey.com>
999
1000 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1001 declare queue.
1002 (event_queue): Use std::queue.
1003 (gdb_event_xfree): Remove.
1004 (initialize_event_loop, process_event, wait_for_event): Update.
1005
6341380d
SC
10062018-06-08 Stan Cox <scox@redhat.com>
1007
1008 * win32-low.c (win32_create_inferior): last_ptid and last_status
1009 moved to client_state.
1010
03349c93
PA
10112018-06-08 Pedro Alves <palves@redhat.com>
1012
1013 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1014 common/common-exceptions.o, common/common-utils.o,
1015 common/errors.o, common/print-utils.o and utils.o.
1016 * gdbreplay.c: Include "common-defs.h" instead of the two
1017 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1018 string.h or alloca.h.
1019 (perror_with_name): Delete.
1020 (remote_open): Use xstrdup instead of strdup.
1021 (main): Rename to ...
1022 (captured_main): ... this.
1023 (main): New.
1024
8dcc53b3
TT
10252018-06-08 Tom Tromey <tom@tromey.com>
1026
1027 * linux-low.c (linux_low_read_btrace): Update.
1028
c12a5089
SC
10292018-06-04 Stan Cox <scox@redhat.com>
1030
1031 * server.h (struct client_state): New.
1032 * server.c (cont_thread, general_thread, multi_process)
1033 (report_fork_events, report_vfork_events, report_exec_events)
1034 (report_thread_events, swbreak_feature, hwbreak_feature)
1035 (vCont_supported, disable_randomization, pass_signals)
1036 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1037 Moved to client_state.
1038 * remote-utils.c (remote_debug, noack_mode)
1039 (transport_is_reliable): Moved to client_state.
1040 * tracepoint.c (current_traceframe): Moved to client_state.
1041
1042 Update all callers.
1043 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1044 linux-low.c, remote-utils.h, target.c: Use client_state.
1045
122394f1
AH
10462018-05-31 Alan Hayward <alan.hayward@arm.com>
1047
1048 * configure.srv: Add new c/h file.
1049
95228a0d
AH
10502018-05-31 Alan Hayward <alan.hayward@arm.com>
1051
1052 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1053 null VQ.
1054
d8dab6c3
MR
10552018-05-25 Maciej W. Rozycki <macro@mips.com>
1056
1057 * gdb.arch/mips-fpregset-core.exp: New test.
1058 * gdb.arch/mips-fpregset-core.c: New test source.
1059
81e25b7c
EK
10602018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1061
1062 PR server/23198
1063 * hostio.c (require_int): Do not report overflow for integers
1064 between 0xfffffff and 0x7fffffff.
1065
7e947ad3
MR
10662018-05-22 Maciej W. Rozycki <macro@mips.com>
1067
1068 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1069 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1070 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1071 functions.
1072 (the_low_target): Wire them.
1073
1d75a658
PFC
10742018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1075
1076 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1077 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1078 mode. Call collect_register_by_name with vscr using
1079 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1080 (ppc_store_vrregset): Add and set vscr_offset variable as in
1081 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1082 vscr_offset.
1083
d078308a
PFC
10842018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1085
1086 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1087 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1088 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1089
7273b5fc
PFC
10902018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1091
1092 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1093 (ppc_store_vsxregset): Likewise.
1094 (ppc_fill_vrregset): Likewise.
1095 (ppc_store_vrregset): Likewise.
1096 (ppc_fill_evrregset): Likewise.
1097 (ppc_store_evrregset): Likewise.
1098 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1099 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1100 needed.
1101
2e077f5e
PFC
11022018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1103
1104 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1105 wordsize of the inferior. Call ppc_linux_target_wordsize.
1106
bd64614e
PFC
11072018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1108
1109 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1110 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1111 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1112 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1113 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1114 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1115 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1116 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1117 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1118 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1119 (tdesc_powerpc_e500l): Remove.
1120 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1121 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1122 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1123 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1124 linux-ppc-tdesc.h.
1125 (ppc_arch_setup): Remove target description matching code. Fill a
1126 ppc_linux_features struct and call ppc_linux_match_description
1127 with it.
1128
75d74cca
MR
11292018-05-22 Maciej W. Rozycki <macro@mips.com>
1130
1131 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1132 width of the requested register exceeds the width of the
1133 `ptrace' data type.
1134 (mips_cannot_store_register): Likewise.
1135
e4439e43
MR
11362018-05-21 Maciej W. Rozycki <macro@mips.com>
1137
1138 * linux-mips-low.c (mips_fetch_register): New function. Update
1139 preceding comment.
1140 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1141 (the_low_target): Wire `mips_fetch_register'.
1142
55271bf9
JB
11432018-05-10 Joel Brobecker <brobecker@adacore.com>
1144
1145 * lynx-i386-low.c (LYNXOS_178): New macro.
1146 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1147 the layout on LynxOS-178.
1148 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1149 handle floating point registers that are not supported by
1150 LynxOS-178.
1151
1a34f210
TT
11522018-05-10 Tom Tromey <tom@tromey.com>
1153
1154 * configure: Rebuild.
1155
190852c8
JB
11562018-05-10 Joel Brobecker <brobecker@adacore.com>
1157
1158 PR server/23158:
1159 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1160 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1161 Use it to set the expedite_regs field in the given tdesc.
1162 * x86-tdesc.h: New file.
1163 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1164 Adjust following the addition of the new expedite_regs parameter
1165 to init_target_desc.
1166 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1167 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1168 (i386_linux_read_description, amd64_linux_read_description):
1169 Adjust following the addition of the new expedite_regs parameter
1170 to init_target_desc.
1171 * lynx-i386-low.c: #include "x86-tdesc.h".
1172 (lynx_i386_arch_setup): Adjust following the addition of the new
1173 expedite_regs parameter to init_target_desc.
1174 * nto-x86-low.c: #include "x86-tdesc.h".
1175 (nto_x86_arch_setup): Adjust following the addition of the new
1176 expedite_regs parameter to init_target_desc.
1177 * win32-i386-low.c: #include "x86-tdesc.h".
1178 (i386_arch_setup): Adjust following the addition of the new
1179 expedite_regs parameter to init_target_desc.
1180
7dbac825
JB
11812018-05-10 Joel Brobecker <brobecker@adacore.com>
1182
1183 PR server/23158:
1184 * win32-low.c (win32_create_inferior): Add call to my_wait
1185 setting last_status global.
1186
906994d9
JB
11872018-05-10 Joel Brobecker <brobecker@adacore.com>
1188
1189 PR server/23158:
1190 * win32-low.c (create_process): Only call gdb_tilde_expand if
1191 inferior_cwd is not NULL.
1192
8ee22052
AB
11932018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1194
1195 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1196 registers to the cache if their values have changed.
1197 (i387_xsave_to_cache): Provide default values for x87 control
1198 registers when these features are available, but disabled.
1199 * regcache.c (supply_register_by_name_zeroed): New function.
1200 * regcache.h (supply_register_by_name_zeroed): Declare new
1201 function.
1202
aff689d3
TT
12032018-05-07 Tom Tromey <tom@tromey.com>
1204
1205 * configure: Rebuild.
1206
85e26832
TT
12072018-05-04 Tom Tromey <tom@tromey.com>
1208
1209 * configure: Rebuild.
1210
a3b60e45
JK
12112018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1212 Pedro Alves <palves@redhat.com>
1213
1214 * linux-aarch64-low.c (aarch64_stopped_data_address):
1215 Likewise.
1216
632e107b
TT
12172018-04-27 Tom Tromey <tom@tromey.com>
1218
1219 * configure: Rebuild.
1220
458412c3
TT
12212018-04-23 Tom Tromey <tom@tromey.com>
1222
1223 * configure: Rebuild.
1224
f31c089e
SM
12252018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1226
1227 * Makefile.in (depcomp): Add "..".
1228 (all_deps_files): New and use it.
1229
b319b098
AH
12302018-04-18 Alan Hayward <alan.hayward@arm.com>
1231
1232 * configure.srv (aarch64*-*-linux*): Don't include xml.
1233 (i[34567]86-*-cygwin*): Likewise.
1234 (i[34567]86-*-linux*): Likewise.
1235 (i[34567]86-*-lynxos*): Likewise.
1236 (i[34567]86-*-mingw32ce*): Likewise.
1237 (i[34567]86-*-mingw*): Likewise.
1238 (i[34567]86-*-nto*): Likewise.
1239 (tic6x-*-uclinux): Likewise.
1240 (x86_64-*-linux*): Likewise.
1241 (x86_64-*-mingw*): Likewise.
1242 (x86_64-*-cygwin*): Likewise.
1243
3b74854b
AH
12442018-04-18 Alan Hayward <alan.hayward@arm.com>
1245
1246 * tdesc.c: Remove xml parameter.
1247
e98577a9
AH
12482018-04-18 Alan Hayward <alan.hayward@arm.com>
1249
1250 * server.c (get_features_xml): Remove cast.
1251 * tdesc.c (void target_desc::accept): Fill in function.
1252 (tdesc_get_features_xml): Remove old xml creation.
1253 (print_xml_feature::visit_pre): Add xml vistor.
1254 * tdesc.h (struct target_desc): Make xmltarget mutable.
1255 (tdesc_get_features_xml): Remove declaration.
1256
d278f585
AH
12572018-04-18 Alan Hayward <alan.hayward@arm.com>
1258
1259 * tdesc.c (tdesc_architecture_name): Add new function.
1260 (tdesc_osabi_name): Likewise.
1261 (tdesc_get_features_xml): Use new functions.
1262
eee8a18d
AH
12632018-04-18 Alan Hayward <alan.hayward@arm.com>
1264
1265 * tdesc.c (tdesc_create_flags): Remove.
1266 (tdesc_add_flag): Likewise.
1267 (tdesc_named_type): Likewise.
1268 (tdesc_create_union): Likewise.
1269 (tdesc_create_struct): Likewise.
1270 (tdesc_create_vector): Likewise.
1271 (tdesc_add_bitfield): Likewise.
1272 (tdesc_add_field): Likewise.
1273 (tdesc_set_struct_size): Likewise.
1274
82ec9bc7
AH
12752018-04-18 Alan Hayward <alan.hayward@arm.com>
1276
1277 * tdesc.c (~target_desc): Remove implictly deleted items.
1278 (init_target_desc): Iterate all features.
1279 (tdesc_get_features_xml): Use vector.
1280 (tdesc_create_feature): Create feature.
1281 * tdesc.h (tdesc_feature) Remove
1282 (target_desc): Add features.
1283
ea3e7d71
AH
12842018-04-18 Alan Hayward <alan.hayward@arm.com>
1285
1286 * Makefile.in: Add common/tdesc.c
1287 * tdesc.c (init_target_desc): init all reg_defs from register
1288 vector.
1289 (tdesc_create_reg): Create tdesc_reg.
1290 * tdesc.h (tdesc_feature): Add register vector.
1291
17d08cd4
SM
12922018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1293
1294 * tdesc.h (struct target_desc) <features>: Change type to
1295 std::vector<std::string>.
1296 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1297 changes.
1298 (tdesc_get_features_xml): Likewise.
1299 (tdesc_create_feature): Likewise.
1300
5cd3e386
AH
13012018-03-26 Alan Hayward <alan.hayward@arm.com>
1302
1303 * regcache.c (find_register_by_number): Return a ref.
1304 (find_regno): Use references.
1305 (register_size): Likewise.
1306 (register_data): Likewise.
1307 * tdesc.c (target_desc::~target_desc): Remove free calls.
1308 (target_desc::operator==): Use std::vector compare.
1309 (init_target_desc): Use reference.
1310 (tdesc_create_reg): Use reg constructors.
1311 * tdesc.h (struct target_desc): Replace pointer with object.
1312
dff7492c
AH
13132018-03-23 Alan Hayward <alan.hayward@arm.com>
1314
1315 * regcache.c (find_register_by_number): Make static.
1316 (find_regno): Use find_register_by_number
1317 * regcache.h (struct reg): Remove declaration.
1318
d80e5242
AH
13192018-03-23 Alan Hayward <alan.hayward@arm.com>
1320
1321 * tdesc.c (target_desc::~target_desc): Move to here.
1322 (target_desc::operator==): Likewise.
1323 * tdesc.h (target_desc::~target_desc): Move from here.
1324 (target_desc::operator==): Likewise.
1325
f69c5afb
AA
13262018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1327
1328 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1329
ce29f843
AA
13302018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1331
1332 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1333 S390_TDESC_GS.
1334 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1335 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1336 and init_registers_s390_gs_linux64.
1337
c49bd90b
AA
13382018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1339
1340 * linux-s390-low.c (s390_fill_gs): Remove function.
1341 (s390_fill_gsbc): Remove function.
1342 (s390_regsets): Set fill functions for the guarded storage regsets
1343 to NULL.
1344
7edb9bd3
AA
13452018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1346
1347 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1348 the word size. Add comment.
1349 (s390_get_wordsize): New function.
1350 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1351 pswm with it. Instead, use s390_get_wordsize to determine the
1352 word size first and derive the correct tdesc from that directly.
1353
39be3c7e
SM
13542018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1355
1356 * Makefile.in: Include silent-rules.mk.
1357 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1358 (COMPILE): Add ECHO_CXX.
1359 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1360 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1361 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1362 (version-generated.c): Add ECHO_GEN.
1363 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1364 (IPAGENT_COMPILE): Add ECHO_CXX.
1365 (%-generated.c): Add ECHO_REGDAT.
1366
3ae9ce5d
TT
13672018-03-14 Tom Tromey <tom@tromey.com>
1368
1369 PR cli/14977:
1370 * ax.c (ax_printf): Special case for NULL.
1371
e6a58aa8
SM
13722018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1373
1374 * linux-low.c (linux_qxfer_libraries_svr4): Use
1375 xml_escape_text_append.
1376
f6e8a41e
SM
13772018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1378
1379 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1380
b9671caf
SM
13812018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1382
1383 * server.c (handle_general_set): Remove unnecessary xstrdup.
1384
e80aaf61
SM
13852018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1386
1387 * server.c (parse_debug_format_options): Adjust to
1388 delim_string_to_char_ptr_vec changes.
1389 * thread-db.c (thread_db_load_search): Adjust to
1390 dirnames_to_char_ptr_vec changes.
1391
b1223e78
MM
13922018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1393
1394 * target.h (target_enable_btrace, target_disable_btrace)
1395 (target_read_btrace, target_read_btrace_conf): Turn macro into
1396 inline function. Throw error if target method is not defined.
1397 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1398 check for btrace target method. Be prepared to handle exceptions
1399 from btrace target methods.
1400
81561546
SDJ
14012018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1402
1403 * server.c (captured_main): Change order of error message printed
1404 when the current working directory cannot be found.
1405
25e3c82c
SDJ
14062018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1407
1408 * server.c: Include "filenames.h" and "pathstuff.h".
1409 (program_name): Delete variable.
1410 (program_path): New anonymous class.
1411 (get_exec_wrapper): Use "program_path" instead of
1412 "program_name".
1413 (handle_v_run): Likewise.
1414 (captured_main): Likewise.
1415 (process_serial_event): Likewise.
1416
b4987c95
SDJ
14172018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1418
1419 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1420 (OBJS): Add "pathstuff.o".
1421 * server.c (current_directory): New global variable.
1422 (captured_main): Initialize "current_directory".
1423
f46cd62a
AH
14242018-02-26 Alan Hayward <alan.hayward@arm.com>
1425
1426 * tdesc.c: Use common/tdesc.h.
1427 * tdesc.h: Likewise.
1428
a543c5ca
AH
14292018-02-20 Alan Hayward <alan.hayward@arm.com>
1430 Simon Marchi <simon.marchi@ericsson.com>
1431
1432 * Makefile.in: Switch order of make rules.
1433
b5884fa7
AH
14342018-02-19 Alan Hayward <alan.hayward@arm.com>
1435
1436 * Makefile.in: Add common directory in build.
1437 * configure.ac: Add common reference.
1438 * configure: Regenerate.
1439
de6242d3
MM
14402018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1441
1442 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1443 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1444 * spu-low.c (spu_target_ops): Likewise.
1445 * win32-low.c (win32_target_ops): Likewise.
1446 * server.c (supported_btrace_packets): Report packets unconditionally.
1447 * target.h (target_ops) <supports_btrace>: Remove.
1448 (target_supports_btrace): Remove.
1449
9ee23a85
MM
14502018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1451
1452 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1453 (handle_btrace_disable): Change return type to void. Use exceptions
1454 to report errors.
1455 (handle_btrace_general_set): Catch exception and copy message to
1456 return message.
1457
8ce47547
TT
14582018-02-08 Tom Tromey <tom@tromey.com>
1459
1460 * linux-low.c (install_software_single_step_breakpoints): Use
1461 make_scoped_restore.
1462 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1463 (do_restore_current_thread_cleanup): Remove.
1464 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1465 declare.
1466
45dd3607
TT
14672018-02-08 Tom Tromey <tom@tromey.com>
1468
1469 * mem-break.c (set_raw_breakpoint_at): Use
1470 gdb::unique_xmalloc_ptr.
1471
e671cd59
PA
14722018-01-30 Pedro Alves <palves@redhat.com>
1473
1474 PR gdb/13211
1475 * target.c (target_terminal::terminal_state): Rename to ...
1476 (target_terminal::m_terminal_state): ... this.
1477
a0aad537
JC
14782018-01-19 James Clarke <jrtc27@jrtc27.com>
1479
1480 * linux-low.c (handle_extended_wait): Surround call to
1481 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1482
4d9b86e1
SM
14832018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1484
1485 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1486 linux_ptrace_attach_fail_reason_string now returning an
1487 std::string.
1488 (linux_attach): Likewise.
1489 * thread-db.c (attach_thread): Likewise.
1490
f517c180
EA
14912018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1492
1493 PR gdb/21559
1494 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1495 checking for fs_base/gs_base fields in struct user_regs_struct.
1496 * configure: Regenerate.
1497
9a70f35c
YQ
14982018-01-16 Yao Qi <yao.qi@linaro.org>
1499
1500 PR gdb/18749
1501 * linux-low.c (fetch_register): Call supply_register instead of
1502 error.
1503
605fd3c6
YQ
15042018-01-08 Yao Qi <yao.qi@linaro.org>
1505 Simon Marchi <simon.marchi@ericsson.com>
1506
1507 * Makefile.in (OBS): Remove selftest.o.
1508 * configure.ac: Set srv_selftest_objs if $development is true.
1509 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1510 * configure: Re-generated.
1511 * server.c (captured_main): Wrap variable selftest_filter with
1512 GDB_SELF_TEST.
1513
2cc05030
SM
15142018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1515
1516 * server.c (parse_debug_format_options): Return std::string.
1517 (handle_monitor_command, captured_main): Adjust.
1518
e379cee6
PA
15192018-01-05 Pedro Alves <palves@redhat.com>
1520
1521 PR gdb/18653
1522 * server.c (captured_main): Pass quiet=false to
1523 save_original_signals_state.
1524
82e1e79a
JB
15252018-01-01 Joel Brobecker <brobecker@adacore.com>
1526
1527 * gdbreplay.c (gdbreplay_version): Update copyright year in
1528 version message.
1529 * server.c (gdbserver_version): Likewise.
1530
8e481c3b
TT
15312017-12-08 Tom Tromey <tom@tromey.com>
1532
1533 * ax.c (ax_printf): Update.
1534
a8806230
YQ
15352017-12-07 Yao Qi <yao.qi@linaro.org>
1536
1537 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1538 aarch64_linux_read_description.
1539 * linux-amd64-ipa.c (idx2mask): New array.
1540 (get_ipa_tdesc): Move idx2mask out.
1541 (initialize_low_tracepoint): Initialize target descriptions.
1542 * linux-i386-ipa.c (idx2mask): New array.
1543 (get_ipa_tdesc): Move idx2mask out.
1544 (initialize_low_tracepoint): Initialize target descriptions.
1545
d4a0e8b5
SM
15462017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1547
1548 * tdesc.c (struct tdesc_type): Change return type.
1549 (tdesc_add_flag): Change parameter type.
1550 (tdesc_add_bitfield): Likewise.
1551 (tdesc_add_field): Likewise.
1552 (tdesc_set_struct_size): Likewise.
1553
798a7429
SM
15542017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1555
1556 * regcache.c (registers_to_string): Remove unused variable.
1557
c0e15c9b
SM
15582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1559
1560 * inferiors.c (for_each_inferior_with_data): Remove.
1561 * inferiors.h (for_each_inferior_with_data): Remove.
1562 * server.c (handle_qxfer_threads_worker): Change parameter type.
1563 (handle_qxfer_threads_proper): Use for_each_thread.
1564
f0045347
SM
15652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1566
1567 * inferiors.c (for_each_inferior): Remove.
1568 (clear_inferiors): Use for_each_thread.
1569 * inferiors.h (for_each_inferior): Remove.
1570 * linux-low.c (linux_wait_for_event_filtered): Use
1571 for_each_thread.
1572 (linux_stabilize_threads): Likewise.
1573 * regcache.c (regcache_release): Likewise.
1574 * server.c (gdb_wants_all_threads_stopped): Likewise.
1575 (clear_pending_status_callback): Remove.
1576 (handle_status): Use for_each_thread.
1577 (captured_main): Likewise.
1578 * win32-low.c (child_init_thread_list): Likewise.
1579 (win32_clear_inferiors): Likewise.
1580 (fake_breakpoint_event): Likewise.
1581
9521758b
SM
15822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1583
1584 * inferiors.h (find_inferior): Remove.
1585 * inferiors.c (find_inferior): Remove.
1586
8f86d7aa
SM
15872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1588
1589 * linux-low.c (resume_status_pending_p): Update comment.
1590 (need_step_over_p): Update comment.
1591
e2b44075
SM
15922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1593
1594 * linux-low.c (proceed_one_lwp): Return void, change parameter
1595 type.
1596 (unsuspend_and_proceed_one_lwp): Likewise.
1597 (proceed_all_lwps): Use for_each_thread.
1598 (unstop_all_lwps): Likewise.
1599
c80825ff
SM
16002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1601
1602 * linux-low.c (linux_resume_one_thread): Return void, take
1603 parameter directly.
1604 (linux_resume): Use for_each_thread.
1605
df3e4dbe
SM
16062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1607
1608 * linux-low.c (send_sigstop_callback): Return void, change
1609 parameter type. Rename to...
1610 (send_sigstop): ... this.
1611 (suspend_and_send_sigstop_callback): Return void, change parameter
1612 type. Rename to...
1613 (suspend_and_send_sigstop): ... this.
1614 (stop_all_lwps): Use for_each_thread.
1615
5a6b0a41
SM
16162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1617
1618 * linux-low.c (lwp_running): Return bool, remove unused
1619 argument.
1620 (linux_stabilize_threads): Use find_thread.
1621
39a64da5
SM
16222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1623
1624 * linux-low.c (select_singlestep_lwp_callback): Remove.
1625 (count_events_callback): Remove.
1626 (select_event_lwp_callback): Remove.
1627 (select_event_lwp): Use find_thread/for_each_thread.
1628
a1385b7b
SM
16292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1630
1631 * linux-low.c (not_stopped_callback): Return bool, take filter
1632 argument directly.
1633 (linux_wait_for_event_filtered): Use find_thread.
1634 (linux_wait_1): Likewise.
1635
454296a2
SM
16362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1637
1638 * linux-low.c (same_lwp): Remove.
1639 (find_lwp_pid): Use find_thread.
1640
6b2a85da
SM
16412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1642
1643 * linux-low.c (delete_lwp_callback): Remove.
1644 (linux_mourn): Use for_each_thread.
1645
798a38e8
SM
16462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1647
1648 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1649 args parameter, don't check for pid.
1650 (linux_detach): Use for_each_thread.
1651
e4eb0dec
SM
16522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1653
1654 * linux-low.c (struct counter): Remove.
1655 (second_thread_of_pid_p): Remove.
1656 (last_thread_of_process_p): Use find_thread.
1657
83e1b6c1
SM
16582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1659
1660 * inferiors.c (find_inferior_in_random): Remove.
1661 * inferiors.h (find_inferior_in_random): Remove.
1662 * linux-low.c (status_pending_p_callback): Return bool, accept
1663 parameter ptid directly.
1664 (linux_wait_for_event_filtered): Use find_thread_in_random.
1665 (linux_wait_1): Likewise.
1666
8dc7b443
SM
16672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1668
1669 * inferiors.c (find_inferior_id): Remove.
1670 (find_thread_ptid): Move implemention from find_inferior_id to
1671 here.
1672 * inferiors.h (find_inferior_id): Remove.
1673 * server.c (handle_status): Use find_thread_ptid.
1674 (process_serial_event): Likewise.
1675 * thread-db.c (find_one_thread): Likewise.
1676 (thread_db_thread_handle): Likewise.
1677 * win32-low.c (thread_rec): Likewise.
1678 (child_delete_thread): Likewise.
1679 (win32_thread_alive): Likewise.
1680 (get_child_debug_event): Likewise.
1681
da25033c
SM
16822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1683
1684 * linux-mips-low.c (update_watch_registers_callback): Return
1685 void, remove pid_p parameter, don't check for pid.
1686 (mips_insert_point, mips_remove_point): Use for_each_thread.
1687
c91bb56b
SM
16882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1689
1690 * lynx.low (lynx_delete_thread_callback): Remove.
1691 (lynx_mourn): Use for_each_thread.
1692
634a3254
SM
16932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1694
1695 * regcache.c (regcache_invalidate_one): Remove.
1696 (regcache_invalidate_pid): use for_each_thread.
1697
41272101
TT
16982017-11-26 Tom Tromey <tom@tromey.com>
1699
1700 * linux-low.c (linux_create_inferior): Update.
1701
f5291a6f
UW
17022017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1703
1704 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1705
6654d750
AH
17062017-11-24 Alan Hayward <alan.hayward@arm.com>
1707
1708 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1709 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1710 * linux-aarch64-tdesc-selftest.c: New file.
1711 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1712
17132017-11-24 Alan Hayward <alan.hayward@arm.com>
1714
1715 * configure.srv: Add new file.
1716 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1717 * linux-aarch64-tdesc-selftest.c: New file.
1718 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1719
49bdb7ee
AH
17202017-11-24 Alan Hayward <alan.hayward@arm.com>
1721
1722 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1723 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1724 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1725
d6d7ce56
AH
17262017-11-24 Alan Hayward <alan.hayward@arm.com>
1727
1728 * configure.srv: Add new files.
1729 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1730 aarch64_linux_read_description.
1731 * linux-aarch64-low.c (aarch64_linux_read_description):
1732 Merge with aarch64_arch_setup.
1733 (aarch64_arch_setup): Call aarch64_linux_read_description.
1734 * linux-aarch64-tdesc.c: New file.
1735 * linux-aarch64-tdesc.h: New file.
1736
506fe5f4
YQ
17372017-11-24 Yao Qi <yao.qi@linaro.org>
1738
1739 * configure.srv: Set $srv_regobj for tic6x-linux.
1740 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1741 (tic6x_read_description): Move some code to tic6x_arch_setup.
1742 (tic6x_tdesc_test): New function.
1743 (initialize_low_arch): Call selftests::register_test.
1744
29f9a567
YQ
17452017-11-22 Yao Qi <yao.qi@linaro.org>
1746
1747 * remote-utils.c (prepare_resume_reply): Use memcpy.
1748
578290ec
SM
17492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1750
1751 * linux-low.c (kill_one_lwp_callback): Return void, take
1752 argument directly, don't filter on pid.
1753 (linux_kill): Use for_each_thread.
1754
eca55aec
SM
17552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1756
1757 * linux-low.c (need_step_over_p): Return bool, remove dummy
1758 argument.
1759 (linux_resume, proceed_all_lwps): Use find_thread.
1760
25c28b4d
SM
17612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1762
1763 * linux-low.c (resume_status_pending_p): Return bool, remove
1764 flag_p argument.
1765 (linux_resume): Use find_thread.
1766
5fdda392
SM
17672017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1768
1769 * linux-low.c (struct thread_resume_array): Remove.
1770 (linux_set_resume_request): Return void, take arguments
1771 directly.
1772 (linux_resume): Use for_each_thread.
1773
fcb056a5
SM
17742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1775
1776 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1777 return bool, remove data argument.
1778 (linux_stabilize_threads): Use find_thread.
1779
139720c5
SM
17802017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1781
1782 * linux-low.c (unsuspend_one_lwp): Remove.
1783 (unsuspend_all_lwps): Use for_each_thread, inline code from
1784 unsuspend_one_lwp.
1785
6d1e5673
SM
17862017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1787
1788 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1789 * linux-low.c (struct iterate_over_lwps_args): Remove.
1790 (iterate_over_lwps_filter): Remove.
1791 (iterate_over_lwps): Use find_thread.
1792
bbf550d5
SM
17932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1794
1795 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1796 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1797 code from reset_lwp_ptrace_options_callback.
1798
00192f77
SM
17992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1800
1801 * linux-arm-low.c (struct update_registers_data): Remove.
1802 (update_registers_callback): Return void, take arguments
1803 directly, don't check thread's pid.
1804 (arm_insert_point, arm_remove_point): Use for_each_thread.
1805
2bee2b6c
SM
18062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1807
1808 * win32-low.c (continue_one_thread): Return void, take argument
1809 directly.
1810 (child_continue): Use for_each_thread.
1811
0b360f19
SM
18122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1813
1814 * win32-i386-low.c (update_debug_registers_callback): Rename
1815 to ...
1816 (update_debug_registers): ... this, return void, remove pid_p arg.
1817 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1818
f27866ba
SM
18192017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1820
1821 * inferiors.h (struct process_info): Add constructor, initialize
1822 fields..
1823 <syscalls_to_catch>: Change type to std::vector<int>.
1824 * inferiors.c (add_process): Allocate process_info with new.
1825 (remove_process): Free process_info with delete.
1826 * linux-low.c (handle_extended_wait): Adjust.
1827 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1828 * server.c (handle_general_set): Adjust.
1829
e849ea89
PA
18302017-11-16 Pedro Alves <palves@redhat.com>
1831
1832 * remote-utils.c (remote_close): Block SIGIO signals instead of
1833 uninstalling the SIGIO handler.
1834
1d0aa65c
AH
18352017-11-16 Alan Hayward <alan.hayward@arm.com>
1836
1837 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1838
3491a34c
YQ
18392017-11-16 Yao Qi <yao.qi@linaro.org>
1840
1841 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1842 (tic6x_store_gregset): Likewise.
1843 (tic6x_usrregs_info): Move it up.
1844
a602f924
AH
18452017-11-15 Alan Hayward <alan.hayward@arm.com>
1846
1847 * Makefile.in: Update arch rules.
1848 * configure.srv: Explicitly mark arch/ files.
1849
5616b6c3
AS
18502017-11-13 Andreas Schwab <schwab@suse.de>
1851
1852 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1853 function.
1854 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1855
d1928160
PA
18562017-11-06 Pedro Alves <palves@redhat.com>
1857
1858 * config.in, configure: Regenerate.
1859
bac608e7
SM
18602017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1861
1862 * target.c (struct thread_search): Remove.
1863 (thread_search_callback): Remove.
1864 (prepare_to_access_memory): Use for_each_thread instead of
1865 find_inferior. Inline code from thread_search_callback.
1866
eaddb425
SM
18672017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1868
1869 * server.c (struct visit_actioned_threads_data): Remove.
1870 (visit_actioned_threads): Change prototype to take arguments
1871 directly.
1872 (resume): Use find_thread instead of find_inferior.
1873
99078d34
SM
18742017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1875
1876 * server.c (queue_stop_reply_callback): Change prototype, return
1877 void.
1878 (find_status_pending_thread_callback): Remove.
1879 (handle_status): Replace find_inferior with find_thread and
1880 for_each_thread.
1881
cc628f3d
AH
18822017-10-25 Alan Hayward <alan.hayward@arm.com>
1883
1884 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1885 with REGNO.
1886 (aarch64_store_gregset): Likewise.
1887 (aarch64_fill_fpregset): Likewise.
1888 (aarch64_store_fpregset): Likewise.
1889
4d3bb80e
SM
18902017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1891
1892 * gdbthread.h (find_thread, for_each_thread): New functions.
1893 * inferiors.c (thread_of_pid): Remove.
1894 (find_any_thread_of_pid): Use find_thread.
1895 * linux-low.c (num_lwps): Use for_each_thread.
1896
7a7cdfa0
YQ
18972017-10-17 Yao Qi <yao.qi@linaro.org>
1898
1899 * Makefile.in: Remove one rule.
1900 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1901
e675d170
YQ
19022017-10-17 Yao Qi <yao.qi@linaro.org>
1903
1904 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1905 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1906
7eb4e0f9
YQ
19072017-10-17 Yao Qi <yao.qi@linaro.org>
1908
1909 * configure.srv: Rename arm.o with arch/arm.o.
1910
60d6cfc9
YQ
19112017-10-17 Yao Qi <yao.qi@linaro.org>
1912
1913 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1914 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1915 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1916 (arch-i386.o, arch-amd64.o): Remove rules.
1917 (arch/%.o): New rule.
1918 Update POSTCOMPILE and COMPILE.pre.
1919 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1920 * configure: Re-generated.
1921 * configure.srv: Replace arch-i386.o with arch/i386.o.
1922 Replace arch-amd64.o with arch/amd64.o.
1923
5bfda255
YQ
19242017-10-16 Yao Qi <yao.qi@linaro.org>
1925
1926 * configure: Regenerated.
1927
9c80ecd6
SM
19282017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1929
1930 * inferiors.h: (struct inferior_list): Remove.
1931 (struct inferior_list_entry); Remove.
1932 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1933 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1934 get_first_inferior): Remove.
1935 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1936 find_inferior_id, find_inferior_in_random): Change signature.
1937 * inferiors.c (all_threads): Change type to
1938 std::list<thread_info *>.
1939 (get_thread): Remove macro.
1940 (find_inferior, find_inferior_id): Change signature, implement
1941 using find_thread.
1942 (find_inferior_in_random): Change signature, implement using
1943 find_thread_in_random.
1944 (for_each_inferior, for_each_inferior_with_data): Change
1945 signature, implement using for_each_thread.
1946 (add_inferior_to_list, remove_inferior): Remove.
1947 (add_thread, get_first_thread, thread_of_pid,
1948 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1949 (get_first_inferior, one_inferior_p, clear_inferior_list):
1950 Remove.
1951 (clear_inferiors, get_thread_process): Update.
1952 * gdbthread.h: Include <list>.
1953 (struct thread_info) <entry>: Remove field.
1954 <id>: New field.
1955 (all_threads): Change type to std::list<thread_info *>.
1956 (get_first_inferior): Add doc.
1957 (find_thread, for_each_thread, find_thread_in_random): New
1958 functions.
1959 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1960 * linux-arm-low.c (update_registers_callback): Update.
1961 * linux-low.c (second_thread_of_pid_p): Update.
1962 (kill_one_lwp_callback, linux_detach_lwp_callback,
1963 delete_lwp_callback, status_pending_p_callback, same_lwp,
1964 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1965 iterate_over_lwps, not_stopped_callback,
1966 resume_stopped_resumed_lwps, count_events_callback,
1967 select_singlestep_lwp_callback, select_event_lwp_callback,
1968 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1969 suspend_and_send_sigstop_callback, wait_for_sigstop,
1970 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1971 lwp_running, linux_set_resume_request, resume_status_pending_p,
1972 need_step_over_p, start_step_over, linux_resume_one_thread,
1973 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1974 reset_lwp_ptrace_options_callback): Update.
1975 * linux-mips-low.c (update_watch_registers_callback): Update.
1976 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1977 Update.
1978 (free_register_cache_thread_one): Remove.
1979 (regcache_release): Update.
1980 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1981 handle_qxfer_threads_worker): Update.
1982 (handle_query): Update, use list iterator.
1983 (visit_actioned_threads, handle_pending_status,
1984 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1985 clear_pending_status_callback, set_pending_status_callback,
1986 find_status_pending_thread_callback, handle_status,
1987 process_serial_event): Update.
1988 * target.c (thread_search_callback): Update.
1989 * thread-db.c (thread_db_get_tls_address): Update.
1990 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1991 Update.
1992 * win32-i386-low.c (update_debug_registers_callback): Update.
1993 * win32-low.c (delete_thread_info, child_delete_thread,
1994 continue_one_thread, suspend_one_thread,
1995 get_child_debug_event): Adjust.
1996
9179355e
SM
19972017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1998
1999 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2000 * inferiors.h: Include <list>.
2001 (struct process_info) <entry>: Remove field.
2002 <pid>: New field.
2003 (pid_of): Change macro to function.
2004 (ptid_of, lwpid_of): Remove macro.
2005 (all_processes): Change type to std::list<process_info *>.
2006 (ALL_PROCESSES): Remove macro.
2007 (for_each_process, find_process): New function.
2008 * inferiors.c (all_processes): Change type to
2009 std::list<process_info *>.
2010 (find_thread_process): Adjust.
2011 (add_process): Likewise.
2012 (remove_process): Likewise.
2013 (find_process_pid): Likewise.
2014 (get_first_process): Likewise.
2015 (started_inferior_callback): Remove.
2016 (have_started_inferiors_p): Adjust.
2017 (attached_inferior_callback): Remove.
2018 (have_attached_inferiors_p): Adjust.
2019 * linux-low.c (check_zombie_leaders): Likewise.
2020 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2021 (x86_linux_update_xmltarget): Adjust.
2022 * server.c (handle_query): Likewise.
2023 (gdb_reattached_process): Remove.
2024 (handle_status): Adjust.
2025 (kill_inferior_callback): Likewise.
2026 (detach_or_kill_inferior): Remove.
2027 (print_started_pid): Likewise.
2028 (print_attached_pid): Likewise.
2029 (detach_or_kill_for_exit): Update.
2030 (process_serial_event): Likewise.
2031 * linux-arm-low.c (arm_new_fork): Likewise.
2032
c9cb8905
SM
20332017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2034
2035 * dll.h: Include <list>.
2036 (struct dll_info): Add constructor.
2037 <entry>: Remove field.
2038 (all_dlls): Change type to std::list<dll_info>.
2039 * dll.c: Include <algorithm>.
2040 (get_dll): Remove macro.
2041 (all_dlls): Change type to std::list<dll_info *>.
2042 (free_one_dll): Remove.
2043 (match_dll): Likewise.
2044 (loaded_dll): Adjust.
2045 (unloaded_dll): Adjust to all_dlls type change, use
2046 std::find_if. Inline code from match_dll.
2047 (clear_dlls): Adjust to all_dlls type change.
2048 * server.c (emit_dll_description): Remove.
2049 (handle_qxfer_libraries): Adjust to all_dlls type change,
2050 integrate emit_dll_description's functionality.
2051
04ec7890
SM
20522017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2053
2054 * linux-low.h (struct linux_target_ops) <delete_process>: New
2055 field.
2056 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2057 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2058 (struct linux_target_ops): Add delete_process callback.
2059 * linux-arm-low.c (arm_delete_process): New.
2060 (struct linux_target_ops): Add delete_process callback.
2061 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2062 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2063 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2064 * linux-mips-low.c (mips_linux_delete_process): New.
2065 (struct linux_target_ops): Add delete_process callback.
2066 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2067 * linux-s390-low.c (struct linux_target_ops): Likewise.
2068 * linux-sh-low.c (struct linux_target_ops): Likewise.
2069 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2070 * linux-tile-low.c (struct linux_target_ops): Likewise.
2071 * linux-x86-low.c (x86_linux_delete_process): New.
2072 (struct linux_target_ops): Add delete_process callback.
2073 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2074
466eecee
SM
20752017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2076
2077 * linux-aarch64-low.c (the_low_target): Add thread delete
2078 callback.
2079 * linux-arm-low.c (arm_delete_thread): New function.
2080 (the_low_target): Add thread delete callback.
2081 * linux-bfin-low.c (the_low_target): Likewise.
2082 * linux-crisv32-low.c (the_low_target): Likewise.
2083 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2084 set.
2085 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2086 field.
2087 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2088 * linux-mips-low.c (mips_linux_delete_thread): New function.
2089 (the_low_target): Add thread delete callback.
2090 * linux-ppc-low.c (the_low_target): Likewise.
2091 * linux-s390-low.c (the_low_target): Likewise.
2092 * linux-sh-low.c (the_low_target): Likewise.
2093 * linux-tic6x-low.c (the_low_target): Likewise.
2094 * linux-tile-low.c (the_low_target): Likewise.
2095 * linux-x86-low.c (the_low_target): Likewise.
2096 * linux-xtensa-low.c (the_low_target): Likewise.
2097
b79f7801
YZ
20982017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2099
2100 * win32-low.c: Include "common-inferior.h".
2101
bc3b087d
SDJ
21022017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2103
2104 * inferiors.c (set_inferior_cwd): New function.
2105 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2106 (handle_query): Inform that QSetWorkingDir is supported.
2107 * win32-low.c (create_process): Pass the inferior's cwd to
2108 CreateProcess.
2109
d092c5a2
SDJ
21102017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2111
2112 * inferiors.c (current_inferior_cwd): New global variable.
2113 (get_inferior_cwd): New function.
2114 * inferiors.h (struct process_info) <cwd>: New field.
2115
7da0a886
SDJ
21162017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2117
2118 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2119 (OBS): Add gdb_tilde_expand.o.
2120
289a6840
SM
21212017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2122
2123 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2124 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2125
256642e8
PA
21262017-09-29 Pedro Alves <palves@redhat.com>
2127
2128 * ax.c (gdb_parse_agent_expr): Constify.
2129 * ax.h (gdb_parse_agent_expr): Constify.
2130 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2131 Constify.
2132 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2133 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2134 * remote-utils.h (read_ptid): Constify.
2135 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2136 (process_point_options, process_serial_event): Constify.
2137 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2138 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2139 (cmd_qtbuffer): Constify.
2140
5b9ca4d4
PA
21412017-09-29 Pedro Alves <palves@redhat.com>
2142
2143 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2144 fails.
2145
94c207e0
PA
21462017-09-29 Pedro Alves <palves@redhat.com>
2147
2148 * linux-low.c (handle_extended_wait): Pass parent thread instead
2149 of process to thread_db_notice_clone.
2150 * linux-low.h (thread_db_notice_clone): Replace parent process
2151 parameter with parent thread parameter.
2152 * thread-db.c (find_one_thread): Add comment.
2153 (thread_db_notice_clone): Replace parent process parameter with
2154 parent thread parameter. Temporarily switch to the parent thread.
2155
75352e28
SDJ
21562017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2157
2158 * gdbthread.h: Include "common-gdbthread.h".
2159 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2160 "if" when validating the ptid.
2161 * remote-utils.c: Include "gdbthread.h".
2162 (prepare_resume_reply): Use "switch_to_thread".
2163 * target.c (done_accessing_memory): Likewise.
2164
ad339634
AA
21652017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2166
2167 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2168 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2169 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2170 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2171 s390x-gs-linux64-ipa.o to ipa_obj.
2172 * linux-s390-low.c (HWCAP_S390_GS): New define.
2173 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2174 New functions.
2175 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2176 (s390_arch_setup): Check for guarded-storage support and choose
2177 appropriate tdesc.
2178 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2179 init_registers_s390x_gs_linux64.
2180 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2181 enum value.
2182 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2183 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2184
cc4d742f
SM
21852017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2186
2187 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2188
f6327dcb
KB
21892017-09-21 Kevin Buettner <kevinb@redhat.com>
2190
2191 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2192 (thread_db_thread_handle): Declare.
2193 * linux-low.c (linux_target_ops): Initialize thread_handle.
2194 * server.c (handle_qxfer_threads_worker): Add support for
2195 "handle" attribute.
2196 * target.h (struct target_ops): Add new function pointer,
2197 thread_handle.
2198 (target_thread_handle): Define.
2199 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2200 field in lwp.
2201 (thread_db_thread_handle): New function.
2202
86299109
KB
22032017-09-21 Kevin Buettner <kevinb@redhat.com>
2204
2205 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2206 * linux-low.h (thread_db_notice_clone): Declare.
2207 * thread-db.c (thread_db_notice_clone): New function.
2208
f557a88a
PA
22092017-09-21 Pedro Alves <palves@redhat.com>
2210
2211 * server.c (gdb_read_memory, handle_status, process_serial_event)
2212 (handle_serial_event, handle_target_event): Adjust to
2213 set_desired_thread prototype change.
2214 * target.c (set_desired_thread): Remove 'use_general' parameter
2215 and adjust.
2216 * target.h (set_desired_thread): Remove 'use_general' parameter.
2217
223ffa71
TT
22182017-09-20 Tom Tromey <tom@tromey.com>
2219
2220 * target.c (target_terminal::terminal_state): Define.
2221 (target_terminal::init): Rename from target_terminal_init.
2222 (target_terminal::inferior): Rename from
2223 target_terminal_inferior.
2224 (target_terminal::ours): Rename from target_terminal_ours.
2225 (target_terminal::ours_for_output, target_terminal::info): New.
2226
04fd3ba9
SM
22272017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2228
2229 * server.c (accumulate_file_name_length): Remove.
2230 (emit_dll_description): Adjust to std::string change.
2231 (handle_qxfer_libraries): Use std::string to hold document.
2232
5e187554
SM
22332017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2234
2235 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2236 return type of xml_escape_text.
2237 * server.c (emit_dll_description): Likewise.
2238
1526853e
SM
22392017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2240
2241 * server.c (captured_main): Accept argument for --selftest.
2242 Update run_tests call.
2243 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2244 when registering selftests.
2245
c4dfafab
SDJ
22462017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2247
2248 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2249 instead of "VEC" for "target_desc.reg_defs".
2250 (regcache_cpy): Likewise.
2251 (registers_to_string): Likewise.
2252 (registers_from_string): Likewise.
2253 (find_regno): Likewise.
2254 (supply_regblock): Likewise.
2255 (regcache_raw_read_unsigned): Likewise.
2256 * tdesc.c (init_target_desc): Likewise.
2257 (tdesc_create_reg): Likewise.
2258 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2259 (struct target_desc) <reg_defs>: Convert to "std::vector".
2260 (target_desc): Do not initialize "reg_defs".
2261 (~target_desc): Update code to use "std::vector" instead of "VEC"
2262 for "target_desc.reg_defs".
2263 (operator==): Likewise.
2264
124aceb4
SM
22652017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2266
2267 * inferiors.h (thread_to_gdb_id): Remove.
2268 * inferiors.c (thread_to_gdb_id): Remove.
2269 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2270 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2271 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2272 Likewise.
2273 * nto-low.c (nto_fetch_registers, nto_store_registers,
2274 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2275
96cde54f
SM
22762017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2277
2278 * inferiors.h (gdb_id_to_thread_id): Remove.
2279 * inferiors.c (gdb_id_to_thread_id): Remove.
2280 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2281 removal. Move pid declaration closer to where it's used.
2282
e8ca139e
SM
22832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2284
2285 * server.c (handle_detach): New function.
2286 (process_serial_event): Move code out, call handle_detach.
2287
f8a4e119
SM
22882017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2289
2290 * server.c (require_running): Rename to ...
2291 (require_running_or_return): ... this ...
2292 (require_running_or_break): ... and this.
2293 (handle_query, process_serial_event): Adjust.
2294
0eb0a407
SM
22952017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2296
2297 * linux-low.c (linux_set_resume_request): Remove unused
2298 variables.
2299
785922a5
SM
23002017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2301
2302 * server.c (first_thread_of): Remove.
2303 (process_serial_event): Replace usage of first_thread_of with
2304 find_any_thread_of_pid.
2305 * tracepoint.c (same_process_p): Remove.
2306 (gdb_agent_about_to_close): Replace usage of same_process_p with
2307 find_any_thread_of_pid.
2308 * linux-x86-low.c (same_process_callback): Remove.
2309 (x86_arch_setup_process_callback): Replace usage of
2310 same_process_callback with find_any_thread_of_pid.
2311 * thread-db.c (any_thread_of): Remove.
2312 (switch_to_process): Replace usage of any_thread_of with
2313 find_any_thread_of_pid.
2314 * inferiors.c (thread_pid_matches_callback): Remove.
2315 (find_thread_process): Adjust to use find_any_thread_of_pid.
2316
a059f00c
SDJ
23172017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2318
2319 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2320 with "!VEC_empty".
a059f00c 2321
cc397f3a
SDJ
23222017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2323
2324 * linux-low.c (handle_extended_wait): Use
2325 "allocate_target_description" instead of "XNEW".
2326 * linux-x86-low.c (initialize_low_arch): Likewise.
2327
22916b07
YQ
23282017-09-05 Yao Qi <yao.qi@linaro.org>
2329
2330 * configure.srv (srv_i386_regobj): Remove.
2331 (srv_amd64_regobj): Remove.
2332 (srv_regobj): Set it to "" for x86 non-linux targets.
2333 * linux-x86-tdesc.c (i386_linux_read_description):
2334 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2335 (init_registers_i386): Remove the declaration.
2336 (tdesc_i386): Remove the declaration.
2337 (lynx_i386_arch_setup): Call i386_create_target_description.
2338 * nto-x86-low.c: Likewise.
2339 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2340 [!__x86_64__]: include arch/i386.h.
2341 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2342
38602d55
YQ
23432017-09-05 Yao Qi <yao.qi@linaro.org>
2344
2345 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2346 i386/amd64-XXX-linux from it.
2347
44b886ff
YQ
23482017-09-05 Yao Qi <yao.qi@linaro.org>
2349
2350 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2351 false.
2352 (ipa_amd64_linux_regobj): Remove.
2353 (ipa_x32_linux_regobj): Remove.
2354
b4570e4b
YQ
23552017-09-05 Yao Qi <yao.qi@linaro.org>
2356
2357 * Makefile.in (arch-amd64.o): New rule.
2358 * configure.srv: Append arch-amd64.o.
2359 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2360 (get_ipa_tdesc): Call amd64_linux_read_description.
2361 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2362 and init_registers_amd64_XXX.
2363 * linux-x86-low.c (x86_linux_read_description): Call
2364 amd64_linux_read_description.
2365 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2366 (initialize_low_arch): Don't call init_registers_x32_XXX and
2367 init_registers_amd64_XXX.
2368 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2369 and tdesc_amd64_XXX.
2370 [__x86_64__] (amd64_tdesc_test): New function.
2371 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2372 and init_registers_amd64_XXX.
2373 * linux-x86-tdesc.c: Include arch/amd64.h.
2374 (xcr0_to_tdesc_idx): New function.
2375 (i386_linux_read_description): New function.
2376 (amd64_get_ipa_tdesc_idx): New function.
2377 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2378 (amd64_get_ipa_tdesc): Declare.
2379
d1f28ea2
YQ
23802017-09-05 Yao Qi <yao.qi@linaro.org>
2381
2382 * configure.srv (srv_i386_linux_xmlfiles): Remove
2383 i386/i386-XXX-linux.xml from it.
2384
25a93583
YQ
23852017-09-05 Yao Qi <yao.qi@linaro.org>
2386
2387 * configure.srv: Set srv_i386_linux_regobj empty if $development
2388 is false.
2389 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2390 initialize_low_tdesc.
2391 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2392 with #if initialize_low_tdesc.
2393 * linux-x86-tdesc-selftest.c: New file.
2394 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2395
5f035c07
YQ
23962017-09-05 Yao Qi <yao.qi@linaro.org>
2397
2398 * Makefile.in (arch-i386.o): New rule.
2399 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2400 (x86_64-*-linux*): Likewise.
2401 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2402 include arch/i386.h.
2403 (i386_linux_read_description): Remove code and call
2404 i386_create_target_description.
2405 * tdesc.c (allocate_target_description): New function.
2406 * tdesc.h (set_tdesc_architecture): Remove declaration.
2407 (set_tdesc_osabi): Likewise.
2408
0abe8a89
YQ
24092017-09-05 Yao Qi <yao.qi@linaro.org>
2410
2411 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2412 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2413 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2414 .xmltarget.
2415 * server.c (get_features_xml): Call tdesc_get_features_xml.
2416 * tdesc.c (set_tdesc_architecture): New function.
2417 (set_tdesc_osabi): New function.
2418 (tdesc_get_features_xml): New function.
2419 (tdesc_create_feature): Add an argument.
2420 * tdesc.h (struct target_desc) <features>: New field.
2421 <arch, osabi>: New field.
2422 (~target_desc): xfree features, arch, and osabi.
2423 (target_desc::oerator==): Don't compare .xmltarget.
2424 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2425 (set_tdesc_osabi): Likewise.
2426 (tdesc_get_features_xml): Likewise.
2427
0a188386
YQ
24282017-09-05 Yao Qi <yao.qi@linaro.org>
2429
2430 * linux-x86-tdesc.c: Include selftest.h.
2431 (i386_tdesc_test): New function.
2432 (initialize_low_tdesc): Call selftests::register_test.
2433 * tdesc.h: Include regdef.h.
2434 (target_desc): Override operator == and !=.
2435
f49ff000
YQ
24362017-09-05 Yao Qi <yao.qi@linaro.org>
2437
2438 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2439 (ipa_obj): Likewise.
2440 * linux-i386-ipa.c: Include common/x86-xstate.h
2441 (get_ipa_tdesc): Call i386_linux_read_description.
2442 (initialize_low_tracepoint): Don't call init_registers_XXX
2443 functions, call initialize_low_tdesc instead.
2444 * linux-x86-low.c (x86_linux_read_description): Call
2445 i386_linux_read_description.
2446 (initialize_low_arch): Don't call init_registers_i386_XXX
2447 functions, call initialize_low_tdesc.
2448 * linux-x86-tdesc.c: New file.
2449 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2450 (i386_get_ipa_tdesc_idx): Declare.
2451 (i386_get_ipa_tdesc): Declare.
2452 (initialize_low_tdesc): Declare.
2453
2b68ef2f
YQ
24542017-09-05 Yao Qi <yao.qi@linaro.org>
2455
2456 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2457 instead of 0.
2458
f7000548
YQ
24592017-09-05 Yao Qi <yao.qi@linaro.org>
2460
2461 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2462 * regcache.c (get_thread_regcache): Use VEC_length.
2463 (init_register_cache): Likewise.
2464 (regcache_cpy): Likewise.
2465 (registers_to_string): Iterate reg_defs via VEC_iterate.
2466 (find_regno): Likewise.
2467 (find_register_by_number): Use VEC_index.
2468 (register_size): Call find_register_by_number.
2469 (register_data): Call find_register_by_number.
2470 (supply_regblock): Use VEC_length.
2471 (regcache_raw_read_unsigned): Likewise.
2472 * tdesc.c (init_target_desc): Iterate reg_defs via
2473 VEC_iterate.
2474 (default_description): Update initializer.
2475 (copy_target_description): Don't update field num_registers.
2476 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2477 <num_registers>: Remove.
2478
50a421ac
SM
24792017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2480
2481 * Makefile.in (.SECONDARY): Define target.
2482
23fdd69e
SM
24832017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2484
2485 * linux-low.c (linux_wait_1): Adjust.
2486 * server.c (queue_stop_reply_callback): Adjust.
2487
0a2dde4a
SDJ
24882017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2489
2490 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2491 QEnvironmentUnset and QEnvironmentReset packets.
2492 (handle_query): Inform remote that QEnvironmentHexEncoded,
2493 QEnvironmentUnset and QEnvironmentReset are supported.
2494
6afd337d
SM
24952017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2496
2497 * inferiors.h (inferior_target_data): Rename to ...
2498 (thread_target_data): ... this.
2499 (inferior_regcache_data): Rename to ...
2500 (thread_regcache_data): ... this.
2501 (set_inferior_regcache_data): Rename to ...
2502 (set_thread_regcache_data): ... this.
2503 * inferiors.c (inferior_target_data): Rename to ...
2504 (thread_target_data): ... this.
2505 (inferior_regcache_data): Rename to ...
2506 (thread_regcache_data): ... this.
2507 (set_inferior_regcache_data): Rename to ...
2508 (set_thread_regcache_data): ... this.
2509 (free_one_thread): Update.
2510 * linux-low.h (get_thread_lwp): Update.
2511 * regcache.c (get_thread_regcache): Update.
2512 (regcache_invalidate_thread): Update.
2513 (free_register_cache_thread): Update.
2514 * win32-i386-low.c (update_debug_registers_callback): Update.
2515 (win32_get_current_dr): Update.
2516 * win32-low.c (thread_rec): Update.
2517 (delete_thread_info): Update.
2518 (continue_one_thread): Update.
2519 (suspend_one_thread): Update.
2520
a160cc46
SM
25212017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2522
2523 * inferiors.c (set_inferior_target_data): Remove.
2524 * inferiors.h (set_inferior_target_data): Remove.
2525
6d580b63
YQ
25262017-08-18 Yao Qi <yao.qi@linaro.org>
2527
2528 * Makefile.in (OBS): Add selftest.o.
2529 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2530 * configure, config.in: Re-generated.
2531 * server.c: Include common/sefltest.h.
2532 (captured_main): Handle option --selftest.
2533
f5a29eb0
YQ
25342017-08-09 Yao Qi <yao.qi@linaro.org>
2535
2536 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2537 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2538 i386-avx-mpx.o and i386-mmx.o.
2539 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2540 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2541 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2542 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2543 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2544 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2545 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2546 i386/amd64-avx-mpx.xml.
2547
57757c2f
YQ
25482017-08-09 Yao Qi <yao.qi@linaro.org>
2549
2550 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2551 and x32-avx-avx512.o.
2552 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2553 i386/x32-avx-avx512.xml.
2554
229d26fc
SM
25552017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2556
2557 * tracepoint.h (enum class fast_tpoint_collect_result): New
2558 enumeration.
2559 (fast_tracepoint_collecting): Change return type to
2560 fast_tpoint_collect_result.
2561 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2562 * linux-low.h: Include tracepoint.h.
2563 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2564 fast_tpoint_collect_result.
2565 * linux-low.c (handle_tracepoints): Adjust.
2566 (linux_fast_tracepoint_collecting): Change return type to
2567 fast_tpoint_collect_result.
2568 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2569 linux_wait_1, stuck_in_jump_pad_callback,
2570 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2571 proceed_one_lwp): Adjust to type change.
2572
2e1e43e1
YQ
25732017-07-10 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2576
adc764e7
YQ
25772017-06-29 Yao Qi <yao.qi@linaro.org>
2578
2579 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2580 Remove.
2581 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2582
a206891a
SM
25832017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2584
2585 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2586
9a6c7d9c
SDJ
25872017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2588
2589 * linux-low.c (linux_create_inferior): Adjust code to access the
2590 environment information via 'gdb_environ' class.
2591 * lynx-low.c (lynx_create_inferior): Likewise.
2592 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2593 (get_environ): Return a pointer to 'our_environ'.
2594 (captured_main): Initialize 'our_environ'.
2595 * server.h (get_environ): Adjust prototype.
2596 * spu-low.c (spu_create_inferior): Adjust code to access the
2597 environment information via 'gdb_environ' class.
2598
ae3e2ccf
SM
25992017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2600
2601 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2602 usage of "register" keyword.
2603
3e019bdc
SM
26042017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2605
2606 * configure: Re-generate.
2607
8465943a
SM
26082017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2609
2610 * configure: Re-generate.
2611
cf0dd6f0
SM
26122017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2613
2614 * Makefile.in (COMPILE.pre): Add "-x c++".
2615
9845682b
SDJ
26162017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2617
2618 * fork-child.c: Conditionally include <signal.h>.
2619
aefd8b33
SDJ
26202017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2621
2622 * server.c (handle_general_set): Handle new packet
2623 "QStartupWithShell".
2624 (handle_query): Add "QStartupWithShell" to the list of supported
2625 packets.
2626 (gdbserver_usage): Add help text explaining the
2627 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2628 options.
2629 (captured_main): Recognize and act upon the presence of the new
2630 CLI options.
2631
2090129c
SDJ
26322017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2633 Pedro Alves <palves@redhat.com>
2634
2635 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2636 * configure: Regenerate.
2637 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2638 "fork-inferior.o".
2639 (i[34567]86-*-lynxos*): Likewise.
2640 (spu*-*-*): Likewise.
2641 * fork-child.c: New file.
2642 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2643 and "environ.h".
2644 (linux_ptrace_fun): New function.
2645 (linux_create_inferior): Adjust function prototype to reflect
2646 change on "target.h". Adjust function code to use
2647 "fork_inferior".
2648 (linux_request_interrupt): Delete "signal_pid".
2649 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2650 (lynx_ptrace_fun): New function.
2651 (lynx_create_inferior): Adjust function prototype to reflect
2652 change on "target.h". Adjust function code to use
2653 "fork_inferior".
2654 * nto-low.c (nto_create_inferior): Adjust function prototype and
2655 code to reflect change on "target.h". Update comments.
2656 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2657 "common-terminal.h" and "environ.h".
2658 (terminal_fd): Moved to fork-child.c.
2659 (old_foreground_pgrp): Likewise.
2660 (restore_old_foreground_pgrp): Likewise.
2661 (last_status): Make it global.
2662 (last_ptid): Likewise.
2663 (our_environ): New variable.
2664 (startup_with_shell): Likewise.
2665 (program_name): Likewise.
2666 (program_argv): Rename to...
2667 (program_args): ...this.
2668 (wrapper_argv): New variable.
2669 (start_inferior): Delete function.
2670 (get_exec_wrapper): New function.
2671 (get_exec_file): Likewise.
2672 (get_environ): Likewise.
2673 (prefork_hook): Likewise.
2674 (post_fork_inferior): Likewise.
2675 (postfork_hook): Likewise.
2676 (postfork_child_hook): Likewise.
2677 (handle_v_run): Update code to deal with arguments coming from the
2678 remote host. Update calls from "start_inferior" to
2679 "create_inferior".
2680 (captured_main): Likewise. Initialize environment variable. Call
2681 "have_job_control".
2682 * server.h (post_fork_inferior): New prototype.
2683 (get_environ): Likewise.
2684 (last_status): Declare.
2685 (last_ptid): Likewise.
2686 (signal_pid): Likewise.
2687 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2688 (spu_ptrace_fun): New function.
2689 (spu_create_inferior): Adjust function prototype to reflect change
2690 on "target.h". Adjust function code to use "fork_inferior".
2691 * target.c (target_terminal_init): New function.
2692 (target_terminal_inferior): Likewise.
2693 (target_terminal_ours): Likewise.
2694 * target.h: Include <vector>.
2695 (struct target_ops) <create_inferior>: Update prototype.
2696 (create_inferior): Update macro.
2697 * utils.c (gdb_flush_out_err): New function.
2698 * win32-low.c (win32_create_inferior): Adjust function prototype
2699 and code to reflect change on "target.h".
2700
043a4934
SDJ
27012017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2702
2703 * inferiors.c (switch_to_thread): New function.
2704
15652511
SDJ
27052017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2706
2707 * Makefile.in (SFILE): Add "common/job-control.c".
2708 (OBS): Add "job-control.o".
2709
21ea5acd
SDJ
27102017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2711
2712 * Makefile: Remove "@host_makefile_frag@".
2713
e13cb306
PA
27142017-05-05 Pedro Alves <palves@redhat.com>
2715
2716 * configure: Regenerate.
2717
c94fee56
SDJ
27182017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2719
2720 * configure: Regenerate.
2721
a0ff9e1a
SM
27222017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2723
2724 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2725 software_single_step change of return type to
2726 std::vector<CORE_ADDR>.
2727 * linux-low.c (install_software_single_step_breakpoints):
2728 Likewise.
2729 * linux-low.h (install_software_single_step_breakpoints):
2730 Likewise.
2731
be628ab8
SDJ
27322017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2733
2734 * remote-utils.c: Include "gdb_termios.h" instead of
2735 "terminal.h".
2736 * terminal.h: Delete file.
2737
7c5ded6a
SDJ
27382017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2739
2740 * server.c: Include <vector>.
2741 <program_argv, wrapper_argv>: Convert to std::vector.
2742 (start_inferior): Rewrite function to use C++.
2743 (handle_v_run): Likewise. Update code that calculates the argv
2744 based on the vRun packet; use C++.
2745 (captured_main): Likewise.
2746
436252de
SM
27472017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2748
2749 * server.c (handle_v_cont): Initialize thread_resume::thread
2750 with null_ptid.
2751
9bf2a700
PA
27522017-04-05 Pedro Alves <palves@redhat.com>
2753
2754 * configure: Regenerate.
2755
a121b7c1
PA
27562017-04-05 Pedro Alves <palves@redhat.com>
2757
2758 * gdbreplay.c (sync_error): Constify.
2759 * linux-x86-low.c (push_opcode): Constify.
2760
21c8a587
PA
27612017-04-05 Pedro Alves <palves@redhat.com>
2762
2763 * win32-low.c (get_child_debug_event)
2764 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2765 Report TARGET_WAITKIND_SPURIOUS instead.
2766
fb32b4f7
PA
27672017-04-05 Pedro Alves <palves@redhat.com>
2768
e79be6e5
SM
2769 * remote-utils.c (remote_prepare, remote_open): Constify.
2770 * remote-utils.h (remote_prepare, remote_open): Constify.
2771 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2772
65dd1e59
SM
27732017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2774
2775 * Makefile.in (clean): Clear .deps.
2776
8fa5b777
SM
27772017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2778
2779 * .gitignore: Remove generated files, replace with wildcard.
2780 * (clean): Replace removal of generated files with wildcard.
2781 (version.c): Replace with...
2782 (version-generated.c): ...this.
2783 (xml-builtin.c): Replace with...
2784 (xml-builtin-generated.c): ...this.
2785 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2786 (%.c: *regformats*): Replace with...
2787 (%-generated.c: *regformats*): ...this.
2788
a12e714b
MF
27892017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2790
2791 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2792 (xtensa_fill_gregset): Call collect_register_by_name for
2793 threadptr register.
2794 (xtensa_store_gregset): Call supply_register_by_name for
2795 threadptr register.
2796
1a09b50a
MF
27972017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2798
2799 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2800 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2801 (xtensa_store_gregset): Call supply_register for all registers in
2802 a0_regnum..a0_regnum + C0_NREGS range.
2803
1a01e7c6
SM
28042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2805
2806 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2807 (ax-ipa.o: ax.c): Remove.
2808 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2809 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2810 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2811 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2812 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2813
36bc18a8
SM
28142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2815
2816 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2817 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2818 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2819 (errors-ipa.o: ../common/errors.c): Remove.
2820 (format-ipa.o: ../common/format.c): Remove.
2821 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2822
a8ebe3d5
SM
28232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2824
2825 * Makefile.in (%-ipa.o: %.c): New rule.
2826 (tracepoint-ipa.o: tracepoint.c): Remove.
2827 (utils-ipa.o: utils.c): Remove.
2828 (remote-utils-ipa.o: remote-utils.c): Remove.
2829 (regcache-ipa.o: regcache.c): Remove.
2830 (i386-linux-ipa.o: i386-linux.c): Remove.
2831 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2832 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2833 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2834 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2835 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2836 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2837 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2838 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2839 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2840 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2841 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2842 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2843 (aarch64-ipa.o: aarch64.c): Remove.
2844 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2845 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2846 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2847 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2848 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2849 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2850 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2851 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2852 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2853 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2854 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2855 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2856 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2857 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2858 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2859 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2860 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2861 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2862 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2863 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2864 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2865 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2866 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2867 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2868 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2869 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2870 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2871 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2872 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2873 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2874 (tdesc-ipa.o: tdesc.c): Remove.
2875 (x32-linux-ipa.o: x32-linux.c): Remove.
2876 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2877 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2878
50cfacb7
SM
28792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2880
2881 * Makefile.in (%.o: ../arch/%.c): New rule.
2882 (arm.o: ../arch/arm.c): Remove.
2883 (arm-linux.o: ../arch/arm-linux.c): Remove.
2884 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2885 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2886
c5a22423
SM
28872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2888
2889 * Makefile.in (%.o: ../nat/%.c): New rule.
2890 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2891 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2892 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2893 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2894 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2895 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2896 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2897 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2898 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2899 (linux-personality.o: ../nat/linux-personality.c): Remove.
2900 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2901 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2902 (x86-linux.o: ../nat/x86-linux.c): Remove.
2903 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2904 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2905
6bda016b
SM
29062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2907
2908 * Makefile.in (%.o: ../common/%.c): New rule.
2909 (signals.o: ../common/signals.c): Remove.
2910 (print-utils.o: ../common/print-utils.c): Remove.
2911 (rsp-low.o: ../common/rsp-low.c): Remove.
2912 (common-utils.o: ../common/common-utils.c): Remove.
2913 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2914 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2915 (vec.o: ../common/vec.c): Remove.
2916 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2917 (xml-utils.o: ../common/xml-utils.c): Remove.
2918 (ptid.o: ../common/ptid.c): Remove.
2919 (buffer.o: ../common/buffer.c): Remove.
2920 (format.o: ../common/format.c): Remove.
2921 (filestuff.o: ../common/filestuff.c): Remove.
2922 (agent.o: ../common/agent.c): Remove.
2923 (errors.o: ../common/errors.c): Remove.
2924 (environ.o: ../common/environ.c): Remove.
2925 (common-debug.o: ../common/common-debug.c): Remove.
2926 (cleanups.o: ../common/cleanups.c): Remove.
2927 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2928 (fileio.o: ../common/fileio.c): Remove.
2929 (common-regcache.o: ../common/common-regcache.c): Remove.
2930 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2931 (new-op.o: ../common/new-op.c): Remove.
2932 (btrace-common.o: ../common/btrace-common.c): Remove.
2933
21122961
SM
29342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2935
2936 * Makefile.in (%.o: ../target/%.c): New rule.
2937 (waitstatus.o: ../target/waitstatus.c): Remove.
2938
c362e621
SM
29392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2940
2941 * Makefile.in
2942 (%.c: ../regformats/%.dat,
2943 (%.c: ../regformats/arm/%.dat,
2944 (%.c: ../regformats/i386/%.dat,
2945 (%.c: ../regformats/rs6000/%.dat): New rules.
2946 (aarch64.c): Remove.
2947 (reg-arm.c): Remove.
2948 (arm-with-iwmmxt.c): Remove.
2949 (arm-with-vfpv2.c): Remove.
2950 (arm-with-vfpv3.c): Remove.
2951 (arm-with-neon.c): Remove.
2952 (reg-bfin.c): Remove.
2953 (reg-cris.c): Remove.
2954 (reg-crisv32.c): Remove.
2955 (i386.c): Remove.
2956 (i386-linux.c): Remove.
2957 (i386-avx.c): Remove.
2958 (i386-avx-linux.c): Remove.
2959 (i386-avx-avx512.c): Remove.
2960 (i386-avx-avx512-linux.c): Remove.
2961 (i386-mpx.c): Remove.
2962 (i386-mpx-linux.c): Remove.
2963 (i386-avx-mpx-avx512-pku.c): Remove.
2964 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2965 (i386-avx-mpx.c): Remove.
2966 (i386-avx-mpx-linux.c): Remove.
2967 (i386-mmx.c): Remove.
2968 (i386-mmx-linux.c): Remove.
2969 (reg-ia64.c): Remove.
2970 (reg-m32r.c): Remove.
2971 (reg-m68k.c): Remove.
2972 (reg-cf.c): Remove.
2973 (mips-linux.c): Remove.
2974 (mips-dsp-linux.c): Remove.
2975 (mips64-linux.c): Remove.
2976 (mips64-dsp-linux.c): Remove.
2977 (nios2-linux.c): Remove.
2978 (powerpc-32.c): Remove.
2979 (powerpc-32l.c): Remove.
2980 (powerpc-altivec32l.c): Remove.
2981 (powerpc-cell32l.c): Remove.
2982 (powerpc-vsx32l.c): Remove.
2983 (powerpc-isa205-32l.c): Remove.
2984 (powerpc-isa205-altivec32l.c): Remove.
2985 (powerpc-isa205-vsx32l.c): Remove.
2986 (powerpc-e500l.c): Remove.
2987 (powerpc-64l.c): Remove.
2988 (powerpc-altivec64l.c): Remove.
2989 (powerpc-cell64l.c): Remove.
2990 (powerpc-vsx64l.c): Remove.
2991 (powerpc-isa205-64l.c): Remove.
2992 (powerpc-isa205-altivec64l.c): Remove.
2993 (powerpc-isa205-vsx64l.c): Remove.
2994 (s390-linux32.c): Remove.
2995 (s390-linux32v1.c): Remove.
2996 (s390-linux32v2.c): Remove.
2997 (s390-linux64.c): Remove.
2998 (s390-linux64v1.c): Remove.
2999 (s390-linux64v2.c): Remove.
3000 (s390-te-linux64.c): Remove.
3001 (s390-vx-linux64.c): Remove.
3002 (s390-tevx-linux64.c): Remove.
3003 (s390x-linux64.c): Remove.
3004 (s390x-linux64v1.c): Remove.
3005 (s390x-linux64v2.c): Remove.
3006 (s390x-te-linux64.c): Remove.
3007 (s390x-vx-linux64.c): Remove.
3008 (s390x-tevx-linux64.c): Remove.
3009 (tic6x-c64xp-linux.c): Remove.
3010 (tic6x-c64x-linux.c): Remove.
3011 (tic6x-c62x-linux.c): Remove.
3012 (reg-sh.c): Remove.
3013 (reg-sparc64.c): Remove.
3014 (reg-spu.c): Remove.
3015 (amd64.c): Remove.
3016 (amd64-linux.c): Remove.
3017 (amd64-avx.c): Remove.
3018 (amd64-avx-linux.c): Remove.
3019 (amd64-avx-avx512.c): Remove.
3020 (amd64-avx-avx512-linux.c): Remove.
3021 (amd64-mpx.c): Remove.
3022 (amd64-mpx-linux.c): Remove.
3023 (amd64-avx-mpx-avx512-pku.c): Remove.
3024 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3025 (amd64-avx-mpx.c): Remove.
3026 (amd64-avx-mpx-linux.c): Remove.
3027 (x32.c): Remove.
3028 (x32-linux.c): Remove.
3029 (x32-avx.c): Remove.
3030 (x32-avx-linux.c): Remove.
3031 (x32-avx-avx512.c): Remove.
3032 (x32-avx-avx512-linux.c): Remove.
3033 (reg-xtensa.c): Remove.
3034 (reg-tilegx.c): Remove.
3035 (reg-tilegx32.c): Remove.
3036
1672e0d9
SDJ
30372017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3038
3039 * Makefile.in (SFILES): Add "common/environ.c".
3040 (OBJS): Add "common/environ.h".
3041
239b6d10
WT
30422017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3043
3044 * configure.ac: Check if the fs_base and gs_base members of
3045 `struct user_regs_struct' exist.
3046 * config.in: Regenerated.
3047 * configure: Likewise.
3048
694b382c
AT
30492017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3050
3051 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3052 target_read_memory.
3053 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3054 (get_next_pcs_syscall_next_pc): Likewise.
3055
7dc53023
LM
30562016-12-23 Luis Machado <lgustavo@codesourcery.com>
3057
3058 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3059 * nto-x86-low.c: Likewise.
3060
ad02e4fe
SM
30612016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3062
3063 * Makefile.in: Include disable-implicit-rules.mk.
3064
dcb07cfa
PA
30652016-11-23 Pedro Alves <palves@redhat.com>
3066
3067 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3068 (debug_vprintf): Use std::chrono::steady_clock instead of
3069 gettimeofday. Use '.' instead of ':'.
3070 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3071 (get_timestamp): Use std::chrono::steady_clock instead of
3072 gettimeofday.
3073
8629c02c
SM
30742016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3075
3076 * Makefile.in: Fix whitespace formatting.
3077
b593ecca
SM
30782016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3079
3080 * Makefile.in (SFILES, OBS): Flatten list and order
3081 alphabetically.
3082
9986ba08
PA
30832016-11-23 Pedro Alves <palves@redhat.com>
3084
3085 * event-loop.c (handle_file_event): Use warning.
3086 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3087 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3088 Use warning.
3089
4eefa7bc
PA
30902016-11-23 Pedro Alves <palves@redhat.com>
3091
3092 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3093 output.
3094 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3095 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3096 debug_printf and debug_flush for debug output.
3097 * server.c (handle_general_set): Likewise.
3098 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3099 output.
3100
5443506e
SM
31012016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3102
3103 * Makefile.in (.c.o): Replace rule with ...
3104 (%.o: %.c): ... this one.
3105
3b165252
SM
31062016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3107
3108 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3109 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3110 make.
3111 * configure.ac: Remove checks for the make program.
3112 * configure: Re-generate.
3113
0bcda685
PA
31142016-10-28 Pedro Alves <palves@redhat.com>
3115
3116 * Makefile.in (CXX_DIALECT): Get from configure.
3117 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3118 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3119 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3120 * config.in: Regenerate.
3121 * configure: Regenerate.
3122
c3805894
YQ
31232016-10-27 Yao Qi <yao.qi@linaro.org>
3124
3125 * linux-low.c (linux_supports_range_stepping): Return true if
3126 can_software_single_step return true.
3127
89342618
YQ
31282016-10-27 Yao Qi <yao.qi@linaro.org>
3129
3130 * inferiors.c (find_inferior_in_random): New function.
3131 * inferiors.h (find_inferior_in_random): Declare.
3132 * linux-low.c (linux_wait_for_event_filtered): Call
3133 find_inferior_in_random instead of find_inferior.
3134
e3652c84
YQ
31352016-10-27 Yao Qi <yao.qi@linaro.org>
3136
3137 * linux-low.c (linux_wait_1): If single-step breakpoints are
3138 inserted, remove them.
3139
5a04c4cf
PA
31402016-10-26 Pedro Alves <palves@redhat.com>
3141
3142 * linux-low.c (handle_extended_wait): Link parent/child fork
3143 threads.
3144 (linux_wait_1): Unlink them.
3145 (linux_set_resume_request): Ignore resume requests for
3146 already-resumed and unhandled fork child threads.
3147 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3148 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3149 New functions.
3150 (handle_v_requests) <vCont>: Don't call require_running.
3151 * server.h (in_queued_stop_replies): New declaration.
3152
cb93dc7f
YQ
31532016-10-24 Yao Qi <yao.qi@linaro.org>
3154
3155 PR server/20733
3156 * linux-aarch64-low.c (append_insns): Cast the return value to
3157 'uint32_t *'.
3158
a1078bea
YQ
31592016-10-10 Yao Qi <yao.qi@linaro.org>
3160
3161 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3162
1fb77080
SDJ
31632016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3164
3165 * target.c (target_supports_multi_process): New function, moved
3166 from...
3167 * target.h (target_supports_multi_process): ... here. Remove
3168 macro.
3169
39b5a3b9
TT
31702016-10-05 Tom Tromey <tom@tromey.com>
3171
3172 PR remote/20655:
3173 * tracepoint.c (handle_tracepoint_bkpts): Check
3174 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3175
c1d0b70a
YQ
31762016-10-05 Yao Qi <yao.qi@linaro.org>
3177
3178 * configure.srv: Update the path of arm-*.xml files.
3179
0a69eedb
YQ
31802016-10-05 Terry Guo <terry.guo@arm.com>
3181 Yao Qi <yao.qi@linaro.org>
3182
3183 * Makefile.in: Adjust the path of rules.
3184 * configure.srv: Update the path of xml files.
3185 * regformats/arm-with-iwmmxt.dat: Regenerated.
3186 * regformats/arm-with-neon.dat: Likewise.
3187 * regformats/arm-with-vfpv2.dat: Likewise.
3188 * regformats/arm-with-vfpv3.dat Likewise.
3189
17e16485
YQ
31902016-09-30 Yao Qi <yao.qi@linaro.org>
3191
3192 PR gdbserver/20627
3193 * target.c (target_stop_and_wait): Don't call
3194 target_continue_no_signal, use resume_stop instead.
3195
edeeb602
YQ
31962016-09-26 Yao Qi <yao.qi@linaro.org>
3197
3198 * linux-low.c (linux_wait_1): Call debug_exit.
3199
503b1c39
PA
32002016-09-23 Pedro Alves <palves@redhat.com>
3201
3202 * Makefile.in (SFILES): Add common/new-op.c.
3203 (OBS): Add common/new-op.o.
3204 (new-op.o): New rule.
3205
74172ecf
SM
32062016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3207
3208 * .gitinore: Ignore more files.
3209
fc6cda2e
YQ
32102016-09-21 Yao Qi <yao.qi@linaro.org>
3211
3212 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3213 23.
3214
bc1e6c81
SDJ
32152016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3216
3217 * server.c (start_inferior): Call target_mourn_inferior instead of
3218 mourn_inferior; pass ptid_t argument to it.
3219 (resume): Likewise.
3220 (handle_target_event): Likewise.
3221 * target.c (target_mourn_inferior): New function.
3222 * target.h (mourn_inferior): Delete macro.
3223
0e00e962
AA
32242016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3225
3226 * linux-low.c (lwp_is_stepping): New function.
3227
1d8cb77d
CL
32282016-09-06 Carl Love <cel@us.ibm.com>
3229
3230 * server.c (start_inferior): Fixed comment, requested comment change
3231 didn't get updated correctly. Removed reference to ptrace () call as
3232 it is only true on Linux systems.
3233
7313bced
CL
32342016-09-06 Carl Love <cel@us.ibm.com>
3235
3236 * server.c (start_inferior): Do not call
3237 function target_post_create_inferior () if the
3238 inferior process has already exited.
3239
cf6de44d
PA
32402016-09-05 Pedro Alves <palves@redhat.com>
3241
3242 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3243 (COMPILE.pre, CC_LD): Use CXX directly.
3244 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3245 * acinclude.m4: Don't include build-with-cxx.m4.
3246 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3247 * configure: Regenerate.
3248
c1da6748
AT
32492016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3250
3251 PR gdb/19495
3252 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3253 call writing data to own_buf.
3254
f2b9e3df
SDJ
32552016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3256
3257 * target.c (mywait): Call target_wait instead of
3258 the_target->wait.
3259 (target_wait): New function.
3260
049a8570
SDJ
32612016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3262
3263 * server.c (start_inferior): New variable 'ptid'. Replace calls
3264 to the_target->resume by target_continue{,_no_signal}, depending
3265 on the case.
3266 * target.c (target_stop_and_wait): Call target_continue_no_signal
3267 instead of the_target->resume.
3268 (target_continue): New function.
3269
3aa5cfa0
AT
32702016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3271
3272 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3273
754653a7
AZ
32742016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3275
3276 PR server/20491
3277 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3278 ps_prochandle.
3279 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3280 * linux-arm-low.c (ps_get_thread_area): Likewise.
3281 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3282 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3283 * linux-mips-low.c (ps_get_thread_area): Likewise.
3284 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3285 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3286 * linux-x86-low.c (ps_get_thread_area): Likewise.
3287 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3288
ed036b40
PA
32892016-08-19 Pedro Alves <palves@redhat.com>
3290
3291 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3292
c8ef42ee
PA
32932016-08-19 Pedro Alves <palves@redhat.com>
3294
3295 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3296 comment. Use memcpy instead of casting through unsigned long.
3297
9c235a72
PA
32982016-08-19 Pedro Alves <palves@redhat.com>
3299
3300 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3301 allocating around 0x80000000.
3302
201506da
PA
33032016-08-19 Pedro Alves <palves@redhat.com>
3304
3305 PR gdb/20415
3306 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3307 (x32-avx512-linux-ipa.o): New rules.
3308 * configure.ac (x86_64-*-linux*): New x32 check.
3309 * configure.srv (ipa_x32_linux_regobj): New.
3310 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3311 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3312 descriptions.
3313 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3314 descriptions.
3315 * configure: Regenerate.
3316
f348d89a
PA
33172016-08-09 Pedro Alves <palves@redhat.com>
3318
3319 PR gdb/18653
3320 * Makefile.in (OBS): Add signals-state-save-restore.o.
3321 (signals-state-save-restore.o): New rule.
3322 * config.in: Regenerate.
3323 * configure: Regenerate.
3324 * linux-low.c: Include "signals-state-save-restore.h".
3325 (linux_create_inferior): Call
3326 restore_original_signals_state.
3327 * server.c: Include "dispositions-save-restore.h".
3328 (captured_main): Call save_original_signals_state.
3329
1baf5149
PA
33302016-08-05 Pedro Alves <palves@redhat.com>
3331
3332 * configure: Regenerate.
3333
fcd4a73d
YQ
33342016-08-04 Yao Qi <yao.qi@linaro.org>
3335
3336 * linux-low.c (regsets_fetch_inferior_registers): Check
3337 errno is ESRCH or not.
3338
979659d0
YQ
33392016-08-02 Yao Qi <yao.qi@linaro.org>
3340
3341 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3342 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3343 (thread_db_load_search): Update.
3344 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3345 td_ta_set_event and td_ta_event_getmsg.
3346
6598661d
PA
33472016-07-26 Pedro Alves <palves@redhat.com>
3348
3349 PR server/20414
3350 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3351 of unsigned long for 64-bit registers and use uint32_t instead of
3352 unsigned int for 32-bit registers.
3353
9cf12d57
PA
33542016-07-26 Pedro Alves <palves@redhat.com>
3355
3356 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3357 to 'ptrace'.
3358
305450ed
TT
33592016-07-21 Tom Tromey <tom@tromey.com>
3360
3361 * configure: Rebuild.
3362
2583da7c
YQ
33632016-07-21 Yao Qi <yao.qi@linaro.org>
3364
3365 * mem-break.c (find_gdb_breakpoint): Cast bp to
3366 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3367
21536b36
YQ
33682016-07-21 Yao Qi <yao.qi@linaro.org>
3369
3370 * server.c (handle_v_requests): Support s and S actions
3371 if target_supports_software_single_step return true.
3372
8901d193
YQ
33732016-07-21 Yao Qi <yao.qi@linaro.org>
3374
3375 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3376 is resume_step, call maybe_hw_step.
3377 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3378 and unstop them.
3379 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3380 breakpoints or not.
3381 (proceed_one_lwp): If resume request is resume_step, install
3382 reinsert breakpoints and call maybe_hw_step.
3383
0e9a339e
YQ
33842016-07-21 Yao Qi <yao.qi@linaro.org>
3385
3386 * linux-low.c (proceed_one_lwp): Declare.
3387 (linux_resume_one_thread): Remove local variable 'step'.
3388 Lift code enqueue signal. Call proceed_one_lwp instead of
3389 linux_resume_one_lwp.
3390
4281b351
YQ
33912016-07-21 Yao Qi <yao.qi@linaro.org>
3392
3393 * linux-low.c (linux_resume_one_thread): Call
3394 enqueue_pending_signal.
3395
984a2c04
YQ
33962016-07-21 Yao Qi <yao.qi@linaro.org>
3397
3398 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3399 * inferiors.c (do_restore_current_thread_cleanup): New function.
3400 (make_cleanup_restore_current_thread): Likewise.
3401 * linux-low.c (install_software_single_step_breakpoints): Call
3402 make_cleanup_restore_current_thread. Switch current_thread to
3403 thread.
3404
bec903c9
YQ
34052016-07-21 Yao Qi <yao.qi@linaro.org>
3406
3407 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3408 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3409 (clone_one_breakpoint): Likewise.
3410 (delete_reinsert_breakpoints): Change parameter to thread.
3411 Callers updated.
3412 (has_reinsert_breakpoints): Likewise.
3413 (uninsert_reinsert_breakpoints): Likewise.
3414 (reinsert_reinsert_breakpoints): Likewise.
3415 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3416 (delete_reinsert_breakpoints): Likewise.
3417 (reinsert_reinsert_breakpoints): Likewise.
3418 (uninsert_reinsert_breakpoints): Likewise.
3419 (has_reinsert_breakpoints): Likewise.
3420
63c40ec7
YQ
34212016-07-21 Yao Qi <yao.qi@linaro.org>
3422
3423 * inferiors.c (get_thread_process): Make parameter const.
3424 * inferiors.h (get_thread_process): Update declaration.
3425 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3426 Add new parameters child_thread and parent_thread. Callers
3427 updated.
3428 * mem-break.h (clone_all_breakpoints): Update declaration.
3429
9aa76cd0
YQ
34302016-07-21 Yao Qi <yao.qi@linaro.org>
3431
3432 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3433 <command_list, handler>: Remove.
3434 (struct gdb_breakpoint): New.
3435 (struct other_breakpoint): New.
3436 (struct reinsert_breakpoint): New.
3437 (is_gdb_breakpoint): New function.
3438 (any_persistent_commands): Update command_list if
3439 is_gdb_breakpoint returns true.
3440 (set_breakpoint): Create breakpoints according to their types.
3441 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3442 (set_gdb_breakpoint_1): Likewise.
3443 (set_gdb_breakpoint): Likewise.
3444 (clear_breakpoint_conditions): Change parameter type to
3445 'struct gdb_breakpoint *'.
3446 (clear_breakpoint_commands): Likewise.
3447 (clear_breakpoint_conditions_and_commands): Likewise.
3448 (add_condition_to_breakpoint): Likewise.
3449 (add_breakpoint_condition): Likewise.
3450 (add_commands_to_breakpoint): Likewise.
3451 (check_breakpoints): Check other_breakpoint.
3452 (clone_one_breakpoint): Clone breakpopint according to its type.
3453 * mem-break.h (struct gdb_breakpoint): Declare.
3454 (set_gdb_breakpoint): Update declaration.
3455 (clear_breakpoint_conditions_and_commands): Likewise.
3456 (add_breakpoint_condition): Likewise.
3457 (add_breakpoint_commands): Likewise.
3458 * server.c (process_point_options): Change parameter type to
3459 'struct gdb_breakpoint *'.
3460
811f8301
YQ
34612016-07-21 Yao Qi <yao.qi@linaro.org>
3462
3463 * mem-break.c (set_breakpoint_at): Rename it to ...
3464 (set_breakpoint_type_at): ... it.
3465 (set_breakpoint_at): Call set_breakpoint_type_at.
3466 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3467 * mem-break.h (set_breakpoint_at): Update comments.
3468
b1c51e36
CLT
34692016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3470
3471 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3472 to buf parameter.
3473 (nios2_store_gregset): Likewise.
3474
ced2dffb
PA
34752016-07-01 Pedro Alves <palves@redhat.com>
3476 Antoine Tremblay <antoine.tremblay@ericsson.com>
3477
3478 * linux-low.c: Change interface to take the target lwp_info
3479 pointer directly and return void. Handle detaching from a zombie
3480 thread.
3481 (linux_detach_lwp_callback): New function.
3482 (linux_detach): Detach from the leader thread after detaching from
3483 the clone threads.
3484
2ac09a5b
YQ
34852016-06-28 Yao Qi <yao.qi@linaro.org>
3486
3487 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3488 for variable new_offset.
3489 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3490 (aarch64_ftrace_insn_reloc_cb): Likewise.
3491 (aarch64_ftrace_insn_reloc_tb): Likewise.
3492 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3493 PRIx64 instead of PRIx32.
3494
79e7fd4f
YQ
34952016-06-28 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3498 (the_low_target): Install arm_get_syscall_trapinfo.
3499
061fc021
YQ
35002016-06-28 Yao Qi <yao.qi@linaro.org>
3501
3502 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3503 function.
3504 (the_low_target): Install aarch64_get_syscall_trapinfo.
3505
4cc32bec
YQ
35062016-06-28 Yao Qi <yao.qi@linaro.org>
3507
3508 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3509 Callers updated.
3510 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3511 Remove parameter sysno.
3512 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3513 sysret.
3514
782c1122
AA
35152016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3516
3517 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3518 (s390_emit_ne_goto): Likewise.
3519 (s390_emit_lt_goto): Likewise.
3520 (s390_emit_le_goto): Likewise.
3521 (s390_emit_gt_goto): Likewise.
3522 (s390_emit_ge_goto): Likewise.
3523 (s390x_emit_eq_goto): Likewise.
3524 (s390x_emit_ne_goto): Likewise.
3525 (s390x_emit_lt_goto): Likewise.
3526 (s390x_emit_le_goto): Likewise.
3527 (s390x_emit_gt_goto): Likewise.
3528 (s390x_emit_ge_goto): Likewise.
3529 (s390_emit_ops_impl): Mark variable static.
3530 (s390x_emit_ops): Likewise.
3531
2e7b624b
YQ
35322016-06-17 Yao Qi <yao.qi@linaro.org>
3533
3534 * linux-low.c (handle_extended_wait): Call
3535 uninsert_reinsert_breakpoints for the parent process. Remove
3536 reinsert breakpoints from the child process. Reinsert them to
3537 the parent process when vfork is done.
3538 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3539 (reinsert_reinsert_breakpoints): New function.
3540 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3541 (reinsert_reinsert_breakpoints): Declare.
3542
8a81c5d7
YQ
35432016-06-17 Yao Qi <yao.qi@linaro.org>
3544
3545 * linux-low.c (handle_extended_wait): If the parent is doing
3546 step-over, remove the reinsert breakpoints from the forked child.
3547
f50bf8e5
YQ
35482016-06-17 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-low.c (unsuspend_all_lwps): Declare.
3551 (linux_low_filter_event): If thread exited, call finish_step_over.
3552 If step-over is finished, unsuspend other threads.
3553
8376a3cb
YQ
35542016-06-17 Yao Qi <yao.qi@linaro.org>
3555
3556 * linux-low.c (linux_resume_one_lwp_throw): Assert
3557 has_reinsert_breakpoints returns false.
3558 * mem-break.c (delete_disabled_breakpoints): Assert
3559 bp type isn't reinsert_breakpoint.
3560
f79b145d
YQ
35612016-06-17 Yao Qi <yao.qi@linaro.org>
3562
3563 * linux-low.c (maybe_hw_step): New function.
3564 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3565 (finish_step_over): Switch current_thread to lwp temporarily,
3566 and assert has_reinsert_breakpoints returns true.
3567 (proceed_one_lwp): Call maybe_hw_step.
3568 * mem-break.c (has_reinsert_breakpoints): New function.
3569 * mem-break.h (has_reinsert_breakpoints): Declare.
3570
0ae534d2
JT
35712016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3572
3573 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3574
fcdad592
YQ
35752016-05-17 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3578 instead of find_inferior.
3579
9e784964
YQ
35802016-05-05 Yao Qi <yao.qi@linaro.org>
3581
3582 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3583 Initialize res to zero.
3584
cf2ebb6e
YQ
35852016-05-05 Yao Qi <yao.qi@linaro.org>
3586
3587 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3588 to uint32_t.
3589
c1aebf87
UW
35902016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3591
3592 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3593 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3594 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3595
35fd2deb 35962016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3597 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3598
3599 * tracepoint.c (write_inferior_int8): New function.
3600 (cmd_qtenable_disable): Write enable flag using
3601 write_inferior_int8.
3602
484b3c32
YQ
36032016-04-25 Yao Qi <yao.qi@linaro.org>
3604
3605 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3606 (need_step_over_p): Return zero if the LWP has pending signals
3607 can be delivered on software single step target.
3608
85ba7d86
YQ
36092016-04-25 Yao Qi <yao.qi@linaro.org>
3610
3611 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3612 return instead of error.
3613
3539aa13
YQ
36142016-04-22 Yao Qi <yao.qi@linaro.org>
3615
3616 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3617 to 23.
3618
5b061e98
YQ
36192016-04-22 Yao Qi <yao.qi@linaro.org>
3620
3621 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3622 signal when stepping over breakpoint with software single
3623 step.
3624
3451269c
PA
36252016-04-21 Pedro Alves <palves@redhat.com>
3626
3627 * linux-s390-low.c (s390_collect_ptrace_register)
3628 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3629 add casts.
3630 (s390_check_regset): Use void * instead of gdb_byte *.
3631
a2358508
PA
36322016-04-20 Pedro Alves <palves@redhat.com>
3633
3634 * configure: Renegerate.
3635
6885166d
YQ
36362016-04-20 Yao Qi <yao.qi@linaro.org>
3637
3638 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3639 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3640 number 16.
3641 (arm_store_gregset): Likewise.
3642
2b863f51
WT
36432016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3644
3645 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3646 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3647 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3648 (amd64-avx-mpx-linux.c): New rules.
3649 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3650 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3651 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3652 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3653 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3654 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3655 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3656 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3657 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3658 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3659 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3660 * linux-x86-low.c (x86_linux_read_description): Add case for
3661 X86_XSTATE_AVX_MPX_MASK.
3662 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3663 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3664 init_registers_i386_avx_mpx_linux.
3665 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3666 (initialize_low_tracepoint): Call
3667 init_registers_i386_avx_mpx_linux.
3668 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3669 (initialize_low_tracepoint): Call
3670 init_registers_amd64_avx_mpx_linux.
3671 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3672 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3673 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3674 declarations.
3675
9b30624b
PA
36762016-04-18 Pedro Alves <palves@redhat.com>
3677
3678 * configure: Regenerate.
3679
45e3745e
AT
36802016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3681
3682 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3683 (aarch64_emit_sub): Likewise.
3684
2afc13ff
PA
36852016-04-12 Pedro Alves <palves@redhat.com>
3686
3687 * utils.c (prepare_to_throw_exception): Delete.
3688
6e774b13
SM
36892016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3690
3691 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3692
4dca19f8
MK
36932016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3694
3695 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3696
d0a9981f
MK
36972016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3698
3699 * linux-aarch64-ipa.c: Add <elf.h> include.
3700 * linux-ppc-ipa.c: Add <elf.h> include.
3701 * linux-s390-ipa.c: Add <elf.h> include.
3702
252db07e
MK
37032016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3704
3705 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3706 (get_raw_reg_ptr): Likewise.
3707 (get_trace_state_variable_value_ptr): Likewise.
3708 (set_trace_state_variable_value_ptr): Likewise.
3709 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3710 char *.
3711
14e2b6d9
MK
37122016-03-31 Wei-cheng Wang <cole945@gmail.com>
3713 Marcin Kościelnicki <koriakin@0x04.net>
3714
3715 PR/17221
3716 * linux-ppc-low.c (emit_insns): New function.
3717 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3718 (ppc_emit_prologue): New function.
3719 (ppc_emit_epilogue): New function.
3720 (ppc_emit_add): New function.
3721 (ppc_emit_sub): New function.
3722 (ppc_emit_mul): New function.
3723 (ppc_emit_lsh): New function.
3724 (ppc_emit_rsh_signed): New function.
3725 (ppc_emit_rsh_unsigned): New function.
3726 (ppc_emit_ext): New function.
3727 (ppc_emit_zero_ext): New function.
3728 (ppc_emit_log_not): New function.
3729 (ppc_emit_bit_and): New function.
3730 (ppc_emit_bit_or): New function.
3731 (ppc_emit_bit_xor): New function.
3732 (ppc_emit_bit_not): New function.
3733 (ppc_emit_equal): New function.
3734 (ppc_emit_less_signed): New function.
3735 (ppc_emit_less_unsigned): New function.
3736 (ppc_emit_ref): New function.
3737 (ppc_emit_const): New function.
3738 (ppc_emit_reg): New function.
3739 (ppc_emit_pop): New function.
3740 (ppc_emit_stack_flush): New function.
3741 (ppc_emit_swap): New function.
3742 (ppc_emit_stack_adjust): New function.
3743 (ppc_emit_call): New function.
3744 (ppc_emit_int_call_1): New function.
3745 (ppc_emit_void_call_2): New function.
3746 (ppc_emit_if_goto): New function.
3747 (ppc_emit_goto): New function.
3748 (ppc_emit_eq_goto): New function.
3749 (ppc_emit_ne_goto): New function.
3750 (ppc_emit_lt_goto): New function.
3751 (ppc_emit_le_goto): New function.
3752 (ppc_emit_gt_goto): New function.
3753 (ppc_emit_ge_goto): New function.
3754 (ppc_write_goto_address): New function.
3755 (ppc_emit_ops_impl): New static variable.
3756 (ppc64v1_emit_prologue): New function.
3757 (ppc64v2_emit_prologue): New function.
3758 (ppc64_emit_epilogue): New function.
3759 (ppc64_emit_add): New function.
3760 (ppc64_emit_sub): New function.
3761 (ppc64_emit_mul): New function.
3762 (ppc64_emit_lsh): New function.
3763 (ppc64_emit_rsh_signed): New function.
3764 (ppc64_emit_rsh_unsigned): New function.
3765 (ppc64_emit_ext): New function.
3766 (ppc64_emit_zero_ext): New function.
3767 (ppc64_emit_log_not): New function.
3768 (ppc64_emit_bit_and): New function.
3769 (ppc64_emit_bit_or): New function.
3770 (ppc64_emit_bit_xor): New function.
3771 (ppc64_emit_bit_not): New function.
3772 (ppc64_emit_equal): New function.
3773 (ppc64_emit_less_signed): New function.
3774 (ppc64_emit_less_unsigned): New function.
3775 (ppc64_emit_ref): New function.
3776 (ppc64_emit_const): New function.
3777 (ppc64v1_emit_reg): New function.
3778 (ppc64v2_emit_reg): New function.
3779 (ppc64_emit_pop): New function.
3780 (ppc64_emit_stack_flush): New function.
3781 (ppc64_emit_swap): New function.
3782 (ppc64v1_emit_call): New function.
3783 (ppc64v2_emit_call): New function.
3784 (ppc64v1_emit_int_call_1): New function.
3785 (ppc64v2_emit_int_call_1): New function.
3786 (ppc64v1_emit_void_call_2): New function.
3787 (ppc64v2_emit_void_call_2): New function.
3788 (ppc64_emit_if_goto): New function.
3789 (ppc64_emit_eq_goto): New function.
3790 (ppc64_emit_ne_goto): New function.
3791 (ppc64_emit_lt_goto): New function.
3792 (ppc64_emit_le_goto): New function.
3793 (ppc64_emit_gt_goto): New function.
3794 (ppc64_emit_ge_goto): New function.
3795 (ppc64v1_emit_ops_impl): New static variable.
3796 (ppc64v2_emit_ops_impl): New static variable.
3797 (ppc_emit_ops): New function.
3798 (linux_low_target): Wire in ppc_emit_ops.
3799
a2174ba4
MK
38002016-03-31 Wei-cheng Wang <cole945@gmail.com>
3801 Marcin Kościelnicki <koriakin@0x04.net>
3802
3803 PR/17221
3804 * Makefile.in: Add powerpc-*-ipa.o
3805 * configure.srv: Add ipa_obj for powerpc*-linux.
3806 * linux-ppc-ipa.c: New file.
3807 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3808 includes.
3809 (PPC_FIELD): New macro.
3810 (PPC_SEXT): New macro.
3811 (PPC_OP6): New macro.
3812 (PPC_BO): New macro.
3813 (PPC_LI): New macro.
3814 (PPC_BD): New macro.
3815 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3816 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3817 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3818 (ppc_get_thread_area): New function.
3819 (is_elfv2_inferior): New function.
3820 (gen_ds_form): New function.
3821 (GEN_STD): New macro.
3822 (GEN_STDU): New macro.
3823 (GEN_LD): New macro.
3824 (GEN_LDU): New macro.
3825 (gen_d_form): New function.
3826 (GEN_ADDI): New macro.
3827 (GEN_ADDIS): New macro.
3828 (GEN_LI): New macro.
3829 (GEN_LIS): New macro.
3830 (GEN_ORI): New macro.
3831 (GEN_ORIS): New macro.
3832 (GEN_LWZ): New macro.
3833 (GEN_STW): New macro.
3834 (GEN_STWU): New macro.
3835 (gen_xfx_form): New function.
3836 (GEN_MFSPR): New macro.
3837 (GEN_MTSPR): New macro.
3838 (GEN_MFCR): New macro.
3839 (GEN_MTCR): New macro.
3840 (GEN_SYNC): New macro.
3841 (GEN_LWSYNC): New macro.
3842 (gen_x_form): New function.
3843 (GEN_OR): New macro.
3844 (GEN_MR): New macro.
3845 (GEN_LWARX): New macro.
3846 (GEN_STWCX): New macro.
3847 (GEN_CMPW): New macro.
3848 (gen_md_form): New function.
3849 (GEN_RLDICL): New macro.
3850 (GEN_RLDICR): New macro.
3851 (gen_i_form): New function.
3852 (GEN_B): New macro.
3853 (GEN_BL): New macro.
3854 (gen_b_form): New function.
3855 (GEN_BNE): New macro.
3856 (GEN_LOAD): New macro.
3857 (GEN_STORE): New macro.
3858 (gen_limm): New function.
3859 (gen_atomic_xchg): New function.
3860 (gen_call): New function.
3861 (ppc_relocate_instruction): New function.
3862 (ppc_install_fast_tracepoint_jump_pad): New function.
3863 (ppc_get_min_fast_tracepoint_insn_len): New function.
3864 (ppc_get_ipa_tdesc_idx): New function.
3865 (the_low_target): Wire in the new functions.
3866 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3867 tdescs.
3868 * linux-ppc-tdesc.h: New file.
3869
a13c4696
MK
38702016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3871
3872 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3873 (alloc_jump_pad_buffer): New function.
3874 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3875 (alloc_jump_pad_buffer): New function.
3876 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3877 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3878 (alloc_jump_pad_buffer): New function.
3879 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3880 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3881 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3882 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3883
1cda1512
MK
38842016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3885
3886 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3887 * linux-amd64-ipa.c: Likewise.
3888 * linux-i386-ipa.c: Likewise.
3889 * linux-s390-ipa.c: Likewise.
3890 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3891 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3892 set_trace_state_variable_value_ptr.
3893 (struct ipa_sym_addresses): Likewise.
3894 (symbol_list): Likewise.
3895 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3896 accessing gdb_collect directly.
3897 (gdb_collect_ptr_type): New typedef.
3898 (get_raw_reg_ptr_type): New typedef.
3899 (get_trace_state_variable_value_ptr_type): New typedef.
3900 (set_trace_state_variable_value_ptr_type): New typedef.
3901 (gdb_collect_ptr): New global.
3902 (get_raw_reg_ptr): New global.
3903 (get_trace_state_variable_value_ptr): New global.
3904 (set_trace_state_variable_value_ptr): New global.
3905 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3906 accessing get_raw_reg directly.
3907 (get_get_tsv_func_addr): Likewise for
3908 get_trace_state_variable_value_ptr.
3909 (get_set_tsv_func_addr): Likewise for
3910 set_trace_state_variable_value_ptr.
3911 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3912
72fb5488
SM
39132016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3914
3915 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3916
28170b88
MK
39172016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3918
3919 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3920 packets.
3921 (relocate_instruction): Remove own_buf.
3922 * server.c (own_buf): Make global.
3923 (handle_v_requests): Make global.
3924 * server.h (own_buf): New declaration.
3925 (handle_v_requests): New prototype.
3926
f39e8743
MK
39272016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3928
3929 PR 18377
3930 * linux-s390-low.c (add_insns): New function.
3931 (s390_emit_prologue): New function.
3932 (s390_emit_epilogue): New function.
3933 (s390_emit_add): New function.
3934 (s390_emit_sub): New function.
3935 (s390_emit_mul): New function.
3936 (s390_emit_lsh): New function.
3937 (s390_emit_rsh_signed): New function.
3938 (s390_emit_rsh_unsigned): New function.
3939 (s390_emit_ext): New function.
3940 (s390_emit_log_not): New function.
3941 (s390_emit_bit_and): New function.
3942 (s390_emit_bit_or): New function.
3943 (s390_emit_bit_xor): New function.
3944 (s390_emit_bit_not): New function.
3945 (s390_emit_equal): New function.
3946 (s390_emit_less_signed): New function.
3947 (s390_emit_less_unsigned): New function.
3948 (s390_emit_ref): New function.
3949 (s390_emit_if_goto): New function.
3950 (s390_emit_goto): New function.
3951 (s390_write_goto_address): New function.
3952 (s390_emit_litpool): New function.
3953 (s390_emit_const): New function.
3954 (s390_emit_call): New function.
3955 (s390_emit_reg): New function.
3956 (s390_emit_pop): New function.
3957 (s390_emit_stack_flush): New function.
3958 (s390_emit_zero_ext): New function.
3959 (s390_emit_swap): New function.
3960 (s390_emit_stack_adjust): New function.
3961 (s390_emit_set_r2): New function.
3962 (s390_emit_int_call_1): New function.
3963 (s390_emit_void_call_2): New function.
3964 (s390_emit_eq_goto): New function.
3965 (s390_emit_ne_goto): New function.
3966 (s390_emit_lt_goto): New function.
3967 (s390_emit_le_goto): New function.
3968 (s390_emit_gt_goto): New function.
3969 (s390_emit_ge_goto): New function.
3970 (s390x_emit_prologue): New function.
3971 (s390x_emit_epilogue): New function.
3972 (s390x_emit_add): New function.
3973 (s390x_emit_sub): New function.
3974 (s390x_emit_mul): New function.
3975 (s390x_emit_lsh): New function.
3976 (s390x_emit_rsh_signed): New function.
3977 (s390x_emit_rsh_unsigned): New function.
3978 (s390x_emit_ext): New function.
3979 (s390x_emit_log_not): New function.
3980 (s390x_emit_bit_and): New function.
3981 (s390x_emit_bit_or): New function.
3982 (s390x_emit_bit_xor): New function.
3983 (s390x_emit_bit_not): New function.
3984 (s390x_emit_equal): New function.
3985 (s390x_emit_less_signed): New function.
3986 (s390x_emit_less_unsigned): New function.
3987 (s390x_emit_ref): New function.
3988 (s390x_emit_if_goto): New function.
3989 (s390x_emit_const): New function.
3990 (s390x_emit_call): New function.
3991 (s390x_emit_reg): New function.
3992 (s390x_emit_pop): New function.
3993 (s390x_emit_stack_flush): New function.
3994 (s390x_emit_zero_ext): New function.
3995 (s390x_emit_swap): New function.
3996 (s390x_emit_stack_adjust): New function.
3997 (s390x_emit_int_call_1): New function.
3998 (s390x_emit_void_call_2): New function.
3999 (s390x_emit_eq_goto): New function.
4000 (s390x_emit_ne_goto): New function.
4001 (s390x_emit_lt_goto): New function.
4002 (s390x_emit_le_goto): New function.
4003 (s390x_emit_gt_goto): New function.
4004 (s390x_emit_ge_goto): New function.
4005 (s390_emit_ops): New function.
4006 (struct linux_target_ops): Fill in emit_ops hook.
4007
abd9baf9
MK
40082016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4009
4010 PR 18377
4011 * Makefile.in: Add s390 IPA files.
4012 * configure.srv: Build IPA for s390.
4013 * linux-s390-ipa.c: New file.
4014 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4015 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4016 (tdesc_s390_linux32): Likewise.
4017 (init_registers_s390_linux32v1): Likewise.
4018 (tdesc_s390_linux32v1): Likewise.
4019 (init_registers_s390_linux32v2): Likewise.
4020 (tdesc_s390_linux32v2): Likewise.
4021 (init_registers_s390_linux64): Likewise.
4022 (tdesc_s390_linux64): Likewise.
4023 (init_registers_s390_linux64v1): Likewise.
4024 (tdesc_s390_linux64v1): Likewise.
4025 (init_registers_s390_linux64v2): Likewise.
4026 (tdesc_s390_linux64v2): Likewise.
4027 (init_registers_s390_te_linux64): Likewise.
4028 (tdesc_s390_te_linux64): Likewise.
4029 (init_registers_s390_vx_linux64): Likewise.
4030 (tdesc_s390_vx_linux64): Likewise.
4031 (init_registers_s390_tevx_linux64): Likewise.
4032 (tdesc_s390_tevx_linux64): Likewise.
4033 (init_registers_s390x_linux64): Likewise.
4034 (tdesc_s390x_linux64): Likewise.
4035 (init_registers_s390x_linux64v1): Likewise.
4036 (tdesc_s390x_linux64v1): Likewise.
4037 (init_registers_s390x_linux64v2): Likewise.
4038 (tdesc_s390x_linux64v2): Likewise.
4039 (init_registers_s390x_te_linux64): Likewise.
4040 (tdesc_s390x_te_linux64): Likewise.
4041 (init_registers_s390x_vx_linux64): Likewise.
4042 (tdesc_s390x_vx_linux64): Likewise.
4043 (init_registers_s390x_tevx_linux64): Likewise.
4044 (tdesc_s390x_tevx_linux64): Likewise.
4045 (have_hwcap_s390_vx): New static variable.
4046 (s390_arch_setup): Fill have_hwcap_s390_vx.
4047 (s390_get_thread_area): New function.
4048 (s390_ft_entry_gpr_esa): New const.
4049 (s390_ft_entry_gpr_zarch): New const.
4050 (s390_ft_entry_misc): New const.
4051 (s390_ft_entry_fr): New const.
4052 (s390_ft_entry_vr): New const.
4053 (s390_ft_main_31): New const.
4054 (s390_ft_main_64): New const.
4055 (s390_ft_exit_fr): New const.
4056 (s390_ft_exit_vr): New const.
4057 (s390_ft_exit_misc): New const.
4058 (s390_ft_exit_gpr_esa): New const.
4059 (s390_ft_exit_gpr_zarch): New const.
4060 (append_insns): New function.
4061 (s390_relocate_instruction): New function.
4062 (s390_install_fast_tracepoint_jump_pad): New function.
4063 (s390_get_min_fast_tracepoint_insn_len): New function.
4064 (s390_get_ipa_tdesc_idx): New function.
4065 (struct linux_target_ops): Wire in the above functions.
4066 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4067 * linux-s390-tdesc.h: New file.
4068
a4105d04
MK
40692016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4070
4071 * linux-s390-low.c (s390_supports_tracepoints): New function.
4072 (struct linux_target_ops): Fill supports_tracepoints hook.
4073
35ac8b3e
YQ
40742016-03-18 Yao Qi <yao.qi@linaro.org>
4075
4076 * linux-low.c (lwp_signal_can_be_delivered): New function.
4077 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4078
94610ec4
YQ
40792016-03-18 Yao Qi <yao.qi@linaro.org>
4080
4081 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4082 0 if signal is enqueued. Remove 'signal' from one debugging
4083 message. Move one debugging message to some lines below.
4084 Remove code setting 'signal' to 0.
4085
80aea927
YQ
40862016-03-18 Yao Qi <yao.qi@linaro.org>
4087
4088 * linux-low.c (linux_low_filter_event): Remove redundant
4089 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4090
b04fd3be
MK
40912016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4092
4093 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4094 (struct linux_target_ops): Wire in the above.
4095
c40c8d4b
YQ
40962016-03-03 Yao Qi <yao.qi@linaro.org>
4097
4098 * linux-low.c: Update comments to start_step_over.
4099
0f8288ae
YQ
41002016-03-03 Yao Qi <yao.qi@linaro.org>
4101
4102 PR server/19736
4103 * linux-low.c (handle_extended_wait): Set child suspended
4104 if event_lwp->bp_reinsert isn't zero.
4105
fdbd04a8
YQ
41062016-03-02 Yao Qi <yao.qi@linaro.org>
4107
4108 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4109 enqueue_pending_signal.
4110
6896a8fa
MK
41112016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4112
4113 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4114 is actually loaded.
4115
ab503087
MK
41162016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4117
4118 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4119 (s390_regmap_3264) [!__s390x__]: New global.
4120 (s390_collect_ptrace_register): Skip map entries containing -1.
4121 (s390_supply_ptrace_register): Ditto.
4122 (s390_fill_gprs_high): New function.
4123 (s390_store_gprs_high): New function.
4124 (s390_regsets): Add NT_S390_HIGH_GPRS.
4125 (s390_get_hwcap): Enable on 31-bit.
4126 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4127 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4128 Detect NT_S390_HIGH_GPRS.
4129 (s390_usrregs_info_3264): Enable on 31-bit.
4130 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4131 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4132
ae91f625
MK
41332016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4134
4135 PR gdb/13808
4136 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4137 * configure.srv: Ditto.
4138 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4139 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4140 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4141 (init_registers_amd64_linux): Remove prototype.
4142 (tdesc_amd64_linux): Remove declaration.
4143 (get_ipa_tdesc): New function.
4144 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4145 initialize remaining tdescs.
4146 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4147 (init_registers_i386_linux): Remove prototype.
4148 (tdesc_i386_linux): Remove declaration.
4149 (get_ipa_tdesc): New function.
4150 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4151 initialize remaining tdescs.
4152 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4153 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4154 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4155 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4156 (x86_get_ipa_tdesc_idx): New function.
4157 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4158 * linux-x86-tdesc.h: New file.
4159 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4160 (target_get_ipa_tdesc_idx): New macro.
4161 * tracepoint.c (ipa_tdesc_idx): New macro.
4162 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4163 (symbol_list): Add ipa_tdesc_idx.
4164 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4165 (ipa_tdesc): Remove.
4166 (ipa_tdesc_idx): New variable.
4167 (get_context_regcache): Use get_ipa_tdesc.
4168 (gdb_collect): Ditto.
4169 (gdb_probe): Ditto.
4170 * tracepoint.h (get_ipa_tdesc): New prototype.
4171 (ipa_tdesc): Remove.
4172
e7ad2f14
PA
41732016-02-24 Pedro Alves <palves@redhat.com>
4174
4175 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4176 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4177 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4178 Factor out common code between the USE_SIGTRAP_SIGINFO and
4179 !USE_SIGTRAP_SIGINFO blocks.
4180 (linux_low_filter_event): Call save_stop_reason instead of
4181 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4182 Update comments.
4183 (linux_wait_1): Update comments.
4184
657f9cde
WW
41852016-02-24 Wei-cheng Wang <cole945@gmail.com>
4186
4187 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4188 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4189 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4190 ppc_insert_point, ppc_remove_point.
4191
b00b61e1
MK
41922016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4193
4194 * linux-s390-low.c (s390_supports_z_point_type): New function.
4195 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4196
553cb527
YQ
41972016-02-16 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4200 PC. Get pc from regcache_read_pc.
4201
a5652c21
YQ
42022016-02-12 Yao Qi <yao.qi@linaro.org>
4203
4204 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4205 or linux_get_pc_32bit.
4206 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4207
ed443b61
YQ
42082016-02-12 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4211 arm_linux_get_next_pcs_fixup.
4212
020ecd38
MK
42132016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4214
4215 * tracepoint.c (x_tracepoint_action_download): Change
4216 write_inferior_data_ptr to write_inferior_data_pointer.
4217 (cmd_qtstart): Likewise.
4218 (write_inferior_data_ptr): Remove.
4219 (download_agent_expr): Change write_inferior_data_ptr to
4220 write_inferior_data_pointer.
4221 (download_tracepoint_1): Likewise.
4222 (download_tracepoint): Likewise.
4223 (download_trace_state_variables): Likewise.
4224
7cae9051
WW
42252016-02-11 Wei-cheng Wang <cole945@gmail.com>
4226 Marcin Kościelnicki <koriakin@0x04.net>
4227
4228 * tracepoint.c (struct tracepoint_action_ops): Remove.
4229 (struct tracepoint_action): Remove ops.
4230 (m_tracepoint_action_download, r_tracepoint_action_download)
4231 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4232 size and offset accordingly.
4233 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4234 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4235 (tracepoint_action_send, tracepoint_action_download): New functions.
4236 Helpers for trace action handlers.
4237 (add_tracepoint_action): Remove setup actions ops.
4238 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4239
9f6a71b4
YQ
42402016-02-10 Yao Qi <yao.qi@linaro.org>
4241
4242 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4243
1e94266c
SM
42442016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4245
4246 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4247 to AC_OUTPUT.
4248 * configure: Regenerate.
4249
8adce034
SM
42502016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4251
4252 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4253 void * to gdb_byte *.
4254 * linux-low.c (siginfo_fixup): Likewise.
4255 (linux_xfer_siginfo): Likewise.
4256 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4257 Likewise.
4258 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4259
93813b37
WT
42602016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4261
4262 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4263 to srv_tgtobj.
4264 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4265 to srv_tgtobj.
4266 * linux-x86-low.c [__x86_64__]: Include
4267 "nat/amd64-linux-siginfo.h".
4268 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4269 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4270 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4271 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4272 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4273 (cpt_si_fd, si_timerid, si_overrun): Move from
4274 nat/amd64-linux-siginfo.c.
4275 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4276
8424cc97
SM
42772016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4278
4279 * server.c (skip_to_semicolon): Remove.
4280 (process_point_options): Use strchrnul instead of
4281 skip_to_semicolon.
4282
4d18591b
YQ
42832016-01-26 Yao Qi <yao.qi@linaro.org>
4284
4285 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4286 * linux-low.c (install_software_single_step_breakpoints): Don't
4287 call regcache_read_pc.
4288 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4289 argument pc.
4290
d8020970
YQ
42912016-01-26 Yao Qi <yao.qi@linaro.org>
4292
4293 * linux-low.c (install_software_single_step_breakpoints): Call
4294 regcache_read_pc instead of get_pc.
4295
8b207339
YQ
42962016-01-26 Yao Qi <yao.qi@linaro.org>
4297
4298 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4299 (unblock_async_io): Rename to ...
4300 (block_unblock_async_io): ... it. New function.
4301 (enable_async_io): Don't install SIGIO handler. Unblock it
4302 instead.
4303 (disable_async_io): Don't ignore SIGIO. Block it instead.
4304 (initialize_async_io): Install SIGIO handler. Don't call
4305 unblock_async_io.
4306
18879fef
YQ
43072016-01-26 Yao Qi <yao.qi@linaro.org>
4308
4309 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4310 first character is '\003', call *the_target->request_interrupt.
4311
a0f8e08a
YQ
43122016-01-25 Yao Qi <yao.qi@linaro.org>
4313
4314 * remote-utils.c (new_thread_notify): Remove.
4315 (dead_thread_notify): Likewise.
4316 * remote-utils.h (new_thread_notify): Remove declaration.
4317 (dead_thread_notify): Likewise.
4318
cc5fd9ab
MK
43192016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4320
4321 * gdb.trace/pending.exp: Fix expected message on continue.
4322
99e8eb11
MK
43232016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4324
4325 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4326 it works properly on big-endian machines where sizeof (CORE_ADDR)
4327 != sizeof (void *).
4328
a994041d
PA
43292016-01-21 Pedro Alves <palves@redhat.com>
4330
4331 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4332 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4333 * configure: Regenerate.
4334
f7a6a40d
YQ
43352016-01-21 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4338 is_thumb and set it according to CPSR saved on the stack.
4339 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4340 arm_sigreturn_next_pc.
4341
6f69e520
YQ
43422016-01-18 Yao Qi <yao.qi@linaro.org>
4343
4344 * linux-low.c (linux_set_pc_64bit): New function.
4345 (linux_get_pc_64bit): New function.
4346 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4347 Declare.
4348 * linux-sparc-low.c (debug_threads): Remove declaration.
4349 (sparc_get_pc): Remove.
4350 (the_low_target): Use linux_get_pc_64bit instead of
4351 sparc_get_pc.
4352 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4353 (the_low_target): Use linux_get_pc_64bit and
4354 linux_set_pc_64bit.
4355
276d4552
YQ
43562016-01-18 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-arm-low.c (debug_threads): Remove declaration.
4359 (arm_get_pc, arm_set_pc): Remove.
4360 (the_low_target): Use linux_get_pc_32bit and
4361 linux_set_pc_32bit.
4362 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4363 (the_low_target): Use linux_get_pc_32bit and
4364 linux_set_pc_32bit.
4365 * linux-cris-low.c (debug_threads): Remove declaration.
4366 (cris_get_pc, cris_set_pc,): Remove.
4367 (the_low_target): Use linux_get_pc_32bit and
4368 linux_set_pc_32bit.
4369 * linux-crisv32-low.c (debug_threads): Remove declaration.
4370 (cris_get_pc, cris_set_pc): Remove.
4371 (the_low_target): Use linux_get_pc_32bit and
4372 linux_set_pc_32bit.
4373 * linux-low.c: Include inttypes.h.
4374 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4375 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4376 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4377 (the_low_target): Use linux_get_pc_32bit and
4378 linux_set_pc_32bit.
4379 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4380 (the_low_target): Use linux_get_pc_32bit and
4381 linux_set_pc_32bit.
4382 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4383 (the_low_target): Use linux_get_pc_32bit and
4384 linux_set_pc_32bit.
4385 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4386 (the_low_target): Use linux_get_pc_32bit and
4387 linux_set_pc_32bit.
4388 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4389 (the_low_target): Use linux_get_pc_32bit and
4390 linux_set_pc_32bit.
4391
eb0edac8
GB
43922016-01-18 Gary Benson <gbenson@redhat.com>
4393
4394 * configure.ac (AC_FUNC_FORK): New check.
4395 * config.in: Regenerate.
4396 * configure: Likewise.
4397
1b451dda
YQ
43982016-01-14 Yao Qi <yao.qi@linaro.org>
4399
4400 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4401 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4402 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4403 arm_get_next_pcs_ctor.
4404
82075af2
JS
44052016-01-12 Josh Stone <jistone@redhat.com>
4406 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4407
4408 * inferiors.h: Include "gdb_vecs.h".
4409 (struct process_info): Add syscalls_to_catch.
4410 * inferiors.c (remove_process): Free syscalls_to_catch.
4411 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4412 syscall_return stops.
4413 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4414 * server.c (handle_general_set): Handle QCatchSyscalls.
4415 (handle_query): Report support for QCatchSyscalls.
4416 * target.h (struct target_ops): Add supports_catch_syscall.
4417 (target_supports_catch_syscall): New macro.
4418 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4419 (struct lwp_info): Add syscall_state.
4420 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4421 Maintain syscall_state and syscalls_to_catch across exec.
4422 (get_syscall_trapinfo): New function, proxy to the_low_target.
4423 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4424 (linux_low_filter_event): Toggle syscall_state entry/return for
4425 syscall traps, and set it ignored for all others.
4426 (gdb_catching_syscalls_p): New function.
4427 (gdb_catch_this_syscall_p): New function.
4428 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4429 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4430 (linux_supports_catch_syscall): New function.
4431 (linux_target_ops): Install it.
4432 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4433 (the_low_target): Install it.
4434
8f13a3ce
MF
44352016-01-12 Mike Frysinger <vapier@gentoo.org>
4436
4437 * acinclude.m4: Include new ../warning.m4 file.
4438 * configure: Regenerated.
4439 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4440
5b3da067
MF
44412016-01-12 Mike Frysinger <vapier@gentoo.org>
4442
4443 * ax.c (is_goto_target): Mark static.
4444 * linux-low.c (register_addr): Likewise.
4445 (linux_fetch_registers, linux_store_registers): Likewise.
4446 * mem-break.c (any_persistent_commands): Fix old prototype.
4447 (add_commands_to_breakpoint): Mark static.
4448 * regcache.c (find_register_by_name): Delete unused func.
4449 * remote-utils.c (hex_or_minus_one): Mark static.
4450 * server.c (monitor_show_help): Mark static.
4451 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4452 handle_v_requests): Likewise.
4453
bc504a31
PA
44542016-01-12 Pedro Alves <palves@redhat.com>
4455
4456 Remove use of the registered trademark symbol throughout.
4457
5a0dd67a
YQ
44582016-01-08 Yao Qi <yao.qi@linaro.org>
4459
4460 * remote-utils.c (getpkt): If c is '\003', call target hook
4461 request_interrupt.
4462
b2ca446f
YQ
44632016-01-06 Yao Qi <yao.qi@linaro.org>
4464
4465 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4466 linux-aarch32-low.c.
4467 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4468 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4469 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4470 (thumb2_breakpoint): Declare.
4471 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4472 linux-aarch32-low.h.
4473 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4474 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4475 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4476
edd88788
JB
44772016-01-01 Joel Brobecker <brobecker@adacore.com>
4478
4479 * gdbreplay.c (gdbreplay_version): Change copyright year in
4480 version message.
4481 * server.c (gdbserver_version): Likewise.
4482
65da7f14
PP
44832015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4484
4485 * server.c (crc32_table): Delete.
4486 (crc32): Use libiberty's xcrc32 function.
4487
4abd5ed2
JB
44882015-12-22 Joel Brobecker <brobecker@adacore.com>
4489
4490 * lynx-low.c (lynx_delete_thread_callback): New function.
4491 (lynx_mourn): Properly delete our process and all of its
4492 threads. Remove call to clear_inferiors.
4493
0e50fe5c
JB
44942015-12-22 Joel Brobecker <brobecker@adacore.com>
4495
4496 * target.c (thread_search_callback): Add check that
4497 the thread_stopped target callback is not NULL before
4498 calling it.
4499
35adc03f
YQ
45002015-12-21 Yao Qi <yao.qi@linaro.org>
4501
4502 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4503 arm breakpoint.
4504
bd2b2909
AT
45052015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4506
4507 * server.c (handle_query): Call target_supports_software_single_step.
4508
7fe5e27e
AT
45092015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4510
4511 * linux-low.c (single_step): New function.
4512 (linux_resume_one_lwp_throw): Call single_step.
4513 (start_step_over): Likewise.
4514
d9311bfa
AT
45152015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4516
4517 * Makefile.in (SFILES): Append arch/arm-linux.c,
4518 arch/arm-get-next-pcs.c.
4519 (arm-linux.o): New rule.
4520 (arm-get-next-pcs.o): New rule.
4521 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4522 arm-linux.o.
4523 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4524 to linux-aarch32-low.c.
4525 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4526 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4527 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4528 (thumb2_breakpoint_len): Likewise.
4529 (arm_is_thumb_mode): Make non-static.
4530 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4531 from linux-aarch32-low.c.
4532 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4533 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4534 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4535 (thumb2_breakpoint_len): Likewise.
4536 (arm_is_thumb_mode): New declaration.
4537 * linux-arm-low.c: Include arch/arm-linux.h
4538 aarch/arm-get-next-pcs.h, sys/syscall.h.
4539 (get_next_pcs_ops): New struct.
4540 (get_next_pcs_addr_bits_remove): New function.
4541 (get_next_pcs_is_thumb): New function.
4542 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4543 (arm_sigreturn_next_pc): Likewise.
4544 (get_next_pcs_syscall_next_pc): Likewise.
4545 (arm_gdbserver_get_next_pcs): Likewise.
4546 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4547 Initialize.
4548 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4549 * server.h: Include gdb_vecs.h.
4550
68ce2059
AT
45512015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4552
4553 * Makefile.in (SFILES): Append common/common-regcache.c.
4554 (OBS): Append common-regcache.o.
4555 (common-regcache.o): New rule.
4556 * regcache.c (init_register_cache): Initialize cache to
4557 REG_UNAVAILABLE.
4558 (regcache_raw_read_unsigned): New function.
4559 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4560 register_status enum.
4561
fa5308bd
AT
45622015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4563
4564 * linux-aarch64-low.c (the_low_targets): Rename
4565 breakpoint_reinsert_addr to get_next_pcs.
4566 * linux-arm-low.c (the_low_targets): Likewise.
4567 * linux-bfin-low.c (the_low_targets): Likewise.
4568 * linux-cris-low.c (the_low_targets): Likewise.
4569 * linux-crisv32-low.c (the_low_targets): Likewise.
4570 * linux-low.c (can_software_single_step): Likewise.
4571 (install_software_single_step_breakpoints): New function.
4572 (start_step_over): Use install_software_single_step_breakpoints.
4573 * linux-low.h: New CORE_ADDR vector.
4574 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4575 get_next_pcs.
4576 * linux-mips-low.c (the_low_targets): Likewise.
4577 * linux-nios2-low.c (the_low_targets): Likewise.
4578 * linux-sparc-low.c (the_low_targets): Likewise.
4579
4a6ed09b
PA
45802015-12-17 Pedro Alves <palves@redhat.com>
4581
4582 * linux-low.c (linux_kill_one_lwp): Remove references to
4583 LinuxThreads.
4584 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4585 to 'kill'.
4586 (linux_init_signals): Delete.
4587 (initialize_low): Adjust.
4588 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4589
7544db95
PA
45902015-12-16 Pedro Alves <palves@redhat.com>
4591
4592 * configure.ac (compiler warning flags): When testing a
4593 -Wno-foo option, check whether -Wfoo works instead.
4594 * configure: Regenerate.
4595
8020350c
DB
45962015-12-11 Don Breazeal <donb@codesourcery.com>
4597
4598 * server.c (process_serial_event): Don't exit from gdbserver
4599 in remote mode if there are still active inferiors.
4600
db91f502
YQ
46012015-12-11 Yao Qi <yao.qi@linaro.org>
4602
4603 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4604 arm_breakpoint_at if the process is 32-bit.
4605
b37a6290
YQ
46062015-12-11 Yao Qi <yao.qi@linaro.org>
4607
4608 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4609 arm breakpoint.
4610
17b1509a
YQ
46112015-12-07 Yao Qi <yao.qi@linaro.org>
4612
4613 * configure.srv: Append arm.o to srv_tgtobj for
4614 aarch64*-*-linux* target.
4615 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4616 from linux-arm-low.c.
4617 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4618 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4619 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4620 (thumb2_breakpoint_len): Likewise.
4621 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4622 (arm_breakpoint_kinds): Likewise.
4623 (arm_breakpoint_kind_from_pc): Likewise.
4624 (arm_sw_breakpoint_from_kind): Likewise.
4625 (arm_breakpoint_kind_from_current_state): Likewise.
4626 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4627 (arm_sw_breakpoint_from_kind): Declare.
4628 (arm_breakpoint_kind_from_current_state): Declare.
4629 (arm_breakpoint_at): Declare.
4630 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4631 arm_sw_breakpoint_from_kind if process is 32-bit.
4632 (aarch64_breakpoint_kind_from_pc): New function.
4633 (aarch64_breakpoint_kind_from_current_state): New function.
4634 (the_low_target): Initialize fields breakpoint_kind_from_pc
4635 and breakpoint_kind_from_current_state.
4636 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4637 linux-aarch32-low.c.
4638 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4639 (arm_breakpoint, arm_breakpoint_len): Likewise.
4640 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4641 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4642 (arm_is_thumb_mode): Likewise.
4643 (arm_breakpoint_at): Likewise.
4644 (arm_breakpoint_kind_from_pc): Likewise.
4645 (arm_sw_breakpoint_from_kind): Likewise.
4646 (arm_breakpoint_kind_from_current_state): Likewise.
4647
4648 Revert:
4649 2015-08-04 Yao Qi <yao.qi@linaro.org>
4650
4651 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4652 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4653 * server.c (extended_protocol): Remove "static".
4654 * server.h (extended_protocol): Declare it.
4655
ece66d65
JS
46562015-12-04 Josh Stone <jistone@redhat.com>
4657
4658 * target.h (struct target_ops) <arch_setup>: Rename to ...
4659 (struct target_ops) <post_create_inferior>: ... this.
4660 (target_arch_setup): Rename to ...
4661 (target_post_create_inferior): ... this, calling post_create_inferior.
4662 * server.c (start_inferior): Update target_arch_setup calls to
4663 target_post_create_inferior.
4664 * linux-low.c (linux_low_ptrace_options): Forward declare.
4665 (linux_arch_setup): Update its comment for general use.
4666 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4667 (struct linux_target_ops): Use linux_post_create_inferior.
4668 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4669 to post_create_inferior.
4670 * nto-low.c (struct nto_target_ops): Likewise.
4671 * spu-low.c (struct spu_target_ops): Likewise.
4672 * win32-low.c (struct win32_target_ops): Likewise.
4673
e58c48b4
AT
46742015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4675
4676 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4677
fbec8956
AT
46782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4679
4680 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4681 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4682 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4683 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4684 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4685 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4686 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4687 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4688 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4689 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4690 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4691 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4692
9b4c5f87
AT
46932015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4694
4695 * linux-low.c (linux_look_up_symbols): Don't call
4696 linux_supports_traceclone.
4697 * linux-low.h (thread_db_init): Remove use_events argument.
4698 * thread-db.c (thread_db_use_event): Remove global variable.
4699 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4700 (struct thread_db) <td_create_bp>: Remove field.
4701 (thread_db_create_event): Remove function.
4702 (thread_db_enable_reporting): Likewise.
4703 (find_one_thread): Don't check for thread_db_use_events.
4704 (attach_thread): Likewise.
4705 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4706 (try_thread_db_load_1): Don't check for thread_db_use_events.
4707 (thread_db_init): Remove use_events argument and thread events
4708 handling.
4709 (remove_thread_event_breakpoints): Remove function.
4710 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4711
7d00775e
AT
47122015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4713
4714 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4715 New function.
4716 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4717 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4718 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4719 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4720 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4721 Initialize.
4722 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4723 New function.
4724 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4725 * linux-low.c (can_hardware_single_step): Use
4726 supports_hardware_single_step.
4727 (can_software_single_step): New function.
4728 (start_step_over): Call can_software_single_step.
4729 (linux_supports_hardware_single_step): New function.
4730 (struct target_ops) <supports_software_single_step>: Initialize.
4731 * linux-low.h (struct linux_target_ops)
4732 <supports_hardware_single_step>: Initialize.
4733 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4734 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4735 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4736 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4737 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4738 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4739 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4740 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4741 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4742 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4743 Initialize.
4744 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4745 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4746 Initialize.
4747 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4748 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4749 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4750 New function.
4751 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4752 * target.h (struct target_ops): <supports_software_single_step>:
4753 New field.
4754 (target_supports_software_single_step): New macro.
4755
2d97cd35
AT
47562015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4757
4758 * linux-low.c (linux_wait_1): Fix pc advance condition.
4759 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4760 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4761
769ef81f
AT
47622015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4763
4764 * linux-arm-low.c (arm_is_thumb_mode): New function.
4765 (arm_breakpoint_at): Use arm_is_thumb_mode.
4766 (arm_breakpoint_kind_from_current_state): New function.
4767 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4768 Initialize.
4769 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4770 (linux_breakpoint_kind_from_current_state): New function.
4771 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4772 * linux-low.h (struct linux_target_ops)
4773 <breakpoint_kind_from_current_state>: New field.
4774 * target.h (struct target_ops): Likewise.
4775 (target_breakpoint_kind_from_current_state): New macro.
4776
1bebeeca
PA
47772015-11-30 Pedro Alves <palves@redhat.com>
4778
4779 * linux-low.c (linux_resume): Wake up the event loop before
4780 returning.
4781
a67a9fae
PA
47822015-11-30 Pedro Alves <palves@redhat.com>
4783
4784 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4785 check.
4786 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4787 to -1.
4788 * target.c (struct thread_search): New structure.
4789 (thread_search_callback): New function.
4790 (prev_general_thread): New global.
4791 (prepare_to_access_memory, done_accessing_memory): New functions.
4792 * target.h (prepare_to_access_memory, done_accessing_memory):
4793 Replace macros with function declarations.
4794
f2faf941
PA
47952015-11-30 Pedro Alves <palves@redhat.com>
4796
4797 PR 14618
4798 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4799 report TARGET_WAITKIND_NO_RESUMED.
4800 * remote-utils.c (prepare_resume_reply): Handle
4801 TARGET_WAITKIND_NO_RESUMED.
4802 * server.c (report_no_resumed): New global.
4803 (handle_query) <qSupported>: Handle "no-resumed+". Report
4804 "no-resumed+" support.
4805 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4806 return error if the client doesn't support no-resumed events.
4807 (push_stop_notification): New function.
4808 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4809 events if the client supports them.
4810
a681f9c9
PA
48112015-11-30 Pedro Alves <palves@redhat.com>
4812
4813 * linux-low.c (thread_still_has_status_pending_p): Don't check
4814 vCont;t here.
4815 (lwp_resumed): New function.
4816 (status_pending_p_callback): Return early if the LWP is not
4817 supposed to be resumed.
4818
65706a29
PA
48192015-11-30 Pedro Alves <palves@redhat.com>
4820
4821 * linux-low.c (handle_extended_wait): Assert that the LWP's
4822 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4823 thread create events, leave the new child's status pending.
4824 (linux_low_filter_event): If GDB wants to hear about thread exit
4825 events, leave the LWP marked dead and don't delete it.
4826 (linux_wait_for_event_filtered): Don't check for thread exit.
4827 (filter_exit_event): New function.
4828 (linux_wait_1): Use it, when returning an exit event.
4829 (linux_resume_one_lwp_throw): Assert that the LWP's
4830 waitstatus is TARGET_WAITKIND_IGNORE.
4831 * remote-utils.c (prepare_resume_reply): Handle
4832 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4833 * server.c (report_thread_events): New global.
4834 (handle_general_set): Handle QThreadEvents.
4835 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4836 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4837 TARGET_WAITKIND_THREAD_EXITED.
4838 * server.h (report_thread_events): Declare.
4839
56cf4bed
PA
48402015-11-30 Pedro Alves <palves@redhat.com>
4841
4842 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4843 the thread's last_resume_kind was resume_stop.
4844
500c1d85
PA
48452015-11-30 Pedro Alves <palves@redhat.com>
4846
4847 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4848 before returning.
4849
de979965
PA
48502015-11-30 Pedro Alves <palves@redhat.com>
4851
4852 * server.c (handle_v_requests): Handle vCtrlC.
4853
34c65914
PA
48542015-11-30 Pedro Alves <palves@redhat.com>
4855
4856 * gdbthread.h (find_any_thread_of_pid): Declare.
4857 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4858 functions.
4859 * server.c (handle_query): If current_thread is NULL, look for
4860 another thread of the selected process.
4861
79efa585 48622015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4863 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4864
4865 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4866 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4867 name in reply.
4868 * target.h (struct target_ops) <thread_name>: New field.
4869 (target_thread_name): New macro.
4870
80d82c19
JB
48712015-11-23 Joel Brobecker <brobecker@adacore.com>
4872
4873 * regcache.h (regcache_invalidate_pid): Add declaration.
4874 * regcache.c (regcache_invalidate_pid): New function, extracted
4875 from regcache_invalidate.
4876 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4877 Add trivial documentation comment.
4878 * lynx-low.c: Use regcache_invalidate_pid instead of
4879 regcache_invalidate.
4880
64da5dd5
JB
48812015-11-23 Joel Brobecker <brobecker@adacore.com>
4882
4883 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4884 and Elf64_auxv_t if the target is Android.
4885
37ce4055
DE
48862015-11-22 Doug Evans <xdje42@gmail.com>
4887
4888 * target.h: #include <sys/types.h>.
4889
06e03fff
PA
48902015-11-19 Pedro Alves <palves@redhat.com>
4891
4892 * linux-low.c (linux_process_qsupported): Change prototype.
4893 Adjust.
4894 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4895 Change prototype.
4896 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4897 and adjust to loop over all features.
4898 * server.c (handle_query) <qSupported>: Adjust to call
4899 target_process_qsupported once, passing it a vector of unprocessed
4900 features.
4901 * target.h (struct target_ops) <process_qsupported>: Change
4902 prototype.
4903 (target_process_qsupported): Adjust.
4904
9a084706
PA
49052015-11-19 Pedro Alves <palves@redhat.com>
4906
4907 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4908 mode.
4909 * configure: Regenerate.
4910
dad44a1f
PA
49112015-11-19 Pedro Alves <palves@redhat.com>
4912
4913 * configure: Regenerate.
4914
231c0592
YQ
49152015-11-19 Yao Qi <yao.qi@linaro.org>
4916
4917 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4918 type to uint32_t.
4919
6c1c9a8b
YQ
49202015-11-19 Yao Qi <yao.qi@linaro.org>
4921
4922 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4923 (struct aarch64_operand): Move enum out.
4924
9caa3311
YQ
49252015-11-19 Yao Qi <yao.qi@linaro.org>
4926
4927 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4928 struct user_fpsimd_state *.
4929 (aarch64_store_fpregset): Likewise.
4930
6a69a054
YQ
49312015-11-19 Yao Qi <yao.qi@linaro.org>
4932
4933 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4934 struct user_pt_regs *.
4935 (aarch64_store_gregset): Likewise.
4936
1798301e
PA
49372015-11-18 Pedro Alves <palves@redhat.com>
4938
4939 * Makefile.in (all_object_files): Add $IPA_OBJS.
4940
ce7715e2
PA
49412015-11-17 Pedro Alves <palves@redhat.com>
4942
4943 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4944 GDB_SIGNAL_0 and gdb_signal_to_string.
4945
c0879059
PA
49462015-11-17 Pedro Alves <palves@redhat.com>
4947
4948 * win32-low.c (handle_output_debug_string): Remove parameter.
4949 (win32_kill): Remove our_status local and adjust call to
4950 handle_output_debug_string.
4951 (get_child_debug_event): Adjust call to
4952 handle_output_debug_string.
4953
1996e237
SM
49542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4955
4956 * linux-mips-low.c (mips_fill_gregset): Add cast.
4957 (mips_store_gregset): Likewise.
4958 (mips_fill_fpregset): Likewise.
4959 (mips_store_fpregset): Likewise.
4960
cbec665b
SM
49612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4962
4963 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4964 priv.
4965
eb3e3c67
SM
49662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4967
4968 * linux-mips-low.c (mips_linux_new_thread): Change type of
4969 watch_type to enum target_hw_bp_type.
4970
171de4b8
SM
49712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4972
4973 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4974 Change return type to arm_hwbp_type.
4975
04248ead
SM
49762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4977
4978 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4979 (arm_store_gregset): Likewise.
4980 * linux-arm-low.c (arm_get_hwcap): Likewise.
4981 (arm_read_description): Likewise.
4982
04b3479c
SM
49832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4984
4985 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4986
2bc84e8a
SM
49872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4988
4989 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4990 (ppc_fill_vsxregset): Likewise.
4991 (ppc_store_vsxregset): Likewise.
4992 (ppc_fill_vrregset): Likewise.
4993 (ppc_store_vrregset): Likewise.
4994 (ppc_fill_evrregset): Likewise.
4995 (ppc_store_evrregset): Likewise.
4996
e6c5bb05
SM
49972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4998
4999 * linux-ppc-low.c (ppc_usrregs_info): Remove
5000 forward-declaration.
5001 (ppc_arch_setup): Move lower in file.
5002
7ea45d72
SM
50032015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5004
5005 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5006 (ps_pdwrite): Likewise.
5007
69291610
HW
50082015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5009
5010 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5011 to after assert checks.
5012
b42945fd
SM
50132015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5014
5015 * proc-service.c (ps_pdread): Add/adjust casts.
5016 (ps_pdwrite): Add/adjust casts.
5017
d6f85c84
SM
50182015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5019
5020 * server.c (handle_search_memory_1): Cast return value of
5021 memmem.
5022
f98cd059
SM
50232015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5024
5025 * server.c (write_qxfer_response): Change type of data to
5026 gdb_byte *.
5027
d2412fa5
PA
50282015-10-29 Pedro Alves <palves@redhat.com>
5029
5030 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5031
c17414a2
PA
50322015-10-29 Pedro Alves <palves@redhat.com>
5033
5034 * tracepoint.c (clear_installed_tracepoints): Add casts.
5035
e053fbc4
PA
50362015-10-29 Pedro Alves <palves@redhat.com>
5037
5038 * server.c (handle_v_cont, process_serial_event): Add enum
5039 gdb_signal casts to signal parsing code.
5040
add67df8
PA
50412015-10-29 Pedro Alves <palves@redhat.com>
5042
5043 * linux-low.h (NULL_REGSET): Define.
5044 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5045 * linux-arm-low.c (arm_regsets): Likewise.
5046 * linux-crisv32-low.c (cris_regsets): Likewise.
5047 * linux-m68k-low.c (m68k_regsets): Likewise.
5048 * linux-mips-low.c (mips_regsets): Likewise.
5049 * linux-nios2-low.c (nios2_regsets): Likewise.
5050 * linux-ppc-low.c (ppc_regsets): Likewise.
5051 * linux-s390-low.c (s390_regsets): Likewise.
5052 * linux-sh-low.c (sh_regsets): Likewise.
5053 * linux-sparc-low.c (sparc_regsets): Likewise.
5054 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5055 * linux-tile-low.c (tile_regsets): Likewise.
5056 * linux-x86-low.c (x86_regsets): Likewise.
5057 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5058
50bc912a
PA
50592015-10-29 Pedro Alves <palves@redhat.com>
5060
5061 * linux-low.h (NULL_REGSET): Define.
5062 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5063 * linux-arm-low.c (arm_regsets): Likewise.
5064 * linux-crisv32-low.c (cris_regsets): Likewise.
5065 * linux-m68k-low.c (m68k_regsets): Likewise.
5066 * linux-mips-low.c (mips_regsets): Likewise.
5067 * linux-nios2-low.c (nios2_regsets): Likewise.
5068 * linux-ppc-low.c (ppc_regsets): Likewise.
5069 * linux-s390-low.c (s390_regsets): Likewise.
5070 * linux-sh-low.c (sh_regsets): Likewise.
5071 * linux-sparc-low.c (sparc_regsets): Likewise.
5072 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5073 * linux-tile-low.c (tile_regsets): Likewise.
5074 * linux-x86-low.c (x86_regsets): Likewise.
5075 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5076
682b2546
DE
50772015-10-26 Doug Evans <dje@google.com>
5078
5079 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5080
963843d4
DE
50812015-10-26 Doug Evans <dje@google.com>
5082
5083 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5084
d41401ac
DE
50852015-10-26 Doug Evans <dje@google.com>
5086
5087 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5088 for debug_printf.
5089 (attach_thread, find_new_threads_callback): Ditto.
5090
3db28855
AT
50912015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5092
5093 * mem-break.h (set_breakpoint_data): Remove.
5094
fb78e89c
AT
50952015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5096
5097 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5098 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5099 (initialize_low): Remove set_breakpoint_data call.
5100 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5101 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5102 (initialize_low): Remove set_breakpoint_data call.
5103 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5104 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5105 (initialize_low): Remove set_breakpoint_data call.
5106
2e6ee069
AT
51072015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5108
5109 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5110 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5111 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5112 * target.h (target_breakpoint_kind_from_pc): New macro.
5113
1652a986
AT
51142015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5115
5116 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5117 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5118 the default breakpoint kind.
5119
abeead09
AT
51202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5121
5122 * linux-arm-low.c (arm_supports_z_point_type): Add software
5123 breakpoint support.
5124
b0b4b501
AT
51252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5126
5127 * linux-arm-low.c: Refactor breakpoint definitions.
5128 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5129 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5130
8689682c
AT
51312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5132
5133 * Makefile.in: Add arm.c/o.
5134 * configure.srv: Likewise.
5135 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5136 (arm_breakpoint_kind_from_pc): New function.
5137 (arm_sw_breakpoint_from_kind): Return proper kind.
5138 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5139
27165294
AT
51402015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5141
5142 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5143 removal.
5144 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5145 (struct raw_breakpoint) <size>: Remove.
5146 (struct raw_breakpoint) <kind>: Add.
5147 (bp_size): New function.
5148 (bp_opcode): Likewise.
5149 (find_raw_breakpoint_at): Adjust for kind.
5150 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5151 (remove_memory_breakpoint): Adjust for kind call bp_size.
5152 (set_raw_breakpoint_at): Adjust for kind.
5153 (set_breakpoint): Likewise.
5154 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5155 (delete_raw_breakpoint): Adjust for kind.
5156 (delete_breakpoint): Likewise.
5157 (find_gdb_breakpoint): Likewise.
5158 (set_gdb_breakpoint_1): Likewise.
5159 (set_gdb_breakpoint): Likewise.
5160 (delete_gdb_breakpoint_1): Likewise.
5161 (delete_gdb_breakpoint): Likewise.
5162 (uninsert_raw_breakpoint): Likewise.
5163 (reinsert_raw_breakpoint): Likewise.
5164 (set_breakpoint_data): Remove.
5165 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5166 (check_mem_read): Adjust for kind call bp_size.
5167 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5168 (clone_one_breakpoint): Adjust for kind.
5169 * mem-break.h (set_gdb_breakpoint): Likewise.
5170 (delete_gdb_breakpoint): Likewise.
5171 * server.c (process_serial_event): Likewise.
5172
dd373349
AT
51732015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5174
5175 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5176 (struct linux_target_ops) <breakpoint>: Remove.
5177 (struct linux_target_ops) <breakpoint_len>: Remove.
5178 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5179 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5180 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5181 (arm_sw_breakpoint_from_kind): New function.
5182 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5183 (struct linux_target_ops) <breakpoint>: Remove.
5184 (struct linux_target_ops) <breakpoint_len>: Remove.
5185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5187 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5188 (struct linux_target_ops) <breakpoint>: Remove.
5189 (struct linux_target_ops) <breakpoint_len>: Remove.
5190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5192 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5193 (struct linux_target_ops) <breakpoint>: Remove.
5194 (struct linux_target_ops) <breakpoint_len>: Remove.
5195 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5196 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5197 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5198 and sw_breakpoint_from_kind to increment the pc.
5199 (linux_breakpoint_kind_from_pc): New function.
5200 (linux_sw_breakpoint_from_kind): New function.
5201 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5202 (initialize_low): Call breakpoint_kind_from_pc and
5203 sw_breakpoint_from_kind to replace breakpoint_data/len.
5204 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5205 New field.
5206 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5207 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5208 (struct linux_target_ops) <breakpoint>: Remove.
5209 (struct linux_target_ops) <breakpoint_len>: Remove.
5210 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5211 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5212 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5213 (struct linux_target_ops) <breakpoint>: Remove.
5214 (struct linux_target_ops) <breakpoint_len>: Remove.
5215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5216 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5217 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5218 (struct linux_target_ops) <breakpoint>: Remove.
5219 (struct linux_target_ops) <breakpoint_len>: Remove.
5220 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5221 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5222 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5223 (struct linux_target_ops) <breakpoint>: Remove.
5224 (struct linux_target_ops) <breakpoint_len>: Remove.
5225 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5226 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5227 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5228 (struct linux_target_ops) <breakpoint>: Remove.
5229 (struct linux_target_ops) <breakpoint_len>: Remove.
5230 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5231 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5232 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5233 (struct linux_target_ops) <breakpoint>: Remove.
5234 (struct linux_target_ops) <breakpoint_len>: Remove.
5235 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5236 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5237 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5238 (struct linux_target_ops) <breakpoint>: Remove.
5239 (struct linux_target_ops) <breakpoint_len>: Remove.
5240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5242 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5243 (struct linux_target_ops) <breakpoint>: Remove.
5244 (struct linux_target_ops) <breakpoint_len>: Remove.
5245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5247 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5248 (struct linux_target_ops) <breakpoint>: Remove.
5249 (struct linux_target_ops) <breakpoint_len>: Remove.
5250 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5251 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5252 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5253 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5254 (struct linux_target_ops) <breakpoint>: Remove.
5255 (struct linux_target_ops) <breakpoint_len>: Remove.
5256 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5257 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5258 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5259 (struct linux_target_ops) <breakpoint>: Remove.
5260 (struct linux_target_ops) <breakpoint_len>: Remove.
5261 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5262 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5263
4cd98a19
AT
52642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5265
5266 * linux-cris-low.c (cris_get_pc): Remove void arg.
5267
774ee6d2
AR
52682015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5269
5270 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5271 variable name.
5272
833dcd29
AR
52732015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5274
5275 * inferiors.c (thread_pid_matches_callback): New function.
5276 (find_thread_process): New function.
5277 (remove_thread): Reset current_thread.
5278 (remove_process): Assert threads have been removed first.
5279
8d689ee5
YQ
52802015-10-15 Yao Qi <yao.qi@linaro.org>
5281
5282 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5283 if it is 3.
5284 (aarch64_remove_point): Likewise.
5285 * regcache.c (regcache_register_size): New function.
5286
1c2e1515
YQ
52872015-10-12 Yao Qi <yao.qi@linaro.org>
5288
5289 * linux-aarch64-low.c: Update all callers as emit_load_store
5290 is renamed to aarch64_emit_load_store.
5291
e1c587c3
YQ
52922015-10-12 Yao Qi <yao.qi@linaro.org>
5293
5294 * linux-aarch64-low.c: Update all callers of function renaming
5295 from emit_insn to aarch64_emit_insn.
5296
b6542f81
YQ
52972015-10-12 Yao Qi <yao.qi@linaro.org>
5298
5299 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5300 arch/aarch64-insn.h.
5301 (struct aarch64_memory_operand): Likewise.
5302 (ENCODE): Likewise.
5303 (emit_insn): Move to arch/aarch64-insn.c.
5304 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5305 (emit_load_store): Move to arch/aarch64-insn.c.
5306 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5307 (can_encode_int32): Remove.
5308
246994ce
YQ
53092015-10-12 Yao Qi <yao.qi@linaro.org>
5310
5311 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5312 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5313 (aarch64_relocate_instruction): Likewise.
5314 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5315 (struct aarch64_insn_visitor): Likewise.
5316
0badd99f
YQ
53172015-10-12 Yao Qi <yao.qi@linaro.org>
5318
5319 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5320 (struct aarch64_insn_visitor): New.
5321 (struct aarch64_insn_relocation_data): New.
5322 (aarch64_ftrace_insn_reloc_b): New function.
5323 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5324 (aarch64_ftrace_insn_reloc_cb): Likewise.
5325 (aarch64_ftrace_insn_reloc_tb): Likewise.
5326 (aarch64_ftrace_insn_reloc_adr): Likewise.
5327 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5328 (aarch64_ftrace_insn_reloc_others): Likewise.
5329 (visitor): New.
5330 (aarch64_relocate_instruction): Use visitor.
5331
dfaffe9d
YQ
53322015-10-12 Yao Qi <yao.qi@linaro.org>
5333
5334 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5335 int. Add argument buf.
5336 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5337 aarch64_relocate_instruction.
5338
70b439f0
YQ
53392015-10-12 Yao Qi <yao.qi@linaro.org>
5340
5341 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5342 argument insn. Remove local variable insn. Don't call
5343 target_read_uint32.
5344 (aarch64_install_fast_tracepoint_jump_pad): Call
5345 target_read_uint32.
5346
7781c06f
YQ
53472015-09-30 Yao Qi <yao.qi@linaro.org>
5348
5349 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5350 (emit_load_store_pair): Likewise.
5351
9a3c8263
SM
53522015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5353
5354 * dll.c (match_dll): Add cast(s).
5355 (unloaded_dll): Likewise.
5356 * linux-low.c (second_thread_of_pid_p): Likewise.
5357 (delete_lwp_callback): Likewise.
5358 (count_events_callback): Likewise.
5359 (select_event_lwp_callback): Likewise.
5360 (linux_set_resume_request): Likewise.
5361 * server.c (accumulate_file_name_length): Likewise.
5362 (emit_dll_description): Likewise.
5363 (handle_qxfer_threads_worker): Likewise.
5364 (visit_actioned_threads): Likewise.
5365 * thread-db.c (any_thread_of): Likewise.
5366 * tracepoint.c (same_process_p): Likewise.
5367 (match_blocktype): Likewise.
5368 (build_traceframe_info_xml): Likewise.
5369
224c3ddb
SM
53702015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5371
5372 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5373 assignment.
5374 (gdb_unparse_agent_expr): Likewise.
5375 * hostio.c (require_data): Likewise.
5376 (handle_pread): Likewise.
5377 * linux-low.c (disable_regset): Likewise.
5378 (fetch_register): Likewise.
5379 (store_register): Likewise.
5380 (get_dynamic): Likewise.
5381 (linux_qxfer_libraries_svr4): Likewise.
5382 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5383 (set_fast_tracepoint_jump): Likewise.
5384 (uninsert_fast_tracepoint_jumps_at): Likewise.
5385 (reinsert_fast_tracepoint_jumps_at): Likewise.
5386 (validate_inserted_breakpoint): Likewise.
5387 (clone_agent_expr): Likewise.
5388 * regcache.c (init_register_cache): Likewise.
5389 * remote-utils.c (putpkt_binary_1): Likewise.
5390 (decode_M_packet): Likewise.
5391 (decode_X_packet): Likewise.
5392 (look_up_one_symbol): Likewise.
5393 (relocate_instruction): Likewise.
5394 (monitor_output): Likewise.
5395 * server.c (handle_search_memory): Likewise.
5396 (handle_qxfer_exec_file): Likewise.
5397 (handle_qxfer_libraries): Likewise.
5398 (handle_qxfer): Likewise.
5399 (handle_query): Likewise.
5400 (handle_v_cont): Likewise.
5401 (handle_v_run): Likewise.
5402 (captured_main): Likewise.
5403 * target.c (write_inferior_memory): Likewise.
5404 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5405 * tracepoint.c (init_trace_buffer): Likewise.
5406 (add_tracepoint_action): Likewise.
5407 (add_traceframe): Likewise.
5408 (add_traceframe_block): Likewise.
5409 (cmd_qtdpsrc): Likewise.
5410 (cmd_qtdv): Likewise.
5411 (cmd_qtstatus): Likewise.
5412 (response_source): Likewise.
5413 (response_tsv): Likewise.
5414 (cmd_qtnotes): Likewise.
5415 (gdb_collect): Likewise.
5416 (initialize_tracepoint): Likewise.
5417
afbe19f8
PL
54182015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5419
5420 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5421 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5422 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5423 <NOP>: New.
5424 (enum aarch64_condition_codes): New enum.
5425 (w0): New static global.
5426 (fp): Likewise.
5427 (lr): Likewise.
5428 (struct aarch64_memory_operand) <type>: New
5429 MEMORY_OPERAND_POSTINDEX type.
5430 (postindex_memory_operand): New helper function.
5431 (emit_ret): New function.
5432 (emit_load_store_pair): New function, factored out of emit_stp
5433 with support for MEMORY_OPERAND_POSTINDEX.
5434 (emit_stp): Rewrite using emit_load_store_pair.
5435 (emit_ldp): New function.
5436 (emit_load_store): Likewise.
5437 (emit_ldr): Mention post-index instruction in comment.
5438 (emit_ldrh): New function.
5439 (emit_ldrb): New function.
5440 (emit_ldrsw): Mention post-index instruction in comment.
5441 (emit_str): Likewise.
5442 (emit_subs): New function.
5443 (emit_cmp): Likewise.
5444 (emit_and): Likewise.
5445 (emit_orr): Likewise.
5446 (emit_orn): Likewise.
5447 (emit_eor): Likewise.
5448 (emit_mvn): Likewise.
5449 (emit_lslv): Likewise.
5450 (emit_lsrv): Likewise.
5451 (emit_asrv): Likewise.
5452 (emit_mul): Likewise.
5453 (emit_sbfm): Likewise.
5454 (emit_sbfx): Likewise.
5455 (emit_ubfm): Likewise.
5456 (emit_ubfx): Likewise.
5457 (emit_csinc): Likewise.
5458 (emit_cset): Likewise.
5459 (emit_nop): Likewise.
5460 (emit_ops_insns): New helper function.
5461 (emit_pop): Likewise.
5462 (emit_push): Likewise.
5463 (aarch64_emit_prologue): New function.
5464 (aarch64_emit_epilogue): Likewise.
5465 (aarch64_emit_add): Likewise.
5466 (aarch64_emit_sub): Likewise.
5467 (aarch64_emit_mul): Likewise.
5468 (aarch64_emit_lsh): Likewise.
5469 (aarch64_emit_rsh_signed): Likewise.
5470 (aarch64_emit_rsh_unsigned): Likewise.
5471 (aarch64_emit_ext): Likewise.
5472 (aarch64_emit_log_not): Likewise.
5473 (aarch64_emit_bit_and): Likewise.
5474 (aarch64_emit_bit_or): Likewise.
5475 (aarch64_emit_bit_xor): Likewise.
5476 (aarch64_emit_bit_not): Likewise.
5477 (aarch64_emit_equal): Likewise.
5478 (aarch64_emit_less_signed): Likewise.
5479 (aarch64_emit_less_unsigned): Likewise.
5480 (aarch64_emit_ref): Likewise.
5481 (aarch64_emit_if_goto): Likewise.
5482 (aarch64_emit_goto): Likewise.
5483 (aarch64_write_goto_address): Likewise.
5484 (aarch64_emit_const): Likewise.
5485 (aarch64_emit_call): Likewise.
5486 (aarch64_emit_reg): Likewise.
5487 (aarch64_emit_pop): Likewise.
5488 (aarch64_emit_stack_flush): Likewise.
5489 (aarch64_emit_zero_ext): Likewise.
5490 (aarch64_emit_swap): Likewise.
5491 (aarch64_emit_stack_adjust): Likewise.
5492 (aarch64_emit_int_call_1): Likewise.
5493 (aarch64_emit_void_call_2): Likewise.
5494 (aarch64_emit_eq_goto): Likewise.
5495 (aarch64_emit_ne_goto): Likewise.
5496 (aarch64_emit_lt_goto): Likewise.
5497 (aarch64_emit_le_goto): Likewise.
5498 (aarch64_emit_gt_goto): Likewise.
5499 (aarch64_emit_ge_got): Likewise.
5500 (aarch64_emit_ops_impl): New static global variable.
5501 (aarch64_emit_ops): New target function, return
5502 &aarch64_emit_ops_impl.
5503 (struct linux_target_ops): Install it.
5504
bb903df0
PL
55052015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5506
5507 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5508 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5509 aarch64-ipa.o.
5510 * linux-aarch64-ipa.c: New file.
5511 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5512 and endian.h.
5513 (aarch64_get_thread_area): New target method.
5514 (extract_signed_bitfield): New helper function.
5515 (aarch64_decode_ldr_literal): New function.
5516 (enum aarch64_opcodes): New enum.
5517 (struct aarch64_register): New struct.
5518 (struct aarch64_operand): New struct.
5519 (x0): New static global.
5520 (x1): Likewise.
5521 (x2): Likewise.
5522 (x3): Likewise.
5523 (x4): Likewise.
5524 (w2): Likewise.
5525 (ip0): Likewise.
5526 (sp): Likewise.
5527 (xzr): Likewise.
5528 (aarch64_register): New helper function.
5529 (register_operand): Likewise.
5530 (immediate_operand): Likewise.
5531 (struct aarch64_memory_operand): New struct.
5532 (offset_memory_operand): New helper function.
5533 (preindex_memory_operand): Likewise.
5534 (enum aarch64_system_control_registers): New enum.
5535 (ENCODE): New macro.
5536 (emit_insn): New helper function.
5537 (emit_b): New function.
5538 (emit_bcond): Likewise.
5539 (emit_cb): Likewise.
5540 (emit_tb): Likewise.
5541 (emit_blr): Likewise.
5542 (emit_stp): Likewise.
5543 (emit_ldp_q_offset): Likewise.
5544 (emit_stp_q_offset): Likewise.
5545 (emit_load_store): Likewise.
5546 (emit_ldr): Likewise.
5547 (emit_ldrsw): Likewise.
5548 (emit_str): Likewise.
5549 (emit_ldaxr): Likewise.
5550 (emit_stxr): Likewise.
5551 (emit_stlr): Likewise.
5552 (emit_data_processing_reg): Likewise.
5553 (emit_data_processing): Likewise.
5554 (emit_add): Likewise.
5555 (emit_sub): Likewise.
5556 (emit_mov): Likewise.
5557 (emit_movk): Likewise.
5558 (emit_mov_addr): Likewise.
5559 (emit_mrs): Likewise.
5560 (emit_msr): Likewise.
5561 (emit_sevl): Likewise.
5562 (emit_wfe): Likewise.
5563 (append_insns): Likewise.
5564 (can_encode_int32_in): New helper function.
5565 (aarch64_relocate_instruction): New function.
5566 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5567 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5568 (struct linux_target_ops): Install aarch64_get_thread_area,
5569 aarch64_install_fast_tracepoint_jump_pad and
5570 aarch64_get_min_fast_tracepoint_insn_len.
5571
787749ea
PL
55722015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5573
5574 * Makefile.in (aarch64-insn.o): New rule.
5575 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5576
9812b2e6
YQ
55772015-09-21 Yao Qi <yao.qi@linaro.org>
5578
5579 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5580
18fe412b
YQ
55812015-09-21 Yao Qi <yao.qi@linaro.org>
5582
5583 * tracepoint.c (max_jump_pad_size): Remove.
5584
a0cc84cd
YQ
55852015-09-18 Yao Qi <yao.qi@linaro.org>
5586
5587 * linux-aarch64-low.c: Don't include sys/uio.h.
5588 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5589
d78908cf
WW
55902015-09-16 Wei-cheng Wang <cole945@gmail.com>
5591
5592 * tracepoint.c (eval_result_type): Change prototype.
5593 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5594
d57e0d50
PA
55952015-09-15 Pedro Alves <palves@redhat.com>
5596
5597 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5598 Check whether to report exec events instead of checking whether
5599 multiprocess is enabled.
5600
5a676acc
PA
56012015-09-15 Pedro Alves <palves@redhat.com>
5602
5603 PR remote/18965
5604 * remote-utils.c (prepare_resume_reply): Merge
5605 TARGET_WAITKIND_VFORK_DONE switch case with the
5606 TARGET_WAITKIND_FORKED case.
5607
7c5d0fad
YQ
56082015-09-15 Yao Qi <yao.qi@linaro.org>
5609
5610 * server.c (handle_query): Check string comparison using
5611 "else if" instead of "if".
5612
750ce8d1
YQ
56132015-09-15 Yao Qi <yao.qi@linaro.org>
5614
5615 * server.c (vCont_supported): New global variable.
5616 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5617 matches. Append ";vContSupported+" to own_buf.
5618 (handle_v_requests): Append ";s;S" to own_buf if target supports
5619 hardware single step or vCont_supported is false.
5620 (capture_main): Set vCont_supported to zero.
5621
70b90b91
YQ
56222015-09-15 Yao Qi <yao.qi@linaro.org>
5623
5624 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5625 it to ...
5626 (linux_supports_hardware_single_step): ... New function.
5627 (linux_target_ops): Update.
5628 * lynx-low.c (lynx_target_ops): Set field
5629 supports_hardware_single_step to target_can_do_hardware_single_step.
5630 * nto-low.c (nto_target_ops): Likewise.
5631 * spu-low.c (spu_target_ops): Likewise.
5632 * win32-low.c (win32_target_ops): Likewise.
5633 * target.c (target_can_do_hardware_single_step): New function.
5634 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5635 Remove. <supports_hardware_single_step>: New field.
5636 (target_supports_conditional_breakpoints): Remove.
5637 (target_supports_hardware_single_step): New macro.
5638 (target_can_do_hardware_single_step): Declare.
5639 * server.c (handle_query): Use target_supports_hardware_single_step
5640 instead of target_supports_conditional_breakpoints.
5641
ade90bde
YQ
56422015-09-15 Yao Qi <yao.qi@linaro.org>
5643
5644 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5645 function.
5646 (struct linux_target_ops the_low_target): Install
5647 aarch64_linux_siginfo_fixup.
5648
94585166
DB
56492015-09-11 Don Breazeal <donb@codesourcery.com>
5650 Luis Machado <lgustavo@codesourcery.com>
5651
5652 * linux-low.c (linux_mourn): Static declaration.
5653 (linux_arch_setup): Move in front of
5654 handle_extended_wait.
5655 (linux_arch_setup_thread): New function.
5656 (handle_extended_wait): Handle exec events. Call
5657 linux_arch_setup_thread. Make event_lwp argument a
5658 pointer-to-a-pointer.
5659 (check_zombie_leaders): Do not check stopped threads.
5660 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5661 (linux_low_filter_event): Add lwp and thread for exec'ing
5662 non-leader thread if leader thread has been deleted.
5663 Refactor code into linux_arch_setup_thread and call it.
5664 Pass child lwp pointer by reference to handle_extended_wait.
5665 (linux_wait_for_event_filtered): Update comment.
5666 (linux_wait_1): Prevent clobbering exec event status.
5667 (linux_supports_exec_events): New function.
5668 (linux_target_ops) <supports_exec_events>: Initialize new member.
5669 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5670 new member.
5671 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5672 * server.c (report_exec_events): New global variable.
5673 (handle_query): Handle qSupported query for exec-events feature.
5674 (captured_main): Initialize report_exec_events.
5675 * server.h (report_exec_events): Declare new global variable.
5676 * target.h (struct target_ops) <supports_exec_events>: New
5677 member.
5678 (target_supports_exec_events): New macro.
5679 * win32-low.c (win32_target_ops) <supports_exec_events>:
5680 Initialize new member.
5681
0568462b
MM
56822015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5683
5684 * linux-low.c (linux_low_enable_btrace): Remove.
5685 (linux_target_ops): Replace linux_low_enable_btrace with
5686 linux_enable_btrace.
5687
39edd165
YQ
56882015-09-03 Yao Qi <yao.qi@linaro.org>
5689
5690 * linux-aarch64-low.c (aarch64_insert_point): Call
5691 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5692 returns true.
5693
1db33b5a
UW
56942015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5695
5696 * linux-low.c (check_stopped_by_breakpoint): Use
5697 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5698
ab290430
PA
56992015-08-27 Pedro Alves <palves@redhat.com>
5700
5701 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5702
8d749320
SM
57032015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5704
6711b7f8
SM
5705 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5706 the XNEW-family equivalent.
8d749320
SM
5707 (compile_bytecodes): Likewise.
5708 * dll.c (loaded_dll): Likewise.
5709 * event-loop.c (append_callback_event): Likewise.
5710 (create_file_handler): Likewise.
5711 (create_file_event): Likewise.
5712 * hostio.c (handle_open): Likewise.
5713 * inferiors.c (add_thread): Likewise.
5714 (add_process): Likewise.
5715 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5716 * linux-arm-low.c (arm_new_process): Likewise.
5717 (arm_new_thread): Likewise.
5718 * linux-low.c (add_to_pid_list): Likewise.
5719 (linux_add_process): Likewise.
5720 (handle_extended_wait): Likewise.
5721 (add_lwp): Likewise.
5722 (enqueue_one_deferred_signal): Likewise.
5723 (enqueue_pending_signal): Likewise.
5724 (linux_resume_one_lwp_throw): Likewise.
5725 (linux_resume_one_thread): Likewise.
5726 (linux_read_memory): Likewise.
5727 (linux_write_memory): Likewise.
5728 * linux-mips-low.c (mips_linux_new_process): Likewise.
5729 (mips_linux_new_thread): Likewise.
5730 (mips_add_watchpoint): Likewise.
5731 * linux-x86-low.c (initialize_low_arch): Likewise.
5732 * lynx-low.c (lynx_add_process): Likewise.
5733 * mem-break.c (set_raw_breakpoint_at): Likewise.
5734 (set_breakpoint): Likewise.
5735 (add_condition_to_breakpoint): Likewise.
5736 (add_commands_to_breakpoint): Likewise.
5737 (clone_agent_expr): Likewise.
5738 (clone_one_breakpoint): Likewise.
5739 * regcache.c (new_register_cache): Likewise.
5740 * remote-utils.c (look_up_one_symbol): Likewise.
5741 * server.c (queue_stop_reply): Likewise.
5742 (start_inferior): Likewise.
5743 (queue_stop_reply_callback): Likewise.
5744 (handle_target_event): Likewise.
5745 * spu-low.c (fetch_ppc_memory): Likewise.
5746 (store_ppc_memory): Likewise.
5747 * target.c (set_target_ops): Likewise.
5748 * thread-db.c (thread_db_load_search): Likewise.
5749 (try_thread_db_load_1): Likewise.
5750 * tracepoint.c (add_tracepoint): Likewise.
5751 (add_tracepoint_action): Likewise.
5752 (create_trace_state_variable): Likewise.
5753 (cmd_qtdpsrc): Likewise.
5754 (cmd_qtro): Likewise.
5755 (add_while_stepping_state): Likewise.
5756 * win32-low.c (child_add_thread): Likewise.
5757 (get_image_name): Likewise.
5758
ed8b7b42
YQ
57592015-08-25 Yao Qi <yao.qi@linaro.org>
5760
5761 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5762
db3cb7cb
YQ
57632015-08-25 Yao Qi <yao.qi@linaro.org>
5764
5765 * Makefile.in (aarch64-linux.o): New rule.
5766 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5767 srv_tgtobj.
5768 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5769 (aarch64_init_debug_reg_state): Make it extern.
5770 (aarch64_linux_prepare_to_resume): Remove.
5771
f6011a1c
YQ
57722015-08-25 Yao Qi <yao.qi@linaro.org>
5773
5774 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5775 lwp_arch_private_info and ptid_of_lwp.
5776
88e2cf7e
YQ
57772015-08-25 Yao Qi <yao.qi@linaro.org>
5778
5779 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5780 Find proc_info by find_process_pid. All callers updated.
5781
5e35436e
YQ
57822015-08-25 Yao Qi <yao.qi@linaro.org>
5783
5784 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5785 Remove.
5786 (debug_reg_change_callback): Remove.
5787 (aarch64_notify_debug_reg_change): Remove.
5788
4a8a7965
YQ
57892015-08-25 Yao Qi <yao.qi@linaro.org>
5790
5791 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5792 Call current_lwp_ptid.
5793
32a271ee
YQ
57942015-08-25 Yao Qi <yao.qi@linaro.org>
5795
5796 * linux-aarch64-low.c (debug_reg_change_callback): Use
5797 debug_printf.
5798
0d51c8d7
YQ
57992015-08-25 Yao Qi <yao.qi@linaro.org>
5800
5801 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5802
31a43dd5
YQ
58032015-08-25 Yao Qi <yao.qi@linaro.org>
5804
5805 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5806
8ee52567
YQ
58072015-08-25 Yao Qi <yao.qi@linaro.org>
5808
5809 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5810 the code.
5811
ff3f0f45
YQ
58122015-08-25 Yao Qi <yao.qi@linaro.org>
5813
5814 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5815 Remove.
5816 (debug_reg_change_callback): Remove argument entry and add argument
5817 lwp. Remove local variable thread. Don't print thread id in the
5818 debugging output. Don't check whether pid of thread equals to pid.
5819 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5820 iterate_over_lwps instead find_inferior.
5821
3d40fbb5
PA
58222015-08-24 Pedro Alves <palves@redhat.com>
5823
5824 * inferiors.c (get_first_process): New function.
5825 * inferiors.h (get_first_process): New declaration.
5826 * remote-utils.c (read_ptid): Default to the first process in the
5827 list, instead of to the current thread's process.
5828
438e1e42
PA
58292015-08-24 Pedro Alves <palves@redhat.com>
5830
5831 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5832 * event-loop.c: Likewise.
5833 * remote-utils.c: Likewise.
5834 * tracepoint.c: Likewise.
5835
a8c6d4fc
PA
58362015-08-24 Pedro Alves <palves@redhat.com>
5837
5838 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5839 ptid_get_lwp.
5840
99b0bb12
PA
58412015-08-21 Pedro Alves <palves@redhat.com>
5842
5843 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5844 instead of literal 1.
5845
f8904751
PA
58462015-08-21 Pedro Alves <palves@redhat.com>
5847
5848 * tdesc.c (default_description): Explicitly zero-initialize.
5849
465a859e
PA
58502015-08-21 Pedro Alves <palves@redhat.com>
5851
5852 PR gdb/18749
5853 * inferiors.c (remove_thread): Discard any pending stop reply for
5854 this thread.
5855 * server.c (remove_all_on_match_pid): Rename to ...
5856 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5857 instead of a pid.
5858 (discard_queued_stop_replies): Change parameter to a ptid. Now
5859 extern.
5860 (handle_v_kill, kill_inferior_callback, captured_main)
5861 (process_serial_event): Adjust.
5862 * server.h (discard_queued_stop_replies): Declare.
5863
f0db101d
PA
58642015-08-21 Pedro Alves <palves@redhat.com>
5865
5866 * linux-low.c (wait_for_sigstop): Always switch to no thread
5867 selected if the previously current thread dies.
5868 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5869 process instead of the current thread's.
5870 * remote-utils.c (input_interrupt): Don't check if there's no
5871 current thread.
5872 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5873 current thread to the general thread fails, error out.
5874 (handle_qxfer_auxv, handle_qxfer_libraries)
5875 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5876 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5877 (handle_query): Check if there's a thread selected instead of
5878 checking whether there's any thread in the thread list.
5879 (handle_qxfer_threads, handle_qxfer_btrace)
5880 (handle_qxfer_btrace_conf): Don't error out early if there's no
5881 thread in the thread list.
5882 (handle_v_cont, myresume): Don't set the current thread to the
5883 continue thread.
5884 (process_serial_event) <Hg handling>: Also set thread_id if the
5885 previous general thread is still alive.
5886 (process_serial_event) <g/G handling>: If setting the current
5887 thread to the general thread fails, error out.
5888 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5889 thread's lwp instead of the current thread's.
5890 * target.c (set_desired_thread): If the desired thread was not
5891 found, leave the current thread pointing to NULL. Return an int
5892 (boolean) indicating success.
5893 * target.h (set_desired_thread): Change return type to int.
5894
40045d91
MF
58952015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5896
5897 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5898 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5899 #includes.
5900 (ps_get_thread_area): New function.
5901
45face3b
GB
59022015-08-19 Gary Benson <gbenson@redhat.com>
5903
5904 * hostio.c (handle_pread): Do not attempt to read more data
5905 than hostio_reply_with_data can fit in a packet.
5906
16d5f642
JB
59072015-08-18 Joel Brobecker <brobecker@adacore.com>
5908
5909 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5910
a738da3a
MF
59112015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5912
5913 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5914
33ebda9d
PA
59152015-08-06 Pedro Alves <palves@redhat.com>
5916
5917 * tracepoint.c (expr_eval_result): Now an int.
5918
a44892be
PA
59192015-08-06 Pedro Alves <palves@redhat.com>
5920
5921 * gdbthread.h (struct regcache): Forward declare.
5922 (struct thread_info) <regcache_data>: Now a struct regcache
5923 pointer.
5924 * inferiors.c (inferior_regcache_data)
5925 (set_inferior_regcache_data): Now work with struct regcache
5926 pointers.
5927 * inferiors.h (struct regcache): Forward declare.
5928 (inferior_regcache_data, set_inferior_regcache_data): Now work
5929 with struct regcache pointers.
5930 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5931 (free_register_cache_thread): Remove struct regcache pointer
5932 casts.
5933
608a1e46
PA
59342015-08-06 Pedro Alves <palves@redhat.com>
5935
5936 * server.c (captured_main): On error, print the exception message
5937 to stderr, and if run_once is set, throw a quit.
5938
f0ce0d3a
PA
59392015-08-06 Pedro Alves <palves@redhat.com>
5940
5941 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5942 the current thread.
5943
bf47e248
PA
59442015-08-06 Pedro Alves <palves@redhat.com>
5945
5946 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5947 reading beyond the passed in buffer length.
5948
b6b9ffcc
PL
59492015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5950
5951 * tracepoint.c (symbol_list) <required>: Remove.
5952
863d01bd
PA
59532015-08-06 Pedro Alves <palves@redhat.com>
5954
5955 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5956 count if stopping and suspending threads.
5957 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5958 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5959 (linux_detach): Complete an ongoing step-over.
5960 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5961 throughout.
5962 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5963 (linux_wait_1): If passing a signal to the inferior after
5964 finishing a step-over, unsuspend and re-resume all lwps. If we
5965 see a single-step event but the thread should be continuing, don't
5966 pass the trap to gdb.
5967 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5968 internal_error instead of gdb_assert.
5969 (enqueue_pending_signal): New function.
5970 (check_ptrace_stopped_lwp_gone): Add debug output.
5971 (start_step_over): Use internal_error instead of gdb_assert.
5972 (complete_ongoing_step_over): New function.
5973 (linux_resume_one_thread): Don't resume a suspended thread.
5974 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5975 it stepping.
5976
00db26fa
PA
59772015-08-06 Pedro Alves <palves@redhat.com>
5978
5979 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5980 (linux_thread_alive): Use lwp_is_marked_dead.
5981 (extended_event_reported): Delete.
5982 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5983 instead of extended_event_reported.
5984 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5985 as well.
5986 (lwp_is_marked_dead): New function.
5987 (lwp_running): Use lwp_is_marked_dead.
5988 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5989 comment.
5990
ad071a30
PA
59912015-08-06 Pedro Alves <palves@redhat.com>
5992
5993 * linux-low.c (linux_wait_1): Move fork event output out of the
5994 !report_to_gdb check. Pass event_child->waitstatus to
5995 target_waitstatus_to_string instead of ourstatus.
5996
524b57e6
YQ
59972015-08-04 Yao Qi <yao.qi@linaro.org>
5998
5999 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6000 if current_thread is 32 bit.
6001
6085d6f6
YQ
60022015-08-04 Yao Qi <yao.qi@linaro.org>
6003
6004 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6005 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6006 * server.c (extended_protocol): Remove "static".
6007 * server.h (extended_protocol): Declare it.
6008
8a7e4587
YQ
60092015-08-04 Yao Qi <yao.qi@linaro.org>
6010
6011 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6012 both aarch64 and aarch32.
6013 (aarch64_set_pc): Likewise.
6014
3b53ae99
YQ
60152015-08-04 Yao Qi <yao.qi@linaro.org>
6016
6017 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6018 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6019 arm-with-neon.xml to srv_xmlfiles.
6020 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6021 (is_64bit_tdesc): New function.
6022 (aarch64_linux_read_description): New function.
6023 (aarch64_arch_setup): Call aarch64_linux_read_description.
6024 (regs_info): Rename to regs_info_aarch64.
6025 (aarch64_regs_info): Return right regs_info.
6026 (initialize_low_arch): Call initialize_low_arch_aarch32.
6027
bd9e6534
YQ
60282015-08-04 Yao Qi <yao.qi@linaro.org>
6029
6030 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6031 * linux-aarch32-low.c: New file.
6032 * linux-aarch32-low.h: New file.
6033 * linux-arm-low.c (arm_fill_gregset): Move it to
6034 linux-aarch32-low.c.
6035 (arm_store_gregset): Likewise.
6036 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6037 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6038 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6039 (regs_info): Rename to regs_info_arm.
6040 (arm_regs_info): Return regs_info_aarch32 if
6041 have_ptrace_getregset is 1 and target description is
6042 arm_with_neon or arm_with_vfpv3.
6043 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6044 Call initialize_low_arch_aarch32 instead.
6045
ded48a5e
YQ
60462015-08-04 Yao Qi <yao.qi@linaro.org>
6047
6048 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6049 * linux-low.c: ... here.
6050 * linux-low.h (have_ptrace_getregset): Declare it.
6051
96e9210f
PA
60522015-08-04 Pedro Alves <palves@redhat.com>
6053
6054 * thread-db.c (struct thread_db): Use new typedefs.
6055 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6056 CHK calls.
6057 (disable_thread_event_reporting): Cast result of dlsym to
6058 destination function pointer type.
6059 (thread_db_mourn): Use td_ta_delete_ftype.
6060
af60a1ef
SL
60612015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6062
6063 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6064 arch variant.
6065 (CDX_BREAKPOINT): Define for R2.
6066 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6067 (the_low_target): Add comments.
6068
e8b41681
YQ
60692015-07-30 Yao Qi <yao.qi@linaro.org>
6070
6071 * linux-arm-low.c (arm_hwcap): Remove it.
6072 (arm_read_description): New local variable arm_hwcap. Don't
6073 set arm_hwcap to zero.
6074
89abb039
YQ
60752015-07-30 Yao Qi <yao.qi@linaro.org>
6076
6077 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6078 Use regcache->tdesc instead.
6079 (arm_store_wmmxregset): Likewise.
6080 (arm_fill_vfpregset): Likewise.
6081 (arm_store_vfpregset): Likewise.
6082
deca266c
YQ
60832015-07-30 Yao Qi <yao.qi@linaro.org>
6084
6085 * linux-arm-low.c: Include arch/arm.h.
6086 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6087 (arm_store_gregset): Likewise.
6088
aa58a496
SM
60892015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6090
6091 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6092 ptrace's 4th parameter.
6093
50904b25
YQ
60942015-07-27 Yao Qi <yao.qi@linaro.org>
6095
6096 * configure.srv (case aarch64*-*-linux*): Don't set
6097 srv_linux_usrregs.
6098
5826e159
PA
60992015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6100
6101 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6102 sys/ptrace.h.
6103 * linux-arm-low.c: Likewise.
6104 * linux-cris-low.c: Likewise.
6105 * linux-crisv32-low.c: Likewise.
6106 * linux-low.c: Likewise.
6107 * linux-m68k-low.c: Likewise.
6108 * linux-mips-low.c: Likewise.
6109 * linux-nios2-low.c: Likewise.
6110 * linux-s390-low.c: Likewise.
6111 * linux-sparc-low.c: Likewise.
6112 * linux-tic6x-low.c: Likewise.
6113 * linux-tile-low.c: Likewise.
6114 * linux-x86-low.c: Likewise.
6115
54019719
PA
61162015-07-24 Pedro Alves <palves@redhat.com>
6117
6118 * config.in: Regenerate.
6119 * configure: Regenerate.
6120
eb7aa561
PA
61212015-07-24 Pedro Alves <palves@redhat.com>
6122
6123 * acinclude.m4: Include ../ptrace.m4.
6124 * configure.ac: Call GDB_AC_PTRACE.
6125 * config.in, configure: Regenerate.
6126
55d7b841
YQ
61272015-07-24 Yao Qi <yao.qi@linaro.org>
6128
6129 * linux-low.c (linux_create_inferior): Remove setting to
6130 proc->priv->new_inferior.
6131 (linux_attach): Likewise.
6132 (linux_low_filter_event): Likewise.
6133 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6134
c06cbd92
YQ
61352015-07-24 Yao Qi <yao.qi@linaro.org>
6136
6137 * linux-low.c (linux_arch_setup): New function.
6138 (linux_low_filter_event): If proc->tdesc is NULL and
6139 proc->attached is true, call the_low_target.arch_setup.
6140 Otherwise, keep status pending, and return.
6141 (linux_resume_one_lwp_throw): Don't call get_pc if
6142 thread->while_stepping isn't NULL. Don't call
6143 get_thread_regcache if proc->tdesc is NULL.
6144 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6145 (linux_target_ops): Install arch_setup.
6146 * server.c (start_inferior): Call the_target->arch_setup.
6147 * target.h (struct target_ops) <arch_setup>: New field.
6148 (target_arch_setup): New marco.
6149 * lynx-low.c (lynx_target_ops): Update.
6150 * nto-low.c (nto_target_ops): Update.
6151 * spu-low.c (spu_target_ops): Update.
6152 * win32-low.c (win32_target_ops): Update.
6153
5ae3ebba
YQ
61542015-07-24 Yao Qi <yao.qi@linaro.org>
6155
6156 * linux-low.c (linux_add_process): Don't set
6157 proc->priv->new_inferior.
6158 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6159 (linux_attach): Likewise.
6160
eb97750b
YQ
61612015-07-24 Yao Qi <yao.qi@linaro.org>
6162
6163 * server.c (start_inferior): Code refactor.
6164
51aee833
YQ
61652015-07-24 Yao Qi <yao.qi@linaro.org>
6166
6167 * server.c (process_serial_event): Set general_thread.
6168
af1b22f3
YQ
61692015-07-21 Yao Qi <yao.qi@linaro.org>
6170
6171 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6172 aarch64_linux_get_debug_reg_capacity.
6173
554717a3
YQ
61742015-07-17 Yao Qi <yao.qi@linaro.org>
6175
6176 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6177 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6178 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6179 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6180 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6181 (AARCH64_HWP_ALIGNMENT): Likewise.
6182 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6183 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6184 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6185 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6186 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6187 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6188 (struct aarch64_debug_reg_state): Likewise.
6189 (struct arch_lwp_info): Likewise.
6190 (aarch64_align_watchpoint): Likewise.
6191 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6192 (aarch64_watchpoint_length): Likewise.
6193 (aarch64_point_encode_ctrl_reg): Likewise
6194 (aarch64_point_is_aligned): Likewise.
6195 (aarch64_align_watchpoint): Likewise.
6196 (aarch64_linux_set_debug_regs):
6197 (aarch64_dr_state_insert_one_point): Likewise.
6198 (aarch64_dr_state_remove_one_point): Likewise.
6199 (aarch64_handle_breakpoint): Likewise.
6200 (aarch64_handle_aligned_watchpoint): Likewise.
6201 (aarch64_handle_unaligned_watchpoint): Likewise.
6202 (aarch64_handle_watchpoint): Likewise.
6203
c67ca4de
YQ
62042015-07-17 Yao Qi <yao.qi@linaro.org>
6205
6206 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6207 and don't aarch64_get_debug_reg_state. All callers update.
6208 (aarch64_handle_aligned_watchpoint): Likewise.
6209 (aarch64_handle_unaligned_watchpoint): Likewise.
6210 (aarch64_handle_watchpoint): Likewise.
6211 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6212 (aarch64_remove_point): Likewise.
6213
25abf979
YQ
62142015-07-17 Yao Qi <yao.qi@linaro.org>
6215
6216 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6217 debug_printf.
6218 (aarch64_handle_unaligned_watchpoint): Likewise.
6219
db1ff28b
JK
62202015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6221
6222 Revert the previous 3 commits:
6223 Move gdb_regex* to common/
6224 Move linux_find_memory_regions_full & co.
6225 gdbserver build-id attribute generator
6226
700ca40f
JK
62272015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6228 Jan Kratochvil <jan.kratochvil@redhat.com>
6229
6230 gdbserver build-id attribute generator.
6231 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6232 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6233 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6234 (find_phdr): New.
6235 (get_dynamic): Use find_pdhr to traverse program headers.
6236 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6237 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6238 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6239 (get_hex_build_id): New.
6240 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6241 to reply XML document.
6242
9904185c
JK
62432015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6244 Jan Kratochvil <jan.kratochvil@redhat.com>
6245
6246 * target.c: Include target/target-utils.h and fcntl.h.
6247 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6248 (target_fileio_read_stralloc): New functions.
6249
6e5b4429
JK
62502015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6251
6252 * Makefile.in (OBS): Add gdb_regex.o.
6253 (gdb_regex.o): New.
6254 * config.in: Rebuilt.
6255 * configure: Rebuilt.
6256
ddc98fbf
JK
62572015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6258 Jan Kratochvil <jan.kratochvil@redhat.com>
6259
6260 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6261 * Makefile.in (OBS): Add target-utils.o.
6262 (linux-maps.o, target-utils.o): New.
6263 * configure.srv (srv_linux_obj): Add linux-maps.o.
6264
e57bb7a0
PL
62652015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6266
6267 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6268 function, return 1.
6269 (the_low_target): Install it.
6270
586b02a9
PA
62712015-07-14 Pedro Alves <palves@redhat.com>
6272
6273 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6274 Instead, ignore ECHILD, and throw an error for other errnos.
6275
58c1b36c
PA
62762015-07-10 Pedro Alves <palves@redhat.com>
6277
6278 * event-loop.c (struct callback_event) <data>: Change type to
6279 gdb_client_data instance instead of gdb_client_data pointer.
6280 (append_callback_event): Adjust.
6281
421530db
PL
62822015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6283
6284 * linux-aarch64-low.c: Add comments for each linux_target_ops
6285 method. Remove comments already covered in target_ops and
6286 linux_target_ops definitions.
6287 (the_low_target): Add comments for each unimplemented method.
6288
c2d65f38
YQ
62892015-07-09 Yao Qi <yao.qi@linaro.org>
6290
6291 * linux-aarch64-low.c (aarch64_regmap): Remove.
6292 (aarch64_usrregs_info): Remove.
6293 (regs_info): Set field usrregs to NULL.
6294
b20a6524
MM
62952015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6296
6297 * linux-low.c: Include "rsp-low.h"
6298 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6299 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6300 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6301 (handle_btrace_enable_pt): New.
6302 (handle_btrace_general_set): Support "pt".
6303 (handle_btrace_conf_general_set): Support "pt:size".
6304
96c97461
PL
63052015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6306
6307 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6308 Z_PACKET_SW_BP.
6309
37d66942
PL
63102015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6311
6312 * linux-aarch64-low.c: Remove comment about endianness.
6313 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6314 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6315 memcmp.
6316
dc06243f
GB
63172015-06-24 Gary Benson <gbenson@redhat.com>
6318
6319 * linux-i386-ipa.c (stdint.h): Do not include.
6320 * lynx-i386-low.c (stdint.h): Likewise.
6321 * lynx-ppc-low.c (stdint.h): Likewise.
6322 * mem-break.c (stdint.h): Likewise.
6323 * thread-db.c (stdint.h): Likewise.
6324 * tracepoint.c (stdint.h): Likewise.
6325 * win32-low.c (stdint.h): Likewise.
6326
124e13d9
SM
63272015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6328
6329 * server.c (write_qxfer_response): Update call to
6330 remote_escape_output.
6331
909c2cda
JK
63322015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6333 Jan Kratochvil <jan.kratochvil@redhat.com>
6334
6335 Merge multiple hex conversions.
6336 * gdbreplay.c (tohex): Rename to 'fromhex'.
6337 (logchar): Use fromhex.
6338
24c05f46
JK
63392015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6340
6341 * server.c (handle_qxfer_libraries): Set `version' attribute for
6342 <library-list>.
6343
14d2069a
GB
63442015-06-10 Gary Benson <gbenson@redhat.com>
6345
6346 * target.h (struct target_ops) <multifs_open>: New field.
6347 <multifs_unlink>: Likewise.
6348 <multifs_readlink>: Likewise.
6349 * linux-low.c (nat/linux-namespaces.h): New include.
6350 (linux_target_ops): Initialize the_target->multifs_open,
6351 the_target->multifs_unlink and the_target->multifs_readlink.
6352 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6353 * hostio.c (hostio_fs_pid): New static variable.
6354 (hostio_handle_new_gdb_connection): New function.
6355 (handle_setfs): Likewise.
6356 (handle_open): Use the_target->multifs_open as appropriate.
6357 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6358 (handle_readlink): Use the_target->multifs_readlink as
6359 appropriate.
6360 (handle_vFile): Handle vFile:setfs packets.
6361 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6362 after target_handle_new_gdb_connection.
6363
4b8b5e72
GB
63642015-06-10 Gary Benson <gbenson@redhat.com>
6365
6366 * configure.ac (AC_CHECK_FUNCS): Add setns.
6367 * config.in: Regenerate.
6368 * configure: Likewise.
6369 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6370 (linux-namespaces.o): New rule.
6371 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6372
3ac2e371
GB
63732015-06-09 Gary Benson <gbenson@redhat.com>
6374
6375 * hostio.c (handle_open): Process mode argument with
6376 fileio_to_host_mode.
6377
ca9b78ce
YQ
63782015-06-01 Yao Qi <yao.qi@linaro.org>
6379
6380 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6381 * linux-x86-low.c: Likewise.
6382
bfacd19d
DB
63832015-05-28 Don Breazeal <donb@codesourcery.com>
6384
6385 * linux-low.c (handle_extended_wait): Initialize
6386 thread_info.last_resume_kind for new fork children.
6387
452003ef
PA
63882015-05-15 Pedro Alves <palves@redhat.com>
6389
6390 * target.h (target_handle_new_gdb_connection): Rewrite using if
6391 wrapped in do/while.
6392
1041a03c
JB
63932015-05-14 Joel Brobecker <brobecker@adacore.com>
6394
6395 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6396 * configure, config.in: Regenerate.
6397 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6398 Declare typedef.
6399
c269dbdb
DB
64002015-05-12 Don Breazeal <donb@codesourcery.com>
6401
6402 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6403 PTRACE_EVENT_VFORK_DONE.
6404 (linux_low_ptrace_options, extended_event_reported): Add vfork
6405 events.
6406 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6407 and "vforkdone" for RSP 'T' Stop Reply Packet.
6408 * server.h (report_vfork_events): Declare
6409 global variable.
6410
3a8a0396
DB
64112015-05-12 Don Breazeal <donb@codesourcery.com>
6412
6413 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6414 (the_low_target) <new_fork>: Initialize new member.
6415 * linux-arm-low.c (arm_new_fork): New function.
6416 (the_low_target) <new_fork>: Initialize new member.
6417 * linux-low.c (handle_extended_wait): Call new target function
6418 new_fork.
6419 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6420 * linux-mips-low.c (mips_add_watchpoint): New function
6421 extracted from mips_insert_point.
6422 (the_low_target) <new_fork>: Initialize new member.
6423 (mips_linux_new_fork): New function.
6424 (mips_insert_point): Call mips_add_watchpoint.
6425 * linux-x86-low.c (x86_linux_new_fork): New function.
6426 (the_low_target) <new_fork>: Initialize new member.
6427
de0d863e
DB
64282015-05-12 Don Breazeal <donb@codesourcery.com>
6429
6430 * linux-low.c (handle_extended_wait): Implement return value,
6431 rename argument 'event_child' to 'event_lwp', handle
6432 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6433 (linux_low_ptrace_options): New function.
6434 (linux_low_filter_event): Call linux_low_ptrace_options,
6435 use different argument fo linux_enable_event_reporting,
6436 use return value from handle_extended_wait.
6437 (extended_event_reported): New function.
6438 (linux_wait_1): Call extended_event_reported and set
6439 status to report fork events.
6440 (linux_write_memory): Add pid to debug message.
6441 (reset_lwp_ptrace_options_callback): New function.
6442 (linux_handle_new_gdb_connection): New function.
6443 (linux_target_ops): Initialize new structure member.
6444 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6445 * lynx-low.c: Initialize new structure member.
6446 * remote-utils.c (prepare_resume_reply): Implement stop reason
6447 "fork" for "T" stop message.
6448 * server.c (handle_query): Call handle_new_gdb_connection.
6449 * server.h (report_fork_events): Declare global flag.
6450 * target.h (struct target_ops) <handle_new_gdb_connection>:
6451 New member.
6452 (target_handle_new_gdb_connection): New macro.
6453 * win32-low.c: Initialize new structure member.
6454
ddcbc397
DB
64552015-05-12 Don Breazeal <donb@codesourcery.com>
6456
6457 * mem-break.c (APPEND_TO_LIST): Define macro.
6458 (clone_agent_expr): New function.
6459 (clone_one_breakpoint): New function.
6460 (clone_all_breakpoints): New function.
6461 * mem-break.h: Declare new functions.
6462
89245bc0
DB
64632015-05-12 Don Breazeal <donb@codesourcery.com>
6464
6465 * linux-low.c (linux_supports_fork_events): New function.
6466 (linux_supports_vfork_events): New function.
6467 (linux_target_ops): Initialize new structure members.
6468 (initialize_low): Call linux_check_ptrace_features.
6469 * lynx-low.c (lynx_target_ops): Initialize new structure
6470 members.
6471 * server.c (report_fork_events, report_vfork_events):
6472 New global flags.
6473 (handle_query): Add new features to qSupported packet and
6474 response.
6475 (captured_main): Initialize new global variables.
6476 * target.h (struct target_ops) <supports_fork_events>:
6477 New member.
6478 <supports_vfork_events>: New member.
6479 (target_supports_fork_events): New macro.
6480 (target_supports_vfork_events): New macro.
6481 * win32-low.c (win32_target_ops): Initialize new structure
6482 members.
6483
835205d0
GB
64842015-05-12 Gary Benson <gbenson@redhat.com>
6485
6486 * server.c (handle_qxfer_exec_file): Use current process
6487 if annex is empty.
6488
21e94bd9
SL
64892015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6490
6491 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6492 Remove HAVE_PTRACE_GETREGS conditionals.
6493 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6494 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6495
45614f15
YQ
64962015-05-08 Yao Qi <yao.qi@linaro.org>
6497
6498 * linux-low.c (linux_supports_conditional_breakpoints): New
6499 function.
6500 (linux_target_ops): Install new target method.
6501 * lynx-low.c (lynx_target_ops): Install NULL hook for
6502 supports_conditional_breakpoints.
6503 * nto-low.c (nto_target_ops): Likewise.
6504 * spu-low.c (spu_target_ops): Likewise.
6505 * win32-low.c (win32_target_ops): Likewise.
6506 * server.c (handle_query): Check
6507 target_supports_conditional_breakpoints.
6508 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6509 New field.
6510 (target_supports_conditional_breakpoints): New macro.
6511
80ad801e
PA
65122015-05-06 Pedro Alves <palves@redhat.com>
6513
6514 PR server/18081
6515 * server.c (start_inferior): If the process exits, mourn it.
6516
819843c7
GB
65172015-04-21 Gary Benson <gbenson@redhat.com>
6518
6519 * hostio.c (fileio_open_flags_to_host): Factored out to
6520 fileio_to_host_openflags in common/fileio.c. Single use
6521 updated.
6522
a2d5a9d7
MF
65232015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6524
6525 * linux-xtensa-low.c (xtensa_fill_gregset)
6526 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6527 XCHAL_HAVE_LOOP.
6528
deb44829
MF
65292015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6530
6531 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6532 (regs_info): Replace usrregs pointer with NULL.
6533
e57f1de3
GB
65342015-04-17 Gary Benson <gbenson@redhat.com>
6535
6536 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6537 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6538 * server.c (handle_qxfer_exec_file): New function.
6539 (qxfer_packets): Add exec-file entry.
6540 (handle_query): Report qXfer:exec-file:read as supported packet.
6541
62828379
RN
65422015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6543
6544 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6545
b88bb450
GB
65462015-04-09 Gary Benson <gbenson@redhat.com>
6547
6548 * hostio-errno.c (errno_to_fileio_error): Remove function.
6549 Update caller to use remote_fileio_to_fio_error.
6550
c8f4bfdd
YQ
65512015-04-09 Yao Qi <yao.qi@linaro.org>
6552
6553 * linux-low.c (linux_insert_point): Call
6554 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6555 (linux_remove_point): Call remove_memory_breakpoint if type is
6556 raw_bkpt_type_sw.
6557 * linux-x86-low.c (x86_insert_point): Don't call
6558 insert_memory_breakpoint.
6559 (x86_remove_point): Don't call remove_memory_breakpoint.
6560
41f98f02
PA
65612015-04-01 Pedro Alves <palves@redhat.com>
6562 Cleber Rosa <crosa@redhat.com>
6563
6564 * server.c (gdbserver_usage): Reorganize and extend the usage
6565 message.
6566
2bf6fb9d
PA
65672015-03-24 Pedro Alves <palves@redhat.com>
6568
6569 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6570 output. Also dump TRAP_TRACE.
6571 (linux_low_filter_event): In debug output, distinguish a
6572 resume_stop SIGSTOP from a delayed SIGSTOP.
6573
369f6daa
GB
65742015-03-24 Gary Benson <gbenson@redhat.com>
6575
6576 * linux-x86-low.c (x86_linux_new_thread): Moved to
6577 nat/x86-linux.c.
6578 (x86_linux_prepare_to_resume): Likewise.
6579
8e5d4070
GB
65802015-03-24 Gary Benson <gbenson@redhat.com>
6581
6582 * Makefile.in (x86-linux-dregs.o): New rule.
6583 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6584 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6585 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6586 (x86_linux_dr_get): Likewise.
6587 (x86_linux_dr_set): Likewise.
6588 (update_debug_registers_callback): Likewise.
6589 (x86_linux_dr_set_addr): Likewise.
6590 (x86_linux_dr_get_addr): Likewise.
6591 (x86_linux_dr_set_control): Likewise.
6592 (x86_linux_dr_get_control): Likewise.
6593 (x86_linux_dr_get_status): Likewise.
6594 (x86_linux_update_debug_registers): Likewise.
6595
2b95d440
GB
65962015-03-24 Gary Benson <gbenson@redhat.com>
6597
6598 * linux-x86-low.c (x86_linux_update_debug_registers):
6599 New function, factored out from...
6600 (x86_linux_prepare_to_resume): ...this.
6601
14b0bc68
GB
66022015-03-24 Gary Benson <gbenson@redhat.com>
6603
6604 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6605 (x86_linux_dr_set): Likewise.
6606 (update_debug_registers_callback): Likewise.
6607 (x86_linux_dr_set_addr): Likewise.
6608 (x86_linux_dr_get_addr): Likewise.
6609 (x86_linux_dr_set_control): Likewise.
6610 (x86_linux_dr_get_control): Likewise.
6611 (x86_linux_dr_get_status): Likewise.
6612 (x86_linux_prepare_to_resume): Likewise.
6613
5dfe6ca8
GB
66142015-03-24 Gary Benson <gbenson@redhat.com>
6615
6616 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6617 Use perror_with_name. Pass string through gettext.
6618 (x86_linux_dr_set): Likewise.
6619
d33472ad
GB
66202015-03-24 Gary Benson <gbenson@redhat.com>
6621
6622 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6623 (x86_linux_dr_set_addr): ...this.
6624 (x86_dr_low_get_addr): Rename to...
6625 (x86_linux_dr_get_addr): ...this.
6626 (x86_dr_low_set_control): Rename to...
6627 (x86_linux_dr_set_control): ...this.
6628 (x86_dr_low_get_control): Rename to...
6629 (x86_linux_dr_get_control): ...this.
6630 (x86_dr_low_get_status): Rename to...
6631 (x86_linux_dr_get_status): ...this.
6632 (x86_dr_low): Update with new function names.
6633
4b134ca1
GB
66342015-03-24 Gary Benson <gbenson@redhat.com>
6635
6636 * Makefile.in (x86-linux.o): New rule.
6637 * configure.srv: Add x86-linux.o to relevant targets.
6638 * linux-low.c (lwp_set_arch_private_info): New function.
6639 (lwp_arch_private_info): Likewise.
6640 * linux-x86-low.c: Include nat/x86-linux.h.
6641 (arch_lwp_info): Removed structure.
6642 (update_debug_registers_callback):
6643 Use lwp_set_debug_registers_changed.
6644 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6645 and lwp_set_debug_registers_changed.
6646 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6647
34c703da
GB
66482015-03-24 Gary Benson <gbenson@redhat.com>
6649
6650 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6651 * linux-arm-low.c (arm_new_thread): Likewise.
6652 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6653 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6654 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6655 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6656
cff068da
GB
66572015-03-24 Gary Benson <gbenson@redhat.com>
6658
6659 * linux-low.c (ptid_of_lwp): New function.
6660 (lwp_is_stopped): Likewise.
6661 (lwp_stop_reason): Likewise.
6662 * linux-x86-low.c (update_debug_registers_callback):
6663 Use lwp_is_stopped.
6664 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6665 lwp_stop_reason.
6666
b2f7c7e8
GB
66672015-03-24 Gary Benson <gbenson@redhat.com>
6668
6669 * linux-low.h (linux_stop_lwp): Remove declaration.
6670
6d4ee8c6
GB
66712015-03-24 Gary Benson <gbenson@redhat.com>
6672
6673 * linux-low.h: Include nat/linux-nat.h.
6674 * linux-low.c (iterate_over_lwps_args): New structure.
6675 (iterate_over_lwps_filter): New function.
6676 (iterate_over_lwps): Likewise.
6677 * linux-x86-low.c (update_debug_registers_callback):
6678 Update signature to what iterate_over_lwps expects.
6679 Remove PID check that iterate_over_lwps now performs.
6680 (x86_dr_low_set_addr): Use iterate_over_lwps.
6681 (x86_dr_low_set_control): Likewise.
6682
70a0bb6b
GB
66832015-03-24 Gary Benson <gbenson@redhat.com>
6684
6685 * linux-x86-low.c (x86_debug_reg_state): New function.
6686 (x86_linux_prepare_to_resume): Use the above.
6687
7b669087
GB
66882015-03-24 Gary Benson <gbenson@redhat.com>
6689
6690 * linux-low.c (current_lwp_ptid): New function.
6691 * linux-x86-low.c: Include nat/linux-nat.h.
6692 (x86_dr_low_get_addr): Use current_lwp_ptid.
6693 (x86_dr_low_get_control): Likewise.
6694 (x86_dr_low_get_status): Likewise.
6695
eef49a3d
PA
66962015-03-20 Pedro Alves <palves@redhat.com>
6697
6698 * tracepoint.c (cmd_qtstatus): Make "str" const.
6699
b2333d22
PA
67002015-03-20 Pedro Alves <palves@redhat.com>
6701
6702 * server.c (handle_general_set): Make "req_str" const.
6703
23f238d3
PA
67042015-03-19 Pedro Alves <palves@redhat.com>
6705
6706 * linux-low.c (linux_resume_one_lwp): Rename to ...
6707 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6708 instead call perror_with_name.
6709 (check_ptrace_stopped_lwp_gone): New function.
6710 (linux_resume_one_lwp): Reimplement as wrapper around
6711 linux_resume_one_lwp_throw that swallows errors if the LWP is
6712 gone.
6713
91baf43f
PA
67142015-03-19 Pedro Alves <palves@redhat.com>
6715
6716 * linux-low.c (count_events_callback, select_event_lwp_callback):
6717 No longer check whether the thread has resume_stop as last resume
6718 kind.
6719
8bf3b159
PA
67202015-03-19 Pedro Alves <palves@redhat.com>
6721
6722 * linux-low.c (count_events_callback, select_event_lwp_callback):
6723 Use the lwp's status_pending_p field, not the thread's.
6724
b90fc188
PA
67252015-03-19 Pedro Alves <palves@redhat.com>
6726
6727 * linux-low.c (select_event_lwp_callback): Update comments to
6728 no longer mention SIGTRAP.
6729
464b0089
GB
67302015-03-18 Gary Benson <gbenson@redhat.com>
6731
6732 * server.c (handle_query): Do not report vFile:fstat as supported.
6733
aa9e327f
GB
67342015-03-11 Gary Benson <gbenson@redhat.com>
6735
6736 * hostio.c (sys/types.h): New include.
6737 (sys/stat.h): Likewise.
6738 (common-remote-fileio.h): Likewise.
6739 (handle_fstat): New function.
6740 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6741
791c0056
GB
67422015-03-11 Gary Benson <gbenson@redhat.com>
6743
6744 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6745 struct stat.st_blocks and struct stat.st_blksize.
6746 * configure: Regenerate.
6747 * config.in: Likewise.
6748 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6749 (OBS): Add common-remote-fileio.o.
6750 (common-remote-fileio.o): New rule.
6751
9a9df970
PA
67522015-03-09 Pedro Alves <palves@redhat.com>
6753
6754 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6755 'struct sockaddr' pointer in 'accept' call.
6756
9eb1356e
PA
67572015-03-09 Pedro Alves <palves@redhat.com>
6758
6759 Revert:
6760 2015-03-07 Pedro Alves <palves@redhat.com>
6761 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6762 or <winsock2.h> here. Instead include "gdb_socket.h".
6763 (remote_open): Use union gdb_sockaddr_u.
6764 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6765 or <winsock2.h> here. Instead include "gdb_socket.h".
6766 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6767 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6768 or <sys/un.h>.
6769 (init_named_socket, gdb_agent_helper_thread): Use union
6770 gdb_sockaddr_u.
6771
aac331e4
PA
67722015-03-07 Pedro Alves <palves@redhat.com>
6773
6774 * configure.ac (build_warnings): Move
6775 -Wdeclaration-after-statement to the C-specific set.
6776 * configure: Regenerate.
6777
366c75fc
PA
67782015-03-07 Pedro Alves <palves@redhat.com>
6779
6780 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6781 or <winsock2.h> here. Instead include "gdb_socket.h".
6782 (remote_open): Use union gdb_sockaddr_u.
6783 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6784 or <winsock2.h> here. Instead include "gdb_socket.h".
6785 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6786 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6787 or <sys/un.h>.
6788 (init_named_socket, gdb_agent_helper_thread): Use union
6789 gdb_sockaddr_u.
6790
492d29ea
PA
67912015-03-07 Pedro Alves <palves@redhat.com>
6792
6793 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6794 instead.
6795
60a191ed
YQ
67962015-03-06 Yao Qi <yao.qi@linaro.org>
6797
6798 * linux-aarch64-low.c (aarch64_insert_point): Use
6799 show_debug_regs as a boolean.
6800 (aarch64_remove_point): Likewise.
6801
f5771b1d
PA
68022015-03-05 Pedro Alves <palves@redhat.com>
6803
6804 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6805 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6806 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6807 * nto-low.c (nto_target_ops): Likewise.
6808 * spu-low.c (spu_target_ops): Likewise.
6809 * win32-low.c (win32_target_ops): Likewise.
6810
3e572f71
PA
68112015-03-04 Pedro Alves <palves@redhat.com>
6812
72f4393d 6813 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6814 Decide whether a breakpoint triggered based on the SIGTRAP's
6815 siginfo.si_code.
72f4393d
L
6816 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6817 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6818 (linux_low_filter_event): Check for breakpoints before checking
6819 watchpoints.
6820 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6821 siginfo.si_code.
72f4393d
L
6822 (linux_stopped_by_sw_breakpoint)
6823 (linux_supports_stopped_by_sw_breakpoint)
6824 (linux_stopped_by_hw_breakpoint)
6825 (linux_supports_stopped_by_hw_breakpoint): New functions.
6826 (linux_target_ops): Install new target methods.
3e572f71 6827
1ec68e26
PA
68282015-03-04 Pedro Alves <palves@redhat.com>
6829
6830 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6831 * server.c (swbreak_feature, hwbreak_feature): New globals.
6832 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6833 (captured_main): Clear swbreak_feature and hwbreak_feature.
6834 * server.h (swbreak_feature, hwbreak_feature): Declare.
6835 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6836 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6837 supports_stopped_by_hw_breakpoint>: New fields.
6838 (target_supports_stopped_by_sw_breakpoint)
6839 (target_stopped_by_sw_breakpoint)
6840 (target_supports_stopped_by_hw_breakpoint)
6841 (target_stopped_by_hw_breakpoint): Declare.
6842
15c66dd6
PA
68432015-03-04 Pedro Alves <palves@redhat.com>
6844
6845 enum lwp_stop_reason -> enum target_stop_reason
6846 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6847 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6848 (linux_wait_1, stuck_in_jump_pad_callback)
6849 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6850 (linux_stopped_by_watchpoint):
6851 * linux-low.h (enum lwp_stop_reason): Delete.
6852 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6853 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6854
98fc70d6
YQ
68552015-03-04 Yao Qi <yao.qi@linaro.org>
6856
6857 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6858
dd2ac174
GB
68592015-03-03 Gary Benson <gbenson@redhat.com>
6860
6861 * hostio.c (handle_vFile): Fix prefix lengths.
6862
d68e53f4
MM
68632015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6864
6865 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6866 ptr_bits.
6867
bf2d68ab
AA
68682015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6869
6870 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6871 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6872 (clean): Add "rm -f" for above C files.
6873 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6874 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6875 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6876 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6877 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6878 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6879 (init_registers_s390x_vx_linux64)
6880 (init_registers_s390x_tevx_linux64)
6881 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6882 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6883 declarations.
6884 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6885 (s390_store_vxrs_high): New functions.
6886 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6887 NT_S390_VXRS_HIGH.
6888 (s390_arch_setup): Add logic for selecting one of the new target
6889 descriptions. Activate the new vector regsets if applicable.
6890 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6891 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6892 and init_registers_s390x_tevx_linux64.
6893
c966a859
PA
68942015-03-01 Pedro Alves <palves@redhat.com>
6895
6896 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6897 parameter.
6898
4180215b
PA
68992015-02-27 Pedro Alves <palves@redhat.com>
6900
6901 * linux-x86-low.c (u_debugreg_offset): New function.
6902 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6903
749bab01
PA
69042015-02-27 Pedro Alves <palves@redhat.com>
6905
6906 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6907 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6908 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6909 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6910 (ps_lsetfpregs, ps_getpid)
6911 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6912 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6913 (ps_lsetxregs, ps_plog): Declare.
6914
3c14e5a3
PA
69152015-02-27 Pedro Alves <palves@redhat.com>
6916
6917 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6918 IP_AGENT_EXPORT_FUNC.
6919 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6920 IP_AGENT_EXPORT_FUNC.
6921 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6922 (IP_AGENT_EXPORT): Delete.
6923 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6924 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6925 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6926 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6927 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6928 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6929 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6930 (traceframe_read_count, traceframe_write_count)
6931 (traceframes_created, trace_state_variables, get_raw_reg)
6932 (get_trace_state_variable_value, set_trace_state_variable_value)
6933 (ust_loaded, helper_thread_id, cmd_buf): Use
6934 IPA_SYM_EXPORTED_NAME.
6935 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6936 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6937 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6938 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6939 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6940 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6941 EXTERN_C_PUSH/EXTERN_C_POP.
6942 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6943 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6944 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6945 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6946 (traceframe_write_count, traceframe_read_count)
6947 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6948 (about_to_request_buffer_space, get_trace_state_variable_value)
6949 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6950 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6951 EXTERN_C_PUSH/EXTERN_C_POP.
6952 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6953 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6954 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6955 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6956 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6957 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6958 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6959 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6960 Define.
6961 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6962 (IP_AGENT_EXPORT_VAR_DECL): Define.
6963 (tracing): Declare.
6964 (gdb_agent_get_raw_reg): Declare.
6965
fe978cb0
PA
69662015-02-27 Tom Tromey <tromey@redhat.com>
6967 Pedro Alves <palves@redhat.com>
6968
6969 Rename symbols whose names are reserved C++ keywords throughout.
6970
3bc3d82a
PA
69712015-02-27 Pedro Alves <palves@redhat.com>
6972
6973 * Makefile.in (COMPILER): New, get it from autoconf.
6974 (CXX): Get from autoconf instead.
6975 (COMPILE.pre): Use COMPILER.
6976 (CC-LD): Rename to ...
6977 (CC_LD): ... this. Use COMPILER.
6978 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6979 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6980 * acinclude.m4: Include build-with-cxx.m4.
6981 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6982 Disable -Werror by default if building in C++ mode.
6983 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6984 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6985 the C++ compiler. Save/restore CXXFLAGS too.
6986 * configure: Regenerate.
6987
07697489
PA
69882015-02-27 Pedro Alves <palves@redhat.com>
6989
6990 * acinclude.m4: Include libiberty.m4.
6991 * configure.ac: Call libiberty_INIT.
6992 * config.in, configure: Regenerate.
6993
9beb7c4e
PA
69942015-02-26 Pedro Alves <palves@redhat.com>
6995
6996 * linux-low.c (linux_wait_1): When incrementing the PC past a
6997 program breakpoint always use the_low_target.breakpoint_len as
6998 increment, rather than the maximum between that and
6999 the_low_target.decr_pc_after_break.
7000
8090aef2
PA
70012015-02-23 Pedro Alves <palves@redhat.com>
7002
7003 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7004 thread was doing a step-over; always adjust the PC if
7005 we stepped over a permanent breakpoint.
7006 (linux_wait_1): If we stepped over breakpoint that was on top of a
7007 permanent breakpoint, manually advance the PC past it.
7008
bc9540e8
PA
70092015-02-23 Pedro Alves <palves@redhat.com>
7010
7011 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7012 modes.
7013 (x86_fill_gregset, x86_store_gregset): Use it when handling
7014 $orig_eax.
7015
2db9a427
PA
70162015-02-20 Pedro Alves <palves@redhat.com>
7017
7018 * thread-db.c: Include "nat/linux-procfs.h".
7019 (thread_db_init): Skip listing new threads if the kernel supports
7020 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7021
afa8d396
PA
70222015-02-20 Pedro Alves <palves@redhat.com>
7023
7024 * linux-low.c (status_pending_p_callback): Use ptid_match.
7025
c9587f88
AT
70262015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7027
7028 PR breakpoints/16812
7029 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7030 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7031 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7032
b05ec7a5
AT
70332015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7034
7035 PR breakpoints/15956
7036 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7037
d33501a5
MM
70382015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7039
7040 * linux-low.c (linux_low_btrace_conf): Print size.
7041 * server.c (handle_btrace_conf_general_set): New.
7042 (hanle_general_set): Call handle_btrace_conf_general_set.
7043 (handle_query): Report Qbtrace-conf:bts:size as supported.
7044
f4abbc16
MM
70452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7046
7047 * linux-low.c (linux_low_enable_btrace): Update parameters.
7048 (linux_low_btrace_conf): New.
7049 (linux_target_ops)<to_btrace_conf>: Initialize.
7050 * server.c (current_btrace_conf): New.
7051 (handle_btrace_enable): Rename to ...
7052 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7053 to target_enable_btrace. Update comment. Update users.
7054 (handle_qxfer_btrace_conf): New.
7055 (qxfer_packets): Add btrace-conf entry.
7056 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7057 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7058 (target_ops)<read_btrace_conf>: New.
7059 (target_enable_btrace): Update parameters.
7060 (target_read_btrace_conf): New.
7061
043c3577
MM
70622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7063
7064 * server.c (handle_btrace_general_set): Remove call to
7065 target_supports_btrace.
7066 (supported_btrace_packets): New.
7067 (handle_query): Call supported_btrace_packets.
7068 * target.h: include btrace-common.h.
7069 (btrace_target_info): Removed.
7070 (supports_btrace, target_supports_btrace): Update parameters.
7071
734b0e4b
MM
70722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7073
7074 * Makefile.in (SFILES): Add common/btrace-common.c.
7075 (OBS): Add common/btrace-common.o.
7076 (btrace-common.o): Add build rules.
7077 * linux-low: Include btrace-common.h.
7078 (linux_low_read_btrace): Use struct btrace_data. Call
7079 btrace_data_init and btrace_data_fini.
7080
d6c146e9
PA
70812015-02-06 Pedro Alves <palves@redhat.com>
7082
7083 * thread-db.c (find_new_threads_callback): Add debug output.
7084
20ba1ce6
PA
70852015-02-04 Pedro Alves <palves@redhat.com>
7086
7087 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7088 (resume_stopped_resumed_lwps): New function.
7089 (linux_wait_for_event_filtered): Use it.
7090
8cc73a39
SDJ
70912015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7092
7093 * Makefile.in (SFILES): Add linux-personality.c.
7094 (linux-personality.o): New rule.
7095 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7096 list of objects to be built.
7097 * linux-low.c: Include nat/linux-personality.h.
7098 (linux_create_inferior): Remove code to disable address space
7099 randomization (moved to ../nat/linux-personality.c). Create
7100 cleanup to disable address space randomization.
7101
fb23d554
SDJ
71022015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7103
7104 * Makefile.in (posix-strerror.o): New rule.
7105 (mingw-strerror.o): Likewise.
7106 * configure: Regenerated.
7107 * configure.ac: Source file ../common/common.host. Initialize new
7108 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7109
cdf43629
YQ
71102015-01-14 Yao Qi <yao@codesourcery.com>
7111
7112 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7113 (ppc-linux.o): New rule.
7114 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7115 * configure.ac: AC_CHECK_FUNCS(getauxval).
7116 * config.in: Re-generated.
7117 * configure: Re-generated.
7118 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7119 ppc64_64bit_inferior_p
7120
514c5338
YQ
71212015-01-14 Yao Qi <yao@codesourcery.com>
7122
7123 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7124 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7125 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7126 (PT_ORIG_R3, PT_TRAP): Likewise.
7127 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7128 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7129 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7130
3368c1e5
JB
71312015-01-10 Joel Brobecker <brobecker@adacore.com>
7132
7133 * i387-fp.c (i387_cache_to_xsave): In look over
7134 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7135 zmmh_low_space field by use of zmmh_high_space.
7136
582511be
PA
71372015-01-09 Pedro Alves <palves@redhat.com>
7138
7139 * linux-low.c (step_over_bkpt): Move higher up in the file.
7140 (handle_extended_wait): Don't store the stop_pc here.
7141 (get_stop_pc): Adjust comments and rename to ...
7142 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7143 stopped for a software breakpoint or hardware breakpoint.
7144 (thread_still_has_status_pending_p): New function.
7145 (status_pending_p_callback): Use
7146 thread_still_has_status_pending_p. If the event is no longer
7147 interesting, resume the LWP.
7148 (handle_tracepoints): Add assert.
7149 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7150 (wstatus_maybe_breakpoint): New function.
7151 (cancel_breakpoint): Delete function.
7152 (check_stopped_by_watchpoint): New function, factored out from
7153 linux_low_filter_event.
7154 (lp_status_maybe_breakpoint): Delete function.
7155 (linux_low_filter_event): Remove filter_ptid argument.
7156 Leave thread group exits pending here. Store the LWP's stop PC.
7157 Always leave events pending.
7158 (linux_wait_for_event_filtered): Pull all events out of the
7159 kernel, and leave them all pending.
7160 (count_events_callback, select_event_lwp_callback): Consider all
7161 events.
7162 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7163 (select_event_lwp): Only give preference to the stepping LWP in
7164 all-stop mode. Adjust comments.
7165 (ignore_event): New function.
7166 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7167 references to cancel_breakpoints. Adjust to renames. Also give
7168 equal priority to all LWPs that have had events in non-stop mode.
7169 If reporting a software breakpoint event, unadjust the LWP's PC.
7170 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7171 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7172 Adjust.
7173 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7174 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7175 (linux_stopped_by_watchpoint): Adjust.
7176 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7177 * linux-low.h (enum lwp_stop_reason): New.
7178 (struct lwp_info) <stop_pc>: Adjust comment.
7179 <stopped_by_watchpoint>: Delete field.
7180 <stop_reason>: New field.
7181 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7182 * mem-break.c (software_breakpoint_inserted_here)
7183 (hardware_breakpoint_inserted_here): New function.
7184 * mem-break.h (software_breakpoint_inserted_here)
7185 (hardware_breakpoint_inserted_here): Declare.
7186 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7187 (cancel_breakpoints): Delete.
7188 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7189 (upload_fast_traceframes): Remove references to
7190 cancel_breakpoints.
7191
a33e3959
PA
71922015-01-09 Pedro Alves <palves@redhat.com>
7193
7194 * thread-db.c (find_new_threads_callback): Ignore thread if the
7195 kernel thread ID is -1.
7196
8784d563
PA
71972015-01-09 Pedro Alves <palves@redhat.com>
7198
7199 * linux-low.c (linux_attach_fail_reason_string): Move to
7200 nat/linux-ptrace.c, and rename.
7201 (linux_attach_lwp): Update comment.
7202 (attach_proc_task_lwp_callback): New function.
7203 (linux_attach): Adjust to rename and use
7204 linux_proc_attach_tgid_threads.
7205 (linux_attach_fail_reason_string): Delete declaration.
7206
76f2b779
JB
72072015-01-01 Joel Brobecker <brobecker@adacore.com>
7208
7209 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7210 * server.c (gdbserver_version): Likewise.
7211
fafcc06a
SDJ
72122014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7213
7214 * remote-utils.c: Include ctype.h.
7215 (input_interrupt): Explicitly handle the case when the char
7216 received is the NUL byte. Improve the printing of non-ASCII
7217 characters.
7218
beed38b8
JB
72192014-12-16 Joel Brobecker <brobecker@adacore.com>
7220
7221 * linux-low.c (linux_low_filter_event): Update call to
7222 linux_enable_event_reporting following the addition of
7223 a new parameter to that function.
7224
bf330350
CU
72252014-12-16 Catalin Udma <catalin.udma@freescale.com>
7226
7227 PR server/17457
7228 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7229 (AARCH64_FPCR_REGNO): Likewise.
7230 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7231 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7232 (aarch64_store_fpregset): Likewise.
7233
5227d625
JB
72342014-12-15 Joel Brobecker <brobecker@adacore.com>
7235
7236 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7237 Remove FIXME comment about assumption about N.
7238
f93b65a0
JB
72392014-12-13 Joel Brobecker <brobecker@adacore.com>
7240
7241 * configure.ac: If large-file support is disabled in GDBserver,
7242 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7243 * configure: Regenerate.
7244
e5a9158d
AA
72452014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7246
7247 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7248 warning upon ENODATA from ptrace.
7249 * linux-s390-low.c (s390_store_tdb): New.
7250 (s390_regsets): Add regset for NT_S390_TDB.
7251
feea5f36
AA
72522014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7253
7254 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7255 without a fill_function.
7256 * linux-s390-low.c (s390_fill_last_break): Remove.
7257 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7258 (s390_arch_setup): Use regset's size instead of fill_function for
7259 loop end condition.
7260
098dbe61
AA
72612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7262
7263 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7264 the regset's store function when ptrace returned an error.
7265 * regcache.c (get_thread_regcache): Invalidate register cache
7266 before fetching inferior's registers.
7267
28eef672
AA
72682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7269
7270 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7271 while-loop as for-loop.
7272 (regsets_store_inferior_registers): Likewise.
7273
bdca27a2
YQ
72742014-11-28 Yao Qi <yao@codesourcery.com>
7275
7276 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7277 * config.in, configure: Re-generate.
7278 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7279 is defined.
7280
9c232dda
YQ
72812014-11-21 Yao Qi <yao@codesourcery.com>
7282
7283 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7284 (AC_CHECK_HEADERS): Remove malloc.h.
7285 * configure: Re-generated.
7286 * config.in: Re-generated.
7287 * server.h: Don't include alloca.h and malloc.h.
7288 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7289 Don't include malloc.h.
7290
43968415
JB
72912014-11-17 Joel Brobecker <brobecker@adacore.com>
7292
7293 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7294 corresponding ERRNO check in same block.
7295
40e91bc7
PA
72962014-11-12 Pedro Alves <palves@redhat.com>
7297
7298 * server.c (cont_thread): Update comment.
7299 (start_inferior, attach_inferior): No longer clear cont_thread.
7300 (handle_v_cont): No longer set cont_thread.
7301 (captured_main): Clear cont_thread each time a GDB connects.
7302
c2c118cf
PA
73032014-11-12 Pedro Alves <palves@redhat.com>
7304
7305 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7306 thread, and don't resume all threads if the Hc thread has exited.
7307
78708b7c
PA
73082014-11-12 Pedro Alves <palves@redhat.com>
7309
7310 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7311 the process group instead of to a specific LWP.
7312
a2abc7de
PA
73132014-10-15 Pedro Alves <palves@redhat.com>
7314
7315 PR server/17487
7316 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7317 parameter.
7318 (arm_set_thread_context): Delete.
7319 (the_low_target): Adjust.
7320 * win32-i386-low.c (debug_registers_changed)
7321 (debug_registers_used): Delete.
7322 (update_debug_registers_callback): New function.
7323 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7324 needing to update their debug registers.
7325 (win32_get_current_dr): New function.
7326 (x86_dr_low_get_addr, x86_dr_low_get_control)
7327 (x86_dr_low_get_status): Fetch the debug register from the thread
7328 record's context.
7329 (i386_initial_stuff): Adjust.
7330 (i386_get_thread_context): Remove current_event parameter. Don't
7331 clear debug_registers_changed nor copy DR values to
7332 debug_reg_state.
7333 (i386_set_thread_context): Delete.
7334 (i386_prepare_to_resume): New function.
7335 (i386_thread_added): Mark the thread as needing to update irs
7336 debug registers.
7337 (the_low_target): Remove i386_set_thread_context and install
7338 i386_prepare_to_resume.
7339 * win32-low.c (win32_get_thread_context): Adjust.
7340 (win32_set_thread_context): Use SetThreadContext
7341 directly.
7342 (win32_prepare_to_resume): New function.
7343 (win32_require_context): New function, factored out from ...
7344 (thread_rec): ... this.
7345 (continue_one_thread): Call win32_prepare_to_resume on each thread
7346 we're about to continue.
7347 (win32_resume): Call win32_prepare_to_resume on the event thread.
7348 * win32-low.h (struct win32_thread_info)
7349 <debug_registers_changed>: New field.
7350 (struct win32_target_ops): Change prototype of set_thread_context,
7351 delete set_thread_context and add prepare_to_resume.
7352 (win32_require_context): New declaration.
7353
a442d071
GB
73542014-10-08 Gary Benson <gbenson@redhat.com>
7355
7356 * server.h: Do not include common-exceptions.h.
7357
6f1947e8
GB
73582014-10-08 Gary Benson <gbenson@redhat.com>
7359
7360 * server.h: Do not include cleanups.h.
7361
63b434a4
JH
73622014-09-30 James Hogan <james.hogan@imgtec.com>
7363
7364 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7365 mips64-dsp-linux.c.
7366
c4d9ceb6
YQ
73672014-09-23 Yao Qi <yao@codesourcery.com>
7368
7369 * linux-low.c (lp_status_maybe_breakpoint): New function.
7370 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7371 (count_events_callback): Likewise.
7372 (select_event_lwp_callback): Likewise.
7373 (cancel_breakpoints_callback): Likewise.
7374
89a5711c
DB
73752014-09-19 Don Breazeal <donb@codesourcery.com>
7376
7377 * linux-low.c (handle_extended_wait): Call
7378 linux_ptrace_get_extended_event.
7379 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7380 linux_is_extended_waitstatus.
7381
bffc0964
JB
73822014-09-16 Joel Brobecker <brobecker@adacore.com>
7383
7384 * Makefile.in (CPPFLAGS): Define.
7385 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7386 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7387
0bfdf32f
GB
73882014-09-16 Gary Benson <gbenson@redhat.com>
7389
7390 * inferiors.h (current_inferior): Renamed as...
7391 (current_thread): New variable. All uses updated.
7392 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7393 (maybe_move_out_of_jump_pad): Likewise.
7394 (cancel_breakpoint): Likewise.
7395 (linux_low_filter_event): Likewise.
7396 (wait_for_sigstop): Likewise.
7397 (linux_resume_one_lwp): Likewise.
7398 (need_step_over_p): Likewise.
7399 (start_step_over): Likewise.
7400 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7401 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7402 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7403 and save_inferior as saved_thread.
7404 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7405 saved_thread.
7406 (regcache_invalidate_thread): Likewise.
7407 * remote-utils.c (prepare_resume_reply): Likewise.
7408 * thread-db.c (thread_db_get_tls_address): Likewise.
7409 (disable_thread_event_reporting): Likewise.
7410 (remove_thread_event_breakpoints): Likewise.
7411 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7412 as saved_thread.
7413 * target.h (set_desired_inferior): Renamed as...
7414 (set_desired_thread): New declaration. All uses updated.
7415 * server.c (myresume): Updated comment to reference thread instead
7416 of inferior.
7417 (handle_serial_event): Likewise.
7418 (handle_target_event): Likewise.
7419
361c8ade
GB
74202014-09-12 Tom Tromey <tromey@redhat.com>
7421 Gary Benson <gbenson@redhat.com>
7422
7423 * regcache.h: Include common-regcache.h.
7424 (regcache_read_pc): Don't declare.
7425 * regcache.c (get_thread_regcache_for_ptid): New function.
7426
bd9269f7
GB
74272014-09-11 Tom Tromey <tromey@redhat.com>
7428 Gary Benson <gbenson@redhat.com>
7429
7430 * symbol.c: New file.
7431 * Makefile.in (SFILES): Add symbol.c.
7432 (OBS): Add symbol.o.
7433
f8c1d06b
GB
74342014-09-11 Gary Benson <gbenson@redhat.com>
7435
7436 * target.c (target_stop_ptid, target_continue_ptid): New
7437 functions.
7438
721ec300
GB
74392014-09-11 Tom Tromey <tromey@redhat.com>
7440 Gary Benson <gbenson@redhat.com>
7441
7442 * target.h: Include target/target.h.
7443 * target.c (target_read_memory, target_read_uint32)
7444 (target_write_memory): New functions.
7445
c5e92cca
GB
74462014-09-11 Gary Benson <gbenson@redhat.com>
7447
7448 * server.h (debug_hw_points): Don't declare.
7449 * server.c (debug_hw_points): Don't define. Replace all uses
7450 with show_debug_regs.
7451 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7452 all uses with show_debug_regs.
7453
2e4bb98a
EBM
74542014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7455
7456 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7457 endianness into account.
7458 (ppc_supply_ptrace_register): Likewise.
7459
ac740bc7
JH
74602014-09-03 James Hogan <james.hogan@imgtec.com>
7461
7462 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7463 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7464
97ea6506
GB
74652014-09-03 Gary Benson <gbenson@redhat.com>
7466
7467 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7468 ALL_DEBUG_ADDRESS_REGISTERS.
7469
df7e5265
GB
74702014-09-02 Gary Benson <gbenson@redhat.com>
7471
7472 * i386-low.h: Renamed as...
7473 * x86-low.h: New file. All type, function and variable name
7474 prefixes changed from "i386_" to "x86_". All references updated.
7475 * i386-low.c: Renamed as...
7476 * x86-low.c: New file. All type, function and variable name
7477 prefixes changed from "i386_" to "x86_". All references updated.
7478
ed859da7
GB
74792014-09-02 Gary Benson <gbenson@redhat.com>
7480
7481 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7482 (x86_linux_new_thread): Likewise.
7483
860789c7
GB
74842014-08-29 Gary Benson <gbenson@redhat.com>
7485
7486 * server.h (setjmp.h): Do not include.
7487 (toplevel): Do not declare.
7488 (common-exceptions.h): Include.
7489 (cleanups.h): Likewise.
7490 * server.c (toplevel): Do not define.
7491 (exit_code): New static global.
7492 (detach_or_kill_for_exit_cleanup): New function.
7493 (main): New function. Original main renamed to...
7494 (captured_main): New function.
7495 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7496
ff55e1b5
GB
74972014-08-29 Gary Benson <gbenson@redhat.com>
7498
7499 * Makefile.in (SFILES): Add common/common-exceptions.c.
7500 (OBS): Add common-exceptions.o.
7501 (common-exceptions.o): New rule.
7502 * utils.c (prepare_to_throw_exception): New function.
7503
e9bcb658
GB
75042014-08-29 Gary Benson <gbenson@redhat.com>
7505
7506 * config.in: Regenerate.
7507 * configure: Likewise.
7508
e3180625
GB
75092014-08-29 Gary Benson <gbenson@redhat.com>
7510
7511 * Makefile.in (SFILES): Add common/cleanups.c.
7512 (OBS): cleanups.o.
7513 (cleanups.o): New rule.
7514
e3d6ba5d
GB
75152014-08-29 Gary Benson <gbenson@redhat.com>
7516
7517 * utils.c (internal_vwarning): New function.
7518
7096e886
GB
75192014-08-28 Gary Benson <gbenson@redhat.com>
7520
7521 * utils.h (fatal): Remove declaration.
7522 * utils.c (fatal): Remove function.
7523
14ce3192
GB
75242014-08-28 Gary Benson <gbenson@redhat.com>
7525
7526 * tracepoint.c (gdb_agent_init): Replace fatal with
7527 perror_with_name.
7528 (initialize_tracepoint): Likewise.
7529
50278d59
GB
75302014-08-28 Gary Benson <gbenson@redhat.com>
7531
7532 * remote-utils.c (remote_prepare): Replace fatal with error.
7533
aa96c426
GB
75342014-08-28 Gary Benson <gbenson@redhat.com>
7535
7536 * linux-low.c (linux_async): Replace fatal with warning.
7537 Tidy up and return.
7538 (linux_start_non_stop): Return -1 if linux_async failed.
7539
f7160e97
GB
75402014-08-28 Gary Benson <gbenson@redhat.com>
7541
7542 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7543 gdb_assert.
7544 (i386_dr_low_get_addr): Remove vague comment.
7545 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7546 gdb_assert.
7547
38e08fca
GB
75482014-08-28 Gary Benson <gbenson@redhat.com>
7549
7550 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7551 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7552 internal_error.
7553 (linux_resume_one_lwp): Likewise.
7554 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7555 gdb_assert.
7556 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7557 with internal_error.
7558 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7559 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7560 (find_register_by_name): Replace fatal with internal_error.
7561 (find_regno): Likewise.
7562 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7563 * thread-db.c (thread_db_create_event): Likewise.
7564 (thread_db_load_search): Likewise.
7565 (try_thread_db_load_1): Likewise.
7566 * tracepoint.c (get_jump_space_head): Replace fatal with
7567 internal_error.
7568 (claim_trampoline_space): Likewise.
7569 (have_fast_tracepoint_trampoline_buffer): Likewise.
7570 (cmd_qtstart): Likewise.
7571 (stop_tracing): Likewise.
7572 (fast_tracepoint_collecting): Likewise.
7573 (target_malloc): Likewise.
7574 (download_tracepoint): Likewise.
7575 (download_trace_state_variables): Replace check with gdb_assert.
7576 (upload_fast_traceframes): Replace fatal with internal_error.
7577
34abf635
GB
75782014-08-19 Tom Tromey <tromey@redhat.com>
7579 Gary Benson <gbenson@redhat.com>
7580
7581 * Makefile.in (SFILES): Add common/common-debug.c.
7582 (OBS): Add common-debug.o.
7583 (common-debug.o): New rule.
7584 * debug.h (debug_printf): Don't declare.
7585 * debug.c (debug_printf): Renamed and rewritten as...
7586 (debug_vprintf): New function.
7587
f6e94d78
GB
75882014-08-19 Gary Benson <gbenson@redhat.com>
7589
7590 * utils.h: Do not include print-utils.h.
7591
9239eeab
GB
75922014-08-19 Tom Tromey <tromey@redhat.com>
7593 Gary Benson <gbenson@redhat.com>
7594
7595 * server.h: Add static assertion.
7596 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7597
ef87c8bb
GB
75982014-08-19 Tom Tromey <tromey@redhat.com>
7599 Gary Benson <gbenson@redhat.com>
7600
7601 * Makefile.in (SFILES): Add common/errors.c.
7602 (OBS): Add errors.o.
7603 (IPA_OBS): Add errors-ipa.o.
7604 (errors.o): New rule.
7605 (errors-ipa.o): Likewise.
7606 * utils.h (perror_with_name, error, warning): Don't declare.
7607 * utils.c (warning): Renamed and rewritten as...
7608 (vwarning): New function.
7609 (error): Renamed and rewritten as...
7610 (verror): New function.
7611 (internal_error): Renamed and rewritten as...
7612 (internal_verror): New function.
7613
bb974a24
GB
76142014-08-07 Gary Benson <gbenson@redhat.com>
7615
7616 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7617 * configure: Regenerate.
7618 * config.in: Likewise.
7619 * server.h: Do not include errno.h.
7620 * event-loop.c: Likewise.
7621 * hostio-errno.c: Likewise.
7622 * linux-low.c: Likewise.
7623 * remote-utils.c: Likewise.
7624 * spu-low.c: Likewise.
7625 * utils.c: Likewise.
7626 * gdbreplay.c: Unconditionally include errno.h.
7627
6d3d12eb
GB
76282014-08-07 Gary Benson <gbenson@redhat.com>
7629
7630 * server.h: Do not include string.h.
7631 * event-loop.c: Likewise.
7632 * linux-low.c: Likewise.
7633 * regcache.c: Likewise.
7634 * remote-utils.c: Likewise.
7635 * spu-low.c: Likewise.
7636 * utils.c: Likewise.
7637
dccbb609
GB
76382014-08-07 Gary Benson <gbenson@redhat.com>
7639
7640 * server.h: Do not include gdb_assert.h.
7641
e76df0d0
GB
76422014-08-07 Gary Benson <gbenson@redhat.com>
7643
7644 * server.h: Do not include common-utils.h.
7645
4cb9c816
GB
76462014-08-07 Gary Benson <gbenson@redhat.com>
7647
7648 * server.h: Do not include ptid.h.
7649 * notif.h: Likewise.
7650
3995eeee
GB
76512014-08-07 Gary Benson <gbenson@redhat.com>
7652
7653 * server.h: Do not include gdb_locale.h.
7654
cb9f1a9b
GB
76552014-08-07 Gary Benson <gbenson@redhat.com>
7656
7657 * server.h: Do not include gdb/signals.h.
7658 * win32-low.c: Likewise.
7659
a5fceff8
GB
76602014-08-07 Gary Benson <gbenson@redhat.com>
7661
7662 * server.h: Do not include pathmax.h.
7663
b9391142
GB
76642014-08-07 Gary Benson <gbenson@redhat.com>
7665
7666 * server.h: Do not include libiberty.h.
7667 * linux-bfin-low.c: Likewise.
7668
0e443c87
GB
76692014-08-07 Gary Benson <gbenson@redhat.com>
7670
7671 * server.h: Do not include ansidecl.h.
7672
8ebb3f56
GB
76732014-08-07 Gary Benson <gbenson@redhat.com>
7674
7675 * linux-x86-low.c: Do not include stddef.h.
7676 * lynx-ppc-low.c: Likewise.
7677 * tracepoint.c: Likewise.
7678
8980bdf6
GB
76792014-08-07 Gary Benson <gbenson@redhat.com>
7680
7681 * server.h: Do not include stdarg.h.
7682 * nto-low.c: Likewise.
7683
d7096f71
GB
76842014-08-07 Gary Benson <gbenson@redhat.com>
7685
7686 * server.h: Do not include stdlib.h.
7687 * inferiors.c: Likewise.
7688 * linux-low.c: Likewise.
7689 * regcache.c: Likewise.
7690 * spu-low.c: Likewise.
7691 * tracepoint.c: Likewise.
7692 * utils.c: Likewise.
7693
d02f550d
GB
76942014-08-07 Gary Benson <gbenson@redhat.com>
7695
7696 * server.h: Do not include stdio.h.
7697 * linux-low.c: Likewise.
7698 * remote-utils.c: Likewise.
7699 * spu-low.c: Likewise.
7700 * utils.c: Likewise.
7701 * wincecompat.c: Likewise.
7702
87f6c4e3
GB
77032014-08-06 Gary Benson <gbenson@redhat.com>
7704
7705 * regcache.c (init_register_cache): Move conditionals inside if.
7706
7089dca4
GB
77072014-08-06 Gary Benson <gbenson@redhat.com>
7708
7709 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7710
462f517e
GB
77112014-07-31 Gary Benson <gbenson@redhat.com>
7712
7713 * ax.h: Do not include server.h.
7714 * gdbthread.h: Likewise.
7715 * lynx-low.h: Likewise.
7716 * notif.h: Likewise.
7717
976411d6
GB
77182014-07-30 Gary Benson <gbenson@redhat.com>
7719
7720 * server.h: Include common-defs.h.
7721 Do not include config.h or build-gnulib-gdbserver/config.h.
7722
d41f6d8e
GB
77232014-07-30 Gary Benson <gbenson@redhat.com>
7724
7725 * hostio-errno.c: Move server.h to top of includes list.
7726 * inferiors.c: Likewise.
7727 * linux-x86-low.c: Likewise.
7728 * notif.c: Include server.h.
7729
314c6a35
TT
77302014-07-24 Tom Tromey <tromey@redhat.com>
7731 Gary Benson <gbenson@redhat.com>
7732
7733 * server.h (CORE_ADDR): Now unsigned.
7734
69ff6be5
PA
77352014-07-16 Pedro Alves <palves@redhat.com>
7736
7737 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7738
ce9e3fe7
PA
77392014-07-15 Pedro Alves <palves@redhat.com>
7740
7741 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7742 copy.
7743
e76126e8
PA
77442014-07-11 Pedro Alves <palves@redhat.com>
7745
7746 * linux-low.c (kill_wait_lwp): New function, based on
7747 kill_one_lwp_callback, but use my_waitpid directly.
7748 (kill_one_lwp_callback, linux_kill): Use it.
7749
8e9db26e
PA
77502014-06-23 Pedro Alves <palves@redhat.com>
7751
7752 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7753 before setting DR0..DR3.
7754
698b3e08
GB
77552014-06-20 Gary Benson <gbenson@redhat.com>
7756
7757 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7758 * configure: Regenerated.
7759 * config.in: Likewise.
7760
125f8a3d
GB
77612014-06-20 Gary Benson <gbenson@redhat.com>
7762
7763 * Makefile.in (SFILES): Update locations for files moved
7764 from common to nat.
7765 (object file files): Reordered.
7766
42995dbd
GB
77672014-06-20 Gary Benson <gbenson@redhat.com>
7768
7769 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7770 (i386_dr_low_set_addr): Likewise.
7771 (i386_dr_low_get_addr): Likewise.
7772 (i386_dr_low_can_set_control): Likewise.
7773 (i386_dr_low_set_control): Likewise.
7774 (i386_dr_low_get_control): Likewise.
7775 (i386_dr_low_get_status): Likewise.
7776 (i386_get_debug_register_length): Likewise.
7777 * linux-x86-low.c (i386_dr_low_set_addr):
7778 Changed signature. Made static.
7779 (i386_dr_low_get_addr): Likewise.
7780 (i386_dr_low_set_control): Likewise.
7781 (i386_dr_low_get_control): Likewise.
7782 (i386_dr_low_get_status): Likewise.
7783 (i386_dr_low): New global variable.
7784 * win32-i386-low.c (i386_dr_low_set_addr):
7785 Changed signature. Made static.
7786 (i386_dr_low_get_addr): Likewise.
7787 (i386_dr_low_set_control): Likewise.
7788 (i386_dr_low_get_control): Likewise.
7789 (i386_dr_low_get_status): Likewise.
7790 (i386_dr_low): New global variable.
7791
e1d2394b
MS
77922014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7793
7794 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7795 * Makefile.in (AR, AR_FLAGS): Define.
7796 * configure: Regenerate.
7797
3a8ee006
GB
77982014-06-19 Gary Benson <gbenson@redhat.com>
7799
7800 * Makefile.in (i386-dregs.o): New rule.
7801 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7802 * i386-low.c (target.h): Remove include.
7803 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7804 (DR_CONTROL_SHIFT): Likewise.
7805 (DR_CONTROL_SIZE): Likewise.
7806 (DR_RW_EXECUTE): Likewise.
7807 (DR_RW_WRITE): Likewise.
7808 (DR_RW_READ): Likewise.
7809 (DR_RW_IORW): Likewise.
7810 (DR_LEN_1): Likewise.
7811 (DR_LEN_2): Likewise.
7812 (DR_LEN_4): Likewise.
7813 (DR_LEN_8): Likewise.
7814 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7815 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7816 (DR_ENABLE_SIZE): Likewise.
7817 (DR_LOCAL_SLOWDOWN): Likewise.
7818 (DR_GLOBAL_SLOWDOWN): Likewise.
7819 (DR_CONTROL_RESERVED): Likewise.
7820 (I386_DR_CONTROL_MASK): Likewise.
7821 (I386_DR_VACANT): Likewise.
7822 (I386_DR_LOCAL_ENABLE): Likewise.
7823 (I386_DR_GLOBAL_ENABLE): Likewise.
7824 (I386_DR_DISABLE): Likewise.
7825 (I386_DR_SET_RW_LEN): Likewise.
7826 (I386_DR_GET_RW_LEN): Likewise.
7827 (I386_DR_WATCH_HIT): Likewise.
7828 (i386_wp_op_t): Likewise.
7829 (i386_show_dr): Likewise.
7830 (i386_length_and_rw_bits): Likewise.
7831 (i386_insert_aligned_watchpoint): Likewise.
7832 (i386_remove_aligned_watchpoint): Likewise.
7833 (i386_handle_nonaligned_watchpoint): Likewise.
7834 i386_update_inferior_debug_regs(): Likewise.
7835 (i386_dr_insert_watchpoint): Likewise.
7836 (i386_dr_remove_watchpoint): Likewise.
7837 (i386_dr_region_ok_for_watchpoint): Likewise.
7838 (i386_dr_stopped_data_address): Likewise.
7839 (i386_dr_stopped_by_watchpoint): Likewise.
7840
8f26655c
GB
78412014-06-19 Gary Benson <gbenson@redhat.com>
7842
7843 * i386-low.c (i386_dr_show): Renamed to
7844 i386_show_dr and made static. All uses updated.
7845 (i386_dr_length_and_rw_bits): Renamed to
7846 i386_length_and_rw_bits and made static.
7847 All uses updated.
7848 (i386_dr_insert_aligned_watchpoint): Renamed to
7849 i386_insert_aligned_watchpoint and made static.
7850 All uses updated.
7851 (i386_dr_remove_aligned_watchpoint): Renamed to
7852 i386_remove_aligned_watchpoint and made static.
7853 All uses updated.
7854 (i386_dr_update_inferior_debug_regs): Renamed to
7855 i386_update_inferior_debug_regs and made static.
7856 All uses updated.
7857
b9228891
GB
78582014-06-18 Gary Benson <gbenson@redhat.com>
7859
5171def3
GB
7860 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7861 (i386_dr_low_can_set_control): Likewise.
7862 (i386_get_debug_register_length): Likewise.
7863 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7864 (i386_dr_low_can_set_control): Likewise.
7865 (i386_get_debug_register_length): Likewise.
7866
78672014-06-17 Gary Benson <gbenson@redhat.com>
7868
b9228891
GB
7869 * i386-low.h (i386-dregs.h): New include.
7870 (DR_FIRSTADDR): Now in i386-dregs.h.
7871 (DR_LASTADDR): Likewise.
7872 (DR_NADDR): Likewise.
7873 (DR_STATUS): Likewise.
7874 (DR_CONTROL): Likewise.
7875 (i386_debug_reg_state): Likewise.
7876 (i386_dr_insert_watchpoint): Likewise.
7877 (i386_dr_remove_watchpoint): Likewise.
7878 (i386_dr_region_ok_for_watchpoint): Likewise.
7879 (i386_dr_stopped_data_address): Likewise.
7880 (i386_dr_stopped_by_watchpoint): Likewise.
7881 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7882
4be83cc2
GB
78832014-06-18 Gary Benson <gbenson@redhat.com>
7884
7885 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7886 i386_dr_insert_watchpoint.
7887 (i386_low_remove_watchpoint): Renamed to
7888 i386_dr_remove_watchpoint.
7889 (i386_low_region_ok_for_watchpoint): Renamed to
7890 i386_dr_region_ok_for_watchpoint.
7891 (i386_low_stopped_data_address): Renamed to
7892 i386_dr_stopped_data_address.
7893 (i386_low_stopped_by_watchpoint): Renamed to
7894 i386_dr_stopped_by_watchpoint.
7895 * i386-low.c (i386_show_dr): Renamed to
7896 i386_dr_show and made nonstatic. All uses updated.
7897 (i386_length_and_rw_bits): Renamed to
7898 i386_dr_length_and_rw_bits and made nonstatic.
7899 All uses updated.
7900 (i386_insert_aligned_watchpoint): Renamed to
7901 i386_dr_insert_aligned_watchpoint and made nonstatic.
7902 All uses updated.
7903 (i386_remove_aligned_watchpoint): Renamed to
7904 i386_dr_remove_aligned_watchpoint and made nonstatic.
7905 All uses updated.
7906 (i386_update_inferior_debug_regs): Renamed to
7907 i386_dr_update_inferior_debug_regs and made nonstatic.
7908 All uses updated.
7909 (i386_low_insert_watchpoint): Renamed to
7910 i386_dr_insert_watchpoint. All uses updated.
7911 (i386_low_remove_watchpoint): Renamed to
7912 i386_dr_remove_watchpoint. All uses updated.
7913 (i386_low_region_ok_for_watchpoint): Renamed to
7914 i386_dr_region_ok_for_watchpoint. All uses updated.
7915 (i386_low_stopped_data_address): Renamed to
7916 i386_dr_stopped_data_address. All uses updated.
7917 (i386_low_stopped_by_watchpoint): Renamed to
7918 i386_dr_stopped_by_watchpoint. All uses updated.
7919
131aa0d4
GB
79202014-06-18 Gary Benson <gbenson@redhat.com>
7921
7922 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7923 (i386_dr_low_can_set_control): Likewise.
7924 (i386_insert_aligned_watchpoint): New check.
7925
d9305f7f
GB
79262014-06-18 Gary Benson <gbenson@redhat.com>
7927
7928 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7929 Renamed to state.
7930
e927c9fc
GB
79312014-06-18 Gary Benson <gbenson@redhat.com>
7932
7933 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7934 instead of fatal and error.
7935 (i386_handle_nonaligned_watchpoint): Likewise.
7936
1b6d4134
GB
79372014-06-18 Gary Benson <gbenson@redhat.com>
7938
7939 * i386-low.c (i386_get_debug_register_length): New macro.
7940 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7941 (i386_show_dr): Use debug_printf instead of fprintf. Use
7942 phex to format values.
7943
6e62758f
GB
79442014-06-18 Gary Benson <gbenson@redhat.com>
7945
7946 * i386-low.h: Comment changes.
7947 * i386-low.c: Likewise.
7948
fc6e2f03
GB
79492014-06-18 Gary Benson <gbenson@redhat.com>
7950
7951 * i386-low.c: Whitespace changes.
7952
f9d1eeed
TT
79532014-06-12 Tom Tromey <tromey@redhat.com>
7954
7955 * utils.c (freeargv): Remove.
7956
0b04e523
TT
79572014-06-12 Tom Tromey <tromey@redhat.com>
7958
7959 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7960 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7961 (parse_debug_format_options): Likewise.
7962 (gdbserver_usage): Likewise.
7963 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7964 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7965 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7966 against libiberty.
7967 ($(LIBGNU)): Depend on libiberty.
7968 (all-lib): Recurse into all subdirs.
7969 (install-only): Invoke "install" target in subdirs.
7970 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7971 targets.
7972 * configure: Rebuild.
7973 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7974 for vasprintf, vsnprintf, or gettimeofday.
7975 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7976 srv_tgtobj.
7977
270c9937
JB
79782014-06-05 Joel Brobecker <brobecker@adacore.com>
7979
7980 * development.sh: Delete.
7981 * Makefile.in (config.status): Adjust dependency on development.sh.
7982 * configure.ac: Adjust development.sh source call.
7983 * configure: Regenerate.
7984
0a261ed8
PA
79852014-06-02 Pedro Alves <palves@redhat.com>
7986
7987 * ax.c (gdb_free_agent_expr): New function.
7988 * ax.h (gdb_free_agent_expr): New declaration.
7989 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7990 list.
7991 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7992 static.
7993 (clear_breakpoint_conditions_and_commands): New function.
7994 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7995 (clear_breakpoint_conditions_and_commands): New declaration.
7996
e9dae05e
RR
79972014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7998
7999 * linux-aarch64-low.c (asm/ptrace.h): Include.
8000
5876f503
JK
80012014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8002
8003 Fix TLS access for -static -pthread.
8004 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8005 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8006 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8007
802e8e6d
PA
80082014-05-20 Pedro Alves <palves@redhat.com>
8009
8010 * linux-aarch64-low.c (aarch64_insert_point)
8011 (aarch64_remove_point): No longer check whether the type is
8012 supported here. Adjust to new interface.
8013 (the_low_target): Install aarch64_supports_z_point_type as
8014 supports_z_point_type method.
8015 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8016 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8017 instead of a Z packet char. Adjust.
8018 (arm_supports_z_point_type): New function.
8019 (arm_insert_point, arm_remove_point): Adjust to new interface.
8020 (the_low_target): Install arm_supports_z_point_type.
8021 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8022 (cris_insert_point, cris_remove_point): Adjust to new interface.
8023 Don't check whether the type is supported here.
8024 (the_low_target): Install cris_supports_z_point_type.
8025 * linux-low.c (linux_supports_z_point_type): New function.
8026 (linux_insert_point, linux_remove_point): Adjust to new interface.
8027 * linux-low.h (struct linux_target_ops) <insert_point,
8028 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8029 raw_breakpoint pointer parameter.
8030 <supports_z_point_type>: New method.
8031 * linux-mips-low.c (mips_supports_z_point_type): New function.
8032 (mips_insert_point, mips_remove_point): Adjust to new interface.
8033 Use mips_supports_z_point_type.
8034 (the_low_target): Install mips_supports_z_point_type.
8035 * linux-ppc-low.c (the_low_target): Install NULL as
8036 supports_z_point_type method.
8037 * linux-s390-low.c (the_low_target): Install NULL as
8038 supports_z_point_type method.
8039 * linux-sparc-low.c (the_low_target): Install NULL as
8040 supports_z_point_type method.
8041 * linux-x86-low.c (x86_supports_z_point_type): New function.
8042 (x86_insert_point): Adjust to new insert_point interface. Use
8043 insert_memory_breakpoint. Adjust to new
8044 i386_low_insert_watchpoint interface.
8045 (x86_remove_point): Adjust to remove_point interface. Use
8046 remove_memory_breakpoint. Adjust to new
8047 i386_low_remove_watchpoint interface.
8048 (the_low_target): Install x86_supports_z_point_type.
8049 * lynx-low.c (lynx_target_ops): Install NULL as
8050 supports_z_point_type callback.
8051 * nto-low.c (nto_supports_z_point_type): New.
8052 (nto_insert_point, nto_remove_point): Adjust to new interface.
8053 (nto_target_ops): Install nto_supports_z_point_type.
8054 * mem-break.c: Adjust intro comment.
8055 (struct raw_breakpoint) <raw_type, size>: New fields.
8056 <inserted>: Update comment.
8057 <shlib_disabled>: Delete field.
8058 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8059 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8060 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8061 (raw_bkpt_type_to_target_hw_bp_type): New function.
8062 (find_enabled_raw_code_breakpoint_at): New function.
8063 (find_raw_breakpoint_at): New type and size parameters. Use them.
8064 (insert_memory_breakpoint): New function, based off
8065 set_raw_breakpoint_at.
8066 (remove_memory_breakpoint): New function.
8067 (set_raw_breakpoint_at): Reimplement.
8068 (set_breakpoint): New, based on set_breakpoint_at.
8069 (set_breakpoint_at): Reimplement.
8070 (delete_raw_breakpoint): Go through the_target->remove_point
8071 instead of assuming memory breakpoints.
8072 (find_gdb_breakpoint_at): Delete.
8073 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8074 (find_gdb_breakpoint): New function.
8075 (set_gdb_breakpoint_at): Delete.
8076 (z_type_supported): New function.
8077 (set_gdb_breakpoint_1): New function, loosely based off
8078 set_gdb_breakpoint_at.
8079 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8080 (delete_gdb_breakpoint_at): Delete.
8081 (delete_gdb_breakpoint_1): New function, loosely based off
8082 delete_gdb_breakpoint_at.
8083 (delete_gdb_breakpoint): New function.
8084 (clear_gdb_breakpoint_conditions): Rename to ...
8085 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8086 breakpoint.
8087 (add_condition_to_breakpoint): Make static.
8088 (add_breakpoint_condition): Take a struct breakpoint pointer
8089 instead of an address. Adjust.
8090 (gdb_condition_true_at_breakpoint): Rename to ...
8091 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8092 z_type parameter.
8093 (gdb_condition_true_at_breakpoint): Reimplement.
8094 (add_breakpoint_commands): Take a struct breakpoint pointer
8095 instead of an address. Adjust.
8096 (gdb_no_commands_at_breakpoint): Rename to ...
8097 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8098 parameter. Return true if no breakpoint was found. Change debug
8099 output.
8100 (gdb_no_commands_at_breakpoint): Reimplement.
8101 (run_breakpoint_commands): Rename to ...
8102 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8103 and change return type to boolean.
8104 (run_breakpoint_commands): New function.
8105 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8106 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8107 breakpoint. Go through the_target->remove_point instead of
8108 assuming memory breakpoint.
8109 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8110 software and hardware breakpoints.
8111 (reinsert_raw_breakpoint): Go through the_target->insert_point
8112 instead of assuming memory breakpoint.
8113 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8114 software and hardware breakpoints.
8115 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8116 Check both software and hardware breakpoints.
8117 (validate_inserted_breakpoint): Assert the breakpoint is a
8118 software breakpoint. Set the inserted flag to -1 instead of
8119 setting shlib_disabled.
8120 (delete_disabled_breakpoints): Adjust.
8121 (validate_breakpoints): Only validate software breakpoints.
8122 Adjust to inserted flag change.
8123 (check_mem_read, check_mem_write): Skip breakpoint types other
8124 than software breakpoints. Adjust to inserted flag change.
8125 * mem-break.h (enum raw_bkpt_type): New enum.
8126 (raw_breakpoint, struct process_info): Forward declare.
8127 (Z_packet_to_target_hw_bp_type): Delete declaration.
8128 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8129 (set_gdb_breakpoint, delete_gdb_breakpoint)
8130 (clear_breakpoint_conditions): New declarations.
8131 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8132 (breakpoint_inserted_here): Update comment.
8133 (add_breakpoint_condition, add_breakpoint_commands): Replace
8134 address parameter with a breakpoint pointer parameter.
8135 (gdb_breakpoint_here): Update comment.
8136 (delete_gdb_breakpoint_at): Delete.
8137 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8138 * server.c (process_point_options): Take a struct breakpoint
8139 pointer instead of an address. Adjust.
8140 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8141 delete_gdb_breakpoint.
8142 * spu-low.c (spu_target_ops): Install NULL as
8143 supports_z_point_type method.
8144 * target.h: Include mem-break.h.
8145 (struct target_ops) <prepare_to_access_memory>: Update comment.
8146 <supports_z_point_type>: New field.
8147 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8148 instead of a char. Also take a raw breakpoint pointer.
8149 * win32-arm-low.c (the_low_target): Install NULL as
8150 supports_z_point_type.
8151 * win32-i386-low.c (i386_supports_z_point_type): New function.
8152 (i386_insert_point, i386_remove_point): Adjust to new interface.
8153 (the_low_target): Install i386_supports_z_point_type.
8154 * win32-low.c (win32_supports_z_point_type): New function.
8155 (win32_insert_point, win32_remove_point): Adjust to new interface.
8156 (win32_target_ops): Install win32_supports_z_point_type.
8157 * win32-low.h (struct win32_target_ops):
8158 <supports_z_point_type>: New method.
8159 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8160 instead of a char. Also take a raw breakpoint pointer.
8161
932539e3
PA
81622014-05-20 Pedro Alves <palves@redhat.com>
8163
8164 * mem-break.h: Include break-common.h.
8165 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8166 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8167 (Z_packet_to_target_hw_bp_type): New declaration.
8168 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8169 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8170 (Z_PACKET_ACCESS_WP): Delete macros.
8171 (Z_packet_to_hw_type): Delete function.
8172 * i386-low.h: Don't include break-common.h here.
8173 (Z_packet_to_hw_type): Delete declaration.
8174 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8175 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8176 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8177 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8178 * linux-aarch64-low.c: Don't include break-common.h here.
8179 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8180 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8181 (Z_packet_to_target_hw_bp_type): Delete function.
8182 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8183 function.
8184 (mips_insert_point, mips_remove_point): Use
8185 Z_packet_to_target_hw_bp_type.
8186
4ff0d3d8
PA
81872014-05-20 Pedro Alves <palves@redhat.com>
8188
8189 * linux-aarch64-low.c: Include break-common.h.
8190 (enum target_point_type): Delete.
8191 (Z_packet_to_point_type): Rename to ...
8192 (Z_packet_to_target_hw_bp_type): ... this, and return a
8193 target_hw_bp_type instead.
8194 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8195 instead of an enum target_point_type.
8196 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8197 breakpoint type.
8198 (aarch64_dr_state_insert_one_point)
8199 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8200 (aarch64_handle_aligned_watchpoint)
8201 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8202 Take an enum target_hw_bp_type instead of an enum
8203 target_point_type.
8204 (aarch64_supports_z_point_type): New function.
8205 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8206 use Z_packet_to_target_hw_bp_type.
8207
786dc519
JB
82082014-05-20 Joel Brobecker <brobecker@adacore.com>
8209
8210 * configure.ac: Only use -Werror by default when DEVELOPMENT
8211 is true.
8212 * configure: Regenerate.
8213
9e0aa64f
JK
82142014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8215
8216 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8217 * linux-x86-low.c (X86_64_USER_REGS): New.
8218 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8219
2b577b92
YQ
82202014-04-28 Yao Qi <yao@codesourcery.com>
8221
8222 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8223 name.
8224
94611da2
PA
82252014-04-25 Pedro Alves <palves@redhat.com>
8226
8227 PR server/16255
8228 * linux-low.c (linux_attach_fail_reason_string): New function.
8229 (linux_attach_lwp): Delete.
8230 (linux_attach_lwp_1): Rename to ...
8231 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8232 argument. Remove "initial" parameter. Return int instead of
8233 void. Don't error or warn here.
8234 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8235 failure to attach to the tgid. Call warning when failing to
8236 attach to an lwp.
8237 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8238 argument. Remove "initial" parameter. Return int instead of
8239 void. Don't error or warn here.
8240 (linux_attach_fail_reason_string): New declaration.
8241 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8242 interface change. Use linux_attach_fail_reason_string.
8243
01f9f808
MS
82442014-04-24 Michael Sturm <michael.sturm@mintel.com>
8245 Walfred Tedeschi <walfred.tedeschi@intel.com>
8246
8247 * Makefile.in: Added rules to handle new files
8248 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8249 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8250 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8251 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8252 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8253 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8254 x32-avx512-linux.o.
8255 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8256 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8257 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8258 i386/x32-avx512.xml.
8259 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8260 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8261 i386/x32-avx512-linux.xml.
8262 * i387-fp.c (num_avx512_k_registers): New constant for number
8263 of K registers.
8264 (num_avx512_zmmh_low_registers): New constant for number of
8265 lower ZMM registers (0-15).
8266 (num_avx512_zmmh_high_registers): New constant for number of
8267 higher ZMM registers (16-31).
8268 (num_avx512_ymmh_registers): New contant for number of higher
8269 YMM registers (ymm16-31 added by avx521 on x86_64).
8270 (num_avx512_xmm_registers): New constant for number of higher
8271 XMM registers (xmm16-31 added by AVX512 on x86_64).
8272 (struct i387_xsave): Add space for AVX512 registers.
8273 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8274 Add code to handle AVX512 registers.
8275 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8276 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8277 prototypei from generated file.
8278 (tdesc_amd64_avx512_linux): Likewise.
8279 (init_registers_x32_avx512_linux): Likewise.
8280 (tdesc_x32_avx512_linux): Likewise.
8281 (init_registers_i386_avx512_linux): Likewise.
8282 (tdesc_i386_avx512_linux): Likewise.
8283 (x86_64_regmap): Add AVX512 registers.
8284 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8285 mask.
8286 (initialize_low_arch): Add code to initialize AVX512 registers.
8287
51aa91f9
PA
82882014-04-23 Pedro Alves <palves@redhat.com>
8289
8290 * mem-break.c (find_gdb_breakpoint_at): Make static.
8291 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8292
a4165e94
PA
82932014-04-23 Pedro Alves <palves@redhat.com>
8294
8295 * i386-low.c: Don't include break-common.h here.
8296 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8297 prototype to take target_hw_bp_type as argument instead of a Z
8298 packet char.
8299 * i386-low.h: Include break-common.h here.
8300 (Z_packet_to_hw_type): Declare.
8301 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8302 prototypes.
8303 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8304 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8305 (x86_remove_point): Convert the packet number to a
8306 target_hw_bp_type before calling i386_low_remove_watchpoint.
8307 * win32-i386-low.c (i386_insert_point): Convert the packet number
8308 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8309 (i386_remove_point): Convert the packet number to a
8310 target_hw_bp_type before calling i386_low_remove_watchpoint.
8311
b8acf843
PA
83122014-04-23 Pedro Alves <palves@redhat.com>
8313
8314 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8315
d708bcd1
PA
83162014-04-10 Pedro Alves <palves@redhat.com>
8317
8318 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8319 Check if the condition or command is NULL before checking if the
8320 breakpoint is known. On success, return true.
8321 * mem-break.h (add_breakpoint_condition): Document return.
8322 (add_breakpoint_commands): Add describing comment.
8323 * server.c (skip_to_semicolon): New function.
8324 (process_point_options): Use it.
8325
2eec7d5b
PA
83262014-04-09 Pedro Alves <palves@redhat.com>
8327
8328 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8329 to lwpid_of.
8330
fa96cb38
PA
83312014-02-27 Pedro Alves <palves@redhat.com>
8332
8333 PR 12702
8334 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8335 macros.
8336 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8337 output.
8338 (last_thread_of_process_p): Take a PID argument instead of a
8339 thread pointer.
8340 (linux_wait_for_lwp): Delete.
8341 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8342 functions.
8343 (linux_low_filter_event): New function, party factored out from
8344 linux_wait_for_event.
8345 (linux_wait_for_event): Rename to ...
8346 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8347 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8348 sigsuspend. Check for zombie leaders.
8349 (linux_wait_for_event): Reimplement as wrapper around
8350 linux_wait_for_event_filtered.
8351 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8352 a normal or signal exit is seen, it's the whole process exiting.
8353 (wait_for_sigstop): No longer a for_each_inferior callback.
8354 Rewrite on top of linux_wait_for_event_filtered.
8355 (stop_all_lwps): Call wait_for_sigstop directly.
8356 * server.c (resume, handle_target_event): Handle
8357 TARGET_WAITKIND_NO_RESUMED.
8358
d763de10
JB
83592014-02-26 Joel Brobecker <brobecker@adacore.com>
8360
8361 * win32-low.c (psapi_get_dll_name,
8362 * win32_CreateToolhelp32Snapshot): Delete.
8363 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8364 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8365 Delete.
8366 (handle_load_dll): Add function description.
8367 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8368
850a0f76
JB
83692014-02-26 Joel Brobecker <brobecker@adacore.com>
8370
8371 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8372 Add comment.
8373 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8374 base address when calling win32_add_one_solib.
8375 (handle_load_dll): Delete local variable load_addr.
8376 Remove 0x1000 offset applied to DLL base address when calling
8377 win32_add_one_solib.
8378 (handle_unload_dll): Add comment.
8379
f25b3fc3
JB
83802014-02-26 Joel Brobecker <brobecker@adacore.com>
8381
8382 * win32-low.c (win32_add_all_dlls): Renames
8383 win32_ensure_ntdll_loaded. Rewrite function documentation.
8384 Adjust implementation to always load all DLLs.
8385 Add 0x1000 offset to DLL base address when calling
8386 win32_add_one_solib.
8387 (child_initialization_done): New static global.
8388 (do_initial_child_stuff): Set child_initialization_done to
8389 zero during child initialization, and 1 after. Replace call
8390 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8391 Add comment.
8392 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8393 (handle_unload_dll): Add function documentation.
8394 (get_child_debug_event): Ignore load and unload DLL events
8395 during child initialization.
8396
d86d4aaf
DE
83972014-02-20 Doug Evans <dje@google.com>
8398
3bc32da3 8399 Remove global all_lwps.
d86d4aaf
DE
8400 * inferiors.h (ptid_of): Move here from linux-low.h.
8401 (pid_of, lwpid_of): Ditto.
8402 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8403 parameter is a struct thread_info * now.
8404 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8405 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8406 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8407 directly.
8408 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8409 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8410 * linux-arm-low.c (update_registers_callback): Update, "entry"
8411 parameter is a struct thread_info * now.
8412 Fetch lwpid from current_inferior directly.
8413 (arm_insert_point): Pass &all_threads to find_inferior instead of
8414 &all_lwps.
8415 (arm_remove_point): Ditto.
8416 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8417 (arm_prepare_to_resume): Fetch pid from thread.
8418 (arm_read_description): Fetch lwpid from current_inferior directly.
8419 * linux-low.c (all_lwps): Delete.
8420 (delete_lwp): Delete call to remove_inferior.
8421 (handle_extended_wait): Fetch lwpid from thread.
8422 (add_lwp): Don't set lwp->entry.id. Remove call to
8423 add_inferior_to_list.
8424 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8425 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8426 (kill_one_lwp_callback): Ditto.
8427 (linux_kill): Don't dereference NULL pointer.
8428 Fetch ptid,lwpid from thread.
8429 (get_detach_signal): Fetch ptid from thread.
8430 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8431 Simplify call to regcache_invalidate_thread.
8432 (delete_lwp_callback): Update, "entry" parameter is a
8433 struct thread_info * now. Fetch pid from thread.
8434 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8435 (status_pending_p_callback): Update, "entry" parameter is a
8436 struct thread_info * now. Fetch ptid from thread.
8437 (find_lwp_pid): Update, "entry" parameter is a
8438 struct thread_info * now.
8439 (linux_wait_for_lwp): Fetch pid from thread.
8440 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8441 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8442 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8443 (dequeue_one_deferred_signal): Ditto.
8444 (cancel_breakpoint): Fetch ptid from current_inferior.
8445 (linux_wait_for_event): Pass &all_threads to find_inferior,
8446 not &all_lwps. Fetch ptid, lwpid from thread.
8447 (count_events_callback): Update, "entry" parameter is a
8448 struct thread_info * now.
8449 (select_singlestep_lwp_callback): Ditto.
8450 (select_event_lwp_callback): Ditto.
8451 (cancel_breakpoints_callback): Ditto.
8452 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8453 not &all_lwps.
8454 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8455 (unsuspend_one_lwp): Update, "entry" parameter is a
8456 struct thread_info * now.
8457 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8458 not &all_lwps.
8459 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8460 Fetch lwpid from thread, not lwp.
8461 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8462 Pass &all_threads to find_inferior, not &all_lwps.
8463 (send_sigstop): Fetch lwpid from thread, not lwp.
8464 (send_sigstop_callback): Update, "entry" parameter is a
8465 struct thread_info * now.
8466 (suspend_and_send_sigstop_callback): Ditto.
8467 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8468 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8469 struct thread_info * now.
8470 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8471 from thread, lwp.
8472 (lwp_running): Update, "entry" parameter is a
8473 struct thread_info * now.
8474 (stop_all_lwps): Fetch ptid from thread.
8475 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8476 (linux_resume_one_lwp): Fetch lwpid from thread.
8477 (linux_set_resume_request): Update, "entry" parameter is a
8478 struct thread_info * now. Fetch pid, lwpid from thread.
8479 (resume_status_pending_p): Update, "entry" parameter is a
8480 struct thread_info * now.
8481 (need_step_over_p): Ditto. Fetch lwpid from thread.
8482 (start_step_over): Fetch lwpid from thread.
8483 (linux_resume_one_thread): Update, "entry" parameter is a
8484 struct thread_info * now. Fetch lwpid from thread.
8485 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8486 (proceed_one_lwp): Update, "entry" parameter is a
8487 struct thread_info * now. Fetch lwpid from thread.
8488 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8489 struct thread_info * now.
8490 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8491 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8492 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8493 directly.
8494 (regsets_store_inferior_registers): Ditto.
8495 (fetch_register, store_register): Ditto.
8496 (linux_read_memory, linux_write_memory): Ditto.
8497 (linux_request_interrupt): Ditto.
8498 (linux_read_auxv): Ditto.
8499 (linux_xfer_siginfo): Ditto.
8500 (linux_qxfer_spu): Ditto.
8501 (linux_qxfer_libraries_svr4): Ditto.
8502 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8503 moved to inferiors.h.
8504 (get_lwp): Delete.
8505 (get_thread_lwp): Update.
8506 (struct lwp_info): Delete member "entry". Simplify comment for
8507 member "thread".
8508 (all_lwps): Delete.
8509 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8510 current_inferior directly.
8511 (update_watch_registers_callback): Update, "entry" parameter is a
8512 struct thread_info * now. Fetch pid from thread.
8513 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8514 (mips_insert_point): Fetch lwpid from current_inferior.
8515 Pass &all_threads to find_inferior, not &all_lwps.
8516 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8517 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8518 directly.
8519 (mips_stopped_data_address): Ditto.
8520 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8521 directly.
8522 * linux-tile-low.c (tile_arch_setup): Ditto.
8523 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8524 (update_debug_registers_callback): Update, "entry" parameter is a
8525 struct thread_info * now. Fetch pid from thread.
8526 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8527 Pass &all_threads to find_inferior, not &all_lwps.
8528 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8529 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8530 Pass &all_threads to find_inferior, not &all_lwps.
8531 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8532 (i386_dr_low_get_status): Ditto.
8533 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8534 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8535 (x86_linux_read_description): Ditto.
8536 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8537
3b8361aa
DE
85382014-02-20 Doug Evans <dje@google.com>
8539
8540 * inferiors.c (get_first_inferior): Fix buglet.
8541
f7667f0d
DE
85422014-02-19 Doug Evans <dje@google.com>
8543
8544 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8545 * inferiors.c (add_thread): Change result type to struct thread_info *.
8546 All callers updated.
8547 (add_lwp): Call add_thread here instead of in callers.
8548 All callers updated.
8549 * linux-low.h (get_lwp_thread): Rewrite.
8550 (struct lwp_info): New member "thread".
8551
b3312d80
DE
85522014-02-19 Doug Evans <dje@google.com>
8553
8554 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8555 All callers updated.
8556
ecc6f45c
DE
85572014-02-19 Doug Evans <dje@google.com>
8558
8559 * inferiors.c (add_thread): Fix whitespace.
8560
649ebbca
DE
85612014-02-19 Doug Evans <dje@google.com>
8562
8563 * dll.c (clear_dlls): Replace accessing list implemention details
8564 with API function.
8565 * gdbthread.h (get_first_thread): Declare.
8566 * inferiors.c (for_each_inferior_with_data): New function.
8567 (get_first_thread): New function.
8568 (find_thread_ptid): Simplify.
8569 (get_first_inferior): New function.
8570 (clear_list): Delete.
8571 (one_inferior_p): New function.
8572 (clear_inferior_list): New function.
8573 (clear_inferiors): Update.
8574 * inferiors.h (for_each_inferior_with_data): Declare.
8575 (clear_inferior_list): Declare.
8576 (one_inferior_p): Declare.
8577 (get_first_inferior): Declare.
8578 * linux-low.c (linux_wait_for_event): Replace accessing list
8579 implemention details with API function.
8580 * server.c (target_running): Ditto.
8581 (accumulate_file_name_length): New function.
8582 (emit_dll_description): New function.
8583 (handle_qxfer_libraries): Replace accessing list implemention
8584 details with API function.
8585 (handle_qxfer_threads_worker): New function.
8586 (handle_qxfer_threads_proper): Replace accessing list implemention
8587 details with API function.
8588 (handle_query): Ditto.
8589 (visit_actioned_threads_callback_ftype): New typedef.
8590 (visit_actioned_threads_data): New struct.
8591 (visit_actioned_threads): Rewrite to be find_inferior callback.
8592 (resume): Call find_inferior.
8593 (handle_status): Replace accessing list implemention
8594 details with API function.
8595 (process_serial_event): Replace accessing list implemention details
8596 with API function.
8597 * target.c (set_desired_inferior): Replace accessing list implemention
8598 details with API function.
8599 * tracepoint.c (same_process_p): New function.
8600 (gdb_agent_about_to_close): Replace accessing list implemention
8601 details with API function.
8602 * win32-low.c (child_delete_thread): Replace accessing list
8603 implemention details with API function.
8604 (match_dll_by_basename): New function.
8605 (dll_is_loaded_by_basename): New function.
8606 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8607 details call to dll_is_loaded_by_basename.
8608
80894984
DE
86092014-02-19 Doug Evans <dje@google.com>
8610
8611 * dll.h (struct dll_info): Add comment.
8612 * gdbthread.h (struct thread_info): Add comment.
8613 (current_ptid): Simplify.
8614 * inferiors.c (add_process): Update.
8615 (remove_process): Update.
8616 * inferiors.h (struct process_info): Rename member "head" to "entry".
8617 * linux-low.c (delete_lwp): Update.
8618 (add_lwp): Update.
8619 (last_thread_of_process_p): Update.
8620 (kill_one_lwp_callback, linux_kill): Update.
8621 (status_pending_p_callback): Update.
8622 (wait_for_sigstop): Update. Simplify read of ptid.
8623 (start_step_over): Update.
8624 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8625 (get_lwp_thread): Update.
8626 (struct lwp_info): Rename member "head" to "entry".
8627 * regcache.h (inferior_list_entry): Delete.
8628 * server.c (kill_inferior_callback): Update.
8629 (detach_or_kill_inferior_callback): Update.
8630 (print_started_pid): Update.
8631 (print_attached_pid): Update.
8632 (process_serial_event): Simplify read of ptid.
8633 * thread-db.c (thread_db_create_event): Update.
8634 (thread_db_get_tls_address): Update.
8635 * win32-low.c (current_inferior_ptid): Simplify.
8636
46917d26
TT
86372014-02-19 Tom Tromey <tromey@redhat.com>
8638
8639 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8640 argument.
8641 (target_supports_btrace): Update.
8642
0759a81e
YQ
86432014-02-14 Yao Qi <yao@codesourcery.com>
8644
8645 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8646 (rsp-low-ipa.o): New target.
8647
a7191e8b
TT
86482014-02-12 Tom Tromey <tromey@redhat.com>
8649
8650 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8651 convert_ascii_to_int.
8652 * regcache.c (registers_to_string): Likewise.
8653 * remote-utils.c (decode_M_packet): Likewise.
8654 * server.c (process_serial_event): Likewise.
8655
ff0e980e
TT
86562014-02-12 Tom Tromey <tromey@redhat.com>
8657
8658 * server.c (handle_query, handle_v_run): Use hex2bin, not
8659 unhexify.
8660 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8661
e9371aff
TT
86622014-02-12 Tom Tromey <tromey@redhat.com>
8663
8664 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8665 convert_int_to_ascii.
8666 * regcache.c (registers_to_string, collect_register_as_string):
8667 Likewise.
8668 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8669 Likewise.
8670 * server.c (process_serial_event): Likewise.
8671 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8672 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8673
971dc0b8
TT
86742014-02-12 Tom Tromey <tromey@redhat.com>
8675
8676 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8677 bin2hex, not hexify.
8678 * tracepoint.c (cmd_qtstatus): Likewise.
8679
0a822afb
TT
86802014-02-12 Tom Tromey <tromey@redhat.com>
8681
8682 * remote-utils.c (monitor_output): Pass explicit length to
8683 hexify.
8684
9c3d6531
TT
86852014-02-12 Tom Tromey <tromey@redhat.com>
8686
8687 * tracepoint.c: Include rsp-low.h.
8688 * server.c: Include rsp-low.h.
8689 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8690 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8691 declare.
8692 * remote-utils.c: Include rsp-low.h.
8693 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8694 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8695 (convert_int_to_ascii, convert_ascii_to_int): Move to
8696 common/rsp-low.c.
8697 * regcache.c: Include rsp-low.h.
8698 * ax.c: Include rsp-low.h.
8699 * Makefile.in (SFILES): Add common/rsp-low.c.
8700 (OBS): Add rsp-low.o.
8701 (rsp-low.o): New target.
8702
01fd3ea5
TT
87032014-02-12 Tom Tromey <tromey@redhat.com>
8704
8705 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8706 Include print-utils.h.
8707 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8708 (plongest, thirty_two, phex_nz): Remove.
8709 * Makefile.in (SFILES): Add common/print-utils.c.
8710 (OBS): Add print-utils.o.
8711 (print-utils-ipa.o): New target.
8712 (print-utils.o): New target.
8713 (IPA_OBJS): Add print-utils-ipa.o.
8714
e99dc820
TT
87152014-02-06 Tom Tromey <tromey@redhat.com>
8716
8717 * Makefile.in (SFILES): Fix indentation.
8718
ee1e2d4f
DE
87192014-02-05 Doug Evans <dje@google.com>
8720
8721 * linux-low.c (linux_wait_for_event): Improve comment.
8722 (linux_wait_1): Keep current_inferior in sync with event_child.
8723
f5a02773
DE
87242014-01-22 Doug Evans <dje@google.com>
8725
8726 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8727
87ce2a04
DE
87282014-01-22 Doug Evans <dje@google.com>
8729
8730 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8731 * configure: Regenerate.
8732 * config.in: Regenerate.
8733 * Makefile.in (SFILES): Add debug.c.
8734 (OBS): Add debug.o.
8735 * debug.c: New file.
8736 * debug.h: New file.
8737 * linux-aarch64-low.c (*): Update all debugging printfs to use
8738 debug_printf instead of fprintf.
8739 * linux-arm-low.c (*): Ditto.
8740 * linux-cris-low.c (*): Ditto.
8741 * linux-crisv32-low.c (*): Ditto.
8742 * linux-m32r-low.c (*): Ditto.
8743 * linux-sparc-low.c (*): Ditto.
8744 * linux-x86.c (*): Ditto.
8745 * linux-low.c (*): Ditto.
8746 (linux_wait_1): Add calls to debug_enter, debug_exit.
8747 (linux_wait): Remove redundant debugging printf.
8748 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8749 (linux_resume, unstop_all_lwps): Ditto.
8750 * mem-break.c (*): Update all debugging printfs to use
8751 debug_printf instead of fprintf.
8752 * remote-utils.c (*): Ditto.
8753 * thread-db.c (*): Ditto.
8754 * server.c #include <ctype.h>, "gdb_vecs.h".
8755 (debug_threads): Moved to debug.c.
8756 (*): Update all debugging printfs to use debug_printf instead of
8757 fprintf.
8758 (start_inferior): Replace call to fflush with call to debug_flush.
8759 (monitor_show_help): Mention set debug-format.
8760 (parse_debug_format_options): New function.
8761 (handle_monitor_command): Handle "monitor set debug-format".
8762 (gdbserver_usage): Mention --debug-format.
8763 (main): Parse --debug-format.
8764 * server.h (debug_threads): Declaration moved to debug.h.
8765 #include "debug.h".
8766 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8767 trace_debug_1 that uses debug_printf.
8768 (tracepoint_look_up_symbols): Update all debugging printfs to use
8769 debug_printf instead of fprintf.
8770
e671835b
BS
87712014-01-20 Baruch Siach <baruch@tkos.co.il>
8772
8773 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8774 sys/ptrace.h.
8775
b5737fa9
PA
87762014-01-17 Pedro Alves <palves@redhat.com>
8777
ea38d2a9 8778 PR build/16445
c7faa97a
PA
8779 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8780 defined after including gdb_proc_service.h.
b5737fa9 8781
40ed484e
DE
87822014-01-16 Doug Evans <dje@google.com>
8783
8784 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8785 (match_dll): Use it.
8786
969c39fb
MM
87872014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8788
8789 * target.h (target_ops) <read_btrace>: Change parameters and
8790 return type to allow error reporting.
8791 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8792 trace reading errors on.
8793 * linux-low.c (linux_low_read_btrace): Pass trace reading
8794 errors on.
8795 (linux_low_disable_btrace): New.
8796
ab7f45ba
DE
87972014-01-15 Doug Evans <dje@google.com>
8798
8799 * inferiors.c (thread_id_to_gdb_id): Delete.
8800 * inferiors.h (thread_id_to_gdb_id): Delete.
8801
66af0f44
EZ
88022014-01-13 Eli Zaretskii <eliz@gnu.org>
8803
8804 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8805 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8806 versions.
8807
9939e131
PA
88082014-01-08 Pedro Alves <palves@redhat.com>
8809
8810 * server.c (handle_status): Don't discard previous queued stop
8811 replies or thread's pending status here.
8812 (main) <disconnection>: Do it here instead.
8813
b7ea362b
PA
88142014-01-08 Pedro Alves <palves@redhat.com>
8815
8816 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8817 * server.c (visit_actioned_threads, handle_pending_status): New
8818 function.
8819 (handle_v_cont): Factor out parts to ...
8820 (resume): ... this new function. If in all-stop, and a thread
8821 being resumed has a pending status, report it without actually
8822 resuming.
8823 (myresume): Adjust to use the new 'resume' function.
8824 (clear_pending_status_callback, set_pending_status_callback)
8825 (find_status_pending_thread_callback): New functions.
8826 (handle_status): Handle the case of multiple threads having
8827 interesting statuses to report. Report threads' real last signal
8828 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8829 with an interesting thread to report the status for, instead of
8830 always reporting the status of the first thread.
8831
28498c42
JB
88322014-01-01 Joel Brobecker <brobecker@adacore.com>
8833
8834 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8835 * gdbreplay.c (gdbreplay_version): Likewise.
8836
f45c82da
YZ
88372013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8838
8839 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8840 iov.iov_len with the real length in use.
8841
379a5e2d
JB
88422013-12-13 Joel Brobecker <brobecker@adacore.com>
8843
8844 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8845 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8846 for all targets that use win32-low.c.
8847 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8848 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8849
4210d83e
PA
88502013-12-13 Pedro Alves <palves@redhat.com>
8851
8852 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8853 if equal to TARGET_WAITKIND_LOADED.
8854 * win32-low.c (cached_status): New static global.
8855 (win32_wait): Add declaration.
8856 (do_initial_child_stuff): Flush all initial pending debug events
8857 up to the initial breakpoint.
8858 (win32_wait): If CACHED_STATUS was set, return that instead
8859 of doing a real wait. Remove the code resuming the execution
8860 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8861 during the initial phase. Also remove the code changing
8862 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8863 TARGET_WAITKIND_STOPPED.
8864
e7f0d979
YQ
88652013-12-11 Yao Qi <yao@codesourcery.com>
8866
8867 * notif.c (handle_notif_ack): Return 0 if no notification
8868 matches.
8869
ebcf782c
DE
88702013-11-20 Doug Evans <dje@google.com>
8871
8872 * linux-low.c (linux_set_resume_request): Fix comment.
8873
20ad9378
DE
88742013-11-20 Doug Evans <dje@google.com>
8875
8876 * linux-low.c (resume_status_pending_p): Tweak comment.
8877
a196ebeb
WT
88782013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8879
8880 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8881 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8882 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8883 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8884 (srv_amd64_regobj): Add amd64-mpx.o.
8885 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8886 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8887 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8888 * i387-fp.c (num_pl_bnd_register) Added constant.
8889 (num_pl_bnd_cfg_registers) Added constant.
8890 (struct i387_xsave) Added reserved area and MPX fields.
8891 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8892 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8893 function.
8894 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8895 (init_registers_amd64_mpx_linux): Declare new function.
8896 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8897 (x86_64_regmap): Add MPX registers.
8898 (x86_linux_read_description): Add MPX case.
8899 (initialize_low_arch): Initialize MPX targets.
8900
0080a2f6
TT
89012013-11-18 Tom Tromey <tromey@redhat.com>
8902
8903 * configure: Rebuild.
8904 * configure.ac: Don't check for stdlib.h.
8905 * gdbreplay.c: Unconditionally include stdlib.h.
8906
2978b111
TT
89072013-11-18 Tom Tromey <tromey@redhat.com>
8908
8909 * config.in: Rebuild.
8910 * configure: Rebuild.
8911 * configure.ac: Don't use AC_HEADER_DIRENT.
8912
a3d08894
TT
89132013-11-18 Tom Tromey <tromey@redhat.com>
8914
8915 * server.h: Don't check HAVE_STRING_H.
8916 * gdbreplay.c: Don't check HAVE_STRING_H.
8917 * configure: Rebuild.
8918
0a5dd17d
TT
89192013-11-18 Tom Tromey <tromey@redhat.com>
8920
8921 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8922 LIBGNU.
8923
1bd2f0ba
TT
89242013-11-08 Tom Tromey <tromey@redhat.com>
8925
8926 * configure, config.in: Rebuild.
8927 * configure.ac: Remove unused configury.
8928
3266f10b
TT
89292013-11-08 Tom Tromey <tromey@redhat.com>
8930
8931 * acinclude.m4: Include common.m4, codeset.m4.
8932 * configure, config.in: Rebuild.
8933 * configure.ac: Use GDB_AC_COMMON.
8934
6682d959
AA
89352013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8936
8937 * linux-s390-low.c (HWCAP_S390_TE): New define.
8938 (s390_arch_setup): Consider the TE field in the HWCAP for
8939 determining 'have_regset_tdb'.
8940
fd0a4d76
SDJ
89412013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8942
8943 PR gdb/16014
8944 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8945 call to sizeof.
8946
1a3d890b
PA
89472013-10-02 Pedro Alves <palves@redhat.com>
8948
8949 * server.c (process_serial_event): Don't output "GDBserver
8950 exiting" if GDB is connected through stdio.
8951 * target.c (mywait): Likewise, be silent if GDB is connected
8952 through stdio.
8953
97ad4581
JB
89542013-10-01 Joel Brobecker <brobecker@adacore.com>
8955
8956 * lynx-low.c (lynx_add_threads_after_attach): New function.
8957 (lynx_attach): Remove call to add_thread. Add call to
8958 lynx_add_threads_after_attach instead.
8959
5b4e221c
MF
89602013-09-28 Mike Frysinger <vapier@gentoo.org>
8961
8962 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8963 * config.in, configure: Regenerated.
8964
ee47b2f8
YQ
89652013-09-18 Yao Qi <yao@codesourcery.com>
8966
8967 PR server/15959
8968 * server.c (start_inferior): Clear 'resume_info'.
8969
d6707650 89702013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8971
d6707650
JW
8972 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8973 for each register.
8974
9243dd0e 89752013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8976
9243dd0e
JW
8977 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8978 linux-tile-low.o to srv_tgtobj.
8979
c623a6ef
WN
89802013-09-16 Will Newton <will.newton@linaro.org>
8981
8982 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8983 out regs.
8984
fb71d39e
PA
89852013-09-06 Pedro Alves <palves@redhat.com>
8986
8987 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8988 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8989 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8990 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8991 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8992 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8993
8e7e9910
PA
89942013-09-06 Pedro Alves <palves@redhat.com>
8995
8996 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8997 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8998
7c3a12ca
PA
89992013-09-06 Pedro Alves <palves@redhat.com>
9000
9001 * linux-amd64-ipa.c: Include tracepoint.h.
9002 * linux-i386-ipa.c: Include tracepoint.h.
9003
8eb3d7b6
RW
90042013-09-06 Ricard Wanderlof <ricardw@axis.com>
9005
9006 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9007 (ps_get_thread_area): New function.
9008
eddddb9d
RW
90092013-09-06 Ricard Wanderlof <ricardw@axis.com>
9010
9011 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9012 (initialize_low_arch): Call init_registers_crisv32 rather than
9013 init_register_crisv32.
9014
533b0600
PA
90152013-09-05 Pedro Alves <palves@redhat.com>
9016
9017 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9018 to ...
9019 * hostio.h: ... this new file.
9020 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9021 win32-low.c: Include hostio.h.
9022
0ce3d3b5
PA
90232013-09-05 Pedro Alves <palves@redhat.com>
9024
9025 * server.h (gdb_client_data, handler_func, callback_handler_func)
9026 (delete_file_handler, add_file_handler, append_callback_event)
9027 (delete_callback_event, start_event_loop, initialize_event_loop):
9028 Move to event-loop.h and include it.
9029 * event-loop.h: New file.
9030
799cdc37
PA
90312013-09-05 Pedro Alves <palves@redhat.com>
9032
9033 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9034 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9035 (loaded_dll, unloaded_dll): Move to ...
9036 * dll.h: ... this new file.
9037 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9038
6a6bbd9d
PA
90392013-09-05 Pedro Alves <palves@redhat.com>
9040
9041 * server.h (current_process, get_thread_process, all_processes)
9042 (add_inferior_to_list, for_each_inferior, current_inferior)
9043 (remove_inferior, add_process, remove_process, find_process_pid)
9044 (have_started_inferiors_p, have_attached_inferiors_p)
9045 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9046 (clear_inferiors, find_inferior, find_inferior_id)
9047 (inferior_target_data, set_inferior_target_data)
9048 (inferior_regcache_data, set_inferior_regcache_data): Move to
9049 inferiors.h, and include it.
9050 * inferiors.h: New file.
9051
f699aaba
PA
90522013-09-05 Pedro Alves <palves@redhat.com>
9053
9054 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9055 Move ...
72f4393d 9056 * ax.h: ... here.
f699aaba 9057
c144c7a0
PA
90582013-09-05 Pedro Alves <palves@redhat.com>
9059
9060 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9061 tracepoint.h.
9062 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9063 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9064 (handle_tracepoint_general_set, handle_tracepoint_query)
9065 (tracepoint_finished_step, tracepoint_was_hit)
9066 (release_while_stepping_state_list, current_traceframe)
9067 (in_readonly_region, traceframe_read_mem)
9068 (fetch_traceframe_registers, traceframe_read_sdata)
9069 (traceframe_read_info, struct fast_tpoint_collect_status)
9070 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9071 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9072 (supply_fast_tracepoint_registers)
9073 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9074 (ipa_tdesc, claim_trampoline_space)
9075 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9076 (agent_mem_read, agent_get_trace_state_variable_value)
9077 (agent_set_trace_state_variable_value, agent_tsv_read)
9078 (agent_mem_read_string, get_raw_reg_func_addr)
9079 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9080 * tracepoint.h: ... this new file.
9081
ff42e6ab
PA
90822013-09-05 Pedro Alves <palves@redhat.com>
9083
9084 * server.h (perror_with_name, error, fatal, warning, paddress)
9085 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9086 include it.
9087 * utils.h: New file.
9088
541af0f4
PA
90892013-09-05 Pedro Alves <palves@redhat.com>
9090
9091 * server.h (remote_debug, noack_mode, transport_is_reliable)
9092 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9093 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9094 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9095 (write_enn, initialize_async_io, enable_async_io)
9096 (disable_async_io, check_remote_input_interrupt_request)
9097 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9098 (dead_thread_notify, prepare_resume_reply)
9099 (decode_address_to_semicolon, decode_address, decode_m_packet)
9100 (decode_M_packet, decode_X_packet, decode_xfer_write)
9101 (decode_search_memory_packet, unhexify, hexify)
9102 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9103 (look_up_one_symbol, relocate_instruction)
9104 (monitor_output): Move to remote-utils.h, and include it.
9105 * remote-utils.h: New file.
9106
eebdf26b
PA
91072013-09-05 Pedro Alves <palves@redhat.com>
9108
9109 * server.h (_): Delete.
9110
3aafd2ff
PA
91112013-09-02 Pedro Alves <palves@redhat.com>
9112
9113 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9114 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9115 allocated.
9116 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9117
cee83bcb
PM
91182013-09-02 Pierre Muller <muller@sourceware.org>
9119
9120 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9121 or WriteProcessMemory complete successfully and handle
9122 ERROR_PARTIAL_COPY error.
9123
9a13b2fa
PA
91242013-09-02 Pedro Alves <palves@redhat.com>
9125
9126 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9127 error instead of EIO.
9128
602e3198
JK
91292013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9130
9131 PR server/15604
9132 * linux-low.c: Include filestuff.h.
9133 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9134 * lynx-low.c: Include filestuff.h.
9135 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9136 * server.c: Include filestuff.h.
9137 (main): Call notice_open_fds.
9138 * spu-low.c: Include filestuff.h.
9139 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9140
96d7229d
LM
91412013-08-22 Luis Machado <lgustavo@codesourcery.com>
9142
9143 * Makefile.in: Explain why ../target and ../nat are not
9144 listed as include file search paths.
9145 (linux-waitpid.o): New object file rule.
9146 * configure.srv (srv_native_linux_obj): New variable.
9147 Replace all occurrences of linux native object files with
9148 $srv_native_linux_obj.
9149 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9150 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9151 (linux_enable_event_reporting): Remove declaration.
9152 (my_waitpid): Moved to common/linux-waitpid.c.
9153 (linux_wait_for_event): Pass ptid when calling
9154 linux_enable_event_reporting.
9155 (linux_supports_tracefork_flag): Remove.
9156 (linux_enable_event_reporting): Likewise.
9157 (linux_tracefork_grandchild): Remove.
9158 (STACK_SIZE): Moved to common/linux-ptrace.c.
9159 (linux_tracefork_child): Remove.
9160 (linux_test_for_tracefork): Remove.
9161 (linux_look_up_symbols): Call linux_supports_traceclone.
9162 (initialize_low): Remove call to linux_test_for_tracefork.
9163 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9164 common/linux-ptrace.h.
9165 (PTRACE_TYPE_ARG4): Likewise.
9166 Include linux-ptrace.h.
9167
32940073
PA
91682013-08-21 Pedro Alves <palves@redhat.com>
9169
9170 * config.in: Renegerate.
9171
33b60d58 91722013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9173
33b60d58
LM
9174 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9175 (SFILES): Remove $(srcdir)/common/target-common.c and
9176 add $(srcdir)/target/waitstatus.c.
9177 (OBS): Remove target-common.o and add waitstatus.o.
9178 (server_h): Remove $(srcdir)/../common/target-common.h and
9179 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9180 and $(srcdir)/../target/waitstatus.h.
9181 (target-common.o): Remove.
9182 (waitstatus.o): New target object file.
9183 * target.h: Do not include target-common.h and
9184 include target/resume.h, target/wait.h and
9185 target/waitstatus.h.
9186
b8e1b30e
LM
91872013-08-13 Luis Machado <lgustavo@codesourcery.com>
9188
9189 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9190 to PTRACE_TYPE_ARG3.
9191 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9192 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9193 PTRACE_TYPE_ARG4.
9194 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9195 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9196
7a60ad40
YQ
91972013-07-27 Jie Zhang <jie@codesourcery.com>
9198 Daniel Jacobowitz <dan@codesourcery.com>
9199 Yao Qi <yao@codesourcery.com>
9200
9201 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9202 (mips-linux-watch.o): New rule.
9203 (mips_linux_watch_h): New variable.
9204 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9205 srv_tgtobj.
9206 * linux-mips-low.c: Include mips-linux-watch.h.
9207 (struct arch_process_info, struct arch_lwp_info): New.
9208 (update_watch_registers_callback): New function.
9209 (mips_linux_new_process, mips_linux_new_thread) New functions.
9210 (mips_linux_prepare_to_resume, mips_insert_point): New
9211 functions.
9212 (mips_remove_point, mips_stopped_by_watchpoint): New
9213 functions.
9214 (rsp_bp_type_to_target_hw_bp_type): New function.
9215 (mips_stopped_data_address): New function.
9216 (the_low_target): Add watchpoint support functions.
9217
de6f69ad
YQ
92182013-07-27 Yao Qi <yao@codesourcery.com>
9219
9220 * i386-low.c: Include break-common.h.
9221 (enum target_hw_bp_type): Remove.
9222
3360c0bf
LM
92232013-07-24 Luis Machado <lgustavo@codesourcery.com>
9224
9225 * Makefile.in (SFILES): /common/target-common.c.
9226 (OBS): Add target-common.o.
9227 (server_h): Add $(srcdir)/../common/target-common.h.
9228 (target-common.o): New target.
9229 * server.c (queue_stop_reply_callback): Free
9230 status string after use.
9231 * target.c (target_waitstatus_to_string): Remove.
9232 * target.h: Include target-common.h.
9233 (resume_kind): Likewise.
9234 (target_waitkind): Likewise.
9235 (target_waitstatus): Likewise.
9236 (TARGET_WNOHANG): Likewise.
9237
bd885420
YQ
92382013-07-04 Yao Qi <yao@codesourcery.com>
9239
9240 * Makefile.in (host_alias): Use @host_noncanonical@.
9241 (target_alias): Use @target_noncanonical@.
9242 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9243 ACX_NONCANONICAL_HOST.
9244 * configure: Regenerated.
9245
9246 Revert:
9247 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9248
9249 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9250 * configure: Rebuild.
9251 * Makefile.in (version_host, version_target): Get from configure.
9252 (version.c): Use $(version_host) and $(version_target).
9253
17ef446e
PA
92542013-07-03 Pedro Alves <palves@redhat.com>
9255
9256 * Makefile.in (config.status): Depend on development.sh.
9257 * acinclude.m4: Include libmcheck.m4.
9258 * configure: Regenerate.
9259
7a9a7487
MG
92602013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9261
9262 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9263 attribute inside the parentheses.
9264 (winapi_DebugSetProcessKillOnExit): Ditto.
9265 (winapi_DebugBreakProcess): Ditto.
9266 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9267
49b64de6
MG
92682013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9269
9270 * notif.h (notif_event): Add a dummy member to avoid compiler
9271 errors.
9272
d5749ee7
PA
92732013-07-01 Pedro Alves <palves@redhat.com>
9274
9275 * hostio.c (HOSTIO_PATH_MAX): Define.
9276 (require_filename, handle_open, handle_unlink, handle_readlink):
9277 Use it.
9278
d8d2a3ee
PA
92792013-07-01 Pedro Alves <palves@redhat.com>
9280
9281 * server.h: Include "pathmax.h".
9282 * linux-low.c: Don't include sys/param.h.
9283 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9284 MAXPATHLEN.
9285 * win32-low.c: Don't include sys/param.h.
9286 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9287
bc7dea8d
PA
92882013-07-01 Pedro Alves <palves@redhat.com>
9289
9290 * event-loop.c: Don't check HAVE_UNISTD_H before including
9291 <unistd.h>.
9292 * gdbreplay.c: Likewise.
9293 * remote-utils.c: Likewise.
9294 * server.c: Likewise.
9295 * configure.ac: Don't check for unistd.h.
9296 * configure: Regenerate.
9297
d6c2da54
TT
92982013-06-28 Tom Tromey <tromey@redhat.com>
9299
9300 * Makefile.in (version.c): Use version.in, not
9301 common/version.in.
9302
257b6bec
MG
93032013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9304
9305 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9306 * configure: Rebuild.
9307 * Makefile.in (version_host, version_target): Get from configure.
9308 (version.c): Use $(version_host) and $(version_target).
9309
86ebe149
DK
93102013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9311
9312 Fix trace-status to output user name without trailing colon.
9313 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9314
f30aa5af
DK
93152013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9316
9317 Fix trace-status to output proper start-time and stop-time.
9318 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9319 output start time and stop time in hex as gdb expects.
9320
28a93511
YQ
93212013-06-26 Pedro Alves <pedro@codesourcery.com>
9322
9323 * tracepoint.c (build_traceframe_info_xml): Output trace state
9324 variables present in the trace buffer.
9325
01208463
TT
93262013-06-24 Tom Tromey <tromey@redhat.com>
9327
9328 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9329 create-version.sh.
9330 (version.o): Remove.
9331 * gdbreplay.c: Include version.h.
9332 (version, host_name): Don't declare.
9333 * server.h: Include version.h.
9334 (version, host_name): Don't declare.
9335
760256f9
PA
93362013-06-12 Pedro Alves <palves@redhat.com>
9337
9338 * linux-x86-low.c (linux_is_elf64): Delete global.
9339 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9340 with local linux_pid_exe_is_elf_64_file use.
9341
030031ee
PA
93422013-06-11 Pedro Alves <palves@redhat.com>
9343
9344 * linux-low.c (regset_disabled, disable_regset): New functions.
9345 (regsets_fetch_inferior_registers)
9346 (regsets_store_inferior_registers): Use them.
9347 (initialize_regsets_info); Don't allocate the disabled_regsets
9348 array here.
9349 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9350 comment.
9351
5da6eb0a
PA
93522013-06-11 Pedro Alves <palves@redhat.com>
9353
9354 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9355 xmalloc.
9356
7e5aaa09
PA
93572013-06-11 Pedro Alves <palves@redhat.com>
9358
9359 * linux-x86-low.c (initialize_low_arch): Call
9360 init_registers_x32_avx_linux.
9361
d878444c
JK
93622013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9363
9364 Fix compatibility with Android Bionic.
9365 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9366 it is not empty.
9367
3aee8918
PA
93682013-06-07 Pedro Alves <palves@redhat.com>
9369
5f2b57b5 9370 PR server/14823
3aee8918
PA
9371 * Makefile.in (OBS): Add tdesc.o.
9372 (IPA_OBJS): Add tdesc-ipa.o.
9373 (tdesc-ipa.o): New rule.
9374 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9375 interface.
9376 * linux-low.c (new_inferior): Delete.
9377 (disabled_regsets, num_regsets): Delete.
9378 (linux_add_process): Adjust to set the new per-process
9379 new_inferior flag.
9380 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9381 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9382 was a stop. When calling arch_setup, switch the current inferior
9383 to the thread that got an event.
9384 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9385 (regsets_fetch_inferior_registers)
9386 (regsets_store_inferior_registers): New regsets_info parameter.
9387 Adjust to use it.
9388 (linux_register_in_regsets): New regs_info parameter. Adjust to
9389 use it.
9390 (register_addr, fetch_register, store_register): New usrregs_info
9391 parameter. Adjust to use it.
9392 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9393 parameter regs_info. Adjust to use it.
9394 (linux_fetch_registers): Get the current inferior's regs_info, and
9395 adjust to use it.
9396 (linux_store_registers): Ditto.
9397 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9398 (initialize_low): Don't initialize the target_regsets here. Call
9399 initialize_low_arch.
9400 * linux-low.h (target_regsets): Delete declaration.
9401 (struct regsets_info): New.
9402 (struct usrregs_info): New.
9403 (struct regs_info): New.
9404 (struct process_info_private) <new_inferior>: New field.
9405 (struct linux_target_ops): Delete the num_regs, regmap, and
9406 regset_bitmap fields. New field regs_info.
9407 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9408 * i387-fp.c (num_xmm_registers): Delete.
9409 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9410 calls to new interface.
9411 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9412 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9413 Infer the number of xmm registers from the regcache's target
9414 description.
9415 * i387-fp.h (num_xmm_registers): Delete.
9416 * inferiors.c (add_thread): Don't install the thread's regcache
9417 here.
9418 * proc-service.c (gregset_info): Fetch the current inferior's
9419 regs_info. Adjust to use it.
9420 * regcache.c: Include tdesc.h.
9421 (register_bytes, reg_defs, num_registers)
9422 (gdbserver_expedite_regs): Delete.
9423 (get_thread_regcache): If the thread doesn't have a regcache yet,
9424 create one, instead of aborting gdbserver.
9425 (regcache_invalidate_one): Rename to ...
9426 (regcache_invalidate_thread): ... this.
9427 (regcache_invalidate_one): New.
9428 (regcache_invalidate): Only invalidate registers of the current
9429 process.
9430 (init_register_cache): Add target_desc parameter, and use it.
9431 (new_register_cache): Ditto. Assert the target description has a
9432 non zero registers_size.
9433 (regcache_cpy): Add assertions. Adjust.
9434 (realloc_register_cache, set_register_cache): Delete.
9435 (registers_to_string, registers_from_string): Adjust.
9436 (find_register_by_name, find_regno, find_register_by_number)
9437 (register_cache_size): Add target_desc parameter, and use it.
9438 (free_register_cache_thread, free_register_cache_thread_one)
9439 (regcache_release, register_cache_size): New.
9440 (register_size): Add target_desc parameter, and use it.
9441 (register_data, supply_register, supply_register_zeroed)
9442 (supply_regblock, supply_register_by_name, collect_register)
9443 (collect_register_as_string, collect_register_by_name): Adjust.
9444 * regcache.h (struct target_desc): Forward declare.
9445 (struct regcache) <tdesc>: New field.
9446 (init_register_cache, new_register_cache): Add target_desc
9447 parameter.
9448 (regcache_invalidate_thread): Declare.
9449 (regcache_invalidate_one): Delete declaration.
9450 (regcache_release): Declare.
9451 (find_register_by_number, register_cache_size, register_size)
9452 (find_regno): Add target_desc parameter.
9453 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9454 declarations.
9455 * remote-utils.c: Include tdesc.h.
9456 (outreg, prepare_resume_reply): Adjust.
9457 * server.c: Include tdesc.h.
9458 (gdbserver_xmltarget): Delete declaration.
9459 (get_features_xml, process_serial_event): Adjust.
9460 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9461 declare.
9462 (struct process_info) <tdesc>: New field.
9463 (ipa_tdesc): Declare.
9464 * tdesc.c: New file.
9465 * tdesc.h: New file.
9466 * tracepoint.c: Include tdesc.h.
9467 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9468 (get_context_regcache): Adjust to pass ipa_tdesc down.
9469 (do_action_at_tracepoint): Adjust to get the register cache size
9470 from the context regcache's description.
9471 (traceframe_walk_blocks): Adjust to get the register cache size
9472 from the current trace frame's description.
9473 (traceframe_get_pc): Adjust to get current trace frame's
9474 description and pass it down.
9475 (gdb_collect): Adjust to get the register cache size from the
9476 IPA's description.
9477 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9478 (gdbserver_xmltarget): Delete.
9479 (initialize_low_tracepoint): Set the ipa's target description.
9480 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9481 (initialize_low_tracepoint): Set the ipa's target description.
9482 * linux-x86-low.c: Include tdesc.h.
9483 [__x86_64__] (is_64bit_tdesc): New.
9484 (ps_get_thread_area, x86_get_thread_area): Use it.
9485 (i386_cannot_store_register): Rename to ...
9486 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9487 (i386_cannot_fetch_register): Rename to ...
9488 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9489 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9490 to new interface.
9491 (target_regsets): Rename to ...
9492 (x86_regsets): ... this.
9493 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9494 interface.
9495 (x86_siginfo_fixup): Use is_64bit_tdesc.
9496 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9497 (tdesc_x32_avx_linux, tdesc_x32_linux)
9498 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9499 Declare.
9500 (x86_linux_update_xmltarget): Delete.
9501 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9502 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9503 (AMD64_LINUX_USER64_CS): New.
9504 (x86_linux_read_description): New, based on
9505 x86_linux_update_xmltarget.
9506 (same_process_callback): New.
9507 (x86_arch_setup_process_callback): New.
9508 (x86_linux_update_xmltarget): New.
9509 (x86_regsets_info): New.
9510 (amd64_linux_regs_info): New.
9511 (i386_linux_usrregs_info): New.
9512 (i386_linux_regs_info): New.
9513 (x86_linux_regs_info): New.
9514 (x86_arch_setup): Reimplement.
9515 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9516 (x86_emit_ops): Ditto.
9517 (the_low_target): Adjust. Install x86_linux_regs_info,
9518 x86_cannot_fetch_register, and x86_cannot_store_register.
9519 (initialize_low_arch): New.
9520 * linux-ia64-low.c (tdesc_ia64): Declare.
9521 (ia64_fetch_register): Adjust.
9522 (ia64_usrregs_info, regs_info): New globals.
9523 (ia64_regs_info): New function.
9524 (the_low_target): Adjust.
9525 (initialize_low_arch): New function.
9526 * linux-sparc-low.c (tdesc_sparc64): Declare.
9527 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9528 Adjust.
9529 (sparc_arch_setup): New function.
9530 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9531 (the_low_target): Adjust.
9532 (initialize_low_arch): New function.
9533 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9534 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9535 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9536 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9537 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9538 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9539 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9540 (tdesc_powerpc_isa205_vsx64l): Declare.
9541 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9542 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9543 (ppc_set_pc, ppc_get_hwcap): Adjust.
9544 (ppc_usrregs_info): Forward declare.
9545 (!__powerpc64__) ppc_regmap_adjusted: New global.
9546 (ppc_arch_setup): Adjust to the current process'es target
9547 description.
9548 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9549 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9550 (ppc_store_evrregset): Adjust.
9551 (target_regsets): Rename to ...
9552 (ppc_regsets): ... this, and make static.
9553 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9554 (ppc_regs_info): New function.
9555 (the_low_target): Adjust.
9556 (initialize_low_arch): New function.
9557 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9558 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9559 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9560 (tdesc_s390x_linux64v2): Declare.
9561 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9562 (s390_fill_gregset, s390_store_last_break): Adjust.
9563 (target_regsets): Rename to ...
9564 (s390_regsets): ... this, and make static.
9565 (s390_get_pc, s390_set_pc): Adjust.
9566 (s390_get_hwcap): New target_desc parameter, and use it.
9567 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9568 (s390_arch_setup): Adjust to set the current process'es target
9569 description. Don't adjust the regmap.
9570 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9571 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9572 (regs_info_3264): New globals.
9573 (s390_regs_info): New function.
9574 (the_low_target): Adjust.
9575 (initialize_low_arch): New function.
9576 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9577 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9578 [__mips64] (init_registers_mips_linux)
9579 (init_registers_mips_dsp_linux): Delete defines.
9580 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9581 (have_dsp): New global.
9582 (mips_read_description): New, based on mips_arch_setup.
9583 (mips_arch_setup): Reimplement.
9584 (get_usrregs_info): New function.
9585 (mips_cannot_fetch_register, mips_cannot_store_register)
9586 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9587 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9588 (target_regsets): Rename to ...
9589 (mips_regsets): ... this, and make static.
9590 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9591 (dsp_regs_info, regs_info): New globals.
9592 (mips_regs_info): New function.
9593 (the_low_target): Adjust.
9594 (initialize_low_arch): New function.
9595 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9596 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9597 Declare.
9598 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9599 (arm_read_description): New, with bits factored from
9600 arm_arch_setup.
9601 (arm_arch_setup): Reimplement.
9602 (target_regsets): Rename to ...
9603 (arm_regsets): ... this, and make static.
9604 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9605 (arm_regs_info): New function.
9606 (the_low_target): Adjust.
9607 (initialize_low_arch): New function.
9608 * linux-m68k-low.c (tdesc_m68k): Declare.
9609 (target_regsets): Rename to ...
9610 (m68k_regsets): ... this, and make static.
9611 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9612 (m68k_regs_info): New function.
9613 (m68k_arch_setup): New function.
9614 (the_low_target): Adjust.
9615 (initialize_low_arch): New function.
9616 * linux-sh-low.c (tdesc_sharch): Declare.
9617 (target_regsets): Rename to ...
9618 (sh_regsets): ... this, and make static.
9619 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9620 (sh_regs_info, sh_arch_setup): New functions.
9621 (the_low_target): Adjust.
9622 (initialize_low_arch): New function.
9623 * linux-bfin-low.c (tdesc_bfin): Declare.
9624 (bfin_arch_setup): New function.
9625 (bfin_usrregs_info, regs_info): New globals.
9626 (bfin_regs_info): New function.
9627 (the_low_target): Adjust.
9628 (initialize_low_arch): New function.
9629 * linux-cris-low.c (tdesc_cris): Declare.
9630 (cris_arch_setup): New function.
9631 (cris_usrregs_info, regs_info): New globals.
9632 (cris_regs_info): New function.
9633 (the_low_target): Adjust.
9634 (initialize_low_arch): New function.
9635 * linux-cris-low.c (tdesc_crisv32): Declare.
9636 (cris_arch_setup): New function.
9637 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9638 (cris_regs_info): New function.
9639 (the_low_target): Adjust.
9640 (initialize_low_arch): New function.
9641 * linux-m32r-low.c (tdesc_m32r): Declare.
9642 (m32r_arch_setup): New function.
9643 (m32r_usrregs_info, regs_info): New globals.
9644 (m32r_regs_info): Adjust.
9645 (initialize_low_arch): New function.
9646 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9647 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9648 (tic6x_usrregs_info): Forward declare.
9649 (tic6x_read_description): New function, based on ...
9650 (tic6x_arch_setup): ... this. Reimplement.
9651 (target_regsets): Rename to ...
9652 (tic6x_regsets): ... this, and make static.
9653 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9654 (tic6x_regs_info): New function.
9655 (the_low_target): Adjust.
9656 (initialize_low_arch): New function.
9657 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9658 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9659 (target_regsets): Rename to ...
9660 (xtensa_regsets): ... this, and make static.
9661 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9662 globals.
9663 (xtensa_arch_setup, xtensa_regs_info): New functions.
9664 (the_low_target): Adjust.
9665 (initialize_low_arch): New function.
9666 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9667 (nios2_arch_setup): Set the current process'es tdesc.
9668 (target_regsets): Rename to ...
9669 (nios2_regsets): ... this.
9670 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9671 (nios2_regs_info): New function.
9672 (the_low_target): Adjust.
9673 (initialize_low_arch): New function.
a261b8f5
PA
9674 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9675 (aarch64_arch_setup): Set the current process'es tdesc.
9676 (target_regsets): Rename to ...
9677 (aarch64_regsets): ... this.
9678 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9679 (aarch64_regs_info): New function.
9680 (the_low_target): Adjust.
9681 (initialize_low_arch): New function.
3aee8918
PA
9682 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9683 globals.
9684 (target_regsets): Rename to ...
9685 (tile_regsets): ... this.
9686 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9687 (tile_regs_info): New function.
9688 (tile_arch_setup): Set the current process'es tdesc.
9689 (the_low_target): Adjust.
9690 (initialize_low_arch): New function.
9691 * spu-low.c (tdesc_spu): Declare.
9692 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9693 * win32-arm-low.c (tdesc_arm): Declare.
9694 (arm_arch_setup): New function.
9695 (the_low_target): Install arm_arch_setup instead of
9696 init_registers_arm.
9697 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9698 (init_windows_x86): Rename to ...
9699 (i386_arch_setup): ... this. Set `win32_tdesc'.
9700 (the_low_target): Adjust.
9701 * win32-low.c (win32_tdesc): New global.
9702 (child_add_thread): Don't create the thread cache here.
9703 (do_initial_child_stuff): Set the new process'es tdesc.
9704 * win32-low.h (struct target_desc): Forward declare.
9705 (win32_tdesc): Declare.
9706 * lynx-i386-low.c (tdesc_i386): Declare global.
9707 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9708 * lynx-low.c (lynx_tdesc): New global.
9709 (lynx_add_process): Set the new process'es tdesc.
9710 * lynx-low.h (struct target_desc): Forward declare.
9711 (lynx_tdesc): Declare global.
9712 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9713 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9714 * nto-low.c (nto_tdesc): New global.
9715 (do_attach): Set the new process'es tdesc.
9716 * nto-low.h (struct target_desc): Forward declare.
9717 (nto_tdesc): Declare.
9718 * nto-x86-low.c (tdesc_i386): Declare.
9719 (nto_x86_arch_setup): Set `nto_tdesc'.
9720
b1fbec62
GB
97212013-06-04 Gary Benson <gbenson@redhat.com>
9722
9723 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9724 to qSupported response when appropriate.
9725 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9726 with nonzero-length annex.
9727 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9728 arguments supplied in annex.
9729
d1ec4ce7
DE
97302013-05-31 Doug Evans <dje@google.com>
9731
ac44adcb 9732 PR server/15594
d1ec4ce7
DE
9733 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9734 64 bits in 64-cross-32 environment.
9735
9b25f2d3
PA
97362013-05-28 Pedro Alves <palves@redhat.com>
9737
9738 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9739 (aarch64-without-fpu.c): Delete rule.
9740 * configure.srv (aarch64*-*-linux*): Remove references to
9741 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9742 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9743 declaration.
9744
6740dc9c
PA
97452013-05-24 Pedro Alves <palves@redhat.com>
9746
9747 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9748 instead of strchr/decode_address. Error if the range isn't split
9749 with a ','. Don't assume there's be a ':' in the action.
9750
c2d6af84
PA
97512013-05-23 Yao Qi <yao@codesourcery.com>
9752 Pedro Alves <palves@redhat.com>
9753
9754 * linux-low.c (lwp_in_step_range): New function.
9755 (linux_wait_1): If the thread was range stepping and stopped
9756 outside the stepping range, report the stop to GDB. Otherwise,
9757 continue stepping. Add range stepping debug output.
9758 (linux_set_resume_request): Copy the step range from the resume
9759 request to the lwp.
9760 (linux_supports_range_stepping): New.
9761 (linux_target_ops) <supports_range_stepping>: Set to
9762 linux_supports_range_stepping.
9763 * linux-low.h (struct linux_target_ops)
9764 <supports_range_stepping>: New field.
9765 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9766 * linux-x86-low.c (x86_supports_range_stepping): New.
9767 (the_low_target) <supports_range_stepping>: Set to
9768 x86_supports_range_stepping.
9769 * server.c (handle_v_cont): Handle 'r' action.
9770 (handle_v_requests): Append ";r" if the target supports range
9771 stepping.
9772 * target.h (struct thread_resume) <step_range_start,
9773 step_range_end>: New fields.
9774 (struct target_ops) <supports_range_stepping>:
9775 New field.
9776 (target_supports_range_stepping): New macro.
9777
58794e1a
JB
97782013-05-17 Joel Brobecker <brobecker@adacore.com>
9779
9780 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9781 confusion in comment.
9782
d631c5a7
JB
97832013-05-17 Joel Brobecker <brobecker@adacore.com>
9784
9785 * lynx-low.c (struct process_info_private): New type.
9786 (lynx_add_process): New function.
9787 (lynx_create_inferior, lynx_attach): Replace calls to
9788 add_process by calls to lynx_add_process.
9789 (lynx_resume): If PTID is null, then try using
9790 current_process()->private->last_wait_event_ptid.
9791 Add comments.
9792 (lynx_clear_inferiors): Delete. The contents of that function
9793 has been inlined in lynx_mourn;
9794 (lynx_wait_1): Save the ptid in the process's private data.
9795 (lynx_mourn): Free the process' private data. Replace call
9796 to lynx_clear_inferiors by call to clear_inferiors.
9797
96f7a20f
YQ
97982013-05-17 Yao Qi <yao@codesourcery.com>
9799
9800 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9801 the right place.
9802
db0dfaa0
LM
98032013-05-16 Luis Machado <lgustavo@codesourcery.com>
9804
9805 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9806 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9807 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9808 PT_TEXT_END_ADDR guards. Update comments.
9809 (linux_target_op) <read_offsets>: Conditionally define to
9810 linux_read_offsets if the target is UCLIBC and if it defines
9811 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9812
68f5f838
SL
98132013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9814 Andrew Jenner <andrew@codesourcery.com>
9815
9816 * Makefile.in (SFILES): Add linux-nios2-low.c.
9817 (clean): Add action to delete nios2-linux.c.
9818 (nios2-linux.c): New rule.
9819 * configure.srv: Add nios2*-*-linux*.
9820 * linux-nios2-low.c: New.
9821
1ebff1fd
HAQ
98222013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9823
9824 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9825
f6150862
HZ
98262013-04-25 Hui Zhu <hui@codesourcery.com>
9827
9828 PR gdb/15186
f6150862
HZ
9829 * ax.c (ax_printf): Add fflush.
9830
614c279d
TT
98312013-04-22 Tom Tromey <tromey@redhat.com>
9832
9833 * Makefile.in (SFILES): Add filestuff.c.
9834 (OBS): Add filestuff.o.
9835 (filestuff.o): New target.
9836 * config.in, configure: Rebuild.
9837 * configure.ac: Check for fdwalk, pipe2.
9838
7d4e5717
PA
98392013-04-17 Pedro Alves <palves@redhat.com>
9840
9841 * configure.ac (USE_THREAD_DB): Delete variable.
9842 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9843 Don't AC_SUBST USE_THREAD_DB.
9844 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9845 * config.in, configure: Regenerate.
9846
d5c93e41
PA
98472013-04-16 Pedro Alves <palves@redhat.com>
9848
9849 * linux-low.h (struct lwp_info) <thread_known>: Move under
9850 the USE_THREAD_DB #ifdef.
9851
04f5fe89
PA
98522013-04-16 Pedro Alves <palves@redhat.com>
9853
9854 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9855 (linux-low.o): Delete rule.
9856 * linux-low.h: Always include "gdb_thread_db.h" instead of
9857 conditionally including thread_db.h.
9858 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9859 HAVE_THREAD_DB_H.
9860
480b27bf
JK
98612013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9862
9863 * Makefile.in (install-only): Fix make install regression.
9864
43662968
JK
98652013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9866
9867 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9868 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9869 installation.
9870 * gdbserver.1: Remove.
9871
3e74e146
PA
98722013-03-22 Pedro Alves <palves@redhat.com>
9873
9874 * linux-low.c (handle_extended_wait): Don't call
9875 linux_enable_event_reporting.
9876
a8347a2a
TT
98772013-03-15 Tony Theodore <tonyt@logyst.com>
9878
9879 PR build/9098:
9880 * Makefile.in (SHELL): Use @SHELL@.
9881
eeb56fa7
SDJ
98822013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9883
9884 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9885 compiler warning.
9886
4fa7e2ff
JB
98872013-03-13 Joel Brobecker <brobecker@adacore.com>
9888
9889 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9890 Remove extraneous NULL element.
9891
8ddb1965
YQ
98922013-03-13 Yao Qi <yao@codesourcery.com>
9893
9894 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9895 'V' block in trace frame.
9896
9accd112
MM
98972013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9898
9899 * target.h (struct target_ops): Add btrace ops.
9900 (target_supports_btrace): New macro.
9901 (target_enable_btrace): New macro.
9902 (target_disable_btrace): New macro.
9903 (target_read_btrace): New macro.
9904 * gdbthread.h (struct thread_info): Add btrace field.
9905 * server.c: Include btrace-common.h.
9906 (handle_btrace_general_set): New function.
9907 (handle_btrace_enable): New function.
9908 (handle_btrace_disable): New function.
9909 (handle_general_set): Call handle_btrace_general_set.
9910 (handle_qxfer_btrace): New function.
9911 (struct qxfer qxfer_packets[]): Add btrace entry.
9912 * inferiors.c (remove_thread): Disable btrace.
9913 * linux-low: Include linux-btrace.h.
9914 (linux_low_enable_btrace): New function.
9915 (linux_low_read_btrace): New function.
9916 (linux_target_ops): Add btrace ops.
9917 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9918 Add srv_linux_btrace=yes.
9919 (x86_64-*-linux*): Add linux-btrace.o.
9920 Add srv_linux_btrace=yes.
9921 * configure.ac: Define HAVE_LINUX_BTRACE.
9922 * config.in: Regenerated.
9923 * configure: Regenerated.
9924
5cc22e4c
MM
99252013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9926
9927 * server.c (handle_qxfer): Preserve error message if -3 is
9928 returned.
9929 (qxfer): Document the -3 return value.
9930
7c97f91e
MM
99312013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9932
9933 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9934 (linux_btrace_h): New variable.
9935 (linux-btrace.o): New rule.
9936
be9a119c 99372013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9938 Hafiz Abid Qadeer <abidh@codesourcery.com>
9939
9940 * tracepoint.c (trace_buffer_size): New global.
9941 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9942 (init_trace_buffer): Change to one-argument function. Allocate
9943 trace buffer memory.
9944 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9945 handle QTBuffer:size packet.
9946 (cmd_bigqtbuffer_size): New function.
9947 (initialize_tracepoint): Call init_trace_buffer with
9948 DEFAULT_TRACE_BUFFER_SIZE.
9949 * server.c (handle_query): Add QTBuffer:size in the
9950 supported packets.
9951
e64f7499
YQ
99522013-03-07 Yao Qi <yao@codesourcery.com>
9953
9954 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9955 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9956 of -1.
9957 (cmd_qtsp): Adjust condition. Do post increment.
9958 Set cur_action and cur_step_action back to 0.
9959
f0ae6fc3
PA
99602013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9961
9962 PR server/15236
9963 * linux-low.c (linux_write_memory): Return early success if LEN is
9964 zero.
9965
b5b0b0af
CV
99662013-03-05 Corinna Vinschen <vinschen@redhat.de>
9967
334ad4a8 9968 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9969
589bc927
TT
99702013-02-28 Tom Tromey <tromey@redhat.com>
9971
9972 * configure.ac: Invoke AC_SYS_LARGEFILE.
9973 * configure, config.in: Rebuild.
9974
dfe07582
CV
99752013-02-28 Corinna Vinschen <vinschen@redhat.com>
9976
9977 * win32-low.c: Throughout, fix format strings and casts of
9978 printf-like functions to avoid type related warnings on all
9979 platforms.
9980 (get_child_debug_event): Print dwDebugEventCode as hex since
9981 that's how it's usually documented.
9982
736cd585
YQ
99832013-02-28 Yao Qi <yao@codesourcery.com>
9984
9985 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9986 pulongest.
9987
e1f58301
JW
99882013-02-27 Jiong Wang <jiwang@tilera.com>
9989
9990 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9991 (reg-tilegx32.c): New rule.
9992 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9993 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9994 different register info initializer according to elf class.
9995 (init_registers_tilgx32): New function. The tilegx32 register info
9996 initializer.
9997 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9998 (tile_store_gregset): Likewise.
9999
d171ca78
YQ
100002013-02-27 Yao Qi <yao@codesourcery.com>
10001
10002 * server.c (process_point_options): Print debug message when
10003 debug_threads is true.
10004
282bbdf3
YQ
100052013-02-26 Yao Qi <yao@codesourcery.com>
10006
10007 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10008
aca22551
PA
100092013-02-19 Pedro Alves <palves@redhat.com>
10010 Kai Tietz <ktietz@redhat.com>
10011
10012 PR gdb/15161
10013
10014 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10015 instead of strtoul to extract address from packet.
10016 (process_serial_event) <'z'>: Likewise.
10017
4f3cee1c
YQ
100182013-02-18 Yao Qi <yao@codesourcery.com>
10019
10020 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10021
8e1d55a3
PA
100222013-02-14 Pedro Alves <palves@redhat.com>
10023
10024 Plug memory leak.
10025
10026 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10027 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10028
458820da
PA
100292013-02-14 Pedro Alves <palves@redhat.com>
10030
10031 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10032
baea0dae
PA
100332013-02-14 Pedro Alves <palves@redhat.com>
10034
10035 * tracepoint.c (save_string): Delete.
10036 (add_tracepoint_action): Use savestring instead of save_string.
10037
0b1afbb3
PA
100382013-02-12 Pedro Alves <palves@redhat.com>
10039
10040 * linux-xtensa-low.c: Ditto.
10041 * xtensa-xtregs.c: Ditto.
10042
8a4ac37e
PA
100432013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10044
10045 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10046 thread_db.
10047
148de6bb
MS
100482013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10049
10050 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10051 aarch64_num_wp_regs and aarch64_num_bp_regs to
10052 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10053
55fac6e0
MS
100542013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10055
10056 * linux-aarch64-low.c (ps_get_thread_area): Replace
10057 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10058
176eb98c
MS
100592013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10060 Marcus Shawcroft <marcus.shawcroft@arm.com>
10061 Nigel Stephens <nigel.stephens@arm.com>
10062 Yufeng Zhang <yufeng.zhang@arm.com>
10063
10064 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10065 (aarch64.c, aarch64-without-fpu.c): New targets.
10066 * configure.srv (aarch64*-*-linux*): New.
10067 * linux-aarch64-low.c: New file.
10068
56f7af9c
MS
100692013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10070
43aaf8b6 10071 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10072 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10073 (dequeue_one_deferred_signal, linux_resume_one_thread)
10074 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10075 (linux_tracefork_grandchild, linux_test_for_tracefork)
10076 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10077 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10078 where the argument is 0.
10079
60f662b0
YQ
100802013-01-25 Yao Qi <yao@codesourcery.com>
10081
10082 * event-loop.c: Include "queue.h".
10083 (gdb_event_p): New typedef.
10084 (struct gdb_event) <next_event>: Remove.
10085 (event_queue): Change to QUEUE(gdb_event_p).
10086 (async_queue_event): Remove.
10087 (gdb_event_xfree): New.
10088 (initialize_event_loop): New.
10089 (process_event): Use API from QUEUE.
10090 (wait_for_event): Likewise.
10091 * server.c (main): Call initialize_event_loop.
10092 * server.h (initialize_event_loop): Declare.
10093
5ae4861a
YQ
100942013-01-18 Yao Qi <yao@codesourcery.com>
10095
10096 * ax.h (struct eval_agent_expr_context): New.
10097 (gdb_eval_agent_expr): Update declaration.
10098 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10099 TFRAME. Add new argument CTX.
10100 * server.h (struct eval_agent_expr_context): Declare.
10101 (agent_mem_read, agent_tsv_read): Update declaration.
10102 (agent_mem_read_string): Likewise.
10103 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10104 (add_traceframe_block): Add new argument TPOINT.
10105 Increase TPOINT->traceframe_usage.
10106 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10107 eval_tracepoint_agent_expr.
10108 (condition_true_at_tracepoint): Likewise.
10109 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10110 (agent_mem_read_string, agent_tsv_read): Likewise.
10111
85e00e85
YQ
101122013-01-16 Yao Qi <yao@codesourcery.com>
10113
10114 * linux-low.c (linux_resume_one_lwp): Don't check
10115 'lwp->bp_reinsert != 0'.
10116
4039cf45
JB
101172013-01-07 Joel Brobecker <brobecker@adacore.com>
10118 Pedro Alves <palves@redhat.com>
10119
10120 * lynx-low.c (ptrace_request_to_str): Define a temporary
10121 macro and use it to simplify this function's implementation.
10122
9044dee2
JB
101232013-01-07 Joel Brobecker <brobecker@adacore.com>
10124
10125 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10126 sets errno.
10127
e6352c8f
JB
101282013-01-07 Joel Brobecker <brobecker@adacore.com>
10129
10130 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10131
50681a27
JB
101322013-01-07 Joel Brobecker <brobecker@adacore.com>
10133
10134 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10135
3f6e77ef
JB
101362013-01-07 Joel Brobecker <brobecker@adacore.com>
10137
10138 * lynx-low.c (lynx_resume): Use the resume_info parameter
10139 to determine the ptid for the lynx_ptrace call, unless
10140 it is equal to minus_one_ptid, in which case we use the
10141 ptid of the current_inferior.
10142 (lynx_wait_1): After having received a thread create/exit
10143 event, resume the inferior's execution using the signaling
10144 thread's ptid, rather than the old ptid.
10145
7fda33ae
JB
101462013-01-07 Joel Brobecker <brobecker@adacore.com>
10147
10148 * lynx-low.c (lynx_resume): Delete variable ret.
10149
b9786c74
JB
101502013-01-01 Joel Brobecker <brobecker@adacore.com>
10151
10152 * gdbreplay.c (gdbreplay_version): Update copyright year.
10153 * server.c (gdbserver_version): Likewise.
10154
8b93d60f
JB
101552012-12-17 Joel Brobecker <brobecker@adacore.com>
10156
10157 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10158 new thread.
10159
037335a7
JB
101602012-12-17 Joel Brobecker <brobecker@adacore.com>
10161
10162 * lynx-low.c (ptrace_request_to_str): Add handling for
10163 PTRACE_GETTRACESIG.
10164
52d4cbd8
JB
101652012-12-17 Joel Brobecker <brobecker@adacore.com>
10166
10167 * lynx-low.c (lynx_attach): Delete variable new_process.
10168
ab8f6ca9
JB
101692012-12-17 Joel Brobecker <brobecker@adacore.com>
10170
10171 * lynx-low.c (lynx_create_inferior): Delete variable
10172 new_process.
10173
78cbc024
JB
101742012-12-17 Joel Brobecker <brobecker@adacore.com>
10175
10176 * lynx-low.c (ptrace_request_to_str): Do not handle
10177 PTRACE_GETTHREADLIST if this macro does not exist.
10178
14a00470
YQ
101792012-12-15 Yao Qi <yao@codesourcery.com>
10180
10181 * Makefile.in (OBS): Add notif.o.
10182 * notif.c, notif.h: New.
10183 * server.c: Include "notif.h".
10184 (struct vstop_notif) <next>: Remove.
10185 <base>: New field.
10186 (queue_stop_reply): Update.
10187 (push_event, send_next_stop_reply): Remove.
10188 (discard_queued_stop_replies): Update.
10189 (notif_stop): New variable.
10190 (handle_v_stopped): Remove.
10191 (handle_v_requests): Don't call handle_v_stopped. Call
10192 handle_ack_notif instead.
10193 (queue_stop_reply_callback): Call notif_event_enque instead
10194 of queue_stop_reply.
10195 (handle_status): Don't call send_next_stop_reply, call
10196 notif_write_event instead.
10197 (kill_inferior_callback): Likewise.
10198 (detach_or_kill_inferior_callback): Likewise.
10199 (main): Call initialize_notif.
10200 (process_serial_event): Call QUEUE_is_empty.
10201 (handle_target_event): Call notif_push instead of push event.
10202 * server.h (push_event): Remove declaration.
10203
61c125b9
TT
102042012-12-10 Tom Tromey <tromey@redhat.com>
10205
10206 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10207 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10208 macros.
10209 (.c.o): Rewrite.
10210 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10211 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10212 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10213 (amd64-linux-ipa.o, ax.o): Rewrite.
10214 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10215 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10216 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10217 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10218 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10219 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10220 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10221 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10222 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10223 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10224 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10225 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10226 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10227 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10228 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10229 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10230 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10231 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10232 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10233 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10234 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10235 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10236 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10237 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10238 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10239 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10240 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10241 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10242 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10243 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10244 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10245 (reg-tilegx.o): Remove.
10246 (all_object_files): New macro.
10247 Include .deps files.
10248 * aclocal.m4, configure: Rebuild.
10249 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10250 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10251 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10252
e90e9ad9
TT
102532012-12-05 Tom Tromey <tromey@redhat.com>
10254
10255 PR gdb/14917:
10256 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10257
02d403bf 102582012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10259
10260 * configure.ac: Check for linux/perf_event.h.
10261 * config.in: Regenerated.
10262 * configure: Regenerated.
10263
0270a750
PA
102642012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10265
10266 * hostio.c (handle_readlink): Decrease buffer size
10267 parameter passed to readlink by one byte.
10268
8c29b58e
YQ
102692012-11-26 Yao Qi <yao@codesourcery.com>
10270
10271 * configure.ac (build_warnings): Append '-Wempty-body'.
10272 * configure: Regenerated.
10273 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10274 body.
10275
8bdce1ff
PM
102762012-11-15 Pierre Muller <muller@sourceware.org>
10277
10278 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10279 * config.in: Regenerate.
10280 * configure: Regenerate.
10281 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10282 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10283 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10284 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10285 header.
10286 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10287 instead of <sys/wait.h> header.
10288 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10289
02d403bf 102902012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10291
10292 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10293 (various make rules): Remove -DGDBSERVER
10294
fbd5db48
YQ
102952012-11-09 Yao Qi <yao@codesourcery.com>
10296
10297 * spu-low.c (current_ptid): Move it to ..
10298 * gdbthread.h: ... here. New.
10299 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10300 * server.c (myresume, process_serial_event): Likewise.
10301 * thread-db.c (thread_db_find_new_threads): Likewise.
10302 * tracepoint.c (run_inferior_command): Likewise.
10303
b3dc46ff
AB
103042012-10-01 Andrew Burgess <aburgess@broadcom.com>
10305
10306 * server.c (handle_search_memory_1): Include access length in
10307 warning message.
10308
07c04788
HPN
103092012-09-05 Michael Brandt <michael.brandt@axis.com>
10310
10311 * linux-crisv32-low.c: Fix compile errors.
10312
918d227b
YQ
103132012-09-04 Yao Qi <yao@codesourcery.com>
10314
10315 * tracepoint.c (cmd_qtsv): Adjust debug message.
10316 Don't check CUR_TPOINT.
10317
18c1b81a
YQ
103182012-08-28 Yao Qi <yao@codesourcery.com>
10319
10320 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10321 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10322 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10323 Remove declarations of xmalloc, xreallloc, xstrdup and
10324 freeargv.
10325 * Makefile.in (libiberty_h): New.
10326 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10327 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10328
dc82f37b
YQ
103292012-08-23 Yao Qi <yao@codesourcery.com>
10330
10331 * server.h: Remove declaration of 'xsnprintf'.
10332
406b1477
KS
103332012-08-22 Keith Seitz <keiths@redhat.com>
10334
10335 * server.h: Include build-gnulib-gbserver/config.h.
10336 * gdbreplay.c: Likewise.
10337
e6712ff1
DE
103382012-08-08 Doug Evans <dje@google.com>
10339
10340 * Makefile.in (SFILES): Add gdb_vecs.c.
10341 (OBS): Add gdb_vecs.o.
10342 (gdb_vecs_h, host_defs_h): New variables.
10343 (thread-db.o): Add $(gdb_vecs_h) dependency.
10344 (gdb_vecs.o): New rule.
10345 * thread-db.c: #include "gdb_vecs.h".
10346 (thread_db_load_search): Use a vector to iterate over path elements.
10347 Handle text appearing after "$pdir".
10348
10349 * configure.ac: Add check for strstr.
10350 * config.in: Regenerate.
10351 * configure: Regenerate.
10352
7c3270ae
UW
103532012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10354
10355 * hostio.c (handle_pread): If pread fails, fall back to attempting
10356 lseek/read.
10357 (handle_pwrite): Likewise for pwrite.
10358
b62e2b27
UW
103592012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10360
10361 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10362 between unsupported TYPE and unimplementable ADDR/LEN combination.
10363 (arm_insert_point): Act on new return value.
10364
78a99e91
PA
103652012-07-31 Pedro Alves <palves@redhat.com>
10366
10367 * server.c (process_point_options): Only skip tokens if we find
10368 one that is unrecognized. Don't treat 'X' specially while
10369 skipping unrecognized tokens.
10370
fcf303ab
UW
103712012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10372
10373 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10374 to 4-byte-align HW breakpoint addresses for Thumb.
10375
7255706c
YQ
103762012-07-27 Yao Qi <yao@codesourcery.com>
10377
10378 PR remote/14161.
10379
10380 * server.h: Declare gdb_agent_about_to_close.
10381 * target.c (kill_inferior): Include "agent.h".
10382 New. Send command 'kill'.
10383 * target.h (kill_inferior): Removed macro.
10384 * tracepoint.c (gdb_agent_about_to_close): New.
10385 (gdb_agent_helper_thread): Handle command 'close'.
10386 Wait endlessly until the inferior stops.
10387 Install gdb_agent_remove_socket to atexit hook.
10388 (agent_socket_name): New static variable.
10389 (gdb_agent_socket_init): Replace local variable 'name' with
10390 'agent_socket_name'.
10391 (gdb_agent_remove_socket): New.
10392
5a3f286f
YQ
103932012-07-27 Yao Qi <yao@codesourcery.com>
10394
10395 * server.c (process_point_options): Stop at 'X' when parsing.
10396
961bd387
ME
103972012-07-19 Michael Eager <eager@eagercon.com>
10398
a261b8f5 10399 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10400 to hw_execute.
10401 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10402 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10403 hardware breakpoint.
10404
aa7c7447
JK
104052012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10406
10407 * gdbserver/linux-low.c (initialize_low): Call
10408 linux_ptrace_init_warnings.
10409
7f216e7c
DE
104102012-07-02 Doug Evans <dje@google.com>
10411
10412 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10413 pointer to int.
10414
d3ce09f5
SS
104152012-07-02 Stan Shebs <stan@codesourcery.com>
10416
10417 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10418 (ax.o): Add it to build rule.
10419 (ax-ipa.o): Ditto.
10420 (OBS): Add format.o.
10421 (IPA_OBS): Add format.o.
10422 * server.c (handle_query): Claim support for breakpoint commands.
10423 (process_point_options): Add command case.
10424 (process_serial_event): Leave running if there are printfs in
10425 effect.
10426 * mem-break.h (any_persistent_commands): Declare.
10427 (add_breakpoint_commands): Declare.
10428 (gdb_no_commands_at_breakpoint): Declare.
10429 (run_breakpoint_commands): Declare.
10430 * mem-break.c (struct point_command_list): New struct.
10431 (struct breakpoint): New field command_list.
10432 (any_persistent_commands): New function.
10433 (add_commands_to_breakpoint): New function.
10434 (add_breakpoint_commands): New function.
10435 (gdb_no_commands_at_breakpoint): New function.
10436 (run_breakpoint_commands): New function.
10437 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10438 locally.
10439 * ax.c: Include format.h.
10440 (ax_printf): New function.
10441 (gdb_eval_agent_expr): Add printf opcode.
10442
2f8f6aed
YQ
104432012-06-13 Yao Qi <yao@codesourcery.com>
10444
10445 * server.c (start_inferior): Remove duplicated writes to fields
10446 'last_resume_kind' and 'last_status' of 'current_inferior'.
10447
0c9070b3
YQ
104482012-06-12 Yao Qi <yao@codesourcery.com>
10449 Pedro Alves <palves@redhat.com>
10450
10451 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10452 comment.
10453 * server.c (handle_v_cont): Extend comment.
10454
c52daf70
YQ
104552012-06-11 Yao Qi <yao@codesourcery.com>
10456
10457 * linux-low.c (linux_attach): Add 'static'.
10458
d38bbb0a
YQ
104592012-06-06 Yao Qi <yao@codesourcery.com>
10460
10461 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10462
89dc0afd
JK
104632012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10464
10465 Fix gcc -flto compilation warning.
10466 * server.c (main): Make variable multi_mode and attach volatile.
10467
75f62ce7
TJB
104682012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10469
10470 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10471 if the platform doesn't know about it.
10472
65f479b6
PA
104732012-05-30 Jeff Kenton <jkenton@tilera.com>
10474
10475 * Makefile.in (SFILES): Add linux-tile-low.c.
10476 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10477 * configure.srv: Handle tilegx-*-linux*.
10478 * linux-tile-low.c: New file.
10479
0c5bf5a9
JK
104802012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10481
10482 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10483
a493e3e2
PA
104842012-05-24 Pedro Alves <palves@redhat.com>
10485
10486 PR gdb/7205
10487
43aaf8b6 10488 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10489
2ea28649
PA
104902012-05-24 Pedro Alves <palves@redhat.com>
10491
10492 PR gdb/7205
10493
10494 Replace target_signal with gdb_signal throughout.
10495
8d409d16
MR
104962012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10497
10498 * linux-low.c (linux_store_registers): Avoid the copying sequence
10499 when no data has been retrieved by ptrace.
10500
23512c01
MGD
105012012-05-22 Will Deacon <will.deacon@arm.com>
10502
10503 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10504 Include asm/ptrace.h.
10505 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10506 already defined.
10507
4934b29e
MR
105082012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10509
10510 * linux-low.c (linux_store_registers): Don't re-retrieve data
10511 with ptrace that has already been obtained from /proc. Always
10512 copy any data retrieved with ptrace to the buffer supplied.
10513
bde24c0a
PA
105142012-05-11 Yao Qi <yao@codesourcery.com>
10515 Pedro Alves <palves@redhat.com>
10516
10517 * linux-low.c (enum stopping_threads_kind): New.
10518 (stopping_threads): Change type to `enum stopping_threads_kind'.
10519 (handle_extended_wait): If stopping and suspending threads, leave
10520 the new_lwp suspended too.
10521 (linux_wait_for_event): Adjust.
10522 (stop_all_lwps): Set `stopping_threads' to
10523 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10524 whether we're suspending threads or just stopping them. Assert no
10525 recursion happens.
10526
623b6bdf
YQ
105272012-04-29 Yao Qi <yao@codesourcery.com>
10528
10529 * server.h: Move some code to ...
10530 * gdbthread.h: ... here. New.
10531 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10532 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10533 (nto-low.o, win32-low.o): Likewise.
10534 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10535 * regcache.c, remote-utils.c, server.c: Likewise.
10536 * target.c, tracepoint.c, win32-low.c: Likewise.
10537
f15f9948
TJB
105382012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10539
10540 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10541 (PTRACE_ARG4_TYPE): Likewise.
10542 (PTRACE_XFER_TYPE): Likewise.
10543 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10544 ptrace to PTRACE_ARG3_TYPE.
10545 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10546 (PTRACE_ARG4_TYPE): Likewise.
10547 (PTRACE_XFER_TYPE): Likewise.
10548 (linux_detach_one_lwp): Cast fourth argument of
10549 ptrace to long then PTRACE_ARG4_TYPE.
10550 (regsets_fetch_inferior_registers): Cast third argument of
10551 ptrace to long then PTRACE_ARG3_TYPE.
10552 (regsets_store_inferior_registers): Likewise.
10553
38ea300a
PA
105542012-04-20 Pedro Alves <palves@redhat.com>
10555
10556 * configure: Regenerate.
10557
c971b7fa
PA
105582012-04-19 Pedro Alves <palves@redhat.com>
10559
43aaf8b6 10560 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10561 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10562 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10563 (all, install-only, uninstall, clean-info, all-lib, clean): No
10564 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10565 (maintainer-clean realclean distclean): Use subdir_do.
10566 (subdir_do): New.
10567 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10568 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10569 * acinclude.m4: Include acx_configure_dir.m4.
10570 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10571 calls. Call AC_PROG_RANLIB. Configure gnulib using
10572 ACX_CONFIGURE_DIR.
10573 (GNULIB): New.
10574 (GNULIB_STDINT_H): Adjust.
10575 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10576 * gdbreplay.c: Include build-gnulib/config.h.
10577 * server.h: Likewise.
10578 * aclocal.m4: Regenerate.
10579 * config.in: Regenerate.
10580 * configure: Regenerate.
c971b7fa 10581
809277f8
PA
105822012-04-19 Pedro Alves <palves@redhat.com>
10583
10584 * Makefile.in (LIBGNU, INCGNU): Adjust.
10585 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10586 (all, install-only, uninstall, clean-info, all-lib, clean)
10587 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10588 * configure.ac: Adjust AC_OUTPUT output.
10589 * aclocal.m4: Regenerate.
10590 * configure: Regenerate.
10591
fd9bb8b8
PA
105922012-04-19 Pedro Alves <palves@redhat.com>
10593
10594 * Makefile.in (generated_files): New.
10595 (server_h): Remove the explicit dependency on config.h, and depend
10596 on $generated_files.
10597
1c298c66
PA
105982012-04-19 Pedro Alves <palves@redhat.com>
10599
10600 * Makefile.in (INCGNU): Add -Ignulib.
10601
57c4b50b
PA
106022012-04-19 Pedro Alves <palves@redhat.com>
10603
10604 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10605 (INCGNU): ... this, and spell out -I here.
10606 (GNULIB_LIB): Rename to ...
10607 (LIBGNU): ... this.
10608 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10609
1030e047
PA
106102012-04-19 Pedro Alves <palves@redhat.com>
10611
10612 * config.in: Regenerate.
10613
447d4319
PA
106142012-04-19 Pedro Alves <palves@redhat.com>
10615
10616 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10617 * server.h (memmem): Remove declaration.
10618 * config.in: Regenerate.
10619 * configure: Regenerate.
10620
aad9eab9
YQ
106212012-04-19 Yao Qi <yao@codesourcery.com>
10622
10623 * Makefile.in (SFILES): Add common/vec.c.
10624 (OBS): Add vec.o.
10625 (vec.o): New rule.
10626
3e10640f
YQ
106272012-04-19 Yao Qi <yao@codesourcery.com>
10628
10629 * remote-utils.c (prepare_resume_reply): Replace with macro
10630 target_core_of_thread.
10631 * server.c (handle_qxfer_threads_proper): Likewise.
10632 * target.h (traget_core_of_thread): New macro.
10633
71622373
PA
106342012-04-18 Pedro Alves <palves@redhat.com>
10635
10636 * aclocal.m4: Regenerate.
10637 * configure: Regenerate.
10638
80d26939
YQ
106392012-04-16 Yao Qi <yao@codesourcery.com>
10640
10641 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10642 duplicated on address.
10643
42476b70
YQ
106442012-04-16 Yao Qi <yao@codesourcery.com>
10645
10646 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10647 (struct tracepoint_action_ops) <send>: New field.
10648 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10649 (agent_expr_send, x_tracepoint_action_send): New.
10650 (l_tracepoint_action_send): New.
10651 (cmd_qtdp): Download and install tracepoint
10652 according to `use_agent'.
10653 (run_inferior_command): Add one more parameter `len'.
10654 Update callers.
10655 (tracepoint_send_agent): New.
10656 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10657
7bc83639
YQ
106582012-04-16 Yao Qi <yao@codesourcery.com>
10659
10660 * tracepoint.c (download_tracepoints): Moved to ...
10661 (cmd_qtstart): ... here.
10662
5f18041e
YQ
106632012-04-14 Yao Qi <yao@codesourcery.com>
10664
10665 * tracepoint.c: Include inttypes.h.
10666 (struct collect_memory_action): Use sized types.
10667 (struct tracepoint): Likewise.
10668 (cmd_qtdp, stop_tracing): Update print specifiers.
10669 (cmd_qtp, response_tracepoint): Likewise.
10670 (collect_data_at_tracepoint): Likewise.
10671 (collect_data_at_step): Likewise.
10672
55a8c076
YQ
106732012-04-14 Yao Qi <yao@codesourcery.com>
10674
10675 Import gnulib module inttypes.
10676 * aclocal.m4, config.in, configure: Regenerated.
10677
dc750257
YQ
106782012-04-14 Yao Qi <yao@codesourcery.com>
10679
10680 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10681 Makefile and config.status at last.
10682
0ab5faf9
YQ
106832012-04-13 Yao Qi <yao@codesourcery.com>
10684
10685 * tracepoint.c: Include stdint.h unconditionally.
10686
18f5fd81
TJB
106872012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10688
10689 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10690 on BFD_HAVE_SYS_PROCFS_TYPE.
10691 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10692 * configure: Regenerate.
10693 * config.in: Likewise.
10694
4d47af5c
L
106952012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10696
10697 * Makefile.in (clean): Also remove x32.c x32-linux.c
10698 x32-avx.c x32-avx-linux.c.
10699 (x32.o): New target.
10700 (x32.c): Likewise.
10701 (x32-linux.o): Likewise.
10702 (x32-linux.c): Likewise.
10703 (x32-avx.o): Likewise.
10704 (x32-avx.c): Likewise.
10705 (x32-avx-linux.o): Likewise.
10706 (x32-avx-linux.c): Likewise.
10707
10708 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10709 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10710 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10711 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10712 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10713 i386/x32-avx-linux.xml.
10714
10715 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10716 (init_registers_x32_avx_linux): Likwise.
10717 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10718 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10719
ecedbe58
PA
107202012-04-13 Pedro Alves <palves@redhat.com>
10721
10722 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10723 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10724 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10725 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10726 the sub-make.
10727
c92b5177
L
107282012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10729
10730 * linux-x86-low.c (compat_x32_clock_t): New.
10731 (compat_x32_siginfo_t): Likewise.
10732 (compat_x32_siginfo_from_siginfo): Likewise.
10733 (siginfo_from_compat_x32_siginfo): Likewise.
10734 (linux_is_elf64): Likewise.
10735 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10736 and siginfo_from_compat_x32_siginfo for x32.
10737 (x86_arch_setup): Set linux_is_elf64.
10738
214d508e
L
107392012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10740
10741 PR gdb/13969
10742 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10743 e_machine field.
10744 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10745 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10746 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10747 compatible with process.
10748
c9a1864a
YQ
107492012-04-12 Yao Qi <yao@codesourcery.com>
10750
10751 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10752 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10753 (install-only, install-info, clean): Handle sub dir gnulib.
10754 (all-lib, am--refresh): New targets.
10755 (memmem.o): Remove target.
10756 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10757 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10758 (AC_REPLACE_FUNCS): Remove memmem.
10759 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10760 (AC_OUTPUT): Generate Makefile in gnulib/.
10761 * aclocal.m4, config.in, configure: Regenerated.
10762
367ba2c2
MR
107632012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10764
10765 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10766
9d236627
PA
107672012-04-05 Pedro Alves <palves@redhat.com>
10768
10769 -Werror=strict-aliasing
10770
10771 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10772 pointer.
10773
111217b3
PA
107742012-04-04 Pedro Alves <palves@redhat.com>
10775
10776 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10777 (sparc_store_gregset_from_stack, sparc_store_gregset)
10778 (sparc_breakpoint_at): Fix formatting.
10779
8365dcf5
TJB
107802012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10781
10782 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10783 are available.
10784 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10785 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10786 * config.in: Regenerate.
10787 * configure: Likewise.
10788
689cc2ae
PA
107892012-03-29 Pedro Alves <palves@redhat.com>
10790
10791 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10792 Correct ptrace arguments.
10793
c14dfd32
PA
107942012-03-28 Pedro Alves <palves@redhat.com>
10795
10796 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10797 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10798 (IA64_FR1_REGNUM): New defines.
10799 (ia64_fetch_register): New.
10800 (the_low_target): Install it.
10801 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10802 field.
10803 * linux-low.c (linux_fetch_registers): Try the
10804 the_low_target.fetch_register hook first.
10805
10806 * linux-arm-low.c (the_low_target): Adjust.
10807 * linux-bfin-low.c (the_low_target): Adjust.
10808 * linux-cris-low.c (the_low_target): Adjust.
10809 * linux-crisv32-low.c (the_low_target): Adjust.
10810 * linux-m32r-low.c (the_low_target): Adjust.
10811 * linux-m68k-low.c (the_low_target): Adjust.
10812 * linux-mips-low.c (the_low_target): Adjust.
10813 * linux-ppc-low.c (the_low_target): Adjust.
10814 * linux-s390-low.c (the_low_target): Adjust.
10815 * linux-sh-low.c (the_low_target): Adjust.
10816 * linux-sparc-low.c (the_low_target): Adjust.
10817 * linux-tic6x-low.c (the_low_target): Adjust.
10818 * linux-x86-low.c (the_low_target): Adjust.
10819 * linux-xtensa-low.c (the_low_target): Adjust.
10820
63c88e13
PA
108212012-03-26 Pedro Alves <palves@redhat.com>
10822
10823 * server.c (handle_qxfer_libraries): Don't bail early if
10824 the_target->qxfer_libraries_svr4 is not NULL.
10825
fb723180
PA
108262012-03-26 Pedro Alves <palves@redhat.com>
10827
10828 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10829
0afae3cf
PA
108302012-03-23 Pedro Alves <palves@redhat.com>
10831
10832 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10833 "library-list-svr4" element's start tag when the the DSO list is
10834 empty.
10835
485f1ee4
PA
108362012-03-23 Pedro Alves <palves@redhat.com>
10837
10838 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10839 a variable whose type size is the same as the inferior's pointer
10840 size.
10841
a5362b9a
TS
108422012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10843
10844 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10845 struct siginfo.
10846 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10847 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10848 * linux-low.h: Include <signal.h>.
10849 (struct siginfo): Remove forward declaration.
10850 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10851 struct siginfo.
10852
d226c142
MF
108532012-03-21 Mike Frysinger <vapier@gentoo.org>
10854
10855 * .gitignore: Ignore more files.
10856
122f36ef
PA
108572012-03-19 Pedro Alves <palves@redhat.com>
10858 Jan Kratochvil <jan.kratochvil@redhat.com>
10859
10860 * server.c (cont_thread, general_thread): Add describing comments.
10861 (start_inferior): Clear `cont_thread'.
10862 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10863 of a process.
10864
fc3e5175
YQ
108652012-03-15 Yao Qi <yao@codesourcery.com>
10866
10867 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10868 handling to ...
10869 (cmd_qtdp): ... here.
10870
8d0d92cd
YQ
108712012-03-15 Yao Qi <yao@codesourcery.com>
10872
10873 * tracepoint.c (struct tracepoint_action_ops): New.
10874 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10875 (m_tracepoint_action_download): New.
10876 (r_tracepoint_action_download): New.
10877 (x_tracepoint_action_download): New.
10878 (l_tracepoint_action_download): New.
10879 (add_tracepoint_action): Install `action->ops' according type.
10880 (download_tracepoint_1): Move code `download' function pointer
10881 of various tracepoint_action_ops.
10882
87b0bb13
JK
108832012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10884
10885 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10886 linux_ptrace_attach_warnings.
10887
5f572dec
JK
108882012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10889
10890 * Makefile.in (linux-ptrace.o): New.
10891 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10892 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10893 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10894 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10895 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10896 of these targets.
10897 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10898
f4647387
YQ
108992012-03-08 Yao Qi <yao@codesourcery.com>
10900 Pedro Alves <palves@redhat.com>
10901
10902 Fix PR server/13392.
10903 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10904 offset of JMP insn.
10905 * tracepoint.c (remove_tracepoint): New.
10906 (cmd_qtdp): Call remove_tracepoint when failed to install.
10907
9b224c5e
PA
109082012-03-07 Pedro Alves <palves@redhat.com>
10909
10910 * linux-low.c (get_detach_signal): New.
10911 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10912 Pass on pending signals to PTRACE_DETACH. Check the result of the
10913 ptrace call.
10914 * server.c (program_signals, program_signals_p): New.
10915 (handle_general_set): Handle QProgramSignals.
10916 * server.h (program_signals, program_signals_p): Declare.
10917
e237a7e2
JK
109182012-03-05 Pedro Alves <palves@redhat.com>
10919 Jan Kratochvil <jan.kratochvil@redhat.com>
10920
10921 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10922 New comment why.
10923
5808517f
YQ
109242012-03-03 Yao Qi <yao@codesourcery.com>
10925
10926 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10927 agent_look_up_symbols.
10928
58b4daa5
YQ
109292012-03-03 Yao Qi <yao@codesourcery.com>
10930
10931 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10932 (linux-x86-low.o): Likewise.
10933 * server.h: Remove in_process_agent_loaded.
10934 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10935 common/agent.c.
10936 Update callers.
10937
8ffcbaaf
YQ
109382012-03-03 Yao Qi <yao@codesourcery.com>
10939
10940 * tracepoint.c (gdb_agent_capability): New global.
10941 (in_process_agent_loaded_ust): Renamed to
10942 `in_process_agent_supports_ust'.
10943 Update callers.
10944 (in_process_agent_supports_ust): Call agent_capability_check.
10945 (clear_installed_tracepoints): Assert that agent supports
10946 agent.
10947
d1feda86
YQ
109482012-03-03 Yao Qi <yao@codesourcery.com>
10949
10950 * linux-low.c (linux_supports_agent): New.
10951 (linux_target_ops): Initialize field `supports_agent' with
10952 linux_supports_agent.
10953 * target.h (struct target_ops) <supports_agent>: New.
10954 (target_supports_agent): New macro.
10955 * server.c (handle_general_set): Handle packet 'QAgent'.
10956 (handle_query): Send `QAgent+'.
10957 * Makefile.in (server.o): Depends on agent.h.
10958
2fa291ac
YQ
109592012-03-03 Yao Qi <yao@codesourcery.com>
10960
10961 * Makefile.in (OBS): Add agent.o.
10962 Add new rule for agent.o.
10963 Track dependence of tracepoint.c on agent.h.
10964 * tracepoint.c (run_inferior_command_1):
10965 (run_inferior_command): Call agent_run_command.
10966 (gdb_ust_connect_sync_socket): Deleted. Move it to
10967 common/agent.c.
10968 (resume_thread, stop_thread): Likewise.
10969 (gdb_ust_socket_init): Renamed to ...
10970 (gdb_agent_socket_init): ... New.
10971 (gdb_ust_thread): Renamed to ...
10972 (gdb_agent_helper_thread): ... New.
10973 (gdb_ust_init): Move some code to ...
10974 (gdb_agent_init): ... here. New.
10975 [HAVE_UST]: Call gdb_ust_init.
10976 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10977 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10978 * config.in, configure: Regenerated.
10979
05044653
PA
109802012-03-02 Pedro Alves <palves@redhat.com>
10981
10982 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10983 * linux-low.c (struct simple_pid_list): New.
10984 (stopped_pids): New a struct simple_pid_list pointer.
10985 (add_to_pid_list, pull_pid_from_list): New.
10986 (handle_extended_wait): Don't assume the first signal new children
10987 report is SIGSTOP. Adjust call to pull_pid_from_list.
10988 (linux_wait_for_lwp): Adjust.
10989
8d00225b
YQ
109902012-03-02 Yao Qi <yao@codesourcery.com>
10991
10992 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10993 debug log.
10994
19560ba5
YQ
109952012-03-02 Yao Qi <yao@codesourcery.com>
10996
10997 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10998 `stop_pc' and `tpoint'. Update caller.
10999
1faeff08
MR
110002012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11001
11002 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11003 * linux-low.c (use_linux_regsets): New macro.
11004 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11005 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11006 (linux_register_in_regsets): New function.
11007 (usr_fetch_inferior_registers): Skip registers covered by
11008 regsets.
11009 (usr_store_inferior_registers): Likewise.
11010 (usr_fetch_inferior_registers): New macro.
11011 (usr_store_inferior_registers): Likewise.
11012 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11013 (linux_store_registers): Likewise.
11014 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11015 prototype.
11016 (init_registers_mips64_dsp_linux): Likewise.
11017 (init_registers_mips_linux): New macro.
11018 (init_registers_mips_dsp_linux): Likewise.
11019 (mips_dsp_num_regs): Likewise.
11020 (DSP_BASE, DSP_CONTROL): New fallback macros.
11021 (mips_base_regs): New macro.
11022 (mips_regmap): Use it. Fix the size.
11023 (mips_dsp_regmap): New variable.
11024 (mips_dsp_regset_bitmap): Likewise.
11025 (mips_arch_setup): New function.
11026 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11027 than mips_regmap.
11028 (mips_cannot_store_register): Likewise.
11029 (the_low_target): Update .arch_setup, .num_regs and .regmap
11030 initializers. Add .regset_bitmap initializer.
11031 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11032 initializer.
11033 * linux-bfin-low.c (the_low_target): Likewise.
11034 * linux-cris-low.c (the_low_target): Likewise.
11035 * linux-crisv32-low.c (the_low_target): Likewise.
11036 * linux-ia64-low.c (the_low_target): Likewise.
11037 * linux-m32r-low.c (the_low_target): Likewise.
11038 * linux-m68k-low.c (the_low_target): Likewise.
11039 * linux-ppc-low.c (the_low_target): Likewise.
11040 * linux-s390-low.c (the_low_target): Likewise.
11041 * linux-sh-low.c (the_low_target): Likewise.
11042 * linux-sparc-low.c (the_low_target): Likewise.
11043 * linux-tic6x-low.c (the_low_target): Likewise.
11044 * linux-x86-low.c (the_low_target): Likewise.
11045 * linux-xtensa-low.c (the_low_target): Likewise.
11046 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11047 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11048 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11049 srv_xmlfiles.
11050 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11051 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11052
c03e6ccc
YQ
110532012-02-29 Yao Qi <yao@codesourcery.com>
11054 Pedro Alves <palves@redhat.com>
11055
11056 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11057 `step_over_finished' is true.
11058
644cebc9
PA
110592012-02-27 Pedro Alves <palves@redhat.com>
11060
11061 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11062 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11063
c14d7ab2
PA
110642012-02-27 Pedro Alves <palves@redhat.com>
11065
11066 PR server/9684
11067 * linux-low.c (pid_is_stopped): New.
11068 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11069
412c89dd
LM
110702012-02-25 Luis Machado <lgustavo@codesourcery.com>
11071
11072 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11073 of conditions.
11074
b745defe
MR
110752012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11076
11077 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11078
9f3a5c85
LM
110792012-02-24 Luis Machado <lgustavo@codesourcery>
11080
11081 * server.c (handle_query): Advertise support for target-side
11082 breakpoint condition evaluation.
11083 (process_point_options): New function.
11084 (process_serial_event): When inserting a breakpoint, check for
11085 a target-side condition that should be evaluated.
11086
11087 * mem-break.c: Include regcache.h and ax.h.
11088 (point_cond_list_t): New data structure.
11089 (breakpoint) <cond_list>: New field.
11090 (find_gdb_breakpoint_at): Make non-static.
11091 (delete_gdb_breakpoint_at): Clear any target-side
11092 conditions.
11093 (clear_gdb_breakpoint_conditions): New function.
11094 (add_condition_to_breakpoint): Likewise.
11095 (add_breakpoint_condition): Likewise.
11096 (gdb_condition_true_at_breakpoint): Likewise.
11097 (gdb_breakpoint_here): Return result directly instead
11098 of going through a local variable.
11099
11100 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11101 (clear_gdb_breakpoint_conditions): Likewise.
11102 (add_breakpoint_condition): Likewise.
11103 (gdb_condition_true_at_breakpoint): Likewise.
11104
11105 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11106 (need_step_over_p): Take target-side breakpoint condition into
11107 consideration.
11108
5e1dc496
LM
111092012-02-24 Luis Machado <lgustavo@codesourcery>
11110
11111 * server.h: Include tracepoint.h.
11112 (agent_mem_read, agent_get_trace_state_variable_value,
11113 agent_set_trace_state_variable_value,
11114 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11115 get_set_tsv_func_addr): New prototypes.
11116
11117 * ax.h: New include file.
11118 * ax.c: New source file.
11119
11120 * tracepoint.c: Include ax.h.
11121 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11122 agent_expr, eval_result_type): Move to ax.h.
11123 (parse_agent_expr): Rename to ...
11124 (gdb_parse_agent_expr): ... this, make it non-static and move
11125 to ax.h.
11126 (unparse_agent_expr) Rename to ...
11127 (gdb_unparse_agent_expr): ... this, make it non-static and move
11128 to ax.h.
11129 (eval_agent_expr): Rename to ...
11130 (eval_tracepoint_agent_expr): ... this.
11131 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11132 forward declarations.
11133 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11134 (agent_get_trace_state_variable_value): New function.
11135 (agent_set_trace_state_variable_value): New function.
11136 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11137 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11138 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11139 (condition_true_at_tracepoint): Likewise.
11140 (parse_agent_expr): Rename to ...
11141 (gdb_parse_agent_expr): ... this and move to ax.c.
11142 (unparse_agent_expr): Rename to ...
11143 (gdb_unparse_agent_expr): ... this and move to ax.c.
11144 (gdb_agent_op_name): Move to ax.c.
11145 (eval_agent_expr): Rename to ...
11146 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11147 and move to ax.c.
11148 (eval_tracepoint_agent_expr): New function.
11149 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11150 non-static.
5e1dc496
LM
11151 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11152 ax.c.
11153 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11154 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11155 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11156 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11157 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11158 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11159 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11160 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11161 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11162 (compile_bytecodes): Remove forward declaration.
11163 (is_goto_target): Move to ax.c.
11164 (compile_bytecodes): Move to ax.c and call
11165 agent_get_trace_state_variable_value (...) and
11166 agent_set_trace_state_variable_value (...).
11167
11168 * Makefile.in: Update ax.c and IPA dependencies.
11169
277e4e52
PA
111702012-02-24 Pedro Alves <palves@redhat.com>
11171
11172 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11173 (cmd_bigqtbuffer_circular): ... this. Only handle
11174 'QTBuffer:circular:'.
11175 (handle_tracepoint_general_set): Adjust.
11176
bf4c19f7
YQ
111772012-02-16 Yao Qi <yao@codesourcery.com>
11178
11179 * inferiors.c: Move code to ...
11180 * dll.c: .... here. New.
11181 * server.h: Declare clear_dlls.
11182 * Makefile.in (SFILES): Add dll.c.
11183 (OBS): Add dll.o
11184 (dll.o): New rule.
11185
d73f2619
YQ
111862012-02-11 Yao Qi <yao@codesourcery.com>
11187
11188 * server.c: (handle_monitor_command): Add a new parameter
11189 `own_buf'.
11190 (handle_query): Update caller.
11191
f8255c2a
JB
111922012-02-09 Joel Brobecker <brobecker@adacore.com>
11193
11194 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11195 * configure, config.in: Regenerate.
11196 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11197 is not defined.
11198
da84f473
PA
111992012-02-02 Pedro Alves <palves@redhat.com>
11200
11201 Try SIGKILL first, then PTRACE_KILL.
11202 * linux-low.c (linux_kill_one_lwp): New.
11203 (linux_kill_one_lwp): Rename to ...
11204 (kill_one_lwp_callback): ... this. Use the new
11205 linux_kill_one_lwp.
11206
e886a173
PA
112072012-02-02 Pedro Alves <palves@redhat.com>
11208
11209 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11210 inferior.
11211
be07f1a2
PA
112122012-01-27 Pedro Alves <palves@redhat.com>
11213
11214 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11215 (elf_64_file_p): Make static.
11216 (linux_pid_exe_is_elf_64_file): New.
11217 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11218 Delete declarations.
11219 (linux_pid_exe_is_elf_64_file): Declare.
11220 * linux-x86-low.c (x86_arch_setup): Use
11221 linux_pid_exe_is_elf_64_file.
11222
d8301ad1
JK
112232012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11224
11225 * linux-low.c (linux_wait_for_event_1): Rename to ...
11226 (linux_wait_for_event): ... here and merge it with former
11227 linux_wait_for_event - new variable wait_ptid, use it.
11228 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11229
01b17894
PA
112302012-01-23 Pedro Alves <palves@redhat.com>
11231
11232 * server.c (main): Avoid yet another case of infinite loop while
11233 detaching/killing after a longjmp.
11234
e825046f
JK
112352012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11236
11237 Code cleanup.
11238 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11239
b9e7b9c3
UW
112402012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11241
11242 * hostio.c (handle_readlink): New function.
11243 (handle_vFile): Call it to handle "vFile:readlink" packets.
11244
901f9912
UW
112452012-01-20 Pedro Alves <palves@redhat.com>
11246 Ulrich Weigand <ulrich.weigand@linaro.org>
11247
11248 * server.c (handle_v_requests): Only support vAttach and vRun to
11249 start multiple processes when in extended protocol mode.
11250
fc1ab1a0
PA
112512012-01-17 Pedro Alves <palves@redhat.com>
11252
11253 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11254 memalign plus mprotect to allocate the scratch buffer.
11255
7d5d4e98
PA
112562012-01-13 Pedro Alves <palves@redhat.com>
11257
11258 * server.c (attach_inferior): Clear `cont_thread'.
11259
f128d5e9
PA
112602012-01-13 Pedro Alves <palves@redhat.com>
11261
11262 * server.c (main): Avoid infinite loop while detaching/killing
11263 after a longjmp.
11264
06db92f0
DE
112652012-01-09 Doug Evans <dje@google.com>
11266
11267 * server.c (start_inferior): Set last_ptid in --wrapper case.
11268
32d92999
YQ
112692012-01-06 Yao Qi <yao@codesourcery.com>
11270
11271 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11272 defined.
11273 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11274
5e0a92a9
YQ
112752012-01-04 Yao Qi <yao@codesourcery.com>
11276
11277 * tracepoint.c (cmd_qtdp): Print debug message
11278 for static tracepoint.
11279
ae639e8c
YQ
112802012-01-04 Yao Qi <yao@codesourcery.com>
11281
11282 * tracepoint.c (trace_vdebug): Differentiate debug message
11283 between gdbserver and IPA.
11284
f72429c5
YQ
112852012-01-03 Yao Qi <yao@codesourcery.com>
11286
11287 * tracepoint.c (tracepoint_was_hit): Don't collect for
11288 static tracepoint.
11289
12c3e59c
JB
112902012-01-02 Joel Brobecker <brobecker@adacore.com>
11291
11292 * terminal.h: Reformat copyright header.
11293
67827812
JB
112942012-01-02 Joel Brobecker <brobecker@adacore.com>
11295
11296 * server.c (gdbserver_version): Update copyright year.
11297 * gdbreplay.c (gdbreplay_version): Likewise.
11298
3e52c33d
JK
112992011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11300
11301 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11302
11303 Revert:
11304 2011-12-18 Hui Zhu <teawater@gmail.com>
11305 * linux-low.c (linux_create_inferior): Save return value to ret.
11306
66f1260e
HZ
113072011-12-18 Hui Zhu <teawater@gmail.com>
11308
11309 * linux-low.c (linux_create_inferior): Save return value to ret.
11310
e77616d7
DE
113112011-12-16 Doug Evans <dje@google.com>
11312
e7b06c57
DE
11313 * linux-low.c (linux_create_inferior): If stdio connection,
11314 redirect stdin from /dev/null, stdout to stderr.
11315 * remote-utils.c (remote_is_stdio): New static global.
11316 (remote_connection_is_stdio): New function.
11317 (remote_prepare): Handle stdio connection.
11318 (remote_open): Ditto.
11319 (remote_close): Don't close stdin for stdio connections.
11320 (read_prim,write_prim): New functions. Replace all calls to
11321 read/write to these.
11322 * server.c (main): Watch for "-" argument. Move call to
11323 remote_prepare before start_inferior.
11324 * server.h (STDIO_CONNECTION_NAME): New macro.
11325 (remote_connection_is_stdio): Declare.
11326
e77616d7
DE
11327 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11328 in debugging output.
11329
82067193
YQ
113302011-12-15 Yao Qi <yao@codesourcery.com>
11331
11332 * tracepoint.c: Include sys/syscall.h.
11333 (gdb_ust_thread): Remove preprocessor conditional.
11334
82bfbe7e
PA
113352011-12-14 Pedro Alves <pedro@codesourcery.com>
11336
11337 * linux-low.c (linux_detach_one_lwp): Call
11338 the_low_target.prepare_to_resume before detaching.
11339
712c6575
YQ
113402011-12-14 Yao Qi <yao@codesourcery.com>
11341
11342 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11343 of write.
11344
d54d1edf
YQ
113452011-12-14 Yao Qi <yao@codesourcery.com>
11346
11347 * i386-low.c (i386_low_stopped_data_address): Initialize local
11348 variable `control'.
11349
6210a125
PA
113502011-12-13 Pedro Alves <pedro@codesourcery.com>
11351
11352 PR remote/13492
11353
11354 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11355 DR_CONTROL unless necessary. Extend comments.
11356 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11357 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11358
2ece8244
YQ
113592011-12-13 Yao Qi <yao@codesourcery.com>
11360
11361 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11362 macros.
11363 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11364
784867a5
JK
113652011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11366
11367 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11368 Print new debug message for such case.
11369
6bf36717
JK
113702011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11371
11372 Fix overlapping memcpy.
11373 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11374 the read_inferior_memory transfer.
11375 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11376 write_inferior_memory transfer.
11377 (set_fast_tracepoint_jump): New variable buf. Use it for the
11378 read_inferior_memory and write_inferior_memory transfers.
11379 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11380 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11381 Use it for the write_inferior_memory transfer.
11382 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11383 buffers.
11384
50275556
MR
113852011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11386
11387 * linux-low.c (fetch_register, store_register): Make code
11388 consistent, fix formatting.
11389
7325beb4
MR
113902011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11391
11392 * linux-low.c (usr_store_inferior_registers): Factor out code
11393 to handle individual registers into...
11394 (store_register): ... this new function.
11395
c642a434
UW
113962011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11397
11398 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11399 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11400 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11401 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11402 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11403 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11404 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11405 (srv_xmlfiles): Add new XML files.
11406
11407 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11408 and <sys/uio.h>.
11409 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11410 (init_registers_s390_linux32v1): Add prototype.
11411 (init_registers_s390_linux32v2): Likewise.
11412 (init_registers_s390_linux64v1): Likewise.
11413 (init_registers_s390_linux64v2): Likewise.
11414 (init_registers_s390x_linux64v1): Likewise.
11415 (init_registers_s390x_linux64v2): Likewise.
11416 (s390_num_regs): Increment to 52.
11417 (s390_regmap): Add orig_r2 register.
11418 (s390_num_regs_3264): Increment to 68.
11419 (s390_regmap_3264): Add orig_r2 register.
11420 (s390_collect_ptrace_register): Handle orig_r2 register.
11421 (s390_supply_ptrace_register): Likewise.
11422 (s390_fill_last_break): New function.
11423 (s390_store_last_break): Likewise.
11424 (s390_fill_system_call): New function.
11425 (s390_store_system_call): Likewise.
11426 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11427 register sets.
11428 (s390_check_regset): New function.
11429 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11430 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11431 Update target_regsets for available register sets.
11432
2268b414
JK
114332011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11434 Jan Kratochvil <jan.kratochvil@redhat.com>
11435
11436 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11437 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11438 New.
11439 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11440 * linux-low.h (struct process_info_private): New member r_debug.
11441 * server.c (handle_qxfer_libraries): Call
11442 the_target->qxfer_libraries_svr4.
11443 (handle_qxfer_libraries_svr4): New function.
11444 (qxfer_packets): New entry "libraries-svr4".
11445 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11446 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11447 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11448 PACKET_qXfer_libraries_svr4.
11449
d6db1fab
UW
114502011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11451
11452 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11453 PSW address/mask between 8-byte and 16-byte formats.
11454 (s390_supply_ptrace_register): Likewise.
11455 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11456 basic addressing mode bit.
11457
242f5f1c
SS
114582011-11-24 Stan Shebs <stan@codesourcery.com>
11459
11460 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11461
f196051f
SS
114622011-11-17 Stan Shebs <stan@codesourcery.com>
11463
11464 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11465 (tracing_start_time): New global.
11466 (tracing_stop_time): New global.
11467 (tracing_user_name): New global.
11468 (tracing_notes): New global.
11469 (tracing_stop_note): New global.
11470 (cmd_qtstart): Set traceframe_usage, start_time.
11471 (stop_tracing): Set stop_time.
11472 (cmd_qtstatus): Report additional status.
11473 (cmd_qtp): New function.
11474 (handle_tracepoint_query): Call it.
11475 (cmd_qtnotes): New function.
11476 (handle_tracepoint_general_set): Call it.
11477 (get_timestamp): Rename from tsv_get_timestamp.
11478
405f8e94
SS
114792011-11-14 Stan Shebs <stan@codesourcery.com>
11480 Kwok Cheung Yeung <kcy@codesourcery.com>
11481
11482 * linux-x86-low.c (small_jump_insn): New.
11483 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11484 trampoline and error message, build a trampoline and issue a small
11485 jump instruction to it.
11486 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11487 trampoline and error message.
11488 (x86_get_min_fast_tracepoint_insn_len): New.
11489 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11490 * linux-low.h (struct linux_target_ops): Add arguments to
11491 install_fast_tracepoint_jump_pad operation, add new operation.
11492 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11493 arguments.
11494 (linux_get_min_fast_tracepoint_insn_len): New function.
11495 (linux_target_op): Add new operation.
11496 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11497 (gdb_trampoline_buffer_end): Ditto.
11498 (gdb_trampoline_buffer_error): Ditto.
11499 (struct ipa_sym_addresses): Add fields for new IPA variables.
11500 (symbol_list): Add entries for new IPA variables.
11501 (struct tracepoint): Add fields to hold the address range of the
11502 trampoline used by the tracepoint.
11503 (trampoline_buffer_head): New static variable.
11504 (trampoline_buffer_tail): Ditto.
11505 (claim_trampoline_space): New function.
11506 (have_fast_tracepoint_trampoline_buffer): New function.
11507 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11508 structure.
11509 (install_fast_tracepoint): Ditto, also add error buffer argument.
11510 (cmd_qtminftpilen): New function.
11511 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11512 (fast_tracepoint_from_trampoline_address): New function.
11513 (fast_tracepoint_collecting): Handle trampoline as part of jump
11514 pad space.
11515 (set_trampoline_buffer_space): New function.
11516 (initialize_tracepoint): Initialize new IPA variables.
11517 * target.h (struct target_ops): Add arguments to
11518 install_fast_tracepoint_jump_pad operation, add new
11519 get_min_fast_tracepoint_insn_len operation.
11520 (target_get_min_fast_tracepoint_insn_len): New.
11521 (install_fast_tracepoint_jump_pad): Add arguments.
11522 * server.h (IPA_BUFSIZ): Define.
11523 * linux-i386-ipa.c: Include extra header files.
11524 (initialize_fast_tracepoint_trampoline_buffer): New function.
11525 (initialize_low_tracepoint): Call it.
11526 * server.h (set_trampoline_buffer_space): Declare.
11527 (claim_trampoline_space): Ditto.
11528 (have_fast_tracepoint_trampoline_buffer): Ditto.
11529
1e4d1764
YQ
115302011-11-14 Yao Qi <yao@codesourcery.com>
11531
11532 * server.c (handle_query): Handle InstallInTrace for qSupported.
11533 * tracepoint.c (add_tracepoint): Sort list.
11534 (install_tracepoint, download_tracepoint): New.
11535 (cmd_qtdp): Call them to install and download tracepoints.
11536 (sort_tracepoints): Removed.
11537 (cmd_qtstart): Update.
11538
5c73ff4e
YQ
115392011-11-14 Yao Qi <yao@codesourcery.com>
11540
11541 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11542 * mem-break.h: Declare.
11543 * tracepoint.c (cmd_qtstart): Move some code to ...
11544 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11545 New.
11546 (download_tracepoints): Move some code to ...
11547 (download_tracepoint_1): ... here. New.
11548
86a30030
YQ
115492011-11-08 Yao Qi <yao@codesourcery.com>
11550
11551 * remote-utils.c (relocate_instruction): A comment fix.
11552
8d26e50c
JB
115532011-11-07 Joel Brobecker <brobecker@adacore.com>
11554
11555 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11556 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11557 dr_status_mirror and dr_control_mirror from debug_reg_state.
11558 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11559 (i386_initial_stuff): Remove use of deleted globals.
11560 (i386_get_thread_context, i386_set_thread_context,
11561 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11562 from debug_reg_state.
11563
a59306a3
YQ
115642011-11-05 Yao Qi <yao@codesourcery.com>
11565
11566 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11567 address as TPOINT's.
11568
3065dfb6
SS
115692011-11-02 Stan Shebs <stan@codesourcery.com>
11570
11571 * tracepoint.c (agent_mem_read_string): New function.
11572 (eval_agent_expr): Call it for tracenz.
11573 * server.c (handle_query): Report support for tracenz.
11574
fd0d8c7c
YQ
115752011-11-02 Yao Qi <yao@codesourcery.com>
11576
11577 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11578
609086b1
YQ
115792011-11-02 Yao Qi <yao@codesourcery.com>
11580
11581 * target.h: Fix a typo in comment.
11582
b9fd1791
PA
115832011-10-31 Pedro Alves <pedro@codesourcery.com>
11584
11585 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11586 clobber the breakpoints' shadows with fast tracepoint jumps.
11587 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11588 * target.c (write_inferior_memory): Also pass MYADDR down to
11589 check_mem_write.
11590
03583c20
UW
115912011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11592
11593 * configure.ac: Check support for personality routine.
11594 * configure: Regenerate.
11595 * config.in: Likewise.
11596 * linux-low.c: Include <sys/personality.h>.
11597 Define ADDR_NO_RANDOMIZE if necessary.
11598 (linux_create_inferior): Disable address space randomization when
11599 forking inferior, if requested.
11600 (linux_supports_disable_randomization): New function.
11601 (linux_target_ops): Install it.
11602 * server.h (disable_randomization): Declare.
11603 * server.c (disable_randomization): New global variable.
11604 (handle_general_set): Handle QDisableRandomization.
11605 (handle_query): Likewise for qSupported.
11606 (main): Support --disable-randomization and --no-disable-randomization
11607 command line arguments.
11608 * target.h (struct target_ops): Add supports_disable_randomization.
11609 (target_supports_disable_randomization): New macro.
11610
723b724b
MF
116112011-09-29 Mike Frysinger <vapier@gentoo.org>
11612
11613 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11614 ifdef check.
11615 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11616 [!PT_GETDSBT] (target_loadmap): New definition.
11617 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11618 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11619 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11620 and PT_GETDSBT to LINUX_LOADMAP.
11621 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11622 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11623
55329a5c 116242011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11625
11626 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11627 (arm_linux_hwbp_cap): New static variable.
11628 (arm_linux_get_hwbp_cap): Replace by ...
11629 (arm_linux_init_hwbp_cap): ... this new function.
11630 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11631 (arm_linux_get_hw_watchpoint_count): Likewise.
11632 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11633 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11634 (arm_prepare_to_resume): Use perror_with_name instead of error.
11635
55329a5c 116362011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11637
11638 * linux-arm-low.c: Include <signal.h>.
11639 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11640 (struct arm_linux_hwbp_cap): New data type.
11641 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11642 (struct arm_linux_hw_breakpoint): New data type.
11643 (MAX_BPTS, MAX_WPTS): Define.
11644 (struct arch_process_info, struct arch_lwp_info): New data types.
11645 (arm_linux_get_hwbp_cap): New function.
11646 (arm_linux_get_hw_breakpoint_count): Likewise.
11647 (arm_linux_get_hw_watchpoint_count): Likewise.
11648 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11649 (arm_hwbp_control_initialize): Likewise.
11650 (arm_hwbp_control_is_enabled): Likewise.
11651 (arm_hwbp_control_is_initialized): Likewise.
11652 (arm_hwbp_control_disable): Likewise.
11653 (arm_linux_hw_breakpoint_equal): Likewise.
11654 (arm_linux_hw_point_initialize): Likewise.
11655 (struct update_registers_data): New data structure.
11656 (update_registers_callback: New function.
11657 (arm_insert_point): Likewise.
11658 (arm_remove_point): Likewise.
11659 (arm_stopped_by_watchpoint): Likewise.
11660 (arm_stopped_data_address): Likewise.
11661 (arm_new_process): Likewise.
11662 (arm_new_thread): Likewise.
11663 (arm_prepare_to_resume): Likewise.
11664 (the_low_target): Register arm_insert_point, arm_remove_point,
11665 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11666 arm_new_thread, and arm_prepare_to_resume.
11667
6b9801d4
SS
116682011-09-15 Stan Shebs <stan@codesourcery.com>
11669
11670 * server.h (struct emit_ops): Add compare-goto fields.
11671 * tracepoint.c (gdb_agent_op_sizes): New table.
11672 (emit_eq_goto): New function.
11673 (emit_ne_goto): New function.
11674 (emit_lt_goto): New function.
11675 (emit_le_goto): New function.
11676 (emit_gt_goto): New function.
11677 (emit_ge_goto): New function.
11678 (is_goto_target): New function.
11679 (compile_bytecodes): Recognize special cases of compare-goto
11680 combinations and call specialized emitters for them.
11681 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11682 (amd64_emit_ne_goto): New function.
11683 (amd64_emit_lt_goto): New function.
11684 (amd64_emit_le_goto): New function.
11685 (amd64_emit_gt_goto): New function.
11686 (amd64_emit_ge_goto): New function.
11687 (amd64_emit_ops): Add the new functions.
11688 (i386_emit_eq_goto): New function.
11689 (i386_emit_ne_goto): New function.
11690 (i386_emit_lt_goto): New function.
11691 (i386_emit_le_goto): New function.
11692 (i386_emit_gt_goto): New function.
11693 (i386_emit_ge_goto): New function.
11694 (i386_emit_ops): Add the new functions.
11695
bf15cbda
SS
116962011-09-08 Stan Shebs <stan@codesourcery.com>
11697
11698 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11699 (i386_emit_epilogue): Restore %ebx.
11700
943ca1dd
JZ
117012011-08-31 Jie Zhang <jzhang918@gmail.com>
11702
11703 * server.c (step_thread): Remove definition.
11704 (process_serial_event): Don't handle Hs.
11705 * server.h (step_thread): Remove declaration.
11706 * target.c (set_desired_inferior): Remove use of step_thread.
11707
e3deef73
LM
117082011-08-24 Luis Machado <lgustavo@codesourcery.com>
11709
11710 * linux-low.c: Include linux-procfs.h.
11711 (linux_attach_lwp_1): Update comments.
11712 (linux_attach): Scan for existing threads when attaching to a
11713 process that is the tgid.
11714 * Makefile.in: Update dependencies.
11715
13da1c97
LM
117162011-08-24 Luis Machado <lgustavo@codesourcery.com>
11717
11718 * configure.srv: Add linux-procfs.o dependencies.
11719
881127c9
YQ
117202011-08-14 Yao Qi <yao@codesourcery.com>
11721
11722 * target.h (struct target_ops): Fix indent.
11723 * win32-low.c (win32_target_ops): Fix comment.
11724
58dbd541
YQ
117252011-08-14 Andrew Jenner <andrew@codesourcery.com>
11726 Yao Qi <yao@codesourcery.com>
11727
11728 * Makefile.in (clean): Remove tic6x-*.c files.
11729 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11730 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11731 (tic6x-c64xp-linux.c): Likewise.
11732 * configure.srv: Add support for tic6x-*-uclinux.
11733 * linux-tic6x-low.c: New.
11734 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11735
78d85199
YQ
117362011-08-14 Andrew Stubbs <ams@codesourcery.com>
11737 Yao Qi <yao@codesourcery.com>
11738
11739 * target.h (struct target_ops): Add read_loadmap.
11740 * linux-low.c (struct target_loadseg): New type.
11741 (struct target_loadmap): New type.
11742 (linux_read_loadmap): New function.
11743 (linux_target_ops): Add linux_read_loadmap.
11744 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11745 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11746 to NULL.
78d85199 11747
a959a88d
EZ
117482011-08-05 Eli Zaretskii <eliz@gnu.org>
11749
11750 * win32-low.c: Include <stdint.h>.
11751
1ced966e
PA
117522011-07-22 Pedro Alves <pedro@codesourcery.com>
11753
11754 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11755 to the inferior here.
11756 (i386_remove_aligned_watchpoint): Ditto.
11757 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11758 fit part of the watchpoint in the debug registers.
11759 (i386_update_inferior_debug_regs): New.
11760 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11761 registers, and only update the inferior on success.
11762 (i386_low_remove_watchpoint): Ditto.
11763
d26e3629
KY
117642011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11765
11766 * linux-low.c (compare_ints, unique, list_threads, show_process,
11767 linux_core_of_thread): Delete.
11768 (linux_target_ops): Change linux_core_of_thread to
11769 linux_common_core_of_thread.
11770 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11771 * utils.c (malloc_failure): Change type of argument.
11772 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11773 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11774 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11775 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11776 (IPA_OBJS): Add common-utils-ipa.o.
11777 (ptid_h, linux_osdata_h): New macros.
11778 (server_h): Add common/common-utils.h, common/xml-utils.h,
11779 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11780 common/ptid.h.
11781 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11782 ptid.o, buffer.o): New rules.
11783 (linux-low.o): Add common/linux-osdata.h as a dependency.
11784 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11785 * configure.ac: Add AC_HEADER_DIRENT check.
11786 * config.in: Regenerate.
11787 * configure: Regenerate.
11788 * remote-utils.c (xml_escape_text): Delete.
11789 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11790 buffer_xml_printf): Move to common/buffer.c.
11791 * server.c (main): Remove call to initialize_inferiors.
11792 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11793 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11794 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11795 internal_error, gdb_assert, gdb_assert_fail): Delete.
11796 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11797 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11798 common/buffer.h.
11799 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11800 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11801 initialize_inferiors): Delete.
11802
2275a1a7
PA
118032011-07-20 Pedro Alves <pedro@codesourcery.com>
11804
11805 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11806 symbol error.
11807
0a5b1e09
PA
118082011-05-31 Pedro Alves <pedro@codesourcery.com>
11809
11810 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11811 assertion.
11812 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11813
6938fd34
YQ
118142011-05-26 Yao Qi <yao@codesourcery.com>
11815
11816 * Makefile.in (thread-db.o): Track dependence to
11817 common/gdb_thread_db.h.
11818 * thread-db.c: include gdb_thread_db.h from right place.
11819
b481f9e0
TT
118202011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11821
11822 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11823 __FILE__ and __LINE__ to internal_error.
11824
98a5dd13
DE
118252011-05-13 Doug Evans <dje@google.com>
11826
11827 * thread-db.c (try_thread_db_load_from_sdir): New function.
11828 (try_thread_db_load_from_dir): New function.
11829 (thread_db_load_search): Handle $sdir, ignore $pdir.
11830 Remove trying of system directories if search of
11831 libthread-db-search-path fails, that is now done via $sdir.
11832
d248b706
KY
118332011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11834
11835 * server.c (handle_query): Add EnableDisableTracepoints to the list
11836 of supported features.
43aaf8b6 11837 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11838 tracepoints.
43aaf8b6
PA
11839 (cmd_qtenable_disable): New.
11840 (cmd_qtstart): Install tracepoints even if disabled.
11841 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11842 receiving a QTEnable or QTDisable packet.
11843 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11844 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11845 tracepoints.
11846 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11847
84e578fb
DE
118482011-05-10 Doug Evans <dje@google.com>
11849
11850 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11851
71f55dd8
DE
118522011-05-04 Doug Evans <dje@google.com>
11853
11854 * linux-low.c (linux_join): Skip process lookup.
11855 * spu-low.c (spu_join): Ditto.
11856 * server.c (join_inferiors_callback): Delete.
11857 (process_serial_event): For 'D' packet (detach) call join_inferior
11858 directly.
11859
4d393d60
JM
118602011-05-04 Joseph Myers <joseph@codesourcery.com>
11861
11862 * README: Don't mention xscale*-*-linux*.
11863 * configure.srv (xscale*-*-linux*): Don't handle target.
11864
b00ad6ff
NF
118652011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11866
11867 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11868 casting pointers.
11869 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11870 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11871 (i386_emit_void_call_2): Likewise.
11872
af96c192
YQ
118732011-04-26 Yao Qi <yao@codesourcery.com>
11874
43aaf8b6
PA
11875 * linux-low.c: Move common macros to linux-ptrace.h.
11876 Include linux-ptrace.h.
af96c192
YQ
11877 * Makefile.in (linux_ptrace_h): New.
11878 (linux-low.o): Depends on linux-ptrace.h.
11879
03f2bd59
JK
118802011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11881
11882 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11883 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11884 (remote_prepare): New function with most of the TCP code from ...
11885 (remote_open): ... here. Detect PORT here unconditionally. Move also
11886 setting transport_is_reliable.
11887 * server.c (run_once): New variable.
11888 (gdbserver_usage): Document it.
11889 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11890 the first run if RUN_ONCE.
11891 * server.h (run_once, remote_prepare): New declarations.
11892
7a9dd1b2
TT
118932011-04-19 Tom Tromey <tromey@redhat.com>
11894
11895 * win32-low.c (handle_load_dll): Remove duplicate "the".
11896
81239425
PM
118972011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11898
11899 Remove support for old Cygwin 1.5 versions.
11900 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11901 function to avoid warning.
11902 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11903 warning.
11904
9e0627f1
PM
119052011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11906
11907 * gdbserver/server.h (Macro _): Define it if not available.
11908
588eebee
MS
119092011-03-14 Michael Snyder <msnyder@vmware.com>
11910
348af9f7 11911 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11912
43f70d4c
JB
119132011-03-10 Joel Brobecker <brobecker@adacore.com>
11914
11915 * Makefile.in (maintainer-clean realclean distclean): Remove
11916 "make ... subdir_do" command.
11917
348af9f7
MS
119182011-03-10 Michael Snyder <msnyder@vmware.com>
11919
11920 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11921
11922 * server.c (handle_v_run): Free alloced buffer on early return.
11923
e637a4f5
YQ
119242011-03-09 Yao Qi <yao@codesourcery.com>
11925
11926 Revert:
11927 2011-03-04 Yao Qi <yao@codesourcery.com>
11928
11929 * Makefile.in: Remove GNU make feature --directory.
11930
11931 2011-03-05 Yao Qi <yao@codesourcery.com>
11932
11933 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11934 (subdir_do): New make target. Copied from gdb/Makefile.
11935 (maintainer-clean, realclean, distclean, clean): Call corresponding
11936 make targets in common/Makefile.
11937
11938 2011-02-11 Yao Qi <yao@codesourcery.com>
11939
11940 * configure.ac: Call AC_PROG_RANLIB.
11941 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11942 * configure: Regenerate.
11943
e6edda56
JK
119442011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11945
11946 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11947
e5141119
JB
119482011-03-06 Yao Qi <yao@codesourcery.com>
11949
11950 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11951
64794aa4
JB
119522011-03-05 Yao Qi <yao@codesourcery.com>
11953
11954 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11955 (subdir_do): New make target. Copied from gdb/Makefile.
11956 (maintainer-clean, realclean, distclean, clean): Call corresponding
11957 make targets in common/Makefile.
11958
7a762829
YQ
119592011-03-04 Yao Qi <yao@codesourcery.com>
11960
11961 * Makefile.in: Remove GNU make feature --directory.
11962
348af9f7
MS
119632011-03-04 Michael Snyder <msnyder@vmware.com>
11964
11965 * server.c (queue_stop_reply): Call xmalloc not malloc.
11966
119672011-03-02 Michael Snyder <msnyder@vmware.com>
11968
11969 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11970
9f72fee2
MS
119712011-02-28 Michael Snyder <msnyder@vmware.com>
11972
588eebee
MS
11973 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11974 (cmd_qtframe): Ditto.
11975 (cmd_qtbuffer): Ditto.
11976 (cmd_bigqtbuffer): Ditto.
11977
9f72fee2
MS
11978 * utils.c (decimal2str): Initialize 'width' to nine, then
11979 don't mess with it.
11980
8040bd49
UW
119812011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11982
11983 * hostio.c (require_data): Free *data, not data.
11984
7e52cbd0
JK
119852011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11986
11987 * hostio.c (require_data): Use free, not xfree.
11988
9130f83e
MS
119892011-02-27 Michael Snyder <msnyder@vmware.com>
11990
4b812f4e
MS
11991 * server.c (handle_query): Discard unused value.
11992
9130f83e
MS
11993 * hostio.c (require_data): Free malloc memory before returning
11994 error.
11995
69d37113
MS
119962011-02-26 Michael Snyder <msnyder@vmware.com>
11997
11998 * linux-low.c (list_threads): Call closedir for dirent.
11999
35f5825a
MS
120002011-02-27 Michael Snyder <msnyder@vmware.com>
12001
2a589cef
MS
12002 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12003 a case statement falls through.
12004
0adea5f7
MS
12005 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12006
35f5825a
MS
12007 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12008 in comparison.
12009
238f1c74
MS
120102011-02-26 Michael Snyder <msnyder@vmware.com>
12011
12012 * utils.c (decimal2str): Eliminate dead code and dead param.
12013 (pulongest): Drop dead param from call to decimal2str.
12014 (plongest): Ditto.
12015
633ff500
JB
120162011-02-24 Joel Brobecker <brobecker@adacore.com>
12017
12018 Revert the following patch (not approved yet):
12019 2011-02-21 Hui Zhu <teawater@gmail.com>
12020 * tracepoint.c (tp_printf): New function.
12021 (eval_agent_expr): Handle gdb_agent_op_printf.
12022
f9c6ff72
HZ
120232011-02-21 Hui Zhu <teawater@gmail.com>
12024
12025 * tracepoint.c (tp_printf): New function.
12026 (eval_agent_expr): Handle gdb_agent_op_printf.
12027
94d5e490
TT
120282011-02-18 Tom Tromey <tromey@redhat.com>
12029
12030 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12031 (tracepoint.o): Likewise.
12032 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12033 (gdb_agent_op_names): Likewise.
12034
c7f96d2b
TT
120352011-02-18 Tom Tromey <tromey@redhat.com>
12036
12037 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12038 gdb_agent_op_rot>: New constants.
12039 (gdb_agent_op_names): Add pick and roll.
12040 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12041 cases.
12042
0feedb2c
JK
120432011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12044
12045 * aclocal.m4: Regenerated with aclocal-1.11.1.
12046
b3b9301e
PA
120472011-02-14 Pedro Alves <pedro@codesourcery.com>
12048
12049 * server.c (handle_qxfer_traceframe_info): New.
12050 (qxfer_packets): Register "traceframe-info".
12051 (handle_query): Report support for qXfer:traceframe-info:read+.
12052 * tracepoint.c (match_blocktype): New.
12053 (traceframe_find_block_type): Rename to ...
12054 (traceframe_walk_blocks): ... this. Add callback filter argument,
12055 and use it.
12056 (traceframe_find_block_type): New, reimplemented on top of
12057 traceframe_walk_blocks.
12058 (build_traceframe_info_xml): New.
12059 (traceframe_read_info): New.
12060 * server.h (traceframe_read_info): Declare.
12061
4f3e6fb7
YQ
120622011-02-11 Yao Qi <yao@codesourcery.com>
12063
12064 * configure.ac: Call AC_PROG_RANLIB.
12065 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12066 * configure: Regenerate.
12067
764880b7
PA
120682011-02-07 Pedro Alves <pedro@codesourcery.com>
12069
12070 * server.c (gdb_read_memory): Change return semantics to allow
12071 partial transfers.
12072 (handle_search_memory_1): Adjust.
12073 (process_serial_event) <'m' packet>: Handle partial transfers.
12074 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12075
1c79eb8a
PA
120762011-01-28 Pedro Alves <pedro@codesourcery.com>
12077
12078 * regcache.c (init_register_cache): Initialize
12079 regcache->register_status.
12080 (free_register_cache): Release regcache->register_status.
12081 (regcache_cpy): Copy register_status.
12082 (registers_to_string): Print 'x's for unavailable registers.
12083 (supply_register): Mark the register's status valid or
12084 unavailable, depending on whether a buffer was passed in or not.
12085 (supply_register_zeroed): New.
12086 (supply_regblock): Mark the registers' status valid or
12087 unavailable, depending on whether a buffer was passed in or not.
12088 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12089 (struct regcache): New `register_status' field.
12090 (supply_register_zeroed): Declare.
12091 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12092 supply_register_zeroed, rather than passing a NULL buffer to
12093 supply_register.
12094 * tracepoint.c (fetch_traceframe_registers): Update comment.
12095
85724a0e
PA
120962011-01-28 Pedro Alves <pedro@codesourcery.com>
12097
12098 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12099 buffer explicit.
12100
d08aafef
PA
121012011-01-25 Pedro Alves <pedro@codesourcery.com>
12102
12103 * server.h (decode_xfer_write): Change prototype.
12104 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12105 and don't extract the annex here.
12106 * server.c (decode_xfer_read): Remove `annex' parameter,
12107 and don't extract the annex here.
12108 (decode_xfer): New.
12109 (struct qxfer): New.
12110 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12111 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12112 (handle_qxfer_statictrace): New functions, abstracted out from
12113 handle_query, and made to use the struct qxfer interface.
12114 (handle_threads_qxfer_proper): Rename to ...
12115 (handle_qxfer_threads_proper): ... this.
12116 (handle_threads_qxfer): Rename to ...
12117 (handle_qxfer_threads): ... this. Adjust.
12118 (qxfer_packets): New array.
12119 (handle_qxfer): New function.
12120 (handle_query): Use handle_qxfer.
12121
493e2a69
MS
121222011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12123
12124 * gdbreplay.c: Shorten lines of >= 80 columns.
12125 * linux-low.c: Ditto.
12126 * linux-ppc-low.c: Ditto.
12127 * linux-s390-low.c: Ditto.
12128 * linux-sparc-low.c: Ditto.
12129 * linux-x86-low.c: Ditto.
12130 * linux-xtensa-low.c: Ditto.
12131 * mem-break.c: Ditto.
12132 * nto-low.c: Ditto.
12133 * regcache.h: Ditto.
12134 * remote-utils.c: Ditto.
12135 * server.c: Ditto.
12136 * server.h: Ditto.
12137 * thread-db.c: Ditto.
12138 * tracepoint.c: Ditto.
12139 * utils.c: Ditto.
12140 * win32-low.h: Ditto.
12141
44944448
JB
121422011-01-05 Joel Brobecker <brobecker@adacore.com>
12143
12144 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12145 update.
12146
71ce852c
JB
121472011-01-01 Joel Brobecker <brobecker@adacore.com>
12148
12149 * server.c (gdbserver_version): Update copyright year in version
12150 output.
12151 * gdbreplay.c (gdbreplay_version): Ditto.
12152
eb826dc6
MF
121532010-12-29 Jie Zhang <jie.zhang@analog.com>
12154
12155 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12156 * linux-bfin-low.c: New file.
12157 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12158 PT_DATA_ADDR for BFIN targets.
12159 * Makefile.in (SFILES): Add linux-bfin-low.c.
12160 (clean): Remove reg-bfin.c.
12161 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12162 * README: Mention supported Blackfin targets.
12163
39ab222a
MF
121642010-12-23 Mike Frysinger <vapier@gentoo.org>
12165
12166 * .gitignore: New file.
12167
a1f2ce7d
MF
121682010-11-16 Mike Frysinger <vapier@gentoo.org>
12169
12170 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12171
f474844c
JZ
121722010-10-22 Jie Zhang <jie@codesourcery.com>
12173
12174 * Makefile.in: Add FLAGS_TO_PASS variable.
12175 (install): Remove dependency of install-only and recursively
12176 invoke make for install-only.
12177
f1048712
DE
121782010-10-04 Doug Evans <dje@google.com>
12179
12180 * Makefile.in (uninstall): Use $(DESTDIR).
12181
b53a1623
PA
121822010-09-24 Pedro Alves <pedro@codesourcery.com>
12183
e6ee044d
PA
12184 PR gdb/11842
12185
b53a1623
PA
12186 * linux-x86-low.c (compat_siginfo_from_siginfo)
12187 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12188 si_code is < 0. Check for si_code == SI_TIMER before checking for
12189 si_code < 0.
12190
fa1bd1e4
JB
121912010-09-13 Joel Brobecker <brobecker@adacore.com>
12192
12193 * lynx-i386-low.c: New file.
12194 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12195
47fac8f8
JB
121962010-09-13 Joel Brobecker <brobecker@adacore.com>
12197
12198 * lynx-low.c (ptrace_request_to_str): Remove handling for
12199 request values that have been removed in LynxOS 5.x.
12200
1adfc54d
JB
122012010-09-13 Joel Brobecker <brobecker@adacore.com>
12202
12203 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12204 <ptrace.h>
12205
c2a66c29
NS
122062010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12207
12208 * configure.ac: Add --enable-inprocess-agent option.
12209 * configure: Rebuilt.
12210
32fcada3
YQ
122112010-09-06 Yao Qi <yao@codesourcery.com>
12212
12213 * linux-low.c (linux_kill): Remove unused variable.
12214 (linux_stabilize_threads): Likewise.
12215 * server.c (start_inferior): Likewise.
12216 (queue_stop_reply_callback): Likewise.
12217 * tracepoint.c (do_action_at_tracepoint): Likewise.
12218
0cccb683
YQ
122192010-09-06 Yao Qi <yao@codesourcery.com>
12220
12221 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12222 on return.
12223
423ec54c
JK
122242010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12225
12226 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12227
12ac6819
PA
122282010-09-06 Pedro Alves <pedro@codesourcery.com>
12229
12230 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12231 "$(IPA_DEPFILES)".
12232
8ed54b31
JB
122332010-09-01 Joel Brobecker <brobecker@adacore.com>
12234
12235 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12236 gdbserver/lynx-ppc-low.c: New files.
12237 * Makefile.in (lynx_low_h): New variable.
12238 (lynx-low.o, lynx-ppc-low.o): New rules.
12239 * configure.ac: On LynxOS, link with -lnetinet.
12240 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12241 * configure: regenerate.
12242
bb0116a4
JB
122432010-09-01 Joel Brobecker <brobecker@adacore.com>
12244
12245 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12246 * configure.ac: Add check for vasprintf and vsnprintf.
12247 * configure, config.in: Regenerate.
12248 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12249
a778ab81 122502010-09-01 Joel Brobecker <brobecker@adacore.com>
12251
12252 * gdbreplay.c: Move include of alloca.h up, next to include of
12253 malloc.h.
12254 * server.h: Add include of malloc.h.
12255 * mem-break.c: Remove include of malloc.h.
12256 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12257
8b034a19 122582010-09-01 Joel Brobecker <brobecker@adacore.com>
12259
12260 * Makefile.in (memmem.o): Build with -Wno-error.
12261
122622010-09-01 Joel Brobecker <brobecker@adacore.com>
12263
12264 * utils.c (xsnprintf): Make non-static.
12265 * server.h: Add xsnprintf declaration.
12266 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12267 replace calls to snprintf by calls to xsnprintf throughout.
12268
122692010-09-01 Joel Brobecker <brobecker@adacore.com>
12270
12271 * configure.ac: Add configure check for alloca.
12272 * configure, config.in: Regenerate.
12273 * server.h: Include alloca.h if it exists.
12274 * gdbreplay.c: Include alloca.h if it exists.
12275
1a981360
PA
122762010-08-28 Pedro Alves <pedro@codesourcery.com>
12277
12278 * linux-low.c (__SIGRTMIN): Define if not already defined.
12279 (linux_create_inferior): Check for __ANDROID__ rather than
12280 __SIGRTMIN.
12281 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12282 are already deferred.
12283 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12284 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12285 stopped and already has a pending signal to report.
12286 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12287 a pending signal to report or is moving out of a jump pad.
12288 (linux_init_signals): Check for __ANDROID__ rather than
12289 __SIGRTMIN.
12290
b4d51a55
PA
122912010-08-28 Pedro Alves <pedro@codesourcery.com>
12292
12293 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12294 debug_threads check. Avoid a linear search when not doing debug
12295 output.
12296
ec48365d
PA
122972010-08-27 Pedro Alves <pedro@codesourcery.com>
12298
12299 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12300 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12301 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12302 (process_event): Change local fd's type to gdb_fildes_t.
12303 (create_file_handler): Adjust prototype.
12304 (delete_file_handler): Adjust prototype.
12305 (handle_file_event): Adjust prototype. Use pfildes.
12306 (create_file_event): Adjsut prototype.
12307 * remote-utils.c (remote_desc, listen_desc): Change type to
12308 gdb_fildes_t.
12309 * server.h: New gdb_fildes_t typedef.
12310 [USE_WIN32API]: Include winsock2.h.
12311 (delete_file_handler, add_file_handler): Adjust prototypes.
12312 (pfildes): Declare.
12313 * utils.c (pfildes): New.
12314
854d88f0
PA
123152010-08-27 Pedro Alves <pedro@codesourcery.com>
12316
12317 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12318 * configure: Regenerate.
12319
0146f85b
PA
123202010-08-27 Pedro Alves <pedro@codesourcery.com>
12321
12322 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12323 (linux_done_accessing_memory): ... this.
12324 (linux_target_ops): Adjust.
12325 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12326 * nto-low.c (nto_target_ops): Adjust comment.
12327 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12328 * spu-low.c (spu_target_ops): Adjust comment.
12329 * target.h (target_ops): Rename unprepare_to_access_memory field
12330 to done_accessing_memory.
12331 (unprepare_to_access_memory): Rename to ...
12332 (done_accessing_memory): ... this.
12333
90d74c30
PA
123342010-08-26 Pedro Alves <pedro@codesourcery.com>
12335
12336 * linux-low.c (linux_prepare_to_access_memory): New.
12337 (linux_unprepare_to_access_memory): New.
12338 (linux_target_ops): Install them.
12339 * server.c (read_memory): Rename to ...
12340 (gdb_read_memory): ... this. Use
12341 prepare_to_access_memory/prepare_to_access_memory.
12342 (write_memory): Rename to ...
12343 (gdb_write_memory): ... this. Use
12344 prepare_to_access_memory/prepare_to_access_memory.
12345 (handle_search_memory_1): Adjust.
12346 (process_serial_event): Adjust.
12347 * target.h (struct target_ops): New fields
12348 prepare_to_access_memory and unprepare_to_access_memory.
12349 (prepare_to_access_memory, unprepare_to_access_memory): New.
12350 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12351 prepare_to_access_memory/prepare_to_access_memory.
12352 * nto-low.c (nto_target_ops): Adjust.
12353 * spu-low.c (spu_target_ops): Adjust.
12354 * win32-low.c (win32_target_ops): Adjust.
12355
fd467969
PA
123562010-08-26 Pedro Alves <pedro@codesourcery.com>
12357
12358 * Makefile.in (WARN_CFLAGS): Get it from configure.
12359 (WERROR_CFLAGS): New.
12360 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12361 * configure.ac: Introduce --enable-werror, which adds -Werror to
12362 the compiler command line. Enabled by default. Disable with
12363 --disable-werror. Add -Wdeclaration-after-statement
12364 Wpointer-arith and -Wformat-nonliteral to warning flags.
12365 * configure: Regenerate.
12366
331e2f5f
PA
123672010-08-26 Pedro Alves <pedro@codesourcery.com>
12368
12369 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12370
e581f2b4
PA
123712010-08-26 Pedro Alves <pedro@codesourcery.com>
12372
12373 * gdbreplay.c (remote_error): New.
12374 (gdbchar): New.
12375 (expect): Use gdbchar. Check for error reading from GDB.
12376 Clarify sync error output.
12377 (play): Check for errors writing to GDB.
12378 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12379 * remote-utils.c (getpkt): Check for errors writing to the remote
12380 descriptor.
12381
3c11dd79
PA
123822010-08-25 Pedro Alves <pedro@codesourcery.com>
12383
12384 * linux-low.c (linux_wait_1): Move non-debugging code out of
12385 `debug_threads' control.
12386
d20a8ad9
PA
123872010-08-25 Pedro Alves <pedro@codesourcery.com>
12388
12389 * linux-low.c (linux_wait_1): Don't set last_status here.
12390 * server.c (push_event, queue_stop_reply_callback): Assert we're
12391 not pushing a TARGET_WAITKIND_IGNORE event.
12392 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12393 (myresume, handle_target_event): Set the thread's last_resume_kind
12394 and last_status from the target returned status.
12395
964e4306
PA
123962010-08-25 Pedro Alves <pedro@codesourcery.com>
12397
12398 PR threads/10729
12399
12400 * linux-x86-low.c (update_debug_registers_callback): New.
12401 (i386_dr_low_set_addr): Use it.
12402 (i386_dr_low_get_addr): New.
12403 (i386_dr_low_set_control): Use update_debug_registers_callback.
12404 (i386_dr_low_get_control): New.
12405 (i386_dr_low_get_status): Adjust.
12406 * linux-low.c (linux_stop_lwp): New.
12407 * linux-low.h (linux_stop_lwp): Declare.
12408
12409 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12410 argument instead of a i386_debug_reg_state.
12411 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12412 a i386_debug_reg_state.
12413 (i386_insert_aligned_watchpoint): Adjust.
12414 (i386_remove_aligned_watchpoint): Adjust.
12415 (i386_low_stopped_data_address): Read the debug registers from the
12416 inferior instead of from the mirrors.
12417 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12418 (i386_dr_low_get_addr): Declare.
12419 (i386_dr_low_get_control): Declare.
12420 (i386_dr_low_get_status): Change prototype.
12421
12422 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12423 (i386_dr_low_get_addr): New.
12424 (i386_dr_low_get_control): New.
12425 (i386_dr_low_get_status): Adjust prototype. Return
12426 dr_status_mirror.
12427 (i386_initial_stuff): Clear dr_status_mirror and
12428 dr_control_mirror.
12429 (i386_get_thread_context): Adjust.
12430 (i386_set_thread_context): Adjust.
12431 (i386_thread_added): Adjust.
12432
5f21a75b
PA
124332010-08-24 Pedro Alves <pedro@codesourcery.com>
12434
12435 * linux-low.h (linux_thread_area): Delete declaration.
12436
3e4c1235
TS
124372010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12438
12439 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12440 after its termination.
12441
1971b033
PA
124422010-08-09 Pedro Alves <pedro@codesourcery.com>
12443
12444 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12445 (gdb_wants_all_stopped): Delete.
12446 (linux_wait_1): Don't call them.
12447 * server.c (handle_v_cont): Tag all threads as want-stopped.
12448 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12449 stopped as "client-wants-stopped".
12450
310444ac
PA
124512010-07-31 Pedro Alves <pedro@codesourcery.com>
12452
12453 * Makefile.in (signals_h): New.
12454 (server_h): Depend on it.
12455 (server.o): Don't depend on $(signals_def).
12456 (signals.o): Depend on $(signals_def).
12457
a19cae16
JK
124582010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12459
12460 * Makefile.in (signals_def): New.
12461 (server_h): Append include/gdb/signals.h and signals_def.
12462 (server.o): Append signals_def.
12463
30d50328
JK
124642010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12465
12466 * server.c (handle_target_event): Use target_signal_to_host for
12467 resume_info.sig initialization.
12468 * target.h (struct thread_resume) <sig>: New comment.
12469
5c3216e2
OS
124702010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12471
c6f46ca0
OS
12472 * server.c (handle_query): strcpy() the returned string from paddress()
12473 instead of sprintf().
5c3216e2
OS
12474 * utils.c (paddress): Return phex_nz().
12475
6bd31874
JB
124762010-07-07 Joel Brobecker <brobecker@adacore.com>
12477
12478 * server.c (handle_v_cont): Call mourn_inferior if process
12479 just exited.
12480 (myresume): Likewise.
12481
0fb4aa4b
PA
124822010-07-01 Pedro Alves <pedro@codesourcery.com>
12483
12484 Static tracepoints, and integration with UST.
12485
12486 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12487 * mem-break.c (uninsert_all_breakpoints)
12488 (reinsert_all_breakpoints): New.
12489 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12490 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12491 (gdb_agent_ust_loaded, helper_thread_id)
12492 (gdb_agent_helper_thread_id): New macros.
12493 (struct ipa_sym_addresses): Add addr_ust_loaded,
12494 addr_helper_thread_id, addr_cmd_buf.
12495 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12496 (in_process_agent_loaded_ust): New.
12497 (write_e_ust_not_loaded): New.
12498 (maybe_write_ipa_ust_not_loaded): New.
12499 (struct collect_static_trace_data_action): New.
12500 (enum tracepoint_type) <static_tracepoint>: New.
12501 (struct tracepoint) <handle>: Mention static tracepoints.
12502 (struct static_tracepoint_ctx): New.
12503 (CMD_BUF_SIZE): New.
12504 (add_tracepoint_action): Handle static tracepoint actions.
12505 (unprobe_marker_at): New.
12506 (clear_installed_tracepoints): Handle static tracepoints.
12507 (cmd_qtdp): Handle static tracepoints.
12508 (probe_marker_at): New.
12509 (cmd_qtstart): Handle static tracepoints.
12510 (response_tracepoint): Handle static tracepoints.
12511 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12512 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12513 (get_context_regcache): Handle static tracepoints.
12514 (do_action_at_tracepoint): Handle static tracepoint actions.
12515 (traceframe_find_block_type): Handle static trace data blocks.
12516 (traceframe_read_sdata): New.
12517 (download_tracepoints): Download static tracepoint actions.
12518 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12519 (GDB_PROBE_NAME): New.
12520 (ust_ops): New.
12521 (GET_UST_SYM): New.
12522 (USTF): New.
12523 (dlsym_ust): New.
12524 (ust_marker_to_static_tracepoint): New.
12525 (gdb_probe): New.
12526 (collect_ust_data_at_tracepoint): New.
12527 (gdb_ust_probe): New.
12528 (UNIX_PATH_MAX, SOCK_DIR): New.
12529 (gdb_ust_connect_sync_socket): New.
12530 (resume_thread, stop_thread): New.
12531 (run_inferior_command): New.
12532 (init_named_socket): New.
12533 (gdb_ust_socket_init): New.
12534 (cstr_to_hexstr): New.
12535 (next_st): New.
12536 (first_marker, next_marker): New.
12537 (response_ust_marker): New.
12538 (cmd_qtfstm, cmd_qtsstm): New.
12539 (unprobe_marker_at, probe_marker_at): New.
12540 (cmd_qtstmat, gdb_ust_thread): New.
12541 (gdb_ust_init): New.
12542 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12543 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12544 (ST_REGENTRY): New.
12545 (x86_64_st_collect_regmap): New.
12546 (X86_64_NUM_ST_COLLECT_GREGS): New.
12547 (AMD64_RIP_REGNUM): New.
12548 (supply_static_tracepoint_registers): New.
12549 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12550 (ST_REGENTRY): New.
12551 (i386_st_collect_regmap): New.
12552 (i386_NUM_ST_COLLECT_GREGS): New.
12553 (supply_static_tracepoint_registers): New.
12554 * server.c (handle_query): Handle qXfer:statictrace:read.
12555 <qSupported>: Report support for StaticTracepoints, and
12556 qXfer:statictrace:read features.
12557 * server.h (traceframe_read_sdata)
12558 (supply_static_tracepoint_registers): Declare.
12559 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12560 (unpack_varlen_hex): Include in IPA build.
12561 * Makefile.in (ustlibs, ustinc): New.
12562 (IPA_OBJS): Add remote-utils-ipa.o.
12563 ($(IPA_LIB)): Link -ldl and -lpthread.
12564 (UST_CFLAGS): New.
12565 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12566 * config.in, configure: Regenerate.
12567
9e4344e5
PA
125682010-06-20 Ian Lance Taylor <iant@google.com>
12569 Pedro Alves <pedro@codesourcery.com>
12570
12571 * linux-x86-low.c (always_true): Delete.
12572 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12573 trying to fool the compiler with always_true.
12574
c6beb2cb
PA
125752010-06-20 Pedro Alves <pedro@codesourcery.com>
12576
12577 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12578 conditions in gdbserver.
12579
d2ed6730
UW
125802010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12581
12582 * spu-low.c (spu_read_memory): Wrap around local store limit.
12583 (spu_write_memory): Likewise.
12584
4e29fb54
PA
125852010-06-15 Pedro Alves <pedro@codesourcery.com>
12586
12587 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12588 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12589 LONGEST uses.
12590 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12591 uses.
12592 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12593 uses with LONGEST uses.
12594
6a271cae
PA
125952010-06-14 Stan Shebs <stan@codesourcery.com>
12596 Pedro Alves <pedro@codesourcery.com>
12597
12598 Bytecode compiler.
12599
12600 * linux-x86-low.c: Include limits.h.
12601 (add_insns): New.
12602 (always_true): New.
12603 (EMIT_ASM): New.
12604 (EMIT_ASM32): New.
12605 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12606 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12607 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12608 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12609 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12610 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12611 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12612 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12613 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12614 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12615 (amd64_emit_void_call_2): New.
12616 (amd64_emit_ops): New.
12617 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12618 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12619 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12620 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12621 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12622 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12623 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12624 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12625 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12626 (i386_emit_stack_adjust, i386_emit_int_call_1)
12627 (i386_emit_void_call_2): New.
12628 (i386_emit_ops): New.
12629 (x86_emit_ops): New.
12630 (the_low_target): Install x86_emit_ops.
12631 * server.h (struct emit_ops): New.
12632 (get_raw_reg_func_addr): Declare.
12633 (current_insn_ptr, emit_error): Declare.
12634 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12635 (set_trace_state_variable_value): New defines.
12636 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12637 addr_get_trace_state_variable_value and
12638 addr_set_trace_state_variable_value.
12639 (symbol_list): New fields for get_raw_reg,
12640 get_trace_state_variable_value and set_trace_state_variable_value.
12641 (condfn): New typedef.
12642 (struct tracepoint): New field `compiled_cond'.
12643 (do_action_at_tracepoint): Clear compiled_cond.
12644 (get_trace_state_variable_value, set_trace_state_variable_value):
12645 Export in the IPA.
12646 (condition_true_at_tracepoint): If there's a compiled condition,
12647 run that.
12648 (current_insn_ptr, emit_error): New globals.
12649 (struct bytecode_address): New.
12650 (get_raw_reg_func_addr): New.
12651 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12652 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12653 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12654 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12655 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12656 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12657 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12658 (compile_tracepoint_condition, compile_bytecodes): New.
12659 * target.h (emit_ops): Forward declare.
12660 (struct target_ops): New field emit_ops.
12661 (target_emit_ops): New.
12662 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12663 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12664 * linux-low.c (linux_emit_ops): New.
12665 (linux_target_ops): Install it.
12666 * linux-low.h (struct linux_target_ops): New field emit_ops.
12667
92b72907
UW
126682010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12669
12670 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12671 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12672
fa593d66
PA
126732010-06-01 Pedro Alves <pedro@codesourcery.com>
12674 Stan Shebs <stan@codesourcery.com>
12675
12676 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12677 (all): Depend on $(extra_libraries).
12678 (install-only): Install the IPA.
12679 (IPA_OBJS, IPA_LIB): New.
12680 (clean): Remove the IPA lib.
12681 (IPAGENT_CFLAGS): New.
12682 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12683 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12684 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12685 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12686 * configure.ac: Check for atomic builtins support in the compiler.
12687 (IPA_DEPFILES, extra_libraries): Define.
12688 * configure.srv (ipa_obj): Add description.
12689 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12690 (i[34567]86-*-linux*): Set ipa_obj.
12691 (x86_64-*-linux*): Set ipa_obj.
12692 * linux-low.c (stabilizing_threads): New.
12693 (supports_fast_tracepoints): New.
12694 (linux_detach): Stabilize threads before detaching.
12695 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12696 the lwp is either not stabilizing, or is moving out of a jump pad.
12697 (linux_fast_tracepoint_collecting): New.
12698 (maybe_move_out_of_jump_pad): New.
12699 (enqueue_one_deferred_signal): New.
12700 (dequeue_one_deferred_signal): New.
12701 (linux_wait_for_event_1): If moving out of a jump pad, defer
12702 pending signals to later.
12703 (linux_stabilize_threads): New.
12704 (linux_wait_1): Check if threads need moving out of jump pads, and
12705 do it if so.
12706 (stuck_in_jump_pad_callback): New.
12707 (move_out_of_jump_pad_callback): New.
12708 (lwp_running): New.
12709 (linux_resume_one_lwp): Handle moving out of jump pads.
12710 (linux_set_resume_request): Dequeue deferred signals.
12711 (need_step_over_p): Also step over fast tracepoint jumps.
12712 (start_step_over): Also uninsert fast tracepoint jumps.
12713 (finish_step_over): Also reinsert fast tracepoint jumps.
12714 (linux_install_fast_tracepoint_jump): New.
12715 (linux_target_ops): Install linux_stabilize_threads and
12716 linux_install_fast_tracepoint_jump_pad.
12717 * linux-low.h (linux_target_ops) <get_thread_area,
12718 install_fast_tracepoint_jump_pad>: New fields.
12719 (struct lwp_info) <collecting_fast_tracepoint,
12720 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12721 (linux_get_thread_area): Declare.
12722 * linux-x86-low.c (jump_insn): New.
12723 (x86_get_thread_area): New.
12724 (append_insns): New.
12725 (push_opcode): New.
12726 (amd64_install_fast_tracepoint_jump_pad): New.
12727 (i386_install_fast_tracepoint_jump_pad): New.
12728 (x86_install_fast_tracepoint_jump_pad): New.
12729 (the_low_target): Install x86_get_thread_area and
12730 x86_install_fast_tracepoint_jump_pad.
12731 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12732 (struct fast_tracepoint_jump): New.
12733 (fast_tracepoint_jump_insn): New.
12734 (fast_tracepoint_jump_shadow): New.
12735 (find_fast_tracepoint_jump_at): New.
12736 (fast_tracepoint_jump_here): New.
12737 (delete_fast_tracepoint_jump): New.
12738 (set_fast_tracepoint_jump): New.
12739 (uninsert_fast_tracepoint_jumps_at): New.
12740 (reinsert_fast_tracepoint_jumps_at): New.
12741 (set_breakpoint_at): Use write_inferior_memory.
12742 (uninsert_raw_breakpoint): Use write_inferior_memory.
12743 (check_mem_read): Mask out fast tracepoint jumps.
12744 (check_mem_write): Mask out fast tracepoint jumps.
12745 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12746 (set_fast_tracepoint_jump): Declare.
12747 (delete_fast_tracepoint_jump)
12748 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12749 (reinsert_fast_tracepoint_jumps_at): Declare.
12750 * regcache.c: Don't compile many functions when building the
12751 in-process agent library.
12752 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12753 the register buffer in the heap.
12754 (free_register_cache): If the register buffer isn't owned by the
12755 regcache, don't free it.
12756 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12757 pre-existing register caches.
12758 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12759 type.
12760 (convert_ascii_to_int): : Constify `from' parameter type.
12761 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12762 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12763 the needed buffer in-place.
12764 (relocate_instruction): New.
12765 * server.c (handle_query) <qSymbols>: If the target supports
12766 tracepoints, give it a chance of looking up symbols. Report
12767 support for fast tracepoints.
12768 (handle_status): Stabilize threads.
12769 (process_serial_event): Adjust.
12770 * server.h (struct fast_tracepoint_jump): Forward declare.
12771 (struct process_info) <fast_tracepoint_jumps>: New field.
12772 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12773 (decode_X_packet, decode_M_packet): Adjust.
12774 (relocate_instruction): Declare.
12775 (in_process_agent_loaded): Declare.
12776 (tracepoint_look_up_symbols): Declare.
12777 (struct fast_tpoint_collect_status): Declare.
12778 (fast_tracepoint_collecting): Declare.
12779 (force_unlock_trace_buffer): Declare.
12780 (handle_tracepoint_bkpts): Declare.
12781 (initialize_low_tracepoint)
12782 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12783 * target.h (struct target_ops) <stabilize_threads,
12784 install_fast_tracepoint_jump_pad>: New fields.
12785 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12786 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12787 [HAVE_STDINT_H]: Include stdint.h.
12788 (trace_debug_1): Rename to ...
12789 (trace_vdebug): ... this.
12790 (trace_debug): Rename to ...
12791 (trace_debug_1): ... this. Add `level' parameter.
12792 (trace_debug): New.
12793 (ATTR_USED, ATTR_NOINLINE): New.
12794 (IP_AGENT_EXPORT): New.
12795 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12796 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12797 (about_to_request_buffer_space, trace_buffer_is_full)
12798 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12799 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12800 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12801 (traceframe_write_count, traceframes_created)
12802 (trace_state_variables)
12803 New renaming defines.
12804 (struct ipa_sym_addresses): New.
12805 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12806 (symbol_list): New.
12807 (ipa_sym_addrs): New.
12808 (all_tracepoint_symbols_looked_up): New.
12809 (in_process_agent_loaded): New.
12810 (write_e_ipa_not_loaded): New.
12811 (maybe_write_ipa_not_loaded): New.
12812 (tracepoint_look_up_symbols): New.
12813 (debug_threads) [IN_PROCESS_AGENT]: New.
12814 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12815 (UNKNOWN_SIDE_EFFECTS): New.
12816 (stop_tracing): New.
12817 (flush_trace_buffer): New.
12818 (stop_tracing_bkpt): New.
12819 (flush_trace_buffer_bkpt): New.
12820 (read_inferior_integer): New.
12821 (read_inferior_uinteger): New.
12822 (read_inferior_data_pointer): New.
12823 (write_inferior_data_pointer): New.
12824 (write_inferior_integer): New.
12825 (write_inferior_uinteger): New.
12826 (struct collect_static_trace_data_action): Delete.
12827 (enum tracepoint_type): New.
12828 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12829 <actions_str, step_actions, step_actions_str>: Only include in
12830 GDBserver.
fa593d66
PA
12831 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12832 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12833 (tracepoints): Use IP_AGENT_EXPORT.
12834 (last_tracepoint): Don't include in the IPA.
12835 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12836 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12837 (alloced_trace_state_variables): New.
12838 (trace_state_variables): Use IP_AGENT_EXPORT.
12839 (traceframe_t): Delete unused variable.
12840 (circular_trace_buffer): Don't include in the IPA.
12841 (trace_buffer_start): Delete.
12842 (struct trace_buffer_control): New.
12843 (trace_buffer_free): Delete.
12844 (struct ipa_trace_buffer_control): New.
12845 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12846 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12847 New.
12848 (trace_buffer_ctrl): New.
12849 (TRACE_BUFFER_CTRL_CURR): New.
12850 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12851 Reimplement as macros.
12852 (trace_buffer_wrap): Delete.
12853 (traceframe_write_count, traceframe_read_count)
12854 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12855 (struct tracepoint_hit_ctx) <type>: New field.
12856 (struct fast_tracepoint_ctx): New.
12857 (memory_barrier): New.
12858 (cmpxchg): New.
12859 (record_tracepoint_error): Update atomically in the IPA.
12860 (clear_inferior_trace_buffer): New.
12861 (about_to_request_buffer_space): New.
12862 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12863 updating the same buffer.
12864 (add_tracepoint): Default the tracepoint's type to trap
12865 tracepoint, and orig_size to -1.
12866 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12867 internal variables.
12868 (create_trace_state_variable): New parameter `gdb'. Handle it.
12869 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12870 (cmd_qtdp): Handle fast tracepoints.
12871 (cmd_qtdv): Adjust.
12872 (max_jump_pad_size): New.
12873 (gdb_jump_pad_head): New.
12874 (get_jump_space_head): New.
12875 (claim_jump_space): New.
12876 (sort_tracepoints): New.
12877 (MAX_JUMP_SIZE): New.
12878 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12879 IPA.
12880 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12881 support. Upload fast traceframes, and delete internal IPA
12882 breakpoints.
12883 (stop_tracing_handler): New.
12884 (flush_trace_buffer_handler): New.
12885 (cmd_qtstop): Upload fast tracepoints.
12886 (response_tracepoint): Handle fast tracepoints.
12887 (tracepoint_finished_step): Upload fast traceframes. Set the
12888 tracepoint hit context's tracepoint type.
12889 (handle_tracepoint_bkpts): New.
12890 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12891 type. Add comment about fast tracepoints.
12892 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12893 non-existing action_str field.
12894 (get_context_regcache): Handle fast tracepoints.
12895 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12896 to the regcache.
12897 (fast_tracepoint_from_jump_pad_address): New.
12898 (fast_tracepoint_from_ipa_tpoint_address): New.
12899 (collecting_t): New.
12900 (force_unlock_trace_buffer): New.
12901 (fast_tracepoint_collecting): New.
12902 (collecting): New.
12903 (gdb_collect): New.
12904 (write_inferior_data_ptr): New.
12905 (target_tp_heap): New.
12906 (target_malloc): New.
12907 (download_agent_expr): New.
12908 (UALIGN): New.
12909 (download_tracepoints): New.
12910 (download_trace_state_variables): New.
12911 (upload_fast_traceframes): New.
12912 (IPA_FIRST_TRACEFRAME): New.
12913 (IPA_NEXT_TRACEFRAME_1): New.
12914 (IPA_NEXT_TRACEFRAME): New.
12915 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12916 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12917 (gdb_jump_pad_buffer_end): New.
12918 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12919 (initialize_tracepoint): Adjust.
12920 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12921 buffer. Initialize the low module.
12922 * utils.c (PREFIX, TOOLNAME): New.
12923 (malloc_failure): Use PREFIX.
12924 (error): In the IPA, an error causes an exit.
12925 (fatal, warning): Use PREFIX.
12926 (internal_error): Use TOOLNAME.
12927 (NUMCELLS): Increase to 10.
12928 * configure, config.in: Regenerate.
12929
d149dd1d
PA
129302010-06-01 Pedro Alves <pedro@codesourcery.com>
12931
12932 * server.c (handle_query) <qSupported>: Do two passes over the
12933 qSupported string to avoid nesting strtok.
12934
f6528abd
JK
129352010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12936
12937 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12938 (CDEPS): New.
12939 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12940 -Wl,--dynamic-list.
12941 * configure: Regenerate.
12942 * proc-service.list: New.
12943
ca2a87a0
JK
129442010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12945
12946 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12947 New comment.
12948
363a6e9f
OS
129492010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12950
12951 * gdbreplay.c (remote_open): Check error return from socket() call by
12952 its equality to -1 not by it being negative.
12953 * remote-utils.c (remote_open): Likewise.
12954
d23b6cb1
PA
129552010-05-23 Pedro Alves <pedro@codesourcery.com>
12956
12957 * config.h: Regenerate.
12958
28d3cf85
MK
129592010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12960
12961 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12962 doesn't provide PTRACE_GET_THREAD_AREA.
12963
fea36a59
MK
129642010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12965
12966 * linux-m68k-low.c: Include <asm/ptrace.h>
12967 (ps_get_thread_area): Implement.
12968
24b066ba
DE
129692010-05-03 Doug Evans <dje@google.com>
12970
12971 * event-loop.c (struct callback_event): New struct.
12972 (callback_list): New global.
12973 (append_callback_event, delete_callback_event): New functions.
12974 (process_callback): New function.
12975 (start_event_loop): Call it.
12976 * remote-utils.c (NOT_SCHEDULED): Define.
12977 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12978 moved out of readchar.
12979 (readchar): Rewrite. Call reschedule before returning.
12980 (reset_readchar): New function.
12981 (remote_close): Call it.
12982 (process_remaining, reschedule): New functions.
12983 * server.h (callback_handler_func): New typedef.
12984 (append_callback_event, delete_callback_event): Declare.
12985
9836d6ea
PA
129862010-05-03 Pedro Alves <pedro@codesourcery.com>
12987
12988 * proc-service.c (ps_pglobal_lookup): Use
12989 thread_db_look_up_one_symbol.
12990 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12991 parameter. Use it instead of all_symbols_looked_up.
12992 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12993 field.
12994 (all_symbols_looked_up): Don't declare.
12995 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12996 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12997 field.
12998 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12999 Set all_symbols_looked_up here.
13000 (thread_db_look_up_one_symbol): New.
13001 (thread_db_get_tls_address): Adjust.
13002 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13003 thread_db object on the heap, and tentatively set it in the
13004 process structure.
13005 (thread_db_init): Don't set all_symbols_looked_up here.
13006 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13007
7984d532
PA
130082010-05-03 Pedro Alves <pedro@codesourcery.com>
13009
13010 * linux-low.c (linux_kill, linux_detach): Adjust.
13011 (status_pending_p_callback): Remove redundant statement. Check
13012 for !TARGET_WAITIKIND_IGNORE, instead of
13013 TARGET_WAITKIND_STOPPED.
13014 (handle_tracepoints): Make sure LWP is locked. Adjust.
13015 (linux_wait_for_event_1): Adjust.
13016 (linux_cancel_breakpoints): New.
13017 (unsuspend_one_lwp): New.
13018 (unsuspend_all_lwps): New.
13019 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13020 (send_sigstop_callback): Change return type to int, add new
13021 `except' parameter and handle it.
13022 (suspend_and_send_sigstop_callback): New.
13023 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13024 pass them down. If SUSPEND, also increment the lwp's suspend
13025 count.
13026 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13027 (need_step_over_p): Don't consider suspended LWPs.
13028 (start_step_over): Adjust.
13029 (proceed_one_lwp): Change return type to int, add new `except'
13030 parameter and handle it.
13031 (unsuspend_and_proceed_one_lwp): New.
13032 (proceed_all_lwps): Use find_inferior instead of
13033 for_each_inferior.
13034 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13035 also decrement the suspend count of LWPs. Pass `except' down,
13036 instead of hacking its suspend count.
13037 (linux_pause_all): Add `freeze' parameter. Adjust.
13038 (linux_unpause_all): New.
13039 (linux_target_ops): Install linux_unpause_all.
13040 * server.c (handle_status): Adjust.
13041 * target.h (struct target_ops): New fields `unpause_all' and
13042 `cancel_breakpoints'. Add new parameter to `pause_all'.
13043 (pause_all): Add new `freeze' parameter.
13044 (unpause_all): New.
13045 (cancel_breakpoints): New.
13046 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13047 cancel breakpoints.
13048 (cmd_qtstart): Pause threads.
13049 (stop_tracing): Pause threads, and cancel breakpoints.
13050 * win32-low.c (win32_target_ops): Adjust.
13051
e471f25b
PA
130522010-05-03 Pedro Alves <pedro@codesourcery.com>
13053
13054 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13055 the inferior right away from here...
13056 (linux_wait_1): ... to here, and adjust to check the thread's
13057 last_resume_kind instead of the lwp's step or stop_expected flags.
13058
1915ef4f
PA
130592010-05-02 Pedro Alves <pedro@codesourcery.com>
13060
13061 * README: Use consistent `GDB' and `GDBserver' spellings.
13062
f9e39928
PA
130632010-05-02 Pedro Alves <pedro@codesourcery.com>
13064
13065 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13066 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13067 (linux_detach_one_lwp): Assume the lwp is stopped.
13068 (any_thread_of): Delete.
13069 (linux_detach): Stop all lwps here. Don't blindly delete all
13070 breakpoints.
13071 (delete_lwp_callback): New.
13072 (linux_mourn): Delete all lwps of the process that is gone.
13073 (linux_wait_1): Don't delete the last lwp of the process here.
13074 * mem-break.h (mark_breakpoints_out): Declare.
13075 * mem-break.c (mark_breakpoints_out): New.
13076 (free_all_breakpoints): Use it.
13077 * server.c (handle_target_event): If the process is gone, mark
13078 breakpoints out.
13079 * thread-db.c (struct thread_db) <create_bp>: New field.
13080 (thread_db_enable_reporting): Fix prototype. Store a thread event
13081 breakpoint reference in the thread_db struct.
13082 (thread_db_load_search): Clear the thread_db object.
13083 (try_thread_db_load_1): Ditto.
13084 (switch_to_process): New.
13085 (disable_thread_event_reporting): Use it.
13086 (remove_thread_event_breakpoints): New.
13087 (thread_db_detach, thread_db_mourn): Use it.
13088
1e7fc18c
PA
130892010-05-01 Pedro Alves <pedro@codesourcery.com>
13090
13091 * linux-low.c (linux_enable_event_reporting): New.
13092 (linux_wait_for_event_1, handle_extended_wait): Use it.
13093
02fc4de7
PA
130942010-04-30 Pedro Alves <pedro@codesourcery.com>
13095
13096 * linux-low.c (linux_kill_one_lwp, linux_kill)
13097 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13098 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13099 SIGSTOP even if the LWP is stopped.
13100 (send_sigstop_callback): New.
13101 (stop_all_lwps): Use send_sigstop_callback instead.
13102 (linux_resume_one_thread): Adjust.
13103 (proceed_one_lwp): Still proceed an LWP that the client has
13104 requested to stop, if we haven't reported it as stopped yet. Make
13105 sure that LWPs the client want stopped, have a pending SIGSTOP.
13106
bc3b5632
DE
131072010-04-26 Doug Evans <dje@google.com>
13108
ae1ada35
DE
13109 * server.c (handle_general_set): Make static.
13110
bc3b5632
DE
13111 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13112 Print received char after testing for error/eof instead of before.
13113 (input_interrupt): Tweak comment.
13114
65730243
DE
131152010-04-23 Doug Evans <dje@google.com>
13116
13117 * server.c (start_inferior): Print inferior argv if --debug.
13118
a8ae7dc0
AR
131192010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13120
13121 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13122 * nto-x86-low.c: Include server.h
13123
1c07cc19
PM
131242010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13125
13126 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13127 be consistent with other sources of this directory.
13128 (init_registers_amd64): Correct name of source file of this function
13129 in the comment.
13130
e0a61e09
PM
131312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13132
13133 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13134 64-bit executables.
13135
54709339
PM
131362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13137
13138 * win32-i386-low.c: Add 64-bit support.
13139 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13140 (init_registers_amd64): Declare.
13141 (mappings): Add 64-bit version of array.
13142 (init_windows_x86): New function.
13143 (the_low_target): Change init_arch field to init_windows_x86.
13144
e8f0053d
PM
131452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13146
13147 * win32-low.c: Adapt to support also 64-bit architecture.
13148 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13149 (get_image_name): Use SIZE_T type for local variable `done'.
13150 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13151 (toolhelp_get_dll_name): Idem.
13152 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13153 Use uintptr_t typecast to avoid warning.
13154 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13155 (handle_exception): Use phex_nz to avoid warning.
13156 (win32_wait): Remove unused local variable `process'.
13157
c481e77e
PM
131582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13159
13160 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13161 `amd64-avx.o'.
13162
12ea4b69
PM
131632010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13164
13165 * configure.ac: Use `ws2_32' library for srv_mingw.
13166 * configure: Regenerate.
13167 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13168 * remote-utils.c: Likewise.
13169
f6d1620c
L
131702010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13171
13172 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13173 if __x86_64__ is defined.
13174
8e642873
PM
131752010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13176
13177 * configure: Regenerate.
13178
711e434b
PM
131792010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13180
13181 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13182 * target.h (target_ops): New get_tib_address field.
13183 * win32-low.h (win32_thread_info): Add thread_local_base field.
13184 * win32-low.c (child_add_thread): Add tlb argument.
13185 Set thread_local_base field to TLB.
13186 (get_child_debug_event): Adapt to child_add_thread change.
13187 (win32_get_tib_address): New function.
13188 (win32_target_ops): Set get_tib_address field to
13189 win32_get_tib_address.
13190 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13191
505106cd
PA
131922010-04-12 Pedro Alves <pedro@codesourcery.com>
13193
505106cd
PA
13194 * linux-low.c (linux_mourn): Also remove the process.
13195 * server.c (handle_target_event): Don't remove the process here.
13196 * nto-low.c (nto_mourn): New.
13197 (nto_target_ops): Install it.
13198 * spu-low.c (spu_mourn): New.
13199 (spu_target_ops): Install it.
13200 * win32-low.c (win32_mourn): New.
13201 (win32_target_ops): Install it.
13202
e8470a06
PA
132032010-04-12 Pedro Alves <pedro@codesourcery.com>
13204
13205 * server.h (buffer_xml_printf): Remove redundant `;'.
13206
45ba0d02
PA
132072010-04-12 Pedro Alves <pedro@codesourcery.com>
13208
13209 * regcache.c (set_register_cache): Invalidate regcaches before
13210 changing the register cache layout.
13211 (regcache_invalidate_one): Allow a NULL regcache.
13212 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13213 regcaches before changing the register cache layout or the target
13214 regsets.
13215
59e04013
L
132162010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13217
13218 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13219 variable warning on Linux/x86-64.
13220
8336d594
PA
132212010-04-11 Pedro Alves <pedro@codesourcery.com>
13222
13223 GDBserver disconnected tracing support.
13224
13225 * linux-low.c (linux_remove_process): Delete.
13226 (add_lwp): Don't set last_resume_kind here.
13227 (linux_kill): Use `mourn'.
13228 (linux_detach): Use `thread_db_detach', and `mourn'.
13229 (linux_mourn): New.
13230 (linux_attach_lwp_1): Adjust comment.
13231 (linux_attach): last_resume_kind moved the thread_info; adjust.
13232 (status_pending_p_callback): Adjust.
13233 (linux_wait_for_event_1): Adjust.
13234 (count_events_callback, select_singlestep_lwp_callback)
13235 (select_event_lwp_callback, cancel_breakpoints_callback)
13236 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13237 (proceed_one_lwp): Adjust.
13238 (linux_async): Add debug output.
13239 (linux_thread_stopped): New.
13240 (linux_pause_all): New.
13241 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13242 linux_pause_all.
13243 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13244 (thread_db_free): Delete declaration.
13245 (thread_db_detach, thread_db_mourn): Declare.
13246 * thread-db.c (thread_db_init): Use thread_db_mourn.
13247 (thread_db_free): Delete, split in two.
13248 (disable_thread_event_reporting): New.
13249 (thread_db_detach): New.
13250 (thread_db_mourn): New.
13251
13252 * server.h (struct thread_info) <last_resume_kind>: New field.
13253 <attached>: Add comment.
13254 <gdb_detached>: New field.
13255 (handler_func): Change return type to int.
13256 (handle_serial_event, handle_target_event): Ditto.
13257 (gdb_connected): Declare.
13258 (tracing): Delete.
13259 (disconnected_tracing): Declare.
13260 (stop_tracing): Declare.
13261
13262 * server.c (handle_query) <qSupported>: Report support for
13263 disconnected tracing.
13264 (queue_stop_reply_callback): Account for running threads.
13265 (gdb_wants_thread_stopped): New.
13266 (gdb_wants_all_threads_stopped): New.
13267 (gdb_reattached_process): New.
13268 (handle_status): Clear the `gdb_detached' flag of all processes.
13269 In all-stop, stop all threads.
13270 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13271 (process_serial_event): If the remote connection breaks, or if an
13272 exit was forced with "monitor exit", force an event loop exit.
13273 Handle disconnected tracing on detach.
13274 (handle_serial_event): Adjust.
13275 (handle_target_event): If GDB isn't connected, forward events back
13276 to the inferior, unless the last process exited, in which case,
13277 exit gdbserver. Adjust interface.
13278
13279 * remote-utils.c (remote_open): Don't block in accept. Instead
13280 register an event loop source on the listen socket file
13281 descriptor. Refactor bits into ...
13282 (listen_desc): ... this new global.
13283 (gdb_connected): ... this new function.
13284 (enable_async_notification): ... this new function.
13285 (handle_accept_event): ... this new function.
13286 (remote_close): Clear remote_desc.
13287
13288 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13289
13290 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13291 New fields.
13292 (mourn_inferior): Define.
13293 (target_process_qsupported): Avoid the dangling else problem.
13294 (thread_stopped): Define.
13295 (pause_all): Define.
13296 (target_waitstatus_to_string): Declare.
13297 * target.c (target_waitstatus_to_string): New.
13298
13299 * tracepoint.c (tracing): Make extern.
13300 (disconnected_tracing): New.
13301 (stop_tracing): Make extern. Handle tracing stops due to GDB
13302 disconnecting.
13303 (cmd_qtdisconnected): New.
13304 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13305 (handle_tracepoint_general_set): Handle QTDisconnected.
13306
13307 * event-loop.c (event_handler_func): Change return type to int.
13308 (process_event): Bail out if the event handler wants the event
13309 loop to stop.
13310 (handle_file_event): Ditto.
13311 (start_event_loop): Bail out if the event handler wants the event
13312 loop to stop.
13313
13314 * nto-low.c (nto_target_ops): Adjust.
13315 * spu-low.c (spu_wait): Don't remove the process here.
13316 (spu_target_ops): Adjust.
13317 * win32-low.c (win32_wait): Don't remove the process here.
13318 (win32_target_ops): Adjust.
13319
5d267c4c
PA
133202010-04-11 Pedro Alves <pedro@codesourcery.com>
13321
13322 * regcache.c (realloc_register_cache): Invalidate inferior's
13323 regcache before recreating it.
13324
623ccd72
PA
133252010-04-09 Pedro Alves <pedro@codesourcery.com>
13326
13327 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13328
219f2f23
PA
133292010-04-09 Stan Shebs <stan@codesourcery.com>
13330 Pedro Alves <pedro@codesourcery.com>
13331
13332 * server.h (LONGEST): New.
13333 (struct thread_info) <while_stepping>: New field.
13334 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13335 Declare.
13336 (initialize_tracepoint, handle_tracepoint_general_set)
13337 (handle_tracepoint_query, tracepoint_finished_step)
13338 (tracepoint_was_hit, release_while_stepping_state_list):
13339 (current_traceframe): Declare.
13340 * server.c (handle_general_set): Handle tracepoint packets.
13341 (read_memory): New.
13342 (write_memory): New.
13343 (handle_search_memory_1): Use read_memory.
13344 (handle_query): Report support for conditional tracepoints, trace
13345 state variables, and tracepoint sources. Handle tracepoint
13346 queries.
13347 (main): Initialize the tracepoints module.
13348 (process_serial_event): Handle traceframe reads/writes.
13349
13350 * linux-low.c (handle_tracepoints): New.
13351 (linux_wait_1): Call it.
13352 (linux_resume_one_lwp): Handle while-stepping.
13353 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13354 (linux_target_ops): Install them.
13355 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13356 New field.
13357 * linux-x86-low.c (x86_supports_tracepoints): New.
13358 (the_low_target). Install it.
13359
13360 * mem-break.h (delete_breakpoint): Declare.
13361 * mem-break.c (delete_breakpoint): Make external.
13362
13363 * target.h (struct target_ops): Add `supports_tracepoints',
13364 `read_pc', and `write_pc' fields.
13365 (target_supports_tracepoints): Define.
13366 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13367 (phex_nz): New.
13368
13369 * regcache.h (struct regcache) <registers_owned>: New field.
13370 (init_register_cache, regcache_cpy): Declare.
13371 (regcache_read_pc, regcache_write_pc): Declare.
13372 (register_cache_size): Declare.
13373 (supply_regblock): Declare.
13374 * regcache.c (init_register_cache): New.
13375 (new_register_cache): Use it.
13376 (regcache_cpy): New.
13377 (register_cache_size): New.
13378 (supply_regblock): New.
13379 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13380
219f2f23
PA
13381 * tracepoint.c: New.
13382
13383 * Makefile.in (OBS): Add tracepoint.o.
13384 (tracepoint.o): New rule.
13385
3a13a53b
L
133862010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13387
13388 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13389 (i386-mmx.o): New.
13390 (i386-mmx.c): Likewise.
13391 (i386-mmx-linux.o): Likewise.
13392 (i386-mmx-linux.c): Likewise.
13393
13394 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13395 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13396 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13397 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13398
13399 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13400 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13401 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13402
1570b33e
L
134032010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13404
13405 * Makefile.in (clean): Updated.
13406 (i386-avx.o): New.
13407 (i386-avx.c): Likewise.
13408 (i386-avx-linux.o): Likewise.
13409 (i386-avx-linux.c): Likewise.
13410 (amd64-avx.o): Likewise.
13411 (amd64-avx.c): Likewise.
13412 (amd64-avx-linux.o): Likewise.
13413 (amd64-avx-linux.c): Likewise.
13414
13415 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13416 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13417 (srv_amd64_regobj): Add amd64-avx.o.
13418 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13419 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13420 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13421 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13422 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13423 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13424 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13425
13426 * i387-fp.c: Include "i386-xstate.h".
13427 (i387_xsave): New.
13428 (i387_cache_to_xsave): Likewise.
13429 (i387_xsave_to_cache): Likewise.
13430 (x86_xcr0): Likewise.
13431
13432 * i387-fp.h (i387_cache_to_xsave): Likewise.
13433 (i387_xsave_to_cache): Likewise.
13434 (x86_xcr0): Likewise.
13435
13436 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13437 * linux-crisv32-low.c (target_regsets): Likewise.
13438 * linux-m68k-low.c (target_regsets): Likewise.
13439 * linux-mips-low.c (target_regsets): Likewise.
13440 * linux-ppc-low.c (target_regsets): Likewise.
13441 * linux-s390-low.c (target_regsets): Likewise.
13442 * linux-sh-low.c (target_regsets): Likewise.
13443 * linux-sparc-low.c (target_regsets): Likewise.
13444 * linux-xtensa-low.c (target_regsets): Likewise.
13445
13446 * linux-low.c: Include <sys/uio.h>.
13447 (regsets_fetch_inferior_registers): Support nt_type.
13448 (regsets_store_inferior_registers): Likewise.
13449 (linux_process_qsupported): New.
13450 (linux_target_ops): Add linux_process_qsupported.
13451
13452 * linux-low.h (regset_info): Add nt_type.
13453 (linux_target_ops): Add process_qsupported.
13454
13455 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13456 and <sys/uio.h>.
13457 (init_registers_i386_avx_linux): New.
13458 (init_registers_amd64_avx_linux): Likewise.
13459 (xmltarget_i386_linux_no_xml): Likewise.
13460 (xmltarget_amd64_linux_no_xml): Likewise.
13461 (PTRACE_GETREGSET): Likewise.
13462 (PTRACE_SETREGSET): Likewise.
13463 (x86_fill_xstateregset): Likewise.
13464 (x86_store_xstateregset): Likewise.
13465 (use_xml): Likewise.
13466 (x86_linux_update_xmltarget): Likewise.
13467 (x86_linux_process_qsupported): Likewise.
13468 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13469 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13470 init_registers_i386_linux here. Call
13471 x86_linux_update_xmltarget.
13472 (the_low_target): Add x86_linux_process_qsupported.
13473
13474 * server.c (handle_query): Call target_process_qsupported.
13475
13476 * target.h (target_ops): Add process_qsupported.
13477 (target_process_qsupported): New.
13478
fc7238bb
PA
134792010-04-03 Pedro Alves <pedro@codesourcery.com>
13480
13481 * inferiors.c (add_thread): Set last_status kind to
13482 TARGET_WAITKIND_IGNORE.
13483 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13484 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13485 (linux_wait_1): Move `thread' local definition to block that uses
13486 it. Don't NULL initialize `event_child'.
13487 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13488 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13489 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13490
bdabb078
PA
134912010-04-01 Pedro Alves <pedro@codesourcery.com>
13492
13493 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13494 an extended waitstatus, or by a watchpoint.
13495 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13496 thread was stepping or has been stopped by a watchpoint.
13497
d3bbe7a0
PA
134982010-04-01 Pedro Alves <pedro@codesourcery.com>
13499
13500 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13501 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13502 of another, then delete the previous, and validate all
13503 breakpoints.
13504 (validate_inserted_breakpoint): New.
13505 (delete_disabled_breakpoints): New.
13506 (validate_breakpoints): New.
13507 (check_mem_read): Validate breakpoints before trusting their
13508 shadow. Delete disabled breakpoints.
13509 (check_mem_write): Validate breakpoints before trusting they
13510 should be inserted. Delete disabled breakpoints.
13511 * mem-break.h (validate_breakpoints):
13512 * server.c (handle_query): Validate breakpoints when we see a
13513 qSymbol query.
13514
8b07ae33
PA
135152010-04-01 Pedro Alves <pedro@codesourcery.com>
13516
13517 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13518 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13519 if we could tell there's a GDB breakpoint at stop_pc.
13520 (need_step_over_p): Don't do a step over if we find a GDB
13521 breakpoint at the resume PC.
13522
13523 * mem-break.c (struct raw_breakpoint): New.
13524 (enum bkpt_type): New type `gdb_breakpoint'.
13525 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13526 fields. New field `raw'.
13527 (find_raw_breakpoint_at): New.
13528 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13529 breakpoint instead.
13530 (set_breakpoint_at): Adjust.
13531 (delete_raw_breakpoint): New.
13532 (release_breakpoint): New.
13533 (delete_breakpoint): Rename to...
13534 (delete_breakpoint_1): ... this. Add proc parameter. Use
13535 release_breakpoint. Return ENOENT.
13536 (delete_breakpoint): Reimplement.
13537 (find_breakpoint_at): Delete.
13538 (find_gdb_breakpoint_at): New.
13539 (delete_breakpoint_at): Delete.
13540 (set_gdb_breakpoint_at): New.
13541 (delete_gdb_breakpoint_at): New.
13542 (gdb_breakpoint_here): New.
13543 (set_reinsert_breakpoint): Use release_breakpoint.
13544 (uninsert_breakpoint): Rename to ...
13545 (uninsert_raw_breakpoint): ... this.
13546 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13547 (reinsert_raw_breakpoint): Change parameter type to
13548 raw_breakpoint.
13549 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13550 instead.
13551 (check_breakpoints): Adjust. Use release_breakpoint.
13552 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13553 (breakpoint_inserted_here): Ditto.
13554 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13555 Don't trust the breakpoint's shadow if it is not inserted.
13556 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13557 (delete_all_breakpoints): Adjust.
13558 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13559 use delete_breakpoint_1.
13560
13561 * mem-break.h (breakpoints_supported): Delete declaration.
13562 (set_gdb_breakpoint_at): Declare.
13563 (gdb_breakpoint_here): Declare.
13564 (delete_breakpoint_at): Delete.
13565 (delete_gdb_breakpoint_at): Declare.
13566
13567 * server.h (struct raw_breakpoint): Forward declare.
13568 (struct process_info): New field `raw_breakpoints'.
13569
13570 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13571 breakpoints.
13572
6bf5e0ba
PA
135732010-03-24 Pedro Alves <pedro@codesourcery.com>
13574
13575 * linux-low.c (status_pending_p_callback): Fix comment.
13576 (linux_wait_for_event_1): Move most of the internal breakpoint
13577 handling from here...
13578 (linux_wait_1): ... to here.
13579 (count_events_callback): New.
13580 (select_singlestep_lwp_callback): New.
13581 (select_event_lwp_callback): New.
13582 (cancel_breakpoints_callback): New.
13583 (select_event_lwp): New.
13584 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13585 priority to all LWPs that have had events that should be reported
13586 to the client. Cancel breakpoints when about to reporting the
13587 event to the client, not while stopping lwps. No longer cancel
13588 finished single-steps here.
13589 (cancel_finished_single_step): Delete.
13590 (cancel_finished_single_steps): Delete.
13591
414a389f
PA
135922010-03-24 Pedro Alves <pedro@codesourcery.com>
13593
13594 * mem-break.c (enum bkpt_type): New.
13595 (struct breakpoint): New field `type'.
13596 (set_breakpoint_at): Change return type to struct breakpoint
13597 pointer. Set type to `other_breakpoint' by default.
13598 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13599 in the breakpoint list.
13600 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13601 (reinsert_breakpoint): Rename to ...
13602 (reinsert_raw_breakpoint): ... this.
13603 (reinsert_breakpoints_at): Adjust.
13604 * mem-break.h (struct breakpoint): Declare.
13605 (set_breakpoint_at): Change return type to struct breakpoint
13606 pointer.
13607
2280c721
PA
136082010-03-24 Pedro Alves <pedro@codesourcery.com>
13609
13610 * server.c (handle_query): Assign, not compare.
13611
d50171e4
PA
136122010-03-24 Pedro Alves <pedro@codesourcery.com>
13613
13614 Teach linux gdbserver to step-over-breakpoints.
13615
13616 * linux-low.c (can_hardware_single_step): New.
13617 (supports_breakpoints): New.
13618 (handle_extended_wait): If stopping threads, read the stop pc of
13619 the new cloned LWP.
13620 (get_pc): New.
13621 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13622 low target doesn't support retrieving the PC.
13623 (add_lwp): Set last_resume_kind to resume_continue.
13624 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13625 (linux_attach): Don't clear stop_expected. Set the lwp's
13626 last_resume_kind to resume_stop.
13627 (linux_detach_one_lwp): Don't check for removed breakpoints.
13628 (check_removed_breakpoint): Delete.
13629 (status_pending_p): Rename to ...
13630 (status_pending_p_callback): ... this. Don't check for removed
13631 breakpoints. Don't consider threads that are stopped from GDB's
13632 perspective.
13633 (linux_wait_for_lwp): Always read the stop_pc here.
13634 (cancel_breakpoint): New.
13635 (step_over_bkpt): New global.
13636 (linux_wait_for_event_1): Implement stepping over breakpoints.
13637 (gdb_wants_lwp_stopped): New.
13638 (gdb_wants_all_stopped): New.
13639 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13640 single-step traps here. Store the thread's last reported target
13641 wait status.
13642 (send_sigstop): Don't clear stop_expected. Always set it,
13643 instead.
13644 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13645 (cancel_finished_single_step): New.
13646 (cancel_finished_single_steps): New.
13647 (wait_for_sigstop): Don't cancel finished single-step traps here.
13648 (linux_resume_one_lwp): Don't check for removed breakpoints.
13649 Don't set `step' on non-hardware step archs.
13650 (linux_set_resume_request): Ignore resume_stop requests if already
13651 stopping or stopped. Set the lwp's last_resume_kind.
13652 (resume_status_pending_p): Don't check for removed breakpoints.
13653 (need_step_over_p): New.
13654 (start_step_over): New.
13655 (finish_step_over): New.
13656 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13657 requests. Clear the thread's last reported target waitstatus.
13658 Don't use the `suspended' flag. Don't consider pending breakpoints.
13659 (linux_resume): Start a step-over if necessary.
13660 (proceed_one_lwp): New.
13661 (proceed_all_lwps): New.
13662 (unstop_all_lwps): New.
13663 * linux-low.h (struct lwp_info): Rewrite comment for the
13664 `suspended' flag. Add the `stop_pc' field. Delete the
13665 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13666 Add `'last_resume_kind' and `need_step_over' fields.
13667 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13668 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13669 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13670 (set_raw_breakpoint_at): New.
13671 (set_breakpoint_at): Rewrite to use it.
13672 (reinsert_breakpoint_handler): Delete.
13673 (set_reinsert_breakpoint): New.
13674 (reinsert_breakpoint_by_bp): Delete.
13675 (delete_reinsert_breakpoints): New.
13676 (uninsert_breakpoint): Rewrite.
13677 (uninsert_breakpoints_at): New.
13678 (reinsert_breakpoint): Rewrite.
13679 (reinsert_breakpoints_at): New.
13680 (check_breakpoints): Rewrite.
13681 (breakpoint_here): New.
13682 (breakpoint_inserted_here): New.
13683 (check_mem_read): Adjust.
13684 * mem-break.h (breakpoints_supported, breakpoint_here)
13685 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13686 (reinsert_breakpoint_by_bp): Delete declaration.
13687 (delete_reinsert_breakpoints): Declare.
13688 (reinsert_breakpoint): Delete declaration.
13689 (reinsert_breakpoints_at): Declare.
13690 (uninsert_breakpoint): Delete declaration.
13691 (uninsert_breakpoints_at): Declare.
13692 (check_breakpoints): Adjust prototype.
13693 * server.h: Adjust include order.
13694 (struct thread_info): Declare here. Add a `last_status' field.
13695
30ba68cb
MS
136962010-03-23 Michael Snyder <msnyder@vmware.com>
13697
13698 * server.c (crc32): New function.
13699 (handle_query): Add handling for 'qCRC:' request.
13700
b9a881c2
PA
137012010-03-23 Pedro Alves <pedro@codesourcery.com>
13702
13703 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13704 lwp had been stopped by a watchpoint.
13705
e92d13d5
PA
137062010-03-16 Pedro Alves <pedro@codesourcery.com>
13707
13708 * server.h (internal_error): Declare.
13709 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13710 * utils.c (internal_error): New function.
13711
64daa791
AS
137122010-03-15 Andreas Schwab <schwab@redhat.com>
13713
13714 * configure.srv: Fix typo setting srv_regobj.
13715
f52cd8cd
PA
137162010-03-15 Pedro Alves <pedro@codesourcery.com>
13717
13718 * linux-low.c (fetch_register): Avoid passing a non string literal
13719 format to `error'.
13720 (usr_store_inferior_registers): Ditto.
13721
93ae6fdc
PA
137222010-03-14 Pedro Alves <pedro@codesourcery.com>
13723
13724 * linux-low.c (linux_write_memory): Bail out early if peeking
13725 memory failed.
13726
c3adc08c
PA
137272010-03-14 Pedro Alves <pedro@codesourcery.com>
13728
13729 * linux-low.h (struct lwp_info): New fields
13730 `stopped_by_watchpoint' and `stopped_data_address'.
13731 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13732 here, and cache them in the lwp object.
13733 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13734 directly.
13735 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13736 field.
13737 (linux_stopped_by_watchpoint): Rewrite.
13738 (linux_stopped_data_address): Rewrite.
13739
bce522a2
PA
137402010-03-06 Simo Melenius <simo.melenius@iki.fi>
13741
13742 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13743 switching the current inferior, not before.
13744
90884b2b
L
137452010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13746
13747 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13748 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13749 i386-linux.c and amd64-linux.c.
13750 (reg-i386.o): Removed.
13751 (reg-i386.c): Likewise.
13752 (reg-i386-linux.o): Likewise.
13753 (reg-i386-linux.c): Likewise.
13754 (reg-x86-64.o): Likewise.
13755 (reg-x86-64.c): Likewise.
13756 (reg-x86-64-linux.o): Likewise.
13757 (reg-x86-64-linux.c): Likewise.
13758 (i386.o): New.
13759 (i386.c): Likewise.
13760 (i386-linux.o): Likewise.
13761 (i386-linux.c): Likewise.
13762 (amd64.o): Likewise.
13763 (amd64.c): Likewise.
13764 (amd64-linux.o): Likewise.
13765 (amd64-linux.c): Likewise.
13766
13767 * configure.srv (srv_i386_regobj): New.
13768 (srv_i386_linux_regobj): Likewise.
13769 (srv_amd64_regobj): Likewise.
13770 (srv_amd64_linux_regobj): Likewise.
13771 (srv_i386_32bit_xmlfiles): Likewise.
13772 (srv_i386_64bit_xmlfiles): Likewise.
13773 (srv_i386_xmlfiles): Likewise.
13774 (srv_amd64_xmlfiles): Likewise.
13775 (srv_i386_linux_xmlfiles): Likewise.
13776 (srv_amd64_linux_xmlfiles): Likewise.
13777 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13778 srv_xmlfiles to $srv_i386_xmlfiles.
13779 (i[34567]86-*-mingw32ce*): Likewise.
13780 (i[34567]86-*-mingw*): Likewise.
13781 (i[34567]86-*-nto*): Likewise.
13782 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13783 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13784 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13785 (x86_64-*-linux*): Likewise.
13786
13787 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13788 (init_registers_amd64_linux): New.
13789 (x86_arch_setup): Replace init_registers_x86_64_linux with
13790 init_registers_amd64_linux.
13791
193f13e6
MK
137922010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13793
13794 * configure.ac: Check for libdl. If it is not available link against
13795 static libthread_db.
13796 * configure: Regenerate.
13797
85d721b8
PA
137982010-02-22 Pedro Alves <pedro@codesourcery.com>
13799
13800 PR9605
13801
13802 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13803 handing a read watchpoint.
13804 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13805
6076632b
DE
138062010-02-12 Doug Evans <dje@google.com>
13807
13808 * linux-low.c (linux_supports_tracefork_flag): Document.
13809 (linux_look_up_symbols): Add comment.
13810
3327ccf7
L
138112010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13812
13813 * regcache.c (supply_register): Clear regcache if buf is NULL.
13814
0718675c 138152010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13816 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13817
13818 * inferiors.c (find_inferior): Add function documentation.
13819 (unloaded_dll): Handle the case where the unloaded dll has not
13820 been previously registered in the dll list.
13821
177321bd
DJ
138222010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13823
13824 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13825 (thumb2_breakpoint): New.
13826 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13827
2b009048
DJ
138282010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13831 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13832 breakpoints.
13833
3be029c7
PA
138342010-01-21 Pedro Alves <pedro@codesourcery.com>
13835
13836 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13837
18f5de3b
JK
138382010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13839
13840 * linux-s390-low.c (s390_collect_ptrace_register)
13841 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13842
3743bb4f
DE
138432010-01-21 Doug Evans <dje@google.com>
13844
14ce3065
DE
13845 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13846 (PTRACE_ARG4_TYPE): New macro.
13847 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13848 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13849 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13850 (usr_store_inferior_registers): Ditto.
13851 (linux_read_memory, linux_write_memory): Ditto.
13852 (linux_test_for_tracefork): Ditto.
13853
3743bb4f
DE
13854 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13855 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13856
8b315be5
PA
138572010-01-21 Pedro Alves <pedro@codesourcery.com>
13858
13859 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13860 target.
13861
85492558
PA
138622010-01-21 Pedro Alves <pedro@codesourcery.com>
13863
13864 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13865 prototype to take a regcache. Adjust.
13866
442ea881
PA
138672010-01-20 Pedro Alves <pedro@codesourcery.com>
13868
13869 * regcache.h (struct thread_info): Forward declare.
13870 (struct regcache): New.
13871 (new_register_cache): Adjust prototype.
13872 (get_thread_regcache): Declare.
13873 (free_register_cache): Adjust prototype.
13874 (registers_to_string, registers_from_string): Ditto.
13875 (supply_register, supply_register_by_name, collect_register)
13876 (collect_register_as_string, collect_register_by_name): Ditto.
13877 * regcache.c (struct inferior_regcache_data): Delete.
13878 (get_regcache): Rename to ...
13879 (get_thread_regcache): ... this. Adjust. Switch inferior before
13880 fetching registers.
13881 (regcache_invalidate_one): Adjust.
13882 (regcache_invalidate): Fix prototype.
13883 (new_register_cache): Return the new register cache.
13884 (free_register_cache): Change prototype.
13885 (realloc_register_cache): Adjust.
13886 (registers_to_string): Change prototype to take a regcache. Adjust.
13887 (registers_from_string): Ditto.
13888 (register_data): Ditto.
13889 (supply_register): Ditto.
13890 (supply_register_by_name): Ditto.
13891 (collect_register): Ditto.
13892 (collect_register_as_string): Ditto.
13893 (collect_register_by_name): Ditto.
13894 * server.c (process_serial_event): Adjust.
13895 * linux-low.h (regset_fill_func, regset_store_func): Change
13896 prototype.
13897 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13898 Change prototype.
13899 * linux-low.c (get_stop_pc): Adjust.
13900 (check_removed_breakpoint): Adjust.
13901 (linux_wait_for_event): Adjust.
13902 (linux_resume_one_lwp): Adjust.
13903 (fetch_register): Add regcache parameter. Adjust.
13904 (usr_store_inferior_registers): Ditto.
13905 (regsets_fetch_inferior_registers): Ditto.
13906 (regsets_store_inferior_registers): Ditto.
13907 (linux_fetch_registers, linux_store_registers): Ditto.
13908 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13909 regcache. Adjust.
43aaf8b6
PA
13910 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13911 Ditto.
442ea881
PA
13912 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13913 prototype to take a regcache.
13914 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13915 * remote-utils.c (convert_ascii_to_int, outreg)
13916 (prepare_resume_reply): Change prototype to take a regcache.
13917 Adjust.
13918 * target.h (struct target_ops) <fetch_registers, store_registers>:
13919 Change prototype to take a regcache.
13920 (fetch_inferior_registers, store_inferior_registers): Change
13921 prototype to take a regcache. Adjust.
13922 * proc-service.c (ps_lgetregs): Adjust.
13923 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13924 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13925 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13926 take a regcache. Adjust.
13927 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13928 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13929 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13930 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13931 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13932 (cris_cannot_fetch_register):
13933 (cris_breakpoint_at): Change prototype to take a regcache.
13934 Adjust.
13935 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13936 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13937 to take a regcache. Adjust.
13938 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13939 Adjust.
13940 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13941 take a regcache. Adjust.
13942 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13943 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13944 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13945 * linux-mips-low.c (mips_get_pc):
13946 (mips_set_pc): Change prototype to take a regcache. Adjust.
13947 (mips_reinsert_addr): Adjust.
13948 (mips_collect_register): Change prototype to take a regcache.
13949 Adjust.
13950 (mips_supply_register):
13951 (mips_collect_register_32bit, mips_supply_register_32bit)
13952 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13953 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13954 * linux-ppc-low.c (ppc_supply_ptrace_register)
13955 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13956 (parse_spufs_run): Adjust.
13957 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13958 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13959 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13960 take a regcache. Adjust.
13961 * linux-s390-low.c (s390_collect_ptrace_register)
13962 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13963 (s390_set_pc): Change prototype to take a regcache. Adjust.
13964 (s390_arch_setup): Adjust.
13965 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13966 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13967 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13968 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13969 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13970 regcache. Adjust.
13971 (sparc_breakpoint_at): Adjust.
13972 * linux-xtensa-low.c (xtensa_fill_gregset):
13973 (xtensa_store_gregset):
13974 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13975 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13976 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13977 prototype to take a regcache. Adjust.
13978 * win32-arm-low.c (arm_fetch_inferior_register)
13979 (arm_store_inferior_register): Change prototype to take a
13980 regcache. Adjust.
13981 * win32-i386-low.c (i386_fetch_inferior_register)
13982 (i386_store_inferior_register): Change prototype to take a
13983 regcache. Adjust.
13984 * win32-low.c (child_fetch_inferior_registers)
13985 (child_store_inferior_registers): Change prototype to take a
13986 regcache. Adjust.
13987 (win32_wait): Adjust.
13988 (win32_fetch_inferior_registers): Change prototype to take a
13989 regcache. Adjust.
13990 (win32_store_inferior_registers): Adjust.
13991 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13992 store_inferior_register>: Change prototype to take a regcache.
13993
60c3d7b0
DE
139942010-01-20 Doug Evans <dje@google.com>
13995
13996 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13997 #ifdef.
13998 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13999 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14000
dc146f7c
VP
140012010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14002
14003 * linux-low.c (linux_core_of_thread): New.
14004 (compare_ints, show_process, list_threads): New.
14005 (linux_qxfer_osdata): Report threads and cores.
14006 (linux_target_op): Register linux_core_of_thread.
14007 * remote-utils.c (prepare_resume_reply): Report the core.
14008 (buffer_xml_printf): Support %d specifier.
14009 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14010 New.
14011 (handle_query): Handle qXfer:threads. Announce availability
14012 thereof.
14013 * target.h (struct target_ops): New field core_of_thread.
14014
7803799a
UW
140152010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14016
14017 * Makefile.in (clean): Remove new generated files.
14018 (reg-s390.o, reg-s390.c): Remove rules.
14019 (reg-s390x.o, reg-s390x.c): Likewise.
14020 (s390-linux32.o, s390-linux32.c): Add rules.
14021 (s390-linux64.o, s390-linux64.c): Likewise.
14022 (s390x-linux64.o, s390x-linux64.c): Likewise.
14023 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14024 * linux-s390-low.c: Include <elf.h>.
14025 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14026 (init_registers_s390): Remove prototype.
14027 (init_registers_s390x): Likewise.
14028 (init_registers_s390_linux32): Add prototype.
14029 (init_registers_s390_linux64): Likewise.
14030 (init_registers_s390x_linux64): Likewise.
14031 (s390_num_regs_3264): New define.
14032 (s390_regmap_3264): New global variable.
14033 (s390_cannot_fetch_register): Remove obsolete check.
14034 (s390_cannot_store_register): Likewise.
14035 (s390_collect_ptrace_register): Handle upper/lower register halves.
14036 (s390_supply_ptrace_register): Likewise.
14037 (s390_fill_gregset): Update to register number changes.
14038 (s390_get_hwcap): New routine.
14039 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14040 Install appropriate regmap and register set.
14041
6e7ffa39
JB
140422010-01-01 Joel Brobecker <brobecker@adacore.com>
14043
14044 * server.c (gdbserver_version): Update copyright year to 2010.
14045 * gdbreplay.c (gdbreplay_version): Likewise.
14046
957f3f49
DE
140472009-12-28 Doug Evans <dje@google.com>
14048
14049 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14050 elf/external.h. Include <elf.h> instead but only if necessary.
14051
ca5c370d
PA
140522009-12-28 Pedro Alves <pedro@codesourcery.com>
14053
14054 * linux-low.c (linux_remove_process): Remove `detaching'
14055 parameter. Don't release/detach from thread_db here.
14056 (linux_kill): Release/detach from thread_db here, ...
14057 (linux_detach): ... and here, before actually detaching.
14058 (linux_wait_1): ... and here, when a process exits.
14059 * thread-db.c (any_thread_of): New.
14060 (thread_db_free): Switch the current inferior to a thread of the
14061 passed in process.
14062
4ee62156
DE
140632009-12-21 Doug Evans <dje@google.com>
14064
d90e6a88
DE
14065 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14066
c5f62d5f
DE
14067 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14068 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14069 warning ifndef __NR_tkill. Move setting of errno there too.
14070 Delete unnecessary resetting of errno after syscall.
14071 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14072
10e86dd7
DE
14073 * configure.ac: Check for dladdr.
14074 * config.in: Regenerate.
14075 * configure: Regenerate.
14076 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14077 (try_thread_db_load): Update.
14078
4ee62156
DE
14079 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14080
00f515da
DE
140812009-12-18 Doug Evans <dje@google.com>
14082
e9464885
DE
14083 * event-loop.c: Include unistd.h if it exists.
14084
07d4f67e
DE
14085 * linux-low.c (my_waitpid): Move definition away from being in
14086 between linux_tracefork_child/linux_test_for_tracefork.
14087
00f515da
DE
14088 * gdb_proc_service.h (psaddr_t): Fix type.
14089 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14090 signature to match glibc.
14091
1de1badb
DE
140922009-12-16 Doug Evans <dje@google.com>
14093
14094 * linux-low.c (linux_read_memory): Fix argument to read.
14095
aeeb81d1
PA
140962009-11-26 Pedro Alves <pedro@codesourcery.com>
14097
14098 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14099 events, don't leave current_inferior pointing at null.
14100
10357975
PA
141012009-11-26 Pedro Alves <pedro@codesourcery.com>
14102
14103 * win32-low.c (LOG): Delete.
14104 (OUTMSG): Output to stderr.
14105 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14106 on compile time LOG macro.
14107 (win32_wait): Fix debug output.
14108
cf6e3471
PA
141092009-11-26 Pedro Alves <pedro@codesourcery.com>
14110
14111 * win32-low.c (win32_add_one_solib): If the dll name is
14112 "ntdll.dll", prepend the system directory to the dll path.
14113
0c85e18e
MK
141142009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14115
14116 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14117
9ac544ce 141182009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14119 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14120
14121 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14122 * configure.ac: Check for __mcoldfire__ and set
14123 gdb_cv_m68k_is_coldfire.
14124 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14125 reg-cf.o and reg-m68k.o.
14126 * configure: Regenerated.
14127
fd7dd3e6
PA
141282009-11-16 Pedro Alves <pedro@codesourcery.com>
14129
14130 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14131 Pass it to thread_db_free.
14132 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14133 proper `detaching' argument to linux_remove_process.
14134 * linux-low.h (thread_db_free): Add `detaching' parameter.
14135 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14136 to thread_db_free.
14137 (thread_db_free): Add `detaching' parameter. Only
14138 call td_ta_clear_event if detaching from process.
14139
75aa492e
MK
141402009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14141
14142 * thread-db.c (thread_db_free): Fix typo.
14143
21e1bee4
PP
141442009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14145
14146 PR gdb/10838
14147 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14148
8838b45e
NS
141492009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14150
14151 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14152 with an i686 compiler.
14153 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14154 needed.
14155 * configure: Rebuilt.
14156
8a35fb51
SL
141572009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14158
14159 PR gdb/10783
14160
14161 * server.c (handle_search_memory_1): Correct read_addr initialization
14162 in loop for searching subsequent chunks.
14163
96f15937
PP
141642009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14165
14166 * configure.ac: New --with-libthread-db option.
14167 * thread-db.c: Allow direct dependence on libthread_db.
14168 (thread_db_free): Adjust.
14169 * config.in: Regenerate.
14170 * configure: Likewise.
889bf7c5 14171
5f7d1694
PP
141722009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14173
14174 PR gdb/10757
14175 * thread-db.c (attach_thread): New function.
14176 (maybe_attach_thread): Return success/failure.
14177 (find_new_threads_callback): Adjust.
889bf7c5
PA
14178 (thread_db_find_new_threads): Loop until no new threads.
14179
88e3b899
PA
141802009-10-13 Pedro Alves <pedro@codesourcery.com>
14181
14182 * proc-service.c (ps_lgetregs): Formatting.
14183
cdbfd419
PP
141842009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14185
14186 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14187 * configure.ac: Adjust.
14188 * linux-low.h (struct process_info_private): Move members to struct
14189 thread_db.
14190 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14191 * linux-low.c (linux_remove_process): Adjust.
14192 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14193 * server.c (handle_query): Move code ...
14194 (handle_monitor_command): ... here. New function.
14195 * target.h (struct target_ops): New member.
14196 * thread-db.c (struct thread_db): New.
14197 (libthread_db_search_path): New variable.
14198 (thread_db_create_event, thread_db_enable_reporting)
14199 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14200 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14201 (try_thread_db_load_1, dladdr_to_soname): New functions.
14202 (try_thread_db_load, thread_db_load_search): New functions.
14203 (thread_db_init): Search for libthread_db.
14204 (thread_db_free): New function.
14205 (thread_db_handle_monitor_command): Likewise.
14206 * config.in: Regenerate.
14207 * configure: Regenerate.
889bf7c5 14208
4168d2d6
UW
142092009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14210
14211 * spu-low.c (spu_kill): Wait for inferior to terminate.
14212 Call clear_inferiors.
14213 (spu_detach): Call clear_inferiors.
14214
81ecdfbb
RW
142152009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14216
14217 * aclocal.m4: Regenerate.
14218 * config.in: Likewise.
14219 * configure: Likewise.
14220
0b9ff2c0
UW
142212009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14222
14223 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14224 (parse_spufs_run): New function.
14225 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14226 (ppc_breakpoint_at): Handle SPU breakpoints.
14227
efcbbd14
UW
142282009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14229
14230 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14231 (SPUFS_MAGIC): Define.
14232 (spu_enumerate_spu_ids): New function.
14233 (linux_qxfer_spu): New function.
14234 (linux_target_ops): Install linux_qxfer_spu.
14235
f4d9bade
UW
142362009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14237
14238 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14239 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14240 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14241 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14242 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14243 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14244 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14245 (init_registers_powerpc_cell32l): Add prototype.
14246 (init_registers_powerpc_cell64l): Likewise.
14247 (ppc_arch_setup): Detect Cell/B.E. architecture.
14248
96e946ca
RW
142492009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14250
14251 * Makefile.in (datarootdir): New variable.
14252
58d6951d
DJ
142532009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14254
14255 * linux-low.c (linux_write_memory): Update debugging output.
14256 * Makefile.in (clean): Add new descriptions.
14257 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14258 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14259 * configure.srv: Add new files for arm*-*-linux*.
14260 * linux-arm-low.c: Add new declarations.
14261 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14262 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14263 (HWCAP_VFPv3D16): New.
14264 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14265 instead of __IWMMXT__.
14266 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14267 (arm_arch_setup): New.
14268 (target_regsets): Remove #ifdef. Add VFP regset.
14269 (the_low_target): Use arm_arch_setup.
14270
12b42a12
DJ
142712009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14272
14273 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14274 the main thread again.
14275
ac8c974e
AR
142762009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14277
14278 Adding Neutrino gdbserver.
14279 * configure: Regenerated.
14280 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14281 * configure.srv (i[34567]86-*-nto*): New target.
14282 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14283 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14284 (nto_comctrl) [__QNX__]: New function.
14285 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14286
4424e0c3 142872009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14288
14289 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14290 srv_tgtobj.
14291
912cf4ba
PA
142922009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14293 Pedro Alves <pedro@codesourcery.com>
14294
14295 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14296 don't support CONTEXT_EXTENDED_REGISTERS.
14297 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14298 (the_low_target): Install them.
14299 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14300 failing with ERROR_PIPE_NOT_CONNECTED.
14301
aa5ca48f
DE
143022009-06-30 Doug Evans <dje@google.com>
14303 Pierre Muller <muller@ics.u-strasbg.fr>
14304
14305 Add h/w watchpoint support to x86-linux, win32-i386.
14306 * Makefile.in (SFILES): Add i386-low.c
14307 (i386_low_h): Define.
14308 (i386-low.o): Add dependencies.
14309 (linux-x86-low.o): Add i386-low.h dependency.
14310 (win32-i386-low.o): Ditto.
14311 * i386-low.c: New file.
14312 * i386-low.h: New file.
14313 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14314 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14315 * linux-low.c (linux_add_process): Initialize arch_private.
14316 (linux_remove_process): Free arch_private.
14317 (add_lwp): Initialize arch_private.
14318 (delete_lwp): Free arch_private.
14319 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14320 provided.
14321 * linux-low.h (process_info_private): New member arch_private.
14322 (lwp_info): New member arch_private.
14323 (linux_target_ops): New members new_process, new_thread,
14324 prepare_to_resume.
14325 (ptid_of): New macro.
14326 * linux-x86-low.c: Include stddef.h, i386-low.h.
14327 (arch_process_info): New struct.
14328 (arch_lwp_info): New struct.
14329 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14330 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14331 (i386_dr_low_get_status): New function.
14332 (x86_insert_point, x86_remove_point): New functions.
14333 (x86_stopped_by_watchpoint): New function.
14334 (x86_stopped_data_address): New function.
14335 (x86_linux_new_process, x86_linux_new_thread): New functions.
14336 (x86_linux_prepare_to_resume): New function.
14337 (the_low_target): Add entries for insert_point, remove_point,
14338 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14339 prepare_to_resume.
14340 * server.c (debug_hw_points): New global.
14341 (monitor_show_help): Document set debug-hw-points.
14342 (handle_query): Process "set debug-hw-points".
14343 * server.h (debug_hw_points): Declare.
14344 (paddress): Declare.
14345 * utils.c (NUMCELLS, CELLSIZE): New macros.
14346 (get_sell, xsnprintf, paddress): New functions.
14347 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14348 remove_point, stopped_by_watchpoint, stopped_data_address.
14349 * win32-i386-low.c: Include i386-low.h.
14350 (debug_reg_state): Replaces dr.
14351 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14352 (i386_dr_low_get_status): New function.
14353 (i386_insert_point, i386_remove_point): New functions.
14354 (i386_stopped_by_watchpoint): New function.
14355 (i386_stopped_data_address): New function.
14356 (i386_initial_stuff): Update.
14357 (get_thread_context,set_thread_context,i386_thread_added): Update.
14358 (the_low_target): Add entries for insert_point,
14359 remove_point, stopped_by_watchpoint, stopped_data_address.
14360 * win32-low.c (win32_insert_watchpoint): New function.
14361 (win32_remove_watchpoint): New function.
14362 (win32_stopped_by_watchpoint): New function.
14363 (win32_stopped_data_address): New function.
14364 (win32_target_ops): Add entries for insert_watchpoint,
14365 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14366 * win32-low.h (win32_target_ops): New members insert_point,
14367 remove_point, stopped_by_watchpoint, stopped_data_address.
14368
d993e290
PA
143692009-06-25 Pedro Alves <pedro@codesourcery.com>
14370
14371 * server.c (process_serial_event): Re-return unsupported, not
14372 error, if the type isn't recognized. Re-allow supporting only
14373 insert or remove packets. Also call require_running for
14374 breakpoints. Add missing break statement to default case. Tidy.
14375 * target.h (struct target_ops): Rename insert_watchpoint to
14376 insert_point, and remove_watchpoint to remove_point.
14377
14378 * linux-low.h (struct linux_target_ops): Likewise.
14379 * linux-low.c (linux_insert_watchpoint): Rename to ...
14380 (linux_insert_point): ... this. Adjust.
14381 (linux_remove_watchpoint): Rename to ...
14382 (linux_remove_point): ... this. Adjust.
14383 (linux_target_ops): Adjust.
14384 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14385 (cris_insert_point): ... this.
14386 (cris_remove_watchpoint): Rename to ...
14387 (cris_remove_point): ... this.
14388 (the_low_target): Adjust.
14389
0f54c268
PM
143902009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14391
14392 * server.c (handle_v_kill): Pass signal_pid to
14393 kill_inferior if multi_process is zero.
14394
c6314022
AR
143952009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14396
14397 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14398 * target.h (target_ops): Comment for *_watchpoint to make it clear
14399 the functions can get types '0' and '1'.
14400
4463ce24
AR
144012009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14402
14403 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14404 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14405 * regcache.c (get_regcache): Likewise.
14406 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14407 * win32-low.c (child_fetch_inferior_registers): Remove check for
14408 regno 0.
14409
cf8fd78b
PA
144102009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14411 Pedro Alves <pedro@codesourcery.com>
14412
14413 * target.h (struct target_ops) <supports_multi_process>: New
14414 callback.
14415 (target_supports_multi_process): New.
14416 * server.c (handle_query): Even if GDB reports support, only
14417 enable multi-process if the target also supports it. Report
14418 multi-process support only if the target backend supports it.
14419 * linux-low.c (linux_supports_multi_process): New function.
14420 (linux_target_ops): Install it as target_supports_multi_process
14421 callback.
14422
47c0c975
DE
144232009-05-24 Doug Evans <dje@google.com>
14424
e09875d4
DE
14425 Global renaming of find_thread_pid to find_thread_ptid.
14426 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14427 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14428 All callers updated.
14429
e27d73f6
DE
14430 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14431 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14432 directly.
14433
47c0c975
DE
14434 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14435 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14436 (linux_resume_one_lwp): Ditto.
14437
2acc282a
DE
144382009-05-23 Doug Evans <dje@google.com>
14439
14440 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14441 from struct inferior_list_entry * to struct lwp_info *.
14442 All callers updated.
14443
9f1036c1
DE
144442009-05-13 Doug Evans <dje@google.com>
14445
14446 * linux-x86-low.c: Don't include assert.h.
14447 (x86_siginfo_fixup): Use fatal, not assert.
14448 (x86_arch_setup): Fix comment.
14449
d0722149
DE
144502009-05-12 Doug Evans <dje@google.com>
14451
14452 Biarch support for i386/amd64 gdbserver.
14453 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14454 Add linux-x86-low.c.
14455 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14456 (linux-x86-low.o): Add.
14457 * linux-x86-64-low.c: Delete.
14458 * linux-i386-low.c: Delete.
14459 * linux-x86-low.c: New file.
14460 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14461 linux-x86-low.o.
14462 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14463 linux-x86-low.o.
14464 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14465 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14466 (linux_child_pid_to_exec_file): New function.
14467 (elf_64_header_p, elf_64_file_p): New functions.
14468 (siginfo_fixup): New function.
14469 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14470 give target a chance to convert layout.
14471 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14472 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14473
fdeb2a12
DE
144742009-05-07 Doug Evans <dje@google.com>
14475
14476 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14477 (regsets_store_inferior_registers): Ditto.
14478
a6dbe5df
PA
144792009-05-06 Pedro Alves <pedro@codesourcery.com>
14480
14481 PR server/10048
14482
14483 * linux-low.c (must_set_ptrace_flags): Delete.
14484 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14485 of the global.
14486 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14487 `lwp->must_set_ptrace_flags' instead.
ba42693b 14488 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14489 (linux_wait_1): ... not here.
14490
5091eb23
DE
144912009-04-30 Doug Evans <dje@google.com>
14492
9f767825
DE
14493 * inferiors.c (started_inferior_callback): New function.
14494 (attached_inferior_callback): New function.
14495 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14496 * server.c (print_started_pid, print_attached_pid): New functions.
14497 (detach_or_kill_for_exit): New function.
14498 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14499 * server.h (have_started_inferiors_p): Declare.
14500 (have_attached_inferiors_p): Declare.
14501
5091eb23
DE
14502 * inferiors.c (remove_process): Fix memory leak, free process.
14503 * linux-low.c (linux_remove_process): New function.
14504 (linux_kill): Call it instead of remove_process.
14505 (linux_detach, linux_wait_1): Ditto.
14506
155c8968
PA
145072009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14508
14509 * configure.srv: Add x86 Windows CE target.
14510
7fe519cb
UW
145112009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14512
14513 * inferiors.c (get_thread_process): Make global.
14514 * server.h (get_thread_process): Add prototype.
14515 * thread-db.c (find_one_thread): Use get_thread_process
14516 instead of current_process.
14517 (thread_db_get_tls_address): Do not crash if called when
14518 thread layer is not yet initialized.
14519
5472f405
UW
145202009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14521
14522 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14523 * spu-low.c (current_tid): Rename to ...
14524 (current_ptid): ... this.
14525 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14526 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14527 ptid_get_lwp (current_ptid) instead of current_tid.
14528 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14529 instead of current_tid. Use find_process_pid to verify pid
14530 argument is valid. Pass proper argument to remove_process.
14531 (spu_thread_alive): Compare current_ptid instead of current_tid.
14532 (spu_resume): Likewise.
14533
55ac2b99
PA
145342009-04-02 Pedro Alves <pedro@codesourcery.com>
14535
14536 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14537 variable.
14538
95954743
PA
145392009-04-01 Pedro Alves <pedro@codesourcery.com>
14540
14541 Implement the multiprocess extensions, and add linux multiprocess
14542 support.
14543
14544 * server.h (ULONGEST): Declare.
14545 (struct ptid, ptid_t): New.
14546 (minus_one_ptid, null_ptid): Declare.
14547 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14548 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14549 (struct inferior_list_entry): Change `id' type from unsigned from
14550 to ptid_t.
14551 (struct sym_cache, struct breakpoint, struct
14552 process_info_private): Forward declare.
14553 (struct process_info): Declare.
14554 (current_process): Declare.
14555 (all_processes): Declare.
14556 (initialize_inferiors): Declare.
14557 (add_thread): Adjust to use ptid_t.
14558 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14559 (add_process, remove_process, find_thread_pid): Declare.
14560 (find_inferior_id): Adjust to use ptid_t.
14561 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14562 (multi_process): Declare.
14563 (push_event): Adjust to use ptid_t.
14564 (read_ptid, write_ptid): Declare.
14565 (prepare_resume_reply): Adjust to use ptid_t.
14566 (clear_symbol_cache): Declare.
14567 * inferiors.c (all_processes): New.
14568 (null_ptid, minus_one_ptid): New.
14569 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14570 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14571 (add_thread): Change unsigned long to ptid. Remove gdb_id
14572 parameter. Adjust.
14573 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14574 (gdb_id_to_thread): Rename to ...
14575 (find_thread_pid): ... this. Change unsigned long to ptid.
14576 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14577 (loaded_dll, pull_pid_from_list): Adjust.
14578 (add_process, remove_process, find_process_pid)
14579 (get_thread_process, current_process, initialize_inferiors): New.
14580 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14581 (struct target_waitstatus) <related_pid>: Ditto.
14582 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14583 return type to int.
14584 (struct target_ops) <join>: Add `pid' argument.
14585 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14586 (struct target_ops) <wait>: Add `ptid' field. Change return type
14587 to ptid.
14588 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14589 (mywait): Add `ptid' argument. Change return type to ptid_t.
14590 (target_pid_to_str): Declare.
14591 * target.c (set_desired_inferior): Adjust to use ptids.
14592 (mywait): Add new `ptid' argument. Adjust.
14593 (target_pid_to_str): New.
14594 * mem-break.h (free_all_breakpoints): Declare.
14595 * mem-break.c (breakpoints): Delelete.
14596 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14597 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14598 to use per-process breakpoint list.
14599 (free_all_breakpoints): New.
14600 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14601 (symbol_cache, all_symbols_looked_up): Delete.
14602 (hexchars): New.
14603 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14604 read_ptid): New.
14605 (prepare_resume_reply): Change ptid argument's type from unsigned
14606 long to ptid_t. Adjust. Implement W;process and X;process.
14607 (free_sym_cache, clear_symbol_cache): New.
14608 (look_up_one_symbol): Adjust to per-process symbol cache. *
14609 * server.c (cont_thread, general_thread, step_thread): Change type
14610 to ptid_t.
14611 (attached): Delete.
14612 (multi_process): New.
14613 (last_ptid): Change type to ptid_t.
14614 (struct vstop_notif) <ptid>: Change type to ptid_t.
14615 (queue_stop_reply, push_event): Change `ptid' argument's type to
14616 ptid_t.
14617 (discard_queued_stop_replies): Add `pid' argument.
14618 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14619 changes. Don't reference the `attached' global.
14620 (attach_inferior): Adjust to mywait interface changes.
14621 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14622 features. Handle and report "multiprocess+". Handle
14623 "qAttached:PID".
14624 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14625 changes.
14626 (handle_v_kill): New.
14627 (handle_v_stopped): Adjust to use target_pid_to_str.
14628 (handle_v_requests): Allow multiple attaches and runs when
14629 multiprocess extensions are in effect. Handle "vKill".
14630 (myresume): Adjust to use ptids.
14631 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14632 (handle_status): Adjust to discard_queued_stop_replies interface
14633 change.
14634 (first_thread_of, kill_inferior_callback)
14635 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14636 (main): Call initialize_inferiors. Adjust to use ptids, killing
14637 and detaching from all inferiors. Handle multiprocess packet
14638 variants.
14639 * linux-low.h: Include gdb_proc_service.h.
14640 (struct process_info_private): New.
14641 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14642 <lwpid_of>: Use ptid_get_lwp.
14643 (get_lwp_thread): Adjust.
14644 (struct lwp_info): Add `dead' member.
14645 (find_lwp_pid): Declare.
14646 * linux-low.c (thread_db_active): Delete.
14647 (new_inferior): Adjust comment.
14648 (inferior_pid): Delete.
14649 (linux_add_process): New.
14650 (handle_extended_wait): Adjust.
14651 (add_lwp): Change unsigned long to ptid.
14652 (linux_create_inferior): Add process to processes table. Adjust
14653 to use ptids. Don't set new_inferior here.
14654 (linux_attach_lwp): Rename to ...
14655 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14656 it. Adjust to use ptids.
14657 (linux_attach_lwp): New.
14658 (linux_attach): Add process to processes table. Don't set
14659 new_inferior here.
14660 (struct counter): New.
14661 (second_thread_of_pid_p, last_thread_of_process_p): New.
14662 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14663 multiple processes.
14664 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14665 processes. Remove process from process table.
14666 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14667 to multiple processes.
14668 (any_thread_of): New.
14669 (linux_detach): Add `pid' argument, and handle it. Remove process
14670 from processes table.
14671 (linux_join): Add `pid' argument. Handle it.
14672 (linux_thread_alive): Change unsighed long argument to ptid_t.
14673 Consider dead lwps as not being alive.
14674 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14675 threads we're not interested in.
14676 (same_lwp, find_lwp_pid): New.
14677 (linux_wait_for_lwp): Change `pid' argument's type from int to
14678 ptid_t. Adjust.
14679 (linux_wait_for_event): Rename to ...
14680 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14681 from int to ptid_t. Adjust.
14682 (linux_wait_for_event): New.
14683 (linux_wait_1): Add `ptid' argument. Change return type to
14684 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14685 that exit from the process table.
14686 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14687 Adjust.
14688 (mark_lwp_dead): New.
14689 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14690 stopping all threads, mark its main lwp as dead.
14691 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14692 ptids.
14693 (fetch_register, usr_store_inferior_registers)
14694 (regsets_fetch_inferior_registers)
14695 (regsets_store_inferior_registers, linux_read_memory)
14696 (linux_write_memory): Inline `inferior_pid'.
14697 (linux_look_up_symbols): Adjust to use per-process
14698 `thread_db_active'.
14699 (linux_request_interrupt): Adjust to use ptids.
14700 (linux_read_auxv): Inline `inferior_pid'.
14701 (initialize_low): Don't reference thread_db_active.
14702 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14703 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14704 (ps_getpid): Return the pid of the current inferior.
14705 * thread-db.c (proc_handle, thread_agent): Delete.
14706 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14707 per-process data.
14708 (find_one_thread): Change argument type to ptid_t. Adjust to
14709 per-process data.
14710 (maybe_attach_thread): Adjust to per-process data and ptids.
14711 (thread_db_find_new_threads): Ditto.
14712 (thread_db_init): Ditto.
14713 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14714 processes table. Adjust to use ptids.
14715 (spu_kill, spu_detach): Adjust interface. Remove process from
14716 processes table.
14717 (spu_join, spu_thread_alive): Adjust interface.
14718 (spu_wait): Adjust interface. Remove process from processes
14719 table. Adjust to use ptids.
14720 * win32-low.c (current_inferior_tid): Delete.
14721 (current_inferior_ptid): New.
14722 (debug_event_ptid): New.
14723 (thread_rec): Take a ptid. Adjust.
14724 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14725 (child_delete_thread): Ditto.
14726 (do_initial_child_stuff): Add `attached' argument. Add process to
14727 processes table.
14728 (child_fetch_inferior_registers, child_store_inferior_registers):
14729 Adjust.
14730 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14731 (win32_attach): Pass 1 to do_initial_child_stuff.
14732 (win32_kill): Adjust interface. Remove process from processes
14733 table.
14734 (win32_detach): Ditto.
14735 (win32_join): Adjust interface.
14736 (win32_thread_alive): Take a ptid.
14737 (win32_resume): Adjust to use ptids.
14738 (get_child_debug_event): Ditto.
14739 (win32_wait): Adjust interface. Remove exiting process from
14740 processes table.
14741
bd99dc85
PA
147422009-04-01 Pedro Alves <pedro@codesourcery.com>
14743
14744 Non-stop mode support.
14745
14746 * server.h (non_stop): Declare.
14747 (gdb_client_data, handler_func): Declare.
14748 (delete_file_handler, add_file_handler, start_event_loop):
14749 Declare.
14750 (handle_serial_event, handle_target_event, push_event)
14751 (putpkt_notif): Declare.
14752 * target.h (enum resume_kind): New.
14753 (struct thread_resume): Replace `step' field by `kind' field.
14754 (TARGET_WNOHANG): Define.
14755 (struct target_ops) <wait>: Add `options' argument.
14756 <supports_non_stop, async, start_non_stop>: New fields.
14757 (target_supports_non_stop, target_async): New.
14758 (start_non_stop): Declare.
14759 (mywait): Add `options' argument.
14760 * target.c (mywait): Add `options' argument. Print child exit
14761 notifications here.
14762 (start_non_stop): New.
14763 * server.c (non_stop, own_buf, mem_buf): New globals.
14764 (struct vstop_notif): New.
14765 (notif_queue): New global.
14766 (queue_stop_reply, push_event, discard_queued_stop_replies)
14767 (send_next_stop_reply): New.
14768 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14769 interface changes.
14770 (attach_inferior): In non-stop mode, don't wait for the target
14771 here.
14772 (handle_general_set): Handle QNonStop.
14773 (handle_query): When handling qC, return the current general
14774 thread, instead of the first thread of the list.
14775 (handle_query): If the backend supports non-stop mode, include
14776 QNonStop+ in the qSupported query response.
14777 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14778 and non-stop mode.
14779 (handle_v_attach, handle_v_run): Handle non-stop mode.
14780 (handle_v_stopped): New.
14781 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14782 (myresume): Adjust to use resume_kind. Handle non-stop.
14783 (queue_stop_reply_callback): New.
14784 (handle_status): Handle non-stop mode.
14785 (main): Clear non_stop flag on reconnection. Use the event-loop.
14786 Refactor serial protocol handling from here ...
14787 (process_serial_event): ... to this new function. When GDB
14788 selects any thread, select one here. In non-stop mode, wait until
14789 GDB acks all pending events before exiting.
14790 (handle_serial_event, handle_target_event): New.
14791 * remote-utils.c (remote_open): Install remote_desc in the event
14792 loop.
14793 (remote_close): Remove remote_desc from the event loop.
14794 (putpkt_binary): Rename to...
14795 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14796 (putpkt_binary): New as wrapper around putpkt_binary_1.
14797 (putpkt_notif): New.
14798 (prepare_resume_reply): In non-stop mode, don't change the
14799 general_thread.
14800 * event-loop.c: New.
14801 * Makefile.in (OBJ): Add event-loop.o.
14802 (event-loop.o): New rule.
14803
14804 * linux-low.h (pid_of): Moved here.
14805 (lwpid_of): New.
14806 (get_lwp_thread): Use lwpid_of.
14807 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14808 * linux-low.c (pid_of): Delete.
14809 (inferior_pid): Use lwpid_of.
14810 (linux_event_pipe): New.
14811 (target_is_async_p): New.
14812 (delete_lwp): New.
14813 (handle_extended_wait): Use lwpid_of.
14814 (add_lwp): Don't set lwpid field.
14815 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14816 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14817 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14818 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14819 first. Adjust to linux_wait_for_event interface changes. Use
14820 lwpid_of.
14821 (linux_detach): Don't delete the main lwp here.
14822 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14823 (status_pending_p): Don't consider explicitly suspended lwps.
14824 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14825 pointer. Add OPTIONS argument. Change return type to int. Use
14826 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14827 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14828 pointer. Add status pointer argument. Return a pid instead of a
14829 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14830 changes. In non-stop mode, don't switch to a random thread.
14831 (linux_wait): Rename to...
14832 (linux_wait_1): ... this. Add target_options argument, and handle
14833 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14834 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14835 clean exit and signal exit code. Don't stop all threads in
14836 non-stop mode. In all-stop mode, only stop all threads when
14837 reporting a stop to GDB. Handle explicit thread stop requests.
14838 (async_file_flush, async_file_mark): New.
14839 (linux_wait): New.
14840 (send_sigstop): Use lwpid_of.
14841 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14842 interface changes. In non-stop mode, don't switch to a random
14843 thread.
14844 (linux_resume_one_lwp): Use lwpid_of.
14845 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14846 (linux_resume_one_thread): ... this. Handle resume_stop. In
14847 non-stop mode, don't look for pending flag in all threads.
14848 (resume_status_pending_p): Don't consider explicitly suspended
14849 threads.
14850 (my_waitpid): Reimplement. Emulate __WALL.
14851 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14852 Use lwpid_of.
14853 (sigchld_handler, linux_supports_non_stop, linux_async)
14854 (linux_start_non_stop): New.
14855 (linux_target_ops): Register linux_supports_non_stop, linux_async
14856 and linux_start_non_stop.
14857 (initialize_low): Install SIGCHLD handler.
14858 * thread-db.c (thread_db_create_event, find_one_thread)
14859 (thread_db_get_tls_address): Use lwpid_of.
14860 * win32-low.c (win32_detach): Adjust to use resume_kind.
14861 (win32_wait): Add `options' argument.
14862 * spu-low.c (spu_resume): Adjust to use resume_kind.
14863 (spu_wait): Add `options' argument.
14864
5b1c542e
PA
148652009-04-01 Pedro Alves <pedro@codesourcery.com>
14866
14867 Decouple target code from remote protocol.
14868
14869 * target.h (enum target_waitkind): New.
14870 (struct target_waitstatus): New.
14871 (struct target_ops) <wait>: Return an unsigned long. Take a
14872 target_waitstatus pointer instead of a char pointer.
14873 (mywait): Likewise.
14874 * target.c (mywait): Change prototype to return an unsigned long.
14875 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14876 * server.h (thread_from_wait, old_thread_from_wait): Delete
14877 declarations.
14878 (prepare_resume_reply): Change prototype to take a
14879 target_waitstatus.
14880 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14881 (last_status, last_ptid): New.
14882 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14883 pid instead of a signal.
14884 (attach_inferior): Remove "status" and "signal" parameters.
14885 Adjust.
14886 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14887 not as an address.
14888 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14889 (handle_v_requests, myresume): Remove "status" and "signal"
14890 parameters. Adjust.
14891 (handle_status): New.
14892 (main): Delete local `status'. Adjust.
14893 * remote-utils.c: Include target.h.
14894 (prepare_resume_reply): Change prototype to take a
14895 target_waitstatus. Adjust.
14896
14897 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14898 interface.
14899 * spu-low.c (spu_wait): Adjust.
14900 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14901 Delete.
14902 (win32_wait): Adjust.
14903
2bd7c093
PA
149042009-04-01 Pedro Alves <pedro@codesourcery.com>
14905
14906 * target.h (struct thread_resume): Delete leave_stopped member.
14907 (struct target_ops): Add a `n' argument to the `resume' callback.
14908 * server.c (start_inferior): Adjust.
14909 (handle_v_cont, myresume): Adjust.
14910 * linux-low.c (check_removed_breakpoint): Adjust to resume
14911 interface change, and to removed leave_stopped field.
14912 (resume_ptr): Delete.
14913 (struct thread_resume_array): New.
14914 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14915 resume interface change.
14916 (linux_continue_one_thread, linux_queue_one_thread)
14917 (resume_status_pending_p): Check if the resume field is NULL
14918 instead of checking the leave_stopped member.
14919 (linux_resume): Adjust to the target resume interface change.
14920 * spu-low.c (spu_resume): Adjust to the target resume interface
14921 change.
14922 * win32-low.c (win32_detach, win32_resume): Ditto.
14923
c35fafde
PA
149242009-04-01 Pedro Alves <pedro@codesourcery.com>
14925
14926 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14927 flag.
14928 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14929 pending.
14930 (linux_continue_one_thread): Only preserve the stepping flag if
14931 there's a pending breakpoint.
14932
0a59d50b
PA
149332009-03-31 Pedro Alves <pedro@codesourcery.com>
14934
14935 * server.c (main): After the inferior having exited, call
14936 remote_close before exiting gdbserver.
14937
f04c6d38
TJB
149382009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14939
14940 Fix size of FPSCR in Power 7 processors.
14941 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14942 (PPC_FEATURE_HAS_DFP): New #define.
14943 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14944 size of the FPSCR.
14945
78e5cee6
PA
149462009-03-23 Pedro Alves <pedro@codesourcery.com>
14947
14948 * server.c (handle_query) Whitespace and formatting.
14949
1b3f6016
PA
149502009-03-22 Pedro Alves <pedro@codesourcery.com>
14951
14952 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14953 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14954 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14955 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14956 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14957 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14958 Makefile.in, configure.ac: Fix whitespace throughout.
14959 * configure: Regenerate.
14960
a07b2135
PA
149612009-03-22 Pedro Alves <pedro@codesourcery.com>
14962
14963 * inferiors.c (find_inferior): Make it safe for the callback
14964 function to delete the currently iterated inferior.
14965
67cc2626
PA
149662009-03-22 Pedro Alves <pedro@codesourcery.com>
14967
14968 * Makefile.in (linuw_low_h): Move higher.
14969 (thread-db.o): Depend on $(linux_low_h).
14970
54a0b537
PA
149712009-03-17 Pedro Alves <pedro@codesourcery.com>
14972
14973 Rename "process" to "lwp" throughout.
14974
14975 * linux-low.c (all_processes): Rename to...
14976 (all_lwps): ... this.
14977 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14978 (add_process): Rename to ...
14979 (add_lwp): ... this. Adjust.
14980 (linux_create_inferior): Adjust.
14981 (linux_attach_lwp): Adjust.
14982 (linux_attach): Adjust.
14983 (linux_kill_one_process): Rename to ...
14984 (linux_kill_one_lwp): ... this. Adjust.
14985 (linux_kill): Adjust.
14986 (linux_detach_one_process): Rename to ...
14987 (linux_detach_one_lwp): ... this. Adjust.
14988 (linux_detach): Adjust.
14989 (check_removed_breakpoint): Adjust.
14990 (status_pending_p): Adjust.
14991 (linux_wait_for_process): Rename to ...
14992 (linux_wait_for_lwp): ... this. Adjust.
14993 (linux_wait_for_event): Adjust.
14994 (send_sigstop): Adjust.
14995 (wait_for_sigstop): Adjust.
14996 (stop_all_processes): Rename to ...
14997 (stop_all_lwps): ... this.
14998 (linux_resume_one_process): Rename to ...
14999 (linux_resume_one_lwp): ... this. Adjust.
15000 (linux_set_resume_request, linux_continue_one_thread)
15001 (linux_queue_one_thread, resume_status_pending_p)
15002 (usr_store_inferior_registers, regsets_store_inferior_registers)
15003 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15004 Adjust.
15005 * linux-low.h (get_process): Rename to ...
15006 (get_lwp): ... this. Adjust.
15007 (get_thread_process): Rename to ...
15008 (get_thread_lwp): ... this. Adjust.
15009 (get_process_thread): Rename to ...
15010 (get_lwp_thread): ... this. Adjust.
15011 (struct process_info): Rename to ...
15012 (struct lwp_info): ... this.
15013 (all_processes): Rename to ...
15014 (all_lwps): ... this.
15015 * proc-service.c (ps_lgetregs): Adjust.
15016 * thread-db.c (thread_db_create_event, find_one_thread)
15017 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15018
0b16c5cf
PA
150192009-03-14 Pedro Alves <pedro@codesourcery.com>
15020
15021 * server.c (handle_query): Handle "qAttached".
15022
32de4b9d
NS
150232009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15024
15025 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15026 GPLv3, update license URL.
15027
2aecd87f
DE
150282009-03-01 Doug Evans <dje@google.com>
15029
93efd302 15030 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15031 (server_h): Add gdb_signals.h.
15032 (signals.o): Update.
15033 * server.h (target_signal_from_host,target_signal_to_host_p)
15034 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15035
86b1f9c5
PM
150362009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15037
15038 * remote-utils.c (getpkt): Also generate remote-debug
15039 information if noack_mode is set.
15040
4aa995e1
PA
150412009-02-06 Pedro Alves <pedro@codesourcery.com>
15042
15043 * server.c (handle_query): Report qXfer:siginfo:read and
15044 qXfer:siginfo:write as supported and handle them.
15045 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15046 * linux-low.c (linux_xfer_siginfo): New.
15047 (linux_target_ops): Set it.
15048
62709adf
PA
150492009-01-26 Pedro Alves <pedro@codesourcery.com>
15050
15051 * server.c (gdbserver_usage): Mention --remote-debug.
15052 (main): Accept '--remote-debug' switch.
15053
aef93bd7
DE
150542009-01-18 Doug Evans <dje@google.com>
15055
15056 * regcache.c (new_register_cache): No need to check result of xcalloc.
15057 * server.c (handle_search_memory): Back out calls to xmalloc,
15058 result is checked and error is returned to user upon failure.
15059 (handle_query): Ditto. Add more checks for result of malloc.
15060 (handle_v_cont): Check result of malloc, report error back to
15061 user upon failure.
15062 (handle_v_run): Ditto. Call freeargv.
15063 * server.h (freeargv): Declare.
15064 * utils.c (freeargv): New fn.
15065
54363045
DE
150662009-01-15 Doug Evans <dje@google.com>
15067
f626972c
DE
15068 * gdbreplay.c (perror_with_name): Make arg const char *.
15069 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15070 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15071 * utils.c (perror_with_name): Make arg const char *.
54363045 15072
18aae699
PA
150732009-01-14 Pedro Alves <pedro@codesourcery.com>
15074
15075 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15076 when handling a EXIT_PROCESS_DEBUG_EVENT.
15077
ff703abe
JB
150782009-01-06 Joel Brobecker <brobecker@adacore.com>
15079
15080 * gdbreplay.c (gdbreplay_version): Update copyright year.
15081 * server.c (gdbserver_version): Likewise.
15082
f21cc1a2 150832009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15084
15085 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15086 (handle_extended_wait): Improve comment.
0e21c1ec 15087
bca929d3
DE
150882008-12-13 Doug Evans <dje@google.com>
15089
15090 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15091 * server.h (ATTR_MALLOC): New macro.
15092 (xmalloc,xcalloc,xstrdup): Declare.
15093 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15094 * inferiors.c: Ditto.
15095 * linux-low.c: Ditto.
15096 * mem-break.c: Ditto.
15097 * regcache.c: Ditto.
15098 * remote-utils.c: Ditto.
15099 * server.c: Ditto.
15100 * target.c: Ditto.
15101 * win32-low.c: Ditto.
15102
97438e3f
DE
151032008-12-12 Doug Evans <dje@google.com>
15104
896c7fbb
DE
15105 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15106 in debugging printf.
15107
97438e3f
DE
15108 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15109
e3b886f8
DE
151102008-12-09 Doug Evans <dje@google.com>
15111
15112 * linux-low.h (struct process_info): Delete member tid, unused.
15113 * thread-db.c (find_one_thread): Update.
15114 (maybe_attach_thread): Update.
15115
07e059b5
VP
151162008-12-02 Pedro Alves <pedro@codesourcery.com>
15117
889bf7c5
PA
15118 * target.h (struct target_ops): Add qxfer_osdata member.
15119 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15120 and dirent.h.
15121 (linux_qxfer_osdata): New functions.
15122 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15123 callback.
15124 * server.c (handle_query): Handle "qXfer:osdata:read:".
15125 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15126 (buffer_xml_printf): New functions.
15127 * server.h (struct buffer): New.
15128 (buffer_grow_str, buffer_grow_str0): New macros.
15129 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15130 (buffer_xml_printf): Declare.
07e059b5 15131
4cab47ab
DE
151322008-11-24 Doug Evans <dje@google.com>
15133
15134 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15135
f142445f
DJ
151362008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15137
15138 * server.c (handle_v_run): Always use the supplied argument list.
15139
d0107bb6 151402008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15141
d0107bb6
BW
15142 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15143 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15144
2c4ad781
TJB
151452008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15146
15147 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15148 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15149 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15150 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15151 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15152 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15153 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15154 XML target descriptions.
15155 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15156 when inferior is running on an ISA 2.05 or later processor. Add
15157 special case to return offset for full 64-bit slot of FPSCR when
15158 in 32-bits.
15159
dfb64f85
DJ
151602008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15161
15162 * Makefile.in (SFILES, clean): Added sparc64 files.
15163 (reg-sparc64.o, reg-sparc64.c): New.
15164 * configure.srv (sparc*-*-linux*): New configuration.
15165 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15166 syscall arguments for SPARC.
15167 (regsets_store_inferior_registers): Likewise.
15168 * linux-sparc-low.c: New file.
15169
66b6e1dd
DE
151702008-10-21 Doug Evans <dje@google.com>
15171
15172 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15173 (READLINE_DIR,READLINE_DEP): Delete.
15174 (INTERNAL_CFLAGS): Update.
15175 (LINTFLAGS): Update.
15176
9b710a42
PA
151772008-10-10 Pedro Alves <pedro@codesourcery.com>
15178
15179 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15180 whole argv from the last run, not just argv[0].
15181
5822d809
PA
151822008-09-08 Pedro Alves <pedro@codesourcery.com>
15183
15184 * regcache.c (new_register_cache): Return NULL if the register
15185 cache size isn't known yet.
15186 (free_register_cache): Avoid dereferencing a NULL regcache.
15187
74aac56f
DJ
151882008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15189
15190 * configure.srv: Merge MIPS and MIPS64.
15191
400b20f5
MR
151922008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15193
15194 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15195
677c5bb1
LM
151962008-08-18 Luis Machado <luisgpm@br.ibm.com>
15197
15198 * Makefile.in: Add required vsx dependencies.
15199
15200 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15201 Declare init_registers_powerpc_vsx32l.
15202 Declare init_registers_powerpc_vsx64l.
15203 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15204 (ppc_arch_setup): Check for VSX in hwcap.
15205 (ppc_fill_vsxregset): New function.
15206 (ppc_store_vsxregset): New function.
15207 Add new VSX entry in regset_info target_regsets.
15208
15209 * configure.srv: Add new VSX dependencies.
15210
a6f3e723
SL
152112008-08-12 Pedro Alves <pedro@codesourcery.com>
15212
15213 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15214 (remote_open): Set or clear transport_is_reliable.
15215 (putpkt_binary): Don't expect acks in noack mode.
15216 (getpkt): Don't send ack/nac in noack mode.
15217 * server.c (handle_general_set): Handle QStartNoAckMode.
15218 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15219 qSupported.
15220 (main): Reset noack_mode on every connection.
15221 * server.h (noack_mode): Declare.
15222
a417dc56
RW
152232008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15224
15225 * Makefile.in (GDBREPLAY_OBS): New variable.
15226 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15227
3221518c
UW
152282008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15229 Daniel Jacobowitz <dan@codesourcery.com>
15230
15231 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15232 (usr_store_inferior_registers): Likewise.
15233 (regsets_store_inferior_registers): Likewise.
15234
ec56be1b
PA
152352008-07-31 Rolf Jansen <rj@surtec.com>
15236 Pedro Alves <pedro@codesourcery.com>
15237
15238 * configure.ac: Check for memmem declaration.
15239 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15240 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15241 (disable_packet_qfThreadInfo): Unconditionally compile.
15242 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15243 * configure, config.in: Regenerate.
15244
2fe5e3ff
DE
152452008-07-28 Doug Kwan <dougkwan@google.com>
15246
15247 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15248 (linux_write_memory): Remove declaration of errno.
15249
836acd6d
UW
152502008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15251
15252 * linux-low.c (handle_extended_wait): Do not use "status"
15253 variable uninitialized.
15254
aeba519e
PA
152552008-07-07 Pedro Alves <pedro@codesourcery.com>
15256
15257 * server.c (handle_v_attach): Inhibit reporting dll changes.
15258
db42f210
PA
152592008-06-27 Pedro Alves <pedro@codesourcery.com>
15260
15261 * remote-utils.c (prepare_resume_reply): If requested, don't
15262 output "thread:TID" in the T stop reply.
15263
15264 * server.c (disable_packet_vCont, disable_packet_Tthread)
15265 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15266 (handle_query): If requested, disable support for qC, qfThreadInfo
15267 and qsThreadInfo.
15268 (handle_v_requests): If requested, disable support for vCont.
15269 (gdbserver_show_disableable): New.
15270 (main): Handle --disable-packet and --disable-packet=LIST.
15271
15272 * server.h (disable_packet_vCont, disable_packet_Tthread)
15273 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15274
8e4c5421
CD
152752008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15276
15277 * server.c (gdbserver_usage): Mention --version.
15278
6e23a804
DJ
152792008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15280
15281 * Makefile.in (gdbreplay.o): New rule.
15282
90aa6a40
JM
152832008-06-06 Joseph Myers <joseph@codesourcery.com>
15284
15285 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15286 message, not gdbserver.
15287
c16158bc 152882008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15289 Nathan Sidwell <nathan@codesourcery.com>
15290 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15291
15292 * acinclude.m4: Include ../../config/acx.m4.
15293 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15294 * configure, config.in: Regenerate.
15295 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15296 * server.c (gdbserver_version): Print PKGVERSION.
15297 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15298 (main): Adjust gdbserver_usage calls.
15299 * gdbreplay.c (version, host_name): Add declarations.
15300 (gdbreplay_version, gdbreplay_usage): New.
15301 (main): Accept --version and --help options.
15302
aeb75bf5
DJ
153032008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15304
15305 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15306 (arm_breakpoint_at): Handle Thumb.
15307 (the_low_target): Add comment.
15308
76b233dd
UW
153092008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15310
15311 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15312
08388c79
DE
153132008-05-09 Doug Evans <dje@google.com>
15314
a3c83fae
DE
15315 * server.h (decode_search_memory_packet): Declare.
15316 * remote-utils.c (decode_search_memory_packet): New fn.
15317 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15318 (handle_search_memory): New fn.
15319 (handle_query): Process qSearch:memory packets.
15320
bb9c3d36
UW
153212008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15322
15323 * regcache.c (registers_length): Remove.
15324 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15325 full register packet.
15326 * regcache.h (registers_length): Remove prototype.
15327 * server.h (PBUFSIZ): Define to 16384.
15328
7284e1be
UW
153292008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15330
15331 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15332 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15333 powerpc-64l.o, and powerpc-altivec64l.o.
15334 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15335 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15336 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15337 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15338 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15339 to srv_xmlfiles.
15340
15341 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15342 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15343 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15344 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15345 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15346 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15347 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15348 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15349 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15350 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15351 (clean): Update.
15352
15353 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15354 (init_registers_powerpc_32l): ... this new prototype.
15355 (init_registers_powerpc_32): Remove, replace by ...
15356 (init_registers_powerpc_altivec32l): ... this new prototype.
15357 (init_registers_powerpc_e500): Remove, replace by ...
15358 (init_registers_powerpc_e500l): ... this new prototype.
15359 (init_registers_ppc64): Remove, replace by ...
15360 (init_registers_powerpc_64l): ... this new prototype.
15361 (init_registers_powerpc_64): Remove, replace by ...
15362 (init_registers_powerpc_altivec64l): ... this new prototype.
15363 (ppc_num_regs): Set to 73.
15364 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15365 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15366 (ppc_cannot_store_register): Handle orig_r3 and trap.
15367 (ppc_arch_setup): Update init_registers_... calls.
15368 (ppc_fill_gregset): Handle orig_r3 and trap.
15369
15370 * inferiors.c (clear_inferiors): Reset current_inferior.
15371
fdc59709
PB
153722008-04-23 Paolo Bonzini <bonzini@gnu.org>
15373
889bf7c5
PA
15374 * acinclude.m4: Add override.m4.
15375 * configure: Regenerate.
fdc59709 15376
c9b2f845
UW
153772008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15378
15379 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15380 initial call to init_register_ppc64.
15381
550512b8
UW
153822008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15383
43aaf8b6
PA
15384 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15385 single powerpc*-*-linux* case.
550512b8
UW
15386 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15387
b6430ec3
UW
153882008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15389
15390 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15391 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15392 from reg_xmlfiles.
15393 * linux-ppc-low.c: Include <elf.h>.
15394 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15395 (ppc_hwcap): New global variable.
15396 (ppc_regmap): Remove __SPE__ #ifdef sections.
15397 (ppc_regmap_e500): New global variable.
15398 (ppc_cannot_store_register): Update __SPE__ special case.
15399 (ppc_get_hwcap): New function.
15400 (ppc_arch_setup): Use it to determine whether inferior supports
15401 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15402 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15403 Do not access registers if target does not support AltiVec.
15404 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15405 Do not access registers if target does not support SPE.
15406 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15407
52fa2412
UW
154082008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15409
15410 * linux-low.c (disabled_regsets, num_regsets): New.
15411 (use_regsets_p): Delete.
15412 (linux_wait_for_process): Clear disabled_regsets.
15413 (regsets_fetch_inferior_registers): Check and set it.
15414 (regsets_store_inferior_registers): Likewise.
15415 (linux_fetch_registers, linux_store_registers): Do not use
15416 use_regsets_p.
15417 (initialize_low): Allocate disabled_regsets.
15418
e28b3332
DJ
154192008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15420
15421 * Makefile.in (LIBOBJS): New.
15422 (OBS): Use LIBOBJS.
15423 (memmem.o): New rule.
15424 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15425 * configure: Regenerated.
15426
4536995d
UW
154272008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15428
15429 * server.c (handle_query): Never return "unsupported" for
15430 qXfer:features:read queries.
15431
221c031f
UW
154322008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15433
15434 * server.c (get_features_xml): Fix inverted condition.
15435 (handle_query): Always support qXfer:feature:read.
15436
ccd213ac
DJ
154372008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15438
15439 * server.c (wrapper_argv): New.
15440 (start_inferior): Handle wrapper_argv. If set, expect an extra
15441 trap.
15442 (gdbserver_usage): Document --wrapper.
15443 (main): Parse --wrapper.
15444
6fe305f7
UW
154452008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15446
15447 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15448 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15449 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15450 (ppc_set_pc): Likewise.
15451 (ppc_arch_setup): New function.
15452 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15453 of collect_register.
889bf7c5 15454 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15455
5b0a002e
UW
154562008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15457
15458 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15459 instead of linux-ppc64-low.o.
15460 * linux-ppc64-low.c: Remove file.
15461 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15462 (linux-ppc64-low.o): Remove rule.
15463
15464 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15465 (init_registers_powerpc_64): Likewise.
15466 (ppc_regmap): Conditionally define depending on __powerpc64__.
15467 (ppc_cannot_store_register): Do not special-case "fpscr" when
15468 compiled on __powerpc64__.
15469 (ppc_collect_ptrace_register): New function.
15470 (ppc_supply_ptrace_register): New function.
15471 (ppc_breakpoint): Change type to "unsigned int".
15472 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15473 (the_low_target): Conditionally provide initializers for the
889bf7c5 15474 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15475 collect_ptrace_register and supply_ptrace_register members.
15476
9b4b61c8
UW
154772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15478
15479 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15480 * server.c (gdbserver_xmltarget): Define.
15481 (get_features_xml): Use it to replace "target.xml" and arch_string.
15482
15483 * configure.srv: Remove srv_xmltarget. Add XML files that were
15484 mentioned there to srv_xmlfiles instead. Remove conditional tests
15485 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15486 srv_xmlfiles and srv_regobj to include all possible choices.
15487 * configure.ac (srv_xmltarget): Remove.
15488 (srv_xmlfiles): Do not add "target.xml".
15489 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15490 checks for supplementary target information.
15491 * configure: Regenerate.
15492 * Makefile.in (XML_TARGET): Remove.
15493 (target.xml): Remove rule.
15494 (clean): Do not clean up target.xml.
15495 (.PRECIOUS): Do not mention target.xml.
15496
15497 * target.h (struct target_ops): Remove arch_string member.
15498 * linux-low.c (linux_arch_string): Remove.
15499 (linux_target_ops): Remove arch_string initializer.
15500 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15501 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15502 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15503 * spu-low.c (spu_arch_string): Remove.
15504 (spu_target_ops): Remove arch_string initializer.
15505 * win32-low.c (win32_arch_string): Remove.
15506 (win32_target_ops): Remove arch_string initializer.
15507 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15508 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15509 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15510
ee1a7ae4
UW
155112008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15512
15513 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15514 by collect_ptrace_register and supply_ptrace_register hooks.
15515 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15516 instead of checking for the_low_target.left_pad_xfer.
15517 (usr_store_inferior_registers): Use collect_ptrace_register callback
15518 instead of checking for the_low_target.left_pad_xfer.
15519
15520 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15521 (s390_supply_ptrace_register): Likewise.
15522 (s390_fill_gregset): Call s390_collect_ptrace_register.
15523 (the_low_target): Update.
15524
15525 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15526 (ppc_supply_ptrace_register): Likewise.
15527 (the_low_target): Update.
15528
15529 * linux-i386-low.c (the_low_target): Update.
15530 * linux-x86-64-low.c (the_low_target): Update.
15531
d61ddec4
UW
155322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15533
15534 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15535 reg-s390.o and reg-s390x.o.
15536
15537 * linux-low.c (new_inferior): New global variable.
15538 (linux_create_inferior, linux_attach): Set it.
15539 (linux_wait_for_process): Call the_low_target.arch_setup after the
15540 target has stopped for the first time.
15541 (initialize_low): Do not call the_low_target.arch_setup.
15542
15543 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15544 (s390_set_pc): Likewise.
15545 (s390_arch_setup): New function.
15546 (the_low_target): Use s390_arch_setup as arch_setup routine.
15547
15548 * regcache.c (realloc_register_cache): New function.
15549 (set_register_cache): Call it for each existing regcache.
15550
d05b4ac3
UW
155512008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15552
15553 * server.h (init_registers): Remove prototype.
15554
15555 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15556 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15557 instead of init_registers ().
15558 * linux-arm-low.c (init_registers_arm): Add prototype.
15559 (init_registers_arm_with_iwmmxt): Likewise.
15560 (the_low_target): Add initializer for arch_setup field.
15561 * linux-cris-low.c (init_registers_cris): Add prototype.
15562 (the_low_target): Add initializer for arch_setup field.
15563 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15564 (the_low_target): Add initializer for arch_setup field.
15565 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15566 (the_low_target): Add initializer for arch_setup field.
15567 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15568 (the_low_target): Add initializer for arch_setup field.
15569 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15570 (the_low_target): Add initializer for arch_setup field.
15571 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15572 (the_low_target): Add initializer for arch_setup field.
15573 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15574 (init_registers_mips64_linux): Likewise.
15575 (the_low_target): Add initializer for arch_setup field.
15576 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15577 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15578 (the_low_target): Add initializer for arch_setup field.
15579 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15580 (init_registers_powerpc_64): Likewise.
15581 (the_low_target): Add initializer for arch_setup field.
15582 * linux-s390-low.c (init_registers_s390): Add prototype.
15583 (init_registers_s390x): Likewise.
15584 (the_low_target): Add initializer for arch_setup field.
15585 * linux-sh-low.c (init_registers_sh): Add prototype.
15586 (the_low_target): Add initializer for arch_setup field.
15587 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15588 (the_low_target): Add initializer for arch_setup field.
15589 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15590 (the_low_target): Add initializer for arch_setup field.
15591
15592 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15593 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15594 instead of init_registers ().
15595 * win32-arm-low.c (init_registers_arm): Add prototype.
15596 (the_low_target): Add initializer for arch_setup field.
15597 * win32-i386-low.c (init_registers_i386): Add prototype.
15598 (the_low_target): Add initializer for arch_setup field.
15599
15600 * spu-low.c (init_registers_spu): Add prototype.
15601 (initialize_low): Call initialie_registers_spu () instead of
15602 initialize_registers ().
15603
fd96d250
PA
156042008-02-19 Pedro Alves <pedro@codesourcery.com>
15605
15606 * server.c (handle_v_requests): When handling the vRun and vAttach
15607 packets, if already debugging a process, don't kill it. Return an
15608 error instead.
15609
d41b6bb4
DJ
156102008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15611
15612 * server.c (handle_query): Correct length check.
15613
5ac588cf
PA
156142008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15615
15616 * win32-low.c (do_initial_child_stuff): Add process handle
15617 parameter. Set current_process_handle and current_process_id from the
15618 parameters. Clear globals.
15619 (win32_create_inferior): Don't set current_process_handle and
15620 current_process_id here. Instead pass them on the call to
15621 do_initial_child_stuff.
15622 (win32_attach): Likewise.
15623 (win32_clear_inferiors): New.
15624 (win32_kill): Don't close the current process handle or the
15625 current thread handle here. Instead call win32_clear_inferiors.
15626 (win32_detach): Don't open a new handle to the process. Call
15627 win32_clear_inferiors.
15628 (win32_join): Don't rely on current_process_handle; open a new
15629 handle using the process id.
15630 (win32_wait): Call win32_clear_inferiors when the inferior process
15631 has exited.
15632
ecd7ecbc
DJ
156332008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15634
15635 * server.c (monitor_show_help): Add "exit".
15636
1525d545
MG
156372008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15638
ecd7ecbc 15639 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15640 (clean): Add reg-xtensa.c.
15641 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15642 * configure.srv (xtensa*-*-linux*) New target.
15643 * linux-xtensa-low.c: New.
15644 * xtensa-xtregs.c: New.
1525d545 15645
59a016f0
PA
156462008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15647
15648 * hostio.c: Don't include errno.h.
15649 (errno_to_fileio_errno): Move to hostio-errno.
15650 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15651 error number outputting to the target->hostio_last_error callback.
15652 (hostio_packet_error): Use FILEIO_EINVAL directly.
15653 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15654 calls to hostio_error.
15655 * hostio-errno.c: New.
15656 * server.h (hostio_last_error_from_errno): Declare.
15657 * target.h (target_ops): Add hostio_last_error member.
15658 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15659 as hostio_last_error handler.
889bf7c5 15660 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15661 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15662 (wince_hostio_last_error): New functions.
15663 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15664 as hostio_last_error handler.
15665 (win32_target_ops) [!_WIN32_WCE]: Register
15666 hostio_last_error_from_errno as hostio_last_error handler.
15667 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15668 (hostio-errno.o): New rule.
15669 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15670 * configure.srv (srv_hostio_err_objs): New variable. Default to
15671 hostio-errno.o.
15672 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15673 * configure: Regenerate.
15674
2d717e4f
DJ
156752008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15676
15677 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15678 (linux_kill, linux_detach): Clean up the process list.
15679 * remote-utils.c (remote_open): Improve port number parsing.
15680 (putpkt_binary, input_interrupt): Only send interrupts if the target
15681 is running.
15682 * server.c (extended_protocol): Make static.
15683 (attached): Define earlier.
15684 (exit_requested, response_needed, program_argv): New variables.
15685 (target_running): New.
15686 (start_inferior): Clear attached here.
15687 (attach_inferior): Set attached here.
15688 (require_running): Define.
15689 (handle_query): Use require_running and target_running. Implement
15690 "monitor exit".
15691 (handle_v_attach, handle_v_run): New.
15692 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15693 (gdbserver_usage): Update.
15694 (main): Redo argument parsing. Handle --debug and --multi. Handle
15695 --attach along with other options or after the port. Save
15696 program_argv. Support no initial program. Resynchronize
15697 communication with GDB after an error. Handle "monitor exit".
15698 Use require_running and target_running. Always allow the extended
15699 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15700 restart in extended mode.
15701 * README: Refer to the GDB manual. Update --attach usage.
15702
7407e2de
AS
157032007-12-20 Andreas Schwab <schwab@suse.de>
15704
15705 * linux-low.c (STACK_SIZE): Define.
15706 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15707 (linux_test_for_tracefork): Likewise.
15708
b65d95c5
DJ
157092007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15710
15711 * linux-low.c (linux_wait_for_event): Update messages. Do not
15712 reinsert auto-delete breakpoints.
15713 * mem-break.c (struct breakpoint): Change return type of handler to
15714 int.
15715 (set_breakpoint_at): Update handler type.
15716 (reinsert_breakpoint_handler): Return 1 instead of calling
15717 delete_breakpoint.
15718 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15719 setting a new one.
15720 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15721 * mem-break.h (set_breakpoint_at): Update handler type.
15722 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15723 * win32-low.c (auto_delete_breakpoint): New.
15724 (get_child_debug_event): Use it.
15725
4e799345
DJ
157262007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15727
15728 * configure.ac: Check for pread and pwrite.
15729 * hostio.c (handle_pread): Fall back to lseek and read.
15730 (handle_pwrite): Fall back to lseek and write.
15731 * config.in, configure: Regenerated.
15732
27524b67
DJ
157332007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15734
15735 * server.c (myresume): Add own_buf argument.
15736 (main): Update calls.
15737
a20d5e98
DJ
157382007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15739
15740 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15741 * remote-utils.c (remote_open): Do not call disable_async_io.
15742 (block_async_io): Delete.
15743 (unblock_async_io): Make static.
15744 (initialize_async_io): New.
15745 * server.c (handle_v_cont): Handle async I/O here.
15746 (myresume): Likewise. Move other common resume tasks here...
15747 (main): ... from here. Call initialize_async_io. Disable async
15748 I/O before the main loop.
15749 * server.h (initialize_async_io): Declare.
15750 (block_async_io, unblock_async_io): Delete prototypes.
15751 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15752
b79d787e
DJ
157532007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15754
15755 * remote-utils.c (readchar): Allow binary data in received messages.
15756
d97903b2
PA
157572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15758
15759 * win32-low.c (attaching): New global.
15760 (win32_create_inferior): Clear the `attaching' global.
15761 (win32_attach): Set the `attaching' global.
15762 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15763 attaching. Only set a breakpoint at the entry point if not
15764 attaching.
15765
311de423
PA
157662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15767
15768 * server.c (main): Don't report dll events on the initial
15769 connection on attaches.
15770
6c2d16d2
PA
157712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15772
15773 * server.c (main): Relax numerical bases supported for the pid of
15774 the --attach command line argument.
15775
5ca906e6
PA
157762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15777
15778 * win32-low.c (win32_attach): Call OpenProcess before
15779 DebugActiveProcess, not after. Add last error output to error
15780 call.
15781
9c6c8194
PA
157822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15783
15784 * win32-low.c (win32_get_thread_context)
15785 (win32_set_thread_context): New functions.
15786 (thread_rec): Use win32_get_thread_context.
15787 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15788 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15789 field.
15790
4d5d1aaa
PA
157912007-12-03 Leo Zayas
15792 Pedro Alves <pedro_alves@portugalmail.pt>
15793
15794 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15795 global variables.
15796 (child_add_thread): Minor cleanup.
15797 (child_continue): Resume artificially suspended threads before
15798 calling ContinueDebugEvent.
15799 (suspend_one_thread): New.
15800 (fake_breakpoint_event): New.
15801 (get_child_debug_event): Change return type to int. Check here if
15802 gdb sent an interrupt request. If a soft interrupt was requested,
15803 fake a breakpoint event. Return 0 if there is no event to handle,
15804 and 1 otherwise.
15805 (win32_wait): Don't check here if gdb sent an interrupt request.
15806 Ensure there is a valid event to handle.
15807 (win32_request_interrupt): Add soft interruption method as last
15808 resort.
15809
c436e841
PA
158102007-12-03 Leo Zayas
15811 Pedro Alves <pedro_alves@portugalmail.pt>
15812
15813 * win32-low.h (win32_thread_info): Add descriptions to the
15814 structure members. Replace `suspend_count' counter by a
15815 `suspended' flag.
15816 * win32-low.c (thread_rec): Update condition of when to get the
15817 context from the inferior. Rely on ContextFlags being set if it
15818 has already been retrieved. Only suspend the inferior thread if
15819 we haven't already. Warn if that fails.
15820 (continue_one_thread): s/suspend_count/suspended/. Only call
15821 ResumeThread once. Warn if that fails.
15822
e7b5fa67
PA
158232007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15824
15825 * win32-low.c (win32_wait): Don't read from the inferior when it
15826 has already exited.
15827
a385171d
PA
158282007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15829
15830 * Makefile.in (win32_low_h): New variable.
15831 (win32-low.o): Add dependency on $(win32_low_h).
15832 (win32-arm-low.o, win32-i386-low.o): New rules.
15833
f80c84b3
DJ
158342007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15835
15836 * hostio.c: Correct copyright year.
15837
a6b151f1
DJ
158382007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15839
15840 * Makefile.in (OBS): Add hostio.o.
15841 (hostio.o): New rule.
15842 * server.h (handle_vFile): Declare.
15843 * hostio.c: New file.
15844 * server.c (handle_v_requests): Take packet_len and new_packet_len
15845 for binary packets. Call handle_vFile.
15846 (main): Update call to handle_v_requests.
15847
f9387fc3
DJ
158482007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15849
15850 * linux-low.c: Include <sched.h>.
15851
51c2684e
DJ
158522007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15853
15854 * linux-low.c (linux_tracefork_grandchild): New.
15855 (linux_tracefork_child): Use clone.
15856 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15857
75f83163
JB
158582007-10-31 Joel Brobecker <brobecker@adacore.com>
15859
15860 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15861
da5898ce
DJ
158622007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15863
15864 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15865
24a09b5f
DJ
158662007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15867
15868 * inferiors.c (change_inferior_id): Delete.
15869 (add_pid_to_list, pull_pid_from_list): New.
15870 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15871 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15872 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15873 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15874 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15875 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15876 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15877 (using_threads): Always set to 1.
15878 (handle_extended_wait): New.
15879 (add_process): Do not set TID.
15880 (linux_create_inferior): Set must_set_ptrace_flags.
15881 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15882 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15883 (linux_thread_alive): Rename TID argument to LWPID.
15884 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15885 (linux_wait_for_event): Do not use TID or check using_threads. Update
15886 call to dead_thread_notify. Call handle_extended_wait.
15887 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15888 (send_sigstop): Delete sigstop_sent.
15889 (wait_for_sigstop): Avoid TID.
15890 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15891 (linux_test_for_tracefork): New.
15892 (linux_lookup_signals): Use thread_db_active and
15893 linux_supports_tracefork_flag.
15894 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15895 * linux-low.h (get_process_thread): Avoid TID.
15896 (struct process_ifo): Move thread_known and tid to the end. Remove
15897 sigstop_sent.
15898 (linux_attach_lwp, thread_db_init): Update prototypes.
15899 * server.h (change_inferior_id): Delete prototype.
15900 (add_pid_to_list, pull_pid_from_list): New prototypes.
15901 * thread-db.c (thread_db_use_events): New.
15902 (find_first_thread): Rename to...
15903 (find_one_thread): ...this. Update callers and messages. Do not
15904 call fatal. Check thread_db_use_events. Do not call
15905 change_inferior_id or new_thread_notify.
15906 (maybe_attach_thread): Update. Do not call new_thread_notify.
15907 (thread_db_init): Set thread_db_use_events. Check use_events.
15908 * utils.c (fatal, warning): Correct message prefix.
15909
30ed0a8f
DJ
159102007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15911
15912 * Makefile.in (clean): Remove new files.
15913 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15914 (powerpc-64.o, powerpc-64.c): New rules.
15915 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15916 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15917 with SPE.
15918 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15919 SPE targets.
15920 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15921 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15922 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15923 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15924 (target_regsets): Add AltiVec and SPE register sets.
15925 * configure.ac: Check for AltiVec and SPE.
15926 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15927 (ppc_fill_vrregset, ppc_store_vrregset): New.
15928 (target_regsets): Add AltiVec register set.
15929 * configure: Regenerated.
15930
fd462a61
DJ
159312007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15932
15933 * linux-low.c (O_LARGEFILE): Define.
15934 (linux_read_memory): Use /proc/PID/mem.
15935 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15936 * configure, config.in: Regenerated.
15937
69f223ed
DJ
159382007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15939
15940 * linux-low.c (linux_wait_for_event): Do not pass signals while
15941 single-stepping.
15942
aec18585
PA
159432007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15944
15945 * win32-low.c (create_process): New.
15946 (win32_create_inferior): Use create_process instead of
15947 CreateProcess. If create_process failed retry appending an ".exe"
15948 suffix. Store the GetLastError result immediatelly after
15949 create_process calls and use it on the call to error.
15950
34d86ddd
PA
159512007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15952
15953 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15954
5a0e3bd0
JB
159552007-08-23 Joel Brobecker <brobecker@adacore.com>
15956
15957 * configure.ac: Switch license to GPLv3.
15958
f88c79e6
MS
159592007-08-01 Michael Snyder <msnyder@access-company.com>
15960
15961 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15962
6b3d9b83
PA
159632007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15964
15965 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15966 typedef.
15967 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15968 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15969 CloseToolhelp32Snapshot.
15970 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15971 CloseToolhelp32Snapshot.
15972
c588c53c
MS
159732007-07-27 Michael Snyder <michael.snyder@access-company.com>
15974
15975 * server.c (main): Check for inferior exit before main loop.
15976
aa0403d9
PA
159772007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15978
15979 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15980 instead of on tmp_desc.
15981
255e7678
DJ
159822007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15983 Daniel Jacobowitz <dan@codesourcery.com>
15984
15985 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15986 (add_thread): Minor cleanups.
15987 (clear_inferiors): Move lower in the file. Clear the DLL
15988 list.
15989 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15990 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15991 (xml_escape_text): New.
15992 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15993 for qSupported.
15994 (handle_v_cont): Report errors.
15995 (gdbserver_version): Update.
15996 (main): Correct size of own_buf. Do not report initial DLL events.
15997 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15998 (unloaded_dll, xml_escape_text): New.
15999 * win32-low.c (enum target_waitkind): Update comments.
16000 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16001 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16002 (win32_EnumProcessModules, win32_GetModuleInformation)
16003 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16004 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16005 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16006 (win32_Module32First, win32_Module32Next, load_toolhelp)
16007 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16008 (get_child_debug_event): Handle DLL events.
16009 (win32_wait): Likewise.
16010
0d37add9
DJ
160112007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16012
16013 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16014 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16015
45e2715e
PA
160162007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16017
16018 * win32-low.c (handle_output_debug_string): Ignore event if not
16019 waiting.
16020
c5674cf1
PA
160212007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16022
16023 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16024
2bbe3cc1
DJ
160252007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16026
16027 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16028
ae13219e
DJ
160292007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16030
16031 * inferiors.c (change_inferior_id): Add comment.
16032 * linux-low.c (check_removed_breakpoint): Add an early
16033 prototype. Improve debug output.
16034 (linux_attach): Doc update.
16035 (linux_detach_one_process, linux_detach): Clean up before releasing
16036 each process.
16037 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16038 * linux-low.h (struct process_info): Doc improvement.
16039 * mem-break.c (delete_all_breakpoints): New.
16040 * mem-break.h (delete_all_breakpoints): New prototype.
16041 * thread-db.c (find_first_thread): New.
16042 (thread_db_create_event): Call it instead of
16043 thread_db_find_new_threads. Clean up unused variables.
16044 (maybe_attach_thread): Remove first thread handling.
16045 (thread_db_find_new_threads): Use find_first_thread.
16046 (thread_db_get_tls_address): Likewise.
16047
4105de34
DJ
160482007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16049
16050 * thread-db.c (thread_db_find_new_threads): Add prototype.
16051 (thread_db_create_event): Check for the main thread before adding
16052 a new thread.
16053 (maybe_attach_thread): Only enable event reporting if TID == 0.
16054 (thread_db_get_tls_address): Check for new threads.
16055
2b876972
DJ
160562007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16057
16058 * linux-low.c (linux_create_inferior): Try execv before execvp.
16059 * spu-low.c (spu_create_inferior): Likewise.
16060
7a245884
DJ
160612007-06-13 Mike Frysinger <vapier@gentoo.org>
16062
16063 * linux-low.c (linux_create_inferior): Change execv to execvp.
16064 * spu-low.c (spu_create_inferior): Likewies.
16065
117ce543
DJ
160662007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16067
16068 * Makefile.in (clean): Clean new files instead of deleted ones.
16069 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16070 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16071 rules.
16072 * configure.srv: Specify XML files and new regformats for MIPS and
16073 MIPS64 GNU/Linux.
16074 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16075 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16076 an entry for the restart register.
16077 (mips_cannot_fetch_register, mips_cannot_store_register)
16078 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16079 register names to match the XML descriptions.
16080 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16081 restart register instead of $0.
16082
0e7f50da
UW
160832007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16084 Markus Deuling <deuling@de.ibm.com>
16085
16086 * remote-utils.c (decode_xfer_write): New function.
16087 * server.h (decode_xfer_write): Add prototype.
16088 * server.c (handle_query): Add PACKET_LEN argument. Support
16089 qXfer:spu:read and qXfer:spu:write packets.
16090 (main): Pass packet_len to handle_query.
16091 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16092 * target.h (target_ops): Add qxfer_spu.
16093
374c1d38
UW
160942007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16095
16096 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16097 accessing non-seekable spufs files.
16098
bb63802a
UW
160992007-05-16 Markus Deuling <deuling@de.ibm.com>
16100
889bf7c5 16101 * server.c (handle_query): Add reply for qC packet.
bb63802a 16102
7390519e
PA
161032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16104 Leo Zayas <lerele@champenstudios@com>
16105
16106 * server.h (check_remote_input_interrupt_request): New function.
16107 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16108 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16109 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16110 (check_remote_input_interrupt_request): New function.
16111 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16112 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16113 winapi_GenerateConsoleCtrlEvent): New typedefs.
16114 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16115 to 250 ms.
16116 (win32_wait): Check for remote interrupt request
16117 with check_remote_input_interrupt_request.
16118 (win32_request_interrupt): New function.
16119 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16120
34b34921
PA
161212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16122
16123 * win32-low.c (debug_registers_changed,
16124 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16125 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16126 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16127 (thread_rec): Get context using the low target.
16128 (child_add_thread): Call thread_added on the low target,
16129 which does the same thing.
16130 (regptr): Delete.
16131 (do_initial_child_stuff): Remove debug registers references.
16132 Set context using the low target. Resume threads after
16133 setting the contexts.
16134 (child_continue): Remove dead variable. Remove debug
16135 registers references.
16136 (child_fetch_inferior_registers): Go through the low target.
16137 (do_child_store_inferior_registers): Remove.
16138 (child_store_inferior_registers): Go through the low target.
16139 (win32_resume): Remove debug registers references.
16140 Set context using the low target.
16141 (handle_exception): Change return type to void. Don't record
16142 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16143 first chance exception.
889bf7c5 16144 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16145 goto loop. Always return after waiting for debug event.
16146 (win32_wait): Convert to switch statement. Handle spurious
16147 events.
16148
16149 * win32-i386-low.c (debug_registers_changed,
16150 debug_registers_used): New.
16151 (initial_stuff): Rename to ...
16152 (i386_initial_stuff): ... this. Clear debug registers
16153 state variables.
16154 (store_debug_registers): Delete.
16155 (i386_get_thread_context): New.
16156 (load_debug_registers): Delete.
16157 (i386_set_thread_context): New.
16158 (i386_thread_added): New.
16159 (single_step): Rename to ...
16160 (i386_single_step): ... this.
16161 (do_fetch_inferior_registers): Rename to ...
16162 (i386_fetch_inferior_register): ... this.
16163 (i386_store_inferior_register): New.
16164 (the_low_target): Adapt to new interface.
16165
16166 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16167 (arm_get_thread_context): New.
16168 (arm_set_thread_context): New.
16169 (regptr): New.
16170 (do_fetch_inferior_registers): Rename to ...
16171 (arm_fetch_inferior_register): ... this.
16172 (arm_store_inferior_register): New.
16173 (arm_wince_breakpoint): Reimplement as unsigned long.
16174 (arm_wince_breakpoint_len): Define.
16175 (the_low_target): Adapt to new interface.
16176
16177 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16178 load_debug_registers. Add get_thread_context, set_thread_context,
16179 thread_added and store_inferior_register. Rename
16180 fetch_inferior_registers to fetch_inferior_register.
16181 (regptr): Remove declaration.
16182
dd6953e1
PA
161832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16184
16185 * linux-low.c (linux_detach): Change return type to int. Return 0.
16186 * spu-low.c (spu_detach): Likewise.
16187
444d6139
PA
161882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16189
16190 * target.h (target_ops): Change return type of detach to int.
16191 Add join.
16192 (join_inferior): New.
16193 * server.c (main): Don't skip detach support on mingw32.
16194 If the inferior doesn't support detaching return error.
16195 Call join_inferior instead of using waitpid.
16196 * linux-low.c (linux_join): New.
16197 (linux_target_op): Add linux_join.
16198 * spu-low.c (spu_join): New.
16199 (spu_target_ops): Add spu_join.
16200 * win32-low.c (win32_detach): Adapt to new interface.
16201 Reopen current_process_handle before detaching. Issue a child
16202 resume before detaching.
16203 (win32_join): New.
16204 (win32_target_op): Add win32_join.
16205
1d5315fe
PA
162062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16207
16208 * win32-low.c (win32-attach): Fix return value.
16209 * target.h (target_ops): Describe ATTACH return values.
16210
bf914831
PA
162112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16212
16213 * win32-low.c (GETPROCADDRESS): Define.
16214 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16215 (winapi_DebugSetProcessKillOnExit): Likewise.
16216 (win32_create_inferior): Force usage of ansi CreateProcessA.
16217 (win32_attach): Use GETPROCADDRESS.
16218 (win32_detach): Likewise.
16219
f72f3e60
PA
162202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16221
16222 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16223
ed50f18f
PA
162242007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16225
16226 * win32-low.c: Commit leftover changes from 2007-03-29.
16227
0c2ead7e
DJ
162282007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16229
16230 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16231 fields short instead of int. Add explicit padding.
16232 (i387_cache_to_fsave): Remove unnecessary casts.
16233 (i387_fsave_to_cache): Doc fix.
16234 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16235
73725ff3
DJ
162362007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16237
16238 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16239 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16240
d99f33d8
PA
162412007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16242
16243 * configure.srv (arm*-*-mingw32ce*): Move near the other
16244 arm targets.
16245
68070c10
PA
162462007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16247
2482afc6 16248 * configure.ac: Add errno checking.
68070c10
PA
16249 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16250 sys/file.h and malloc.h.
16251 (AC_CHECK_DECLS): Add perror.
16252 (srv_mingwce): Handle.
2482afc6 16253 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16254 win32-i386-low.o to srv_tgtobj.
16255 (i[34567]86-*-mingw*): Likewise.
16256 (arm*-*-mingw32ce*): Add case.
16257 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16258 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16259 [__MINGW32CE__] (strerror): New function.
16260 [__MINGW32CE__] (errno): Define to GetLastError.
16261 [__MINGW32CE__] (COUNTOF): New macro.
16262 (remote_open): Remove extra close call.
16263 * mem-break.c (delete_breakpoint_at): New function.
16264 * mem-break.h (delete_breakpoint_at): Declare.
16265 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16266 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16267 [USE_WIN32API] (read, write): Add char* casts.
16268 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16269 * server.h: Include wincecompat.h on Windows CE.
16270 [HAVE_ERRNO_H]: Check.
16271 (perror): Declare if not declared.
16272 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16273 (perror_with_name): Remove errno declaration.
16274 * wincecompat.h: New.
16275 * wincecompat.c: New.
16276 * win32-low.h: New.
16277 * win32-arm-low.c: New.
16278 * win32-i386-low.c: New.
16279 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16280 (OUTMSG2): Make it safe.
16281 (_T): New macro.
16282 (COUNTOF): New macro.
16283 (NUM_REGS): Get it from the low target.
16284 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16285 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16286 (thread_rec): Let low target handle debug registers.
16287 (child_add_thread): Likewise.
16288 (child_init_thread_list): Likewise.
16289 (continue_one_thread): Likewise.
16290 (regptr): New.
16291 (do_child_fetch_inferior_registers): Move to ...
16292 * win32-i386-low.c: ... here, and rename to ...
16293 (do_fetch_inferior_registers): ... this.
889bf7c5 16294 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16295 Go through the low target.
16296 (do_child_store_inferior_registers): Use regptr.
16297 (strwinerror): New function.
16298 (win32_create_inferior): Handle Windows CE.
16299 Use strwinerror instead of strerror on Windows error
16300 codes. Add program to the error output.
16301 Don't close the main thread handle on Windows CE.
16302 (win32_attach): Use coredll.dll on Windows CE.
16303 (win32_kill): Close current process and current
16304 thread handles.
16305 (win32_detach): Use coredll.dll on Windows CE.
16306 (win32_resume): Let low target handle debug registers, and
16307 step request.
16308 (handle_exception): Add/Remove initial breakpoint. Avoid
16309 non-existant WSTOPSIG on Windows CE.
16310 (win32_read_inferior_memory): Cast to remove warning.
16311 (win32_arch_string): Go through the low target.
16312 (initialize_low): Call set_breakpoint_data with the low
16313 target's breakpoint.
16314 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16315 FOP_REGNUM, mappings): Move to ...
16316 * win32-i386-low.c: ... here.
16317 * win32-low.c (win32_thread_info): Move to ...
16318 * win32-low.h: ... here.
16319 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16320 win32-arm-low.c and wincecompat.c.
16321 (all:): Add $EXEEXT.
16322 (install-only:): Likewise.
16323 (gdbserver:): Likewise.
16324 (gdbreplay:): Likewise.
16325 * config.in: Regenerate.
16326 * configure: Regenerate.
16327
41093d81
PA
163282007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16329
16330 * win32-low.c: Rename typedef thread_info to
16331 win32_thread_info throughout.
16332
544afa54
PA
163332007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16334
16335 * win32-i386-low.c: Rename to ...
16336 * win32-low.c: ... this.
16337 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16338 * Makefile.in: Likewise.
16339
bce7165d
PA
163402007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16341
16342 * remote-utils.c (monitor_output): Constify msg parameter.
16343 * server.h (monitor_output): Likewise.
16344 * win32-i386-low.c (handle_output_debug_string): New.
16345 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16346 handle_output_debug_string.
16347 (get_child_debug_event): Likewise.
16348
506c7aa0
DJ
163492007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16350
16351 * server.c (main): Correct strtoul check.
16352
42c81e2a
DJ
163532007-03-27 Jon Ringle <jon@ringle.org>
16354
16355 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16356
9453113a
DJ
163572007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16358
16359 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16360
64a69107
DJ
163612007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16362
16363 * terminal.h: Check HAVE_SGTTY_H.
16364
163652007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16366
16367 * remote-utils.c (remote_open): Print out the assigned port number.
16368
c74d0ad8
DJ
163692007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16370
16371 * remote-utils.c (monitor_output): New function.
16372 * server.c (debug_threads): Define here.
16373 (monitor_show_help): New function.
16374 (handle_query): Handle qRcmd.
16375 (main): Do not handle 'd' packet.
16376 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16377 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16378 of debug_threads.
16379
de7c3b4a
PA
163802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16381
16382 * Makefile.in (EXEEXT): New.
16383 (clean): Use $(EXEEXT).
16384
ef57601b
PA
163852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16386
16387 * target.h (target_ops): Rename send_signal to request_interrupt,
16388 and remove enum target_signal parameter.
16389 * linux-low.c (linux_request_interrupt): Rename from
16390 linux_send_signal, and always send SIGINT.
16391 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16392 and always send SIGINT.
16393 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16394 of send_signal.
16395 (input_interrupt): Likewise.
16396
820f2bda
PA
163972007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16398
16399 * server.c (get_features_xml): Check if target implemented
16400 arch_string.
16401 * win32-i386-low.c (win32_arch_string): New.
16402 (win32_target_ops): Add win32_arch_string as arch_string member.
16403
ab39bf24
UW
164042007-02-22 Markus Deuling <deuling@de.ibm.com>
16405
16406 * spu-low.c (spu_arch_string): New.
16407 (spu_target_ops): Add spu_arch_string.
16408
61ff6e04
DJ
164092007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16410
16411 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16412 * configure.ac: Do not check for terminal.h.
16413 * configure, config.in: Regenerated.
16414
fb1e4ffc
DJ
164152007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16416
16417 * Makefile.in (OBS): Add $(XML_BUILTIN).
16418 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16419 (clean): Update.
16420 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16421 (arm-with-iwmmxt.c): New.
16422 * config.in, configure: Regenerate.
16423 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16424 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16425 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16426 (arm*-*-linux*): Add iWMMXt and regset support.
16427 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16428 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16429 (arm_store_wmmxregset, target_regsets): New.
16430 * server.c (get_features_xml): Take annex argument. Check builtin
16431 XML documents.
16432 (handle_query): Handle multiple annexes.
16433
0f48aa01
DJ
164342007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16435
16436 * remote-utils.c [USE_WIN32API] (read, write): Define.
16437 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16438 write.
16439
23181151
DJ
164402007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16441
16442 * linux-i386-low.c (the_low_target): Set arch_string.
16443 * linux-x86-64-low.c (the_low_target): Likewise.
16444 * linux-low.c (linux_arch_string): New.
16445 (linux_target_ops): Add it.
16446 * linux-low.h (struct linux_target_ops): Add arch_string.
16447 * server.c (write_qxfer_response): Use const void * for DATA.
16448 (get_features_xml): New.
16449 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16450 * target.h (struct target_ops): Add arch_string method.
16451
9d606399
DJ
164522007-01-03 Denis Pilat <denis.pilat@st.com>
16453 Daniel Jacobowitz <dan@codesourcery.com>
16454
16455 * linux-low.c (linux_kill): Handle being called with no threads.
16456 * win32-i386-low.c (win32_kill): Likewise.
16457 (get_child_debug_event): Clear current_process_handle.
16458
164592006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16460 Daniel Jacobowitz <dan@codesourcery.com>
16461
16462 * remote-utils.c (remote_open): Check the type of specified
16463 serial port devices before opening them.
16464 * server.c (main): Kill the inferior if an error occurs during
16465 the first remote_open.
16466
a5e13d24
DJ
164672006-12-05 Markus Deuling <deuling@de.ibm.com>
16468
16469 * README: Update supported targets.
16470
186947f7
DJ
164712006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16472
16473 * Makefile.in (clean): Remove reg-mips64.c.
16474 (reg-mips64.c, reg-mips64.o): New rules.
16475 * configure.srv: Handle mips64. Include regset support for mips.
16476 * linux-mips-low.c (union mips_register): New.
16477 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16478 (mips_breakpoint, mips_breakpoint_at): Use int.
16479 (mips_collect_register, mips_supply_register)
16480 (mips_collect_register_32bit, mips_supply_register_32bit)
16481 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16482 (mips_store_fpregset, target_regsets): New.
16483 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16484
a13e2c95
UW
164852006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16486
16487 * configure.srv: Add target "spu*-*-*".
16488 * Makefile.in (clean): Remove reg-spu.c.
16489 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16490 * spu-low.c: New file.
16491
cb7283db
DJ
164922006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16493
16494 * configure.ac: Correct td_thr_tls_get_addr test.
16495 * configure: Regenerated.
16496
89be2091
DJ
164972006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16498
16499 * linux-low.c (linux_wait_for_event): Reformat. Use the
16500 pass_signals array.
16501 * remote-utils.c (decode_address_to_semicolon): New.
16502 * server.c (pass_signals, handle_general_set): New.
16503 (handle_query): Mention QPassSignals for qSupported.
16504 (main): Call handle_general_set.
16505 * server.h (pass_signals, decode_address_to_semicolon): New.
16506
000ef4f0
DJ
165072006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16508
16509 * server.c (handle_query): Correct error handling for read_auxv.
16510
b7149293
UW
165112005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16512
16513 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16514 and srv_linux_thread_db to yes.
16515 * linux-s390-low.c (s390_fill_gregset): New function.
16516 (target_regsets): Define data structure.
16517
dae5f5cf
DJ
165182006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16519
16520 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16521 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16522 * config.in, configure: Regenerated.
16523 * inferiors.c (gdb_id_to_thread): New function.
16524 (gdb_id_to_thread_id): Use it.
16525 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16526 * linux-low.h (struct process_info): Add th member.
16527 (thread_db_get_tls_address): New prototype.
16528 * remote-utils.c (decode_address): Make non-static.
16529 * server.c (handle_query): Handle qGetTLSAddr.
16530 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16531 * target.h (struct target_ops): Add get_tls_address.
16532 * thread-db.c (maybe_attach_thread): Save the thread handle.
16533 (thread_db_get_tls_address): New.
16534
32ca6d61
DJ
165352006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16536
16537 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16538 (linux_resume_one_process): Take a siginfo_t *. Update all
16539 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16540 (struct pending_signals): Add a siginfo_t.
16541 (linux_wait_for_process): Always set last_status.
16542 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16543 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16544 * linux-low.h (struct process_info): Add last_status.
16545
5ffff7c1
DJ
165462006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16547
16548 * remote-utils.c (try_rle): New function.
16549 (putpkt_binary): Use it.
16550
8695c747
DJ
165512006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16552
16553 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16554 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16555 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16556 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16557 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16558 point registers.
16559
290fadea
RS
165602006-08-08 Richard Sandiford <richard@codesourcery.com>
16561
16562 * server.c (terminal_fd): New variable.
16563 (old_foreground_pgrp): Likewise.
16564 (restore_old_foreground_pgrp): New function.
16565 (start_inferior): Record the terminal file descriptor in terminal_fd
16566 and its original foreground group in old_foreground_pgrp. Register
16567 restore_old_foreground_pgrp with atexit().
16568
9f2e1e63
DJ
165692006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16570
16571 * server.c (handle_query): Correct qPart to qXfer.
16572
b80864fb
DJ
165732006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16574
16575 * configure.ac: Check for more headers which are missing on
16576 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16577 * configure.srv: Add Cygwin and mingw32.
16578 * remote-utils.c: Don't include headers unconditionally which
16579 are missing on mingw32. Include <winsock.h> for mingw32.
16580 (remote_open): Adjust for mingw32 support. Flush
16581 standard error after writing to it.
16582 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16583 (unblock_async_io, enable_async_io, disable_async_io)
16584 (readchar, getpkt): Update for Winsock support.
16585 (prepare_resume_reply): Expect a protocol signal number.
16586 * server.c: Disable <sys/wait.h> on mingw32.
16587 (start_inferior): Adjust for mingw32 support. Flush
16588 standard error after writing to it.
16589 (attach_inferior): Likewise. Use protocol signal
16590 numbers.
16591 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16592 and names.
16593 * win32-i386-low.c: New file.
16594 * Makefile.in (XM_CLIBS): Set.
16595 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16596 (win32-i386-low.o): New dependency rule.
16597 * linux-low.c (linux_wait): Use target signal numbers.
16598 * target.h (struct target_ops): Doc fix.
16599 * server.h (target_signal_to_name): New prototype.
16600 * gdbreplay.c: Don't include headers unconditionally which
16601 are missing on mingw32. Include <winsock.h> for mingw32.
16602 (remote_close, remote_open): Adjust for Winsock support.
16603 * configure, config.in: Regenerated.
16604
0876f84a
DJ
166052006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16606
16607 * server.c (decode_xfer_read, write_qxfer_response): New.
16608 (handle_query): Take a packet length argument. Handle
16609 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16610 the qSupported response.
16611 (main): Update call to handle_query.
16612
01f9e8fa
DJ
166132006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16614
16615 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16616 (putpkt_binary): Renamed from putpkt and adjusted for binary
16617 data.
16618 (putpkt): New wrapper for putpkt_binary.
16619 (readchar): Don't mask off the high bit.
16620 (decode_X_packet): New function.
16621 * server.c (main): Call putpkt_binary if a handler sets the packet
16622 length. Save the length of the incoming packet. Handle 'X'.
16623 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16624
be2a5f71
DJ
166252006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16626
16627 * server.c (handle_query): Handle qSupported.
16628
ea025f5f
DJ
166292006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16630
16631 * remote-utils.c (all_symbols_looked_up): New variable.
16632 (look_up_one_symbol): Check it.
16633 * server.h (look_up_one_symbol): New declaration.
16634 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16635
9308fc88
DJ
166362006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16637
16638 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16639 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16640 (PTRACE_GET_THREAD_AREA): Define.
16641 (ps_get_thread_area): New function.
16642
52fb6437
NS
166432006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16644
16645 * configure.srv (m68k*-*-uclinux*): New target.
16646 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16647 (linux_resume_one_process): Remove extraneous cast.
16648 (linux_read_offsets): New.
16649 (linux_target_op): Add linux_read_offsets on mmuless systems.
16650 * server.c (handle_query): Add qOffsets logic.
16651 * target.h (struct target_ops): Add read_offsets.
16652
21b0f40c
DJ
166532006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16654
16655 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16656 (PTRACE_GET_THREAD_AREA): Define.
16657 (ps_get_thread_area): New function.
16658 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16659 (linux-x86-64-low.o): Update.
16660
0050a760
DJ
166612006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16662
16663 * configure.ac: Remove checks for prfpregset_t.
16664 * gdb_proc_service.h: New file.
16665 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16666 new "gdb_proc_service.h".
16667 * proc-service.c: Likewise.
16668 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16669 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16670 * Makefile.in (gdb_proc_service_h): Updated.
16671 * configure, config.in: Regenerated.
16672
b92a518e
DJ
166732006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16674
16675 * remote-utils.c (prepare_resume_reply): Move declaration
16676 of gdb_id_from_wait to the top of the block.
16677
545587ee
DJ
166782006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16679
16680 * linux-low.c (regsets_store_inferior_registers): Read the regset
16681 from the target before filling it.
16682
9db87ebd
DJ
166832006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16684
16685 * server.c (attach_inferior): Return SIGTRAP for a successful
16686 attach.
16687
dd24457d
DJ
166882006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16689
16690 * Makefile.in (OBS): Add version.o.
16691 (STAGESTUFF): Delete.
16692 (version.o): Add dependencies.
16693 (version.c): Replace rule.
16694 (clean): Remove version.c.
16695 * server.c (gdbserver_version): New.
16696 (gdbserver_usage): Use printf.
16697 (main): Handle --version and --help.
16698 * server.h (version, host_name): Add declarations.
16699
6f0f660e
EZ
167002005-12-23 Eli Zaretskii <eliz@gnu.org>
16701
889bf7c5
PA
16702 * linux-arm-low.c:
16703 * linux-arm-low.c:
16704 * inferiors.c:
16705 * i387-fp.h:
16706 * i387-fp.c:
16707 * gdbreplay.c:
16708 * regcache.c:
16709 * proc-service.c:
16710 * mem-break.h:
16711 * mem-break.c:
16712 * linux-x86-64-low.c:
16713 * linux-sh-low.c:
16714 * linux-s390-low.c:
16715 * linux-ppc64-low.c:
16716 * linux-ppc-low.c:
16717 * linux-mips-low.c:
16718 * linux-m68k-low.c:
16719 * linux-m32r-low.c:
16720 * linux-low.h:
16721 * linux-low.c:
16722 * linux-ia64-low.c:
16723 * linux-i386-low.c:
16724 * linux-crisv32-low.c:
16725 * thread-db.c:
16726 * terminal.h:
16727 * target.h:
16728 * target.c:
16729 * server.h:
16730 * server.c:
16731 * remote-utils.c:
16732 * regcache.h:
16733 * utils.c:
16734 * Makefile.in:
16735 * configure.ac:
6f0f660e
EZ
16736 * gdbserver.1: Add (C) after Copyright. Update the FSF
16737 address.
16738
9d1fb177
DJ
167392005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16740
16741 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16742 (arm_breakpoint_at): Recognize both breakpoints.
16743 (the_low_target): Use the correct breakpoint instruction.
16744
011a70c2
DJ
167452005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16746
16747 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16748 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16749 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16750 (the_low_target): Update.
16751
7fb85e41
AS
167522005-10-25 Andreas Schwab <schwab@suse.de>
16753
16754 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16755
16756 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16757 (ia64_num_regs): Reduce to 462.
16758
3db0444b
DJ
167592005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16760
16761 * acinclude.m4: Correct quoting.
16762 * aclocal.m4: Regenerated.
16763
16764 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16765 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16766 (thread_db_init): Call thread_db_err_str.
16767 * configure.ac: Check for TD_VERSION.
16768 * config.in, configure: Regenerated.
16769
bee0189a
DJ
167702005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16771
16772 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16773
e9d25b98
DJ
167742005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16775
16776 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16777 is not available. Define HAVE_PTRACE_GETREGS if it is.
16778 * config.in, configure: Regenerated.
16779 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16780 * linux-i386-low.c, linux-m68k-low.c: Update to use
16781 HAVE_PTRACE_GETREGS.
16782 * linux-low.c (regsets_fetch_inferior_registers)
16783 (regsets_store_inferior_registers): Only return 0 if we processed
16784 GENERAL_REGS.
16785 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16786 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16787
a06660f7
DJ
167882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16789
16790 * inferiors.c (struct thread_info): Add gdb_id.
16791 (add_thread): Add gdb_id argument.
16792 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16793 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16794 calls to add_thread.
16795 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16796 * server.c (handle_query): Use thread_to_gdb_id.
16797 (handle_v_cont, main): Use gdb_id_to_thread_id.
16798 * server.h (add_thread): Update prototype.
16799 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16800 prototypes.
16801
5a1f5858
DJ
168022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16803
16804 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16805 left-padded registers.
16806 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16807 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16808
e122f1f5
SE
168092005-07-01 Steve Ellcey <sje@cup.hp.com>
16810
16811 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16812 * configure: Regenerate.
16813 * config.in: Regenerate.
16814 * server.h (NEED_DECLARATION_STRERROR):
16815 Replace with !HAVE_DECL_STRERROR.
16816
d592fa2f
DJ
168172005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16818
16819 * linux-low.c (linux_wait, linux_send_signal): Don't test
16820 an unsigned long variable for > 0 if it could be MAX_ULONG.
16821 * server.c (myresume): Likewise.
16822 * target.c (set_desired_inferior): Likewise.
16823
ccbd4912
MK
168242005-06-13 Mark Kettenis <kettenis@gnu.org>
16825
16826 * configure.ac: Simplify and improve check for socklen_t.
16827 * configure, config.in: Regenerate.
16828
f450004a
DJ
168292005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16830
16831 * acconfig.h: Remove.
16832 * configure.ac: Add a test for socklen_t. Use three-argument
16833 AC_DEFINE throughout.
16834 * config.in: Regenerated using autoheader 2.59.
16835 * configure: Regenerated.
16836
16837 * gdbreplay.c (socklen_t): Provide a default.
16838 (remote_open): Use socklen_t.
16839 * remote-utils.c (socklen_t): Provide a default.
16840 (remote_open): Use socklen_t.
16841 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16842 unsigned char.
16843
16844 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16845 char for buffers.
16846 * linux-low.c (linux_read_memory, linux_write_memory)
16847 (linux_read_auxv): Likewise.
16848 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16849 (check_mem_write): Likewise.
16850 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16851 Likewise.
16852 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16853 (registers_from_string, register_data): Likewise.
16854 * server.c (handle_query, main): Likewise.
16855 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16856 (decode_M_packet): Likewise.
16857 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16858 * target.h (struct target_ops): Update read_memory, write_memory,
16859 and read_auxv.
16860 (read_inferior_memory, write_inferior_memory): Update.
16861 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16862 to unsigned char *.
16863 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16864 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16865 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16866 linux-s390-low.c, linux-sh-low.c: Update for changes in
16867 read_inferior_memory and the_low_target->breakpoint.
16868
eee84df1
DJ
168692005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16870
16871 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16872 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16873 * configure.srv: Add powerpc64-*-linux*.
16874 * linux-ppc64-low.c: New file.
16875
45b134e5
OF
168762005-05-23 Orjan Friberg <orjanf@axis.com>
16877
16878 * linux-cris-low.c: New file with support for CRIS.
16879 * linux-crisv32-low.c: Ditto for CRISv32.
16880 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16881 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16882 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16883 reg-crisv32.o, and reg-crisv32.c to make rules.
16884 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16885 recognized targets.
16886
48d93c75
UW
168872005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16888
16889 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16890 of sizeof (PTRACE_XFER_TYPE).
16891 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16892
e013ee27
OF
168932005-05-12 Orjan Friberg <orjanf@axis.com>
16894
889bf7c5 16895 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16896 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16897 pointers for hardware watchpoint support.
16898 * linux-low.h (struct linux_target_ops): Ditto.
16899 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16900 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16901 to linux_target_ops.
16902 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16903 reply packet.
16904 * server.c (main): Recognize 'Z' and 'z' packets.
16905
b0ded00b
UW
169062005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16907
16908 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16909 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16910 (the_low_target): Add new members.
16911
8643e2ad
DJ
169122005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16913
16914 * proc-service.c (ps_lgetregs): Search all_processes instead of
16915 all_threads.
16916
fc620387
DJ
169172005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16918
16919 * server.c (start_inferior): Change return type to int.
16920 (attach_inferior): Change sigptr to int *.
16921 (handle_v_cont, handle_v_requests): Change signal to int *.
16922 (main): Change signal to int.
16923
169242005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16925
16926 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16927 * configure.srv: Add m32r*-*-linux*.
16928 * linux-m32r-low.c: New file.
16929
e0e76420
DJ
169302005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16931
16932 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16933
a1928bad
DJ
169342005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16935
16936 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16937 Take unsigned long arguments for PIDs.
16938 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16939 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16940 (wait_for_sigstop, linux_resume_one_process)
16941 (regsets_fetch_inferior_registers, linux_send_signal)
16942 (linux_read_auxv): Likewise. Update the types of variables holding
16943 PIDs. Update format string specifiers.
16944 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16945 * remote-utils.c (prepare_resume_reply): Likewise.
16946 * server.c (cont_thread, general_thread, step_thread)
16947 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16948 unsigned long.
16949 (handle_query): Update format specifiers.
16950 (handle_v_cont, main): Use strtoul for thread IDs.
16951 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16952 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16953 (general_thread, step_thread, thread_from_wait)
16954 (old_thread_from_wait): Update.
16955 * target.h (struct thread_resume): Use unsigned long for THREAD.
16956 (struct target_ops): Use unsigned long for arguments to attach and
16957 thread_alive.
16958
dcdb98d2
DJ
169592005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16960
16961 * acinclude.m4: Include bfd/bfd.m4 directly.
16962 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16963 <agriffis@toolchain.org>.
16964 * aclocal.m4, configure: Regenerated.
16965
bec39cab
AC
169662005-01-07 Andrew Cagney <cagney@gnu.org>
16967
16968 * configure.ac: Rename configure.in, require autoconf 2.59.
16969 * configure: Re-generate.
16970
434c4c77
DJ
169712004-12-08 Daniel Jacobowitz <dan@debian.org>
16972
16973 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16974 LIBS when finished.
16975 * aclocal.m4: Regenerated.
16976 * configure: Regenerated.
16977
db1d3e1b
AS
169782004-11-21 Andreas Schwab <schwab@suse.de>
16979
16980 * linux-m68k-low.c (m68k_num_gregs): Define.
16981 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16982 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16983 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16984 (m68k_breakpoint_at): New. Add to the_low_target.
16985
16986 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16987 srv_linux_thread_db to yes.
16988
43360365
JB
169892004-10-20 Joel Brobecker <brobecker@gnat.com>
16990
16991 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16992 (ARCH_SET_FS): Likewise.
16993 (ARCH_GET_FS): Likewise.
16994 (ARCH_GET_GS): Likewise.
16995
fd500816
DJ
169962004-10-16 Daniel Jacobowitz <dan@debian.org>
16997
16998 * linux-i386-low.c (ps_get_thread_area): New.
16999 * linux-x86-64-low.c (ps_get_thread_area): New.
17000 * linux-low.c: Include <sys/syscall.h>.
17001 (linux_kill_one_process): Don't kill the first thread here.
17002 (linux_kill): Kill the first thread here.
17003 (kill_lwp): New function.
17004 (send_sigstop, linux_send_signal): Use it.
17005 * proc-service.c: Clean up #ifdefs.
17006 (fpregset_info): Delete.
17007 (ps_lgetregs): Update and enable implementation.
17008 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17009 implementations.
17010 * remote-utils.c (struct sym_cache, symbol_cache): New.
17011 (input_interrupt): Print a clearer message.
17012 (async_io_enabled): New variable.
17013 (enable_async_io, disable_async_io): Use it. Update comments.
17014 (look_up_one_symbol): Use the symbol cache.
17015 * thread-db.c (thread_db_look_up_symbols): New function.
17016 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17017
f6de3c42
DJ
170182004-10-16 Daniel Jacobowitz <dan@debian.org>
17019
17020 * configure.in: Test for -rdynamic.
17021 * configure: Regenerated.
17022 * Makefile (INTERNAL_LDFLAGS): New.
17023 (gdbserver, gdbreplay): Use it.
17024
2c0fc042
AC
170252004-09-02 Andrew Cagney <cagney@gnu.org>
17026
17027 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17028
075b3282
DJ
170292004-03-23 Daniel Jacobowitz <drow@mvista.com>
17030
17031 * linux-low.c (linux_wait): Clear all_processes list also.
17032
fa6a77dc
DJ
170332004-03-12 Daniel Jacobowitz <drow@mvista.com>
17034
17035 * linux-low.c: Include <errno.h>. Remove extern declaration of
17036 errno.
17037
6d782a97
DJ
170382004-03-12 Daniel Jacobowitz <drow@mvista.com>
17039
17040 * gdbreplay.c, server.h, utils.c: Update copyright years.
17041
3a7fb99b
DJ
170422004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17043
17044 * server.c (main): Print child status or termination signal from
17045 variable 'signal', not 'sig'.
17046
c3e735a6
DJ
170472004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17048
17049 * linux-low.c (linux_read_memory): Change return type to
17050 int. Check for and return error from ptrace().
17051 * target.c (read_inferior_memory): Change return type to int. Pass
17052 back return status from the_target->read_memory().
17053 * target.h (struct target_ops): Adapt *read_memory() prototype.
17054 Update comment.
17055 (read_inferior_memory): Adapt prototype.
17056 * server.c (main): Return an error packet if
17057 read_inferior_memory() returns an error.
17058
a59d1c82
DJ
170592004-03-04 Daniel Jacobowitz <drow@mvista.com>
17060
17061 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17062 Unify with other clean targets.
17063
dc3f8883
DJ
170642004-02-29 Daniel Jacobowitz <drow@mvista.com>
17065
17066 * server.c (handle_v_cont): Call set_desired_inferior.
17067
89a208da
DJ
170682004-02-29 Daniel Jacobowitz <drow@mvista.com>
17069
17070 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17071
62ea82f5
DJ
170722004-02-29 Daniel Jacobowitz <drow@mvista.com>
17073
17074 * linux-low.c (linux_wait): Unblock async I/O.
17075 (linux_resume): Block and enable async I/O.
17076 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17077 * server.h (block_async_io, unblock_async_io): Add prototypes.
17078
6910d122
DJ
170792004-02-29 Daniel Jacobowitz <drow@mvista.com>
17080
17081 * remote-utils.c (remote_open): Print a status notice after
17082 opening a TCP port.
17083 * server.c (attach_inferior): Print a status notice after
17084 attaching.
17085
170862004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17087
17088 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17089
c89dc5d4
DJ
170902004-02-26 Daniel Jacobowitz <drow@mvista.com>
17091
17092 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17093 error packet.
17094 * server.c, target.h: Update copyright years.
17095
4b8dad4a
RM
170962004-02-25 Roland McGrath <roland@redhat.com>
17097
17098 * target.h (struct target_ops): New member `read_auxv'.
17099 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17100 * linux-low.c (linux_read_auxv): New function.
17101 (linux_target_ops): Initialize `read_auxv' member to that.
17102
d7446758
JB
171032004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17104
17105 Committed by Jim Blandy <jimb@redhat.com>.
17106
17107 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17108 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17109 instead of GPR_SIZE to distiguish s390 and s390x targets.
17110
5544ad89
DJ
171112004-01-31 Daniel Jacobowitz <drow@mvista.com>
17112
17113 * linux-low.c: Update copyright year.
17114 (check_removed_breakpoint): Clear pending_is_breakpoint.
17115 (linux_set_resume_request, linux_queue_one_thread)
17116 (resume_status_pending_p): New functions.
17117 (linux_continue_one_thread): Use process->resume.
17118 (linux_resume): Only resume threads if there are no pending events.
17119 * linux-low.h (struct process_info): Add resume request
17120 pointer.
17121
2a68b70e
DJ
171222004-01-30 Daniel Jacobowitz <drow@mvista.com>
17123
17124 * regcache.c (new_register_cache): Clear the allocated register
17125 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17126
64386c31
DJ
171272003-10-13 Daniel Jacobowitz <drow@mvista.com>
17128
17129 * linux-low.c (linux_resume): Take a struct thread_resume *
17130 argument.
17131 (linux_wait): Update call.
17132 (resume_ptr): New static variable.
17133 (linux_continue_one_thread): Renamed from
17134 linux_continue_one_process. Use resume_ptr.
17135 (linux_resume): Use linux_continue_one_thread.
17136 * server.c (handle_v_cont, handle_v_requests): New functions.
17137 (myresume): New function.
17138 (main): Handle 'v' case.
17139 * target.h (struct thread_resume): New type.
17140 (struct target_ops): Change argument of "resume" to struct
17141 thread_resume *.
17142 (myresume): Delete macro.
17143
c938e9b0
L
171442003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17145
17146 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17147 (uninstall): Support DESTDIR.
17148
7f313d07
BC
17149Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17150
17151 * configure.srv: Add xscale*linux copy of arm*linux entry.
17152
3b2fc2ea
DJ
171532003-07-24 Daniel Jacobowitz <drow@mvista.com>
17154
17155 * linux-arm-low.c (arm_reinsert_addr): New function.
17156 (the_low_target): Add arm_reinsert_addr.
17157
1c0a559e
MK
171582003-07-08 Mark Kettenis <kettenis@gnu.org>
17159
17160 * mem-break.c: Remove whitespace at end of file.
17161
43d5792c
DJ
171622003-06-28 Daniel Jacobowitz <drow@mvista.com>
17163
17164 * configure.in: Check whether we need to prototype strerror.
17165 * server.h: Optionally prototype strerror.
17166 * gdbreplay.c (perror_with_name): Use strerror.
17167 * linux-low.c (linux_attach_lwp): Use strerror.
17168 * utils.c (perror_with_name): Use strerror.
17169 * config.in, configure: Regenerated.
17170
c8a86edf
DJ
171712003-06-28 Daniel Jacobowitz <drow@mvista.com>
17172
17173 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17174 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17175
73d37363
DJ
171762003-06-20 Daniel Jacobowitz <drow@mvista.com>
17177
17178 * Makefile.in (SFILES): Update.
17179 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17180 low-sun3.c: Remove files.
17181
6ad8ae5c
DJ
171822003-06-17 Daniel Jacobowitz <drow@mvista.com>
17183
17184 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17185 (linux_detach_one_process, linux_detach): New functions.
17186 (linux_target_ops): Add linux_detach.
17187 * server.c (main): Handle 'D' packet.
17188 * target.h (struct target_ops): Add "detach" member.
17189 (detach_inferior): Define.
17190
1581182a
MK
171912003-06-13 Mark Kettenis <kettenis@gnu.org>
17192
17193 From Kelley Cook <kelleycook@wideopenwest.com>:
17194 * configure.srv: Accept i[34567]86 variants.
17195
e5379b03
DJ
171962003-06-05 Daniel Jacobowitz <drow@mvista.com>
17197
17198 * linux-low.c (linux_wait_for_event): Correct comment typos.
17199 (linux_resume_one_process): Call check_removed_breakpoint.
17200 (linux_send_signal): New function.
17201 (linux_target_ops): Add linux_send_signal.
17202 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17203 of kill.
17204 * target.h (struct target_ops): Add send_signal.
17205
2ff29de4
JB
172062003-05-29 Jim Blandy <jimb@redhat.com>
17207
17208 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17209 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17210 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17211 away part of the register's value.
17212
254787d4
DJ
172132003-03-26 Daniel Jacobowitz <drow@mvista.com>
17214
17215 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17216 (linux_wait_for_event, linux_init_signals): Likewise.
17217
94e10508
DJ
172182003-03-17 Daniel Jacobowitz <drow@mvista.com>
17219
17220 * configure.in: Check for stdlib.h.
17221 * configure: Regenerated.
17222 * config.in: Regenerated.
17223
4c0711e0
DJ
172242003-01-04 Andreas Schwab <schwab@suse.de>
17225
17226 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17227
ef66e766
AC
172282003-01-02 Andrew Cagney <ac131313@redhat.com>
17229
17230 * Makefile.in: Remove obsolete code.
17231
a1358604
DJ
172322002-11-20 Daniel Jacobowitz <drow@mvista.com>
17233
17234 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17235 defined(PT_FPR0_HI).
17236
23ce3b1c
DJ
172372002-11-17 Stuart Hughes <seh@zee2.com>
17238
17239 * linux-arm-low.c (arm_num_regs): Increase.
17240 (arm_regmap): Include status register.
17241
172422002-11-17 Daniel Jacobowitz <drow@mvista.com>
17243
17244 * linux-low.c (register_addr): Remove incorrect -1 check.
17245
a9fa9f7d
DJ
172462002-08-29 Daniel Jacobowitz <drow@mvista.com>
17247
17248 * linux-low.c (linux_create_inferior): Call setpgid. Return
17249 the new PID.
17250 (unstopped_p, linux_signal_pid): Remove.
17251 (linux_target_ops): Remove linux_signal_pid.
17252 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17253 global instead of target method.
17254 * target.h (struct target_ops): Remove signal_pid. Update comment
17255 for create_inferior.
17256 * server.c (signal_pid): New variable.
17257 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17258 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17259 (attach_inferior): Set signal_pid.
17260
17574093
DJ
172612002-08-23 Daniel Jacobowitz <drow@mvista.com>
17262
17263 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17264
172652002-08-20 Jim Blandy <jimb@redhat.com>
17266
17267 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17268 default for this.
17269
172702002-08-01 Andrew Cagney <cagney@redhat.com>
17271
17272 * Makefile.in: Make chill references obsolete.
17273
172742002-07-24 Kevin Buettner <kevinb@redhat.com>
17275
17276 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17277 * configure: Regenerate.
17278 * config.in: Regenerate.
17279
172802002-07-09 David O'Brien <obrien@FreeBSD.org>
17281
17282 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17283 (perror_with_name, remote_close, remote_open, expect, play): Static.
17284
172852002-07-04 Michal Ludvig <mludvig@suse.cz>
17286
4b8dad4a 17287 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17288 byte offsets instead of an array of indexes.
17289 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17290
172912002-06-13 Daniel Jacobowitz <drow@mvista.com>
17292
17293 * regcache.c: Add comment.
17294
172952002-06-11 Daniel Jacobowitz <drow@mvista.com>
17296
17297 * thread-db.c: New file.
17298 * proc-service.c: New file.
17299 * acinclude.m4: New file.
17300 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17301 proc-service.o, and thread-db.o.
17302 (linux-low.o): Add USE_THREAD_DB.
17303 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17304 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17305 * aclocal.m4: Regenerated.
17306 * config.in: Regenerated.
17307 * configure: Regenerated.
17308 * configure.in: Check for proc_service.h, sys/procfs.h,
17309 thread_db.h, and linux/elf.h headrs.
17310 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17311 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17312 Check for -lthread_db and thread support.
17313 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17314 PowerPC, and SuperH.
17315 * i387-fp.c: Constify arguments.
17316 * i387-fp.h: Likewise.
17317 * inferiors.c: (struct thread_info): Renamed from
17318 `struct inferior_info'. Remove PID member. Use generic inferior
17319 list header. All uses updated.
17320 (inferiors, signal_pid): Removed.
17321 (all_threads): New variable.
17322 (get_thread): Define.
17323 (add_inferior_to_list): New function.
17324 (for_each_inferior): New function.
17325 (change_inferior_id): New function.
17326 (add_inferior): Removed.
17327 (remove_inferior): New function.
17328 (add_thread): New function.
17329 (free_one_thread): New function.
17330 (remove_thread): New function.
17331 (clear_inferiors): Use for_each_inferior and free_one_thread.
17332 (find_inferior): New function.
17333 (find_inferior_id): New function.
17334 (inferior_target_data): Update argument type.
17335 (set_inferior_target_data): Likewise.
17336 (inferior_regcache_data): Likewise.
17337 (set_inferior_regcache_data): Likewise.
17338 * linux-low.c (linux_bp_reinsert): Remove.
17339 (all_processes, stopping_threads, using_thrads)
17340 (struct pending_signals, debug_threads, pid_of): New.
17341 (inferior_pid): Replace with macro.
17342 (struct inferior_linux_data): Remove.
17343 (get_stop_pc, add_process): New functions.
17344 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17345 Use add_process and add_thread.
17346 (linux_attach_lwp): New function, based on old linux_attach. Use
17347 add_process and add_thread. Set stop_expected for new threads.
17348 (linux_attach): New function.
17349 (linux_kill_one_process): New function.
17350 (linux_kill): Kill all LWPs.
17351 (linux_thread_alive): Use find_inferior_id.
17352 (check_removed_breakpoints, status_pending_p): New functions.
17353 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17354 Update. Use WNOHANG. Wait for cloned processes also. Update process
17355 struct for the found process.
17356 (linux_wait_for_event): New function.
17357 (linux_wait): Use it. Support LWPs.
17358 (send_sigstop, wait_for_sigstop, stop_all_processes)
17359 (linux_resume_one_process, linux_continue_one_process): New functions.
17360 (linux_resume): Support LWPs.
17361 (REGISTER_RAW_SIZE): Remove.
17362 (fetch_register): Use register_size instead. Call supply_register.
17363 (usr_store_inferior_registers): Likewise. Call collect_register.
17364 Fix recursive case.
17365 (regsets_fetch_inferior_registers): Improve error message.
17366 (regsets_store_inferior_registers): Add debugging.
17367 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17368 (unstopped_p, linux_signal_pid): New functions.
17369 (linux_target_ops): Add linux_signal_pid.
17370 (linux_init_signals): New function.
17371 (initialize_low): Call it. Initialize using_threads.
17372 * regcache.c (inferior_regcache_data): Add valid
17373 flag.
17374 (get_regcache): Fetch registers lazily. Add fetch argument
17375 and update all callers.
17376 (regcache_invalidate_one, regcache_invalidate): New
17377 functions.
17378 (new_register_cache): Renamed from create_register_cache.
17379 Return the new regcache.
17380 (free_register_cache): Change argument to a void *.
17381 (registers_to_string, registers_from_string): Call get_regcache
17382 with fetch flag set.
17383 (register_data): Make static. Pass fetch flag to get_regcache.
17384 (supply_register): Call get_regcache with fetch flag clear.
17385 (collect_register): Call get_regcache with fetch flag set.
17386 (collect_register_as_string): New function.
17387 * regcache.h: Update.
17388 * remote-utils.c (putpkt): Flush after debug output and use
17389 stderr.
17390 Handle input interrupts while waiting for an ACK.
17391 (input_interrupt): Use signal_pid method.
17392 (getpkt): Flush after debug output and use stderr.
17393 (outreg): Use collect_register_as_string.
17394 (new_thread_notify, dead_thread_notify): New functions.
17395 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17396 and general_thread.
17397 (look_up_one_symbol): Flush after debug output.
17398 * server.c (step_thread, server_waiting): New variables.
17399 (start_inferior): Don't use signal_pid. Update call to mywait.
17400 (attach_inferior): Update call to mywait.
17401 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17402 (main): Don't fetch/store registers explicitly. Use
17403 set_desired_inferior. Support proposed ``Hs'' packet. Update
17404 calls to mywait.
17405 * server.h: Update.
17406 (struct inferior_list, struct_inferior_list_entry): New.
17407 * target.c (set_desired_inferior): New.
17408 (write_inferior_memory): Constify.
17409 (mywait): New function.
17410 * target.h: Update.
17411 (struct target_ops): New signal_pid method.
17412 (mywait): Removed macro, added prototype.
17413
17414 * linux-low.h (regset_func): Removed.
17415 (regset_fill_func, regset_store_func): New.
17416 (enum regset_type): New.
17417 (struct regset_info): Add type field. Use new operation types.
17418 (struct linux_target_ops): stop_pc renamed to get_pc.
17419 Add decr_pc_after_break and breakpoint_at.
17420 (get_process, get_thread_proess, get_process_thread)
17421 (strut process_info, all_processes, linux_attach_lwp)
17422 (thread_db_init): New.
17423
17424 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17425 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17426 (the_low_target): Add new members.
17427 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17428 (i386_store_fpxregset): Constify.
17429 (target_regsets): Add new kind identifier.
17430 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17431 (i386_set_pc): Add debugging.
17432 (i386_breakpoint_at): New function.
17433 (the_low_target): Add new members.
17434 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17435 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17436 (mips_breakpoint_at): New.
17437 (the_low_target): Add new members.
17438 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17439 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17440 (the_low_target): Add new members.
17441 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17442 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17443 (the_low_target): Add new members.
17444 * linux-x86-64-low.c (target_regsets): Add new kind
17445 identifier.
17446
174472002-05-15 Daniel Jacobowitz <drow@mvista.com>
17448
17449 From Martin Pool <mbp@samba.org>:
17450 * server.c (gdbserver_usage): New function.
17451 (main): Call it.
17452
174532002-05-14 Daniel Jacobowitz <drow@mvista.com>
17454
17455 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17456 stop_at -> stop_pc.
17457
174582002-05-04 Andrew Cagney <ac131313@redhat.com>
17459
17460 * Makefile.in: Remove obsolete code.
17461
174622002-04-24 Michal Ludvig <mludvig@suse.cz>
17463
17464 * linux-low.c (regsets_fetch_inferior_registers),
17465 (regsets_store_inferior_registers): Removed cast to int from
17466 ptrace() calls.
17467 * regcache.h: Added declaration of struct inferior_info.
17468
174692002-04-20 Daniel Jacobowitz <drow@mvista.com>
17470
17471 * inferiors.c (struct inferior_info): Add regcache_data.
17472 (add_inferior): Call create_register_cache.
17473 (clear_inferiors): Call free_register_cache.
17474 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17475 * regcache.c (struct inferior_regcache_data): New.
17476 (registers): Remove.
17477 (get_regcache): New function.
17478 (create_register_cache, free_register_cache): New functions.
17479 (set_register_cache): Don't initialize the register cache here.
17480 (registers_to_string, registers_from_string, register_data): Call
17481 get_regcache.
17482 * regcache.h: Add prototypes.
17483 * server.h: Likewise.
17484
174852002-04-20 Daniel Jacobowitz <drow@mvista.com>
17486
17487 * mem-break.c: New file.
17488 * mem-break.h: New file.
17489 * Makefile.in: Add mem-break.o rule; update server.h
17490 dependencies.
17491 * inferiors.c (struct inferior_info): Add target_data
17492 member.
17493 (clear_inferiors): Free target_data member if set.
17494 (inferior_target_data, set_inferior_target_data): New functions.
17495 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17496 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17497 * linux-low.c (linux_bp_reinsert): New variable.
17498 (struct inferior_linux_data): New.
17499 (linux_create_inferior): Use set_inferior_target_data.
17500 (linux_attach): Likewise. Call add_inferior.
17501 (linux_wait_for_one_inferior): New function.
17502 (linux_wait): Call it.
17503 (linux_write_memory): Add const.
17504 (initialize_low): Call set_breakpoint_data.
17505 * linux-low.h (struct linux_target_ops): Add breakpoint
17506 handling members.
17507 * server.c (attach_inferior): Remove extra add_inferior
17508 call.
17509 * server.h: Include mem-break.h. Update inferior.c
17510 prototypes.
17511 * target.c (read_inferior_memory)
17512 (write_inferior_memory): New functions.
17513 * target.h (read_inferior_memory)
17514 (write_inferior_memory): Change macros to prototypes.
17515 (struct target_ops): Update comments. Add const to write_memory
17516 definition.
17517
175182002-04-11 Daniel Jacobowitz <drow@mvista.com>
17519
17520 * linux-low.c (usr_store_inferior_registers): Support
17521 registers which are allowed to fail to store.
17522 * linux-low.h (linux_target_ops): Likewise.
17523 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17524 (ppc_cannot_store_register): FPSCR may not be storable.
17525
175262002-04-09 Daniel Jacobowitz <drow@mvista.com>
17527
17528 * server.h: Include <string.h> if HAVE_STRING_H.
17529 * ChangeLog: Correct paths in last ChangeLog entry.
17530
175312002-04-09 Daniel Jacobowitz <drow@mvista.com>
17532
17533 * linux-low.h: Remove obsolete prototypes.
17534 (struct linux_target_ops): New.
17535 (extern the_low_target): New.
17536 * linux-low.c (num_regs, regmap): Remove declarations.
17537 (register_addr): Use the_low_target explicitly.
17538 (fetch_register): Likewise.
17539 (usr_fetch_inferior_registers): Likewise.
17540 (usr_store_inferior_registers): Likewise.
17541 * linux-arm-low.c (num_regs): Remove.
17542 (arm_num_regs): Define.
17543 (arm_regmap): Renamed from regmap, made static.
17544 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17545 made static.
17546 (arm_cannot_store_register): Renamed from cannot_store_register,
17547 made static.
17548 (the_low_target): New.
17549 * linux-i386-low.c (num_regs): Remove.
17550 (i386_num_regs): Define.
17551 (i386_regmap): Renamed from regmap, made static.
17552 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17553 made static.
17554 (i386_cannot_store_register): Renamed from cannot_store_register,
17555 made static.
17556 (the_low_target): New.
17557 * linux-ia64-low.c (num_regs): Remove.
17558 (ia64_num_regs): Define.
17559 (ia64_regmap): Renamed from regmap, made static.
17560 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17561 made static.
17562 (ia64_cannot_store_register): Renamed from cannot_store_register,
17563 made static.
17564 (the_low_target): New.
17565 * linux-m68k-low.c (num_regs): Remove.
17566 (m68k_num_regs): Define.
17567 (m68k_regmap): Renamed from regmap, made static.
17568 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17569 made static.
17570 (m68k_cannot_store_register): Renamed from cannot_store_register,
17571 made static.
17572 (the_low_target): New.
17573 * linux-mips-low.c (num_regs): Remove.
17574 (mips_num_regs): Define.
17575 (mips_regmap): Renamed from regmap, made static.
17576 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17577 made static.
17578 (mips_cannot_store_register): Renamed from cannot_store_register,
17579 made static.
17580 (the_low_target): New.
17581 * linux-ppc-low.c (num_regs): Remove.
17582 (ppc_num_regs): Define.
17583 (ppc_regmap): Renamed from regmap, made static.
17584 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17585 made static.
17586 (ppc_cannot_store_register): Renamed from cannot_store_register,
17587 made static.
17588 (the_low_target): New.
17589 * linux-s390-low.c (num_regs): Remove.
17590 (s390_num_regs): Define.
17591 (s390_regmap): Renamed from regmap, made static.
17592 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17593 made static.
17594 (s390_cannot_store_register): Renamed from cannot_store_register,
17595 made static.
17596 (the_low_target): New.
17597 * linux-sh-low.c (num_regs): Remove.
17598 (sh_num_regs): Define.
17599 (sh_regmap): Renamed from regmap, made static.
17600 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17601 made static.
17602 (sh_cannot_store_register): Renamed from cannot_store_register,
17603 made static.
17604 (the_low_target): New.
17605 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17606 (the_low_target): New.
17607
176082002-04-09 Daniel Jacobowitz <drow@mvista.com>
17609
17610 * Makefile.in: Add stamp-h target.
17611 * configure.in: Create stamp-h.
17612 * configure: Regenerated.
17613
176142002-04-09 Daniel Jacobowitz <drow@mvista.com>
17615
17616 * inferiors.c: New file.
17617 * target.c: New file.
17618 * target.h: New file.
17619 * Makefile.in: Add target.o and inferiors.o. Update
17620 dependencies.
17621 * linux-low.c (inferior_pid): New static variable,
17622 moved from server.c.
17623 (linux_create_inferior): Renamed from create_inferior.
17624 Call add_inferior. Return 0 on success instead of a PID.
17625 (linux_attach): Renamed from myattach.
17626 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17627 (linux_thread_alive): Renamed from mythread_alive.
17628 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17629 child dies.
17630 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17631 (regsets_store_inferior_registers): Correct error message.
17632 Add missing ``return 0''.
17633 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17634 (linux_store_registers): Renamed from store_inferior_registers.
17635 (linux_read_memory): Renamed from read_inferior_memory.
17636 (linux_write_memory): Renamed from write_inferior_memory.
17637 (linux_target_ops): New structure.
17638 (initialize_low): Call set_target_ops ().
17639 * remote-utils.c (unhexify): New function.
17640 (hexify): New function.
17641 (input_interrupt): Send signals to ``signal_pid''.
17642 * server.c (inferior_pid): Remove.
17643 (start_inferior): Update create_inferior call.
17644 (attach_inferior): Call add_inferior.
17645 (handle_query): New function.
17646 (main): Call handle_query for `q' packets.
17647 * server.h: Include "target.h". Remove obsolete prototypes.
17648 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17649
176502002-04-09 Daniel Jacobowitz <drow@mvista.com>
17651
17652 * Makefile.in: Add WARN_CFLAGS. Update configury
17653 dependencies.
17654 * configure.in: Check for <string.h>
17655 * configure: Regenerate.
17656 * config.in: Regenerate.
17657 * gdbreplay.c: Include needed system headers.
17658 (remote_open): Remove strchr prototype.
17659 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17660 * regcache.c (supply_register): Change buf argument to const void *.
17661 (supply_register_by_name): Likewise.
17662 (collect_register): Change buf argument to void *.
17663 (collect_register_by_name): Likewise.
17664 * regcache.h: Add missing prototypes.
17665 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17666 * server.c (handle_query): New function.
17667 (attached): New static variable, moved out of main.
17668 (main): Quiet longjmp clobber warnings.
17669 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17670 * utils.c (error): Remove NORETURN.
17671 (fatal): Likewise.
This page took 3.735536 seconds and 4 git commands to generate.