]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Use m4_include, not sinclude in .m4 files
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4d0b984b
TT
12019-10-23 Tom Tromey <tom@tromey.com>
2
3 * configure: Rebuild.
4 * acinclude.m4: Use m4_include, not sinclude.
5
c5adaa19
TT
62019-10-17 Tom Tromey <tromey@adacore.com>
7
8 * configure: Rebuild.
9 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
10 in AC_CONFIG_FILES invocation.
11 * Makefile.in (stamp-h, Makefile): Use new-style config.status
12 invocation.
13
fec4e896
CB
142019-10-16 Christian Biesinger <cbiesinger@google.com>
15
16 * server.c: Include xml-builtin.h.
17 (get_xml_features): Don't declare xml_builtins here.
18
00975ff6
AB
192019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
20
21 * Makefile.in: Remove references to vec-ipa.o.
22
0dc32745
AB
232019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
24
25 * Makefile.in: Remove references to vec.c.
26
3e6ec53a
CB
272019-10-02 Christian Biesinger <cbiesinger@google.com>
28
29 * server.c (server_waiting): Change to bool.
30 (extended_protocol): Likewise.
31 (response_needed): Likewise.
32 (exit_requested): Likewise.
33 (run_once): Likewise.
34 (report_no_resumed): Likewise.
35 (non_stop): Likewise.
36 (disable_packet_vCont): Likewise.
37 (disable_packet_Tthread): Likewise.
38 (disable_packet_qC): Likewise.
39 (disable_packet_qfThreadInfo): Likewise.
40 (handle_general_set): Update.
41 (handle_detach): Update.
42 (handle_monitor_command): Update.
43 (handle_query): Update.
44 (captured_main): Update.
45 (process_serial_event): Update.
46 * server.h (server_waiting): Change to bool.
47 (disable_packet_vCont): Likewise.
48 (disable_packet_Tthread): Likewise.
49 (disable_packet_qC): Likewise.
50 (disable_packet_qfThreadInfo): Likewise.
51 (run_once): Likewise.
52 (non_stop): Likewise.
53 * target.c (target_stop_and_wait): Update.
54
80fd2826
TT
552019-10-02 Tom Tromey <tromey@adacore.com>
56
57 * Makefile.in (SFILES): Add common-inferior.c.
58 (OBS): Add common-inferior.o.
59 * server.c (startup_with_shell): Don't define.
60
46f29a9a
AB
612019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
62
63 * linux-low.c (linux_low_read_btrace): Update for change to
64 std::vector.
65
f9d949fb
CB
662019-09-20 Christian Biesinger <cbiesinger@google.com>
67
68 * debug.c (debug_threads): Remove comment in favor of the header.
69 * debug.h (using_threads): Add declaration.
70 (debug_threads): Add comment.
71 * linux-aarch64-low.c: Include debug.h and remove declaration of
72 debug_threads.
73 * nto-low.c: Likewise.
74 * remote-utils.c: Likewise.
75 * thread-db.c: Likewise.
76
abf516c6
UW
772019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
78
79 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
80 and powerpc-cell64l-ipa.o.
81 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
82 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
83 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
84 (spu*-*-*): Remove.
85
86 * spu-low.c: Remove file.
87
88 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
89 (parse_spufs_run): Remove.
90 (ppc_get_pc): Remove Cell/B.E. support.
91 (ppc_set_pc): Likewise.
92 (ppc_breakpoint_at): Likewise.
93 (ppc_arch_setup): Likewise.
94 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
95 tdesc_powerpc_cell32l.
96 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
97 or init_registers_powerpc_cell32l.
98 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
99 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
100 or init_registers_powerpc_cell32l.
101 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
102 (init_registers_powerpc_cell32l): Remove prototype.
103 (init_registers_powerpc_cell64l): Likewise.
104
105 * target.h (struct target_ops): Remove qxfer_spu member.
106 * server.c (handle_qxfer_spu): Remove.
107 (qxfer_packets): Remove entry for "spu".
108 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
109 * linux-low.c (SPUFS_MAGIC): Remove.
110 (spu_enumerate_spu_ids): Remove.
111 (linux_qxfer_spu): Remove.
112 (linux_target_ops): Remove qxfer_spu member.
113 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
114 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
115 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
116
2d41fa11
SDJ
1172019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
118
119 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
120 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
121 * config.in: Regenerate.
122 * configure: Regenerate.
123
d59b55f0
TT
1242019-08-15 Tom Tromey <tromey@adacore.com>
125
126 * target.c (target_write_memory): Use gdb::byte_vector.
127
4196ab2a
TT
1282019-08-15 Tom Tromey <tromey@adacore.com>
129
130 * tracepoint.c (write_inferior_data_pointer)
131 (write_inferior_integer, write_inferior_int8)
132 (write_inferior_uinteger, m_tracepoint_action_download)
133 (r_tracepoint_action_download, x_tracepoint_action_download)
134 (l_tracepoint_action_download, clear_inferior_trace_buffer)
135 (download_agent_expr, download_tracepoint_1)
136 (download_trace_state_variables, upload_fast_traceframes): Update.
137 * server.c (gdb_write_memory): Update.
138 * remote-utils.c (relocate_instruction): Update.
139 * proc-service.c (ps_pdwrite): Update.
140 * mem-break.c (remove_memory_breakpoint)
141 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
142 (uninsert_fast_tracepoint_jumps_at)
143 (reinsert_fast_tracepoint_jumps_at): Update.
144 * linux-x86-low.c (append_insns)
145 (i386_install_fast_tracepoint_jump_pad)
146 (amd64_write_goto_address, i386_write_goto_address): Update.
147 * linux-s390-low.c (append_insns, s390_write_goto_address):
148 Update.
149 * linux-ppc-low.c (ppc_relocate_instruction)
150 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
151 (ppc_write_goto_address): Update.
152 * linux-aarch64-low.c (append_insns): Update.
153 * target.h (struct target_ops): Update.
154 (write_inferior_memory): Don't declare.
155 * target.c (target_write_memory): Rename from
156 write_inferior_memory. Remove old target_write_memory.
157
c6778d00
TT
1582019-08-15 Tom Tromey <tromey@adacore.com>
159
160 * target.c (write_inferior_memory): Use std::vector.
161
404f2902
FCE
1622019-08-06 Frank Ch. Eigler <fche@redhat.com>
163
164 PR build/24886
165 * configure.ac: Drop enable-libmcheck support.
166 * configure, config.in: Rebuild.
167 * acinclude.m4: Don't include it.
168
4c5aa8e0
AH
1692019-07-19 Alan Hayward <alan.hayward@arm.com>
170
171 * configure.srv: Remove Arm xml files.
172
7cc17433
AH
1732019-07-19 Alan Hayward <alan.hayward@arm.com>
174
175 * configure.srv: Add new files. Remove xml generated files.
176 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
177 registers.
178 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
179 * linux-aarch32-tdesc.c: New file.
180 * linux-aarch32-tdesc.h: New file.
181 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
182 * linux-arm-low.c (init_registers_arm, tdesc_arm)
183 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
184 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
185 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
186 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
187 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
188 (arm_read_description): Call arm_linux_read_description.
189 (initialize_low_arch): Don't init registers.
190 * linux-arm-tdesc.c: New file.
191 * linux-arm-tdesc.h: New file.
192
166a82be
AH
1932019-07-10 Alan Hayward <alan.hayward@arm.com>
194
195 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
196 Move counter inside for.
197 (arm_read_description): Check ptrace earlier.
198 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
199
268a13a5
TT
2002019-07-09 Tom Tromey <tom@tromey.com>
201
202 * configure: Rebuild.
203 * configure.ac: Change common to gdbsupport.
204 * acinclude.m4: Change common to gdbsupport.
205 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
206 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
207 common to gdbsupport.
208 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
209 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
210 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
211 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
212 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
213 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
214 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
215 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
216 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
217 common to gdbsupport.
218
350fab54
AH
2192019-07-04 Alan Hayward <alan.hayward@arm.com>
220
221 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
222 defines.
223 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
224
2b40fda7
AH
2252019-07-04 Alan Hayward <alan.hayward@arm.com>
226
227 * configure.srv: Remove legacy xml.
228 * linux-aarch64-low.c (initialize_low_arch): Remove
229 initialize_low_tdesc call.
230 * linux-aarch64-tdesc-selftest.c: Remove file.
231 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
232 * linux-x86-low.c (initialize_low_arch): Remove
233 initialize_low_tdesc call.
234 * linux-x86-tdesc-selftest.c: Remove file.
235 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
236
7d10623d
TV
2372019-06-20 Tom de Vries <tdevries@suse.de>
238
239 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
240 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
241
8d6a48df
TV
2422019-06-19 Tom de Vries <tdevries@suse.de>
243
244 * debug.h (debug_write): Change return type to ssize_t.
245 * debug.c (debug_write): Same.
246
73cc7272
TT
2472019-06-14 Tom Tromey <tom@tromey.com>
248
249 * configure.ac: Use new path to gnulib.
250 * configure: Rebuild.
251 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
252 to gnulib.
253
08f10e02
TT
2542019-06-11 Tom Tromey <tom@tromey.com>
255
256 * Makefile.in (SFILES): Add alloc.c.
257 (OBS): Add alloc.o.
258 (IPA_OBJS): Add alloc-ipa.o.
259 (alloc-ipa.o): New target.
260 (%.o: ../%.c): New pattern rule.
261
422186a9
TT
2622019-06-10 Tom Tromey <tromey@adacore.com>
263
264 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
265 end warning with a newline.
266 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
267 newline.
268 * thread-db.c (attach_thread): Don't end warning with a newline.
269 (thread_db_notice_clone): Likewise.
270 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
271 newline.
272 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
273 end warning with a newline.
274
b02f78f9
PA
2752019-06-04 Pedro Alves <palves@redhat.com>
276
277 * server.c (captured_main): Use make_unique_xstrdup.
278
88ed7edb
TT
2792019-06-02 Tom Tromey <tom@tromey.com>
280
281 * gdbreplay.c (fromhex): Remove.
282 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
283
33a6bc35
TT
2842019-05-29 Tom Tromey <tromey@adacore.com>
285
286 * configure: Rebuild.
287
e90a813d
KB
2882019-05-06 Kevin Buettner <kevinb@redhat.com>
289
290 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
291 sign extension code on 32-bit builds.
292
353ea2d1
EZ
2932019-05-03 Eli Zaretskii <eliz@gnu.org>
294
295 * remote-utils.c:
296 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
297
b494cdff
TT
2982019-04-19 Tom Tromey <tom@tromey.com>
299
300 * server.c (struct vstop_notif): Derive from notif_event.
301 <base>: Remove.
302 (queue_stop_reply): Update.
303 (remove_all_on_match_ptid): Change type. Rewrite.
304 (discard_queued_stop_replies): Rewrite.
305 (in_queued_stop_replies_ptid): Change type.
306 (in_queued_stop_replies): Rewrite.
307 (notif_stop): Update.
308 (queue_stop_reply_callback): Update.
309 (captured_main): Don't call initialize_notif.
310 (push_stop_notification): Update.
311 * notif.c (notif_write_event, handle_notif_ack)
312 (notif_event_enque, notif_push): Update.
313 (notif_event_xfree, initialize_notif): Remove.
314 * notif.h (struct notif_event): Include <list>, not
315 "common/queue.h".
316 (struct notif_server) <queue>: Now a std::list.
317 (notif_event_p): Remove typedef.
318 (initialize_notif): Don't declare.
319 (struct notif_event): Add virtual destructor.
320
a7e559cc
AH
3212019-04-17 Alan Hayward <alan.hayward@arm.com>
322
323 * ax.c (ax_vdebug): Call debug_printf.
324 * debug.c (debug_write): New function.
325 * debug.h (debug_write): New declaration.
326 * linux-low.c (sigchld_handler): Call debug_write.
327
aeb2e706
AH
3282019-04-17 Alan Hayward <alan.hayward@arm.com>
329
330 * debug.c (debug_set_output): New function.
331 (debug_vprintf): Send output to debug_file.
332 (debug_flush): Likewise.
333 * debug.h (debug_set_output): New declaration.
334 * server.c (handle_monitor_command): Add debug-file option.
335 (captured_main): Likewise.
336
c1bc0935
AH
3372019-04-17 Alan Hayward <alan.hayward@arm.com>
338
339 * debug.c (remote_debug): Add definition.
340 * debug.h (remote_debug): Add declaration.
341 * hostio.c (remote_debug): Remove declaration.
342 * remote-utils.c (struct ui_file): Likewise.
343 (remote_debug): Likewise.
344 * remote-utils.h (remote_debug): Likewise,
345 * server.c (remote_debug): Remove definition.
346
3f52fdbc
KB
3472019-04-10 Kevin Buettner <kevinb@redhat.com>
348
349 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
350 when using a 64-bit gdbserver.
351
b0319eaa
TT
3522019-04-09 Tom Tromey <tromey@adacore.com>
353
354 * linux-low.c (select_event_lwp): Use find_thread_in_random.
355
eedc3f4f
TT
3562019-04-08 Tom Tromey <tom@tromey.com>
357
358 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
359 throw.
360 (linux_resume_one_lwp): Likewise.
361
230d2906
TT
3622019-04-08 Tom Tromey <tom@tromey.com>
363
364 * gdbreplay.c: Update.
365 * linux-low.c: Update.
366 * server.c: Update.
367
a70b8144
TT
3682019-04-08 Tom Tromey <tom@tromey.com>
369
370 * server.c: Use C++ exception handling.
371 * linux-low.c: Use C++ exception handling.
372 * gdbreplay.c: Use C++ exception handling.
373
3d6e9d23
TT
3742019-04-08 Tom Tromey <tom@tromey.com>
375
376 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
377 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
378 (captured_main, main): Update.
379 * gdbreplay.c (main): Update.
380
0570503d
PFC
3812019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
382
383 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
384 value in argument pointer, return 1 if the entry is found and 0
385 otherwise. Move comment.
386 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
387 * linux-low.h (linux_get_auxv): Declare.
388 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
389
227a9e65
TT
3902019-04-05 Tom Tromey <tromey@adacore.com>
391
392 * server.c (gdbserver_usage): Use upper-case for metasyntactic
393 variables.
394
69f4c9cc
AH
3952019-03-28 Alan Hayward <alan.hayward@arm.com>
396
397 * linux-low.c (AT_HWCAP2): Add define if not already included.
398
974c89e0
AH
3992019-03-26 Alan Hayward <alan.hayward@arm.com>
400
401 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
402 (aarch64_arch_setup): Call linux_get_hwcap.
403 * linux-arm-low.c (arm_get_hwcap): Remove function.
404 (arm_read_description): Call linux_get_hwcap.
405 * linux-low.c (linux_get_auxv): New function.
406 (linux_get_hwcap): Likewise.
407 (linux_get_hwcap2): Likewise.
408 * linux-low.h (linux_get_hwcap): New declaration.
409 (linux_get_hwcap2): Likewise.
410 * linux-ppc-low.c (ppc_get_auxv): Remove function.
411 (ppc_arch_setup): Call linux_get_hwcap.
412 * linux-s390-low.c (s390_get_hwcap): Remove function.
413 (s390_arch_setup): Call linux_get_hwcap.
414
1ef53e6b
AH
4152019-03-22 Alan Hayward <alan.hayward@arm.com>
416 Jiong Wang <jiong.wang@arm.com>
417
418 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
419 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
420 to fail.
421 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
422
ee4fbcfa
AH
4232019-03-22 Alan Hayward <alan.hayward@arm.com>
424 Jiong Wang <jiong.wang@arm.com>
425
426 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
427 (aarch64_get_hwcap): New function.
428 (aarch64_arch_setup): Read APIA hwcap.
429
6dc0ebde
AH
4302019-03-22 Alan Hayward <alan.hayward@arm.com>
431 Jiong Wang <jiong.wang@arm.com>
432
433 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
434 (initialize_low_tracepoint): Likewise.
435 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
436 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
437 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
438 (aarch64_linux_read_description): Likewise.
439 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
440
1163a4b7
JB
4412019-03-12 John Baldwin <jhb@FreeBSD.org>
442
443 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
444 i386_create_target_description for 'segments' parameter.
445 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
446 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
447 * win32-i386-low.c (i386_arch_setup): Likewise.
448
d3a70e03
TT
4492019-03-12 Tom Tromey <tromey@adacore.com>
450
451 * linux-low.c (iterate_over_lwps): Update.
452
37991b4f
TT
4532019-03-06 Tom Tromey <tom@tromey.com>
454
455 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
456 (captured_main): Use SCOPE_EXIT.
457
45950eb6
SDJ
4582019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
459
460 * configure.srv: Use '$enable_unittest' instead of '$development'
461 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
462 case.
463
43ac54fc
TT
4642019-02-27 Tom Tromey <tromey@adacore.com>
465
466 * gdbreplay.c (logchar): Handle \r\n.
467
df0da8a2
AH
4682019-02-07 Alan Hayward <alan.hayward@arm.com>
469
470 * linux-low.c (linux_attach): Add process before lwp.
471 * server.c (attach_inferior): Check if already attached.
472
1a5c2598
TT
4732019-02-07 Tom Tromey <tom@tromey.com>
474
475 * x86-tdesc.h: Rename include guard.
476 * x86-low.h: Add include guard.
477 * wincecompat.h: Rename include guard.
478 * win32-low.h: Add include guard.
479 * utils.h: Rename include guard.
480 * tracepoint.h: Rename include guard.
481 * tdesc.h: Rename include guard.
482 * target.h: Rename include guard.
483 * server.h: Rename include guard.
484 * remote-utils.h: Rename include guard.
485 * regcache.h: Rename include guard.
486 * nto-low.h: Rename include guard.
487 * notif.h: Add include guard.
488 * mem-break.h: Rename include guard.
489 * lynx-low.h: Add include guard.
490 * linux-x86-tdesc.h: Add include guard.
491 * linux-s390-tdesc.h: Add include guard.
492 * linux-ppc-tdesc-init.h: Add include guard.
493 * linux-low.h: Add include guard.
494 * linux-aarch64-tdesc.h: Add include guard.
495 * linux-aarch32-low.h: Add include guard.
496 * inferiors.h: Rename include guard.
497 * i387-fp.h: Rename include guard.
498 * hostio.h: Rename include guard.
499 * gdbthread.h: Rename include guard.
500 * gdb_proc_service.h: Rename include guard.
501 * event-loop.h: Rename include guard.
502 * dll.h: Rename include guard.
503 * debug.h: Rename include guard.
504 * ax.h: Rename include guard.
505
956cc47c
SN
5062018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
507
508 PR gdb/23985
509 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
510 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
511
a0707f3c
TT
5122019-01-25 Tom Tromey <tom@tromey.com>
513
514 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
515
0747795c
TT
5162019-01-25 Tom Tromey <tom@tromey.com>
517
518 * win32-low.c: Fix common/ includes.
519 * win32-i386-low.c: Fix common/ includes.
520 * tracepoint.c: Fix common/ includes.
521 * thread-db.c: Fix common/ includes.
522 * target.h: Fix common/ includes.
523 * symbol.c: Fix common/ includes.
524 * spu-low.c: Fix common/ includes.
525 * server.h: Fix common/ includes.
526 * server.c: Fix common/ includes.
527 * remote-utils.c: Fix common/ includes.
528 * regcache.h: Fix common/ includes.
529 * regcache.c: Fix common/ includes.
530 * nto-x86-low.c: Fix common/ includes.
531 * notif.h: Fix common/ includes.
532 * mem-break.h: Fix common/ includes.
533 * lynx-low.c: Fix common/ includes.
534 * lynx-i386-low.c: Fix common/ includes.
535 * linux-x86-tdesc-selftest.c: Fix common/ includes.
536 * linux-x86-low.c: Fix common/ includes.
537 * linux-low.c: Fix common/ includes.
538 * inferiors.h: Fix common/ includes.
539 * i387-fp.c: Fix common/ includes.
540 * hostio.c: Fix common/ includes.
541 * hostio-errno.c: Fix common/ includes.
542 * gdbthread.h: Fix common/ includes.
543 * gdbreplay.c: Fix common/ includes.
544 * fork-child.c: Fix common/ includes.
545 * event-loop.c: Fix common/ includes.
546 * ax.c:
547 (enum gdb_agent_op): Fix common/ includes.
548
be6d4f74
TT
5492019-01-21 Tom Tromey <tom@tromey.com>
550
551 * tracepoint.c: Fix includes.
552 * remote-utils.c: Fix includes.
553 * linux-x86-low.c: Fix includes.
554
66d91b39
JB
5552019-01-01 Joel Brobecker <brobecker@adacore.com>
556
557 * gdbreplay.c (gdbreplay_version): Update copyright year in
558 version message.
559 * server.c (gdbserver_version): Likewise.
560
754e3168
AH
5612018-12-05 Alan Hayward <alan.hayward@arm.com>
562
563 * linux-low.c (add_lwp): Switch ordering.
564
d105de22
TT
5652018-11-29 Tom Tromey <tom@tromey.com>
566
567 * win32-low.c (win32_join): Take pid, not process.
568 * target.h (struct target_ops) <join>: Change argument type.
569 (join_inferior): Change argument name.
570 * spu-low.c (spu_join): Take pid, not process.
571 * server.c (handle_detach): Preserve pid before destroying
572 process.
573 * lynx-low.c (lynx_join): Take pid, not process.
574 * linux-low.c (linux_join): Take pid, not process.
575
50138245
AH
5762018-11-23 Alan Hayward <alan.hayward@arm.com>
577
578 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
579 (aarch64_cannot_fetch_register): Likewise.
580 (struct linux_target_ops): Update references.
581
64f57f3d
PFC
5822018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
583
584 * linux-ppc-low.c: Include nat/linux-ptrace.h.
585
8d619c01
EBM
5862018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
587
588 * configure.srv (ipa_ppc_linux_regobj): Add
589 powerpc-isa207-htm-vsx32l-ipa.o and
590 powerpc-isa207-htm-vsx64l-ipa.o.
591 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
592 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
593 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
594 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
595 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
596 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
597 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
598 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
599 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
600 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
601 (init_registers_powerpc_isa207_htm_vsx32l)
602 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
603 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
604 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
605 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
606 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
607 (ppc_store_tm_ctarregset): New functions.
608 (ppc_regsets): Add entries for HTM regsets.
609 (ppc_arch_setup): Set htm in features struct when needed. Set
610 sizes for the HTM regsets.
611 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
612 (initialize_low_arch): Call
613 init_registers_powerpc_isa207_htm_vsx32l and
614 init_registers_powerpc_isa207_htm_vsx64l.
615 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
616 PPC_TDESC_ISA207_HTM_VSX.
617 (initialize_low_tracepoint): Call
618 init_registers_powerpc_isa207_htm_vsx32l and
619 init_registers_powerpc_isa207_htm_vsx64l.
620
232bfb86
EBM
6212018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
622
623 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
624 rs6000/power-linux-pmu.xml to srv_xmlfiles.
625 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
626 (ppc_store_pmuregset): New functions.
627 (ppc_regsets): Add entries for ebb and pmu regsets.
628 (ppc_arch_setup): Set isa207 in features struct if the ebb and
629 pmu regsets are available. Set sizes for these regsets.
630
f2cf6173
EBM
6312018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
632
633 * configure.srv (ipa_ppc_linux_regobj): Add
634 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
635 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
636 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
637 rs6000/powerpc-isa207-vsx32l.xml, and
638 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
639 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
640 <PPC_TDESC_ISA207_VSX>: New enum value.
641 (init_registers_powerpc_isa207_vsx32l): Declare.
642 (init_registers_powerpc_isa207_vsx64l): Declare.
643 * linux-ppc-low.c (ppc_fill_tarregset): New function.
644 (ppc_store_tarregset): New function.
645 (ppc_regsets): Add entry for the TAR regset.
646 (ppc_arch_setup): Set isa207 in features struct when needed. Set
647 size for the TAR regsets.
648 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
649 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
650 and init_registers_powerpc_isa207_vsx64l.
651 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
652 (initialize_low_tracepoint): Call
653 init_registers_powerpc_isa207_vsx32l and
654 init_registers_powerpc_isa207_vsx64l.
655
7ca18ed6
EBM
6562018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
657 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
658
659 * configure.srv (ipa_ppc_linux_regobj): Add
660 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
661 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
662 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
663 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
664 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
665 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
666 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
667 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
668 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
669 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
670 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
671 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
672 (ppc_hwcap): Add comment.
673 (ppc_hwcap2): New global.
674 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
675 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
676 (ppc_regsets): Add entries for the DSCR and PPR regsets.
677 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
678 when needed. Set sizes for the the DSCR and PPR regsets.
679 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
680 (initialize_low_arch): Call
681 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
682 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
683 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
684 PPC_TDESC_ISA205_PPR_DSCR_VSX.
685 (initialize_low_tracepoint): Call
686 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
687 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
688
5c849b22
PFC
6892018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
690
691 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
692
8ecfd7bd
SDJ
6932018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
694 Simon Marchi <simark@simark.ca>
695
696 * acinclude.m4: Include "../selftest.m4".
697 * configure: Regenerate.
698 * configure.ac: Use "GDB_AC_SELFTEST".
699 * configure.srv: Use "$enable_unittests" instead of
700 "$development" when checking whether unit tests have been
701 enabled.
702 * server.c (captured_main): Update message informing that
703 selftests have been disabled.
704
96643e35
TT
7052018-10-04 Tom Tromey <tom@tromey.com>
706
707 * configure: Rebuild.
708
da4ae14a
TT
7092018-10-04 Tom Tromey <tom@tromey.com>
710
711 * server.c (handle_status): Rename inner "thread".
712 (process_serial_event): Declare "res" in 'm' case.
713 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
714 (iterate_over_lwps): Rename inner "thread".
715 (linux_qxfer_libraries_svr4): Rename inner "len".
716 * gdbthread.h (find_thread_in_random): Rename inner "thread".
717
7c619dbd
GB
7182018-10-01 Gary Benson <gbenson@redhat.com>
719
720 * gdb_proc_service.h: Moved common code to
721 common/gdb_proc_service.h.
722
3795e814
GB
7232018-10-01 Gary Benson <gbenson@redhat.com>
724
725 * gdb_proc_service.h: Synchronize comments and whitespace with
726 GDB's version of this file.
727
49b036f1
TT
7282018-09-25 Tom Tromey <tom@tromey.com>
729
730 * configure: Rebuild.
731 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
732
8ff03f0b
SM
7332018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
734
735 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
736 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
737 ($(IPA_LIB)): Sort IPA_OBJS.
738
a1cd91dc
SM
7392018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
740
741 * Makefile.in: Remove references to $(ADD_DEPS).
742
752312ba
TT
7432018-09-16 Tom Tromey <tom@tromey.com>
744
745 * remote-utils.c (remote_open): Use GNU style for metasyntactic
746 variables.
747 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
748 variables.
749
f1628857
TT
7502018-09-05 Tom Tromey <tom@tromey.com>
751
752 * configure: Rebuild.
753
ad202fcc
SM
7542018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
755
756 PR build/23399
757 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
758
d3d8724a
TT
7592018-08-27 Tom Tromey <tom@tromey.com>
760
761 PR build/23087:
762 * configure: Rebuild.
763
b4f183d2
TT
7642018-08-27 Tom Tromey <tom@tromey.com>
765
766 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
767 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
768 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
769 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
770 (s390x_emit_stack_adjust): Add casts to unsigned char.
771
4e2aa472
SM
7722018-08-22 Simon Marchi <simon.marchi@ericsson.com>
773
774 PR gdb/23374
775 PR gdb/23375
776 * server.h (struct client_state) <disable_randomization>:
777 Initialize to 1.
778
cf4088a9
SM
7792018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
780
781 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
782 variable.
783 (mips_supply_ptrace_register): Likewise.
784
a0de763e
TT
7852018-07-22 Tom Tromey <tom@tromey.com>
786
787 * configure: Rebuild.
788
b0a7723d
TT
7892018-07-22 Tom Tromey <tom@tromey.com>
790
791 * win32-low.c (win32_create_inferior): Remove unused variables.
792 * gdbreplay.c (remote_open): Remove unused variable.
793 * remote-utils.c (remote_prepare): Remove unused variable.
794 * x86-tdesc.h (X86_TDESC_H): Define.
795 (amd64_expedite_regs): Define conditionally.
796 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
797 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
798 * remote-utils.c (readchar): Remove unused variable.
799
a780ef4f
PA
8002018-07-13 Pedro Alves <palves@redhat.com>
801
802 * linux-low.c (linux_kill): Change parameter to process_info
803 pointer instead of pid. Adjust.
804 * lynx-low.c (lynx_kill): Likewise.
805 * nto-low.c (nto_kill): Likewise.
806 * spu-low.c (spu_kill): Likewise.
807 * win32-low.c (win32_kill): Likewise.
808 * server.c (handle_v_kill, kill_inferior_callback)
809 (detach_or_kill_for_exit): Adjust.
810 * target.c (kill_inferior): Change parameter to process_info
811 pointer instead of pid. Adjust.
812 * target.h (struct target_ops) <kill>: Change parameter to
813 process_info pointer instead of pid. Adjust all implementations
814 and callers.
815 (kill_inferior): Likewise.
816
ef2ddb33
PA
8172018-07-13 Pedro Alves <palves@redhat.com>
818
819 * linux-low.c (linux_detach, linux_join): Change parameter to
820 process_info pointer instead of pid. Adjust.
821 * lynx-low.c (lynx_detach, lynx_join): Likewise.
822 * nto-low.c (nto_detach): Likewise.
823 * spu-low.c (spu_detach, spu_join): Likewise.
824 * win32-low.c (win32_detach, win32_join): Likewise.
825 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
826 * target.h (struct target_ops) <detach, join>: Change parameter to
827 process_info pointer instead of pid. Adjust all implementations
828 and callers.
829 (detach_inferior, join_inferior): Rename 'pid' parameter to
830 'proc'.
831
c7ab0aef
SDJ
8322018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
833 Jan Kratochvil <jan.kratochvil@redhat.com>
834 Paul Fertser <fercerpav@gmail.com>
835 Tsutomu Seki <sekiriki@gmail.com>
836
837 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
838 (OBS): Add 'common/netstuff.o'.
839 (GDBREPLAY_OBS): Likewise.
840 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
841 (remote_open): Implement support for IPv6
842 connections.
843 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
844 and 'wspiapi.h'.
845 (handle_accept_event): Accept connections from IPv6 sources.
846 (remote_prepare): Handle IPv6-style hostnames; implement
847 support for IPv6 connections.
848 (remote_open): Implement support for printing connections from
849 IPv6 sources.
850
31445d10
PA
8512018-07-11 Pedro Alves <palves@redhat.com>
852
853 PR gdb/23377
854 * mem-break.c (any_persistent_commands): Add process_info
855 parameter and use it instead of relying on the current process.
856 Change return type to bool.
857 * mem-break.h (any_persistent_commands): Add process_info
858 parameter and change return type to bool.
859 * server.c (handle_detach): Remove require_running_or_return call.
860 Look up the process_info for the process we're about to detach.
861 If not found, return back error to GDB. Adjust
862 any_persistent_commands call to pass down a process pointer.
863
cb197132
PA
8642018-07-11 Pedro Alves <palves@redhat.com>
865
866 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
867 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
868 instead of collect_register_by_name.
869 * regcache.c (regcache_raw_get_unsigned_by_name): New.
870 * regcache.h (regcache_raw_get_unsigned_by_name): New.
871
1b919490
VB
8722018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
873 Pedro Alves <palves@redhat.com>
874
875 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
876
d7e15655
TT
8772018-07-03 Tom Tromey <tom@tromey.com>
878
879 * linux-low.c: Update.
880 * lynx-low.c: Update.
881 * mem-break.c: Update.
882 * nto-low.c: Update.
883 * remote-utils.c: Update.
884 * server.c: Update.
885 * spu-low.c: Update.
886 * target.c: Update.
887 * win32-low.c: Update.
888
26a57c92
TT
8892018-07-03 Tom Tromey <tom@tromey.com>
890
891 * server.c: Update.
892
0e998d96
TT
8932018-07-03 Tom Tromey <tom@tromey.com>
894
895 * linux-low.c: Update.
896
cc6bcb54
TT
8972018-07-03 Tom Tromey <tom@tromey.com>
898
899 * target.c: Update.
900
e38504b3
TT
9012018-07-03 Tom Tromey <tom@tromey.com>
902
903 * linux-low.c: Update.
904 * linux-mips-low.c: Update.
905 * lynx-low.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 * thread-db.c: Update.
912
e99b03dc
TT
9132018-07-03 Tom Tromey <tom@tromey.com>
914
915 * linux-low.c: Update.
916 * linux-mips-low.c: Update.
917 * lynx-low.c: Update.
918 * mem-break.c: Update.
919 * nto-low.c: Update.
920 * remote-utils.c: Update.
921 * server.c: Update.
922 * spu-low.c: Update.
923 * target.c: Update.
924 * tracepoint.c: Update.
925
f2907e49
TT
9262018-07-03 Tom Tromey <tom@tromey.com>
927
928 * linux-low.c: Update.
929 * linux-ppc-low.c: Update.
930 * linux-x86-low.c: Update.
931 * proc-service.c: Update.
932 * server.c: Update.
933 * spu-low.c: Update.
934 * thread-db.c: Update.
935 * win32-low.c: Update.
936
fd79271b
TT
9372018-07-03 Tom Tromey <tom@tromey.com>
938
939 * linux-low.c: Update.
940 * lynx-low.c: Update.
941 * nto-low.c: Update.
942 * remote-utils.c: Update.
943 * spu-low.c: Update.
944 * thread-db.c: Update.
945 * win32-low.c: Update.
946
c0867626
SDJ
9472018-06-29 Joel Brobecker <brobecker@adacore.com>
948
949 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
950 parameter in call to 'amd64_create_target_description'.
951
2512d7ef
JK
9522018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
953
954 * x86-tdesc.h: Remove executable permission flag.
955
d0ac1c44
SM
9562018-06-19 Simon Marchi <simon.marchi@ericsson.com>
957
958 * configure.ac: Remove AC_PREREQ, add missing quoting.
959 * configure: Re-generate.
960 * config.in: Re-generate.
961 * aclocal.m4: Re-generate.
962
c4eb05ff
SM
9632018-06-18 Simon Marchi <simon.marchi@ericsson.com>
964
965 * tracepoint.h (current_traceframe): Remove declaration.
966
02895270
AH
9672018-06-18 Alan Hayward <alan.hayward@arm.com>
968
969 * linux-aarch64-low.c (is_sve_tdesc): New function.
970 (aarch64_sve_regs_copy_to_regcache): Likewise.
971 (aarch64_sve_regs_copy_from_regcache): Likewise.
972 (aarch64_regs_info): Add SVE checks.
973 (initialize_low_arch): Initialize SVE.
974
e9902bfc
AH
9752018-06-18 Alan Hayward <alan.hayward@arm.com>
976
977 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
978
fefa175e
AH
9792018-06-11 Alan Hayward <alan.hayward@arm.com>
980
981 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
982 (initialize_low_tracepoint): Likewise
983 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
984 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
985 param.
986 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
987 checks.
988 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
989
b91ad3ff
AH
9902018-06-11 Alan Hayward <alan.hayward@arm.com>
991
992 * server.h (PBUFSIZ): Increase size
993
f868386e
AH
9942018-06-11 Alan Hayward <alan.hayward@arm.com>
995
996 * regcache.c (regcache::raw_compare): New function.
997 * regcache.h (regcache::raw_compare): New declaration.
998
9c861883
AH
9992018-06-11 Alan Hayward <alan.hayward@arm.com>
1000
1001 * regcache.c (new_register_cache): Use new.
1002 (free_register_cache): Use delete.
1003 (register_data): Use const.
1004 (supply_register): Move body inside regcache.
1005 (regcache::raw_supply): New override function.
1006 (collect_register): Move body inside regcache.
1007 (regcache::raw_collect): New override function.
1008 (regcache::get_register_status): New override function.
1009 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1010
40591844
TT
10112018-06-09 Tom Tromey <tom@tromey.com>
1012
1013 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1014 declare queue.
1015 (event_queue): Use std::queue.
1016 (gdb_event_xfree): Remove.
1017 (initialize_event_loop, process_event, wait_for_event): Update.
1018
6341380d
SC
10192018-06-08 Stan Cox <scox@redhat.com>
1020
1021 * win32-low.c (win32_create_inferior): last_ptid and last_status
1022 moved to client_state.
1023
03349c93
PA
10242018-06-08 Pedro Alves <palves@redhat.com>
1025
1026 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1027 common/common-exceptions.o, common/common-utils.o,
1028 common/errors.o, common/print-utils.o and utils.o.
1029 * gdbreplay.c: Include "common-defs.h" instead of the two
1030 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1031 string.h or alloca.h.
1032 (perror_with_name): Delete.
1033 (remote_open): Use xstrdup instead of strdup.
1034 (main): Rename to ...
1035 (captured_main): ... this.
1036 (main): New.
1037
8dcc53b3
TT
10382018-06-08 Tom Tromey <tom@tromey.com>
1039
1040 * linux-low.c (linux_low_read_btrace): Update.
1041
c12a5089
SC
10422018-06-04 Stan Cox <scox@redhat.com>
1043
1044 * server.h (struct client_state): New.
1045 * server.c (cont_thread, general_thread, multi_process)
1046 (report_fork_events, report_vfork_events, report_exec_events)
1047 (report_thread_events, swbreak_feature, hwbreak_feature)
1048 (vCont_supported, disable_randomization, pass_signals)
1049 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1050 Moved to client_state.
1051 * remote-utils.c (remote_debug, noack_mode)
1052 (transport_is_reliable): Moved to client_state.
1053 * tracepoint.c (current_traceframe): Moved to client_state.
1054
1055 Update all callers.
1056 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1057 linux-low.c, remote-utils.h, target.c: Use client_state.
1058
122394f1
AH
10592018-05-31 Alan Hayward <alan.hayward@arm.com>
1060
1061 * configure.srv: Add new c/h file.
1062
95228a0d
AH
10632018-05-31 Alan Hayward <alan.hayward@arm.com>
1064
1065 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1066 null VQ.
1067
d8dab6c3
MR
10682018-05-25 Maciej W. Rozycki <macro@mips.com>
1069
1070 * gdb.arch/mips-fpregset-core.exp: New test.
1071 * gdb.arch/mips-fpregset-core.c: New test source.
1072
81e25b7c
EK
10732018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1074
1075 PR server/23198
1076 * hostio.c (require_int): Do not report overflow for integers
1077 between 0xfffffff and 0x7fffffff.
1078
7e947ad3
MR
10792018-05-22 Maciej W. Rozycki <macro@mips.com>
1080
1081 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1082 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1083 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1084 functions.
1085 (the_low_target): Wire them.
1086
1d75a658
PFC
10872018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1088
1089 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1090 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1091 mode. Call collect_register_by_name with vscr using
1092 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1093 (ppc_store_vrregset): Add and set vscr_offset variable as in
1094 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1095 vscr_offset.
1096
d078308a
PFC
10972018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1098
1099 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1100 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1101 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1102
7273b5fc
PFC
11032018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1104
1105 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1106 (ppc_store_vsxregset): Likewise.
1107 (ppc_fill_vrregset): Likewise.
1108 (ppc_store_vrregset): Likewise.
1109 (ppc_fill_evrregset): Likewise.
1110 (ppc_store_evrregset): Likewise.
1111 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1112 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1113 needed.
1114
2e077f5e
PFC
11152018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1116
1117 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1118 wordsize of the inferior. Call ppc_linux_target_wordsize.
1119
bd64614e
PFC
11202018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1121
1122 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1123 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1124 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1125 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1126 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1127 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1128 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1129 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1130 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1131 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1132 (tdesc_powerpc_e500l): Remove.
1133 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1134 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1135 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1136 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1137 linux-ppc-tdesc.h.
1138 (ppc_arch_setup): Remove target description matching code. Fill a
1139 ppc_linux_features struct and call ppc_linux_match_description
1140 with it.
1141
75d74cca
MR
11422018-05-22 Maciej W. Rozycki <macro@mips.com>
1143
1144 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1145 width of the requested register exceeds the width of the
1146 `ptrace' data type.
1147 (mips_cannot_store_register): Likewise.
1148
e4439e43
MR
11492018-05-21 Maciej W. Rozycki <macro@mips.com>
1150
1151 * linux-mips-low.c (mips_fetch_register): New function. Update
1152 preceding comment.
1153 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1154 (the_low_target): Wire `mips_fetch_register'.
1155
55271bf9
JB
11562018-05-10 Joel Brobecker <brobecker@adacore.com>
1157
1158 * lynx-i386-low.c (LYNXOS_178): New macro.
1159 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1160 the layout on LynxOS-178.
1161 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1162 handle floating point registers that are not supported by
1163 LynxOS-178.
1164
1a34f210
TT
11652018-05-10 Tom Tromey <tom@tromey.com>
1166
1167 * configure: Rebuild.
1168
190852c8
JB
11692018-05-10 Joel Brobecker <brobecker@adacore.com>
1170
1171 PR server/23158:
1172 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1173 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1174 Use it to set the expedite_regs field in the given tdesc.
1175 * x86-tdesc.h: New file.
1176 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1177 Adjust following the addition of the new expedite_regs parameter
1178 to init_target_desc.
1179 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1180 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1181 (i386_linux_read_description, amd64_linux_read_description):
1182 Adjust following the addition of the new expedite_regs parameter
1183 to init_target_desc.
1184 * lynx-i386-low.c: #include "x86-tdesc.h".
1185 (lynx_i386_arch_setup): Adjust following the addition of the new
1186 expedite_regs parameter to init_target_desc.
1187 * nto-x86-low.c: #include "x86-tdesc.h".
1188 (nto_x86_arch_setup): Adjust following the addition of the new
1189 expedite_regs parameter to init_target_desc.
1190 * win32-i386-low.c: #include "x86-tdesc.h".
1191 (i386_arch_setup): Adjust following the addition of the new
1192 expedite_regs parameter to init_target_desc.
1193
7dbac825
JB
11942018-05-10 Joel Brobecker <brobecker@adacore.com>
1195
1196 PR server/23158:
1197 * win32-low.c (win32_create_inferior): Add call to my_wait
1198 setting last_status global.
1199
906994d9
JB
12002018-05-10 Joel Brobecker <brobecker@adacore.com>
1201
1202 PR server/23158:
1203 * win32-low.c (create_process): Only call gdb_tilde_expand if
1204 inferior_cwd is not NULL.
1205
8ee22052
AB
12062018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1207
1208 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1209 registers to the cache if their values have changed.
1210 (i387_xsave_to_cache): Provide default values for x87 control
1211 registers when these features are available, but disabled.
1212 * regcache.c (supply_register_by_name_zeroed): New function.
1213 * regcache.h (supply_register_by_name_zeroed): Declare new
1214 function.
1215
aff689d3
TT
12162018-05-07 Tom Tromey <tom@tromey.com>
1217
1218 * configure: Rebuild.
1219
85e26832
TT
12202018-05-04 Tom Tromey <tom@tromey.com>
1221
1222 * configure: Rebuild.
1223
a3b60e45
JK
12242018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1225 Pedro Alves <palves@redhat.com>
1226
1227 * linux-aarch64-low.c (aarch64_stopped_data_address):
1228 Likewise.
1229
632e107b
TT
12302018-04-27 Tom Tromey <tom@tromey.com>
1231
1232 * configure: Rebuild.
1233
458412c3
TT
12342018-04-23 Tom Tromey <tom@tromey.com>
1235
1236 * configure: Rebuild.
1237
f31c089e
SM
12382018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1239
1240 * Makefile.in (depcomp): Add "..".
1241 (all_deps_files): New and use it.
1242
b319b098
AH
12432018-04-18 Alan Hayward <alan.hayward@arm.com>
1244
1245 * configure.srv (aarch64*-*-linux*): Don't include xml.
1246 (i[34567]86-*-cygwin*): Likewise.
1247 (i[34567]86-*-linux*): Likewise.
1248 (i[34567]86-*-lynxos*): Likewise.
1249 (i[34567]86-*-mingw32ce*): Likewise.
1250 (i[34567]86-*-mingw*): Likewise.
1251 (i[34567]86-*-nto*): Likewise.
1252 (tic6x-*-uclinux): Likewise.
1253 (x86_64-*-linux*): Likewise.
1254 (x86_64-*-mingw*): Likewise.
1255 (x86_64-*-cygwin*): Likewise.
1256
3b74854b
AH
12572018-04-18 Alan Hayward <alan.hayward@arm.com>
1258
1259 * tdesc.c: Remove xml parameter.
1260
e98577a9
AH
12612018-04-18 Alan Hayward <alan.hayward@arm.com>
1262
1263 * server.c (get_features_xml): Remove cast.
1264 * tdesc.c (void target_desc::accept): Fill in function.
1265 (tdesc_get_features_xml): Remove old xml creation.
1266 (print_xml_feature::visit_pre): Add xml vistor.
1267 * tdesc.h (struct target_desc): Make xmltarget mutable.
1268 (tdesc_get_features_xml): Remove declaration.
1269
d278f585
AH
12702018-04-18 Alan Hayward <alan.hayward@arm.com>
1271
1272 * tdesc.c (tdesc_architecture_name): Add new function.
1273 (tdesc_osabi_name): Likewise.
1274 (tdesc_get_features_xml): Use new functions.
1275
eee8a18d
AH
12762018-04-18 Alan Hayward <alan.hayward@arm.com>
1277
1278 * tdesc.c (tdesc_create_flags): Remove.
1279 (tdesc_add_flag): Likewise.
1280 (tdesc_named_type): Likewise.
1281 (tdesc_create_union): Likewise.
1282 (tdesc_create_struct): Likewise.
1283 (tdesc_create_vector): Likewise.
1284 (tdesc_add_bitfield): Likewise.
1285 (tdesc_add_field): Likewise.
1286 (tdesc_set_struct_size): Likewise.
1287
82ec9bc7
AH
12882018-04-18 Alan Hayward <alan.hayward@arm.com>
1289
1290 * tdesc.c (~target_desc): Remove implictly deleted items.
1291 (init_target_desc): Iterate all features.
1292 (tdesc_get_features_xml): Use vector.
1293 (tdesc_create_feature): Create feature.
1294 * tdesc.h (tdesc_feature) Remove
1295 (target_desc): Add features.
1296
ea3e7d71
AH
12972018-04-18 Alan Hayward <alan.hayward@arm.com>
1298
1299 * Makefile.in: Add common/tdesc.c
1300 * tdesc.c (init_target_desc): init all reg_defs from register
1301 vector.
1302 (tdesc_create_reg): Create tdesc_reg.
1303 * tdesc.h (tdesc_feature): Add register vector.
1304
17d08cd4
SM
13052018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1306
1307 * tdesc.h (struct target_desc) <features>: Change type to
1308 std::vector<std::string>.
1309 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1310 changes.
1311 (tdesc_get_features_xml): Likewise.
1312 (tdesc_create_feature): Likewise.
1313
5cd3e386
AH
13142018-03-26 Alan Hayward <alan.hayward@arm.com>
1315
1316 * regcache.c (find_register_by_number): Return a ref.
1317 (find_regno): Use references.
1318 (register_size): Likewise.
1319 (register_data): Likewise.
1320 * tdesc.c (target_desc::~target_desc): Remove free calls.
1321 (target_desc::operator==): Use std::vector compare.
1322 (init_target_desc): Use reference.
1323 (tdesc_create_reg): Use reg constructors.
1324 * tdesc.h (struct target_desc): Replace pointer with object.
1325
dff7492c
AH
13262018-03-23 Alan Hayward <alan.hayward@arm.com>
1327
1328 * regcache.c (find_register_by_number): Make static.
1329 (find_regno): Use find_register_by_number
1330 * regcache.h (struct reg): Remove declaration.
1331
d80e5242
AH
13322018-03-23 Alan Hayward <alan.hayward@arm.com>
1333
1334 * tdesc.c (target_desc::~target_desc): Move to here.
1335 (target_desc::operator==): Likewise.
1336 * tdesc.h (target_desc::~target_desc): Move from here.
1337 (target_desc::operator==): Likewise.
1338
f69c5afb
AA
13392018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1340
1341 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1342
ce29f843
AA
13432018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1344
1345 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1346 S390_TDESC_GS.
1347 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1348 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1349 and init_registers_s390_gs_linux64.
1350
c49bd90b
AA
13512018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1352
1353 * linux-s390-low.c (s390_fill_gs): Remove function.
1354 (s390_fill_gsbc): Remove function.
1355 (s390_regsets): Set fill functions for the guarded storage regsets
1356 to NULL.
1357
7edb9bd3
AA
13582018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1359
1360 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1361 the word size. Add comment.
1362 (s390_get_wordsize): New function.
1363 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1364 pswm with it. Instead, use s390_get_wordsize to determine the
1365 word size first and derive the correct tdesc from that directly.
1366
39be3c7e
SM
13672018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1368
1369 * Makefile.in: Include silent-rules.mk.
1370 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1371 (COMPILE): Add ECHO_CXX.
1372 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1373 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1374 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1375 (version-generated.c): Add ECHO_GEN.
1376 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1377 (IPAGENT_COMPILE): Add ECHO_CXX.
1378 (%-generated.c): Add ECHO_REGDAT.
1379
3ae9ce5d
TT
13802018-03-14 Tom Tromey <tom@tromey.com>
1381
1382 PR cli/14977:
1383 * ax.c (ax_printf): Special case for NULL.
1384
e6a58aa8
SM
13852018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1386
1387 * linux-low.c (linux_qxfer_libraries_svr4): Use
1388 xml_escape_text_append.
1389
f6e8a41e
SM
13902018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1391
1392 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1393
b9671caf
SM
13942018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1395
1396 * server.c (handle_general_set): Remove unnecessary xstrdup.
1397
e80aaf61
SM
13982018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1399
1400 * server.c (parse_debug_format_options): Adjust to
1401 delim_string_to_char_ptr_vec changes.
1402 * thread-db.c (thread_db_load_search): Adjust to
1403 dirnames_to_char_ptr_vec changes.
1404
b1223e78
MM
14052018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1406
1407 * target.h (target_enable_btrace, target_disable_btrace)
1408 (target_read_btrace, target_read_btrace_conf): Turn macro into
1409 inline function. Throw error if target method is not defined.
1410 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1411 check for btrace target method. Be prepared to handle exceptions
1412 from btrace target methods.
1413
81561546
SDJ
14142018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1415
1416 * server.c (captured_main): Change order of error message printed
1417 when the current working directory cannot be found.
1418
25e3c82c
SDJ
14192018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1420
1421 * server.c: Include "filenames.h" and "pathstuff.h".
1422 (program_name): Delete variable.
1423 (program_path): New anonymous class.
1424 (get_exec_wrapper): Use "program_path" instead of
1425 "program_name".
1426 (handle_v_run): Likewise.
1427 (captured_main): Likewise.
1428 (process_serial_event): Likewise.
1429
b4987c95
SDJ
14302018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1431
1432 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1433 (OBJS): Add "pathstuff.o".
1434 * server.c (current_directory): New global variable.
1435 (captured_main): Initialize "current_directory".
1436
f46cd62a
AH
14372018-02-26 Alan Hayward <alan.hayward@arm.com>
1438
1439 * tdesc.c: Use common/tdesc.h.
1440 * tdesc.h: Likewise.
1441
a543c5ca
AH
14422018-02-20 Alan Hayward <alan.hayward@arm.com>
1443 Simon Marchi <simon.marchi@ericsson.com>
1444
1445 * Makefile.in: Switch order of make rules.
1446
b5884fa7
AH
14472018-02-19 Alan Hayward <alan.hayward@arm.com>
1448
1449 * Makefile.in: Add common directory in build.
1450 * configure.ac: Add common reference.
1451 * configure: Regenerate.
1452
de6242d3
MM
14532018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1454
1455 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1456 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1457 * spu-low.c (spu_target_ops): Likewise.
1458 * win32-low.c (win32_target_ops): Likewise.
1459 * server.c (supported_btrace_packets): Report packets unconditionally.
1460 * target.h (target_ops) <supports_btrace>: Remove.
1461 (target_supports_btrace): Remove.
1462
9ee23a85
MM
14632018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1464
1465 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1466 (handle_btrace_disable): Change return type to void. Use exceptions
1467 to report errors.
1468 (handle_btrace_general_set): Catch exception and copy message to
1469 return message.
1470
8ce47547
TT
14712018-02-08 Tom Tromey <tom@tromey.com>
1472
1473 * linux-low.c (install_software_single_step_breakpoints): Use
1474 make_scoped_restore.
1475 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1476 (do_restore_current_thread_cleanup): Remove.
1477 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1478 declare.
1479
45dd3607
TT
14802018-02-08 Tom Tromey <tom@tromey.com>
1481
1482 * mem-break.c (set_raw_breakpoint_at): Use
1483 gdb::unique_xmalloc_ptr.
1484
e671cd59
PA
14852018-01-30 Pedro Alves <palves@redhat.com>
1486
1487 PR gdb/13211
1488 * target.c (target_terminal::terminal_state): Rename to ...
1489 (target_terminal::m_terminal_state): ... this.
1490
a0aad537
JC
14912018-01-19 James Clarke <jrtc27@jrtc27.com>
1492
1493 * linux-low.c (handle_extended_wait): Surround call to
1494 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1495
4d9b86e1
SM
14962018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1497
1498 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1499 linux_ptrace_attach_fail_reason_string now returning an
1500 std::string.
1501 (linux_attach): Likewise.
1502 * thread-db.c (attach_thread): Likewise.
1503
f517c180
EA
15042018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1505
1506 PR gdb/21559
1507 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1508 checking for fs_base/gs_base fields in struct user_regs_struct.
1509 * configure: Regenerate.
1510
9a70f35c
YQ
15112018-01-16 Yao Qi <yao.qi@linaro.org>
1512
1513 PR gdb/18749
1514 * linux-low.c (fetch_register): Call supply_register instead of
1515 error.
1516
605fd3c6
YQ
15172018-01-08 Yao Qi <yao.qi@linaro.org>
1518 Simon Marchi <simon.marchi@ericsson.com>
1519
1520 * Makefile.in (OBS): Remove selftest.o.
1521 * configure.ac: Set srv_selftest_objs if $development is true.
1522 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1523 * configure: Re-generated.
1524 * server.c (captured_main): Wrap variable selftest_filter with
1525 GDB_SELF_TEST.
1526
2cc05030
SM
15272018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1528
1529 * server.c (parse_debug_format_options): Return std::string.
1530 (handle_monitor_command, captured_main): Adjust.
1531
e379cee6
PA
15322018-01-05 Pedro Alves <palves@redhat.com>
1533
1534 PR gdb/18653
1535 * server.c (captured_main): Pass quiet=false to
1536 save_original_signals_state.
1537
82e1e79a
JB
15382018-01-01 Joel Brobecker <brobecker@adacore.com>
1539
1540 * gdbreplay.c (gdbreplay_version): Update copyright year in
1541 version message.
1542 * server.c (gdbserver_version): Likewise.
1543
8e481c3b
TT
15442017-12-08 Tom Tromey <tom@tromey.com>
1545
1546 * ax.c (ax_printf): Update.
1547
a8806230
YQ
15482017-12-07 Yao Qi <yao.qi@linaro.org>
1549
1550 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1551 aarch64_linux_read_description.
1552 * linux-amd64-ipa.c (idx2mask): New array.
1553 (get_ipa_tdesc): Move idx2mask out.
1554 (initialize_low_tracepoint): Initialize target descriptions.
1555 * linux-i386-ipa.c (idx2mask): New array.
1556 (get_ipa_tdesc): Move idx2mask out.
1557 (initialize_low_tracepoint): Initialize target descriptions.
1558
d4a0e8b5
SM
15592017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1560
1561 * tdesc.c (struct tdesc_type): Change return type.
1562 (tdesc_add_flag): Change parameter type.
1563 (tdesc_add_bitfield): Likewise.
1564 (tdesc_add_field): Likewise.
1565 (tdesc_set_struct_size): Likewise.
1566
798a7429
SM
15672017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1568
1569 * regcache.c (registers_to_string): Remove unused variable.
1570
c0e15c9b
SM
15712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1572
1573 * inferiors.c (for_each_inferior_with_data): Remove.
1574 * inferiors.h (for_each_inferior_with_data): Remove.
1575 * server.c (handle_qxfer_threads_worker): Change parameter type.
1576 (handle_qxfer_threads_proper): Use for_each_thread.
1577
f0045347
SM
15782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1579
1580 * inferiors.c (for_each_inferior): Remove.
1581 (clear_inferiors): Use for_each_thread.
1582 * inferiors.h (for_each_inferior): Remove.
1583 * linux-low.c (linux_wait_for_event_filtered): Use
1584 for_each_thread.
1585 (linux_stabilize_threads): Likewise.
1586 * regcache.c (regcache_release): Likewise.
1587 * server.c (gdb_wants_all_threads_stopped): Likewise.
1588 (clear_pending_status_callback): Remove.
1589 (handle_status): Use for_each_thread.
1590 (captured_main): Likewise.
1591 * win32-low.c (child_init_thread_list): Likewise.
1592 (win32_clear_inferiors): Likewise.
1593 (fake_breakpoint_event): Likewise.
1594
9521758b
SM
15952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1596
1597 * inferiors.h (find_inferior): Remove.
1598 * inferiors.c (find_inferior): Remove.
1599
8f86d7aa
SM
16002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1601
1602 * linux-low.c (resume_status_pending_p): Update comment.
1603 (need_step_over_p): Update comment.
1604
e2b44075
SM
16052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1606
1607 * linux-low.c (proceed_one_lwp): Return void, change parameter
1608 type.
1609 (unsuspend_and_proceed_one_lwp): Likewise.
1610 (proceed_all_lwps): Use for_each_thread.
1611 (unstop_all_lwps): Likewise.
1612
c80825ff
SM
16132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1614
1615 * linux-low.c (linux_resume_one_thread): Return void, take
1616 parameter directly.
1617 (linux_resume): Use for_each_thread.
1618
df3e4dbe
SM
16192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1620
1621 * linux-low.c (send_sigstop_callback): Return void, change
1622 parameter type. Rename to...
1623 (send_sigstop): ... this.
1624 (suspend_and_send_sigstop_callback): Return void, change parameter
1625 type. Rename to...
1626 (suspend_and_send_sigstop): ... this.
1627 (stop_all_lwps): Use for_each_thread.
1628
5a6b0a41
SM
16292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1630
1631 * linux-low.c (lwp_running): Return bool, remove unused
1632 argument.
1633 (linux_stabilize_threads): Use find_thread.
1634
39a64da5
SM
16352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1636
1637 * linux-low.c (select_singlestep_lwp_callback): Remove.
1638 (count_events_callback): Remove.
1639 (select_event_lwp_callback): Remove.
1640 (select_event_lwp): Use find_thread/for_each_thread.
1641
a1385b7b
SM
16422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1643
1644 * linux-low.c (not_stopped_callback): Return bool, take filter
1645 argument directly.
1646 (linux_wait_for_event_filtered): Use find_thread.
1647 (linux_wait_1): Likewise.
1648
454296a2
SM
16492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1650
1651 * linux-low.c (same_lwp): Remove.
1652 (find_lwp_pid): Use find_thread.
1653
6b2a85da
SM
16542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1655
1656 * linux-low.c (delete_lwp_callback): Remove.
1657 (linux_mourn): Use for_each_thread.
1658
798a38e8
SM
16592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1660
1661 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1662 args parameter, don't check for pid.
1663 (linux_detach): Use for_each_thread.
1664
e4eb0dec
SM
16652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1666
1667 * linux-low.c (struct counter): Remove.
1668 (second_thread_of_pid_p): Remove.
1669 (last_thread_of_process_p): Use find_thread.
1670
83e1b6c1
SM
16712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1672
1673 * inferiors.c (find_inferior_in_random): Remove.
1674 * inferiors.h (find_inferior_in_random): Remove.
1675 * linux-low.c (status_pending_p_callback): Return bool, accept
1676 parameter ptid directly.
1677 (linux_wait_for_event_filtered): Use find_thread_in_random.
1678 (linux_wait_1): Likewise.
1679
8dc7b443
SM
16802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1681
1682 * inferiors.c (find_inferior_id): Remove.
1683 (find_thread_ptid): Move implemention from find_inferior_id to
1684 here.
1685 * inferiors.h (find_inferior_id): Remove.
1686 * server.c (handle_status): Use find_thread_ptid.
1687 (process_serial_event): Likewise.
1688 * thread-db.c (find_one_thread): Likewise.
1689 (thread_db_thread_handle): Likewise.
1690 * win32-low.c (thread_rec): Likewise.
1691 (child_delete_thread): Likewise.
1692 (win32_thread_alive): Likewise.
1693 (get_child_debug_event): Likewise.
1694
da25033c
SM
16952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1696
1697 * linux-mips-low.c (update_watch_registers_callback): Return
1698 void, remove pid_p parameter, don't check for pid.
1699 (mips_insert_point, mips_remove_point): Use for_each_thread.
1700
c91bb56b
SM
17012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1702
1703 * lynx.low (lynx_delete_thread_callback): Remove.
1704 (lynx_mourn): Use for_each_thread.
1705
634a3254
SM
17062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1707
1708 * regcache.c (regcache_invalidate_one): Remove.
1709 (regcache_invalidate_pid): use for_each_thread.
1710
41272101
TT
17112017-11-26 Tom Tromey <tom@tromey.com>
1712
1713 * linux-low.c (linux_create_inferior): Update.
1714
f5291a6f
UW
17152017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1716
1717 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1718
6654d750
AH
17192017-11-24 Alan Hayward <alan.hayward@arm.com>
1720
1721 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1722 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1723 * linux-aarch64-tdesc-selftest.c: New file.
1724 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1725
17262017-11-24 Alan Hayward <alan.hayward@arm.com>
1727
1728 * configure.srv: Add new file.
1729 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1730 * linux-aarch64-tdesc-selftest.c: New file.
1731 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1732
49bdb7ee
AH
17332017-11-24 Alan Hayward <alan.hayward@arm.com>
1734
1735 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1736 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1737 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1738
d6d7ce56
AH
17392017-11-24 Alan Hayward <alan.hayward@arm.com>
1740
1741 * configure.srv: Add new files.
1742 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1743 aarch64_linux_read_description.
1744 * linux-aarch64-low.c (aarch64_linux_read_description):
1745 Merge with aarch64_arch_setup.
1746 (aarch64_arch_setup): Call aarch64_linux_read_description.
1747 * linux-aarch64-tdesc.c: New file.
1748 * linux-aarch64-tdesc.h: New file.
1749
506fe5f4
YQ
17502017-11-24 Yao Qi <yao.qi@linaro.org>
1751
1752 * configure.srv: Set $srv_regobj for tic6x-linux.
1753 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1754 (tic6x_read_description): Move some code to tic6x_arch_setup.
1755 (tic6x_tdesc_test): New function.
1756 (initialize_low_arch): Call selftests::register_test.
1757
29f9a567
YQ
17582017-11-22 Yao Qi <yao.qi@linaro.org>
1759
1760 * remote-utils.c (prepare_resume_reply): Use memcpy.
1761
578290ec
SM
17622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1763
1764 * linux-low.c (kill_one_lwp_callback): Return void, take
1765 argument directly, don't filter on pid.
1766 (linux_kill): Use for_each_thread.
1767
eca55aec
SM
17682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1769
1770 * linux-low.c (need_step_over_p): Return bool, remove dummy
1771 argument.
1772 (linux_resume, proceed_all_lwps): Use find_thread.
1773
25c28b4d
SM
17742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1775
1776 * linux-low.c (resume_status_pending_p): Return bool, remove
1777 flag_p argument.
1778 (linux_resume): Use find_thread.
1779
5fdda392
SM
17802017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1781
1782 * linux-low.c (struct thread_resume_array): Remove.
1783 (linux_set_resume_request): Return void, take arguments
1784 directly.
1785 (linux_resume): Use for_each_thread.
1786
fcb056a5
SM
17872017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1788
1789 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1790 return bool, remove data argument.
1791 (linux_stabilize_threads): Use find_thread.
1792
139720c5
SM
17932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1794
1795 * linux-low.c (unsuspend_one_lwp): Remove.
1796 (unsuspend_all_lwps): Use for_each_thread, inline code from
1797 unsuspend_one_lwp.
1798
6d1e5673
SM
17992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1800
1801 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1802 * linux-low.c (struct iterate_over_lwps_args): Remove.
1803 (iterate_over_lwps_filter): Remove.
1804 (iterate_over_lwps): Use find_thread.
1805
bbf550d5
SM
18062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1807
1808 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1809 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1810 code from reset_lwp_ptrace_options_callback.
1811
00192f77
SM
18122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1813
1814 * linux-arm-low.c (struct update_registers_data): Remove.
1815 (update_registers_callback): Return void, take arguments
1816 directly, don't check thread's pid.
1817 (arm_insert_point, arm_remove_point): Use for_each_thread.
1818
2bee2b6c
SM
18192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1820
1821 * win32-low.c (continue_one_thread): Return void, take argument
1822 directly.
1823 (child_continue): Use for_each_thread.
1824
0b360f19
SM
18252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1826
1827 * win32-i386-low.c (update_debug_registers_callback): Rename
1828 to ...
1829 (update_debug_registers): ... this, return void, remove pid_p arg.
1830 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1831
f27866ba
SM
18322017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1833
1834 * inferiors.h (struct process_info): Add constructor, initialize
1835 fields..
1836 <syscalls_to_catch>: Change type to std::vector<int>.
1837 * inferiors.c (add_process): Allocate process_info with new.
1838 (remove_process): Free process_info with delete.
1839 * linux-low.c (handle_extended_wait): Adjust.
1840 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1841 * server.c (handle_general_set): Adjust.
1842
e849ea89
PA
18432017-11-16 Pedro Alves <palves@redhat.com>
1844
1845 * remote-utils.c (remote_close): Block SIGIO signals instead of
1846 uninstalling the SIGIO handler.
1847
1d0aa65c
AH
18482017-11-16 Alan Hayward <alan.hayward@arm.com>
1849
1850 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1851
3491a34c
YQ
18522017-11-16 Yao Qi <yao.qi@linaro.org>
1853
1854 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1855 (tic6x_store_gregset): Likewise.
1856 (tic6x_usrregs_info): Move it up.
1857
a602f924
AH
18582017-11-15 Alan Hayward <alan.hayward@arm.com>
1859
1860 * Makefile.in: Update arch rules.
1861 * configure.srv: Explicitly mark arch/ files.
1862
5616b6c3
AS
18632017-11-13 Andreas Schwab <schwab@suse.de>
1864
1865 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1866 function.
1867 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1868
d1928160
PA
18692017-11-06 Pedro Alves <palves@redhat.com>
1870
1871 * config.in, configure: Regenerate.
1872
bac608e7
SM
18732017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1874
1875 * target.c (struct thread_search): Remove.
1876 (thread_search_callback): Remove.
1877 (prepare_to_access_memory): Use for_each_thread instead of
1878 find_inferior. Inline code from thread_search_callback.
1879
eaddb425
SM
18802017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1881
1882 * server.c (struct visit_actioned_threads_data): Remove.
1883 (visit_actioned_threads): Change prototype to take arguments
1884 directly.
1885 (resume): Use find_thread instead of find_inferior.
1886
99078d34
SM
18872017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1888
1889 * server.c (queue_stop_reply_callback): Change prototype, return
1890 void.
1891 (find_status_pending_thread_callback): Remove.
1892 (handle_status): Replace find_inferior with find_thread and
1893 for_each_thread.
1894
cc628f3d
AH
18952017-10-25 Alan Hayward <alan.hayward@arm.com>
1896
1897 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1898 with REGNO.
1899 (aarch64_store_gregset): Likewise.
1900 (aarch64_fill_fpregset): Likewise.
1901 (aarch64_store_fpregset): Likewise.
1902
4d3bb80e
SM
19032017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1904
1905 * gdbthread.h (find_thread, for_each_thread): New functions.
1906 * inferiors.c (thread_of_pid): Remove.
1907 (find_any_thread_of_pid): Use find_thread.
1908 * linux-low.c (num_lwps): Use for_each_thread.
1909
7a7cdfa0
YQ
19102017-10-17 Yao Qi <yao.qi@linaro.org>
1911
1912 * Makefile.in: Remove one rule.
1913 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1914
e675d170
YQ
19152017-10-17 Yao Qi <yao.qi@linaro.org>
1916
1917 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1918 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1919
7eb4e0f9
YQ
19202017-10-17 Yao Qi <yao.qi@linaro.org>
1921
1922 * configure.srv: Rename arm.o with arch/arm.o.
1923
60d6cfc9
YQ
19242017-10-17 Yao Qi <yao.qi@linaro.org>
1925
1926 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1927 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1928 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1929 (arch-i386.o, arch-amd64.o): Remove rules.
1930 (arch/%.o): New rule.
1931 Update POSTCOMPILE and COMPILE.pre.
1932 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1933 * configure: Re-generated.
1934 * configure.srv: Replace arch-i386.o with arch/i386.o.
1935 Replace arch-amd64.o with arch/amd64.o.
1936
5bfda255
YQ
19372017-10-16 Yao Qi <yao.qi@linaro.org>
1938
1939 * configure: Regenerated.
1940
9c80ecd6
SM
19412017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1942
1943 * inferiors.h: (struct inferior_list): Remove.
1944 (struct inferior_list_entry); Remove.
1945 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1946 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1947 get_first_inferior): Remove.
1948 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1949 find_inferior_id, find_inferior_in_random): Change signature.
1950 * inferiors.c (all_threads): Change type to
1951 std::list<thread_info *>.
1952 (get_thread): Remove macro.
1953 (find_inferior, find_inferior_id): Change signature, implement
1954 using find_thread.
1955 (find_inferior_in_random): Change signature, implement using
1956 find_thread_in_random.
1957 (for_each_inferior, for_each_inferior_with_data): Change
1958 signature, implement using for_each_thread.
1959 (add_inferior_to_list, remove_inferior): Remove.
1960 (add_thread, get_first_thread, thread_of_pid,
1961 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1962 (get_first_inferior, one_inferior_p, clear_inferior_list):
1963 Remove.
1964 (clear_inferiors, get_thread_process): Update.
1965 * gdbthread.h: Include <list>.
1966 (struct thread_info) <entry>: Remove field.
1967 <id>: New field.
1968 (all_threads): Change type to std::list<thread_info *>.
1969 (get_first_inferior): Add doc.
1970 (find_thread, for_each_thread, find_thread_in_random): New
1971 functions.
1972 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1973 * linux-arm-low.c (update_registers_callback): Update.
1974 * linux-low.c (second_thread_of_pid_p): Update.
1975 (kill_one_lwp_callback, linux_detach_lwp_callback,
1976 delete_lwp_callback, status_pending_p_callback, same_lwp,
1977 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1978 iterate_over_lwps, not_stopped_callback,
1979 resume_stopped_resumed_lwps, count_events_callback,
1980 select_singlestep_lwp_callback, select_event_lwp_callback,
1981 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1982 suspend_and_send_sigstop_callback, wait_for_sigstop,
1983 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1984 lwp_running, linux_set_resume_request, resume_status_pending_p,
1985 need_step_over_p, start_step_over, linux_resume_one_thread,
1986 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1987 reset_lwp_ptrace_options_callback): Update.
1988 * linux-mips-low.c (update_watch_registers_callback): Update.
1989 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1990 Update.
1991 (free_register_cache_thread_one): Remove.
1992 (regcache_release): Update.
1993 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1994 handle_qxfer_threads_worker): Update.
1995 (handle_query): Update, use list iterator.
1996 (visit_actioned_threads, handle_pending_status,
1997 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1998 clear_pending_status_callback, set_pending_status_callback,
1999 find_status_pending_thread_callback, handle_status,
2000 process_serial_event): Update.
2001 * target.c (thread_search_callback): Update.
2002 * thread-db.c (thread_db_get_tls_address): Update.
2003 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2004 Update.
2005 * win32-i386-low.c (update_debug_registers_callback): Update.
2006 * win32-low.c (delete_thread_info, child_delete_thread,
2007 continue_one_thread, suspend_one_thread,
2008 get_child_debug_event): Adjust.
2009
9179355e
SM
20102017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2011
2012 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2013 * inferiors.h: Include <list>.
2014 (struct process_info) <entry>: Remove field.
2015 <pid>: New field.
2016 (pid_of): Change macro to function.
2017 (ptid_of, lwpid_of): Remove macro.
2018 (all_processes): Change type to std::list<process_info *>.
2019 (ALL_PROCESSES): Remove macro.
2020 (for_each_process, find_process): New function.
2021 * inferiors.c (all_processes): Change type to
2022 std::list<process_info *>.
2023 (find_thread_process): Adjust.
2024 (add_process): Likewise.
2025 (remove_process): Likewise.
2026 (find_process_pid): Likewise.
2027 (get_first_process): Likewise.
2028 (started_inferior_callback): Remove.
2029 (have_started_inferiors_p): Adjust.
2030 (attached_inferior_callback): Remove.
2031 (have_attached_inferiors_p): Adjust.
2032 * linux-low.c (check_zombie_leaders): Likewise.
2033 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2034 (x86_linux_update_xmltarget): Adjust.
2035 * server.c (handle_query): Likewise.
2036 (gdb_reattached_process): Remove.
2037 (handle_status): Adjust.
2038 (kill_inferior_callback): Likewise.
2039 (detach_or_kill_inferior): Remove.
2040 (print_started_pid): Likewise.
2041 (print_attached_pid): Likewise.
2042 (detach_or_kill_for_exit): Update.
2043 (process_serial_event): Likewise.
2044 * linux-arm-low.c (arm_new_fork): Likewise.
2045
c9cb8905
SM
20462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2047
2048 * dll.h: Include <list>.
2049 (struct dll_info): Add constructor.
2050 <entry>: Remove field.
2051 (all_dlls): Change type to std::list<dll_info>.
2052 * dll.c: Include <algorithm>.
2053 (get_dll): Remove macro.
2054 (all_dlls): Change type to std::list<dll_info *>.
2055 (free_one_dll): Remove.
2056 (match_dll): Likewise.
2057 (loaded_dll): Adjust.
2058 (unloaded_dll): Adjust to all_dlls type change, use
2059 std::find_if. Inline code from match_dll.
2060 (clear_dlls): Adjust to all_dlls type change.
2061 * server.c (emit_dll_description): Remove.
2062 (handle_qxfer_libraries): Adjust to all_dlls type change,
2063 integrate emit_dll_description's functionality.
2064
04ec7890
SM
20652017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2066
2067 * linux-low.h (struct linux_target_ops) <delete_process>: New
2068 field.
2069 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2070 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2071 (struct linux_target_ops): Add delete_process callback.
2072 * linux-arm-low.c (arm_delete_process): New.
2073 (struct linux_target_ops): Add delete_process callback.
2074 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2075 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2076 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2077 * linux-mips-low.c (mips_linux_delete_process): New.
2078 (struct linux_target_ops): Add delete_process callback.
2079 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2080 * linux-s390-low.c (struct linux_target_ops): Likewise.
2081 * linux-sh-low.c (struct linux_target_ops): Likewise.
2082 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2083 * linux-tile-low.c (struct linux_target_ops): Likewise.
2084 * linux-x86-low.c (x86_linux_delete_process): New.
2085 (struct linux_target_ops): Add delete_process callback.
2086 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2087
466eecee
SM
20882017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2089
2090 * linux-aarch64-low.c (the_low_target): Add thread delete
2091 callback.
2092 * linux-arm-low.c (arm_delete_thread): New function.
2093 (the_low_target): Add thread delete callback.
2094 * linux-bfin-low.c (the_low_target): Likewise.
2095 * linux-crisv32-low.c (the_low_target): Likewise.
2096 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2097 set.
2098 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2099 field.
2100 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2101 * linux-mips-low.c (mips_linux_delete_thread): New function.
2102 (the_low_target): Add thread delete callback.
2103 * linux-ppc-low.c (the_low_target): Likewise.
2104 * linux-s390-low.c (the_low_target): Likewise.
2105 * linux-sh-low.c (the_low_target): Likewise.
2106 * linux-tic6x-low.c (the_low_target): Likewise.
2107 * linux-tile-low.c (the_low_target): Likewise.
2108 * linux-x86-low.c (the_low_target): Likewise.
2109 * linux-xtensa-low.c (the_low_target): Likewise.
2110
b79f7801
YZ
21112017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2112
2113 * win32-low.c: Include "common-inferior.h".
2114
bc3b087d
SDJ
21152017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2116
2117 * inferiors.c (set_inferior_cwd): New function.
2118 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2119 (handle_query): Inform that QSetWorkingDir is supported.
2120 * win32-low.c (create_process): Pass the inferior's cwd to
2121 CreateProcess.
2122
d092c5a2
SDJ
21232017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2124
2125 * inferiors.c (current_inferior_cwd): New global variable.
2126 (get_inferior_cwd): New function.
2127 * inferiors.h (struct process_info) <cwd>: New field.
2128
7da0a886
SDJ
21292017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2130
2131 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2132 (OBS): Add gdb_tilde_expand.o.
2133
289a6840
SM
21342017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2135
2136 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2137 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2138
256642e8
PA
21392017-09-29 Pedro Alves <palves@redhat.com>
2140
2141 * ax.c (gdb_parse_agent_expr): Constify.
2142 * ax.h (gdb_parse_agent_expr): Constify.
2143 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2144 Constify.
2145 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2146 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2147 * remote-utils.h (read_ptid): Constify.
2148 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2149 (process_point_options, process_serial_event): Constify.
2150 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2151 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2152 (cmd_qtbuffer): Constify.
2153
5b9ca4d4
PA
21542017-09-29 Pedro Alves <palves@redhat.com>
2155
2156 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2157 fails.
2158
94c207e0
PA
21592017-09-29 Pedro Alves <palves@redhat.com>
2160
2161 * linux-low.c (handle_extended_wait): Pass parent thread instead
2162 of process to thread_db_notice_clone.
2163 * linux-low.h (thread_db_notice_clone): Replace parent process
2164 parameter with parent thread parameter.
2165 * thread-db.c (find_one_thread): Add comment.
2166 (thread_db_notice_clone): Replace parent process parameter with
2167 parent thread parameter. Temporarily switch to the parent thread.
2168
75352e28
SDJ
21692017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2170
2171 * gdbthread.h: Include "common-gdbthread.h".
2172 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2173 "if" when validating the ptid.
2174 * remote-utils.c: Include "gdbthread.h".
2175 (prepare_resume_reply): Use "switch_to_thread".
2176 * target.c (done_accessing_memory): Likewise.
2177
ad339634
AA
21782017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2179
2180 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2181 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2182 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2183 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2184 s390x-gs-linux64-ipa.o to ipa_obj.
2185 * linux-s390-low.c (HWCAP_S390_GS): New define.
2186 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2187 New functions.
2188 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2189 (s390_arch_setup): Check for guarded-storage support and choose
2190 appropriate tdesc.
2191 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2192 init_registers_s390x_gs_linux64.
2193 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2194 enum value.
2195 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2196 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2197
cc4d742f
SM
21982017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2199
2200 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2201
f6327dcb
KB
22022017-09-21 Kevin Buettner <kevinb@redhat.com>
2203
2204 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2205 (thread_db_thread_handle): Declare.
2206 * linux-low.c (linux_target_ops): Initialize thread_handle.
2207 * server.c (handle_qxfer_threads_worker): Add support for
2208 "handle" attribute.
2209 * target.h (struct target_ops): Add new function pointer,
2210 thread_handle.
2211 (target_thread_handle): Define.
2212 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2213 field in lwp.
2214 (thread_db_thread_handle): New function.
2215
86299109
KB
22162017-09-21 Kevin Buettner <kevinb@redhat.com>
2217
2218 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2219 * linux-low.h (thread_db_notice_clone): Declare.
2220 * thread-db.c (thread_db_notice_clone): New function.
2221
f557a88a
PA
22222017-09-21 Pedro Alves <palves@redhat.com>
2223
2224 * server.c (gdb_read_memory, handle_status, process_serial_event)
2225 (handle_serial_event, handle_target_event): Adjust to
2226 set_desired_thread prototype change.
2227 * target.c (set_desired_thread): Remove 'use_general' parameter
2228 and adjust.
2229 * target.h (set_desired_thread): Remove 'use_general' parameter.
2230
223ffa71
TT
22312017-09-20 Tom Tromey <tom@tromey.com>
2232
2233 * target.c (target_terminal::terminal_state): Define.
2234 (target_terminal::init): Rename from target_terminal_init.
2235 (target_terminal::inferior): Rename from
2236 target_terminal_inferior.
2237 (target_terminal::ours): Rename from target_terminal_ours.
2238 (target_terminal::ours_for_output, target_terminal::info): New.
2239
04fd3ba9
SM
22402017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2241
2242 * server.c (accumulate_file_name_length): Remove.
2243 (emit_dll_description): Adjust to std::string change.
2244 (handle_qxfer_libraries): Use std::string to hold document.
2245
5e187554
SM
22462017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2247
2248 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2249 return type of xml_escape_text.
2250 * server.c (emit_dll_description): Likewise.
2251
1526853e
SM
22522017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2253
2254 * server.c (captured_main): Accept argument for --selftest.
2255 Update run_tests call.
2256 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2257 when registering selftests.
2258
c4dfafab
SDJ
22592017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2260
2261 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2262 instead of "VEC" for "target_desc.reg_defs".
2263 (regcache_cpy): Likewise.
2264 (registers_to_string): Likewise.
2265 (registers_from_string): Likewise.
2266 (find_regno): Likewise.
2267 (supply_regblock): Likewise.
2268 (regcache_raw_read_unsigned): Likewise.
2269 * tdesc.c (init_target_desc): Likewise.
2270 (tdesc_create_reg): Likewise.
2271 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2272 (struct target_desc) <reg_defs>: Convert to "std::vector".
2273 (target_desc): Do not initialize "reg_defs".
2274 (~target_desc): Update code to use "std::vector" instead of "VEC"
2275 for "target_desc.reg_defs".
2276 (operator==): Likewise.
2277
124aceb4
SM
22782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2279
2280 * inferiors.h (thread_to_gdb_id): Remove.
2281 * inferiors.c (thread_to_gdb_id): Remove.
2282 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2283 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2284 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2285 Likewise.
2286 * nto-low.c (nto_fetch_registers, nto_store_registers,
2287 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2288
96cde54f
SM
22892017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2290
2291 * inferiors.h (gdb_id_to_thread_id): Remove.
2292 * inferiors.c (gdb_id_to_thread_id): Remove.
2293 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2294 removal. Move pid declaration closer to where it's used.
2295
e8ca139e
SM
22962017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2297
2298 * server.c (handle_detach): New function.
2299 (process_serial_event): Move code out, call handle_detach.
2300
f8a4e119
SM
23012017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2302
2303 * server.c (require_running): Rename to ...
2304 (require_running_or_return): ... this ...
2305 (require_running_or_break): ... and this.
2306 (handle_query, process_serial_event): Adjust.
2307
0eb0a407
SM
23082017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2309
2310 * linux-low.c (linux_set_resume_request): Remove unused
2311 variables.
2312
785922a5
SM
23132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2314
2315 * server.c (first_thread_of): Remove.
2316 (process_serial_event): Replace usage of first_thread_of with
2317 find_any_thread_of_pid.
2318 * tracepoint.c (same_process_p): Remove.
2319 (gdb_agent_about_to_close): Replace usage of same_process_p with
2320 find_any_thread_of_pid.
2321 * linux-x86-low.c (same_process_callback): Remove.
2322 (x86_arch_setup_process_callback): Replace usage of
2323 same_process_callback with find_any_thread_of_pid.
2324 * thread-db.c (any_thread_of): Remove.
2325 (switch_to_process): Replace usage of any_thread_of with
2326 find_any_thread_of_pid.
2327 * inferiors.c (thread_pid_matches_callback): Remove.
2328 (find_thread_process): Adjust to use find_any_thread_of_pid.
2329
a059f00c
SDJ
23302017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2331
2332 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2333 with "!VEC_empty".
a059f00c 2334
cc397f3a
SDJ
23352017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2336
2337 * linux-low.c (handle_extended_wait): Use
2338 "allocate_target_description" instead of "XNEW".
2339 * linux-x86-low.c (initialize_low_arch): Likewise.
2340
22916b07
YQ
23412017-09-05 Yao Qi <yao.qi@linaro.org>
2342
2343 * configure.srv (srv_i386_regobj): Remove.
2344 (srv_amd64_regobj): Remove.
2345 (srv_regobj): Set it to "" for x86 non-linux targets.
2346 * linux-x86-tdesc.c (i386_linux_read_description):
2347 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2348 (init_registers_i386): Remove the declaration.
2349 (tdesc_i386): Remove the declaration.
2350 (lynx_i386_arch_setup): Call i386_create_target_description.
2351 * nto-x86-low.c: Likewise.
2352 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2353 [!__x86_64__]: include arch/i386.h.
2354 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2355
38602d55
YQ
23562017-09-05 Yao Qi <yao.qi@linaro.org>
2357
2358 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2359 i386/amd64-XXX-linux from it.
2360
44b886ff
YQ
23612017-09-05 Yao Qi <yao.qi@linaro.org>
2362
2363 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2364 false.
2365 (ipa_amd64_linux_regobj): Remove.
2366 (ipa_x32_linux_regobj): Remove.
2367
b4570e4b
YQ
23682017-09-05 Yao Qi <yao.qi@linaro.org>
2369
2370 * Makefile.in (arch-amd64.o): New rule.
2371 * configure.srv: Append arch-amd64.o.
2372 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2373 (get_ipa_tdesc): Call amd64_linux_read_description.
2374 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2375 and init_registers_amd64_XXX.
2376 * linux-x86-low.c (x86_linux_read_description): Call
2377 amd64_linux_read_description.
2378 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2379 (initialize_low_arch): Don't call init_registers_x32_XXX and
2380 init_registers_amd64_XXX.
2381 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2382 and tdesc_amd64_XXX.
2383 [__x86_64__] (amd64_tdesc_test): New function.
2384 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2385 and init_registers_amd64_XXX.
2386 * linux-x86-tdesc.c: Include arch/amd64.h.
2387 (xcr0_to_tdesc_idx): New function.
2388 (i386_linux_read_description): New function.
2389 (amd64_get_ipa_tdesc_idx): New function.
2390 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2391 (amd64_get_ipa_tdesc): Declare.
2392
d1f28ea2
YQ
23932017-09-05 Yao Qi <yao.qi@linaro.org>
2394
2395 * configure.srv (srv_i386_linux_xmlfiles): Remove
2396 i386/i386-XXX-linux.xml from it.
2397
25a93583
YQ
23982017-09-05 Yao Qi <yao.qi@linaro.org>
2399
2400 * configure.srv: Set srv_i386_linux_regobj empty if $development
2401 is false.
2402 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2403 initialize_low_tdesc.
2404 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2405 with #if initialize_low_tdesc.
2406 * linux-x86-tdesc-selftest.c: New file.
2407 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2408
5f035c07
YQ
24092017-09-05 Yao Qi <yao.qi@linaro.org>
2410
2411 * Makefile.in (arch-i386.o): New rule.
2412 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2413 (x86_64-*-linux*): Likewise.
2414 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2415 include arch/i386.h.
2416 (i386_linux_read_description): Remove code and call
2417 i386_create_target_description.
2418 * tdesc.c (allocate_target_description): New function.
2419 * tdesc.h (set_tdesc_architecture): Remove declaration.
2420 (set_tdesc_osabi): Likewise.
2421
0abe8a89
YQ
24222017-09-05 Yao Qi <yao.qi@linaro.org>
2423
2424 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2425 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2426 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2427 .xmltarget.
2428 * server.c (get_features_xml): Call tdesc_get_features_xml.
2429 * tdesc.c (set_tdesc_architecture): New function.
2430 (set_tdesc_osabi): New function.
2431 (tdesc_get_features_xml): New function.
2432 (tdesc_create_feature): Add an argument.
2433 * tdesc.h (struct target_desc) <features>: New field.
2434 <arch, osabi>: New field.
2435 (~target_desc): xfree features, arch, and osabi.
2436 (target_desc::oerator==): Don't compare .xmltarget.
2437 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2438 (set_tdesc_osabi): Likewise.
2439 (tdesc_get_features_xml): Likewise.
2440
0a188386
YQ
24412017-09-05 Yao Qi <yao.qi@linaro.org>
2442
2443 * linux-x86-tdesc.c: Include selftest.h.
2444 (i386_tdesc_test): New function.
2445 (initialize_low_tdesc): Call selftests::register_test.
2446 * tdesc.h: Include regdef.h.
2447 (target_desc): Override operator == and !=.
2448
f49ff000
YQ
24492017-09-05 Yao Qi <yao.qi@linaro.org>
2450
2451 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2452 (ipa_obj): Likewise.
2453 * linux-i386-ipa.c: Include common/x86-xstate.h
2454 (get_ipa_tdesc): Call i386_linux_read_description.
2455 (initialize_low_tracepoint): Don't call init_registers_XXX
2456 functions, call initialize_low_tdesc instead.
2457 * linux-x86-low.c (x86_linux_read_description): Call
2458 i386_linux_read_description.
2459 (initialize_low_arch): Don't call init_registers_i386_XXX
2460 functions, call initialize_low_tdesc.
2461 * linux-x86-tdesc.c: New file.
2462 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2463 (i386_get_ipa_tdesc_idx): Declare.
2464 (i386_get_ipa_tdesc): Declare.
2465 (initialize_low_tdesc): Declare.
2466
2b68ef2f
YQ
24672017-09-05 Yao Qi <yao.qi@linaro.org>
2468
2469 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2470 instead of 0.
2471
f7000548
YQ
24722017-09-05 Yao Qi <yao.qi@linaro.org>
2473
2474 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2475 * regcache.c (get_thread_regcache): Use VEC_length.
2476 (init_register_cache): Likewise.
2477 (regcache_cpy): Likewise.
2478 (registers_to_string): Iterate reg_defs via VEC_iterate.
2479 (find_regno): Likewise.
2480 (find_register_by_number): Use VEC_index.
2481 (register_size): Call find_register_by_number.
2482 (register_data): Call find_register_by_number.
2483 (supply_regblock): Use VEC_length.
2484 (regcache_raw_read_unsigned): Likewise.
2485 * tdesc.c (init_target_desc): Iterate reg_defs via
2486 VEC_iterate.
2487 (default_description): Update initializer.
2488 (copy_target_description): Don't update field num_registers.
2489 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2490 <num_registers>: Remove.
2491
50a421ac
SM
24922017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2493
2494 * Makefile.in (.SECONDARY): Define target.
2495
23fdd69e
SM
24962017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2497
2498 * linux-low.c (linux_wait_1): Adjust.
2499 * server.c (queue_stop_reply_callback): Adjust.
2500
0a2dde4a
SDJ
25012017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2502
2503 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2504 QEnvironmentUnset and QEnvironmentReset packets.
2505 (handle_query): Inform remote that QEnvironmentHexEncoded,
2506 QEnvironmentUnset and QEnvironmentReset are supported.
2507
6afd337d
SM
25082017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2509
2510 * inferiors.h (inferior_target_data): Rename to ...
2511 (thread_target_data): ... this.
2512 (inferior_regcache_data): Rename to ...
2513 (thread_regcache_data): ... this.
2514 (set_inferior_regcache_data): Rename to ...
2515 (set_thread_regcache_data): ... this.
2516 * inferiors.c (inferior_target_data): Rename to ...
2517 (thread_target_data): ... this.
2518 (inferior_regcache_data): Rename to ...
2519 (thread_regcache_data): ... this.
2520 (set_inferior_regcache_data): Rename to ...
2521 (set_thread_regcache_data): ... this.
2522 (free_one_thread): Update.
2523 * linux-low.h (get_thread_lwp): Update.
2524 * regcache.c (get_thread_regcache): Update.
2525 (regcache_invalidate_thread): Update.
2526 (free_register_cache_thread): Update.
2527 * win32-i386-low.c (update_debug_registers_callback): Update.
2528 (win32_get_current_dr): Update.
2529 * win32-low.c (thread_rec): Update.
2530 (delete_thread_info): Update.
2531 (continue_one_thread): Update.
2532 (suspend_one_thread): Update.
2533
a160cc46
SM
25342017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2535
2536 * inferiors.c (set_inferior_target_data): Remove.
2537 * inferiors.h (set_inferior_target_data): Remove.
2538
6d580b63
YQ
25392017-08-18 Yao Qi <yao.qi@linaro.org>
2540
2541 * Makefile.in (OBS): Add selftest.o.
2542 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2543 * configure, config.in: Re-generated.
2544 * server.c: Include common/sefltest.h.
2545 (captured_main): Handle option --selftest.
2546
f5a29eb0
YQ
25472017-08-09 Yao Qi <yao.qi@linaro.org>
2548
2549 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2550 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2551 i386-avx-mpx.o and i386-mmx.o.
2552 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2553 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2554 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2555 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2556 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2557 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2558 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2559 i386/amd64-avx-mpx.xml.
2560
57757c2f
YQ
25612017-08-09 Yao Qi <yao.qi@linaro.org>
2562
2563 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2564 and x32-avx-avx512.o.
2565 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2566 i386/x32-avx-avx512.xml.
2567
229d26fc
SM
25682017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2569
2570 * tracepoint.h (enum class fast_tpoint_collect_result): New
2571 enumeration.
2572 (fast_tracepoint_collecting): Change return type to
2573 fast_tpoint_collect_result.
2574 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2575 * linux-low.h: Include tracepoint.h.
2576 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2577 fast_tpoint_collect_result.
2578 * linux-low.c (handle_tracepoints): Adjust.
2579 (linux_fast_tracepoint_collecting): Change return type to
2580 fast_tpoint_collect_result.
2581 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2582 linux_wait_1, stuck_in_jump_pad_callback,
2583 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2584 proceed_one_lwp): Adjust to type change.
2585
2e1e43e1
YQ
25862017-07-10 Yao Qi <yao.qi@linaro.org>
2587
2588 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2589
adc764e7
YQ
25902017-06-29 Yao Qi <yao.qi@linaro.org>
2591
2592 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2593 Remove.
2594 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2595
a206891a
SM
25962017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2597
2598 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2599
9a6c7d9c
SDJ
26002017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2601
2602 * linux-low.c (linux_create_inferior): Adjust code to access the
2603 environment information via 'gdb_environ' class.
2604 * lynx-low.c (lynx_create_inferior): Likewise.
2605 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2606 (get_environ): Return a pointer to 'our_environ'.
2607 (captured_main): Initialize 'our_environ'.
2608 * server.h (get_environ): Adjust prototype.
2609 * spu-low.c (spu_create_inferior): Adjust code to access the
2610 environment information via 'gdb_environ' class.
2611
ae3e2ccf
SM
26122017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2613
2614 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2615 usage of "register" keyword.
2616
3e019bdc
SM
26172017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2618
2619 * configure: Re-generate.
2620
8465943a
SM
26212017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2622
2623 * configure: Re-generate.
2624
cf0dd6f0
SM
26252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2626
2627 * Makefile.in (COMPILE.pre): Add "-x c++".
2628
9845682b
SDJ
26292017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2630
2631 * fork-child.c: Conditionally include <signal.h>.
2632
aefd8b33
SDJ
26332017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2634
2635 * server.c (handle_general_set): Handle new packet
2636 "QStartupWithShell".
2637 (handle_query): Add "QStartupWithShell" to the list of supported
2638 packets.
2639 (gdbserver_usage): Add help text explaining the
2640 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2641 options.
2642 (captured_main): Recognize and act upon the presence of the new
2643 CLI options.
2644
2090129c
SDJ
26452017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2646 Pedro Alves <palves@redhat.com>
2647
2648 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2649 * configure: Regenerate.
2650 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2651 "fork-inferior.o".
2652 (i[34567]86-*-lynxos*): Likewise.
2653 (spu*-*-*): Likewise.
2654 * fork-child.c: New file.
2655 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2656 and "environ.h".
2657 (linux_ptrace_fun): New function.
2658 (linux_create_inferior): Adjust function prototype to reflect
2659 change on "target.h". Adjust function code to use
2660 "fork_inferior".
2661 (linux_request_interrupt): Delete "signal_pid".
2662 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2663 (lynx_ptrace_fun): New function.
2664 (lynx_create_inferior): Adjust function prototype to reflect
2665 change on "target.h". Adjust function code to use
2666 "fork_inferior".
2667 * nto-low.c (nto_create_inferior): Adjust function prototype and
2668 code to reflect change on "target.h". Update comments.
2669 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2670 "common-terminal.h" and "environ.h".
2671 (terminal_fd): Moved to fork-child.c.
2672 (old_foreground_pgrp): Likewise.
2673 (restore_old_foreground_pgrp): Likewise.
2674 (last_status): Make it global.
2675 (last_ptid): Likewise.
2676 (our_environ): New variable.
2677 (startup_with_shell): Likewise.
2678 (program_name): Likewise.
2679 (program_argv): Rename to...
2680 (program_args): ...this.
2681 (wrapper_argv): New variable.
2682 (start_inferior): Delete function.
2683 (get_exec_wrapper): New function.
2684 (get_exec_file): Likewise.
2685 (get_environ): Likewise.
2686 (prefork_hook): Likewise.
2687 (post_fork_inferior): Likewise.
2688 (postfork_hook): Likewise.
2689 (postfork_child_hook): Likewise.
2690 (handle_v_run): Update code to deal with arguments coming from the
2691 remote host. Update calls from "start_inferior" to
2692 "create_inferior".
2693 (captured_main): Likewise. Initialize environment variable. Call
2694 "have_job_control".
2695 * server.h (post_fork_inferior): New prototype.
2696 (get_environ): Likewise.
2697 (last_status): Declare.
2698 (last_ptid): Likewise.
2699 (signal_pid): Likewise.
2700 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2701 (spu_ptrace_fun): New function.
2702 (spu_create_inferior): Adjust function prototype to reflect change
2703 on "target.h". Adjust function code to use "fork_inferior".
2704 * target.c (target_terminal_init): New function.
2705 (target_terminal_inferior): Likewise.
2706 (target_terminal_ours): Likewise.
2707 * target.h: Include <vector>.
2708 (struct target_ops) <create_inferior>: Update prototype.
2709 (create_inferior): Update macro.
2710 * utils.c (gdb_flush_out_err): New function.
2711 * win32-low.c (win32_create_inferior): Adjust function prototype
2712 and code to reflect change on "target.h".
2713
043a4934
SDJ
27142017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2715
2716 * inferiors.c (switch_to_thread): New function.
2717
15652511
SDJ
27182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2719
2720 * Makefile.in (SFILE): Add "common/job-control.c".
2721 (OBS): Add "job-control.o".
2722
21ea5acd
SDJ
27232017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2724
2725 * Makefile: Remove "@host_makefile_frag@".
2726
e13cb306
PA
27272017-05-05 Pedro Alves <palves@redhat.com>
2728
2729 * configure: Regenerate.
2730
c94fee56
SDJ
27312017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2732
2733 * configure: Regenerate.
2734
a0ff9e1a
SM
27352017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2736
2737 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2738 software_single_step change of return type to
2739 std::vector<CORE_ADDR>.
2740 * linux-low.c (install_software_single_step_breakpoints):
2741 Likewise.
2742 * linux-low.h (install_software_single_step_breakpoints):
2743 Likewise.
2744
be628ab8
SDJ
27452017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2746
2747 * remote-utils.c: Include "gdb_termios.h" instead of
2748 "terminal.h".
2749 * terminal.h: Delete file.
2750
7c5ded6a
SDJ
27512017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2752
2753 * server.c: Include <vector>.
2754 <program_argv, wrapper_argv>: Convert to std::vector.
2755 (start_inferior): Rewrite function to use C++.
2756 (handle_v_run): Likewise. Update code that calculates the argv
2757 based on the vRun packet; use C++.
2758 (captured_main): Likewise.
2759
436252de
SM
27602017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2761
2762 * server.c (handle_v_cont): Initialize thread_resume::thread
2763 with null_ptid.
2764
9bf2a700
PA
27652017-04-05 Pedro Alves <palves@redhat.com>
2766
2767 * configure: Regenerate.
2768
a121b7c1
PA
27692017-04-05 Pedro Alves <palves@redhat.com>
2770
2771 * gdbreplay.c (sync_error): Constify.
2772 * linux-x86-low.c (push_opcode): Constify.
2773
21c8a587
PA
27742017-04-05 Pedro Alves <palves@redhat.com>
2775
2776 * win32-low.c (get_child_debug_event)
2777 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2778 Report TARGET_WAITKIND_SPURIOUS instead.
2779
fb32b4f7
PA
27802017-04-05 Pedro Alves <palves@redhat.com>
2781
e79be6e5
SM
2782 * remote-utils.c (remote_prepare, remote_open): Constify.
2783 * remote-utils.h (remote_prepare, remote_open): Constify.
2784 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2785
65dd1e59
SM
27862017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2787
2788 * Makefile.in (clean): Clear .deps.
2789
8fa5b777
SM
27902017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2791
2792 * .gitignore: Remove generated files, replace with wildcard.
2793 * (clean): Replace removal of generated files with wildcard.
2794 (version.c): Replace with...
2795 (version-generated.c): ...this.
2796 (xml-builtin.c): Replace with...
2797 (xml-builtin-generated.c): ...this.
2798 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2799 (%.c: *regformats*): Replace with...
2800 (%-generated.c: *regformats*): ...this.
2801
a12e714b
MF
28022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2803
2804 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2805 (xtensa_fill_gregset): Call collect_register_by_name for
2806 threadptr register.
2807 (xtensa_store_gregset): Call supply_register_by_name for
2808 threadptr register.
2809
1a09b50a
MF
28102017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2811
2812 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2813 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2814 (xtensa_store_gregset): Call supply_register for all registers in
2815 a0_regnum..a0_regnum + C0_NREGS range.
2816
1a01e7c6
SM
28172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2818
2819 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2820 (ax-ipa.o: ax.c): Remove.
2821 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2822 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2823 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2824 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2825 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2826
36bc18a8
SM
28272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2828
2829 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2830 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2831 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2832 (errors-ipa.o: ../common/errors.c): Remove.
2833 (format-ipa.o: ../common/format.c): Remove.
2834 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2835
a8ebe3d5
SM
28362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2837
2838 * Makefile.in (%-ipa.o: %.c): New rule.
2839 (tracepoint-ipa.o: tracepoint.c): Remove.
2840 (utils-ipa.o: utils.c): Remove.
2841 (remote-utils-ipa.o: remote-utils.c): Remove.
2842 (regcache-ipa.o: regcache.c): Remove.
2843 (i386-linux-ipa.o: i386-linux.c): Remove.
2844 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2845 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2846 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2847 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2848 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2849 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2850 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2851 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2852 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2853 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2854 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2855 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2856 (aarch64-ipa.o: aarch64.c): Remove.
2857 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2858 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2859 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2860 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2861 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2862 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2863 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2864 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2865 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2866 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2867 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2868 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2869 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2870 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2871 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2872 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2873 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2874 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2875 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2876 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2877 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2878 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2879 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2880 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2881 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2882 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2883 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2884 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2885 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2886 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2887 (tdesc-ipa.o: tdesc.c): Remove.
2888 (x32-linux-ipa.o: x32-linux.c): Remove.
2889 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2890 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2891
50cfacb7
SM
28922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2893
2894 * Makefile.in (%.o: ../arch/%.c): New rule.
2895 (arm.o: ../arch/arm.c): Remove.
2896 (arm-linux.o: ../arch/arm-linux.c): Remove.
2897 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2898 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2899
c5a22423
SM
29002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2901
2902 * Makefile.in (%.o: ../nat/%.c): New rule.
2903 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2904 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2905 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2906 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2907 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2908 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2909 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2910 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2911 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2912 (linux-personality.o: ../nat/linux-personality.c): Remove.
2913 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2914 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2915 (x86-linux.o: ../nat/x86-linux.c): Remove.
2916 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2917 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2918
6bda016b
SM
29192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2920
2921 * Makefile.in (%.o: ../common/%.c): New rule.
2922 (signals.o: ../common/signals.c): Remove.
2923 (print-utils.o: ../common/print-utils.c): Remove.
2924 (rsp-low.o: ../common/rsp-low.c): Remove.
2925 (common-utils.o: ../common/common-utils.c): Remove.
2926 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2927 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2928 (vec.o: ../common/vec.c): Remove.
2929 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2930 (xml-utils.o: ../common/xml-utils.c): Remove.
2931 (ptid.o: ../common/ptid.c): Remove.
2932 (buffer.o: ../common/buffer.c): Remove.
2933 (format.o: ../common/format.c): Remove.
2934 (filestuff.o: ../common/filestuff.c): Remove.
2935 (agent.o: ../common/agent.c): Remove.
2936 (errors.o: ../common/errors.c): Remove.
2937 (environ.o: ../common/environ.c): Remove.
2938 (common-debug.o: ../common/common-debug.c): Remove.
2939 (cleanups.o: ../common/cleanups.c): Remove.
2940 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2941 (fileio.o: ../common/fileio.c): Remove.
2942 (common-regcache.o: ../common/common-regcache.c): Remove.
2943 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2944 (new-op.o: ../common/new-op.c): Remove.
2945 (btrace-common.o: ../common/btrace-common.c): Remove.
2946
21122961
SM
29472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2948
2949 * Makefile.in (%.o: ../target/%.c): New rule.
2950 (waitstatus.o: ../target/waitstatus.c): Remove.
2951
c362e621
SM
29522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2953
2954 * Makefile.in
2955 (%.c: ../regformats/%.dat,
2956 (%.c: ../regformats/arm/%.dat,
2957 (%.c: ../regformats/i386/%.dat,
2958 (%.c: ../regformats/rs6000/%.dat): New rules.
2959 (aarch64.c): Remove.
2960 (reg-arm.c): Remove.
2961 (arm-with-iwmmxt.c): Remove.
2962 (arm-with-vfpv2.c): Remove.
2963 (arm-with-vfpv3.c): Remove.
2964 (arm-with-neon.c): Remove.
2965 (reg-bfin.c): Remove.
2966 (reg-cris.c): Remove.
2967 (reg-crisv32.c): Remove.
2968 (i386.c): Remove.
2969 (i386-linux.c): Remove.
2970 (i386-avx.c): Remove.
2971 (i386-avx-linux.c): Remove.
2972 (i386-avx-avx512.c): Remove.
2973 (i386-avx-avx512-linux.c): Remove.
2974 (i386-mpx.c): Remove.
2975 (i386-mpx-linux.c): Remove.
2976 (i386-avx-mpx-avx512-pku.c): Remove.
2977 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2978 (i386-avx-mpx.c): Remove.
2979 (i386-avx-mpx-linux.c): Remove.
2980 (i386-mmx.c): Remove.
2981 (i386-mmx-linux.c): Remove.
2982 (reg-ia64.c): Remove.
2983 (reg-m32r.c): Remove.
2984 (reg-m68k.c): Remove.
2985 (reg-cf.c): Remove.
2986 (mips-linux.c): Remove.
2987 (mips-dsp-linux.c): Remove.
2988 (mips64-linux.c): Remove.
2989 (mips64-dsp-linux.c): Remove.
2990 (nios2-linux.c): Remove.
2991 (powerpc-32.c): Remove.
2992 (powerpc-32l.c): Remove.
2993 (powerpc-altivec32l.c): Remove.
2994 (powerpc-cell32l.c): Remove.
2995 (powerpc-vsx32l.c): Remove.
2996 (powerpc-isa205-32l.c): Remove.
2997 (powerpc-isa205-altivec32l.c): Remove.
2998 (powerpc-isa205-vsx32l.c): Remove.
2999 (powerpc-e500l.c): Remove.
3000 (powerpc-64l.c): Remove.
3001 (powerpc-altivec64l.c): Remove.
3002 (powerpc-cell64l.c): Remove.
3003 (powerpc-vsx64l.c): Remove.
3004 (powerpc-isa205-64l.c): Remove.
3005 (powerpc-isa205-altivec64l.c): Remove.
3006 (powerpc-isa205-vsx64l.c): Remove.
3007 (s390-linux32.c): Remove.
3008 (s390-linux32v1.c): Remove.
3009 (s390-linux32v2.c): Remove.
3010 (s390-linux64.c): Remove.
3011 (s390-linux64v1.c): Remove.
3012 (s390-linux64v2.c): Remove.
3013 (s390-te-linux64.c): Remove.
3014 (s390-vx-linux64.c): Remove.
3015 (s390-tevx-linux64.c): Remove.
3016 (s390x-linux64.c): Remove.
3017 (s390x-linux64v1.c): Remove.
3018 (s390x-linux64v2.c): Remove.
3019 (s390x-te-linux64.c): Remove.
3020 (s390x-vx-linux64.c): Remove.
3021 (s390x-tevx-linux64.c): Remove.
3022 (tic6x-c64xp-linux.c): Remove.
3023 (tic6x-c64x-linux.c): Remove.
3024 (tic6x-c62x-linux.c): Remove.
3025 (reg-sh.c): Remove.
3026 (reg-sparc64.c): Remove.
3027 (reg-spu.c): Remove.
3028 (amd64.c): Remove.
3029 (amd64-linux.c): Remove.
3030 (amd64-avx.c): Remove.
3031 (amd64-avx-linux.c): Remove.
3032 (amd64-avx-avx512.c): Remove.
3033 (amd64-avx-avx512-linux.c): Remove.
3034 (amd64-mpx.c): Remove.
3035 (amd64-mpx-linux.c): Remove.
3036 (amd64-avx-mpx-avx512-pku.c): Remove.
3037 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3038 (amd64-avx-mpx.c): Remove.
3039 (amd64-avx-mpx-linux.c): Remove.
3040 (x32.c): Remove.
3041 (x32-linux.c): Remove.
3042 (x32-avx.c): Remove.
3043 (x32-avx-linux.c): Remove.
3044 (x32-avx-avx512.c): Remove.
3045 (x32-avx-avx512-linux.c): Remove.
3046 (reg-xtensa.c): Remove.
3047 (reg-tilegx.c): Remove.
3048 (reg-tilegx32.c): Remove.
3049
1672e0d9
SDJ
30502017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3051
3052 * Makefile.in (SFILES): Add "common/environ.c".
3053 (OBJS): Add "common/environ.h".
3054
239b6d10
WT
30552017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3056
3057 * configure.ac: Check if the fs_base and gs_base members of
3058 `struct user_regs_struct' exist.
3059 * config.in: Regenerated.
3060 * configure: Likewise.
3061
694b382c
AT
30622017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3063
3064 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3065 target_read_memory.
3066 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3067 (get_next_pcs_syscall_next_pc): Likewise.
3068
7dc53023
LM
30692016-12-23 Luis Machado <lgustavo@codesourcery.com>
3070
3071 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3072 * nto-x86-low.c: Likewise.
3073
ad02e4fe
SM
30742016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3075
3076 * Makefile.in: Include disable-implicit-rules.mk.
3077
dcb07cfa
PA
30782016-11-23 Pedro Alves <palves@redhat.com>
3079
3080 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3081 (debug_vprintf): Use std::chrono::steady_clock instead of
3082 gettimeofday. Use '.' instead of ':'.
3083 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3084 (get_timestamp): Use std::chrono::steady_clock instead of
3085 gettimeofday.
3086
8629c02c
SM
30872016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3088
3089 * Makefile.in: Fix whitespace formatting.
3090
b593ecca
SM
30912016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3092
3093 * Makefile.in (SFILES, OBS): Flatten list and order
3094 alphabetically.
3095
9986ba08
PA
30962016-11-23 Pedro Alves <palves@redhat.com>
3097
3098 * event-loop.c (handle_file_event): Use warning.
3099 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3100 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3101 Use warning.
3102
4eefa7bc
PA
31032016-11-23 Pedro Alves <palves@redhat.com>
3104
3105 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3106 output.
3107 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3108 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3109 debug_printf and debug_flush for debug output.
3110 * server.c (handle_general_set): Likewise.
3111 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3112 output.
3113
5443506e
SM
31142016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3115
3116 * Makefile.in (.c.o): Replace rule with ...
3117 (%.o: %.c): ... this one.
3118
3b165252
SM
31192016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3120
3121 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3122 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3123 make.
3124 * configure.ac: Remove checks for the make program.
3125 * configure: Re-generate.
3126
0bcda685
PA
31272016-10-28 Pedro Alves <palves@redhat.com>
3128
3129 * Makefile.in (CXX_DIALECT): Get from configure.
3130 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3131 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3132 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3133 * config.in: Regenerate.
3134 * configure: Regenerate.
3135
c3805894
YQ
31362016-10-27 Yao Qi <yao.qi@linaro.org>
3137
3138 * linux-low.c (linux_supports_range_stepping): Return true if
3139 can_software_single_step return true.
3140
89342618
YQ
31412016-10-27 Yao Qi <yao.qi@linaro.org>
3142
3143 * inferiors.c (find_inferior_in_random): New function.
3144 * inferiors.h (find_inferior_in_random): Declare.
3145 * linux-low.c (linux_wait_for_event_filtered): Call
3146 find_inferior_in_random instead of find_inferior.
3147
e3652c84
YQ
31482016-10-27 Yao Qi <yao.qi@linaro.org>
3149
3150 * linux-low.c (linux_wait_1): If single-step breakpoints are
3151 inserted, remove them.
3152
5a04c4cf
PA
31532016-10-26 Pedro Alves <palves@redhat.com>
3154
3155 * linux-low.c (handle_extended_wait): Link parent/child fork
3156 threads.
3157 (linux_wait_1): Unlink them.
3158 (linux_set_resume_request): Ignore resume requests for
3159 already-resumed and unhandled fork child threads.
3160 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3161 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3162 New functions.
3163 (handle_v_requests) <vCont>: Don't call require_running.
3164 * server.h (in_queued_stop_replies): New declaration.
3165
cb93dc7f
YQ
31662016-10-24 Yao Qi <yao.qi@linaro.org>
3167
3168 PR server/20733
3169 * linux-aarch64-low.c (append_insns): Cast the return value to
3170 'uint32_t *'.
3171
a1078bea
YQ
31722016-10-10 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3175
1fb77080
SDJ
31762016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3177
3178 * target.c (target_supports_multi_process): New function, moved
3179 from...
3180 * target.h (target_supports_multi_process): ... here. Remove
3181 macro.
3182
39b5a3b9
TT
31832016-10-05 Tom Tromey <tom@tromey.com>
3184
3185 PR remote/20655:
3186 * tracepoint.c (handle_tracepoint_bkpts): Check
3187 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3188
c1d0b70a
YQ
31892016-10-05 Yao Qi <yao.qi@linaro.org>
3190
3191 * configure.srv: Update the path of arm-*.xml files.
3192
0a69eedb
YQ
31932016-10-05 Terry Guo <terry.guo@arm.com>
3194 Yao Qi <yao.qi@linaro.org>
3195
3196 * Makefile.in: Adjust the path of rules.
3197 * configure.srv: Update the path of xml files.
3198 * regformats/arm-with-iwmmxt.dat: Regenerated.
3199 * regformats/arm-with-neon.dat: Likewise.
3200 * regformats/arm-with-vfpv2.dat: Likewise.
3201 * regformats/arm-with-vfpv3.dat Likewise.
3202
17e16485
YQ
32032016-09-30 Yao Qi <yao.qi@linaro.org>
3204
3205 PR gdbserver/20627
3206 * target.c (target_stop_and_wait): Don't call
3207 target_continue_no_signal, use resume_stop instead.
3208
edeeb602
YQ
32092016-09-26 Yao Qi <yao.qi@linaro.org>
3210
3211 * linux-low.c (linux_wait_1): Call debug_exit.
3212
503b1c39
PA
32132016-09-23 Pedro Alves <palves@redhat.com>
3214
3215 * Makefile.in (SFILES): Add common/new-op.c.
3216 (OBS): Add common/new-op.o.
3217 (new-op.o): New rule.
3218
74172ecf
SM
32192016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3220
3221 * .gitinore: Ignore more files.
3222
fc6cda2e
YQ
32232016-09-21 Yao Qi <yao.qi@linaro.org>
3224
3225 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3226 23.
3227
bc1e6c81
SDJ
32282016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3229
3230 * server.c (start_inferior): Call target_mourn_inferior instead of
3231 mourn_inferior; pass ptid_t argument to it.
3232 (resume): Likewise.
3233 (handle_target_event): Likewise.
3234 * target.c (target_mourn_inferior): New function.
3235 * target.h (mourn_inferior): Delete macro.
3236
0e00e962
AA
32372016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3238
3239 * linux-low.c (lwp_is_stepping): New function.
3240
1d8cb77d
CL
32412016-09-06 Carl Love <cel@us.ibm.com>
3242
3243 * server.c (start_inferior): Fixed comment, requested comment change
3244 didn't get updated correctly. Removed reference to ptrace () call as
3245 it is only true on Linux systems.
3246
7313bced
CL
32472016-09-06 Carl Love <cel@us.ibm.com>
3248
3249 * server.c (start_inferior): Do not call
3250 function target_post_create_inferior () if the
3251 inferior process has already exited.
3252
cf6de44d
PA
32532016-09-05 Pedro Alves <palves@redhat.com>
3254
3255 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3256 (COMPILE.pre, CC_LD): Use CXX directly.
3257 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3258 * acinclude.m4: Don't include build-with-cxx.m4.
3259 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3260 * configure: Regenerate.
3261
c1da6748
AT
32622016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3263
3264 PR gdb/19495
3265 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3266 call writing data to own_buf.
3267
f2b9e3df
SDJ
32682016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3269
3270 * target.c (mywait): Call target_wait instead of
3271 the_target->wait.
3272 (target_wait): New function.
3273
049a8570
SDJ
32742016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3275
3276 * server.c (start_inferior): New variable 'ptid'. Replace calls
3277 to the_target->resume by target_continue{,_no_signal}, depending
3278 on the case.
3279 * target.c (target_stop_and_wait): Call target_continue_no_signal
3280 instead of the_target->resume.
3281 (target_continue): New function.
3282
3aa5cfa0
AT
32832016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3284
3285 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3286
754653a7
AZ
32872016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3288
3289 PR server/20491
3290 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3291 ps_prochandle.
3292 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3293 * linux-arm-low.c (ps_get_thread_area): Likewise.
3294 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3295 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3296 * linux-mips-low.c (ps_get_thread_area): Likewise.
3297 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3298 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3299 * linux-x86-low.c (ps_get_thread_area): Likewise.
3300 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3301
ed036b40
PA
33022016-08-19 Pedro Alves <palves@redhat.com>
3303
3304 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3305
c8ef42ee
PA
33062016-08-19 Pedro Alves <palves@redhat.com>
3307
3308 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3309 comment. Use memcpy instead of casting through unsigned long.
3310
9c235a72
PA
33112016-08-19 Pedro Alves <palves@redhat.com>
3312
3313 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3314 allocating around 0x80000000.
3315
201506da
PA
33162016-08-19 Pedro Alves <palves@redhat.com>
3317
3318 PR gdb/20415
3319 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3320 (x32-avx512-linux-ipa.o): New rules.
3321 * configure.ac (x86_64-*-linux*): New x32 check.
3322 * configure.srv (ipa_x32_linux_regobj): New.
3323 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3324 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3325 descriptions.
3326 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3327 descriptions.
3328 * configure: Regenerate.
3329
f348d89a
PA
33302016-08-09 Pedro Alves <palves@redhat.com>
3331
3332 PR gdb/18653
3333 * Makefile.in (OBS): Add signals-state-save-restore.o.
3334 (signals-state-save-restore.o): New rule.
3335 * config.in: Regenerate.
3336 * configure: Regenerate.
3337 * linux-low.c: Include "signals-state-save-restore.h".
3338 (linux_create_inferior): Call
3339 restore_original_signals_state.
3340 * server.c: Include "dispositions-save-restore.h".
3341 (captured_main): Call save_original_signals_state.
3342
1baf5149
PA
33432016-08-05 Pedro Alves <palves@redhat.com>
3344
3345 * configure: Regenerate.
3346
fcd4a73d
YQ
33472016-08-04 Yao Qi <yao.qi@linaro.org>
3348
3349 * linux-low.c (regsets_fetch_inferior_registers): Check
3350 errno is ESRCH or not.
3351
979659d0
YQ
33522016-08-02 Yao Qi <yao.qi@linaro.org>
3353
3354 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3355 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3356 (thread_db_load_search): Update.
3357 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3358 td_ta_set_event and td_ta_event_getmsg.
3359
6598661d
PA
33602016-07-26 Pedro Alves <palves@redhat.com>
3361
3362 PR server/20414
3363 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3364 of unsigned long for 64-bit registers and use uint32_t instead of
3365 unsigned int for 32-bit registers.
3366
9cf12d57
PA
33672016-07-26 Pedro Alves <palves@redhat.com>
3368
3369 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3370 to 'ptrace'.
3371
305450ed
TT
33722016-07-21 Tom Tromey <tom@tromey.com>
3373
3374 * configure: Rebuild.
3375
2583da7c
YQ
33762016-07-21 Yao Qi <yao.qi@linaro.org>
3377
3378 * mem-break.c (find_gdb_breakpoint): Cast bp to
3379 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3380
21536b36
YQ
33812016-07-21 Yao Qi <yao.qi@linaro.org>
3382
3383 * server.c (handle_v_requests): Support s and S actions
3384 if target_supports_software_single_step return true.
3385
8901d193
YQ
33862016-07-21 Yao Qi <yao.qi@linaro.org>
3387
3388 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3389 is resume_step, call maybe_hw_step.
3390 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3391 and unstop them.
3392 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3393 breakpoints or not.
3394 (proceed_one_lwp): If resume request is resume_step, install
3395 reinsert breakpoints and call maybe_hw_step.
3396
0e9a339e
YQ
33972016-07-21 Yao Qi <yao.qi@linaro.org>
3398
3399 * linux-low.c (proceed_one_lwp): Declare.
3400 (linux_resume_one_thread): Remove local variable 'step'.
3401 Lift code enqueue signal. Call proceed_one_lwp instead of
3402 linux_resume_one_lwp.
3403
4281b351
YQ
34042016-07-21 Yao Qi <yao.qi@linaro.org>
3405
3406 * linux-low.c (linux_resume_one_thread): Call
3407 enqueue_pending_signal.
3408
984a2c04
YQ
34092016-07-21 Yao Qi <yao.qi@linaro.org>
3410
3411 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3412 * inferiors.c (do_restore_current_thread_cleanup): New function.
3413 (make_cleanup_restore_current_thread): Likewise.
3414 * linux-low.c (install_software_single_step_breakpoints): Call
3415 make_cleanup_restore_current_thread. Switch current_thread to
3416 thread.
3417
bec903c9
YQ
34182016-07-21 Yao Qi <yao.qi@linaro.org>
3419
3420 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3421 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3422 (clone_one_breakpoint): Likewise.
3423 (delete_reinsert_breakpoints): Change parameter to thread.
3424 Callers updated.
3425 (has_reinsert_breakpoints): Likewise.
3426 (uninsert_reinsert_breakpoints): Likewise.
3427 (reinsert_reinsert_breakpoints): Likewise.
3428 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3429 (delete_reinsert_breakpoints): Likewise.
3430 (reinsert_reinsert_breakpoints): Likewise.
3431 (uninsert_reinsert_breakpoints): Likewise.
3432 (has_reinsert_breakpoints): Likewise.
3433
63c40ec7
YQ
34342016-07-21 Yao Qi <yao.qi@linaro.org>
3435
3436 * inferiors.c (get_thread_process): Make parameter const.
3437 * inferiors.h (get_thread_process): Update declaration.
3438 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3439 Add new parameters child_thread and parent_thread. Callers
3440 updated.
3441 * mem-break.h (clone_all_breakpoints): Update declaration.
3442
9aa76cd0
YQ
34432016-07-21 Yao Qi <yao.qi@linaro.org>
3444
3445 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3446 <command_list, handler>: Remove.
3447 (struct gdb_breakpoint): New.
3448 (struct other_breakpoint): New.
3449 (struct reinsert_breakpoint): New.
3450 (is_gdb_breakpoint): New function.
3451 (any_persistent_commands): Update command_list if
3452 is_gdb_breakpoint returns true.
3453 (set_breakpoint): Create breakpoints according to their types.
3454 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3455 (set_gdb_breakpoint_1): Likewise.
3456 (set_gdb_breakpoint): Likewise.
3457 (clear_breakpoint_conditions): Change parameter type to
3458 'struct gdb_breakpoint *'.
3459 (clear_breakpoint_commands): Likewise.
3460 (clear_breakpoint_conditions_and_commands): Likewise.
3461 (add_condition_to_breakpoint): Likewise.
3462 (add_breakpoint_condition): Likewise.
3463 (add_commands_to_breakpoint): Likewise.
3464 (check_breakpoints): Check other_breakpoint.
3465 (clone_one_breakpoint): Clone breakpopint according to its type.
3466 * mem-break.h (struct gdb_breakpoint): Declare.
3467 (set_gdb_breakpoint): Update declaration.
3468 (clear_breakpoint_conditions_and_commands): Likewise.
3469 (add_breakpoint_condition): Likewise.
3470 (add_breakpoint_commands): Likewise.
3471 * server.c (process_point_options): Change parameter type to
3472 'struct gdb_breakpoint *'.
3473
811f8301
YQ
34742016-07-21 Yao Qi <yao.qi@linaro.org>
3475
3476 * mem-break.c (set_breakpoint_at): Rename it to ...
3477 (set_breakpoint_type_at): ... it.
3478 (set_breakpoint_at): Call set_breakpoint_type_at.
3479 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3480 * mem-break.h (set_breakpoint_at): Update comments.
3481
b1c51e36
CLT
34822016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3483
3484 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3485 to buf parameter.
3486 (nios2_store_gregset): Likewise.
3487
ced2dffb
PA
34882016-07-01 Pedro Alves <palves@redhat.com>
3489 Antoine Tremblay <antoine.tremblay@ericsson.com>
3490
3491 * linux-low.c: Change interface to take the target lwp_info
3492 pointer directly and return void. Handle detaching from a zombie
3493 thread.
3494 (linux_detach_lwp_callback): New function.
3495 (linux_detach): Detach from the leader thread after detaching from
3496 the clone threads.
3497
2ac09a5b
YQ
34982016-06-28 Yao Qi <yao.qi@linaro.org>
3499
3500 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3501 for variable new_offset.
3502 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3503 (aarch64_ftrace_insn_reloc_cb): Likewise.
3504 (aarch64_ftrace_insn_reloc_tb): Likewise.
3505 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3506 PRIx64 instead of PRIx32.
3507
79e7fd4f
YQ
35082016-06-28 Yao Qi <yao.qi@linaro.org>
3509
3510 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3511 (the_low_target): Install arm_get_syscall_trapinfo.
3512
061fc021
YQ
35132016-06-28 Yao Qi <yao.qi@linaro.org>
3514
3515 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3516 function.
3517 (the_low_target): Install aarch64_get_syscall_trapinfo.
3518
4cc32bec
YQ
35192016-06-28 Yao Qi <yao.qi@linaro.org>
3520
3521 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3522 Callers updated.
3523 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3524 Remove parameter sysno.
3525 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3526 sysret.
3527
782c1122
AA
35282016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3529
3530 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3531 (s390_emit_ne_goto): Likewise.
3532 (s390_emit_lt_goto): Likewise.
3533 (s390_emit_le_goto): Likewise.
3534 (s390_emit_gt_goto): Likewise.
3535 (s390_emit_ge_goto): Likewise.
3536 (s390x_emit_eq_goto): Likewise.
3537 (s390x_emit_ne_goto): Likewise.
3538 (s390x_emit_lt_goto): Likewise.
3539 (s390x_emit_le_goto): Likewise.
3540 (s390x_emit_gt_goto): Likewise.
3541 (s390x_emit_ge_goto): Likewise.
3542 (s390_emit_ops_impl): Mark variable static.
3543 (s390x_emit_ops): Likewise.
3544
2e7b624b
YQ
35452016-06-17 Yao Qi <yao.qi@linaro.org>
3546
3547 * linux-low.c (handle_extended_wait): Call
3548 uninsert_reinsert_breakpoints for the parent process. Remove
3549 reinsert breakpoints from the child process. Reinsert them to
3550 the parent process when vfork is done.
3551 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3552 (reinsert_reinsert_breakpoints): New function.
3553 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3554 (reinsert_reinsert_breakpoints): Declare.
3555
8a81c5d7
YQ
35562016-06-17 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-low.c (handle_extended_wait): If the parent is doing
3559 step-over, remove the reinsert breakpoints from the forked child.
3560
f50bf8e5
YQ
35612016-06-17 Yao Qi <yao.qi@linaro.org>
3562
3563 * linux-low.c (unsuspend_all_lwps): Declare.
3564 (linux_low_filter_event): If thread exited, call finish_step_over.
3565 If step-over is finished, unsuspend other threads.
3566
8376a3cb
YQ
35672016-06-17 Yao Qi <yao.qi@linaro.org>
3568
3569 * linux-low.c (linux_resume_one_lwp_throw): Assert
3570 has_reinsert_breakpoints returns false.
3571 * mem-break.c (delete_disabled_breakpoints): Assert
3572 bp type isn't reinsert_breakpoint.
3573
f79b145d
YQ
35742016-06-17 Yao Qi <yao.qi@linaro.org>
3575
3576 * linux-low.c (maybe_hw_step): New function.
3577 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3578 (finish_step_over): Switch current_thread to lwp temporarily,
3579 and assert has_reinsert_breakpoints returns true.
3580 (proceed_one_lwp): Call maybe_hw_step.
3581 * mem-break.c (has_reinsert_breakpoints): New function.
3582 * mem-break.h (has_reinsert_breakpoints): Declare.
3583
0ae534d2
JT
35842016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3585
3586 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3587
fcdad592
YQ
35882016-05-17 Yao Qi <yao.qi@linaro.org>
3589
3590 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3591 instead of find_inferior.
3592
9e784964
YQ
35932016-05-05 Yao Qi <yao.qi@linaro.org>
3594
3595 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3596 Initialize res to zero.
3597
cf2ebb6e
YQ
35982016-05-05 Yao Qi <yao.qi@linaro.org>
3599
3600 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3601 to uint32_t.
3602
c1aebf87
UW
36032016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3604
3605 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3606 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3607 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3608
35fd2deb 36092016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3610 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3611
3612 * tracepoint.c (write_inferior_int8): New function.
3613 (cmd_qtenable_disable): Write enable flag using
3614 write_inferior_int8.
3615
484b3c32
YQ
36162016-04-25 Yao Qi <yao.qi@linaro.org>
3617
3618 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3619 (need_step_over_p): Return zero if the LWP has pending signals
3620 can be delivered on software single step target.
3621
85ba7d86
YQ
36222016-04-25 Yao Qi <yao.qi@linaro.org>
3623
3624 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3625 return instead of error.
3626
3539aa13
YQ
36272016-04-22 Yao Qi <yao.qi@linaro.org>
3628
3629 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3630 to 23.
3631
5b061e98
YQ
36322016-04-22 Yao Qi <yao.qi@linaro.org>
3633
3634 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3635 signal when stepping over breakpoint with software single
3636 step.
3637
3451269c
PA
36382016-04-21 Pedro Alves <palves@redhat.com>
3639
3640 * linux-s390-low.c (s390_collect_ptrace_register)
3641 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3642 add casts.
3643 (s390_check_regset): Use void * instead of gdb_byte *.
3644
a2358508
PA
36452016-04-20 Pedro Alves <palves@redhat.com>
3646
3647 * configure: Renegerate.
3648
6885166d
YQ
36492016-04-20 Yao Qi <yao.qi@linaro.org>
3650
3651 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3652 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3653 number 16.
3654 (arm_store_gregset): Likewise.
3655
2b863f51
WT
36562016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3657
3658 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3659 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3660 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3661 (amd64-avx-mpx-linux.c): New rules.
3662 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3663 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3664 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3665 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3666 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3667 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3668 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3669 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3670 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3671 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3672 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3673 * linux-x86-low.c (x86_linux_read_description): Add case for
3674 X86_XSTATE_AVX_MPX_MASK.
3675 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3676 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3677 init_registers_i386_avx_mpx_linux.
3678 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3679 (initialize_low_tracepoint): Call
3680 init_registers_i386_avx_mpx_linux.
3681 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3682 (initialize_low_tracepoint): Call
3683 init_registers_amd64_avx_mpx_linux.
3684 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3685 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3686 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3687 declarations.
3688
9b30624b
PA
36892016-04-18 Pedro Alves <palves@redhat.com>
3690
3691 * configure: Regenerate.
3692
45e3745e
AT
36932016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3694
3695 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3696 (aarch64_emit_sub): Likewise.
3697
2afc13ff
PA
36982016-04-12 Pedro Alves <palves@redhat.com>
3699
3700 * utils.c (prepare_to_throw_exception): Delete.
3701
6e774b13
SM
37022016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3703
3704 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3705
4dca19f8
MK
37062016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3707
3708 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3709
d0a9981f
MK
37102016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3711
3712 * linux-aarch64-ipa.c: Add <elf.h> include.
3713 * linux-ppc-ipa.c: Add <elf.h> include.
3714 * linux-s390-ipa.c: Add <elf.h> include.
3715
252db07e
MK
37162016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3717
3718 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3719 (get_raw_reg_ptr): Likewise.
3720 (get_trace_state_variable_value_ptr): Likewise.
3721 (set_trace_state_variable_value_ptr): Likewise.
3722 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3723 char *.
3724
14e2b6d9
MK
37252016-03-31 Wei-cheng Wang <cole945@gmail.com>
3726 Marcin Kościelnicki <koriakin@0x04.net>
3727
3728 PR/17221
3729 * linux-ppc-low.c (emit_insns): New function.
3730 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3731 (ppc_emit_prologue): New function.
3732 (ppc_emit_epilogue): New function.
3733 (ppc_emit_add): New function.
3734 (ppc_emit_sub): New function.
3735 (ppc_emit_mul): New function.
3736 (ppc_emit_lsh): New function.
3737 (ppc_emit_rsh_signed): New function.
3738 (ppc_emit_rsh_unsigned): New function.
3739 (ppc_emit_ext): New function.
3740 (ppc_emit_zero_ext): New function.
3741 (ppc_emit_log_not): New function.
3742 (ppc_emit_bit_and): New function.
3743 (ppc_emit_bit_or): New function.
3744 (ppc_emit_bit_xor): New function.
3745 (ppc_emit_bit_not): New function.
3746 (ppc_emit_equal): New function.
3747 (ppc_emit_less_signed): New function.
3748 (ppc_emit_less_unsigned): New function.
3749 (ppc_emit_ref): New function.
3750 (ppc_emit_const): New function.
3751 (ppc_emit_reg): New function.
3752 (ppc_emit_pop): New function.
3753 (ppc_emit_stack_flush): New function.
3754 (ppc_emit_swap): New function.
3755 (ppc_emit_stack_adjust): New function.
3756 (ppc_emit_call): New function.
3757 (ppc_emit_int_call_1): New function.
3758 (ppc_emit_void_call_2): New function.
3759 (ppc_emit_if_goto): New function.
3760 (ppc_emit_goto): New function.
3761 (ppc_emit_eq_goto): New function.
3762 (ppc_emit_ne_goto): New function.
3763 (ppc_emit_lt_goto): New function.
3764 (ppc_emit_le_goto): New function.
3765 (ppc_emit_gt_goto): New function.
3766 (ppc_emit_ge_goto): New function.
3767 (ppc_write_goto_address): New function.
3768 (ppc_emit_ops_impl): New static variable.
3769 (ppc64v1_emit_prologue): New function.
3770 (ppc64v2_emit_prologue): New function.
3771 (ppc64_emit_epilogue): New function.
3772 (ppc64_emit_add): New function.
3773 (ppc64_emit_sub): New function.
3774 (ppc64_emit_mul): New function.
3775 (ppc64_emit_lsh): New function.
3776 (ppc64_emit_rsh_signed): New function.
3777 (ppc64_emit_rsh_unsigned): New function.
3778 (ppc64_emit_ext): New function.
3779 (ppc64_emit_zero_ext): New function.
3780 (ppc64_emit_log_not): New function.
3781 (ppc64_emit_bit_and): New function.
3782 (ppc64_emit_bit_or): New function.
3783 (ppc64_emit_bit_xor): New function.
3784 (ppc64_emit_bit_not): New function.
3785 (ppc64_emit_equal): New function.
3786 (ppc64_emit_less_signed): New function.
3787 (ppc64_emit_less_unsigned): New function.
3788 (ppc64_emit_ref): New function.
3789 (ppc64_emit_const): New function.
3790 (ppc64v1_emit_reg): New function.
3791 (ppc64v2_emit_reg): New function.
3792 (ppc64_emit_pop): New function.
3793 (ppc64_emit_stack_flush): New function.
3794 (ppc64_emit_swap): New function.
3795 (ppc64v1_emit_call): New function.
3796 (ppc64v2_emit_call): New function.
3797 (ppc64v1_emit_int_call_1): New function.
3798 (ppc64v2_emit_int_call_1): New function.
3799 (ppc64v1_emit_void_call_2): New function.
3800 (ppc64v2_emit_void_call_2): New function.
3801 (ppc64_emit_if_goto): New function.
3802 (ppc64_emit_eq_goto): New function.
3803 (ppc64_emit_ne_goto): New function.
3804 (ppc64_emit_lt_goto): New function.
3805 (ppc64_emit_le_goto): New function.
3806 (ppc64_emit_gt_goto): New function.
3807 (ppc64_emit_ge_goto): New function.
3808 (ppc64v1_emit_ops_impl): New static variable.
3809 (ppc64v2_emit_ops_impl): New static variable.
3810 (ppc_emit_ops): New function.
3811 (linux_low_target): Wire in ppc_emit_ops.
3812
a2174ba4
MK
38132016-03-31 Wei-cheng Wang <cole945@gmail.com>
3814 Marcin Kościelnicki <koriakin@0x04.net>
3815
3816 PR/17221
3817 * Makefile.in: Add powerpc-*-ipa.o
3818 * configure.srv: Add ipa_obj for powerpc*-linux.
3819 * linux-ppc-ipa.c: New file.
3820 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3821 includes.
3822 (PPC_FIELD): New macro.
3823 (PPC_SEXT): New macro.
3824 (PPC_OP6): New macro.
3825 (PPC_BO): New macro.
3826 (PPC_LI): New macro.
3827 (PPC_BD): New macro.
3828 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3829 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3830 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3831 (ppc_get_thread_area): New function.
3832 (is_elfv2_inferior): New function.
3833 (gen_ds_form): New function.
3834 (GEN_STD): New macro.
3835 (GEN_STDU): New macro.
3836 (GEN_LD): New macro.
3837 (GEN_LDU): New macro.
3838 (gen_d_form): New function.
3839 (GEN_ADDI): New macro.
3840 (GEN_ADDIS): New macro.
3841 (GEN_LI): New macro.
3842 (GEN_LIS): New macro.
3843 (GEN_ORI): New macro.
3844 (GEN_ORIS): New macro.
3845 (GEN_LWZ): New macro.
3846 (GEN_STW): New macro.
3847 (GEN_STWU): New macro.
3848 (gen_xfx_form): New function.
3849 (GEN_MFSPR): New macro.
3850 (GEN_MTSPR): New macro.
3851 (GEN_MFCR): New macro.
3852 (GEN_MTCR): New macro.
3853 (GEN_SYNC): New macro.
3854 (GEN_LWSYNC): New macro.
3855 (gen_x_form): New function.
3856 (GEN_OR): New macro.
3857 (GEN_MR): New macro.
3858 (GEN_LWARX): New macro.
3859 (GEN_STWCX): New macro.
3860 (GEN_CMPW): New macro.
3861 (gen_md_form): New function.
3862 (GEN_RLDICL): New macro.
3863 (GEN_RLDICR): New macro.
3864 (gen_i_form): New function.
3865 (GEN_B): New macro.
3866 (GEN_BL): New macro.
3867 (gen_b_form): New function.
3868 (GEN_BNE): New macro.
3869 (GEN_LOAD): New macro.
3870 (GEN_STORE): New macro.
3871 (gen_limm): New function.
3872 (gen_atomic_xchg): New function.
3873 (gen_call): New function.
3874 (ppc_relocate_instruction): New function.
3875 (ppc_install_fast_tracepoint_jump_pad): New function.
3876 (ppc_get_min_fast_tracepoint_insn_len): New function.
3877 (ppc_get_ipa_tdesc_idx): New function.
3878 (the_low_target): Wire in the new functions.
3879 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3880 tdescs.
3881 * linux-ppc-tdesc.h: New file.
3882
a13c4696
MK
38832016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3884
3885 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3886 (alloc_jump_pad_buffer): New function.
3887 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3888 (alloc_jump_pad_buffer): New function.
3889 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3890 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3891 (alloc_jump_pad_buffer): New function.
3892 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3893 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3894 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3895 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3896
1cda1512
MK
38972016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3898
3899 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3900 * linux-amd64-ipa.c: Likewise.
3901 * linux-i386-ipa.c: Likewise.
3902 * linux-s390-ipa.c: Likewise.
3903 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3904 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3905 set_trace_state_variable_value_ptr.
3906 (struct ipa_sym_addresses): Likewise.
3907 (symbol_list): Likewise.
3908 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3909 accessing gdb_collect directly.
3910 (gdb_collect_ptr_type): New typedef.
3911 (get_raw_reg_ptr_type): New typedef.
3912 (get_trace_state_variable_value_ptr_type): New typedef.
3913 (set_trace_state_variable_value_ptr_type): New typedef.
3914 (gdb_collect_ptr): New global.
3915 (get_raw_reg_ptr): New global.
3916 (get_trace_state_variable_value_ptr): New global.
3917 (set_trace_state_variable_value_ptr): New global.
3918 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3919 accessing get_raw_reg directly.
3920 (get_get_tsv_func_addr): Likewise for
3921 get_trace_state_variable_value_ptr.
3922 (get_set_tsv_func_addr): Likewise for
3923 set_trace_state_variable_value_ptr.
3924 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3925
72fb5488
SM
39262016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3927
3928 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3929
28170b88
MK
39302016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3931
3932 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3933 packets.
3934 (relocate_instruction): Remove own_buf.
3935 * server.c (own_buf): Make global.
3936 (handle_v_requests): Make global.
3937 * server.h (own_buf): New declaration.
3938 (handle_v_requests): New prototype.
3939
f39e8743
MK
39402016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3941
3942 PR 18377
3943 * linux-s390-low.c (add_insns): New function.
3944 (s390_emit_prologue): New function.
3945 (s390_emit_epilogue): New function.
3946 (s390_emit_add): New function.
3947 (s390_emit_sub): New function.
3948 (s390_emit_mul): New function.
3949 (s390_emit_lsh): New function.
3950 (s390_emit_rsh_signed): New function.
3951 (s390_emit_rsh_unsigned): New function.
3952 (s390_emit_ext): New function.
3953 (s390_emit_log_not): New function.
3954 (s390_emit_bit_and): New function.
3955 (s390_emit_bit_or): New function.
3956 (s390_emit_bit_xor): New function.
3957 (s390_emit_bit_not): New function.
3958 (s390_emit_equal): New function.
3959 (s390_emit_less_signed): New function.
3960 (s390_emit_less_unsigned): New function.
3961 (s390_emit_ref): New function.
3962 (s390_emit_if_goto): New function.
3963 (s390_emit_goto): New function.
3964 (s390_write_goto_address): New function.
3965 (s390_emit_litpool): New function.
3966 (s390_emit_const): New function.
3967 (s390_emit_call): New function.
3968 (s390_emit_reg): New function.
3969 (s390_emit_pop): New function.
3970 (s390_emit_stack_flush): New function.
3971 (s390_emit_zero_ext): New function.
3972 (s390_emit_swap): New function.
3973 (s390_emit_stack_adjust): New function.
3974 (s390_emit_set_r2): New function.
3975 (s390_emit_int_call_1): New function.
3976 (s390_emit_void_call_2): New function.
3977 (s390_emit_eq_goto): New function.
3978 (s390_emit_ne_goto): New function.
3979 (s390_emit_lt_goto): New function.
3980 (s390_emit_le_goto): New function.
3981 (s390_emit_gt_goto): New function.
3982 (s390_emit_ge_goto): New function.
3983 (s390x_emit_prologue): New function.
3984 (s390x_emit_epilogue): New function.
3985 (s390x_emit_add): New function.
3986 (s390x_emit_sub): New function.
3987 (s390x_emit_mul): New function.
3988 (s390x_emit_lsh): New function.
3989 (s390x_emit_rsh_signed): New function.
3990 (s390x_emit_rsh_unsigned): New function.
3991 (s390x_emit_ext): New function.
3992 (s390x_emit_log_not): New function.
3993 (s390x_emit_bit_and): New function.
3994 (s390x_emit_bit_or): New function.
3995 (s390x_emit_bit_xor): New function.
3996 (s390x_emit_bit_not): New function.
3997 (s390x_emit_equal): New function.
3998 (s390x_emit_less_signed): New function.
3999 (s390x_emit_less_unsigned): New function.
4000 (s390x_emit_ref): New function.
4001 (s390x_emit_if_goto): New function.
4002 (s390x_emit_const): New function.
4003 (s390x_emit_call): New function.
4004 (s390x_emit_reg): New function.
4005 (s390x_emit_pop): New function.
4006 (s390x_emit_stack_flush): New function.
4007 (s390x_emit_zero_ext): New function.
4008 (s390x_emit_swap): New function.
4009 (s390x_emit_stack_adjust): New function.
4010 (s390x_emit_int_call_1): New function.
4011 (s390x_emit_void_call_2): New function.
4012 (s390x_emit_eq_goto): New function.
4013 (s390x_emit_ne_goto): New function.
4014 (s390x_emit_lt_goto): New function.
4015 (s390x_emit_le_goto): New function.
4016 (s390x_emit_gt_goto): New function.
4017 (s390x_emit_ge_goto): New function.
4018 (s390_emit_ops): New function.
4019 (struct linux_target_ops): Fill in emit_ops hook.
4020
abd9baf9
MK
40212016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4022
4023 PR 18377
4024 * Makefile.in: Add s390 IPA files.
4025 * configure.srv: Build IPA for s390.
4026 * linux-s390-ipa.c: New file.
4027 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4028 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4029 (tdesc_s390_linux32): Likewise.
4030 (init_registers_s390_linux32v1): Likewise.
4031 (tdesc_s390_linux32v1): Likewise.
4032 (init_registers_s390_linux32v2): Likewise.
4033 (tdesc_s390_linux32v2): Likewise.
4034 (init_registers_s390_linux64): Likewise.
4035 (tdesc_s390_linux64): Likewise.
4036 (init_registers_s390_linux64v1): Likewise.
4037 (tdesc_s390_linux64v1): Likewise.
4038 (init_registers_s390_linux64v2): Likewise.
4039 (tdesc_s390_linux64v2): Likewise.
4040 (init_registers_s390_te_linux64): Likewise.
4041 (tdesc_s390_te_linux64): Likewise.
4042 (init_registers_s390_vx_linux64): Likewise.
4043 (tdesc_s390_vx_linux64): Likewise.
4044 (init_registers_s390_tevx_linux64): Likewise.
4045 (tdesc_s390_tevx_linux64): Likewise.
4046 (init_registers_s390x_linux64): Likewise.
4047 (tdesc_s390x_linux64): Likewise.
4048 (init_registers_s390x_linux64v1): Likewise.
4049 (tdesc_s390x_linux64v1): Likewise.
4050 (init_registers_s390x_linux64v2): Likewise.
4051 (tdesc_s390x_linux64v2): Likewise.
4052 (init_registers_s390x_te_linux64): Likewise.
4053 (tdesc_s390x_te_linux64): Likewise.
4054 (init_registers_s390x_vx_linux64): Likewise.
4055 (tdesc_s390x_vx_linux64): Likewise.
4056 (init_registers_s390x_tevx_linux64): Likewise.
4057 (tdesc_s390x_tevx_linux64): Likewise.
4058 (have_hwcap_s390_vx): New static variable.
4059 (s390_arch_setup): Fill have_hwcap_s390_vx.
4060 (s390_get_thread_area): New function.
4061 (s390_ft_entry_gpr_esa): New const.
4062 (s390_ft_entry_gpr_zarch): New const.
4063 (s390_ft_entry_misc): New const.
4064 (s390_ft_entry_fr): New const.
4065 (s390_ft_entry_vr): New const.
4066 (s390_ft_main_31): New const.
4067 (s390_ft_main_64): New const.
4068 (s390_ft_exit_fr): New const.
4069 (s390_ft_exit_vr): New const.
4070 (s390_ft_exit_misc): New const.
4071 (s390_ft_exit_gpr_esa): New const.
4072 (s390_ft_exit_gpr_zarch): New const.
4073 (append_insns): New function.
4074 (s390_relocate_instruction): New function.
4075 (s390_install_fast_tracepoint_jump_pad): New function.
4076 (s390_get_min_fast_tracepoint_insn_len): New function.
4077 (s390_get_ipa_tdesc_idx): New function.
4078 (struct linux_target_ops): Wire in the above functions.
4079 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4080 * linux-s390-tdesc.h: New file.
4081
a4105d04
MK
40822016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4083
4084 * linux-s390-low.c (s390_supports_tracepoints): New function.
4085 (struct linux_target_ops): Fill supports_tracepoints hook.
4086
35ac8b3e
YQ
40872016-03-18 Yao Qi <yao.qi@linaro.org>
4088
4089 * linux-low.c (lwp_signal_can_be_delivered): New function.
4090 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4091
94610ec4
YQ
40922016-03-18 Yao Qi <yao.qi@linaro.org>
4093
4094 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4095 0 if signal is enqueued. Remove 'signal' from one debugging
4096 message. Move one debugging message to some lines below.
4097 Remove code setting 'signal' to 0.
4098
80aea927
YQ
40992016-03-18 Yao Qi <yao.qi@linaro.org>
4100
4101 * linux-low.c (linux_low_filter_event): Remove redundant
4102 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4103
b04fd3be
MK
41042016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4105
4106 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4107 (struct linux_target_ops): Wire in the above.
4108
c40c8d4b
YQ
41092016-03-03 Yao Qi <yao.qi@linaro.org>
4110
4111 * linux-low.c: Update comments to start_step_over.
4112
0f8288ae
YQ
41132016-03-03 Yao Qi <yao.qi@linaro.org>
4114
4115 PR server/19736
4116 * linux-low.c (handle_extended_wait): Set child suspended
4117 if event_lwp->bp_reinsert isn't zero.
4118
fdbd04a8
YQ
41192016-03-02 Yao Qi <yao.qi@linaro.org>
4120
4121 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4122 enqueue_pending_signal.
4123
6896a8fa
MK
41242016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4125
4126 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4127 is actually loaded.
4128
ab503087
MK
41292016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4130
4131 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4132 (s390_regmap_3264) [!__s390x__]: New global.
4133 (s390_collect_ptrace_register): Skip map entries containing -1.
4134 (s390_supply_ptrace_register): Ditto.
4135 (s390_fill_gprs_high): New function.
4136 (s390_store_gprs_high): New function.
4137 (s390_regsets): Add NT_S390_HIGH_GPRS.
4138 (s390_get_hwcap): Enable on 31-bit.
4139 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4140 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4141 Detect NT_S390_HIGH_GPRS.
4142 (s390_usrregs_info_3264): Enable on 31-bit.
4143 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4144 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4145
ae91f625
MK
41462016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4147
4148 PR gdb/13808
4149 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4150 * configure.srv: Ditto.
4151 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4152 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4153 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4154 (init_registers_amd64_linux): Remove prototype.
4155 (tdesc_amd64_linux): Remove declaration.
4156 (get_ipa_tdesc): New function.
4157 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4158 initialize remaining tdescs.
4159 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4160 (init_registers_i386_linux): Remove prototype.
4161 (tdesc_i386_linux): Remove declaration.
4162 (get_ipa_tdesc): New function.
4163 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4164 initialize remaining tdescs.
4165 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4166 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4167 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4168 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4169 (x86_get_ipa_tdesc_idx): New function.
4170 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4171 * linux-x86-tdesc.h: New file.
4172 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4173 (target_get_ipa_tdesc_idx): New macro.
4174 * tracepoint.c (ipa_tdesc_idx): New macro.
4175 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4176 (symbol_list): Add ipa_tdesc_idx.
4177 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4178 (ipa_tdesc): Remove.
4179 (ipa_tdesc_idx): New variable.
4180 (get_context_regcache): Use get_ipa_tdesc.
4181 (gdb_collect): Ditto.
4182 (gdb_probe): Ditto.
4183 * tracepoint.h (get_ipa_tdesc): New prototype.
4184 (ipa_tdesc): Remove.
4185
e7ad2f14
PA
41862016-02-24 Pedro Alves <palves@redhat.com>
4187
4188 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4189 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4190 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4191 Factor out common code between the USE_SIGTRAP_SIGINFO and
4192 !USE_SIGTRAP_SIGINFO blocks.
4193 (linux_low_filter_event): Call save_stop_reason instead of
4194 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4195 Update comments.
4196 (linux_wait_1): Update comments.
4197
657f9cde
WW
41982016-02-24 Wei-cheng Wang <cole945@gmail.com>
4199
4200 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4201 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4202 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4203 ppc_insert_point, ppc_remove_point.
4204
b00b61e1
MK
42052016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4206
4207 * linux-s390-low.c (s390_supports_z_point_type): New function.
4208 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4209
553cb527
YQ
42102016-02-16 Yao Qi <yao.qi@linaro.org>
4211
4212 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4213 PC. Get pc from regcache_read_pc.
4214
a5652c21
YQ
42152016-02-12 Yao Qi <yao.qi@linaro.org>
4216
4217 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4218 or linux_get_pc_32bit.
4219 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4220
ed443b61
YQ
42212016-02-12 Yao Qi <yao.qi@linaro.org>
4222
4223 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4224 arm_linux_get_next_pcs_fixup.
4225
020ecd38
MK
42262016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4227
4228 * tracepoint.c (x_tracepoint_action_download): Change
4229 write_inferior_data_ptr to write_inferior_data_pointer.
4230 (cmd_qtstart): Likewise.
4231 (write_inferior_data_ptr): Remove.
4232 (download_agent_expr): Change write_inferior_data_ptr to
4233 write_inferior_data_pointer.
4234 (download_tracepoint_1): Likewise.
4235 (download_tracepoint): Likewise.
4236 (download_trace_state_variables): Likewise.
4237
7cae9051
WW
42382016-02-11 Wei-cheng Wang <cole945@gmail.com>
4239 Marcin Kościelnicki <koriakin@0x04.net>
4240
4241 * tracepoint.c (struct tracepoint_action_ops): Remove.
4242 (struct tracepoint_action): Remove ops.
4243 (m_tracepoint_action_download, r_tracepoint_action_download)
4244 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4245 size and offset accordingly.
4246 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4247 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4248 (tracepoint_action_send, tracepoint_action_download): New functions.
4249 Helpers for trace action handlers.
4250 (add_tracepoint_action): Remove setup actions ops.
4251 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4252
9f6a71b4
YQ
42532016-02-10 Yao Qi <yao.qi@linaro.org>
4254
4255 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4256
1e94266c
SM
42572016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4258
4259 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4260 to AC_OUTPUT.
4261 * configure: Regenerate.
4262
8adce034
SM
42632016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4264
4265 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4266 void * to gdb_byte *.
4267 * linux-low.c (siginfo_fixup): Likewise.
4268 (linux_xfer_siginfo): Likewise.
4269 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4270 Likewise.
4271 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4272
93813b37
WT
42732016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4274
4275 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4276 to srv_tgtobj.
4277 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4278 to srv_tgtobj.
4279 * linux-x86-low.c [__x86_64__]: Include
4280 "nat/amd64-linux-siginfo.h".
4281 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4282 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4283 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4284 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4285 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4286 (cpt_si_fd, si_timerid, si_overrun): Move from
4287 nat/amd64-linux-siginfo.c.
4288 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4289
8424cc97
SM
42902016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4291
4292 * server.c (skip_to_semicolon): Remove.
4293 (process_point_options): Use strchrnul instead of
4294 skip_to_semicolon.
4295
4d18591b
YQ
42962016-01-26 Yao Qi <yao.qi@linaro.org>
4297
4298 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4299 * linux-low.c (install_software_single_step_breakpoints): Don't
4300 call regcache_read_pc.
4301 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4302 argument pc.
4303
d8020970
YQ
43042016-01-26 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-low.c (install_software_single_step_breakpoints): Call
4307 regcache_read_pc instead of get_pc.
4308
8b207339
YQ
43092016-01-26 Yao Qi <yao.qi@linaro.org>
4310
4311 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4312 (unblock_async_io): Rename to ...
4313 (block_unblock_async_io): ... it. New function.
4314 (enable_async_io): Don't install SIGIO handler. Unblock it
4315 instead.
4316 (disable_async_io): Don't ignore SIGIO. Block it instead.
4317 (initialize_async_io): Install SIGIO handler. Don't call
4318 unblock_async_io.
4319
18879fef
YQ
43202016-01-26 Yao Qi <yao.qi@linaro.org>
4321
4322 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4323 first character is '\003', call *the_target->request_interrupt.
4324
a0f8e08a
YQ
43252016-01-25 Yao Qi <yao.qi@linaro.org>
4326
4327 * remote-utils.c (new_thread_notify): Remove.
4328 (dead_thread_notify): Likewise.
4329 * remote-utils.h (new_thread_notify): Remove declaration.
4330 (dead_thread_notify): Likewise.
4331
cc5fd9ab
MK
43322016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4333
4334 * gdb.trace/pending.exp: Fix expected message on continue.
4335
99e8eb11
MK
43362016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4337
4338 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4339 it works properly on big-endian machines where sizeof (CORE_ADDR)
4340 != sizeof (void *).
4341
a994041d
PA
43422016-01-21 Pedro Alves <palves@redhat.com>
4343
4344 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4345 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4346 * configure: Regenerate.
4347
f7a6a40d
YQ
43482016-01-21 Yao Qi <yao.qi@linaro.org>
4349
4350 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4351 is_thumb and set it according to CPSR saved on the stack.
4352 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4353 arm_sigreturn_next_pc.
4354
6f69e520
YQ
43552016-01-18 Yao Qi <yao.qi@linaro.org>
4356
4357 * linux-low.c (linux_set_pc_64bit): New function.
4358 (linux_get_pc_64bit): New function.
4359 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4360 Declare.
4361 * linux-sparc-low.c (debug_threads): Remove declaration.
4362 (sparc_get_pc): Remove.
4363 (the_low_target): Use linux_get_pc_64bit instead of
4364 sparc_get_pc.
4365 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4366 (the_low_target): Use linux_get_pc_64bit and
4367 linux_set_pc_64bit.
4368
276d4552
YQ
43692016-01-18 Yao Qi <yao.qi@linaro.org>
4370
4371 * linux-arm-low.c (debug_threads): Remove declaration.
4372 (arm_get_pc, arm_set_pc): Remove.
4373 (the_low_target): Use linux_get_pc_32bit and
4374 linux_set_pc_32bit.
4375 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4376 (the_low_target): Use linux_get_pc_32bit and
4377 linux_set_pc_32bit.
4378 * linux-cris-low.c (debug_threads): Remove declaration.
4379 (cris_get_pc, cris_set_pc,): Remove.
4380 (the_low_target): Use linux_get_pc_32bit and
4381 linux_set_pc_32bit.
4382 * linux-crisv32-low.c (debug_threads): Remove declaration.
4383 (cris_get_pc, cris_set_pc): Remove.
4384 (the_low_target): Use linux_get_pc_32bit and
4385 linux_set_pc_32bit.
4386 * linux-low.c: Include inttypes.h.
4387 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4388 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4389 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4390 (the_low_target): Use linux_get_pc_32bit and
4391 linux_set_pc_32bit.
4392 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4393 (the_low_target): Use linux_get_pc_32bit and
4394 linux_set_pc_32bit.
4395 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4396 (the_low_target): Use linux_get_pc_32bit and
4397 linux_set_pc_32bit.
4398 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4399 (the_low_target): Use linux_get_pc_32bit and
4400 linux_set_pc_32bit.
4401 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4402 (the_low_target): Use linux_get_pc_32bit and
4403 linux_set_pc_32bit.
4404
eb0edac8
GB
44052016-01-18 Gary Benson <gbenson@redhat.com>
4406
4407 * configure.ac (AC_FUNC_FORK): New check.
4408 * config.in: Regenerate.
4409 * configure: Likewise.
4410
1b451dda
YQ
44112016-01-14 Yao Qi <yao.qi@linaro.org>
4412
4413 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4414 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4415 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4416 arm_get_next_pcs_ctor.
4417
82075af2
JS
44182016-01-12 Josh Stone <jistone@redhat.com>
4419 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4420
4421 * inferiors.h: Include "gdb_vecs.h".
4422 (struct process_info): Add syscalls_to_catch.
4423 * inferiors.c (remove_process): Free syscalls_to_catch.
4424 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4425 syscall_return stops.
4426 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4427 * server.c (handle_general_set): Handle QCatchSyscalls.
4428 (handle_query): Report support for QCatchSyscalls.
4429 * target.h (struct target_ops): Add supports_catch_syscall.
4430 (target_supports_catch_syscall): New macro.
4431 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4432 (struct lwp_info): Add syscall_state.
4433 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4434 Maintain syscall_state and syscalls_to_catch across exec.
4435 (get_syscall_trapinfo): New function, proxy to the_low_target.
4436 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4437 (linux_low_filter_event): Toggle syscall_state entry/return for
4438 syscall traps, and set it ignored for all others.
4439 (gdb_catching_syscalls_p): New function.
4440 (gdb_catch_this_syscall_p): New function.
4441 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4442 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4443 (linux_supports_catch_syscall): New function.
4444 (linux_target_ops): Install it.
4445 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4446 (the_low_target): Install it.
4447
8f13a3ce
MF
44482016-01-12 Mike Frysinger <vapier@gentoo.org>
4449
4450 * acinclude.m4: Include new ../warning.m4 file.
4451 * configure: Regenerated.
4452 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4453
5b3da067
MF
44542016-01-12 Mike Frysinger <vapier@gentoo.org>
4455
4456 * ax.c (is_goto_target): Mark static.
4457 * linux-low.c (register_addr): Likewise.
4458 (linux_fetch_registers, linux_store_registers): Likewise.
4459 * mem-break.c (any_persistent_commands): Fix old prototype.
4460 (add_commands_to_breakpoint): Mark static.
4461 * regcache.c (find_register_by_name): Delete unused func.
4462 * remote-utils.c (hex_or_minus_one): Mark static.
4463 * server.c (monitor_show_help): Mark static.
4464 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4465 handle_v_requests): Likewise.
4466
bc504a31
PA
44672016-01-12 Pedro Alves <palves@redhat.com>
4468
4469 Remove use of the registered trademark symbol throughout.
4470
5a0dd67a
YQ
44712016-01-08 Yao Qi <yao.qi@linaro.org>
4472
4473 * remote-utils.c (getpkt): If c is '\003', call target hook
4474 request_interrupt.
4475
b2ca446f
YQ
44762016-01-06 Yao Qi <yao.qi@linaro.org>
4477
4478 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4479 linux-aarch32-low.c.
4480 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4481 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4482 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4483 (thumb2_breakpoint): Declare.
4484 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4485 linux-aarch32-low.h.
4486 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4487 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4488 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4489
edd88788
JB
44902016-01-01 Joel Brobecker <brobecker@adacore.com>
4491
4492 * gdbreplay.c (gdbreplay_version): Change copyright year in
4493 version message.
4494 * server.c (gdbserver_version): Likewise.
4495
65da7f14
PP
44962015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4497
4498 * server.c (crc32_table): Delete.
4499 (crc32): Use libiberty's xcrc32 function.
4500
4abd5ed2
JB
45012015-12-22 Joel Brobecker <brobecker@adacore.com>
4502
4503 * lynx-low.c (lynx_delete_thread_callback): New function.
4504 (lynx_mourn): Properly delete our process and all of its
4505 threads. Remove call to clear_inferiors.
4506
0e50fe5c
JB
45072015-12-22 Joel Brobecker <brobecker@adacore.com>
4508
4509 * target.c (thread_search_callback): Add check that
4510 the thread_stopped target callback is not NULL before
4511 calling it.
4512
35adc03f
YQ
45132015-12-21 Yao Qi <yao.qi@linaro.org>
4514
4515 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4516 arm breakpoint.
4517
bd2b2909
AT
45182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4519
4520 * server.c (handle_query): Call target_supports_software_single_step.
4521
7fe5e27e
AT
45222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4523
4524 * linux-low.c (single_step): New function.
4525 (linux_resume_one_lwp_throw): Call single_step.
4526 (start_step_over): Likewise.
4527
d9311bfa
AT
45282015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4529
4530 * Makefile.in (SFILES): Append arch/arm-linux.c,
4531 arch/arm-get-next-pcs.c.
4532 (arm-linux.o): New rule.
4533 (arm-get-next-pcs.o): New rule.
4534 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4535 arm-linux.o.
4536 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4537 to linux-aarch32-low.c.
4538 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4539 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4540 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4541 (thumb2_breakpoint_len): Likewise.
4542 (arm_is_thumb_mode): Make non-static.
4543 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4544 from linux-aarch32-low.c.
4545 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4546 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4547 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4548 (thumb2_breakpoint_len): Likewise.
4549 (arm_is_thumb_mode): New declaration.
4550 * linux-arm-low.c: Include arch/arm-linux.h
4551 aarch/arm-get-next-pcs.h, sys/syscall.h.
4552 (get_next_pcs_ops): New struct.
4553 (get_next_pcs_addr_bits_remove): New function.
4554 (get_next_pcs_is_thumb): New function.
4555 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4556 (arm_sigreturn_next_pc): Likewise.
4557 (get_next_pcs_syscall_next_pc): Likewise.
4558 (arm_gdbserver_get_next_pcs): Likewise.
4559 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4560 Initialize.
4561 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4562 * server.h: Include gdb_vecs.h.
4563
68ce2059
AT
45642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4565
4566 * Makefile.in (SFILES): Append common/common-regcache.c.
4567 (OBS): Append common-regcache.o.
4568 (common-regcache.o): New rule.
4569 * regcache.c (init_register_cache): Initialize cache to
4570 REG_UNAVAILABLE.
4571 (regcache_raw_read_unsigned): New function.
4572 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4573 register_status enum.
4574
fa5308bd
AT
45752015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4576
4577 * linux-aarch64-low.c (the_low_targets): Rename
4578 breakpoint_reinsert_addr to get_next_pcs.
4579 * linux-arm-low.c (the_low_targets): Likewise.
4580 * linux-bfin-low.c (the_low_targets): Likewise.
4581 * linux-cris-low.c (the_low_targets): Likewise.
4582 * linux-crisv32-low.c (the_low_targets): Likewise.
4583 * linux-low.c (can_software_single_step): Likewise.
4584 (install_software_single_step_breakpoints): New function.
4585 (start_step_over): Use install_software_single_step_breakpoints.
4586 * linux-low.h: New CORE_ADDR vector.
4587 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4588 get_next_pcs.
4589 * linux-mips-low.c (the_low_targets): Likewise.
4590 * linux-nios2-low.c (the_low_targets): Likewise.
4591 * linux-sparc-low.c (the_low_targets): Likewise.
4592
4a6ed09b
PA
45932015-12-17 Pedro Alves <palves@redhat.com>
4594
4595 * linux-low.c (linux_kill_one_lwp): Remove references to
4596 LinuxThreads.
4597 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4598 to 'kill'.
4599 (linux_init_signals): Delete.
4600 (initialize_low): Adjust.
4601 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4602
7544db95
PA
46032015-12-16 Pedro Alves <palves@redhat.com>
4604
4605 * configure.ac (compiler warning flags): When testing a
4606 -Wno-foo option, check whether -Wfoo works instead.
4607 * configure: Regenerate.
4608
8020350c
DB
46092015-12-11 Don Breazeal <donb@codesourcery.com>
4610
4611 * server.c (process_serial_event): Don't exit from gdbserver
4612 in remote mode if there are still active inferiors.
4613
db91f502
YQ
46142015-12-11 Yao Qi <yao.qi@linaro.org>
4615
4616 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4617 arm_breakpoint_at if the process is 32-bit.
4618
b37a6290
YQ
46192015-12-11 Yao Qi <yao.qi@linaro.org>
4620
4621 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4622 arm breakpoint.
4623
17b1509a
YQ
46242015-12-07 Yao Qi <yao.qi@linaro.org>
4625
4626 * configure.srv: Append arm.o to srv_tgtobj for
4627 aarch64*-*-linux* target.
4628 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4629 from linux-arm-low.c.
4630 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4631 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4632 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4633 (thumb2_breakpoint_len): Likewise.
4634 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4635 (arm_breakpoint_kinds): Likewise.
4636 (arm_breakpoint_kind_from_pc): Likewise.
4637 (arm_sw_breakpoint_from_kind): Likewise.
4638 (arm_breakpoint_kind_from_current_state): Likewise.
4639 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4640 (arm_sw_breakpoint_from_kind): Declare.
4641 (arm_breakpoint_kind_from_current_state): Declare.
4642 (arm_breakpoint_at): Declare.
4643 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4644 arm_sw_breakpoint_from_kind if process is 32-bit.
4645 (aarch64_breakpoint_kind_from_pc): New function.
4646 (aarch64_breakpoint_kind_from_current_state): New function.
4647 (the_low_target): Initialize fields breakpoint_kind_from_pc
4648 and breakpoint_kind_from_current_state.
4649 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4650 linux-aarch32-low.c.
4651 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4652 (arm_breakpoint, arm_breakpoint_len): Likewise.
4653 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4654 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4655 (arm_is_thumb_mode): Likewise.
4656 (arm_breakpoint_at): Likewise.
4657 (arm_breakpoint_kind_from_pc): Likewise.
4658 (arm_sw_breakpoint_from_kind): Likewise.
4659 (arm_breakpoint_kind_from_current_state): Likewise.
4660
4661 Revert:
4662 2015-08-04 Yao Qi <yao.qi@linaro.org>
4663
4664 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4665 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4666 * server.c (extended_protocol): Remove "static".
4667 * server.h (extended_protocol): Declare it.
4668
ece66d65
JS
46692015-12-04 Josh Stone <jistone@redhat.com>
4670
4671 * target.h (struct target_ops) <arch_setup>: Rename to ...
4672 (struct target_ops) <post_create_inferior>: ... this.
4673 (target_arch_setup): Rename to ...
4674 (target_post_create_inferior): ... this, calling post_create_inferior.
4675 * server.c (start_inferior): Update target_arch_setup calls to
4676 target_post_create_inferior.
4677 * linux-low.c (linux_low_ptrace_options): Forward declare.
4678 (linux_arch_setup): Update its comment for general use.
4679 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4680 (struct linux_target_ops): Use linux_post_create_inferior.
4681 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4682 to post_create_inferior.
4683 * nto-low.c (struct nto_target_ops): Likewise.
4684 * spu-low.c (struct spu_target_ops): Likewise.
4685 * win32-low.c (struct win32_target_ops): Likewise.
4686
e58c48b4
AT
46872015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4688
4689 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4690
fbec8956
AT
46912015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4692
4693 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4694 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4695 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4696 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4697 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4698 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4699 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4700 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4701 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4702 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4703 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4704 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4705
9b4c5f87
AT
47062015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4707
4708 * linux-low.c (linux_look_up_symbols): Don't call
4709 linux_supports_traceclone.
4710 * linux-low.h (thread_db_init): Remove use_events argument.
4711 * thread-db.c (thread_db_use_event): Remove global variable.
4712 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4713 (struct thread_db) <td_create_bp>: Remove field.
4714 (thread_db_create_event): Remove function.
4715 (thread_db_enable_reporting): Likewise.
4716 (find_one_thread): Don't check for thread_db_use_events.
4717 (attach_thread): Likewise.
4718 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4719 (try_thread_db_load_1): Don't check for thread_db_use_events.
4720 (thread_db_init): Remove use_events argument and thread events
4721 handling.
4722 (remove_thread_event_breakpoints): Remove function.
4723 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4724
7d00775e
AT
47252015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4726
4727 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4728 New function.
4729 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4730 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4731 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4732 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4733 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4734 Initialize.
4735 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4736 New function.
4737 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4738 * linux-low.c (can_hardware_single_step): Use
4739 supports_hardware_single_step.
4740 (can_software_single_step): New function.
4741 (start_step_over): Call can_software_single_step.
4742 (linux_supports_hardware_single_step): New function.
4743 (struct target_ops) <supports_software_single_step>: Initialize.
4744 * linux-low.h (struct linux_target_ops)
4745 <supports_hardware_single_step>: Initialize.
4746 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4747 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4748 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4749 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4750 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4751 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4752 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4753 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4754 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4755 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4756 Initialize.
4757 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4758 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4759 Initialize.
4760 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4761 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4762 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4763 New function.
4764 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4765 * target.h (struct target_ops): <supports_software_single_step>:
4766 New field.
4767 (target_supports_software_single_step): New macro.
4768
2d97cd35
AT
47692015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4770
4771 * linux-low.c (linux_wait_1): Fix pc advance condition.
4772 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4773 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4774
769ef81f
AT
47752015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4776
4777 * linux-arm-low.c (arm_is_thumb_mode): New function.
4778 (arm_breakpoint_at): Use arm_is_thumb_mode.
4779 (arm_breakpoint_kind_from_current_state): New function.
4780 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4781 Initialize.
4782 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4783 (linux_breakpoint_kind_from_current_state): New function.
4784 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4785 * linux-low.h (struct linux_target_ops)
4786 <breakpoint_kind_from_current_state>: New field.
4787 * target.h (struct target_ops): Likewise.
4788 (target_breakpoint_kind_from_current_state): New macro.
4789
1bebeeca
PA
47902015-11-30 Pedro Alves <palves@redhat.com>
4791
4792 * linux-low.c (linux_resume): Wake up the event loop before
4793 returning.
4794
a67a9fae
PA
47952015-11-30 Pedro Alves <palves@redhat.com>
4796
4797 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4798 check.
4799 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4800 to -1.
4801 * target.c (struct thread_search): New structure.
4802 (thread_search_callback): New function.
4803 (prev_general_thread): New global.
4804 (prepare_to_access_memory, done_accessing_memory): New functions.
4805 * target.h (prepare_to_access_memory, done_accessing_memory):
4806 Replace macros with function declarations.
4807
f2faf941
PA
48082015-11-30 Pedro Alves <palves@redhat.com>
4809
4810 PR 14618
4811 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4812 report TARGET_WAITKIND_NO_RESUMED.
4813 * remote-utils.c (prepare_resume_reply): Handle
4814 TARGET_WAITKIND_NO_RESUMED.
4815 * server.c (report_no_resumed): New global.
4816 (handle_query) <qSupported>: Handle "no-resumed+". Report
4817 "no-resumed+" support.
4818 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4819 return error if the client doesn't support no-resumed events.
4820 (push_stop_notification): New function.
4821 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4822 events if the client supports them.
4823
a681f9c9
PA
48242015-11-30 Pedro Alves <palves@redhat.com>
4825
4826 * linux-low.c (thread_still_has_status_pending_p): Don't check
4827 vCont;t here.
4828 (lwp_resumed): New function.
4829 (status_pending_p_callback): Return early if the LWP is not
4830 supposed to be resumed.
4831
65706a29
PA
48322015-11-30 Pedro Alves <palves@redhat.com>
4833
4834 * linux-low.c (handle_extended_wait): Assert that the LWP's
4835 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4836 thread create events, leave the new child's status pending.
4837 (linux_low_filter_event): If GDB wants to hear about thread exit
4838 events, leave the LWP marked dead and don't delete it.
4839 (linux_wait_for_event_filtered): Don't check for thread exit.
4840 (filter_exit_event): New function.
4841 (linux_wait_1): Use it, when returning an exit event.
4842 (linux_resume_one_lwp_throw): Assert that the LWP's
4843 waitstatus is TARGET_WAITKIND_IGNORE.
4844 * remote-utils.c (prepare_resume_reply): Handle
4845 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4846 * server.c (report_thread_events): New global.
4847 (handle_general_set): Handle QThreadEvents.
4848 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4849 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4850 TARGET_WAITKIND_THREAD_EXITED.
4851 * server.h (report_thread_events): Declare.
4852
56cf4bed
PA
48532015-11-30 Pedro Alves <palves@redhat.com>
4854
4855 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4856 the thread's last_resume_kind was resume_stop.
4857
500c1d85
PA
48582015-11-30 Pedro Alves <palves@redhat.com>
4859
4860 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4861 before returning.
4862
de979965
PA
48632015-11-30 Pedro Alves <palves@redhat.com>
4864
4865 * server.c (handle_v_requests): Handle vCtrlC.
4866
34c65914
PA
48672015-11-30 Pedro Alves <palves@redhat.com>
4868
4869 * gdbthread.h (find_any_thread_of_pid): Declare.
4870 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4871 functions.
4872 * server.c (handle_query): If current_thread is NULL, look for
4873 another thread of the selected process.
4874
79efa585 48752015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4876 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4877
4878 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4879 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4880 name in reply.
4881 * target.h (struct target_ops) <thread_name>: New field.
4882 (target_thread_name): New macro.
4883
80d82c19
JB
48842015-11-23 Joel Brobecker <brobecker@adacore.com>
4885
4886 * regcache.h (regcache_invalidate_pid): Add declaration.
4887 * regcache.c (regcache_invalidate_pid): New function, extracted
4888 from regcache_invalidate.
4889 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4890 Add trivial documentation comment.
4891 * lynx-low.c: Use regcache_invalidate_pid instead of
4892 regcache_invalidate.
4893
64da5dd5
JB
48942015-11-23 Joel Brobecker <brobecker@adacore.com>
4895
4896 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4897 and Elf64_auxv_t if the target is Android.
4898
37ce4055
DE
48992015-11-22 Doug Evans <xdje42@gmail.com>
4900
4901 * target.h: #include <sys/types.h>.
4902
06e03fff
PA
49032015-11-19 Pedro Alves <palves@redhat.com>
4904
4905 * linux-low.c (linux_process_qsupported): Change prototype.
4906 Adjust.
4907 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4908 Change prototype.
4909 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4910 and adjust to loop over all features.
4911 * server.c (handle_query) <qSupported>: Adjust to call
4912 target_process_qsupported once, passing it a vector of unprocessed
4913 features.
4914 * target.h (struct target_ops) <process_qsupported>: Change
4915 prototype.
4916 (target_process_qsupported): Adjust.
4917
9a084706
PA
49182015-11-19 Pedro Alves <palves@redhat.com>
4919
4920 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4921 mode.
4922 * configure: Regenerate.
4923
dad44a1f
PA
49242015-11-19 Pedro Alves <palves@redhat.com>
4925
4926 * configure: Regenerate.
4927
231c0592
YQ
49282015-11-19 Yao Qi <yao.qi@linaro.org>
4929
4930 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4931 type to uint32_t.
4932
6c1c9a8b
YQ
49332015-11-19 Yao Qi <yao.qi@linaro.org>
4934
4935 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4936 (struct aarch64_operand): Move enum out.
4937
9caa3311
YQ
49382015-11-19 Yao Qi <yao.qi@linaro.org>
4939
4940 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4941 struct user_fpsimd_state *.
4942 (aarch64_store_fpregset): Likewise.
4943
6a69a054
YQ
49442015-11-19 Yao Qi <yao.qi@linaro.org>
4945
4946 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4947 struct user_pt_regs *.
4948 (aarch64_store_gregset): Likewise.
4949
1798301e
PA
49502015-11-18 Pedro Alves <palves@redhat.com>
4951
4952 * Makefile.in (all_object_files): Add $IPA_OBJS.
4953
ce7715e2
PA
49542015-11-17 Pedro Alves <palves@redhat.com>
4955
4956 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4957 GDB_SIGNAL_0 and gdb_signal_to_string.
4958
c0879059
PA
49592015-11-17 Pedro Alves <palves@redhat.com>
4960
4961 * win32-low.c (handle_output_debug_string): Remove parameter.
4962 (win32_kill): Remove our_status local and adjust call to
4963 handle_output_debug_string.
4964 (get_child_debug_event): Adjust call to
4965 handle_output_debug_string.
4966
1996e237
SM
49672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4968
4969 * linux-mips-low.c (mips_fill_gregset): Add cast.
4970 (mips_store_gregset): Likewise.
4971 (mips_fill_fpregset): Likewise.
4972 (mips_store_fpregset): Likewise.
4973
cbec665b
SM
49742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4975
4976 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4977 priv.
4978
eb3e3c67
SM
49792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4980
4981 * linux-mips-low.c (mips_linux_new_thread): Change type of
4982 watch_type to enum target_hw_bp_type.
4983
171de4b8
SM
49842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4985
4986 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4987 Change return type to arm_hwbp_type.
4988
04248ead
SM
49892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4990
4991 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4992 (arm_store_gregset): Likewise.
4993 * linux-arm-low.c (arm_get_hwcap): Likewise.
4994 (arm_read_description): Likewise.
4995
04b3479c
SM
49962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4997
4998 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4999
2bc84e8a
SM
50002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5001
5002 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5003 (ppc_fill_vsxregset): Likewise.
5004 (ppc_store_vsxregset): Likewise.
5005 (ppc_fill_vrregset): Likewise.
5006 (ppc_store_vrregset): Likewise.
5007 (ppc_fill_evrregset): Likewise.
5008 (ppc_store_evrregset): Likewise.
5009
e6c5bb05
SM
50102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5011
5012 * linux-ppc-low.c (ppc_usrregs_info): Remove
5013 forward-declaration.
5014 (ppc_arch_setup): Move lower in file.
5015
7ea45d72
SM
50162015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5017
5018 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5019 (ps_pdwrite): Likewise.
5020
69291610
HW
50212015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5022
5023 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5024 to after assert checks.
5025
b42945fd
SM
50262015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5027
5028 * proc-service.c (ps_pdread): Add/adjust casts.
5029 (ps_pdwrite): Add/adjust casts.
5030
d6f85c84
SM
50312015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5032
5033 * server.c (handle_search_memory_1): Cast return value of
5034 memmem.
5035
f98cd059
SM
50362015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5037
5038 * server.c (write_qxfer_response): Change type of data to
5039 gdb_byte *.
5040
d2412fa5
PA
50412015-10-29 Pedro Alves <palves@redhat.com>
5042
5043 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5044
c17414a2
PA
50452015-10-29 Pedro Alves <palves@redhat.com>
5046
5047 * tracepoint.c (clear_installed_tracepoints): Add casts.
5048
e053fbc4
PA
50492015-10-29 Pedro Alves <palves@redhat.com>
5050
5051 * server.c (handle_v_cont, process_serial_event): Add enum
5052 gdb_signal casts to signal parsing code.
5053
add67df8
PA
50542015-10-29 Pedro Alves <palves@redhat.com>
5055
5056 * linux-low.h (NULL_REGSET): Define.
5057 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5058 * linux-arm-low.c (arm_regsets): Likewise.
5059 * linux-crisv32-low.c (cris_regsets): Likewise.
5060 * linux-m68k-low.c (m68k_regsets): Likewise.
5061 * linux-mips-low.c (mips_regsets): Likewise.
5062 * linux-nios2-low.c (nios2_regsets): Likewise.
5063 * linux-ppc-low.c (ppc_regsets): Likewise.
5064 * linux-s390-low.c (s390_regsets): Likewise.
5065 * linux-sh-low.c (sh_regsets): Likewise.
5066 * linux-sparc-low.c (sparc_regsets): Likewise.
5067 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5068 * linux-tile-low.c (tile_regsets): Likewise.
5069 * linux-x86-low.c (x86_regsets): Likewise.
5070 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5071
50bc912a
PA
50722015-10-29 Pedro Alves <palves@redhat.com>
5073
5074 * linux-low.h (NULL_REGSET): Define.
5075 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5076 * linux-arm-low.c (arm_regsets): Likewise.
5077 * linux-crisv32-low.c (cris_regsets): Likewise.
5078 * linux-m68k-low.c (m68k_regsets): Likewise.
5079 * linux-mips-low.c (mips_regsets): Likewise.
5080 * linux-nios2-low.c (nios2_regsets): Likewise.
5081 * linux-ppc-low.c (ppc_regsets): Likewise.
5082 * linux-s390-low.c (s390_regsets): Likewise.
5083 * linux-sh-low.c (sh_regsets): Likewise.
5084 * linux-sparc-low.c (sparc_regsets): Likewise.
5085 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5086 * linux-tile-low.c (tile_regsets): Likewise.
5087 * linux-x86-low.c (x86_regsets): Likewise.
5088 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5089
682b2546
DE
50902015-10-26 Doug Evans <dje@google.com>
5091
5092 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5093
963843d4
DE
50942015-10-26 Doug Evans <dje@google.com>
5095
5096 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5097
d41401ac
DE
50982015-10-26 Doug Evans <dje@google.com>
5099
5100 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5101 for debug_printf.
5102 (attach_thread, find_new_threads_callback): Ditto.
5103
3db28855
AT
51042015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5105
5106 * mem-break.h (set_breakpoint_data): Remove.
5107
fb78e89c
AT
51082015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5109
5110 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5111 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5112 (initialize_low): Remove set_breakpoint_data call.
5113 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5114 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5115 (initialize_low): Remove set_breakpoint_data call.
5116 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5117 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5118 (initialize_low): Remove set_breakpoint_data call.
5119
2e6ee069
AT
51202015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5121
5122 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5123 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5124 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5125 * target.h (target_breakpoint_kind_from_pc): New macro.
5126
1652a986
AT
51272015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5128
5129 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5130 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5131 the default breakpoint kind.
5132
abeead09
AT
51332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5134
5135 * linux-arm-low.c (arm_supports_z_point_type): Add software
5136 breakpoint support.
5137
b0b4b501
AT
51382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5139
5140 * linux-arm-low.c: Refactor breakpoint definitions.
5141 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5142 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5143
8689682c
AT
51442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5145
5146 * Makefile.in: Add arm.c/o.
5147 * configure.srv: Likewise.
5148 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5149 (arm_breakpoint_kind_from_pc): New function.
5150 (arm_sw_breakpoint_from_kind): Return proper kind.
5151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5152
27165294
AT
51532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5154
5155 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5156 removal.
5157 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5158 (struct raw_breakpoint) <size>: Remove.
5159 (struct raw_breakpoint) <kind>: Add.
5160 (bp_size): New function.
5161 (bp_opcode): Likewise.
5162 (find_raw_breakpoint_at): Adjust for kind.
5163 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5164 (remove_memory_breakpoint): Adjust for kind call bp_size.
5165 (set_raw_breakpoint_at): Adjust for kind.
5166 (set_breakpoint): Likewise.
5167 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5168 (delete_raw_breakpoint): Adjust for kind.
5169 (delete_breakpoint): Likewise.
5170 (find_gdb_breakpoint): Likewise.
5171 (set_gdb_breakpoint_1): Likewise.
5172 (set_gdb_breakpoint): Likewise.
5173 (delete_gdb_breakpoint_1): Likewise.
5174 (delete_gdb_breakpoint): Likewise.
5175 (uninsert_raw_breakpoint): Likewise.
5176 (reinsert_raw_breakpoint): Likewise.
5177 (set_breakpoint_data): Remove.
5178 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5179 (check_mem_read): Adjust for kind call bp_size.
5180 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5181 (clone_one_breakpoint): Adjust for kind.
5182 * mem-break.h (set_gdb_breakpoint): Likewise.
5183 (delete_gdb_breakpoint): Likewise.
5184 * server.c (process_serial_event): Likewise.
5185
dd373349
AT
51862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5187
5188 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5189 (struct linux_target_ops) <breakpoint>: Remove.
5190 (struct linux_target_ops) <breakpoint_len>: Remove.
5191 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5192 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5193 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5194 (arm_sw_breakpoint_from_kind): New function.
5195 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5196 (struct linux_target_ops) <breakpoint>: Remove.
5197 (struct linux_target_ops) <breakpoint_len>: Remove.
5198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5199 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5200 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5201 (struct linux_target_ops) <breakpoint>: Remove.
5202 (struct linux_target_ops) <breakpoint_len>: Remove.
5203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5205 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5206 (struct linux_target_ops) <breakpoint>: Remove.
5207 (struct linux_target_ops) <breakpoint_len>: Remove.
5208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5210 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5211 and sw_breakpoint_from_kind to increment the pc.
5212 (linux_breakpoint_kind_from_pc): New function.
5213 (linux_sw_breakpoint_from_kind): New function.
5214 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5215 (initialize_low): Call breakpoint_kind_from_pc and
5216 sw_breakpoint_from_kind to replace breakpoint_data/len.
5217 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5218 New field.
5219 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5220 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5221 (struct linux_target_ops) <breakpoint>: Remove.
5222 (struct linux_target_ops) <breakpoint_len>: Remove.
5223 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5225 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5226 (struct linux_target_ops) <breakpoint>: Remove.
5227 (struct linux_target_ops) <breakpoint_len>: Remove.
5228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5230 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5231 (struct linux_target_ops) <breakpoint>: Remove.
5232 (struct linux_target_ops) <breakpoint_len>: Remove.
5233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5235 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5236 (struct linux_target_ops) <breakpoint>: Remove.
5237 (struct linux_target_ops) <breakpoint_len>: Remove.
5238 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5239 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5240 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5241 (struct linux_target_ops) <breakpoint>: Remove.
5242 (struct linux_target_ops) <breakpoint_len>: Remove.
5243 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5244 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5245 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5246 (struct linux_target_ops) <breakpoint>: Remove.
5247 (struct linux_target_ops) <breakpoint_len>: Remove.
5248 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5249 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5250 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5251 (struct linux_target_ops) <breakpoint>: Remove.
5252 (struct linux_target_ops) <breakpoint_len>: Remove.
5253 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5254 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5255 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5256 (struct linux_target_ops) <breakpoint>: Remove.
5257 (struct linux_target_ops) <breakpoint_len>: Remove.
5258 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5259 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5260 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5261 (struct linux_target_ops) <breakpoint>: Remove.
5262 (struct linux_target_ops) <breakpoint_len>: Remove.
5263 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5264 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5265 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5266 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5267 (struct linux_target_ops) <breakpoint>: Remove.
5268 (struct linux_target_ops) <breakpoint_len>: Remove.
5269 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5270 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5271 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5272 (struct linux_target_ops) <breakpoint>: Remove.
5273 (struct linux_target_ops) <breakpoint_len>: Remove.
5274 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5275 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5276
4cd98a19
AT
52772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5278
5279 * linux-cris-low.c (cris_get_pc): Remove void arg.
5280
774ee6d2
AR
52812015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5282
5283 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5284 variable name.
5285
833dcd29
AR
52862015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5287
5288 * inferiors.c (thread_pid_matches_callback): New function.
5289 (find_thread_process): New function.
5290 (remove_thread): Reset current_thread.
5291 (remove_process): Assert threads have been removed first.
5292
8d689ee5
YQ
52932015-10-15 Yao Qi <yao.qi@linaro.org>
5294
5295 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5296 if it is 3.
5297 (aarch64_remove_point): Likewise.
5298 * regcache.c (regcache_register_size): New function.
5299
1c2e1515
YQ
53002015-10-12 Yao Qi <yao.qi@linaro.org>
5301
5302 * linux-aarch64-low.c: Update all callers as emit_load_store
5303 is renamed to aarch64_emit_load_store.
5304
e1c587c3
YQ
53052015-10-12 Yao Qi <yao.qi@linaro.org>
5306
5307 * linux-aarch64-low.c: Update all callers of function renaming
5308 from emit_insn to aarch64_emit_insn.
5309
b6542f81
YQ
53102015-10-12 Yao Qi <yao.qi@linaro.org>
5311
5312 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5313 arch/aarch64-insn.h.
5314 (struct aarch64_memory_operand): Likewise.
5315 (ENCODE): Likewise.
5316 (emit_insn): Move to arch/aarch64-insn.c.
5317 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5318 (emit_load_store): Move to arch/aarch64-insn.c.
5319 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5320 (can_encode_int32): Remove.
5321
246994ce
YQ
53222015-10-12 Yao Qi <yao.qi@linaro.org>
5323
5324 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5325 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5326 (aarch64_relocate_instruction): Likewise.
5327 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5328 (struct aarch64_insn_visitor): Likewise.
5329
0badd99f
YQ
53302015-10-12 Yao Qi <yao.qi@linaro.org>
5331
5332 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5333 (struct aarch64_insn_visitor): New.
5334 (struct aarch64_insn_relocation_data): New.
5335 (aarch64_ftrace_insn_reloc_b): New function.
5336 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5337 (aarch64_ftrace_insn_reloc_cb): Likewise.
5338 (aarch64_ftrace_insn_reloc_tb): Likewise.
5339 (aarch64_ftrace_insn_reloc_adr): Likewise.
5340 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5341 (aarch64_ftrace_insn_reloc_others): Likewise.
5342 (visitor): New.
5343 (aarch64_relocate_instruction): Use visitor.
5344
dfaffe9d
YQ
53452015-10-12 Yao Qi <yao.qi@linaro.org>
5346
5347 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5348 int. Add argument buf.
5349 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5350 aarch64_relocate_instruction.
5351
70b439f0
YQ
53522015-10-12 Yao Qi <yao.qi@linaro.org>
5353
5354 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5355 argument insn. Remove local variable insn. Don't call
5356 target_read_uint32.
5357 (aarch64_install_fast_tracepoint_jump_pad): Call
5358 target_read_uint32.
5359
7781c06f
YQ
53602015-09-30 Yao Qi <yao.qi@linaro.org>
5361
5362 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5363 (emit_load_store_pair): Likewise.
5364
9a3c8263
SM
53652015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5366
5367 * dll.c (match_dll): Add cast(s).
5368 (unloaded_dll): Likewise.
5369 * linux-low.c (second_thread_of_pid_p): Likewise.
5370 (delete_lwp_callback): Likewise.
5371 (count_events_callback): Likewise.
5372 (select_event_lwp_callback): Likewise.
5373 (linux_set_resume_request): Likewise.
5374 * server.c (accumulate_file_name_length): Likewise.
5375 (emit_dll_description): Likewise.
5376 (handle_qxfer_threads_worker): Likewise.
5377 (visit_actioned_threads): Likewise.
5378 * thread-db.c (any_thread_of): Likewise.
5379 * tracepoint.c (same_process_p): Likewise.
5380 (match_blocktype): Likewise.
5381 (build_traceframe_info_xml): Likewise.
5382
224c3ddb
SM
53832015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5384
5385 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5386 assignment.
5387 (gdb_unparse_agent_expr): Likewise.
5388 * hostio.c (require_data): Likewise.
5389 (handle_pread): Likewise.
5390 * linux-low.c (disable_regset): Likewise.
5391 (fetch_register): Likewise.
5392 (store_register): Likewise.
5393 (get_dynamic): Likewise.
5394 (linux_qxfer_libraries_svr4): Likewise.
5395 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5396 (set_fast_tracepoint_jump): Likewise.
5397 (uninsert_fast_tracepoint_jumps_at): Likewise.
5398 (reinsert_fast_tracepoint_jumps_at): Likewise.
5399 (validate_inserted_breakpoint): Likewise.
5400 (clone_agent_expr): Likewise.
5401 * regcache.c (init_register_cache): Likewise.
5402 * remote-utils.c (putpkt_binary_1): Likewise.
5403 (decode_M_packet): Likewise.
5404 (decode_X_packet): Likewise.
5405 (look_up_one_symbol): Likewise.
5406 (relocate_instruction): Likewise.
5407 (monitor_output): Likewise.
5408 * server.c (handle_search_memory): Likewise.
5409 (handle_qxfer_exec_file): Likewise.
5410 (handle_qxfer_libraries): Likewise.
5411 (handle_qxfer): Likewise.
5412 (handle_query): Likewise.
5413 (handle_v_cont): Likewise.
5414 (handle_v_run): Likewise.
5415 (captured_main): Likewise.
5416 * target.c (write_inferior_memory): Likewise.
5417 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5418 * tracepoint.c (init_trace_buffer): Likewise.
5419 (add_tracepoint_action): Likewise.
5420 (add_traceframe): Likewise.
5421 (add_traceframe_block): Likewise.
5422 (cmd_qtdpsrc): Likewise.
5423 (cmd_qtdv): Likewise.
5424 (cmd_qtstatus): Likewise.
5425 (response_source): Likewise.
5426 (response_tsv): Likewise.
5427 (cmd_qtnotes): Likewise.
5428 (gdb_collect): Likewise.
5429 (initialize_tracepoint): Likewise.
5430
afbe19f8
PL
54312015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5432
5433 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5434 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5435 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5436 <NOP>: New.
5437 (enum aarch64_condition_codes): New enum.
5438 (w0): New static global.
5439 (fp): Likewise.
5440 (lr): Likewise.
5441 (struct aarch64_memory_operand) <type>: New
5442 MEMORY_OPERAND_POSTINDEX type.
5443 (postindex_memory_operand): New helper function.
5444 (emit_ret): New function.
5445 (emit_load_store_pair): New function, factored out of emit_stp
5446 with support for MEMORY_OPERAND_POSTINDEX.
5447 (emit_stp): Rewrite using emit_load_store_pair.
5448 (emit_ldp): New function.
5449 (emit_load_store): Likewise.
5450 (emit_ldr): Mention post-index instruction in comment.
5451 (emit_ldrh): New function.
5452 (emit_ldrb): New function.
5453 (emit_ldrsw): Mention post-index instruction in comment.
5454 (emit_str): Likewise.
5455 (emit_subs): New function.
5456 (emit_cmp): Likewise.
5457 (emit_and): Likewise.
5458 (emit_orr): Likewise.
5459 (emit_orn): Likewise.
5460 (emit_eor): Likewise.
5461 (emit_mvn): Likewise.
5462 (emit_lslv): Likewise.
5463 (emit_lsrv): Likewise.
5464 (emit_asrv): Likewise.
5465 (emit_mul): Likewise.
5466 (emit_sbfm): Likewise.
5467 (emit_sbfx): Likewise.
5468 (emit_ubfm): Likewise.
5469 (emit_ubfx): Likewise.
5470 (emit_csinc): Likewise.
5471 (emit_cset): Likewise.
5472 (emit_nop): Likewise.
5473 (emit_ops_insns): New helper function.
5474 (emit_pop): Likewise.
5475 (emit_push): Likewise.
5476 (aarch64_emit_prologue): New function.
5477 (aarch64_emit_epilogue): Likewise.
5478 (aarch64_emit_add): Likewise.
5479 (aarch64_emit_sub): Likewise.
5480 (aarch64_emit_mul): Likewise.
5481 (aarch64_emit_lsh): Likewise.
5482 (aarch64_emit_rsh_signed): Likewise.
5483 (aarch64_emit_rsh_unsigned): Likewise.
5484 (aarch64_emit_ext): Likewise.
5485 (aarch64_emit_log_not): Likewise.
5486 (aarch64_emit_bit_and): Likewise.
5487 (aarch64_emit_bit_or): Likewise.
5488 (aarch64_emit_bit_xor): Likewise.
5489 (aarch64_emit_bit_not): Likewise.
5490 (aarch64_emit_equal): Likewise.
5491 (aarch64_emit_less_signed): Likewise.
5492 (aarch64_emit_less_unsigned): Likewise.
5493 (aarch64_emit_ref): Likewise.
5494 (aarch64_emit_if_goto): Likewise.
5495 (aarch64_emit_goto): Likewise.
5496 (aarch64_write_goto_address): Likewise.
5497 (aarch64_emit_const): Likewise.
5498 (aarch64_emit_call): Likewise.
5499 (aarch64_emit_reg): Likewise.
5500 (aarch64_emit_pop): Likewise.
5501 (aarch64_emit_stack_flush): Likewise.
5502 (aarch64_emit_zero_ext): Likewise.
5503 (aarch64_emit_swap): Likewise.
5504 (aarch64_emit_stack_adjust): Likewise.
5505 (aarch64_emit_int_call_1): Likewise.
5506 (aarch64_emit_void_call_2): Likewise.
5507 (aarch64_emit_eq_goto): Likewise.
5508 (aarch64_emit_ne_goto): Likewise.
5509 (aarch64_emit_lt_goto): Likewise.
5510 (aarch64_emit_le_goto): Likewise.
5511 (aarch64_emit_gt_goto): Likewise.
5512 (aarch64_emit_ge_got): Likewise.
5513 (aarch64_emit_ops_impl): New static global variable.
5514 (aarch64_emit_ops): New target function, return
5515 &aarch64_emit_ops_impl.
5516 (struct linux_target_ops): Install it.
5517
bb903df0
PL
55182015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5519
5520 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5521 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5522 aarch64-ipa.o.
5523 * linux-aarch64-ipa.c: New file.
5524 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5525 and endian.h.
5526 (aarch64_get_thread_area): New target method.
5527 (extract_signed_bitfield): New helper function.
5528 (aarch64_decode_ldr_literal): New function.
5529 (enum aarch64_opcodes): New enum.
5530 (struct aarch64_register): New struct.
5531 (struct aarch64_operand): New struct.
5532 (x0): New static global.
5533 (x1): Likewise.
5534 (x2): Likewise.
5535 (x3): Likewise.
5536 (x4): Likewise.
5537 (w2): Likewise.
5538 (ip0): Likewise.
5539 (sp): Likewise.
5540 (xzr): Likewise.
5541 (aarch64_register): New helper function.
5542 (register_operand): Likewise.
5543 (immediate_operand): Likewise.
5544 (struct aarch64_memory_operand): New struct.
5545 (offset_memory_operand): New helper function.
5546 (preindex_memory_operand): Likewise.
5547 (enum aarch64_system_control_registers): New enum.
5548 (ENCODE): New macro.
5549 (emit_insn): New helper function.
5550 (emit_b): New function.
5551 (emit_bcond): Likewise.
5552 (emit_cb): Likewise.
5553 (emit_tb): Likewise.
5554 (emit_blr): Likewise.
5555 (emit_stp): Likewise.
5556 (emit_ldp_q_offset): Likewise.
5557 (emit_stp_q_offset): Likewise.
5558 (emit_load_store): Likewise.
5559 (emit_ldr): Likewise.
5560 (emit_ldrsw): Likewise.
5561 (emit_str): Likewise.
5562 (emit_ldaxr): Likewise.
5563 (emit_stxr): Likewise.
5564 (emit_stlr): Likewise.
5565 (emit_data_processing_reg): Likewise.
5566 (emit_data_processing): Likewise.
5567 (emit_add): Likewise.
5568 (emit_sub): Likewise.
5569 (emit_mov): Likewise.
5570 (emit_movk): Likewise.
5571 (emit_mov_addr): Likewise.
5572 (emit_mrs): Likewise.
5573 (emit_msr): Likewise.
5574 (emit_sevl): Likewise.
5575 (emit_wfe): Likewise.
5576 (append_insns): Likewise.
5577 (can_encode_int32_in): New helper function.
5578 (aarch64_relocate_instruction): New function.
5579 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5580 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5581 (struct linux_target_ops): Install aarch64_get_thread_area,
5582 aarch64_install_fast_tracepoint_jump_pad and
5583 aarch64_get_min_fast_tracepoint_insn_len.
5584
787749ea
PL
55852015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5586
5587 * Makefile.in (aarch64-insn.o): New rule.
5588 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5589
9812b2e6
YQ
55902015-09-21 Yao Qi <yao.qi@linaro.org>
5591
5592 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5593
18fe412b
YQ
55942015-09-21 Yao Qi <yao.qi@linaro.org>
5595
5596 * tracepoint.c (max_jump_pad_size): Remove.
5597
a0cc84cd
YQ
55982015-09-18 Yao Qi <yao.qi@linaro.org>
5599
5600 * linux-aarch64-low.c: Don't include sys/uio.h.
5601 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5602
d78908cf
WW
56032015-09-16 Wei-cheng Wang <cole945@gmail.com>
5604
5605 * tracepoint.c (eval_result_type): Change prototype.
5606 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5607
d57e0d50
PA
56082015-09-15 Pedro Alves <palves@redhat.com>
5609
5610 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5611 Check whether to report exec events instead of checking whether
5612 multiprocess is enabled.
5613
5a676acc
PA
56142015-09-15 Pedro Alves <palves@redhat.com>
5615
5616 PR remote/18965
5617 * remote-utils.c (prepare_resume_reply): Merge
5618 TARGET_WAITKIND_VFORK_DONE switch case with the
5619 TARGET_WAITKIND_FORKED case.
5620
7c5d0fad
YQ
56212015-09-15 Yao Qi <yao.qi@linaro.org>
5622
5623 * server.c (handle_query): Check string comparison using
5624 "else if" instead of "if".
5625
750ce8d1
YQ
56262015-09-15 Yao Qi <yao.qi@linaro.org>
5627
5628 * server.c (vCont_supported): New global variable.
5629 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5630 matches. Append ";vContSupported+" to own_buf.
5631 (handle_v_requests): Append ";s;S" to own_buf if target supports
5632 hardware single step or vCont_supported is false.
5633 (capture_main): Set vCont_supported to zero.
5634
70b90b91
YQ
56352015-09-15 Yao Qi <yao.qi@linaro.org>
5636
5637 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5638 it to ...
5639 (linux_supports_hardware_single_step): ... New function.
5640 (linux_target_ops): Update.
5641 * lynx-low.c (lynx_target_ops): Set field
5642 supports_hardware_single_step to target_can_do_hardware_single_step.
5643 * nto-low.c (nto_target_ops): Likewise.
5644 * spu-low.c (spu_target_ops): Likewise.
5645 * win32-low.c (win32_target_ops): Likewise.
5646 * target.c (target_can_do_hardware_single_step): New function.
5647 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5648 Remove. <supports_hardware_single_step>: New field.
5649 (target_supports_conditional_breakpoints): Remove.
5650 (target_supports_hardware_single_step): New macro.
5651 (target_can_do_hardware_single_step): Declare.
5652 * server.c (handle_query): Use target_supports_hardware_single_step
5653 instead of target_supports_conditional_breakpoints.
5654
ade90bde
YQ
56552015-09-15 Yao Qi <yao.qi@linaro.org>
5656
5657 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5658 function.
5659 (struct linux_target_ops the_low_target): Install
5660 aarch64_linux_siginfo_fixup.
5661
94585166
DB
56622015-09-11 Don Breazeal <donb@codesourcery.com>
5663 Luis Machado <lgustavo@codesourcery.com>
5664
5665 * linux-low.c (linux_mourn): Static declaration.
5666 (linux_arch_setup): Move in front of
5667 handle_extended_wait.
5668 (linux_arch_setup_thread): New function.
5669 (handle_extended_wait): Handle exec events. Call
5670 linux_arch_setup_thread. Make event_lwp argument a
5671 pointer-to-a-pointer.
5672 (check_zombie_leaders): Do not check stopped threads.
5673 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5674 (linux_low_filter_event): Add lwp and thread for exec'ing
5675 non-leader thread if leader thread has been deleted.
5676 Refactor code into linux_arch_setup_thread and call it.
5677 Pass child lwp pointer by reference to handle_extended_wait.
5678 (linux_wait_for_event_filtered): Update comment.
5679 (linux_wait_1): Prevent clobbering exec event status.
5680 (linux_supports_exec_events): New function.
5681 (linux_target_ops) <supports_exec_events>: Initialize new member.
5682 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5683 new member.
5684 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5685 * server.c (report_exec_events): New global variable.
5686 (handle_query): Handle qSupported query for exec-events feature.
5687 (captured_main): Initialize report_exec_events.
5688 * server.h (report_exec_events): Declare new global variable.
5689 * target.h (struct target_ops) <supports_exec_events>: New
5690 member.
5691 (target_supports_exec_events): New macro.
5692 * win32-low.c (win32_target_ops) <supports_exec_events>:
5693 Initialize new member.
5694
0568462b
MM
56952015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5696
5697 * linux-low.c (linux_low_enable_btrace): Remove.
5698 (linux_target_ops): Replace linux_low_enable_btrace with
5699 linux_enable_btrace.
5700
39edd165
YQ
57012015-09-03 Yao Qi <yao.qi@linaro.org>
5702
5703 * linux-aarch64-low.c (aarch64_insert_point): Call
5704 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5705 returns true.
5706
1db33b5a
UW
57072015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5708
5709 * linux-low.c (check_stopped_by_breakpoint): Use
5710 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5711
ab290430
PA
57122015-08-27 Pedro Alves <palves@redhat.com>
5713
5714 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5715
8d749320
SM
57162015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5717
6711b7f8
SM
5718 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5719 the XNEW-family equivalent.
8d749320
SM
5720 (compile_bytecodes): Likewise.
5721 * dll.c (loaded_dll): Likewise.
5722 * event-loop.c (append_callback_event): Likewise.
5723 (create_file_handler): Likewise.
5724 (create_file_event): Likewise.
5725 * hostio.c (handle_open): Likewise.
5726 * inferiors.c (add_thread): Likewise.
5727 (add_process): Likewise.
5728 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5729 * linux-arm-low.c (arm_new_process): Likewise.
5730 (arm_new_thread): Likewise.
5731 * linux-low.c (add_to_pid_list): Likewise.
5732 (linux_add_process): Likewise.
5733 (handle_extended_wait): Likewise.
5734 (add_lwp): Likewise.
5735 (enqueue_one_deferred_signal): Likewise.
5736 (enqueue_pending_signal): Likewise.
5737 (linux_resume_one_lwp_throw): Likewise.
5738 (linux_resume_one_thread): Likewise.
5739 (linux_read_memory): Likewise.
5740 (linux_write_memory): Likewise.
5741 * linux-mips-low.c (mips_linux_new_process): Likewise.
5742 (mips_linux_new_thread): Likewise.
5743 (mips_add_watchpoint): Likewise.
5744 * linux-x86-low.c (initialize_low_arch): Likewise.
5745 * lynx-low.c (lynx_add_process): Likewise.
5746 * mem-break.c (set_raw_breakpoint_at): Likewise.
5747 (set_breakpoint): Likewise.
5748 (add_condition_to_breakpoint): Likewise.
5749 (add_commands_to_breakpoint): Likewise.
5750 (clone_agent_expr): Likewise.
5751 (clone_one_breakpoint): Likewise.
5752 * regcache.c (new_register_cache): Likewise.
5753 * remote-utils.c (look_up_one_symbol): Likewise.
5754 * server.c (queue_stop_reply): Likewise.
5755 (start_inferior): Likewise.
5756 (queue_stop_reply_callback): Likewise.
5757 (handle_target_event): Likewise.
5758 * spu-low.c (fetch_ppc_memory): Likewise.
5759 (store_ppc_memory): Likewise.
5760 * target.c (set_target_ops): Likewise.
5761 * thread-db.c (thread_db_load_search): Likewise.
5762 (try_thread_db_load_1): Likewise.
5763 * tracepoint.c (add_tracepoint): Likewise.
5764 (add_tracepoint_action): Likewise.
5765 (create_trace_state_variable): Likewise.
5766 (cmd_qtdpsrc): Likewise.
5767 (cmd_qtro): Likewise.
5768 (add_while_stepping_state): Likewise.
5769 * win32-low.c (child_add_thread): Likewise.
5770 (get_image_name): Likewise.
5771
ed8b7b42
YQ
57722015-08-25 Yao Qi <yao.qi@linaro.org>
5773
5774 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5775
db3cb7cb
YQ
57762015-08-25 Yao Qi <yao.qi@linaro.org>
5777
5778 * Makefile.in (aarch64-linux.o): New rule.
5779 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5780 srv_tgtobj.
5781 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5782 (aarch64_init_debug_reg_state): Make it extern.
5783 (aarch64_linux_prepare_to_resume): Remove.
5784
f6011a1c
YQ
57852015-08-25 Yao Qi <yao.qi@linaro.org>
5786
5787 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5788 lwp_arch_private_info and ptid_of_lwp.
5789
88e2cf7e
YQ
57902015-08-25 Yao Qi <yao.qi@linaro.org>
5791
5792 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5793 Find proc_info by find_process_pid. All callers updated.
5794
5e35436e
YQ
57952015-08-25 Yao Qi <yao.qi@linaro.org>
5796
5797 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5798 Remove.
5799 (debug_reg_change_callback): Remove.
5800 (aarch64_notify_debug_reg_change): Remove.
5801
4a8a7965
YQ
58022015-08-25 Yao Qi <yao.qi@linaro.org>
5803
5804 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5805 Call current_lwp_ptid.
5806
32a271ee
YQ
58072015-08-25 Yao Qi <yao.qi@linaro.org>
5808
5809 * linux-aarch64-low.c (debug_reg_change_callback): Use
5810 debug_printf.
5811
0d51c8d7
YQ
58122015-08-25 Yao Qi <yao.qi@linaro.org>
5813
5814 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5815
31a43dd5
YQ
58162015-08-25 Yao Qi <yao.qi@linaro.org>
5817
5818 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5819
8ee52567
YQ
58202015-08-25 Yao Qi <yao.qi@linaro.org>
5821
5822 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5823 the code.
5824
ff3f0f45
YQ
58252015-08-25 Yao Qi <yao.qi@linaro.org>
5826
5827 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5828 Remove.
5829 (debug_reg_change_callback): Remove argument entry and add argument
5830 lwp. Remove local variable thread. Don't print thread id in the
5831 debugging output. Don't check whether pid of thread equals to pid.
5832 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5833 iterate_over_lwps instead find_inferior.
5834
3d40fbb5
PA
58352015-08-24 Pedro Alves <palves@redhat.com>
5836
5837 * inferiors.c (get_first_process): New function.
5838 * inferiors.h (get_first_process): New declaration.
5839 * remote-utils.c (read_ptid): Default to the first process in the
5840 list, instead of to the current thread's process.
5841
438e1e42
PA
58422015-08-24 Pedro Alves <palves@redhat.com>
5843
5844 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5845 * event-loop.c: Likewise.
5846 * remote-utils.c: Likewise.
5847 * tracepoint.c: Likewise.
5848
a8c6d4fc
PA
58492015-08-24 Pedro Alves <palves@redhat.com>
5850
5851 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5852 ptid_get_lwp.
5853
99b0bb12
PA
58542015-08-21 Pedro Alves <palves@redhat.com>
5855
5856 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5857 instead of literal 1.
5858
f8904751
PA
58592015-08-21 Pedro Alves <palves@redhat.com>
5860
5861 * tdesc.c (default_description): Explicitly zero-initialize.
5862
465a859e
PA
58632015-08-21 Pedro Alves <palves@redhat.com>
5864
5865 PR gdb/18749
5866 * inferiors.c (remove_thread): Discard any pending stop reply for
5867 this thread.
5868 * server.c (remove_all_on_match_pid): Rename to ...
5869 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5870 instead of a pid.
5871 (discard_queued_stop_replies): Change parameter to a ptid. Now
5872 extern.
5873 (handle_v_kill, kill_inferior_callback, captured_main)
5874 (process_serial_event): Adjust.
5875 * server.h (discard_queued_stop_replies): Declare.
5876
f0db101d
PA
58772015-08-21 Pedro Alves <palves@redhat.com>
5878
5879 * linux-low.c (wait_for_sigstop): Always switch to no thread
5880 selected if the previously current thread dies.
5881 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5882 process instead of the current thread's.
5883 * remote-utils.c (input_interrupt): Don't check if there's no
5884 current thread.
5885 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5886 current thread to the general thread fails, error out.
5887 (handle_qxfer_auxv, handle_qxfer_libraries)
5888 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5889 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5890 (handle_query): Check if there's a thread selected instead of
5891 checking whether there's any thread in the thread list.
5892 (handle_qxfer_threads, handle_qxfer_btrace)
5893 (handle_qxfer_btrace_conf): Don't error out early if there's no
5894 thread in the thread list.
5895 (handle_v_cont, myresume): Don't set the current thread to the
5896 continue thread.
5897 (process_serial_event) <Hg handling>: Also set thread_id if the
5898 previous general thread is still alive.
5899 (process_serial_event) <g/G handling>: If setting the current
5900 thread to the general thread fails, error out.
5901 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5902 thread's lwp instead of the current thread's.
5903 * target.c (set_desired_thread): If the desired thread was not
5904 found, leave the current thread pointing to NULL. Return an int
5905 (boolean) indicating success.
5906 * target.h (set_desired_thread): Change return type to int.
5907
40045d91
MF
59082015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5909
5910 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5911 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5912 #includes.
5913 (ps_get_thread_area): New function.
5914
45face3b
GB
59152015-08-19 Gary Benson <gbenson@redhat.com>
5916
5917 * hostio.c (handle_pread): Do not attempt to read more data
5918 than hostio_reply_with_data can fit in a packet.
5919
16d5f642
JB
59202015-08-18 Joel Brobecker <brobecker@adacore.com>
5921
5922 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5923
a738da3a
MF
59242015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5925
5926 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5927
33ebda9d
PA
59282015-08-06 Pedro Alves <palves@redhat.com>
5929
5930 * tracepoint.c (expr_eval_result): Now an int.
5931
a44892be
PA
59322015-08-06 Pedro Alves <palves@redhat.com>
5933
5934 * gdbthread.h (struct regcache): Forward declare.
5935 (struct thread_info) <regcache_data>: Now a struct regcache
5936 pointer.
5937 * inferiors.c (inferior_regcache_data)
5938 (set_inferior_regcache_data): Now work with struct regcache
5939 pointers.
5940 * inferiors.h (struct regcache): Forward declare.
5941 (inferior_regcache_data, set_inferior_regcache_data): Now work
5942 with struct regcache pointers.
5943 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5944 (free_register_cache_thread): Remove struct regcache pointer
5945 casts.
5946
608a1e46
PA
59472015-08-06 Pedro Alves <palves@redhat.com>
5948
5949 * server.c (captured_main): On error, print the exception message
5950 to stderr, and if run_once is set, throw a quit.
5951
f0ce0d3a
PA
59522015-08-06 Pedro Alves <palves@redhat.com>
5953
5954 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5955 the current thread.
5956
bf47e248
PA
59572015-08-06 Pedro Alves <palves@redhat.com>
5958
5959 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5960 reading beyond the passed in buffer length.
5961
b6b9ffcc
PL
59622015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5963
5964 * tracepoint.c (symbol_list) <required>: Remove.
5965
863d01bd
PA
59662015-08-06 Pedro Alves <palves@redhat.com>
5967
5968 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5969 count if stopping and suspending threads.
5970 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5971 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5972 (linux_detach): Complete an ongoing step-over.
5973 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5974 throughout.
5975 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5976 (linux_wait_1): If passing a signal to the inferior after
5977 finishing a step-over, unsuspend and re-resume all lwps. If we
5978 see a single-step event but the thread should be continuing, don't
5979 pass the trap to gdb.
5980 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5981 internal_error instead of gdb_assert.
5982 (enqueue_pending_signal): New function.
5983 (check_ptrace_stopped_lwp_gone): Add debug output.
5984 (start_step_over): Use internal_error instead of gdb_assert.
5985 (complete_ongoing_step_over): New function.
5986 (linux_resume_one_thread): Don't resume a suspended thread.
5987 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5988 it stepping.
5989
00db26fa
PA
59902015-08-06 Pedro Alves <palves@redhat.com>
5991
5992 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5993 (linux_thread_alive): Use lwp_is_marked_dead.
5994 (extended_event_reported): Delete.
5995 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5996 instead of extended_event_reported.
5997 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5998 as well.
5999 (lwp_is_marked_dead): New function.
6000 (lwp_running): Use lwp_is_marked_dead.
6001 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6002 comment.
6003
ad071a30
PA
60042015-08-06 Pedro Alves <palves@redhat.com>
6005
6006 * linux-low.c (linux_wait_1): Move fork event output out of the
6007 !report_to_gdb check. Pass event_child->waitstatus to
6008 target_waitstatus_to_string instead of ourstatus.
6009
524b57e6
YQ
60102015-08-04 Yao Qi <yao.qi@linaro.org>
6011
6012 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6013 if current_thread is 32 bit.
6014
6085d6f6
YQ
60152015-08-04 Yao Qi <yao.qi@linaro.org>
6016
6017 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6018 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6019 * server.c (extended_protocol): Remove "static".
6020 * server.h (extended_protocol): Declare it.
6021
8a7e4587
YQ
60222015-08-04 Yao Qi <yao.qi@linaro.org>
6023
6024 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6025 both aarch64 and aarch32.
6026 (aarch64_set_pc): Likewise.
6027
3b53ae99
YQ
60282015-08-04 Yao Qi <yao.qi@linaro.org>
6029
6030 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6031 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6032 arm-with-neon.xml to srv_xmlfiles.
6033 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6034 (is_64bit_tdesc): New function.
6035 (aarch64_linux_read_description): New function.
6036 (aarch64_arch_setup): Call aarch64_linux_read_description.
6037 (regs_info): Rename to regs_info_aarch64.
6038 (aarch64_regs_info): Return right regs_info.
6039 (initialize_low_arch): Call initialize_low_arch_aarch32.
6040
bd9e6534
YQ
60412015-08-04 Yao Qi <yao.qi@linaro.org>
6042
6043 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6044 * linux-aarch32-low.c: New file.
6045 * linux-aarch32-low.h: New file.
6046 * linux-arm-low.c (arm_fill_gregset): Move it to
6047 linux-aarch32-low.c.
6048 (arm_store_gregset): Likewise.
6049 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6050 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6051 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6052 (regs_info): Rename to regs_info_arm.
6053 (arm_regs_info): Return regs_info_aarch32 if
6054 have_ptrace_getregset is 1 and target description is
6055 arm_with_neon or arm_with_vfpv3.
6056 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6057 Call initialize_low_arch_aarch32 instead.
6058
ded48a5e
YQ
60592015-08-04 Yao Qi <yao.qi@linaro.org>
6060
6061 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6062 * linux-low.c: ... here.
6063 * linux-low.h (have_ptrace_getregset): Declare it.
6064
96e9210f
PA
60652015-08-04 Pedro Alves <palves@redhat.com>
6066
6067 * thread-db.c (struct thread_db): Use new typedefs.
6068 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6069 CHK calls.
6070 (disable_thread_event_reporting): Cast result of dlsym to
6071 destination function pointer type.
6072 (thread_db_mourn): Use td_ta_delete_ftype.
6073
af60a1ef
SL
60742015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6075
6076 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6077 arch variant.
6078 (CDX_BREAKPOINT): Define for R2.
6079 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6080 (the_low_target): Add comments.
6081
e8b41681
YQ
60822015-07-30 Yao Qi <yao.qi@linaro.org>
6083
6084 * linux-arm-low.c (arm_hwcap): Remove it.
6085 (arm_read_description): New local variable arm_hwcap. Don't
6086 set arm_hwcap to zero.
6087
89abb039
YQ
60882015-07-30 Yao Qi <yao.qi@linaro.org>
6089
6090 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6091 Use regcache->tdesc instead.
6092 (arm_store_wmmxregset): Likewise.
6093 (arm_fill_vfpregset): Likewise.
6094 (arm_store_vfpregset): Likewise.
6095
deca266c
YQ
60962015-07-30 Yao Qi <yao.qi@linaro.org>
6097
6098 * linux-arm-low.c: Include arch/arm.h.
6099 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6100 (arm_store_gregset): Likewise.
6101
aa58a496
SM
61022015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6103
6104 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6105 ptrace's 4th parameter.
6106
50904b25
YQ
61072015-07-27 Yao Qi <yao.qi@linaro.org>
6108
6109 * configure.srv (case aarch64*-*-linux*): Don't set
6110 srv_linux_usrregs.
6111
5826e159
PA
61122015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6113
6114 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6115 sys/ptrace.h.
6116 * linux-arm-low.c: Likewise.
6117 * linux-cris-low.c: Likewise.
6118 * linux-crisv32-low.c: Likewise.
6119 * linux-low.c: Likewise.
6120 * linux-m68k-low.c: Likewise.
6121 * linux-mips-low.c: Likewise.
6122 * linux-nios2-low.c: Likewise.
6123 * linux-s390-low.c: Likewise.
6124 * linux-sparc-low.c: Likewise.
6125 * linux-tic6x-low.c: Likewise.
6126 * linux-tile-low.c: Likewise.
6127 * linux-x86-low.c: Likewise.
6128
54019719
PA
61292015-07-24 Pedro Alves <palves@redhat.com>
6130
6131 * config.in: Regenerate.
6132 * configure: Regenerate.
6133
eb7aa561
PA
61342015-07-24 Pedro Alves <palves@redhat.com>
6135
6136 * acinclude.m4: Include ../ptrace.m4.
6137 * configure.ac: Call GDB_AC_PTRACE.
6138 * config.in, configure: Regenerate.
6139
55d7b841
YQ
61402015-07-24 Yao Qi <yao.qi@linaro.org>
6141
6142 * linux-low.c (linux_create_inferior): Remove setting to
6143 proc->priv->new_inferior.
6144 (linux_attach): Likewise.
6145 (linux_low_filter_event): Likewise.
6146 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6147
c06cbd92
YQ
61482015-07-24 Yao Qi <yao.qi@linaro.org>
6149
6150 * linux-low.c (linux_arch_setup): New function.
6151 (linux_low_filter_event): If proc->tdesc is NULL and
6152 proc->attached is true, call the_low_target.arch_setup.
6153 Otherwise, keep status pending, and return.
6154 (linux_resume_one_lwp_throw): Don't call get_pc if
6155 thread->while_stepping isn't NULL. Don't call
6156 get_thread_regcache if proc->tdesc is NULL.
6157 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6158 (linux_target_ops): Install arch_setup.
6159 * server.c (start_inferior): Call the_target->arch_setup.
6160 * target.h (struct target_ops) <arch_setup>: New field.
6161 (target_arch_setup): New marco.
6162 * lynx-low.c (lynx_target_ops): Update.
6163 * nto-low.c (nto_target_ops): Update.
6164 * spu-low.c (spu_target_ops): Update.
6165 * win32-low.c (win32_target_ops): Update.
6166
5ae3ebba
YQ
61672015-07-24 Yao Qi <yao.qi@linaro.org>
6168
6169 * linux-low.c (linux_add_process): Don't set
6170 proc->priv->new_inferior.
6171 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6172 (linux_attach): Likewise.
6173
eb97750b
YQ
61742015-07-24 Yao Qi <yao.qi@linaro.org>
6175
6176 * server.c (start_inferior): Code refactor.
6177
51aee833
YQ
61782015-07-24 Yao Qi <yao.qi@linaro.org>
6179
6180 * server.c (process_serial_event): Set general_thread.
6181
af1b22f3
YQ
61822015-07-21 Yao Qi <yao.qi@linaro.org>
6183
6184 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6185 aarch64_linux_get_debug_reg_capacity.
6186
554717a3
YQ
61872015-07-17 Yao Qi <yao.qi@linaro.org>
6188
6189 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6190 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6191 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6192 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6193 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6194 (AARCH64_HWP_ALIGNMENT): Likewise.
6195 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6196 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6197 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6198 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6199 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6200 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6201 (struct aarch64_debug_reg_state): Likewise.
6202 (struct arch_lwp_info): Likewise.
6203 (aarch64_align_watchpoint): Likewise.
6204 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6205 (aarch64_watchpoint_length): Likewise.
6206 (aarch64_point_encode_ctrl_reg): Likewise
6207 (aarch64_point_is_aligned): Likewise.
6208 (aarch64_align_watchpoint): Likewise.
6209 (aarch64_linux_set_debug_regs):
6210 (aarch64_dr_state_insert_one_point): Likewise.
6211 (aarch64_dr_state_remove_one_point): Likewise.
6212 (aarch64_handle_breakpoint): Likewise.
6213 (aarch64_handle_aligned_watchpoint): Likewise.
6214 (aarch64_handle_unaligned_watchpoint): Likewise.
6215 (aarch64_handle_watchpoint): Likewise.
6216
c67ca4de
YQ
62172015-07-17 Yao Qi <yao.qi@linaro.org>
6218
6219 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6220 and don't aarch64_get_debug_reg_state. All callers update.
6221 (aarch64_handle_aligned_watchpoint): Likewise.
6222 (aarch64_handle_unaligned_watchpoint): Likewise.
6223 (aarch64_handle_watchpoint): Likewise.
6224 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6225 (aarch64_remove_point): Likewise.
6226
25abf979
YQ
62272015-07-17 Yao Qi <yao.qi@linaro.org>
6228
6229 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6230 debug_printf.
6231 (aarch64_handle_unaligned_watchpoint): Likewise.
6232
db1ff28b
JK
62332015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6234
6235 Revert the previous 3 commits:
6236 Move gdb_regex* to common/
6237 Move linux_find_memory_regions_full & co.
6238 gdbserver build-id attribute generator
6239
700ca40f
JK
62402015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6241 Jan Kratochvil <jan.kratochvil@redhat.com>
6242
6243 gdbserver build-id attribute generator.
6244 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6245 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6246 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6247 (find_phdr): New.
6248 (get_dynamic): Use find_pdhr to traverse program headers.
6249 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6250 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6251 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6252 (get_hex_build_id): New.
6253 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6254 to reply XML document.
6255
9904185c
JK
62562015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6257 Jan Kratochvil <jan.kratochvil@redhat.com>
6258
6259 * target.c: Include target/target-utils.h and fcntl.h.
6260 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6261 (target_fileio_read_stralloc): New functions.
6262
6e5b4429
JK
62632015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6264
6265 * Makefile.in (OBS): Add gdb_regex.o.
6266 (gdb_regex.o): New.
6267 * config.in: Rebuilt.
6268 * configure: Rebuilt.
6269
ddc98fbf
JK
62702015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6271 Jan Kratochvil <jan.kratochvil@redhat.com>
6272
6273 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6274 * Makefile.in (OBS): Add target-utils.o.
6275 (linux-maps.o, target-utils.o): New.
6276 * configure.srv (srv_linux_obj): Add linux-maps.o.
6277
e57bb7a0
PL
62782015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6279
6280 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6281 function, return 1.
6282 (the_low_target): Install it.
6283
586b02a9
PA
62842015-07-14 Pedro Alves <palves@redhat.com>
6285
6286 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6287 Instead, ignore ECHILD, and throw an error for other errnos.
6288
58c1b36c
PA
62892015-07-10 Pedro Alves <palves@redhat.com>
6290
6291 * event-loop.c (struct callback_event) <data>: Change type to
6292 gdb_client_data instance instead of gdb_client_data pointer.
6293 (append_callback_event): Adjust.
6294
421530db
PL
62952015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6296
6297 * linux-aarch64-low.c: Add comments for each linux_target_ops
6298 method. Remove comments already covered in target_ops and
6299 linux_target_ops definitions.
6300 (the_low_target): Add comments for each unimplemented method.
6301
c2d65f38
YQ
63022015-07-09 Yao Qi <yao.qi@linaro.org>
6303
6304 * linux-aarch64-low.c (aarch64_regmap): Remove.
6305 (aarch64_usrregs_info): Remove.
6306 (regs_info): Set field usrregs to NULL.
6307
b20a6524
MM
63082015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6309
6310 * linux-low.c: Include "rsp-low.h"
6311 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6312 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6313 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6314 (handle_btrace_enable_pt): New.
6315 (handle_btrace_general_set): Support "pt".
6316 (handle_btrace_conf_general_set): Support "pt:size".
6317
96c97461
PL
63182015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6319
6320 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6321 Z_PACKET_SW_BP.
6322
37d66942
PL
63232015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6324
6325 * linux-aarch64-low.c: Remove comment about endianness.
6326 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6327 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6328 memcmp.
6329
dc06243f
GB
63302015-06-24 Gary Benson <gbenson@redhat.com>
6331
6332 * linux-i386-ipa.c (stdint.h): Do not include.
6333 * lynx-i386-low.c (stdint.h): Likewise.
6334 * lynx-ppc-low.c (stdint.h): Likewise.
6335 * mem-break.c (stdint.h): Likewise.
6336 * thread-db.c (stdint.h): Likewise.
6337 * tracepoint.c (stdint.h): Likewise.
6338 * win32-low.c (stdint.h): Likewise.
6339
124e13d9
SM
63402015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6341
6342 * server.c (write_qxfer_response): Update call to
6343 remote_escape_output.
6344
909c2cda
JK
63452015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6346 Jan Kratochvil <jan.kratochvil@redhat.com>
6347
6348 Merge multiple hex conversions.
6349 * gdbreplay.c (tohex): Rename to 'fromhex'.
6350 (logchar): Use fromhex.
6351
24c05f46
JK
63522015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6353
6354 * server.c (handle_qxfer_libraries): Set `version' attribute for
6355 <library-list>.
6356
14d2069a
GB
63572015-06-10 Gary Benson <gbenson@redhat.com>
6358
6359 * target.h (struct target_ops) <multifs_open>: New field.
6360 <multifs_unlink>: Likewise.
6361 <multifs_readlink>: Likewise.
6362 * linux-low.c (nat/linux-namespaces.h): New include.
6363 (linux_target_ops): Initialize the_target->multifs_open,
6364 the_target->multifs_unlink and the_target->multifs_readlink.
6365 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6366 * hostio.c (hostio_fs_pid): New static variable.
6367 (hostio_handle_new_gdb_connection): New function.
6368 (handle_setfs): Likewise.
6369 (handle_open): Use the_target->multifs_open as appropriate.
6370 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6371 (handle_readlink): Use the_target->multifs_readlink as
6372 appropriate.
6373 (handle_vFile): Handle vFile:setfs packets.
6374 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6375 after target_handle_new_gdb_connection.
6376
4b8b5e72
GB
63772015-06-10 Gary Benson <gbenson@redhat.com>
6378
6379 * configure.ac (AC_CHECK_FUNCS): Add setns.
6380 * config.in: Regenerate.
6381 * configure: Likewise.
6382 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6383 (linux-namespaces.o): New rule.
6384 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6385
3ac2e371
GB
63862015-06-09 Gary Benson <gbenson@redhat.com>
6387
6388 * hostio.c (handle_open): Process mode argument with
6389 fileio_to_host_mode.
6390
ca9b78ce
YQ
63912015-06-01 Yao Qi <yao.qi@linaro.org>
6392
6393 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6394 * linux-x86-low.c: Likewise.
6395
bfacd19d
DB
63962015-05-28 Don Breazeal <donb@codesourcery.com>
6397
6398 * linux-low.c (handle_extended_wait): Initialize
6399 thread_info.last_resume_kind for new fork children.
6400
452003ef
PA
64012015-05-15 Pedro Alves <palves@redhat.com>
6402
6403 * target.h (target_handle_new_gdb_connection): Rewrite using if
6404 wrapped in do/while.
6405
1041a03c
JB
64062015-05-14 Joel Brobecker <brobecker@adacore.com>
6407
6408 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6409 * configure, config.in: Regenerate.
6410 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6411 Declare typedef.
6412
c269dbdb
DB
64132015-05-12 Don Breazeal <donb@codesourcery.com>
6414
6415 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6416 PTRACE_EVENT_VFORK_DONE.
6417 (linux_low_ptrace_options, extended_event_reported): Add vfork
6418 events.
6419 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6420 and "vforkdone" for RSP 'T' Stop Reply Packet.
6421 * server.h (report_vfork_events): Declare
6422 global variable.
6423
3a8a0396
DB
64242015-05-12 Don Breazeal <donb@codesourcery.com>
6425
6426 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6427 (the_low_target) <new_fork>: Initialize new member.
6428 * linux-arm-low.c (arm_new_fork): New function.
6429 (the_low_target) <new_fork>: Initialize new member.
6430 * linux-low.c (handle_extended_wait): Call new target function
6431 new_fork.
6432 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6433 * linux-mips-low.c (mips_add_watchpoint): New function
6434 extracted from mips_insert_point.
6435 (the_low_target) <new_fork>: Initialize new member.
6436 (mips_linux_new_fork): New function.
6437 (mips_insert_point): Call mips_add_watchpoint.
6438 * linux-x86-low.c (x86_linux_new_fork): New function.
6439 (the_low_target) <new_fork>: Initialize new member.
6440
de0d863e
DB
64412015-05-12 Don Breazeal <donb@codesourcery.com>
6442
6443 * linux-low.c (handle_extended_wait): Implement return value,
6444 rename argument 'event_child' to 'event_lwp', handle
6445 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6446 (linux_low_ptrace_options): New function.
6447 (linux_low_filter_event): Call linux_low_ptrace_options,
6448 use different argument fo linux_enable_event_reporting,
6449 use return value from handle_extended_wait.
6450 (extended_event_reported): New function.
6451 (linux_wait_1): Call extended_event_reported and set
6452 status to report fork events.
6453 (linux_write_memory): Add pid to debug message.
6454 (reset_lwp_ptrace_options_callback): New function.
6455 (linux_handle_new_gdb_connection): New function.
6456 (linux_target_ops): Initialize new structure member.
6457 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6458 * lynx-low.c: Initialize new structure member.
6459 * remote-utils.c (prepare_resume_reply): Implement stop reason
6460 "fork" for "T" stop message.
6461 * server.c (handle_query): Call handle_new_gdb_connection.
6462 * server.h (report_fork_events): Declare global flag.
6463 * target.h (struct target_ops) <handle_new_gdb_connection>:
6464 New member.
6465 (target_handle_new_gdb_connection): New macro.
6466 * win32-low.c: Initialize new structure member.
6467
ddcbc397
DB
64682015-05-12 Don Breazeal <donb@codesourcery.com>
6469
6470 * mem-break.c (APPEND_TO_LIST): Define macro.
6471 (clone_agent_expr): New function.
6472 (clone_one_breakpoint): New function.
6473 (clone_all_breakpoints): New function.
6474 * mem-break.h: Declare new functions.
6475
89245bc0
DB
64762015-05-12 Don Breazeal <donb@codesourcery.com>
6477
6478 * linux-low.c (linux_supports_fork_events): New function.
6479 (linux_supports_vfork_events): New function.
6480 (linux_target_ops): Initialize new structure members.
6481 (initialize_low): Call linux_check_ptrace_features.
6482 * lynx-low.c (lynx_target_ops): Initialize new structure
6483 members.
6484 * server.c (report_fork_events, report_vfork_events):
6485 New global flags.
6486 (handle_query): Add new features to qSupported packet and
6487 response.
6488 (captured_main): Initialize new global variables.
6489 * target.h (struct target_ops) <supports_fork_events>:
6490 New member.
6491 <supports_vfork_events>: New member.
6492 (target_supports_fork_events): New macro.
6493 (target_supports_vfork_events): New macro.
6494 * win32-low.c (win32_target_ops): Initialize new structure
6495 members.
6496
835205d0
GB
64972015-05-12 Gary Benson <gbenson@redhat.com>
6498
6499 * server.c (handle_qxfer_exec_file): Use current process
6500 if annex is empty.
6501
21e94bd9
SL
65022015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6503
6504 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6505 Remove HAVE_PTRACE_GETREGS conditionals.
6506 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6507 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6508
45614f15
YQ
65092015-05-08 Yao Qi <yao.qi@linaro.org>
6510
6511 * linux-low.c (linux_supports_conditional_breakpoints): New
6512 function.
6513 (linux_target_ops): Install new target method.
6514 * lynx-low.c (lynx_target_ops): Install NULL hook for
6515 supports_conditional_breakpoints.
6516 * nto-low.c (nto_target_ops): Likewise.
6517 * spu-low.c (spu_target_ops): Likewise.
6518 * win32-low.c (win32_target_ops): Likewise.
6519 * server.c (handle_query): Check
6520 target_supports_conditional_breakpoints.
6521 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6522 New field.
6523 (target_supports_conditional_breakpoints): New macro.
6524
80ad801e
PA
65252015-05-06 Pedro Alves <palves@redhat.com>
6526
6527 PR server/18081
6528 * server.c (start_inferior): If the process exits, mourn it.
6529
819843c7
GB
65302015-04-21 Gary Benson <gbenson@redhat.com>
6531
6532 * hostio.c (fileio_open_flags_to_host): Factored out to
6533 fileio_to_host_openflags in common/fileio.c. Single use
6534 updated.
6535
a2d5a9d7
MF
65362015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6537
6538 * linux-xtensa-low.c (xtensa_fill_gregset)
6539 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6540 XCHAL_HAVE_LOOP.
6541
deb44829
MF
65422015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6543
6544 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6545 (regs_info): Replace usrregs pointer with NULL.
6546
e57f1de3
GB
65472015-04-17 Gary Benson <gbenson@redhat.com>
6548
6549 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6550 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6551 * server.c (handle_qxfer_exec_file): New function.
6552 (qxfer_packets): Add exec-file entry.
6553 (handle_query): Report qXfer:exec-file:read as supported packet.
6554
62828379
RN
65552015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6556
6557 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6558
b88bb450
GB
65592015-04-09 Gary Benson <gbenson@redhat.com>
6560
6561 * hostio-errno.c (errno_to_fileio_error): Remove function.
6562 Update caller to use remote_fileio_to_fio_error.
6563
c8f4bfdd
YQ
65642015-04-09 Yao Qi <yao.qi@linaro.org>
6565
6566 * linux-low.c (linux_insert_point): Call
6567 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6568 (linux_remove_point): Call remove_memory_breakpoint if type is
6569 raw_bkpt_type_sw.
6570 * linux-x86-low.c (x86_insert_point): Don't call
6571 insert_memory_breakpoint.
6572 (x86_remove_point): Don't call remove_memory_breakpoint.
6573
41f98f02
PA
65742015-04-01 Pedro Alves <palves@redhat.com>
6575 Cleber Rosa <crosa@redhat.com>
6576
6577 * server.c (gdbserver_usage): Reorganize and extend the usage
6578 message.
6579
2bf6fb9d
PA
65802015-03-24 Pedro Alves <palves@redhat.com>
6581
6582 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6583 output. Also dump TRAP_TRACE.
6584 (linux_low_filter_event): In debug output, distinguish a
6585 resume_stop SIGSTOP from a delayed SIGSTOP.
6586
369f6daa
GB
65872015-03-24 Gary Benson <gbenson@redhat.com>
6588
6589 * linux-x86-low.c (x86_linux_new_thread): Moved to
6590 nat/x86-linux.c.
6591 (x86_linux_prepare_to_resume): Likewise.
6592
8e5d4070
GB
65932015-03-24 Gary Benson <gbenson@redhat.com>
6594
6595 * Makefile.in (x86-linux-dregs.o): New rule.
6596 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6597 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6598 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6599 (x86_linux_dr_get): Likewise.
6600 (x86_linux_dr_set): Likewise.
6601 (update_debug_registers_callback): Likewise.
6602 (x86_linux_dr_set_addr): Likewise.
6603 (x86_linux_dr_get_addr): Likewise.
6604 (x86_linux_dr_set_control): Likewise.
6605 (x86_linux_dr_get_control): Likewise.
6606 (x86_linux_dr_get_status): Likewise.
6607 (x86_linux_update_debug_registers): Likewise.
6608
2b95d440
GB
66092015-03-24 Gary Benson <gbenson@redhat.com>
6610
6611 * linux-x86-low.c (x86_linux_update_debug_registers):
6612 New function, factored out from...
6613 (x86_linux_prepare_to_resume): ...this.
6614
14b0bc68
GB
66152015-03-24 Gary Benson <gbenson@redhat.com>
6616
6617 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6618 (x86_linux_dr_set): Likewise.
6619 (update_debug_registers_callback): Likewise.
6620 (x86_linux_dr_set_addr): Likewise.
6621 (x86_linux_dr_get_addr): Likewise.
6622 (x86_linux_dr_set_control): Likewise.
6623 (x86_linux_dr_get_control): Likewise.
6624 (x86_linux_dr_get_status): Likewise.
6625 (x86_linux_prepare_to_resume): Likewise.
6626
5dfe6ca8
GB
66272015-03-24 Gary Benson <gbenson@redhat.com>
6628
6629 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6630 Use perror_with_name. Pass string through gettext.
6631 (x86_linux_dr_set): Likewise.
6632
d33472ad
GB
66332015-03-24 Gary Benson <gbenson@redhat.com>
6634
6635 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6636 (x86_linux_dr_set_addr): ...this.
6637 (x86_dr_low_get_addr): Rename to...
6638 (x86_linux_dr_get_addr): ...this.
6639 (x86_dr_low_set_control): Rename to...
6640 (x86_linux_dr_set_control): ...this.
6641 (x86_dr_low_get_control): Rename to...
6642 (x86_linux_dr_get_control): ...this.
6643 (x86_dr_low_get_status): Rename to...
6644 (x86_linux_dr_get_status): ...this.
6645 (x86_dr_low): Update with new function names.
6646
4b134ca1
GB
66472015-03-24 Gary Benson <gbenson@redhat.com>
6648
6649 * Makefile.in (x86-linux.o): New rule.
6650 * configure.srv: Add x86-linux.o to relevant targets.
6651 * linux-low.c (lwp_set_arch_private_info): New function.
6652 (lwp_arch_private_info): Likewise.
6653 * linux-x86-low.c: Include nat/x86-linux.h.
6654 (arch_lwp_info): Removed structure.
6655 (update_debug_registers_callback):
6656 Use lwp_set_debug_registers_changed.
6657 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6658 and lwp_set_debug_registers_changed.
6659 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6660
34c703da
GB
66612015-03-24 Gary Benson <gbenson@redhat.com>
6662
6663 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6664 * linux-arm-low.c (arm_new_thread): Likewise.
6665 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6666 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6667 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6668 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6669
cff068da
GB
66702015-03-24 Gary Benson <gbenson@redhat.com>
6671
6672 * linux-low.c (ptid_of_lwp): New function.
6673 (lwp_is_stopped): Likewise.
6674 (lwp_stop_reason): Likewise.
6675 * linux-x86-low.c (update_debug_registers_callback):
6676 Use lwp_is_stopped.
6677 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6678 lwp_stop_reason.
6679
b2f7c7e8
GB
66802015-03-24 Gary Benson <gbenson@redhat.com>
6681
6682 * linux-low.h (linux_stop_lwp): Remove declaration.
6683
6d4ee8c6
GB
66842015-03-24 Gary Benson <gbenson@redhat.com>
6685
6686 * linux-low.h: Include nat/linux-nat.h.
6687 * linux-low.c (iterate_over_lwps_args): New structure.
6688 (iterate_over_lwps_filter): New function.
6689 (iterate_over_lwps): Likewise.
6690 * linux-x86-low.c (update_debug_registers_callback):
6691 Update signature to what iterate_over_lwps expects.
6692 Remove PID check that iterate_over_lwps now performs.
6693 (x86_dr_low_set_addr): Use iterate_over_lwps.
6694 (x86_dr_low_set_control): Likewise.
6695
70a0bb6b
GB
66962015-03-24 Gary Benson <gbenson@redhat.com>
6697
6698 * linux-x86-low.c (x86_debug_reg_state): New function.
6699 (x86_linux_prepare_to_resume): Use the above.
6700
7b669087
GB
67012015-03-24 Gary Benson <gbenson@redhat.com>
6702
6703 * linux-low.c (current_lwp_ptid): New function.
6704 * linux-x86-low.c: Include nat/linux-nat.h.
6705 (x86_dr_low_get_addr): Use current_lwp_ptid.
6706 (x86_dr_low_get_control): Likewise.
6707 (x86_dr_low_get_status): Likewise.
6708
eef49a3d
PA
67092015-03-20 Pedro Alves <palves@redhat.com>
6710
6711 * tracepoint.c (cmd_qtstatus): Make "str" const.
6712
b2333d22
PA
67132015-03-20 Pedro Alves <palves@redhat.com>
6714
6715 * server.c (handle_general_set): Make "req_str" const.
6716
23f238d3
PA
67172015-03-19 Pedro Alves <palves@redhat.com>
6718
6719 * linux-low.c (linux_resume_one_lwp): Rename to ...
6720 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6721 instead call perror_with_name.
6722 (check_ptrace_stopped_lwp_gone): New function.
6723 (linux_resume_one_lwp): Reimplement as wrapper around
6724 linux_resume_one_lwp_throw that swallows errors if the LWP is
6725 gone.
6726
91baf43f
PA
67272015-03-19 Pedro Alves <palves@redhat.com>
6728
6729 * linux-low.c (count_events_callback, select_event_lwp_callback):
6730 No longer check whether the thread has resume_stop as last resume
6731 kind.
6732
8bf3b159
PA
67332015-03-19 Pedro Alves <palves@redhat.com>
6734
6735 * linux-low.c (count_events_callback, select_event_lwp_callback):
6736 Use the lwp's status_pending_p field, not the thread's.
6737
b90fc188
PA
67382015-03-19 Pedro Alves <palves@redhat.com>
6739
6740 * linux-low.c (select_event_lwp_callback): Update comments to
6741 no longer mention SIGTRAP.
6742
464b0089
GB
67432015-03-18 Gary Benson <gbenson@redhat.com>
6744
6745 * server.c (handle_query): Do not report vFile:fstat as supported.
6746
aa9e327f
GB
67472015-03-11 Gary Benson <gbenson@redhat.com>
6748
6749 * hostio.c (sys/types.h): New include.
6750 (sys/stat.h): Likewise.
6751 (common-remote-fileio.h): Likewise.
6752 (handle_fstat): New function.
6753 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6754
791c0056
GB
67552015-03-11 Gary Benson <gbenson@redhat.com>
6756
6757 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6758 struct stat.st_blocks and struct stat.st_blksize.
6759 * configure: Regenerate.
6760 * config.in: Likewise.
6761 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6762 (OBS): Add common-remote-fileio.o.
6763 (common-remote-fileio.o): New rule.
6764
9a9df970
PA
67652015-03-09 Pedro Alves <palves@redhat.com>
6766
6767 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6768 'struct sockaddr' pointer in 'accept' call.
6769
9eb1356e
PA
67702015-03-09 Pedro Alves <palves@redhat.com>
6771
6772 Revert:
6773 2015-03-07 Pedro Alves <palves@redhat.com>
6774 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6775 or <winsock2.h> here. Instead include "gdb_socket.h".
6776 (remote_open): Use union gdb_sockaddr_u.
6777 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6778 or <winsock2.h> here. Instead include "gdb_socket.h".
6779 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6780 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6781 or <sys/un.h>.
6782 (init_named_socket, gdb_agent_helper_thread): Use union
6783 gdb_sockaddr_u.
6784
aac331e4
PA
67852015-03-07 Pedro Alves <palves@redhat.com>
6786
6787 * configure.ac (build_warnings): Move
6788 -Wdeclaration-after-statement to the C-specific set.
6789 * configure: Regenerate.
6790
366c75fc
PA
67912015-03-07 Pedro Alves <palves@redhat.com>
6792
6793 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6794 or <winsock2.h> here. Instead include "gdb_socket.h".
6795 (remote_open): Use union gdb_sockaddr_u.
6796 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6797 or <winsock2.h> here. Instead include "gdb_socket.h".
6798 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6799 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6800 or <sys/un.h>.
6801 (init_named_socket, gdb_agent_helper_thread): Use union
6802 gdb_sockaddr_u.
6803
492d29ea
PA
68042015-03-07 Pedro Alves <palves@redhat.com>
6805
6806 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6807 instead.
6808
60a191ed
YQ
68092015-03-06 Yao Qi <yao.qi@linaro.org>
6810
6811 * linux-aarch64-low.c (aarch64_insert_point): Use
6812 show_debug_regs as a boolean.
6813 (aarch64_remove_point): Likewise.
6814
f5771b1d
PA
68152015-03-05 Pedro Alves <palves@redhat.com>
6816
6817 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6818 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6819 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6820 * nto-low.c (nto_target_ops): Likewise.
6821 * spu-low.c (spu_target_ops): Likewise.
6822 * win32-low.c (win32_target_ops): Likewise.
6823
3e572f71
PA
68242015-03-04 Pedro Alves <palves@redhat.com>
6825
72f4393d 6826 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6827 Decide whether a breakpoint triggered based on the SIGTRAP's
6828 siginfo.si_code.
72f4393d
L
6829 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6830 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6831 (linux_low_filter_event): Check for breakpoints before checking
6832 watchpoints.
6833 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6834 siginfo.si_code.
72f4393d
L
6835 (linux_stopped_by_sw_breakpoint)
6836 (linux_supports_stopped_by_sw_breakpoint)
6837 (linux_stopped_by_hw_breakpoint)
6838 (linux_supports_stopped_by_hw_breakpoint): New functions.
6839 (linux_target_ops): Install new target methods.
3e572f71 6840
1ec68e26
PA
68412015-03-04 Pedro Alves <palves@redhat.com>
6842
6843 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6844 * server.c (swbreak_feature, hwbreak_feature): New globals.
6845 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6846 (captured_main): Clear swbreak_feature and hwbreak_feature.
6847 * server.h (swbreak_feature, hwbreak_feature): Declare.
6848 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6849 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6850 supports_stopped_by_hw_breakpoint>: New fields.
6851 (target_supports_stopped_by_sw_breakpoint)
6852 (target_stopped_by_sw_breakpoint)
6853 (target_supports_stopped_by_hw_breakpoint)
6854 (target_stopped_by_hw_breakpoint): Declare.
6855
15c66dd6
PA
68562015-03-04 Pedro Alves <palves@redhat.com>
6857
6858 enum lwp_stop_reason -> enum target_stop_reason
6859 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6860 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6861 (linux_wait_1, stuck_in_jump_pad_callback)
6862 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6863 (linux_stopped_by_watchpoint):
6864 * linux-low.h (enum lwp_stop_reason): Delete.
6865 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6866 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6867
98fc70d6
YQ
68682015-03-04 Yao Qi <yao.qi@linaro.org>
6869
6870 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6871
dd2ac174
GB
68722015-03-03 Gary Benson <gbenson@redhat.com>
6873
6874 * hostio.c (handle_vFile): Fix prefix lengths.
6875
d68e53f4
MM
68762015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6877
6878 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6879 ptr_bits.
6880
bf2d68ab
AA
68812015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6882
6883 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6884 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6885 (clean): Add "rm -f" for above C files.
6886 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6887 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6888 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6889 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6890 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6891 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6892 (init_registers_s390x_vx_linux64)
6893 (init_registers_s390x_tevx_linux64)
6894 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6895 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6896 declarations.
6897 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6898 (s390_store_vxrs_high): New functions.
6899 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6900 NT_S390_VXRS_HIGH.
6901 (s390_arch_setup): Add logic for selecting one of the new target
6902 descriptions. Activate the new vector regsets if applicable.
6903 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6904 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6905 and init_registers_s390x_tevx_linux64.
6906
c966a859
PA
69072015-03-01 Pedro Alves <palves@redhat.com>
6908
6909 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6910 parameter.
6911
4180215b
PA
69122015-02-27 Pedro Alves <palves@redhat.com>
6913
6914 * linux-x86-low.c (u_debugreg_offset): New function.
6915 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6916
749bab01
PA
69172015-02-27 Pedro Alves <palves@redhat.com>
6918
6919 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6920 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6921 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6922 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6923 (ps_lsetfpregs, ps_getpid)
6924 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6925 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6926 (ps_lsetxregs, ps_plog): Declare.
6927
3c14e5a3
PA
69282015-02-27 Pedro Alves <palves@redhat.com>
6929
6930 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6931 IP_AGENT_EXPORT_FUNC.
6932 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6933 IP_AGENT_EXPORT_FUNC.
6934 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6935 (IP_AGENT_EXPORT): Delete.
6936 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6937 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6938 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6939 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6940 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6941 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6942 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6943 (traceframe_read_count, traceframe_write_count)
6944 (traceframes_created, trace_state_variables, get_raw_reg)
6945 (get_trace_state_variable_value, set_trace_state_variable_value)
6946 (ust_loaded, helper_thread_id, cmd_buf): Use
6947 IPA_SYM_EXPORTED_NAME.
6948 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6949 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6950 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6951 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6952 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6953 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6954 EXTERN_C_PUSH/EXTERN_C_POP.
6955 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6956 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6957 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6958 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6959 (traceframe_write_count, traceframe_read_count)
6960 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6961 (about_to_request_buffer_space, get_trace_state_variable_value)
6962 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6963 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6964 EXTERN_C_PUSH/EXTERN_C_POP.
6965 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6966 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6967 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6968 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6969 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6970 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6971 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6972 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6973 Define.
6974 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6975 (IP_AGENT_EXPORT_VAR_DECL): Define.
6976 (tracing): Declare.
6977 (gdb_agent_get_raw_reg): Declare.
6978
fe978cb0
PA
69792015-02-27 Tom Tromey <tromey@redhat.com>
6980 Pedro Alves <palves@redhat.com>
6981
6982 Rename symbols whose names are reserved C++ keywords throughout.
6983
3bc3d82a
PA
69842015-02-27 Pedro Alves <palves@redhat.com>
6985
6986 * Makefile.in (COMPILER): New, get it from autoconf.
6987 (CXX): Get from autoconf instead.
6988 (COMPILE.pre): Use COMPILER.
6989 (CC-LD): Rename to ...
6990 (CC_LD): ... this. Use COMPILER.
6991 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6992 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6993 * acinclude.m4: Include build-with-cxx.m4.
6994 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6995 Disable -Werror by default if building in C++ mode.
6996 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6997 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6998 the C++ compiler. Save/restore CXXFLAGS too.
6999 * configure: Regenerate.
7000
07697489
PA
70012015-02-27 Pedro Alves <palves@redhat.com>
7002
7003 * acinclude.m4: Include libiberty.m4.
7004 * configure.ac: Call libiberty_INIT.
7005 * config.in, configure: Regenerate.
7006
9beb7c4e
PA
70072015-02-26 Pedro Alves <palves@redhat.com>
7008
7009 * linux-low.c (linux_wait_1): When incrementing the PC past a
7010 program breakpoint always use the_low_target.breakpoint_len as
7011 increment, rather than the maximum between that and
7012 the_low_target.decr_pc_after_break.
7013
8090aef2
PA
70142015-02-23 Pedro Alves <palves@redhat.com>
7015
7016 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7017 thread was doing a step-over; always adjust the PC if
7018 we stepped over a permanent breakpoint.
7019 (linux_wait_1): If we stepped over breakpoint that was on top of a
7020 permanent breakpoint, manually advance the PC past it.
7021
bc9540e8
PA
70222015-02-23 Pedro Alves <palves@redhat.com>
7023
7024 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7025 modes.
7026 (x86_fill_gregset, x86_store_gregset): Use it when handling
7027 $orig_eax.
7028
2db9a427
PA
70292015-02-20 Pedro Alves <palves@redhat.com>
7030
7031 * thread-db.c: Include "nat/linux-procfs.h".
7032 (thread_db_init): Skip listing new threads if the kernel supports
7033 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7034
afa8d396
PA
70352015-02-20 Pedro Alves <palves@redhat.com>
7036
7037 * linux-low.c (status_pending_p_callback): Use ptid_match.
7038
c9587f88
AT
70392015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7040
7041 PR breakpoints/16812
7042 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7043 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7044 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7045
b05ec7a5
AT
70462015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7047
7048 PR breakpoints/15956
7049 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7050
d33501a5
MM
70512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7052
7053 * linux-low.c (linux_low_btrace_conf): Print size.
7054 * server.c (handle_btrace_conf_general_set): New.
7055 (hanle_general_set): Call handle_btrace_conf_general_set.
7056 (handle_query): Report Qbtrace-conf:bts:size as supported.
7057
f4abbc16
MM
70582015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7059
7060 * linux-low.c (linux_low_enable_btrace): Update parameters.
7061 (linux_low_btrace_conf): New.
7062 (linux_target_ops)<to_btrace_conf>: Initialize.
7063 * server.c (current_btrace_conf): New.
7064 (handle_btrace_enable): Rename to ...
7065 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7066 to target_enable_btrace. Update comment. Update users.
7067 (handle_qxfer_btrace_conf): New.
7068 (qxfer_packets): Add btrace-conf entry.
7069 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7070 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7071 (target_ops)<read_btrace_conf>: New.
7072 (target_enable_btrace): Update parameters.
7073 (target_read_btrace_conf): New.
7074
043c3577
MM
70752015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7076
7077 * server.c (handle_btrace_general_set): Remove call to
7078 target_supports_btrace.
7079 (supported_btrace_packets): New.
7080 (handle_query): Call supported_btrace_packets.
7081 * target.h: include btrace-common.h.
7082 (btrace_target_info): Removed.
7083 (supports_btrace, target_supports_btrace): Update parameters.
7084
734b0e4b
MM
70852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7086
7087 * Makefile.in (SFILES): Add common/btrace-common.c.
7088 (OBS): Add common/btrace-common.o.
7089 (btrace-common.o): Add build rules.
7090 * linux-low: Include btrace-common.h.
7091 (linux_low_read_btrace): Use struct btrace_data. Call
7092 btrace_data_init and btrace_data_fini.
7093
d6c146e9
PA
70942015-02-06 Pedro Alves <palves@redhat.com>
7095
7096 * thread-db.c (find_new_threads_callback): Add debug output.
7097
20ba1ce6
PA
70982015-02-04 Pedro Alves <palves@redhat.com>
7099
7100 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7101 (resume_stopped_resumed_lwps): New function.
7102 (linux_wait_for_event_filtered): Use it.
7103
8cc73a39
SDJ
71042015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7105
7106 * Makefile.in (SFILES): Add linux-personality.c.
7107 (linux-personality.o): New rule.
7108 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7109 list of objects to be built.
7110 * linux-low.c: Include nat/linux-personality.h.
7111 (linux_create_inferior): Remove code to disable address space
7112 randomization (moved to ../nat/linux-personality.c). Create
7113 cleanup to disable address space randomization.
7114
fb23d554
SDJ
71152015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7116
7117 * Makefile.in (posix-strerror.o): New rule.
7118 (mingw-strerror.o): Likewise.
7119 * configure: Regenerated.
7120 * configure.ac: Source file ../common/common.host. Initialize new
7121 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7122
cdf43629
YQ
71232015-01-14 Yao Qi <yao@codesourcery.com>
7124
7125 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7126 (ppc-linux.o): New rule.
7127 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7128 * configure.ac: AC_CHECK_FUNCS(getauxval).
7129 * config.in: Re-generated.
7130 * configure: Re-generated.
7131 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7132 ppc64_64bit_inferior_p
7133
514c5338
YQ
71342015-01-14 Yao Qi <yao@codesourcery.com>
7135
7136 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7137 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7138 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7139 (PT_ORIG_R3, PT_TRAP): Likewise.
7140 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7141 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7142 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7143
3368c1e5
JB
71442015-01-10 Joel Brobecker <brobecker@adacore.com>
7145
7146 * i387-fp.c (i387_cache_to_xsave): In look over
7147 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7148 zmmh_low_space field by use of zmmh_high_space.
7149
582511be
PA
71502015-01-09 Pedro Alves <palves@redhat.com>
7151
7152 * linux-low.c (step_over_bkpt): Move higher up in the file.
7153 (handle_extended_wait): Don't store the stop_pc here.
7154 (get_stop_pc): Adjust comments and rename to ...
7155 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7156 stopped for a software breakpoint or hardware breakpoint.
7157 (thread_still_has_status_pending_p): New function.
7158 (status_pending_p_callback): Use
7159 thread_still_has_status_pending_p. If the event is no longer
7160 interesting, resume the LWP.
7161 (handle_tracepoints): Add assert.
7162 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7163 (wstatus_maybe_breakpoint): New function.
7164 (cancel_breakpoint): Delete function.
7165 (check_stopped_by_watchpoint): New function, factored out from
7166 linux_low_filter_event.
7167 (lp_status_maybe_breakpoint): Delete function.
7168 (linux_low_filter_event): Remove filter_ptid argument.
7169 Leave thread group exits pending here. Store the LWP's stop PC.
7170 Always leave events pending.
7171 (linux_wait_for_event_filtered): Pull all events out of the
7172 kernel, and leave them all pending.
7173 (count_events_callback, select_event_lwp_callback): Consider all
7174 events.
7175 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7176 (select_event_lwp): Only give preference to the stepping LWP in
7177 all-stop mode. Adjust comments.
7178 (ignore_event): New function.
7179 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7180 references to cancel_breakpoints. Adjust to renames. Also give
7181 equal priority to all LWPs that have had events in non-stop mode.
7182 If reporting a software breakpoint event, unadjust the LWP's PC.
7183 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7184 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7185 Adjust.
7186 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7187 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7188 (linux_stopped_by_watchpoint): Adjust.
7189 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7190 * linux-low.h (enum lwp_stop_reason): New.
7191 (struct lwp_info) <stop_pc>: Adjust comment.
7192 <stopped_by_watchpoint>: Delete field.
7193 <stop_reason>: New field.
7194 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7195 * mem-break.c (software_breakpoint_inserted_here)
7196 (hardware_breakpoint_inserted_here): New function.
7197 * mem-break.h (software_breakpoint_inserted_here)
7198 (hardware_breakpoint_inserted_here): Declare.
7199 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7200 (cancel_breakpoints): Delete.
7201 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7202 (upload_fast_traceframes): Remove references to
7203 cancel_breakpoints.
7204
a33e3959
PA
72052015-01-09 Pedro Alves <palves@redhat.com>
7206
7207 * thread-db.c (find_new_threads_callback): Ignore thread if the
7208 kernel thread ID is -1.
7209
8784d563
PA
72102015-01-09 Pedro Alves <palves@redhat.com>
7211
7212 * linux-low.c (linux_attach_fail_reason_string): Move to
7213 nat/linux-ptrace.c, and rename.
7214 (linux_attach_lwp): Update comment.
7215 (attach_proc_task_lwp_callback): New function.
7216 (linux_attach): Adjust to rename and use
7217 linux_proc_attach_tgid_threads.
7218 (linux_attach_fail_reason_string): Delete declaration.
7219
76f2b779
JB
72202015-01-01 Joel Brobecker <brobecker@adacore.com>
7221
7222 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7223 * server.c (gdbserver_version): Likewise.
7224
fafcc06a
SDJ
72252014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7226
7227 * remote-utils.c: Include ctype.h.
7228 (input_interrupt): Explicitly handle the case when the char
7229 received is the NUL byte. Improve the printing of non-ASCII
7230 characters.
7231
beed38b8
JB
72322014-12-16 Joel Brobecker <brobecker@adacore.com>
7233
7234 * linux-low.c (linux_low_filter_event): Update call to
7235 linux_enable_event_reporting following the addition of
7236 a new parameter to that function.
7237
bf330350
CU
72382014-12-16 Catalin Udma <catalin.udma@freescale.com>
7239
7240 PR server/17457
7241 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7242 (AARCH64_FPCR_REGNO): Likewise.
7243 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7244 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7245 (aarch64_store_fpregset): Likewise.
7246
5227d625
JB
72472014-12-15 Joel Brobecker <brobecker@adacore.com>
7248
7249 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7250 Remove FIXME comment about assumption about N.
7251
f93b65a0
JB
72522014-12-13 Joel Brobecker <brobecker@adacore.com>
7253
7254 * configure.ac: If large-file support is disabled in GDBserver,
7255 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7256 * configure: Regenerate.
7257
e5a9158d
AA
72582014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7259
7260 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7261 warning upon ENODATA from ptrace.
7262 * linux-s390-low.c (s390_store_tdb): New.
7263 (s390_regsets): Add regset for NT_S390_TDB.
7264
feea5f36
AA
72652014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7266
7267 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7268 without a fill_function.
7269 * linux-s390-low.c (s390_fill_last_break): Remove.
7270 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7271 (s390_arch_setup): Use regset's size instead of fill_function for
7272 loop end condition.
7273
098dbe61
AA
72742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7275
7276 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7277 the regset's store function when ptrace returned an error.
7278 * regcache.c (get_thread_regcache): Invalidate register cache
7279 before fetching inferior's registers.
7280
28eef672
AA
72812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7282
7283 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7284 while-loop as for-loop.
7285 (regsets_store_inferior_registers): Likewise.
7286
bdca27a2
YQ
72872014-11-28 Yao Qi <yao@codesourcery.com>
7288
7289 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7290 * config.in, configure: Re-generate.
7291 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7292 is defined.
7293
9c232dda
YQ
72942014-11-21 Yao Qi <yao@codesourcery.com>
7295
7296 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7297 (AC_CHECK_HEADERS): Remove malloc.h.
7298 * configure: Re-generated.
7299 * config.in: Re-generated.
7300 * server.h: Don't include alloca.h and malloc.h.
7301 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7302 Don't include malloc.h.
7303
43968415
JB
73042014-11-17 Joel Brobecker <brobecker@adacore.com>
7305
7306 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7307 corresponding ERRNO check in same block.
7308
40e91bc7
PA
73092014-11-12 Pedro Alves <palves@redhat.com>
7310
7311 * server.c (cont_thread): Update comment.
7312 (start_inferior, attach_inferior): No longer clear cont_thread.
7313 (handle_v_cont): No longer set cont_thread.
7314 (captured_main): Clear cont_thread each time a GDB connects.
7315
c2c118cf
PA
73162014-11-12 Pedro Alves <palves@redhat.com>
7317
7318 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7319 thread, and don't resume all threads if the Hc thread has exited.
7320
78708b7c
PA
73212014-11-12 Pedro Alves <palves@redhat.com>
7322
7323 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7324 the process group instead of to a specific LWP.
7325
a2abc7de
PA
73262014-10-15 Pedro Alves <palves@redhat.com>
7327
7328 PR server/17487
7329 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7330 parameter.
7331 (arm_set_thread_context): Delete.
7332 (the_low_target): Adjust.
7333 * win32-i386-low.c (debug_registers_changed)
7334 (debug_registers_used): Delete.
7335 (update_debug_registers_callback): New function.
7336 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7337 needing to update their debug registers.
7338 (win32_get_current_dr): New function.
7339 (x86_dr_low_get_addr, x86_dr_low_get_control)
7340 (x86_dr_low_get_status): Fetch the debug register from the thread
7341 record's context.
7342 (i386_initial_stuff): Adjust.
7343 (i386_get_thread_context): Remove current_event parameter. Don't
7344 clear debug_registers_changed nor copy DR values to
7345 debug_reg_state.
7346 (i386_set_thread_context): Delete.
7347 (i386_prepare_to_resume): New function.
7348 (i386_thread_added): Mark the thread as needing to update irs
7349 debug registers.
7350 (the_low_target): Remove i386_set_thread_context and install
7351 i386_prepare_to_resume.
7352 * win32-low.c (win32_get_thread_context): Adjust.
7353 (win32_set_thread_context): Use SetThreadContext
7354 directly.
7355 (win32_prepare_to_resume): New function.
7356 (win32_require_context): New function, factored out from ...
7357 (thread_rec): ... this.
7358 (continue_one_thread): Call win32_prepare_to_resume on each thread
7359 we're about to continue.
7360 (win32_resume): Call win32_prepare_to_resume on the event thread.
7361 * win32-low.h (struct win32_thread_info)
7362 <debug_registers_changed>: New field.
7363 (struct win32_target_ops): Change prototype of set_thread_context,
7364 delete set_thread_context and add prepare_to_resume.
7365 (win32_require_context): New declaration.
7366
a442d071
GB
73672014-10-08 Gary Benson <gbenson@redhat.com>
7368
7369 * server.h: Do not include common-exceptions.h.
7370
6f1947e8
GB
73712014-10-08 Gary Benson <gbenson@redhat.com>
7372
7373 * server.h: Do not include cleanups.h.
7374
63b434a4
JH
73752014-09-30 James Hogan <james.hogan@imgtec.com>
7376
7377 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7378 mips64-dsp-linux.c.
7379
c4d9ceb6
YQ
73802014-09-23 Yao Qi <yao@codesourcery.com>
7381
7382 * linux-low.c (lp_status_maybe_breakpoint): New function.
7383 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7384 (count_events_callback): Likewise.
7385 (select_event_lwp_callback): Likewise.
7386 (cancel_breakpoints_callback): Likewise.
7387
89a5711c
DB
73882014-09-19 Don Breazeal <donb@codesourcery.com>
7389
7390 * linux-low.c (handle_extended_wait): Call
7391 linux_ptrace_get_extended_event.
7392 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7393 linux_is_extended_waitstatus.
7394
bffc0964
JB
73952014-09-16 Joel Brobecker <brobecker@adacore.com>
7396
7397 * Makefile.in (CPPFLAGS): Define.
7398 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7399 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7400
0bfdf32f
GB
74012014-09-16 Gary Benson <gbenson@redhat.com>
7402
7403 * inferiors.h (current_inferior): Renamed as...
7404 (current_thread): New variable. All uses updated.
7405 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7406 (maybe_move_out_of_jump_pad): Likewise.
7407 (cancel_breakpoint): Likewise.
7408 (linux_low_filter_event): Likewise.
7409 (wait_for_sigstop): Likewise.
7410 (linux_resume_one_lwp): Likewise.
7411 (need_step_over_p): Likewise.
7412 (start_step_over): Likewise.
7413 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7414 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7415 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7416 and save_inferior as saved_thread.
7417 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7418 saved_thread.
7419 (regcache_invalidate_thread): Likewise.
7420 * remote-utils.c (prepare_resume_reply): Likewise.
7421 * thread-db.c (thread_db_get_tls_address): Likewise.
7422 (disable_thread_event_reporting): Likewise.
7423 (remove_thread_event_breakpoints): Likewise.
7424 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7425 as saved_thread.
7426 * target.h (set_desired_inferior): Renamed as...
7427 (set_desired_thread): New declaration. All uses updated.
7428 * server.c (myresume): Updated comment to reference thread instead
7429 of inferior.
7430 (handle_serial_event): Likewise.
7431 (handle_target_event): Likewise.
7432
361c8ade
GB
74332014-09-12 Tom Tromey <tromey@redhat.com>
7434 Gary Benson <gbenson@redhat.com>
7435
7436 * regcache.h: Include common-regcache.h.
7437 (regcache_read_pc): Don't declare.
7438 * regcache.c (get_thread_regcache_for_ptid): New function.
7439
bd9269f7
GB
74402014-09-11 Tom Tromey <tromey@redhat.com>
7441 Gary Benson <gbenson@redhat.com>
7442
7443 * symbol.c: New file.
7444 * Makefile.in (SFILES): Add symbol.c.
7445 (OBS): Add symbol.o.
7446
f8c1d06b
GB
74472014-09-11 Gary Benson <gbenson@redhat.com>
7448
7449 * target.c (target_stop_ptid, target_continue_ptid): New
7450 functions.
7451
721ec300
GB
74522014-09-11 Tom Tromey <tromey@redhat.com>
7453 Gary Benson <gbenson@redhat.com>
7454
7455 * target.h: Include target/target.h.
7456 * target.c (target_read_memory, target_read_uint32)
7457 (target_write_memory): New functions.
7458
c5e92cca
GB
74592014-09-11 Gary Benson <gbenson@redhat.com>
7460
7461 * server.h (debug_hw_points): Don't declare.
7462 * server.c (debug_hw_points): Don't define. Replace all uses
7463 with show_debug_regs.
7464 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7465 all uses with show_debug_regs.
7466
2e4bb98a
EBM
74672014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7468
7469 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7470 endianness into account.
7471 (ppc_supply_ptrace_register): Likewise.
7472
ac740bc7
JH
74732014-09-03 James Hogan <james.hogan@imgtec.com>
7474
7475 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7476 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7477
97ea6506
GB
74782014-09-03 Gary Benson <gbenson@redhat.com>
7479
7480 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7481 ALL_DEBUG_ADDRESS_REGISTERS.
7482
df7e5265
GB
74832014-09-02 Gary Benson <gbenson@redhat.com>
7484
7485 * i386-low.h: Renamed as...
7486 * x86-low.h: New file. All type, function and variable name
7487 prefixes changed from "i386_" to "x86_". All references updated.
7488 * i386-low.c: Renamed as...
7489 * x86-low.c: New file. All type, function and variable name
7490 prefixes changed from "i386_" to "x86_". All references updated.
7491
ed859da7
GB
74922014-09-02 Gary Benson <gbenson@redhat.com>
7493
7494 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7495 (x86_linux_new_thread): Likewise.
7496
860789c7
GB
74972014-08-29 Gary Benson <gbenson@redhat.com>
7498
7499 * server.h (setjmp.h): Do not include.
7500 (toplevel): Do not declare.
7501 (common-exceptions.h): Include.
7502 (cleanups.h): Likewise.
7503 * server.c (toplevel): Do not define.
7504 (exit_code): New static global.
7505 (detach_or_kill_for_exit_cleanup): New function.
7506 (main): New function. Original main renamed to...
7507 (captured_main): New function.
7508 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7509
ff55e1b5
GB
75102014-08-29 Gary Benson <gbenson@redhat.com>
7511
7512 * Makefile.in (SFILES): Add common/common-exceptions.c.
7513 (OBS): Add common-exceptions.o.
7514 (common-exceptions.o): New rule.
7515 * utils.c (prepare_to_throw_exception): New function.
7516
e9bcb658
GB
75172014-08-29 Gary Benson <gbenson@redhat.com>
7518
7519 * config.in: Regenerate.
7520 * configure: Likewise.
7521
e3180625
GB
75222014-08-29 Gary Benson <gbenson@redhat.com>
7523
7524 * Makefile.in (SFILES): Add common/cleanups.c.
7525 (OBS): cleanups.o.
7526 (cleanups.o): New rule.
7527
e3d6ba5d
GB
75282014-08-29 Gary Benson <gbenson@redhat.com>
7529
7530 * utils.c (internal_vwarning): New function.
7531
7096e886
GB
75322014-08-28 Gary Benson <gbenson@redhat.com>
7533
7534 * utils.h (fatal): Remove declaration.
7535 * utils.c (fatal): Remove function.
7536
14ce3192
GB
75372014-08-28 Gary Benson <gbenson@redhat.com>
7538
7539 * tracepoint.c (gdb_agent_init): Replace fatal with
7540 perror_with_name.
7541 (initialize_tracepoint): Likewise.
7542
50278d59
GB
75432014-08-28 Gary Benson <gbenson@redhat.com>
7544
7545 * remote-utils.c (remote_prepare): Replace fatal with error.
7546
aa96c426
GB
75472014-08-28 Gary Benson <gbenson@redhat.com>
7548
7549 * linux-low.c (linux_async): Replace fatal with warning.
7550 Tidy up and return.
7551 (linux_start_non_stop): Return -1 if linux_async failed.
7552
f7160e97
GB
75532014-08-28 Gary Benson <gbenson@redhat.com>
7554
7555 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7556 gdb_assert.
7557 (i386_dr_low_get_addr): Remove vague comment.
7558 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7559 gdb_assert.
7560
38e08fca
GB
75612014-08-28 Gary Benson <gbenson@redhat.com>
7562
7563 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7564 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7565 internal_error.
7566 (linux_resume_one_lwp): Likewise.
7567 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7568 gdb_assert.
7569 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7570 with internal_error.
7571 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7572 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7573 (find_register_by_name): Replace fatal with internal_error.
7574 (find_regno): Likewise.
7575 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7576 * thread-db.c (thread_db_create_event): Likewise.
7577 (thread_db_load_search): Likewise.
7578 (try_thread_db_load_1): Likewise.
7579 * tracepoint.c (get_jump_space_head): Replace fatal with
7580 internal_error.
7581 (claim_trampoline_space): Likewise.
7582 (have_fast_tracepoint_trampoline_buffer): Likewise.
7583 (cmd_qtstart): Likewise.
7584 (stop_tracing): Likewise.
7585 (fast_tracepoint_collecting): Likewise.
7586 (target_malloc): Likewise.
7587 (download_tracepoint): Likewise.
7588 (download_trace_state_variables): Replace check with gdb_assert.
7589 (upload_fast_traceframes): Replace fatal with internal_error.
7590
34abf635
GB
75912014-08-19 Tom Tromey <tromey@redhat.com>
7592 Gary Benson <gbenson@redhat.com>
7593
7594 * Makefile.in (SFILES): Add common/common-debug.c.
7595 (OBS): Add common-debug.o.
7596 (common-debug.o): New rule.
7597 * debug.h (debug_printf): Don't declare.
7598 * debug.c (debug_printf): Renamed and rewritten as...
7599 (debug_vprintf): New function.
7600
f6e94d78
GB
76012014-08-19 Gary Benson <gbenson@redhat.com>
7602
7603 * utils.h: Do not include print-utils.h.
7604
9239eeab
GB
76052014-08-19 Tom Tromey <tromey@redhat.com>
7606 Gary Benson <gbenson@redhat.com>
7607
7608 * server.h: Add static assertion.
7609 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7610
ef87c8bb
GB
76112014-08-19 Tom Tromey <tromey@redhat.com>
7612 Gary Benson <gbenson@redhat.com>
7613
7614 * Makefile.in (SFILES): Add common/errors.c.
7615 (OBS): Add errors.o.
7616 (IPA_OBS): Add errors-ipa.o.
7617 (errors.o): New rule.
7618 (errors-ipa.o): Likewise.
7619 * utils.h (perror_with_name, error, warning): Don't declare.
7620 * utils.c (warning): Renamed and rewritten as...
7621 (vwarning): New function.
7622 (error): Renamed and rewritten as...
7623 (verror): New function.
7624 (internal_error): Renamed and rewritten as...
7625 (internal_verror): New function.
7626
bb974a24
GB
76272014-08-07 Gary Benson <gbenson@redhat.com>
7628
7629 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7630 * configure: Regenerate.
7631 * config.in: Likewise.
7632 * server.h: Do not include errno.h.
7633 * event-loop.c: Likewise.
7634 * hostio-errno.c: Likewise.
7635 * linux-low.c: Likewise.
7636 * remote-utils.c: Likewise.
7637 * spu-low.c: Likewise.
7638 * utils.c: Likewise.
7639 * gdbreplay.c: Unconditionally include errno.h.
7640
6d3d12eb
GB
76412014-08-07 Gary Benson <gbenson@redhat.com>
7642
7643 * server.h: Do not include string.h.
7644 * event-loop.c: Likewise.
7645 * linux-low.c: Likewise.
7646 * regcache.c: Likewise.
7647 * remote-utils.c: Likewise.
7648 * spu-low.c: Likewise.
7649 * utils.c: Likewise.
7650
dccbb609
GB
76512014-08-07 Gary Benson <gbenson@redhat.com>
7652
7653 * server.h: Do not include gdb_assert.h.
7654
e76df0d0
GB
76552014-08-07 Gary Benson <gbenson@redhat.com>
7656
7657 * server.h: Do not include common-utils.h.
7658
4cb9c816
GB
76592014-08-07 Gary Benson <gbenson@redhat.com>
7660
7661 * server.h: Do not include ptid.h.
7662 * notif.h: Likewise.
7663
3995eeee
GB
76642014-08-07 Gary Benson <gbenson@redhat.com>
7665
7666 * server.h: Do not include gdb_locale.h.
7667
cb9f1a9b
GB
76682014-08-07 Gary Benson <gbenson@redhat.com>
7669
7670 * server.h: Do not include gdb/signals.h.
7671 * win32-low.c: Likewise.
7672
a5fceff8
GB
76732014-08-07 Gary Benson <gbenson@redhat.com>
7674
7675 * server.h: Do not include pathmax.h.
7676
b9391142
GB
76772014-08-07 Gary Benson <gbenson@redhat.com>
7678
7679 * server.h: Do not include libiberty.h.
7680 * linux-bfin-low.c: Likewise.
7681
0e443c87
GB
76822014-08-07 Gary Benson <gbenson@redhat.com>
7683
7684 * server.h: Do not include ansidecl.h.
7685
8ebb3f56
GB
76862014-08-07 Gary Benson <gbenson@redhat.com>
7687
7688 * linux-x86-low.c: Do not include stddef.h.
7689 * lynx-ppc-low.c: Likewise.
7690 * tracepoint.c: Likewise.
7691
8980bdf6
GB
76922014-08-07 Gary Benson <gbenson@redhat.com>
7693
7694 * server.h: Do not include stdarg.h.
7695 * nto-low.c: Likewise.
7696
d7096f71
GB
76972014-08-07 Gary Benson <gbenson@redhat.com>
7698
7699 * server.h: Do not include stdlib.h.
7700 * inferiors.c: Likewise.
7701 * linux-low.c: Likewise.
7702 * regcache.c: Likewise.
7703 * spu-low.c: Likewise.
7704 * tracepoint.c: Likewise.
7705 * utils.c: Likewise.
7706
d02f550d
GB
77072014-08-07 Gary Benson <gbenson@redhat.com>
7708
7709 * server.h: Do not include stdio.h.
7710 * linux-low.c: Likewise.
7711 * remote-utils.c: Likewise.
7712 * spu-low.c: Likewise.
7713 * utils.c: Likewise.
7714 * wincecompat.c: Likewise.
7715
87f6c4e3
GB
77162014-08-06 Gary Benson <gbenson@redhat.com>
7717
7718 * regcache.c (init_register_cache): Move conditionals inside if.
7719
7089dca4
GB
77202014-08-06 Gary Benson <gbenson@redhat.com>
7721
7722 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7723
462f517e
GB
77242014-07-31 Gary Benson <gbenson@redhat.com>
7725
7726 * ax.h: Do not include server.h.
7727 * gdbthread.h: Likewise.
7728 * lynx-low.h: Likewise.
7729 * notif.h: Likewise.
7730
976411d6
GB
77312014-07-30 Gary Benson <gbenson@redhat.com>
7732
7733 * server.h: Include common-defs.h.
7734 Do not include config.h or build-gnulib-gdbserver/config.h.
7735
d41f6d8e
GB
77362014-07-30 Gary Benson <gbenson@redhat.com>
7737
7738 * hostio-errno.c: Move server.h to top of includes list.
7739 * inferiors.c: Likewise.
7740 * linux-x86-low.c: Likewise.
7741 * notif.c: Include server.h.
7742
314c6a35
TT
77432014-07-24 Tom Tromey <tromey@redhat.com>
7744 Gary Benson <gbenson@redhat.com>
7745
7746 * server.h (CORE_ADDR): Now unsigned.
7747
69ff6be5
PA
77482014-07-16 Pedro Alves <palves@redhat.com>
7749
7750 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7751
ce9e3fe7
PA
77522014-07-15 Pedro Alves <palves@redhat.com>
7753
7754 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7755 copy.
7756
e76126e8
PA
77572014-07-11 Pedro Alves <palves@redhat.com>
7758
7759 * linux-low.c (kill_wait_lwp): New function, based on
7760 kill_one_lwp_callback, but use my_waitpid directly.
7761 (kill_one_lwp_callback, linux_kill): Use it.
7762
8e9db26e
PA
77632014-06-23 Pedro Alves <palves@redhat.com>
7764
7765 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7766 before setting DR0..DR3.
7767
698b3e08
GB
77682014-06-20 Gary Benson <gbenson@redhat.com>
7769
7770 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7771 * configure: Regenerated.
7772 * config.in: Likewise.
7773
125f8a3d
GB
77742014-06-20 Gary Benson <gbenson@redhat.com>
7775
7776 * Makefile.in (SFILES): Update locations for files moved
7777 from common to nat.
7778 (object file files): Reordered.
7779
42995dbd
GB
77802014-06-20 Gary Benson <gbenson@redhat.com>
7781
7782 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7783 (i386_dr_low_set_addr): Likewise.
7784 (i386_dr_low_get_addr): Likewise.
7785 (i386_dr_low_can_set_control): Likewise.
7786 (i386_dr_low_set_control): Likewise.
7787 (i386_dr_low_get_control): Likewise.
7788 (i386_dr_low_get_status): Likewise.
7789 (i386_get_debug_register_length): Likewise.
7790 * linux-x86-low.c (i386_dr_low_set_addr):
7791 Changed signature. Made static.
7792 (i386_dr_low_get_addr): Likewise.
7793 (i386_dr_low_set_control): Likewise.
7794 (i386_dr_low_get_control): Likewise.
7795 (i386_dr_low_get_status): Likewise.
7796 (i386_dr_low): New global variable.
7797 * win32-i386-low.c (i386_dr_low_set_addr):
7798 Changed signature. Made static.
7799 (i386_dr_low_get_addr): Likewise.
7800 (i386_dr_low_set_control): Likewise.
7801 (i386_dr_low_get_control): Likewise.
7802 (i386_dr_low_get_status): Likewise.
7803 (i386_dr_low): New global variable.
7804
e1d2394b
MS
78052014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7806
7807 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7808 * Makefile.in (AR, AR_FLAGS): Define.
7809 * configure: Regenerate.
7810
3a8ee006
GB
78112014-06-19 Gary Benson <gbenson@redhat.com>
7812
7813 * Makefile.in (i386-dregs.o): New rule.
7814 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7815 * i386-low.c (target.h): Remove include.
7816 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7817 (DR_CONTROL_SHIFT): Likewise.
7818 (DR_CONTROL_SIZE): Likewise.
7819 (DR_RW_EXECUTE): Likewise.
7820 (DR_RW_WRITE): Likewise.
7821 (DR_RW_READ): Likewise.
7822 (DR_RW_IORW): Likewise.
7823 (DR_LEN_1): Likewise.
7824 (DR_LEN_2): Likewise.
7825 (DR_LEN_4): Likewise.
7826 (DR_LEN_8): Likewise.
7827 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7828 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7829 (DR_ENABLE_SIZE): Likewise.
7830 (DR_LOCAL_SLOWDOWN): Likewise.
7831 (DR_GLOBAL_SLOWDOWN): Likewise.
7832 (DR_CONTROL_RESERVED): Likewise.
7833 (I386_DR_CONTROL_MASK): Likewise.
7834 (I386_DR_VACANT): Likewise.
7835 (I386_DR_LOCAL_ENABLE): Likewise.
7836 (I386_DR_GLOBAL_ENABLE): Likewise.
7837 (I386_DR_DISABLE): Likewise.
7838 (I386_DR_SET_RW_LEN): Likewise.
7839 (I386_DR_GET_RW_LEN): Likewise.
7840 (I386_DR_WATCH_HIT): Likewise.
7841 (i386_wp_op_t): Likewise.
7842 (i386_show_dr): Likewise.
7843 (i386_length_and_rw_bits): Likewise.
7844 (i386_insert_aligned_watchpoint): Likewise.
7845 (i386_remove_aligned_watchpoint): Likewise.
7846 (i386_handle_nonaligned_watchpoint): Likewise.
7847 i386_update_inferior_debug_regs(): Likewise.
7848 (i386_dr_insert_watchpoint): Likewise.
7849 (i386_dr_remove_watchpoint): Likewise.
7850 (i386_dr_region_ok_for_watchpoint): Likewise.
7851 (i386_dr_stopped_data_address): Likewise.
7852 (i386_dr_stopped_by_watchpoint): Likewise.
7853
8f26655c
GB
78542014-06-19 Gary Benson <gbenson@redhat.com>
7855
7856 * i386-low.c (i386_dr_show): Renamed to
7857 i386_show_dr and made static. All uses updated.
7858 (i386_dr_length_and_rw_bits): Renamed to
7859 i386_length_and_rw_bits and made static.
7860 All uses updated.
7861 (i386_dr_insert_aligned_watchpoint): Renamed to
7862 i386_insert_aligned_watchpoint and made static.
7863 All uses updated.
7864 (i386_dr_remove_aligned_watchpoint): Renamed to
7865 i386_remove_aligned_watchpoint and made static.
7866 All uses updated.
7867 (i386_dr_update_inferior_debug_regs): Renamed to
7868 i386_update_inferior_debug_regs and made static.
7869 All uses updated.
7870
b9228891
GB
78712014-06-18 Gary Benson <gbenson@redhat.com>
7872
5171def3
GB
7873 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7874 (i386_dr_low_can_set_control): Likewise.
7875 (i386_get_debug_register_length): Likewise.
7876 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7877 (i386_dr_low_can_set_control): Likewise.
7878 (i386_get_debug_register_length): Likewise.
7879
78802014-06-17 Gary Benson <gbenson@redhat.com>
7881
b9228891
GB
7882 * i386-low.h (i386-dregs.h): New include.
7883 (DR_FIRSTADDR): Now in i386-dregs.h.
7884 (DR_LASTADDR): Likewise.
7885 (DR_NADDR): Likewise.
7886 (DR_STATUS): Likewise.
7887 (DR_CONTROL): Likewise.
7888 (i386_debug_reg_state): Likewise.
7889 (i386_dr_insert_watchpoint): Likewise.
7890 (i386_dr_remove_watchpoint): Likewise.
7891 (i386_dr_region_ok_for_watchpoint): Likewise.
7892 (i386_dr_stopped_data_address): Likewise.
7893 (i386_dr_stopped_by_watchpoint): Likewise.
7894 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7895
4be83cc2
GB
78962014-06-18 Gary Benson <gbenson@redhat.com>
7897
7898 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7899 i386_dr_insert_watchpoint.
7900 (i386_low_remove_watchpoint): Renamed to
7901 i386_dr_remove_watchpoint.
7902 (i386_low_region_ok_for_watchpoint): Renamed to
7903 i386_dr_region_ok_for_watchpoint.
7904 (i386_low_stopped_data_address): Renamed to
7905 i386_dr_stopped_data_address.
7906 (i386_low_stopped_by_watchpoint): Renamed to
7907 i386_dr_stopped_by_watchpoint.
7908 * i386-low.c (i386_show_dr): Renamed to
7909 i386_dr_show and made nonstatic. All uses updated.
7910 (i386_length_and_rw_bits): Renamed to
7911 i386_dr_length_and_rw_bits and made nonstatic.
7912 All uses updated.
7913 (i386_insert_aligned_watchpoint): Renamed to
7914 i386_dr_insert_aligned_watchpoint and made nonstatic.
7915 All uses updated.
7916 (i386_remove_aligned_watchpoint): Renamed to
7917 i386_dr_remove_aligned_watchpoint and made nonstatic.
7918 All uses updated.
7919 (i386_update_inferior_debug_regs): Renamed to
7920 i386_dr_update_inferior_debug_regs and made nonstatic.
7921 All uses updated.
7922 (i386_low_insert_watchpoint): Renamed to
7923 i386_dr_insert_watchpoint. All uses updated.
7924 (i386_low_remove_watchpoint): Renamed to
7925 i386_dr_remove_watchpoint. All uses updated.
7926 (i386_low_region_ok_for_watchpoint): Renamed to
7927 i386_dr_region_ok_for_watchpoint. All uses updated.
7928 (i386_low_stopped_data_address): Renamed to
7929 i386_dr_stopped_data_address. All uses updated.
7930 (i386_low_stopped_by_watchpoint): Renamed to
7931 i386_dr_stopped_by_watchpoint. All uses updated.
7932
131aa0d4
GB
79332014-06-18 Gary Benson <gbenson@redhat.com>
7934
7935 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7936 (i386_dr_low_can_set_control): Likewise.
7937 (i386_insert_aligned_watchpoint): New check.
7938
d9305f7f
GB
79392014-06-18 Gary Benson <gbenson@redhat.com>
7940
7941 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7942 Renamed to state.
7943
e927c9fc
GB
79442014-06-18 Gary Benson <gbenson@redhat.com>
7945
7946 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7947 instead of fatal and error.
7948 (i386_handle_nonaligned_watchpoint): Likewise.
7949
1b6d4134
GB
79502014-06-18 Gary Benson <gbenson@redhat.com>
7951
7952 * i386-low.c (i386_get_debug_register_length): New macro.
7953 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7954 (i386_show_dr): Use debug_printf instead of fprintf. Use
7955 phex to format values.
7956
6e62758f
GB
79572014-06-18 Gary Benson <gbenson@redhat.com>
7958
7959 * i386-low.h: Comment changes.
7960 * i386-low.c: Likewise.
7961
fc6e2f03
GB
79622014-06-18 Gary Benson <gbenson@redhat.com>
7963
7964 * i386-low.c: Whitespace changes.
7965
f9d1eeed
TT
79662014-06-12 Tom Tromey <tromey@redhat.com>
7967
7968 * utils.c (freeargv): Remove.
7969
0b04e523
TT
79702014-06-12 Tom Tromey <tromey@redhat.com>
7971
7972 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7973 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7974 (parse_debug_format_options): Likewise.
7975 (gdbserver_usage): Likewise.
7976 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7977 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7978 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7979 against libiberty.
7980 ($(LIBGNU)): Depend on libiberty.
7981 (all-lib): Recurse into all subdirs.
7982 (install-only): Invoke "install" target in subdirs.
7983 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7984 targets.
7985 * configure: Rebuild.
7986 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7987 for vasprintf, vsnprintf, or gettimeofday.
7988 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7989 srv_tgtobj.
7990
270c9937
JB
79912014-06-05 Joel Brobecker <brobecker@adacore.com>
7992
7993 * development.sh: Delete.
7994 * Makefile.in (config.status): Adjust dependency on development.sh.
7995 * configure.ac: Adjust development.sh source call.
7996 * configure: Regenerate.
7997
0a261ed8
PA
79982014-06-02 Pedro Alves <palves@redhat.com>
7999
8000 * ax.c (gdb_free_agent_expr): New function.
8001 * ax.h (gdb_free_agent_expr): New declaration.
8002 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8003 list.
8004 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8005 static.
8006 (clear_breakpoint_conditions_and_commands): New function.
8007 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8008 (clear_breakpoint_conditions_and_commands): New declaration.
8009
e9dae05e
RR
80102014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8011
8012 * linux-aarch64-low.c (asm/ptrace.h): Include.
8013
5876f503
JK
80142014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8015
8016 Fix TLS access for -static -pthread.
8017 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8018 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8019 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8020
802e8e6d
PA
80212014-05-20 Pedro Alves <palves@redhat.com>
8022
8023 * linux-aarch64-low.c (aarch64_insert_point)
8024 (aarch64_remove_point): No longer check whether the type is
8025 supported here. Adjust to new interface.
8026 (the_low_target): Install aarch64_supports_z_point_type as
8027 supports_z_point_type method.
8028 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8029 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8030 instead of a Z packet char. Adjust.
8031 (arm_supports_z_point_type): New function.
8032 (arm_insert_point, arm_remove_point): Adjust to new interface.
8033 (the_low_target): Install arm_supports_z_point_type.
8034 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8035 (cris_insert_point, cris_remove_point): Adjust to new interface.
8036 Don't check whether the type is supported here.
8037 (the_low_target): Install cris_supports_z_point_type.
8038 * linux-low.c (linux_supports_z_point_type): New function.
8039 (linux_insert_point, linux_remove_point): Adjust to new interface.
8040 * linux-low.h (struct linux_target_ops) <insert_point,
8041 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8042 raw_breakpoint pointer parameter.
8043 <supports_z_point_type>: New method.
8044 * linux-mips-low.c (mips_supports_z_point_type): New function.
8045 (mips_insert_point, mips_remove_point): Adjust to new interface.
8046 Use mips_supports_z_point_type.
8047 (the_low_target): Install mips_supports_z_point_type.
8048 * linux-ppc-low.c (the_low_target): Install NULL as
8049 supports_z_point_type method.
8050 * linux-s390-low.c (the_low_target): Install NULL as
8051 supports_z_point_type method.
8052 * linux-sparc-low.c (the_low_target): Install NULL as
8053 supports_z_point_type method.
8054 * linux-x86-low.c (x86_supports_z_point_type): New function.
8055 (x86_insert_point): Adjust to new insert_point interface. Use
8056 insert_memory_breakpoint. Adjust to new
8057 i386_low_insert_watchpoint interface.
8058 (x86_remove_point): Adjust to remove_point interface. Use
8059 remove_memory_breakpoint. Adjust to new
8060 i386_low_remove_watchpoint interface.
8061 (the_low_target): Install x86_supports_z_point_type.
8062 * lynx-low.c (lynx_target_ops): Install NULL as
8063 supports_z_point_type callback.
8064 * nto-low.c (nto_supports_z_point_type): New.
8065 (nto_insert_point, nto_remove_point): Adjust to new interface.
8066 (nto_target_ops): Install nto_supports_z_point_type.
8067 * mem-break.c: Adjust intro comment.
8068 (struct raw_breakpoint) <raw_type, size>: New fields.
8069 <inserted>: Update comment.
8070 <shlib_disabled>: Delete field.
8071 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8072 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8073 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8074 (raw_bkpt_type_to_target_hw_bp_type): New function.
8075 (find_enabled_raw_code_breakpoint_at): New function.
8076 (find_raw_breakpoint_at): New type and size parameters. Use them.
8077 (insert_memory_breakpoint): New function, based off
8078 set_raw_breakpoint_at.
8079 (remove_memory_breakpoint): New function.
8080 (set_raw_breakpoint_at): Reimplement.
8081 (set_breakpoint): New, based on set_breakpoint_at.
8082 (set_breakpoint_at): Reimplement.
8083 (delete_raw_breakpoint): Go through the_target->remove_point
8084 instead of assuming memory breakpoints.
8085 (find_gdb_breakpoint_at): Delete.
8086 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8087 (find_gdb_breakpoint): New function.
8088 (set_gdb_breakpoint_at): Delete.
8089 (z_type_supported): New function.
8090 (set_gdb_breakpoint_1): New function, loosely based off
8091 set_gdb_breakpoint_at.
8092 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8093 (delete_gdb_breakpoint_at): Delete.
8094 (delete_gdb_breakpoint_1): New function, loosely based off
8095 delete_gdb_breakpoint_at.
8096 (delete_gdb_breakpoint): New function.
8097 (clear_gdb_breakpoint_conditions): Rename to ...
8098 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8099 breakpoint.
8100 (add_condition_to_breakpoint): Make static.
8101 (add_breakpoint_condition): Take a struct breakpoint pointer
8102 instead of an address. Adjust.
8103 (gdb_condition_true_at_breakpoint): Rename to ...
8104 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8105 z_type parameter.
8106 (gdb_condition_true_at_breakpoint): Reimplement.
8107 (add_breakpoint_commands): Take a struct breakpoint pointer
8108 instead of an address. Adjust.
8109 (gdb_no_commands_at_breakpoint): Rename to ...
8110 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8111 parameter. Return true if no breakpoint was found. Change debug
8112 output.
8113 (gdb_no_commands_at_breakpoint): Reimplement.
8114 (run_breakpoint_commands): Rename to ...
8115 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8116 and change return type to boolean.
8117 (run_breakpoint_commands): New function.
8118 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8119 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8120 breakpoint. Go through the_target->remove_point instead of
8121 assuming memory breakpoint.
8122 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8123 software and hardware breakpoints.
8124 (reinsert_raw_breakpoint): Go through the_target->insert_point
8125 instead of assuming memory breakpoint.
8126 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8127 software and hardware breakpoints.
8128 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8129 Check both software and hardware breakpoints.
8130 (validate_inserted_breakpoint): Assert the breakpoint is a
8131 software breakpoint. Set the inserted flag to -1 instead of
8132 setting shlib_disabled.
8133 (delete_disabled_breakpoints): Adjust.
8134 (validate_breakpoints): Only validate software breakpoints.
8135 Adjust to inserted flag change.
8136 (check_mem_read, check_mem_write): Skip breakpoint types other
8137 than software breakpoints. Adjust to inserted flag change.
8138 * mem-break.h (enum raw_bkpt_type): New enum.
8139 (raw_breakpoint, struct process_info): Forward declare.
8140 (Z_packet_to_target_hw_bp_type): Delete declaration.
8141 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8142 (set_gdb_breakpoint, delete_gdb_breakpoint)
8143 (clear_breakpoint_conditions): New declarations.
8144 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8145 (breakpoint_inserted_here): Update comment.
8146 (add_breakpoint_condition, add_breakpoint_commands): Replace
8147 address parameter with a breakpoint pointer parameter.
8148 (gdb_breakpoint_here): Update comment.
8149 (delete_gdb_breakpoint_at): Delete.
8150 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8151 * server.c (process_point_options): Take a struct breakpoint
8152 pointer instead of an address. Adjust.
8153 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8154 delete_gdb_breakpoint.
8155 * spu-low.c (spu_target_ops): Install NULL as
8156 supports_z_point_type method.
8157 * target.h: Include mem-break.h.
8158 (struct target_ops) <prepare_to_access_memory>: Update comment.
8159 <supports_z_point_type>: New field.
8160 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8161 instead of a char. Also take a raw breakpoint pointer.
8162 * win32-arm-low.c (the_low_target): Install NULL as
8163 supports_z_point_type.
8164 * win32-i386-low.c (i386_supports_z_point_type): New function.
8165 (i386_insert_point, i386_remove_point): Adjust to new interface.
8166 (the_low_target): Install i386_supports_z_point_type.
8167 * win32-low.c (win32_supports_z_point_type): New function.
8168 (win32_insert_point, win32_remove_point): Adjust to new interface.
8169 (win32_target_ops): Install win32_supports_z_point_type.
8170 * win32-low.h (struct win32_target_ops):
8171 <supports_z_point_type>: New method.
8172 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8173 instead of a char. Also take a raw breakpoint pointer.
8174
932539e3
PA
81752014-05-20 Pedro Alves <palves@redhat.com>
8176
8177 * mem-break.h: Include break-common.h.
8178 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8179 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8180 (Z_packet_to_target_hw_bp_type): New declaration.
8181 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8182 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8183 (Z_PACKET_ACCESS_WP): Delete macros.
8184 (Z_packet_to_hw_type): Delete function.
8185 * i386-low.h: Don't include break-common.h here.
8186 (Z_packet_to_hw_type): Delete declaration.
8187 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8188 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8189 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8190 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8191 * linux-aarch64-low.c: Don't include break-common.h here.
8192 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8193 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8194 (Z_packet_to_target_hw_bp_type): Delete function.
8195 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8196 function.
8197 (mips_insert_point, mips_remove_point): Use
8198 Z_packet_to_target_hw_bp_type.
8199
4ff0d3d8
PA
82002014-05-20 Pedro Alves <palves@redhat.com>
8201
8202 * linux-aarch64-low.c: Include break-common.h.
8203 (enum target_point_type): Delete.
8204 (Z_packet_to_point_type): Rename to ...
8205 (Z_packet_to_target_hw_bp_type): ... this, and return a
8206 target_hw_bp_type instead.
8207 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8208 instead of an enum target_point_type.
8209 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8210 breakpoint type.
8211 (aarch64_dr_state_insert_one_point)
8212 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8213 (aarch64_handle_aligned_watchpoint)
8214 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8215 Take an enum target_hw_bp_type instead of an enum
8216 target_point_type.
8217 (aarch64_supports_z_point_type): New function.
8218 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8219 use Z_packet_to_target_hw_bp_type.
8220
786dc519
JB
82212014-05-20 Joel Brobecker <brobecker@adacore.com>
8222
8223 * configure.ac: Only use -Werror by default when DEVELOPMENT
8224 is true.
8225 * configure: Regenerate.
8226
9e0aa64f
JK
82272014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8228
8229 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8230 * linux-x86-low.c (X86_64_USER_REGS): New.
8231 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8232
2b577b92
YQ
82332014-04-28 Yao Qi <yao@codesourcery.com>
8234
8235 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8236 name.
8237
94611da2
PA
82382014-04-25 Pedro Alves <palves@redhat.com>
8239
8240 PR server/16255
8241 * linux-low.c (linux_attach_fail_reason_string): New function.
8242 (linux_attach_lwp): Delete.
8243 (linux_attach_lwp_1): Rename to ...
8244 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8245 argument. Remove "initial" parameter. Return int instead of
8246 void. Don't error or warn here.
8247 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8248 failure to attach to the tgid. Call warning when failing to
8249 attach to an lwp.
8250 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8251 argument. Remove "initial" parameter. Return int instead of
8252 void. Don't error or warn here.
8253 (linux_attach_fail_reason_string): New declaration.
8254 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8255 interface change. Use linux_attach_fail_reason_string.
8256
01f9f808
MS
82572014-04-24 Michael Sturm <michael.sturm@mintel.com>
8258 Walfred Tedeschi <walfred.tedeschi@intel.com>
8259
8260 * Makefile.in: Added rules to handle new files
8261 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8262 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8263 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8264 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8265 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8266 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8267 x32-avx512-linux.o.
8268 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8269 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8270 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8271 i386/x32-avx512.xml.
8272 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8273 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8274 i386/x32-avx512-linux.xml.
8275 * i387-fp.c (num_avx512_k_registers): New constant for number
8276 of K registers.
8277 (num_avx512_zmmh_low_registers): New constant for number of
8278 lower ZMM registers (0-15).
8279 (num_avx512_zmmh_high_registers): New constant for number of
8280 higher ZMM registers (16-31).
8281 (num_avx512_ymmh_registers): New contant for number of higher
8282 YMM registers (ymm16-31 added by avx521 on x86_64).
8283 (num_avx512_xmm_registers): New constant for number of higher
8284 XMM registers (xmm16-31 added by AVX512 on x86_64).
8285 (struct i387_xsave): Add space for AVX512 registers.
8286 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8287 Add code to handle AVX512 registers.
8288 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8289 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8290 prototypei from generated file.
8291 (tdesc_amd64_avx512_linux): Likewise.
8292 (init_registers_x32_avx512_linux): Likewise.
8293 (tdesc_x32_avx512_linux): Likewise.
8294 (init_registers_i386_avx512_linux): Likewise.
8295 (tdesc_i386_avx512_linux): Likewise.
8296 (x86_64_regmap): Add AVX512 registers.
8297 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8298 mask.
8299 (initialize_low_arch): Add code to initialize AVX512 registers.
8300
51aa91f9
PA
83012014-04-23 Pedro Alves <palves@redhat.com>
8302
8303 * mem-break.c (find_gdb_breakpoint_at): Make static.
8304 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8305
a4165e94
PA
83062014-04-23 Pedro Alves <palves@redhat.com>
8307
8308 * i386-low.c: Don't include break-common.h here.
8309 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8310 prototype to take target_hw_bp_type as argument instead of a Z
8311 packet char.
8312 * i386-low.h: Include break-common.h here.
8313 (Z_packet_to_hw_type): Declare.
8314 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8315 prototypes.
8316 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8317 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8318 (x86_remove_point): Convert the packet number to a
8319 target_hw_bp_type before calling i386_low_remove_watchpoint.
8320 * win32-i386-low.c (i386_insert_point): Convert the packet number
8321 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8322 (i386_remove_point): Convert the packet number to a
8323 target_hw_bp_type before calling i386_low_remove_watchpoint.
8324
b8acf843
PA
83252014-04-23 Pedro Alves <palves@redhat.com>
8326
8327 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8328
d708bcd1
PA
83292014-04-10 Pedro Alves <palves@redhat.com>
8330
8331 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8332 Check if the condition or command is NULL before checking if the
8333 breakpoint is known. On success, return true.
8334 * mem-break.h (add_breakpoint_condition): Document return.
8335 (add_breakpoint_commands): Add describing comment.
8336 * server.c (skip_to_semicolon): New function.
8337 (process_point_options): Use it.
8338
2eec7d5b
PA
83392014-04-09 Pedro Alves <palves@redhat.com>
8340
8341 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8342 to lwpid_of.
8343
fa96cb38
PA
83442014-02-27 Pedro Alves <palves@redhat.com>
8345
8346 PR 12702
8347 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8348 macros.
8349 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8350 output.
8351 (last_thread_of_process_p): Take a PID argument instead of a
8352 thread pointer.
8353 (linux_wait_for_lwp): Delete.
8354 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8355 functions.
8356 (linux_low_filter_event): New function, party factored out from
8357 linux_wait_for_event.
8358 (linux_wait_for_event): Rename to ...
8359 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8360 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8361 sigsuspend. Check for zombie leaders.
8362 (linux_wait_for_event): Reimplement as wrapper around
8363 linux_wait_for_event_filtered.
8364 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8365 a normal or signal exit is seen, it's the whole process exiting.
8366 (wait_for_sigstop): No longer a for_each_inferior callback.
8367 Rewrite on top of linux_wait_for_event_filtered.
8368 (stop_all_lwps): Call wait_for_sigstop directly.
8369 * server.c (resume, handle_target_event): Handle
8370 TARGET_WAITKIND_NO_RESUMED.
8371
d763de10
JB
83722014-02-26 Joel Brobecker <brobecker@adacore.com>
8373
8374 * win32-low.c (psapi_get_dll_name,
8375 * win32_CreateToolhelp32Snapshot): Delete.
8376 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8377 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8378 Delete.
8379 (handle_load_dll): Add function description.
8380 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8381
850a0f76
JB
83822014-02-26 Joel Brobecker <brobecker@adacore.com>
8383
8384 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8385 Add comment.
8386 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8387 base address when calling win32_add_one_solib.
8388 (handle_load_dll): Delete local variable load_addr.
8389 Remove 0x1000 offset applied to DLL base address when calling
8390 win32_add_one_solib.
8391 (handle_unload_dll): Add comment.
8392
f25b3fc3
JB
83932014-02-26 Joel Brobecker <brobecker@adacore.com>
8394
8395 * win32-low.c (win32_add_all_dlls): Renames
8396 win32_ensure_ntdll_loaded. Rewrite function documentation.
8397 Adjust implementation to always load all DLLs.
8398 Add 0x1000 offset to DLL base address when calling
8399 win32_add_one_solib.
8400 (child_initialization_done): New static global.
8401 (do_initial_child_stuff): Set child_initialization_done to
8402 zero during child initialization, and 1 after. Replace call
8403 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8404 Add comment.
8405 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8406 (handle_unload_dll): Add function documentation.
8407 (get_child_debug_event): Ignore load and unload DLL events
8408 during child initialization.
8409
d86d4aaf
DE
84102014-02-20 Doug Evans <dje@google.com>
8411
3bc32da3 8412 Remove global all_lwps.
d86d4aaf
DE
8413 * inferiors.h (ptid_of): Move here from linux-low.h.
8414 (pid_of, lwpid_of): Ditto.
8415 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8416 parameter is a struct thread_info * now.
8417 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8418 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8419 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8420 directly.
8421 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8422 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8423 * linux-arm-low.c (update_registers_callback): Update, "entry"
8424 parameter is a struct thread_info * now.
8425 Fetch lwpid from current_inferior directly.
8426 (arm_insert_point): Pass &all_threads to find_inferior instead of
8427 &all_lwps.
8428 (arm_remove_point): Ditto.
8429 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8430 (arm_prepare_to_resume): Fetch pid from thread.
8431 (arm_read_description): Fetch lwpid from current_inferior directly.
8432 * linux-low.c (all_lwps): Delete.
8433 (delete_lwp): Delete call to remove_inferior.
8434 (handle_extended_wait): Fetch lwpid from thread.
8435 (add_lwp): Don't set lwp->entry.id. Remove call to
8436 add_inferior_to_list.
8437 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8438 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8439 (kill_one_lwp_callback): Ditto.
8440 (linux_kill): Don't dereference NULL pointer.
8441 Fetch ptid,lwpid from thread.
8442 (get_detach_signal): Fetch ptid from thread.
8443 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8444 Simplify call to regcache_invalidate_thread.
8445 (delete_lwp_callback): Update, "entry" parameter is a
8446 struct thread_info * now. Fetch pid from thread.
8447 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8448 (status_pending_p_callback): Update, "entry" parameter is a
8449 struct thread_info * now. Fetch ptid from thread.
8450 (find_lwp_pid): Update, "entry" parameter is a
8451 struct thread_info * now.
8452 (linux_wait_for_lwp): Fetch pid from thread.
8453 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8454 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8455 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8456 (dequeue_one_deferred_signal): Ditto.
8457 (cancel_breakpoint): Fetch ptid from current_inferior.
8458 (linux_wait_for_event): Pass &all_threads to find_inferior,
8459 not &all_lwps. Fetch ptid, lwpid from thread.
8460 (count_events_callback): Update, "entry" parameter is a
8461 struct thread_info * now.
8462 (select_singlestep_lwp_callback): Ditto.
8463 (select_event_lwp_callback): Ditto.
8464 (cancel_breakpoints_callback): Ditto.
8465 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8466 not &all_lwps.
8467 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8468 (unsuspend_one_lwp): Update, "entry" parameter is a
8469 struct thread_info * now.
8470 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8471 not &all_lwps.
8472 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8473 Fetch lwpid from thread, not lwp.
8474 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8475 Pass &all_threads to find_inferior, not &all_lwps.
8476 (send_sigstop): Fetch lwpid from thread, not lwp.
8477 (send_sigstop_callback): Update, "entry" parameter is a
8478 struct thread_info * now.
8479 (suspend_and_send_sigstop_callback): Ditto.
8480 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8481 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8482 struct thread_info * now.
8483 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8484 from thread, lwp.
8485 (lwp_running): Update, "entry" parameter is a
8486 struct thread_info * now.
8487 (stop_all_lwps): Fetch ptid from thread.
8488 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8489 (linux_resume_one_lwp): Fetch lwpid from thread.
8490 (linux_set_resume_request): Update, "entry" parameter is a
8491 struct thread_info * now. Fetch pid, lwpid from thread.
8492 (resume_status_pending_p): Update, "entry" parameter is a
8493 struct thread_info * now.
8494 (need_step_over_p): Ditto. Fetch lwpid from thread.
8495 (start_step_over): Fetch lwpid from thread.
8496 (linux_resume_one_thread): Update, "entry" parameter is a
8497 struct thread_info * now. Fetch lwpid from thread.
8498 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8499 (proceed_one_lwp): Update, "entry" parameter is a
8500 struct thread_info * now. Fetch lwpid from thread.
8501 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8502 struct thread_info * now.
8503 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8504 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8505 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8506 directly.
8507 (regsets_store_inferior_registers): Ditto.
8508 (fetch_register, store_register): Ditto.
8509 (linux_read_memory, linux_write_memory): Ditto.
8510 (linux_request_interrupt): Ditto.
8511 (linux_read_auxv): Ditto.
8512 (linux_xfer_siginfo): Ditto.
8513 (linux_qxfer_spu): Ditto.
8514 (linux_qxfer_libraries_svr4): Ditto.
8515 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8516 moved to inferiors.h.
8517 (get_lwp): Delete.
8518 (get_thread_lwp): Update.
8519 (struct lwp_info): Delete member "entry". Simplify comment for
8520 member "thread".
8521 (all_lwps): Delete.
8522 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8523 current_inferior directly.
8524 (update_watch_registers_callback): Update, "entry" parameter is a
8525 struct thread_info * now. Fetch pid from thread.
8526 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8527 (mips_insert_point): Fetch lwpid from current_inferior.
8528 Pass &all_threads to find_inferior, not &all_lwps.
8529 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8530 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8531 directly.
8532 (mips_stopped_data_address): Ditto.
8533 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8534 directly.
8535 * linux-tile-low.c (tile_arch_setup): Ditto.
8536 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8537 (update_debug_registers_callback): Update, "entry" parameter is a
8538 struct thread_info * now. Fetch pid from thread.
8539 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8540 Pass &all_threads to find_inferior, not &all_lwps.
8541 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8542 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8543 Pass &all_threads to find_inferior, not &all_lwps.
8544 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8545 (i386_dr_low_get_status): Ditto.
8546 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8547 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8548 (x86_linux_read_description): Ditto.
8549 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8550
3b8361aa
DE
85512014-02-20 Doug Evans <dje@google.com>
8552
8553 * inferiors.c (get_first_inferior): Fix buglet.
8554
f7667f0d
DE
85552014-02-19 Doug Evans <dje@google.com>
8556
8557 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8558 * inferiors.c (add_thread): Change result type to struct thread_info *.
8559 All callers updated.
8560 (add_lwp): Call add_thread here instead of in callers.
8561 All callers updated.
8562 * linux-low.h (get_lwp_thread): Rewrite.
8563 (struct lwp_info): New member "thread".
8564
b3312d80
DE
85652014-02-19 Doug Evans <dje@google.com>
8566
8567 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8568 All callers updated.
8569
ecc6f45c
DE
85702014-02-19 Doug Evans <dje@google.com>
8571
8572 * inferiors.c (add_thread): Fix whitespace.
8573
649ebbca
DE
85742014-02-19 Doug Evans <dje@google.com>
8575
8576 * dll.c (clear_dlls): Replace accessing list implemention details
8577 with API function.
8578 * gdbthread.h (get_first_thread): Declare.
8579 * inferiors.c (for_each_inferior_with_data): New function.
8580 (get_first_thread): New function.
8581 (find_thread_ptid): Simplify.
8582 (get_first_inferior): New function.
8583 (clear_list): Delete.
8584 (one_inferior_p): New function.
8585 (clear_inferior_list): New function.
8586 (clear_inferiors): Update.
8587 * inferiors.h (for_each_inferior_with_data): Declare.
8588 (clear_inferior_list): Declare.
8589 (one_inferior_p): Declare.
8590 (get_first_inferior): Declare.
8591 * linux-low.c (linux_wait_for_event): Replace accessing list
8592 implemention details with API function.
8593 * server.c (target_running): Ditto.
8594 (accumulate_file_name_length): New function.
8595 (emit_dll_description): New function.
8596 (handle_qxfer_libraries): Replace accessing list implemention
8597 details with API function.
8598 (handle_qxfer_threads_worker): New function.
8599 (handle_qxfer_threads_proper): Replace accessing list implemention
8600 details with API function.
8601 (handle_query): Ditto.
8602 (visit_actioned_threads_callback_ftype): New typedef.
8603 (visit_actioned_threads_data): New struct.
8604 (visit_actioned_threads): Rewrite to be find_inferior callback.
8605 (resume): Call find_inferior.
8606 (handle_status): Replace accessing list implemention
8607 details with API function.
8608 (process_serial_event): Replace accessing list implemention details
8609 with API function.
8610 * target.c (set_desired_inferior): Replace accessing list implemention
8611 details with API function.
8612 * tracepoint.c (same_process_p): New function.
8613 (gdb_agent_about_to_close): Replace accessing list implemention
8614 details with API function.
8615 * win32-low.c (child_delete_thread): Replace accessing list
8616 implemention details with API function.
8617 (match_dll_by_basename): New function.
8618 (dll_is_loaded_by_basename): New function.
8619 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8620 details call to dll_is_loaded_by_basename.
8621
80894984
DE
86222014-02-19 Doug Evans <dje@google.com>
8623
8624 * dll.h (struct dll_info): Add comment.
8625 * gdbthread.h (struct thread_info): Add comment.
8626 (current_ptid): Simplify.
8627 * inferiors.c (add_process): Update.
8628 (remove_process): Update.
8629 * inferiors.h (struct process_info): Rename member "head" to "entry".
8630 * linux-low.c (delete_lwp): Update.
8631 (add_lwp): Update.
8632 (last_thread_of_process_p): Update.
8633 (kill_one_lwp_callback, linux_kill): Update.
8634 (status_pending_p_callback): Update.
8635 (wait_for_sigstop): Update. Simplify read of ptid.
8636 (start_step_over): Update.
8637 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8638 (get_lwp_thread): Update.
8639 (struct lwp_info): Rename member "head" to "entry".
8640 * regcache.h (inferior_list_entry): Delete.
8641 * server.c (kill_inferior_callback): Update.
8642 (detach_or_kill_inferior_callback): Update.
8643 (print_started_pid): Update.
8644 (print_attached_pid): Update.
8645 (process_serial_event): Simplify read of ptid.
8646 * thread-db.c (thread_db_create_event): Update.
8647 (thread_db_get_tls_address): Update.
8648 * win32-low.c (current_inferior_ptid): Simplify.
8649
46917d26
TT
86502014-02-19 Tom Tromey <tromey@redhat.com>
8651
8652 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8653 argument.
8654 (target_supports_btrace): Update.
8655
0759a81e
YQ
86562014-02-14 Yao Qi <yao@codesourcery.com>
8657
8658 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8659 (rsp-low-ipa.o): New target.
8660
a7191e8b
TT
86612014-02-12 Tom Tromey <tromey@redhat.com>
8662
8663 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8664 convert_ascii_to_int.
8665 * regcache.c (registers_to_string): Likewise.
8666 * remote-utils.c (decode_M_packet): Likewise.
8667 * server.c (process_serial_event): Likewise.
8668
ff0e980e
TT
86692014-02-12 Tom Tromey <tromey@redhat.com>
8670
8671 * server.c (handle_query, handle_v_run): Use hex2bin, not
8672 unhexify.
8673 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8674
e9371aff
TT
86752014-02-12 Tom Tromey <tromey@redhat.com>
8676
8677 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8678 convert_int_to_ascii.
8679 * regcache.c (registers_to_string, collect_register_as_string):
8680 Likewise.
8681 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8682 Likewise.
8683 * server.c (process_serial_event): Likewise.
8684 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8685 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8686
971dc0b8
TT
86872014-02-12 Tom Tromey <tromey@redhat.com>
8688
8689 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8690 bin2hex, not hexify.
8691 * tracepoint.c (cmd_qtstatus): Likewise.
8692
0a822afb
TT
86932014-02-12 Tom Tromey <tromey@redhat.com>
8694
8695 * remote-utils.c (monitor_output): Pass explicit length to
8696 hexify.
8697
9c3d6531
TT
86982014-02-12 Tom Tromey <tromey@redhat.com>
8699
8700 * tracepoint.c: Include rsp-low.h.
8701 * server.c: Include rsp-low.h.
8702 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8703 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8704 declare.
8705 * remote-utils.c: Include rsp-low.h.
8706 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8707 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8708 (convert_int_to_ascii, convert_ascii_to_int): Move to
8709 common/rsp-low.c.
8710 * regcache.c: Include rsp-low.h.
8711 * ax.c: Include rsp-low.h.
8712 * Makefile.in (SFILES): Add common/rsp-low.c.
8713 (OBS): Add rsp-low.o.
8714 (rsp-low.o): New target.
8715
01fd3ea5
TT
87162014-02-12 Tom Tromey <tromey@redhat.com>
8717
8718 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8719 Include print-utils.h.
8720 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8721 (plongest, thirty_two, phex_nz): Remove.
8722 * Makefile.in (SFILES): Add common/print-utils.c.
8723 (OBS): Add print-utils.o.
8724 (print-utils-ipa.o): New target.
8725 (print-utils.o): New target.
8726 (IPA_OBJS): Add print-utils-ipa.o.
8727
e99dc820
TT
87282014-02-06 Tom Tromey <tromey@redhat.com>
8729
8730 * Makefile.in (SFILES): Fix indentation.
8731
ee1e2d4f
DE
87322014-02-05 Doug Evans <dje@google.com>
8733
8734 * linux-low.c (linux_wait_for_event): Improve comment.
8735 (linux_wait_1): Keep current_inferior in sync with event_child.
8736
f5a02773
DE
87372014-01-22 Doug Evans <dje@google.com>
8738
8739 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8740
87ce2a04
DE
87412014-01-22 Doug Evans <dje@google.com>
8742
8743 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8744 * configure: Regenerate.
8745 * config.in: Regenerate.
8746 * Makefile.in (SFILES): Add debug.c.
8747 (OBS): Add debug.o.
8748 * debug.c: New file.
8749 * debug.h: New file.
8750 * linux-aarch64-low.c (*): Update all debugging printfs to use
8751 debug_printf instead of fprintf.
8752 * linux-arm-low.c (*): Ditto.
8753 * linux-cris-low.c (*): Ditto.
8754 * linux-crisv32-low.c (*): Ditto.
8755 * linux-m32r-low.c (*): Ditto.
8756 * linux-sparc-low.c (*): Ditto.
8757 * linux-x86.c (*): Ditto.
8758 * linux-low.c (*): Ditto.
8759 (linux_wait_1): Add calls to debug_enter, debug_exit.
8760 (linux_wait): Remove redundant debugging printf.
8761 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8762 (linux_resume, unstop_all_lwps): Ditto.
8763 * mem-break.c (*): Update all debugging printfs to use
8764 debug_printf instead of fprintf.
8765 * remote-utils.c (*): Ditto.
8766 * thread-db.c (*): Ditto.
8767 * server.c #include <ctype.h>, "gdb_vecs.h".
8768 (debug_threads): Moved to debug.c.
8769 (*): Update all debugging printfs to use debug_printf instead of
8770 fprintf.
8771 (start_inferior): Replace call to fflush with call to debug_flush.
8772 (monitor_show_help): Mention set debug-format.
8773 (parse_debug_format_options): New function.
8774 (handle_monitor_command): Handle "monitor set debug-format".
8775 (gdbserver_usage): Mention --debug-format.
8776 (main): Parse --debug-format.
8777 * server.h (debug_threads): Declaration moved to debug.h.
8778 #include "debug.h".
8779 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8780 trace_debug_1 that uses debug_printf.
8781 (tracepoint_look_up_symbols): Update all debugging printfs to use
8782 debug_printf instead of fprintf.
8783
e671835b
BS
87842014-01-20 Baruch Siach <baruch@tkos.co.il>
8785
8786 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8787 sys/ptrace.h.
8788
b5737fa9
PA
87892014-01-17 Pedro Alves <palves@redhat.com>
8790
ea38d2a9 8791 PR build/16445
c7faa97a
PA
8792 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8793 defined after including gdb_proc_service.h.
b5737fa9 8794
40ed484e
DE
87952014-01-16 Doug Evans <dje@google.com>
8796
8797 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8798 (match_dll): Use it.
8799
969c39fb
MM
88002014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8801
8802 * target.h (target_ops) <read_btrace>: Change parameters and
8803 return type to allow error reporting.
8804 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8805 trace reading errors on.
8806 * linux-low.c (linux_low_read_btrace): Pass trace reading
8807 errors on.
8808 (linux_low_disable_btrace): New.
8809
ab7f45ba
DE
88102014-01-15 Doug Evans <dje@google.com>
8811
8812 * inferiors.c (thread_id_to_gdb_id): Delete.
8813 * inferiors.h (thread_id_to_gdb_id): Delete.
8814
66af0f44
EZ
88152014-01-13 Eli Zaretskii <eliz@gnu.org>
8816
8817 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8818 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8819 versions.
8820
9939e131
PA
88212014-01-08 Pedro Alves <palves@redhat.com>
8822
8823 * server.c (handle_status): Don't discard previous queued stop
8824 replies or thread's pending status here.
8825 (main) <disconnection>: Do it here instead.
8826
b7ea362b
PA
88272014-01-08 Pedro Alves <palves@redhat.com>
8828
8829 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8830 * server.c (visit_actioned_threads, handle_pending_status): New
8831 function.
8832 (handle_v_cont): Factor out parts to ...
8833 (resume): ... this new function. If in all-stop, and a thread
8834 being resumed has a pending status, report it without actually
8835 resuming.
8836 (myresume): Adjust to use the new 'resume' function.
8837 (clear_pending_status_callback, set_pending_status_callback)
8838 (find_status_pending_thread_callback): New functions.
8839 (handle_status): Handle the case of multiple threads having
8840 interesting statuses to report. Report threads' real last signal
8841 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8842 with an interesting thread to report the status for, instead of
8843 always reporting the status of the first thread.
8844
28498c42
JB
88452014-01-01 Joel Brobecker <brobecker@adacore.com>
8846
8847 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8848 * gdbreplay.c (gdbreplay_version): Likewise.
8849
f45c82da
YZ
88502013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8851
8852 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8853 iov.iov_len with the real length in use.
8854
379a5e2d
JB
88552013-12-13 Joel Brobecker <brobecker@adacore.com>
8856
8857 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8858 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8859 for all targets that use win32-low.c.
8860 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8861 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8862
4210d83e
PA
88632013-12-13 Pedro Alves <palves@redhat.com>
8864
8865 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8866 if equal to TARGET_WAITKIND_LOADED.
8867 * win32-low.c (cached_status): New static global.
8868 (win32_wait): Add declaration.
8869 (do_initial_child_stuff): Flush all initial pending debug events
8870 up to the initial breakpoint.
8871 (win32_wait): If CACHED_STATUS was set, return that instead
8872 of doing a real wait. Remove the code resuming the execution
8873 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8874 during the initial phase. Also remove the code changing
8875 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8876 TARGET_WAITKIND_STOPPED.
8877
e7f0d979
YQ
88782013-12-11 Yao Qi <yao@codesourcery.com>
8879
8880 * notif.c (handle_notif_ack): Return 0 if no notification
8881 matches.
8882
ebcf782c
DE
88832013-11-20 Doug Evans <dje@google.com>
8884
8885 * linux-low.c (linux_set_resume_request): Fix comment.
8886
20ad9378
DE
88872013-11-20 Doug Evans <dje@google.com>
8888
8889 * linux-low.c (resume_status_pending_p): Tweak comment.
8890
a196ebeb
WT
88912013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8892
8893 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8894 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8895 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8896 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8897 (srv_amd64_regobj): Add amd64-mpx.o.
8898 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8899 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8900 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8901 * i387-fp.c (num_pl_bnd_register) Added constant.
8902 (num_pl_bnd_cfg_registers) Added constant.
8903 (struct i387_xsave) Added reserved area and MPX fields.
8904 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8905 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8906 function.
8907 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8908 (init_registers_amd64_mpx_linux): Declare new function.
8909 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8910 (x86_64_regmap): Add MPX registers.
8911 (x86_linux_read_description): Add MPX case.
8912 (initialize_low_arch): Initialize MPX targets.
8913
0080a2f6
TT
89142013-11-18 Tom Tromey <tromey@redhat.com>
8915
8916 * configure: Rebuild.
8917 * configure.ac: Don't check for stdlib.h.
8918 * gdbreplay.c: Unconditionally include stdlib.h.
8919
2978b111
TT
89202013-11-18 Tom Tromey <tromey@redhat.com>
8921
8922 * config.in: Rebuild.
8923 * configure: Rebuild.
8924 * configure.ac: Don't use AC_HEADER_DIRENT.
8925
a3d08894
TT
89262013-11-18 Tom Tromey <tromey@redhat.com>
8927
8928 * server.h: Don't check HAVE_STRING_H.
8929 * gdbreplay.c: Don't check HAVE_STRING_H.
8930 * configure: Rebuild.
8931
0a5dd17d
TT
89322013-11-18 Tom Tromey <tromey@redhat.com>
8933
8934 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8935 LIBGNU.
8936
1bd2f0ba
TT
89372013-11-08 Tom Tromey <tromey@redhat.com>
8938
8939 * configure, config.in: Rebuild.
8940 * configure.ac: Remove unused configury.
8941
3266f10b
TT
89422013-11-08 Tom Tromey <tromey@redhat.com>
8943
8944 * acinclude.m4: Include common.m4, codeset.m4.
8945 * configure, config.in: Rebuild.
8946 * configure.ac: Use GDB_AC_COMMON.
8947
6682d959
AA
89482013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8949
8950 * linux-s390-low.c (HWCAP_S390_TE): New define.
8951 (s390_arch_setup): Consider the TE field in the HWCAP for
8952 determining 'have_regset_tdb'.
8953
fd0a4d76
SDJ
89542013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8955
8956 PR gdb/16014
8957 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8958 call to sizeof.
8959
1a3d890b
PA
89602013-10-02 Pedro Alves <palves@redhat.com>
8961
8962 * server.c (process_serial_event): Don't output "GDBserver
8963 exiting" if GDB is connected through stdio.
8964 * target.c (mywait): Likewise, be silent if GDB is connected
8965 through stdio.
8966
97ad4581
JB
89672013-10-01 Joel Brobecker <brobecker@adacore.com>
8968
8969 * lynx-low.c (lynx_add_threads_after_attach): New function.
8970 (lynx_attach): Remove call to add_thread. Add call to
8971 lynx_add_threads_after_attach instead.
8972
5b4e221c
MF
89732013-09-28 Mike Frysinger <vapier@gentoo.org>
8974
8975 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8976 * config.in, configure: Regenerated.
8977
ee47b2f8
YQ
89782013-09-18 Yao Qi <yao@codesourcery.com>
8979
8980 PR server/15959
8981 * server.c (start_inferior): Clear 'resume_info'.
8982
d6707650 89832013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8984
d6707650
JW
8985 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8986 for each register.
8987
9243dd0e 89882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8989
9243dd0e
JW
8990 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8991 linux-tile-low.o to srv_tgtobj.
8992
c623a6ef
WN
89932013-09-16 Will Newton <will.newton@linaro.org>
8994
8995 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8996 out regs.
8997
fb71d39e
PA
89982013-09-06 Pedro Alves <palves@redhat.com>
8999
9000 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9001 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9002 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9003 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9004 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9005 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9006
8e7e9910
PA
90072013-09-06 Pedro Alves <palves@redhat.com>
9008
9009 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9010 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9011
7c3a12ca
PA
90122013-09-06 Pedro Alves <palves@redhat.com>
9013
9014 * linux-amd64-ipa.c: Include tracepoint.h.
9015 * linux-i386-ipa.c: Include tracepoint.h.
9016
8eb3d7b6
RW
90172013-09-06 Ricard Wanderlof <ricardw@axis.com>
9018
9019 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9020 (ps_get_thread_area): New function.
9021
eddddb9d
RW
90222013-09-06 Ricard Wanderlof <ricardw@axis.com>
9023
9024 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9025 (initialize_low_arch): Call init_registers_crisv32 rather than
9026 init_register_crisv32.
9027
533b0600
PA
90282013-09-05 Pedro Alves <palves@redhat.com>
9029
9030 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9031 to ...
9032 * hostio.h: ... this new file.
9033 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9034 win32-low.c: Include hostio.h.
9035
0ce3d3b5
PA
90362013-09-05 Pedro Alves <palves@redhat.com>
9037
9038 * server.h (gdb_client_data, handler_func, callback_handler_func)
9039 (delete_file_handler, add_file_handler, append_callback_event)
9040 (delete_callback_event, start_event_loop, initialize_event_loop):
9041 Move to event-loop.h and include it.
9042 * event-loop.h: New file.
9043
799cdc37
PA
90442013-09-05 Pedro Alves <palves@redhat.com>
9045
9046 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9047 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9048 (loaded_dll, unloaded_dll): Move to ...
9049 * dll.h: ... this new file.
9050 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9051
6a6bbd9d
PA
90522013-09-05 Pedro Alves <palves@redhat.com>
9053
9054 * server.h (current_process, get_thread_process, all_processes)
9055 (add_inferior_to_list, for_each_inferior, current_inferior)
9056 (remove_inferior, add_process, remove_process, find_process_pid)
9057 (have_started_inferiors_p, have_attached_inferiors_p)
9058 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9059 (clear_inferiors, find_inferior, find_inferior_id)
9060 (inferior_target_data, set_inferior_target_data)
9061 (inferior_regcache_data, set_inferior_regcache_data): Move to
9062 inferiors.h, and include it.
9063 * inferiors.h: New file.
9064
f699aaba
PA
90652013-09-05 Pedro Alves <palves@redhat.com>
9066
9067 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9068 Move ...
72f4393d 9069 * ax.h: ... here.
f699aaba 9070
c144c7a0
PA
90712013-09-05 Pedro Alves <palves@redhat.com>
9072
9073 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9074 tracepoint.h.
9075 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9076 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9077 (handle_tracepoint_general_set, handle_tracepoint_query)
9078 (tracepoint_finished_step, tracepoint_was_hit)
9079 (release_while_stepping_state_list, current_traceframe)
9080 (in_readonly_region, traceframe_read_mem)
9081 (fetch_traceframe_registers, traceframe_read_sdata)
9082 (traceframe_read_info, struct fast_tpoint_collect_status)
9083 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9084 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9085 (supply_fast_tracepoint_registers)
9086 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9087 (ipa_tdesc, claim_trampoline_space)
9088 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9089 (agent_mem_read, agent_get_trace_state_variable_value)
9090 (agent_set_trace_state_variable_value, agent_tsv_read)
9091 (agent_mem_read_string, get_raw_reg_func_addr)
9092 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9093 * tracepoint.h: ... this new file.
9094
ff42e6ab
PA
90952013-09-05 Pedro Alves <palves@redhat.com>
9096
9097 * server.h (perror_with_name, error, fatal, warning, paddress)
9098 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9099 include it.
9100 * utils.h: New file.
9101
541af0f4
PA
91022013-09-05 Pedro Alves <palves@redhat.com>
9103
9104 * server.h (remote_debug, noack_mode, transport_is_reliable)
9105 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9106 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9107 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9108 (write_enn, initialize_async_io, enable_async_io)
9109 (disable_async_io, check_remote_input_interrupt_request)
9110 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9111 (dead_thread_notify, prepare_resume_reply)
9112 (decode_address_to_semicolon, decode_address, decode_m_packet)
9113 (decode_M_packet, decode_X_packet, decode_xfer_write)
9114 (decode_search_memory_packet, unhexify, hexify)
9115 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9116 (look_up_one_symbol, relocate_instruction)
9117 (monitor_output): Move to remote-utils.h, and include it.
9118 * remote-utils.h: New file.
9119
eebdf26b
PA
91202013-09-05 Pedro Alves <palves@redhat.com>
9121
9122 * server.h (_): Delete.
9123
3aafd2ff
PA
91242013-09-02 Pedro Alves <palves@redhat.com>
9125
9126 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9127 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9128 allocated.
9129 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9130
cee83bcb
PM
91312013-09-02 Pierre Muller <muller@sourceware.org>
9132
9133 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9134 or WriteProcessMemory complete successfully and handle
9135 ERROR_PARTIAL_COPY error.
9136
9a13b2fa
PA
91372013-09-02 Pedro Alves <palves@redhat.com>
9138
9139 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9140 error instead of EIO.
9141
602e3198
JK
91422013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9143
9144 PR server/15604
9145 * linux-low.c: Include filestuff.h.
9146 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9147 * lynx-low.c: Include filestuff.h.
9148 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9149 * server.c: Include filestuff.h.
9150 (main): Call notice_open_fds.
9151 * spu-low.c: Include filestuff.h.
9152 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9153
96d7229d
LM
91542013-08-22 Luis Machado <lgustavo@codesourcery.com>
9155
9156 * Makefile.in: Explain why ../target and ../nat are not
9157 listed as include file search paths.
9158 (linux-waitpid.o): New object file rule.
9159 * configure.srv (srv_native_linux_obj): New variable.
9160 Replace all occurrences of linux native object files with
9161 $srv_native_linux_obj.
9162 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9163 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9164 (linux_enable_event_reporting): Remove declaration.
9165 (my_waitpid): Moved to common/linux-waitpid.c.
9166 (linux_wait_for_event): Pass ptid when calling
9167 linux_enable_event_reporting.
9168 (linux_supports_tracefork_flag): Remove.
9169 (linux_enable_event_reporting): Likewise.
9170 (linux_tracefork_grandchild): Remove.
9171 (STACK_SIZE): Moved to common/linux-ptrace.c.
9172 (linux_tracefork_child): Remove.
9173 (linux_test_for_tracefork): Remove.
9174 (linux_look_up_symbols): Call linux_supports_traceclone.
9175 (initialize_low): Remove call to linux_test_for_tracefork.
9176 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9177 common/linux-ptrace.h.
9178 (PTRACE_TYPE_ARG4): Likewise.
9179 Include linux-ptrace.h.
9180
32940073
PA
91812013-08-21 Pedro Alves <palves@redhat.com>
9182
9183 * config.in: Renegerate.
9184
33b60d58 91852013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9186
33b60d58
LM
9187 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9188 (SFILES): Remove $(srcdir)/common/target-common.c and
9189 add $(srcdir)/target/waitstatus.c.
9190 (OBS): Remove target-common.o and add waitstatus.o.
9191 (server_h): Remove $(srcdir)/../common/target-common.h and
9192 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9193 and $(srcdir)/../target/waitstatus.h.
9194 (target-common.o): Remove.
9195 (waitstatus.o): New target object file.
9196 * target.h: Do not include target-common.h and
9197 include target/resume.h, target/wait.h and
9198 target/waitstatus.h.
9199
b8e1b30e
LM
92002013-08-13 Luis Machado <lgustavo@codesourcery.com>
9201
9202 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9203 to PTRACE_TYPE_ARG3.
9204 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9205 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9206 PTRACE_TYPE_ARG4.
9207 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9208 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9209
7a60ad40
YQ
92102013-07-27 Jie Zhang <jie@codesourcery.com>
9211 Daniel Jacobowitz <dan@codesourcery.com>
9212 Yao Qi <yao@codesourcery.com>
9213
9214 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9215 (mips-linux-watch.o): New rule.
9216 (mips_linux_watch_h): New variable.
9217 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9218 srv_tgtobj.
9219 * linux-mips-low.c: Include mips-linux-watch.h.
9220 (struct arch_process_info, struct arch_lwp_info): New.
9221 (update_watch_registers_callback): New function.
9222 (mips_linux_new_process, mips_linux_new_thread) New functions.
9223 (mips_linux_prepare_to_resume, mips_insert_point): New
9224 functions.
9225 (mips_remove_point, mips_stopped_by_watchpoint): New
9226 functions.
9227 (rsp_bp_type_to_target_hw_bp_type): New function.
9228 (mips_stopped_data_address): New function.
9229 (the_low_target): Add watchpoint support functions.
9230
de6f69ad
YQ
92312013-07-27 Yao Qi <yao@codesourcery.com>
9232
9233 * i386-low.c: Include break-common.h.
9234 (enum target_hw_bp_type): Remove.
9235
3360c0bf
LM
92362013-07-24 Luis Machado <lgustavo@codesourcery.com>
9237
9238 * Makefile.in (SFILES): /common/target-common.c.
9239 (OBS): Add target-common.o.
9240 (server_h): Add $(srcdir)/../common/target-common.h.
9241 (target-common.o): New target.
9242 * server.c (queue_stop_reply_callback): Free
9243 status string after use.
9244 * target.c (target_waitstatus_to_string): Remove.
9245 * target.h: Include target-common.h.
9246 (resume_kind): Likewise.
9247 (target_waitkind): Likewise.
9248 (target_waitstatus): Likewise.
9249 (TARGET_WNOHANG): Likewise.
9250
bd885420
YQ
92512013-07-04 Yao Qi <yao@codesourcery.com>
9252
9253 * Makefile.in (host_alias): Use @host_noncanonical@.
9254 (target_alias): Use @target_noncanonical@.
9255 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9256 ACX_NONCANONICAL_HOST.
9257 * configure: Regenerated.
9258
9259 Revert:
9260 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9261
9262 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9263 * configure: Rebuild.
9264 * Makefile.in (version_host, version_target): Get from configure.
9265 (version.c): Use $(version_host) and $(version_target).
9266
17ef446e
PA
92672013-07-03 Pedro Alves <palves@redhat.com>
9268
9269 * Makefile.in (config.status): Depend on development.sh.
9270 * acinclude.m4: Include libmcheck.m4.
9271 * configure: Regenerate.
9272
7a9a7487
MG
92732013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9274
9275 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9276 attribute inside the parentheses.
9277 (winapi_DebugSetProcessKillOnExit): Ditto.
9278 (winapi_DebugBreakProcess): Ditto.
9279 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9280
49b64de6
MG
92812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9282
9283 * notif.h (notif_event): Add a dummy member to avoid compiler
9284 errors.
9285
d5749ee7
PA
92862013-07-01 Pedro Alves <palves@redhat.com>
9287
9288 * hostio.c (HOSTIO_PATH_MAX): Define.
9289 (require_filename, handle_open, handle_unlink, handle_readlink):
9290 Use it.
9291
d8d2a3ee
PA
92922013-07-01 Pedro Alves <palves@redhat.com>
9293
9294 * server.h: Include "pathmax.h".
9295 * linux-low.c: Don't include sys/param.h.
9296 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9297 MAXPATHLEN.
9298 * win32-low.c: Don't include sys/param.h.
9299 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9300
bc7dea8d
PA
93012013-07-01 Pedro Alves <palves@redhat.com>
9302
9303 * event-loop.c: Don't check HAVE_UNISTD_H before including
9304 <unistd.h>.
9305 * gdbreplay.c: Likewise.
9306 * remote-utils.c: Likewise.
9307 * server.c: Likewise.
9308 * configure.ac: Don't check for unistd.h.
9309 * configure: Regenerate.
9310
d6c2da54
TT
93112013-06-28 Tom Tromey <tromey@redhat.com>
9312
9313 * Makefile.in (version.c): Use version.in, not
9314 common/version.in.
9315
257b6bec
MG
93162013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9317
9318 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9319 * configure: Rebuild.
9320 * Makefile.in (version_host, version_target): Get from configure.
9321 (version.c): Use $(version_host) and $(version_target).
9322
86ebe149
DK
93232013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9324
9325 Fix trace-status to output user name without trailing colon.
9326 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9327
f30aa5af
DK
93282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9329
9330 Fix trace-status to output proper start-time and stop-time.
9331 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9332 output start time and stop time in hex as gdb expects.
9333
28a93511
YQ
93342013-06-26 Pedro Alves <pedro@codesourcery.com>
9335
9336 * tracepoint.c (build_traceframe_info_xml): Output trace state
9337 variables present in the trace buffer.
9338
01208463
TT
93392013-06-24 Tom Tromey <tromey@redhat.com>
9340
9341 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9342 create-version.sh.
9343 (version.o): Remove.
9344 * gdbreplay.c: Include version.h.
9345 (version, host_name): Don't declare.
9346 * server.h: Include version.h.
9347 (version, host_name): Don't declare.
9348
760256f9
PA
93492013-06-12 Pedro Alves <palves@redhat.com>
9350
9351 * linux-x86-low.c (linux_is_elf64): Delete global.
9352 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9353 with local linux_pid_exe_is_elf_64_file use.
9354
030031ee
PA
93552013-06-11 Pedro Alves <palves@redhat.com>
9356
9357 * linux-low.c (regset_disabled, disable_regset): New functions.
9358 (regsets_fetch_inferior_registers)
9359 (regsets_store_inferior_registers): Use them.
9360 (initialize_regsets_info); Don't allocate the disabled_regsets
9361 array here.
9362 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9363 comment.
9364
5da6eb0a
PA
93652013-06-11 Pedro Alves <palves@redhat.com>
9366
9367 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9368 xmalloc.
9369
7e5aaa09
PA
93702013-06-11 Pedro Alves <palves@redhat.com>
9371
9372 * linux-x86-low.c (initialize_low_arch): Call
9373 init_registers_x32_avx_linux.
9374
d878444c
JK
93752013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9376
9377 Fix compatibility with Android Bionic.
9378 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9379 it is not empty.
9380
3aee8918
PA
93812013-06-07 Pedro Alves <palves@redhat.com>
9382
5f2b57b5 9383 PR server/14823
3aee8918
PA
9384 * Makefile.in (OBS): Add tdesc.o.
9385 (IPA_OBJS): Add tdesc-ipa.o.
9386 (tdesc-ipa.o): New rule.
9387 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9388 interface.
9389 * linux-low.c (new_inferior): Delete.
9390 (disabled_regsets, num_regsets): Delete.
9391 (linux_add_process): Adjust to set the new per-process
9392 new_inferior flag.
9393 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9394 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9395 was a stop. When calling arch_setup, switch the current inferior
9396 to the thread that got an event.
9397 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9398 (regsets_fetch_inferior_registers)
9399 (regsets_store_inferior_registers): New regsets_info parameter.
9400 Adjust to use it.
9401 (linux_register_in_regsets): New regs_info parameter. Adjust to
9402 use it.
9403 (register_addr, fetch_register, store_register): New usrregs_info
9404 parameter. Adjust to use it.
9405 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9406 parameter regs_info. Adjust to use it.
9407 (linux_fetch_registers): Get the current inferior's regs_info, and
9408 adjust to use it.
9409 (linux_store_registers): Ditto.
9410 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9411 (initialize_low): Don't initialize the target_regsets here. Call
9412 initialize_low_arch.
9413 * linux-low.h (target_regsets): Delete declaration.
9414 (struct regsets_info): New.
9415 (struct usrregs_info): New.
9416 (struct regs_info): New.
9417 (struct process_info_private) <new_inferior>: New field.
9418 (struct linux_target_ops): Delete the num_regs, regmap, and
9419 regset_bitmap fields. New field regs_info.
9420 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9421 * i387-fp.c (num_xmm_registers): Delete.
9422 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9423 calls to new interface.
9424 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9425 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9426 Infer the number of xmm registers from the regcache's target
9427 description.
9428 * i387-fp.h (num_xmm_registers): Delete.
9429 * inferiors.c (add_thread): Don't install the thread's regcache
9430 here.
9431 * proc-service.c (gregset_info): Fetch the current inferior's
9432 regs_info. Adjust to use it.
9433 * regcache.c: Include tdesc.h.
9434 (register_bytes, reg_defs, num_registers)
9435 (gdbserver_expedite_regs): Delete.
9436 (get_thread_regcache): If the thread doesn't have a regcache yet,
9437 create one, instead of aborting gdbserver.
9438 (regcache_invalidate_one): Rename to ...
9439 (regcache_invalidate_thread): ... this.
9440 (regcache_invalidate_one): New.
9441 (regcache_invalidate): Only invalidate registers of the current
9442 process.
9443 (init_register_cache): Add target_desc parameter, and use it.
9444 (new_register_cache): Ditto. Assert the target description has a
9445 non zero registers_size.
9446 (regcache_cpy): Add assertions. Adjust.
9447 (realloc_register_cache, set_register_cache): Delete.
9448 (registers_to_string, registers_from_string): Adjust.
9449 (find_register_by_name, find_regno, find_register_by_number)
9450 (register_cache_size): Add target_desc parameter, and use it.
9451 (free_register_cache_thread, free_register_cache_thread_one)
9452 (regcache_release, register_cache_size): New.
9453 (register_size): Add target_desc parameter, and use it.
9454 (register_data, supply_register, supply_register_zeroed)
9455 (supply_regblock, supply_register_by_name, collect_register)
9456 (collect_register_as_string, collect_register_by_name): Adjust.
9457 * regcache.h (struct target_desc): Forward declare.
9458 (struct regcache) <tdesc>: New field.
9459 (init_register_cache, new_register_cache): Add target_desc
9460 parameter.
9461 (regcache_invalidate_thread): Declare.
9462 (regcache_invalidate_one): Delete declaration.
9463 (regcache_release): Declare.
9464 (find_register_by_number, register_cache_size, register_size)
9465 (find_regno): Add target_desc parameter.
9466 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9467 declarations.
9468 * remote-utils.c: Include tdesc.h.
9469 (outreg, prepare_resume_reply): Adjust.
9470 * server.c: Include tdesc.h.
9471 (gdbserver_xmltarget): Delete declaration.
9472 (get_features_xml, process_serial_event): Adjust.
9473 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9474 declare.
9475 (struct process_info) <tdesc>: New field.
9476 (ipa_tdesc): Declare.
9477 * tdesc.c: New file.
9478 * tdesc.h: New file.
9479 * tracepoint.c: Include tdesc.h.
9480 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9481 (get_context_regcache): Adjust to pass ipa_tdesc down.
9482 (do_action_at_tracepoint): Adjust to get the register cache size
9483 from the context regcache's description.
9484 (traceframe_walk_blocks): Adjust to get the register cache size
9485 from the current trace frame's description.
9486 (traceframe_get_pc): Adjust to get current trace frame's
9487 description and pass it down.
9488 (gdb_collect): Adjust to get the register cache size from the
9489 IPA's description.
9490 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9491 (gdbserver_xmltarget): Delete.
9492 (initialize_low_tracepoint): Set the ipa's target description.
9493 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9494 (initialize_low_tracepoint): Set the ipa's target description.
9495 * linux-x86-low.c: Include tdesc.h.
9496 [__x86_64__] (is_64bit_tdesc): New.
9497 (ps_get_thread_area, x86_get_thread_area): Use it.
9498 (i386_cannot_store_register): Rename to ...
9499 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9500 (i386_cannot_fetch_register): Rename to ...
9501 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9502 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9503 to new interface.
9504 (target_regsets): Rename to ...
9505 (x86_regsets): ... this.
9506 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9507 interface.
9508 (x86_siginfo_fixup): Use is_64bit_tdesc.
9509 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9510 (tdesc_x32_avx_linux, tdesc_x32_linux)
9511 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9512 Declare.
9513 (x86_linux_update_xmltarget): Delete.
9514 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9515 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9516 (AMD64_LINUX_USER64_CS): New.
9517 (x86_linux_read_description): New, based on
9518 x86_linux_update_xmltarget.
9519 (same_process_callback): New.
9520 (x86_arch_setup_process_callback): New.
9521 (x86_linux_update_xmltarget): New.
9522 (x86_regsets_info): New.
9523 (amd64_linux_regs_info): New.
9524 (i386_linux_usrregs_info): New.
9525 (i386_linux_regs_info): New.
9526 (x86_linux_regs_info): New.
9527 (x86_arch_setup): Reimplement.
9528 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9529 (x86_emit_ops): Ditto.
9530 (the_low_target): Adjust. Install x86_linux_regs_info,
9531 x86_cannot_fetch_register, and x86_cannot_store_register.
9532 (initialize_low_arch): New.
9533 * linux-ia64-low.c (tdesc_ia64): Declare.
9534 (ia64_fetch_register): Adjust.
9535 (ia64_usrregs_info, regs_info): New globals.
9536 (ia64_regs_info): New function.
9537 (the_low_target): Adjust.
9538 (initialize_low_arch): New function.
9539 * linux-sparc-low.c (tdesc_sparc64): Declare.
9540 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9541 Adjust.
9542 (sparc_arch_setup): New function.
9543 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9544 (the_low_target): Adjust.
9545 (initialize_low_arch): New function.
9546 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9547 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9548 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9549 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9550 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9551 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9552 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9553 (tdesc_powerpc_isa205_vsx64l): Declare.
9554 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9555 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9556 (ppc_set_pc, ppc_get_hwcap): Adjust.
9557 (ppc_usrregs_info): Forward declare.
9558 (!__powerpc64__) ppc_regmap_adjusted: New global.
9559 (ppc_arch_setup): Adjust to the current process'es target
9560 description.
9561 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9562 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9563 (ppc_store_evrregset): Adjust.
9564 (target_regsets): Rename to ...
9565 (ppc_regsets): ... this, and make static.
9566 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9567 (ppc_regs_info): New function.
9568 (the_low_target): Adjust.
9569 (initialize_low_arch): New function.
9570 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9571 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9572 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9573 (tdesc_s390x_linux64v2): Declare.
9574 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9575 (s390_fill_gregset, s390_store_last_break): Adjust.
9576 (target_regsets): Rename to ...
9577 (s390_regsets): ... this, and make static.
9578 (s390_get_pc, s390_set_pc): Adjust.
9579 (s390_get_hwcap): New target_desc parameter, and use it.
9580 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9581 (s390_arch_setup): Adjust to set the current process'es target
9582 description. Don't adjust the regmap.
9583 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9584 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9585 (regs_info_3264): New globals.
9586 (s390_regs_info): New function.
9587 (the_low_target): Adjust.
9588 (initialize_low_arch): New function.
9589 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9590 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9591 [__mips64] (init_registers_mips_linux)
9592 (init_registers_mips_dsp_linux): Delete defines.
9593 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9594 (have_dsp): New global.
9595 (mips_read_description): New, based on mips_arch_setup.
9596 (mips_arch_setup): Reimplement.
9597 (get_usrregs_info): New function.
9598 (mips_cannot_fetch_register, mips_cannot_store_register)
9599 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9600 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9601 (target_regsets): Rename to ...
9602 (mips_regsets): ... this, and make static.
9603 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9604 (dsp_regs_info, regs_info): New globals.
9605 (mips_regs_info): New function.
9606 (the_low_target): Adjust.
9607 (initialize_low_arch): New function.
9608 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9609 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9610 Declare.
9611 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9612 (arm_read_description): New, with bits factored from
9613 arm_arch_setup.
9614 (arm_arch_setup): Reimplement.
9615 (target_regsets): Rename to ...
9616 (arm_regsets): ... this, and make static.
9617 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9618 (arm_regs_info): New function.
9619 (the_low_target): Adjust.
9620 (initialize_low_arch): New function.
9621 * linux-m68k-low.c (tdesc_m68k): Declare.
9622 (target_regsets): Rename to ...
9623 (m68k_regsets): ... this, and make static.
9624 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9625 (m68k_regs_info): New function.
9626 (m68k_arch_setup): New function.
9627 (the_low_target): Adjust.
9628 (initialize_low_arch): New function.
9629 * linux-sh-low.c (tdesc_sharch): Declare.
9630 (target_regsets): Rename to ...
9631 (sh_regsets): ... this, and make static.
9632 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9633 (sh_regs_info, sh_arch_setup): New functions.
9634 (the_low_target): Adjust.
9635 (initialize_low_arch): New function.
9636 * linux-bfin-low.c (tdesc_bfin): Declare.
9637 (bfin_arch_setup): New function.
9638 (bfin_usrregs_info, regs_info): New globals.
9639 (bfin_regs_info): New function.
9640 (the_low_target): Adjust.
9641 (initialize_low_arch): New function.
9642 * linux-cris-low.c (tdesc_cris): Declare.
9643 (cris_arch_setup): New function.
9644 (cris_usrregs_info, regs_info): New globals.
9645 (cris_regs_info): New function.
9646 (the_low_target): Adjust.
9647 (initialize_low_arch): New function.
9648 * linux-cris-low.c (tdesc_crisv32): Declare.
9649 (cris_arch_setup): New function.
9650 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9651 (cris_regs_info): New function.
9652 (the_low_target): Adjust.
9653 (initialize_low_arch): New function.
9654 * linux-m32r-low.c (tdesc_m32r): Declare.
9655 (m32r_arch_setup): New function.
9656 (m32r_usrregs_info, regs_info): New globals.
9657 (m32r_regs_info): Adjust.
9658 (initialize_low_arch): New function.
9659 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9660 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9661 (tic6x_usrregs_info): Forward declare.
9662 (tic6x_read_description): New function, based on ...
9663 (tic6x_arch_setup): ... this. Reimplement.
9664 (target_regsets): Rename to ...
9665 (tic6x_regsets): ... this, and make static.
9666 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9667 (tic6x_regs_info): New function.
9668 (the_low_target): Adjust.
9669 (initialize_low_arch): New function.
9670 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9671 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9672 (target_regsets): Rename to ...
9673 (xtensa_regsets): ... this, and make static.
9674 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9675 globals.
9676 (xtensa_arch_setup, xtensa_regs_info): New functions.
9677 (the_low_target): Adjust.
9678 (initialize_low_arch): New function.
9679 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9680 (nios2_arch_setup): Set the current process'es tdesc.
9681 (target_regsets): Rename to ...
9682 (nios2_regsets): ... this.
9683 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9684 (nios2_regs_info): New function.
9685 (the_low_target): Adjust.
9686 (initialize_low_arch): New function.
a261b8f5
PA
9687 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9688 (aarch64_arch_setup): Set the current process'es tdesc.
9689 (target_regsets): Rename to ...
9690 (aarch64_regsets): ... this.
9691 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9692 (aarch64_regs_info): New function.
9693 (the_low_target): Adjust.
9694 (initialize_low_arch): New function.
3aee8918
PA
9695 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9696 globals.
9697 (target_regsets): Rename to ...
9698 (tile_regsets): ... this.
9699 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9700 (tile_regs_info): New function.
9701 (tile_arch_setup): Set the current process'es tdesc.
9702 (the_low_target): Adjust.
9703 (initialize_low_arch): New function.
9704 * spu-low.c (tdesc_spu): Declare.
9705 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9706 * win32-arm-low.c (tdesc_arm): Declare.
9707 (arm_arch_setup): New function.
9708 (the_low_target): Install arm_arch_setup instead of
9709 init_registers_arm.
9710 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9711 (init_windows_x86): Rename to ...
9712 (i386_arch_setup): ... this. Set `win32_tdesc'.
9713 (the_low_target): Adjust.
9714 * win32-low.c (win32_tdesc): New global.
9715 (child_add_thread): Don't create the thread cache here.
9716 (do_initial_child_stuff): Set the new process'es tdesc.
9717 * win32-low.h (struct target_desc): Forward declare.
9718 (win32_tdesc): Declare.
9719 * lynx-i386-low.c (tdesc_i386): Declare global.
9720 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9721 * lynx-low.c (lynx_tdesc): New global.
9722 (lynx_add_process): Set the new process'es tdesc.
9723 * lynx-low.h (struct target_desc): Forward declare.
9724 (lynx_tdesc): Declare global.
9725 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9726 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9727 * nto-low.c (nto_tdesc): New global.
9728 (do_attach): Set the new process'es tdesc.
9729 * nto-low.h (struct target_desc): Forward declare.
9730 (nto_tdesc): Declare.
9731 * nto-x86-low.c (tdesc_i386): Declare.
9732 (nto_x86_arch_setup): Set `nto_tdesc'.
9733
b1fbec62
GB
97342013-06-04 Gary Benson <gbenson@redhat.com>
9735
9736 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9737 to qSupported response when appropriate.
9738 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9739 with nonzero-length annex.
9740 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9741 arguments supplied in annex.
9742
d1ec4ce7
DE
97432013-05-31 Doug Evans <dje@google.com>
9744
ac44adcb 9745 PR server/15594
d1ec4ce7
DE
9746 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9747 64 bits in 64-cross-32 environment.
9748
9b25f2d3
PA
97492013-05-28 Pedro Alves <palves@redhat.com>
9750
9751 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9752 (aarch64-without-fpu.c): Delete rule.
9753 * configure.srv (aarch64*-*-linux*): Remove references to
9754 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9755 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9756 declaration.
9757
6740dc9c
PA
97582013-05-24 Pedro Alves <palves@redhat.com>
9759
9760 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9761 instead of strchr/decode_address. Error if the range isn't split
9762 with a ','. Don't assume there's be a ':' in the action.
9763
c2d6af84
PA
97642013-05-23 Yao Qi <yao@codesourcery.com>
9765 Pedro Alves <palves@redhat.com>
9766
9767 * linux-low.c (lwp_in_step_range): New function.
9768 (linux_wait_1): If the thread was range stepping and stopped
9769 outside the stepping range, report the stop to GDB. Otherwise,
9770 continue stepping. Add range stepping debug output.
9771 (linux_set_resume_request): Copy the step range from the resume
9772 request to the lwp.
9773 (linux_supports_range_stepping): New.
9774 (linux_target_ops) <supports_range_stepping>: Set to
9775 linux_supports_range_stepping.
9776 * linux-low.h (struct linux_target_ops)
9777 <supports_range_stepping>: New field.
9778 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9779 * linux-x86-low.c (x86_supports_range_stepping): New.
9780 (the_low_target) <supports_range_stepping>: Set to
9781 x86_supports_range_stepping.
9782 * server.c (handle_v_cont): Handle 'r' action.
9783 (handle_v_requests): Append ";r" if the target supports range
9784 stepping.
9785 * target.h (struct thread_resume) <step_range_start,
9786 step_range_end>: New fields.
9787 (struct target_ops) <supports_range_stepping>:
9788 New field.
9789 (target_supports_range_stepping): New macro.
9790
58794e1a
JB
97912013-05-17 Joel Brobecker <brobecker@adacore.com>
9792
9793 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9794 confusion in comment.
9795
d631c5a7
JB
97962013-05-17 Joel Brobecker <brobecker@adacore.com>
9797
9798 * lynx-low.c (struct process_info_private): New type.
9799 (lynx_add_process): New function.
9800 (lynx_create_inferior, lynx_attach): Replace calls to
9801 add_process by calls to lynx_add_process.
9802 (lynx_resume): If PTID is null, then try using
9803 current_process()->private->last_wait_event_ptid.
9804 Add comments.
9805 (lynx_clear_inferiors): Delete. The contents of that function
9806 has been inlined in lynx_mourn;
9807 (lynx_wait_1): Save the ptid in the process's private data.
9808 (lynx_mourn): Free the process' private data. Replace call
9809 to lynx_clear_inferiors by call to clear_inferiors.
9810
96f7a20f
YQ
98112013-05-17 Yao Qi <yao@codesourcery.com>
9812
9813 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9814 the right place.
9815
db0dfaa0
LM
98162013-05-16 Luis Machado <lgustavo@codesourcery.com>
9817
9818 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9819 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9820 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9821 PT_TEXT_END_ADDR guards. Update comments.
9822 (linux_target_op) <read_offsets>: Conditionally define to
9823 linux_read_offsets if the target is UCLIBC and if it defines
9824 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9825
68f5f838
SL
98262013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9827 Andrew Jenner <andrew@codesourcery.com>
9828
9829 * Makefile.in (SFILES): Add linux-nios2-low.c.
9830 (clean): Add action to delete nios2-linux.c.
9831 (nios2-linux.c): New rule.
9832 * configure.srv: Add nios2*-*-linux*.
9833 * linux-nios2-low.c: New.
9834
1ebff1fd
HAQ
98352013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9836
9837 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9838
f6150862
HZ
98392013-04-25 Hui Zhu <hui@codesourcery.com>
9840
9841 PR gdb/15186
f6150862
HZ
9842 * ax.c (ax_printf): Add fflush.
9843
614c279d
TT
98442013-04-22 Tom Tromey <tromey@redhat.com>
9845
9846 * Makefile.in (SFILES): Add filestuff.c.
9847 (OBS): Add filestuff.o.
9848 (filestuff.o): New target.
9849 * config.in, configure: Rebuild.
9850 * configure.ac: Check for fdwalk, pipe2.
9851
7d4e5717
PA
98522013-04-17 Pedro Alves <palves@redhat.com>
9853
9854 * configure.ac (USE_THREAD_DB): Delete variable.
9855 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9856 Don't AC_SUBST USE_THREAD_DB.
9857 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9858 * config.in, configure: Regenerate.
9859
d5c93e41
PA
98602013-04-16 Pedro Alves <palves@redhat.com>
9861
9862 * linux-low.h (struct lwp_info) <thread_known>: Move under
9863 the USE_THREAD_DB #ifdef.
9864
04f5fe89
PA
98652013-04-16 Pedro Alves <palves@redhat.com>
9866
9867 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9868 (linux-low.o): Delete rule.
9869 * linux-low.h: Always include "gdb_thread_db.h" instead of
9870 conditionally including thread_db.h.
9871 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9872 HAVE_THREAD_DB_H.
9873
480b27bf
JK
98742013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9875
9876 * Makefile.in (install-only): Fix make install regression.
9877
43662968
JK
98782013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9879
9880 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9881 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9882 installation.
9883 * gdbserver.1: Remove.
9884
3e74e146
PA
98852013-03-22 Pedro Alves <palves@redhat.com>
9886
9887 * linux-low.c (handle_extended_wait): Don't call
9888 linux_enable_event_reporting.
9889
a8347a2a
TT
98902013-03-15 Tony Theodore <tonyt@logyst.com>
9891
9892 PR build/9098:
9893 * Makefile.in (SHELL): Use @SHELL@.
9894
eeb56fa7
SDJ
98952013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9896
9897 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9898 compiler warning.
9899
4fa7e2ff
JB
99002013-03-13 Joel Brobecker <brobecker@adacore.com>
9901
9902 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9903 Remove extraneous NULL element.
9904
8ddb1965
YQ
99052013-03-13 Yao Qi <yao@codesourcery.com>
9906
9907 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9908 'V' block in trace frame.
9909
9accd112
MM
99102013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9911
9912 * target.h (struct target_ops): Add btrace ops.
9913 (target_supports_btrace): New macro.
9914 (target_enable_btrace): New macro.
9915 (target_disable_btrace): New macro.
9916 (target_read_btrace): New macro.
9917 * gdbthread.h (struct thread_info): Add btrace field.
9918 * server.c: Include btrace-common.h.
9919 (handle_btrace_general_set): New function.
9920 (handle_btrace_enable): New function.
9921 (handle_btrace_disable): New function.
9922 (handle_general_set): Call handle_btrace_general_set.
9923 (handle_qxfer_btrace): New function.
9924 (struct qxfer qxfer_packets[]): Add btrace entry.
9925 * inferiors.c (remove_thread): Disable btrace.
9926 * linux-low: Include linux-btrace.h.
9927 (linux_low_enable_btrace): New function.
9928 (linux_low_read_btrace): New function.
9929 (linux_target_ops): Add btrace ops.
9930 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9931 Add srv_linux_btrace=yes.
9932 (x86_64-*-linux*): Add linux-btrace.o.
9933 Add srv_linux_btrace=yes.
9934 * configure.ac: Define HAVE_LINUX_BTRACE.
9935 * config.in: Regenerated.
9936 * configure: Regenerated.
9937
5cc22e4c
MM
99382013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9939
9940 * server.c (handle_qxfer): Preserve error message if -3 is
9941 returned.
9942 (qxfer): Document the -3 return value.
9943
7c97f91e
MM
99442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9945
9946 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9947 (linux_btrace_h): New variable.
9948 (linux-btrace.o): New rule.
9949
be9a119c 99502013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9951 Hafiz Abid Qadeer <abidh@codesourcery.com>
9952
9953 * tracepoint.c (trace_buffer_size): New global.
9954 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9955 (init_trace_buffer): Change to one-argument function. Allocate
9956 trace buffer memory.
9957 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9958 handle QTBuffer:size packet.
9959 (cmd_bigqtbuffer_size): New function.
9960 (initialize_tracepoint): Call init_trace_buffer with
9961 DEFAULT_TRACE_BUFFER_SIZE.
9962 * server.c (handle_query): Add QTBuffer:size in the
9963 supported packets.
9964
e64f7499
YQ
99652013-03-07 Yao Qi <yao@codesourcery.com>
9966
9967 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9968 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9969 of -1.
9970 (cmd_qtsp): Adjust condition. Do post increment.
9971 Set cur_action and cur_step_action back to 0.
9972
f0ae6fc3
PA
99732013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9974
9975 PR server/15236
9976 * linux-low.c (linux_write_memory): Return early success if LEN is
9977 zero.
9978
b5b0b0af
CV
99792013-03-05 Corinna Vinschen <vinschen@redhat.de>
9980
334ad4a8 9981 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9982
589bc927
TT
99832013-02-28 Tom Tromey <tromey@redhat.com>
9984
9985 * configure.ac: Invoke AC_SYS_LARGEFILE.
9986 * configure, config.in: Rebuild.
9987
dfe07582
CV
99882013-02-28 Corinna Vinschen <vinschen@redhat.com>
9989
9990 * win32-low.c: Throughout, fix format strings and casts of
9991 printf-like functions to avoid type related warnings on all
9992 platforms.
9993 (get_child_debug_event): Print dwDebugEventCode as hex since
9994 that's how it's usually documented.
9995
736cd585
YQ
99962013-02-28 Yao Qi <yao@codesourcery.com>
9997
9998 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9999 pulongest.
10000
e1f58301
JW
100012013-02-27 Jiong Wang <jiwang@tilera.com>
10002
10003 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10004 (reg-tilegx32.c): New rule.
10005 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10006 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10007 different register info initializer according to elf class.
10008 (init_registers_tilgx32): New function. The tilegx32 register info
10009 initializer.
10010 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10011 (tile_store_gregset): Likewise.
10012
d171ca78
YQ
100132013-02-27 Yao Qi <yao@codesourcery.com>
10014
10015 * server.c (process_point_options): Print debug message when
10016 debug_threads is true.
10017
282bbdf3
YQ
100182013-02-26 Yao Qi <yao@codesourcery.com>
10019
10020 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10021
aca22551
PA
100222013-02-19 Pedro Alves <palves@redhat.com>
10023 Kai Tietz <ktietz@redhat.com>
10024
10025 PR gdb/15161
10026
10027 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10028 instead of strtoul to extract address from packet.
10029 (process_serial_event) <'z'>: Likewise.
10030
4f3cee1c
YQ
100312013-02-18 Yao Qi <yao@codesourcery.com>
10032
10033 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10034
8e1d55a3
PA
100352013-02-14 Pedro Alves <palves@redhat.com>
10036
10037 Plug memory leak.
10038
10039 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10040 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10041
458820da
PA
100422013-02-14 Pedro Alves <palves@redhat.com>
10043
10044 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10045
baea0dae
PA
100462013-02-14 Pedro Alves <palves@redhat.com>
10047
10048 * tracepoint.c (save_string): Delete.
10049 (add_tracepoint_action): Use savestring instead of save_string.
10050
0b1afbb3
PA
100512013-02-12 Pedro Alves <palves@redhat.com>
10052
10053 * linux-xtensa-low.c: Ditto.
10054 * xtensa-xtregs.c: Ditto.
10055
8a4ac37e
PA
100562013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10057
10058 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10059 thread_db.
10060
148de6bb
MS
100612013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10062
10063 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10064 aarch64_num_wp_regs and aarch64_num_bp_regs to
10065 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10066
55fac6e0
MS
100672013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10068
10069 * linux-aarch64-low.c (ps_get_thread_area): Replace
10070 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10071
176eb98c
MS
100722013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10073 Marcus Shawcroft <marcus.shawcroft@arm.com>
10074 Nigel Stephens <nigel.stephens@arm.com>
10075 Yufeng Zhang <yufeng.zhang@arm.com>
10076
10077 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10078 (aarch64.c, aarch64-without-fpu.c): New targets.
10079 * configure.srv (aarch64*-*-linux*): New.
10080 * linux-aarch64-low.c: New file.
10081
56f7af9c
MS
100822013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10083
43aaf8b6 10084 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10085 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10086 (dequeue_one_deferred_signal, linux_resume_one_thread)
10087 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10088 (linux_tracefork_grandchild, linux_test_for_tracefork)
10089 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10090 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10091 where the argument is 0.
10092
60f662b0
YQ
100932013-01-25 Yao Qi <yao@codesourcery.com>
10094
10095 * event-loop.c: Include "queue.h".
10096 (gdb_event_p): New typedef.
10097 (struct gdb_event) <next_event>: Remove.
10098 (event_queue): Change to QUEUE(gdb_event_p).
10099 (async_queue_event): Remove.
10100 (gdb_event_xfree): New.
10101 (initialize_event_loop): New.
10102 (process_event): Use API from QUEUE.
10103 (wait_for_event): Likewise.
10104 * server.c (main): Call initialize_event_loop.
10105 * server.h (initialize_event_loop): Declare.
10106
5ae4861a
YQ
101072013-01-18 Yao Qi <yao@codesourcery.com>
10108
10109 * ax.h (struct eval_agent_expr_context): New.
10110 (gdb_eval_agent_expr): Update declaration.
10111 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10112 TFRAME. Add new argument CTX.
10113 * server.h (struct eval_agent_expr_context): Declare.
10114 (agent_mem_read, agent_tsv_read): Update declaration.
10115 (agent_mem_read_string): Likewise.
10116 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10117 (add_traceframe_block): Add new argument TPOINT.
10118 Increase TPOINT->traceframe_usage.
10119 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10120 eval_tracepoint_agent_expr.
10121 (condition_true_at_tracepoint): Likewise.
10122 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10123 (agent_mem_read_string, agent_tsv_read): Likewise.
10124
85e00e85
YQ
101252013-01-16 Yao Qi <yao@codesourcery.com>
10126
10127 * linux-low.c (linux_resume_one_lwp): Don't check
10128 'lwp->bp_reinsert != 0'.
10129
4039cf45
JB
101302013-01-07 Joel Brobecker <brobecker@adacore.com>
10131 Pedro Alves <palves@redhat.com>
10132
10133 * lynx-low.c (ptrace_request_to_str): Define a temporary
10134 macro and use it to simplify this function's implementation.
10135
9044dee2
JB
101362013-01-07 Joel Brobecker <brobecker@adacore.com>
10137
10138 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10139 sets errno.
10140
e6352c8f
JB
101412013-01-07 Joel Brobecker <brobecker@adacore.com>
10142
10143 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10144
50681a27
JB
101452013-01-07 Joel Brobecker <brobecker@adacore.com>
10146
10147 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10148
3f6e77ef
JB
101492013-01-07 Joel Brobecker <brobecker@adacore.com>
10150
10151 * lynx-low.c (lynx_resume): Use the resume_info parameter
10152 to determine the ptid for the lynx_ptrace call, unless
10153 it is equal to minus_one_ptid, in which case we use the
10154 ptid of the current_inferior.
10155 (lynx_wait_1): After having received a thread create/exit
10156 event, resume the inferior's execution using the signaling
10157 thread's ptid, rather than the old ptid.
10158
7fda33ae
JB
101592013-01-07 Joel Brobecker <brobecker@adacore.com>
10160
10161 * lynx-low.c (lynx_resume): Delete variable ret.
10162
b9786c74
JB
101632013-01-01 Joel Brobecker <brobecker@adacore.com>
10164
10165 * gdbreplay.c (gdbreplay_version): Update copyright year.
10166 * server.c (gdbserver_version): Likewise.
10167
8b93d60f
JB
101682012-12-17 Joel Brobecker <brobecker@adacore.com>
10169
10170 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10171 new thread.
10172
037335a7
JB
101732012-12-17 Joel Brobecker <brobecker@adacore.com>
10174
10175 * lynx-low.c (ptrace_request_to_str): Add handling for
10176 PTRACE_GETTRACESIG.
10177
52d4cbd8
JB
101782012-12-17 Joel Brobecker <brobecker@adacore.com>
10179
10180 * lynx-low.c (lynx_attach): Delete variable new_process.
10181
ab8f6ca9
JB
101822012-12-17 Joel Brobecker <brobecker@adacore.com>
10183
10184 * lynx-low.c (lynx_create_inferior): Delete variable
10185 new_process.
10186
78cbc024
JB
101872012-12-17 Joel Brobecker <brobecker@adacore.com>
10188
10189 * lynx-low.c (ptrace_request_to_str): Do not handle
10190 PTRACE_GETTHREADLIST if this macro does not exist.
10191
14a00470
YQ
101922012-12-15 Yao Qi <yao@codesourcery.com>
10193
10194 * Makefile.in (OBS): Add notif.o.
10195 * notif.c, notif.h: New.
10196 * server.c: Include "notif.h".
10197 (struct vstop_notif) <next>: Remove.
10198 <base>: New field.
10199 (queue_stop_reply): Update.
10200 (push_event, send_next_stop_reply): Remove.
10201 (discard_queued_stop_replies): Update.
10202 (notif_stop): New variable.
10203 (handle_v_stopped): Remove.
10204 (handle_v_requests): Don't call handle_v_stopped. Call
10205 handle_ack_notif instead.
10206 (queue_stop_reply_callback): Call notif_event_enque instead
10207 of queue_stop_reply.
10208 (handle_status): Don't call send_next_stop_reply, call
10209 notif_write_event instead.
10210 (kill_inferior_callback): Likewise.
10211 (detach_or_kill_inferior_callback): Likewise.
10212 (main): Call initialize_notif.
10213 (process_serial_event): Call QUEUE_is_empty.
10214 (handle_target_event): Call notif_push instead of push event.
10215 * server.h (push_event): Remove declaration.
10216
61c125b9
TT
102172012-12-10 Tom Tromey <tromey@redhat.com>
10218
10219 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10220 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10221 macros.
10222 (.c.o): Rewrite.
10223 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10224 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10225 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10226 (amd64-linux-ipa.o, ax.o): Rewrite.
10227 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10228 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10229 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10230 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10231 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10232 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10233 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10234 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10235 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10236 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10237 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10238 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10239 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10240 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10241 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10242 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10243 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10244 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10245 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10246 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10247 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10248 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10249 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10250 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10251 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10252 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10253 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10254 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10255 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10256 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10257 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10258 (reg-tilegx.o): Remove.
10259 (all_object_files): New macro.
10260 Include .deps files.
10261 * aclocal.m4, configure: Rebuild.
10262 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10263 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10264 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10265
e90e9ad9
TT
102662012-12-05 Tom Tromey <tromey@redhat.com>
10267
10268 PR gdb/14917:
10269 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10270
02d403bf 102712012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10272
10273 * configure.ac: Check for linux/perf_event.h.
10274 * config.in: Regenerated.
10275 * configure: Regenerated.
10276
0270a750
PA
102772012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10278
10279 * hostio.c (handle_readlink): Decrease buffer size
10280 parameter passed to readlink by one byte.
10281
8c29b58e
YQ
102822012-11-26 Yao Qi <yao@codesourcery.com>
10283
10284 * configure.ac (build_warnings): Append '-Wempty-body'.
10285 * configure: Regenerated.
10286 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10287 body.
10288
8bdce1ff
PM
102892012-11-15 Pierre Muller <muller@sourceware.org>
10290
10291 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10292 * config.in: Regenerate.
10293 * configure: Regenerate.
10294 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10295 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10296 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10297 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10298 header.
10299 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10300 instead of <sys/wait.h> header.
10301 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10302
02d403bf 103032012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10304
10305 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10306 (various make rules): Remove -DGDBSERVER
10307
fbd5db48
YQ
103082012-11-09 Yao Qi <yao@codesourcery.com>
10309
10310 * spu-low.c (current_ptid): Move it to ..
10311 * gdbthread.h: ... here. New.
10312 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10313 * server.c (myresume, process_serial_event): Likewise.
10314 * thread-db.c (thread_db_find_new_threads): Likewise.
10315 * tracepoint.c (run_inferior_command): Likewise.
10316
b3dc46ff
AB
103172012-10-01 Andrew Burgess <aburgess@broadcom.com>
10318
10319 * server.c (handle_search_memory_1): Include access length in
10320 warning message.
10321
07c04788
HPN
103222012-09-05 Michael Brandt <michael.brandt@axis.com>
10323
10324 * linux-crisv32-low.c: Fix compile errors.
10325
918d227b
YQ
103262012-09-04 Yao Qi <yao@codesourcery.com>
10327
10328 * tracepoint.c (cmd_qtsv): Adjust debug message.
10329 Don't check CUR_TPOINT.
10330
18c1b81a
YQ
103312012-08-28 Yao Qi <yao@codesourcery.com>
10332
10333 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10334 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10335 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10336 Remove declarations of xmalloc, xreallloc, xstrdup and
10337 freeargv.
10338 * Makefile.in (libiberty_h): New.
10339 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10340 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10341
dc82f37b
YQ
103422012-08-23 Yao Qi <yao@codesourcery.com>
10343
10344 * server.h: Remove declaration of 'xsnprintf'.
10345
406b1477
KS
103462012-08-22 Keith Seitz <keiths@redhat.com>
10347
10348 * server.h: Include build-gnulib-gbserver/config.h.
10349 * gdbreplay.c: Likewise.
10350
e6712ff1
DE
103512012-08-08 Doug Evans <dje@google.com>
10352
10353 * Makefile.in (SFILES): Add gdb_vecs.c.
10354 (OBS): Add gdb_vecs.o.
10355 (gdb_vecs_h, host_defs_h): New variables.
10356 (thread-db.o): Add $(gdb_vecs_h) dependency.
10357 (gdb_vecs.o): New rule.
10358 * thread-db.c: #include "gdb_vecs.h".
10359 (thread_db_load_search): Use a vector to iterate over path elements.
10360 Handle text appearing after "$pdir".
10361
10362 * configure.ac: Add check for strstr.
10363 * config.in: Regenerate.
10364 * configure: Regenerate.
10365
7c3270ae
UW
103662012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10367
10368 * hostio.c (handle_pread): If pread fails, fall back to attempting
10369 lseek/read.
10370 (handle_pwrite): Likewise for pwrite.
10371
b62e2b27
UW
103722012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10373
10374 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10375 between unsupported TYPE and unimplementable ADDR/LEN combination.
10376 (arm_insert_point): Act on new return value.
10377
78a99e91
PA
103782012-07-31 Pedro Alves <palves@redhat.com>
10379
10380 * server.c (process_point_options): Only skip tokens if we find
10381 one that is unrecognized. Don't treat 'X' specially while
10382 skipping unrecognized tokens.
10383
fcf303ab
UW
103842012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10385
10386 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10387 to 4-byte-align HW breakpoint addresses for Thumb.
10388
7255706c
YQ
103892012-07-27 Yao Qi <yao@codesourcery.com>
10390
10391 PR remote/14161.
10392
10393 * server.h: Declare gdb_agent_about_to_close.
10394 * target.c (kill_inferior): Include "agent.h".
10395 New. Send command 'kill'.
10396 * target.h (kill_inferior): Removed macro.
10397 * tracepoint.c (gdb_agent_about_to_close): New.
10398 (gdb_agent_helper_thread): Handle command 'close'.
10399 Wait endlessly until the inferior stops.
10400 Install gdb_agent_remove_socket to atexit hook.
10401 (agent_socket_name): New static variable.
10402 (gdb_agent_socket_init): Replace local variable 'name' with
10403 'agent_socket_name'.
10404 (gdb_agent_remove_socket): New.
10405
5a3f286f
YQ
104062012-07-27 Yao Qi <yao@codesourcery.com>
10407
10408 * server.c (process_point_options): Stop at 'X' when parsing.
10409
961bd387
ME
104102012-07-19 Michael Eager <eager@eagercon.com>
10411
a261b8f5 10412 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10413 to hw_execute.
10414 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10415 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10416 hardware breakpoint.
10417
aa7c7447
JK
104182012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10419
10420 * gdbserver/linux-low.c (initialize_low): Call
10421 linux_ptrace_init_warnings.
10422
7f216e7c
DE
104232012-07-02 Doug Evans <dje@google.com>
10424
10425 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10426 pointer to int.
10427
d3ce09f5
SS
104282012-07-02 Stan Shebs <stan@codesourcery.com>
10429
10430 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10431 (ax.o): Add it to build rule.
10432 (ax-ipa.o): Ditto.
10433 (OBS): Add format.o.
10434 (IPA_OBS): Add format.o.
10435 * server.c (handle_query): Claim support for breakpoint commands.
10436 (process_point_options): Add command case.
10437 (process_serial_event): Leave running if there are printfs in
10438 effect.
10439 * mem-break.h (any_persistent_commands): Declare.
10440 (add_breakpoint_commands): Declare.
10441 (gdb_no_commands_at_breakpoint): Declare.
10442 (run_breakpoint_commands): Declare.
10443 * mem-break.c (struct point_command_list): New struct.
10444 (struct breakpoint): New field command_list.
10445 (any_persistent_commands): New function.
10446 (add_commands_to_breakpoint): New function.
10447 (add_breakpoint_commands): New function.
10448 (gdb_no_commands_at_breakpoint): New function.
10449 (run_breakpoint_commands): New function.
10450 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10451 locally.
10452 * ax.c: Include format.h.
10453 (ax_printf): New function.
10454 (gdb_eval_agent_expr): Add printf opcode.
10455
2f8f6aed
YQ
104562012-06-13 Yao Qi <yao@codesourcery.com>
10457
10458 * server.c (start_inferior): Remove duplicated writes to fields
10459 'last_resume_kind' and 'last_status' of 'current_inferior'.
10460
0c9070b3
YQ
104612012-06-12 Yao Qi <yao@codesourcery.com>
10462 Pedro Alves <palves@redhat.com>
10463
10464 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10465 comment.
10466 * server.c (handle_v_cont): Extend comment.
10467
c52daf70
YQ
104682012-06-11 Yao Qi <yao@codesourcery.com>
10469
10470 * linux-low.c (linux_attach): Add 'static'.
10471
d38bbb0a
YQ
104722012-06-06 Yao Qi <yao@codesourcery.com>
10473
10474 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10475
89dc0afd
JK
104762012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10477
10478 Fix gcc -flto compilation warning.
10479 * server.c (main): Make variable multi_mode and attach volatile.
10480
75f62ce7
TJB
104812012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10482
10483 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10484 if the platform doesn't know about it.
10485
65f479b6
PA
104862012-05-30 Jeff Kenton <jkenton@tilera.com>
10487
10488 * Makefile.in (SFILES): Add linux-tile-low.c.
10489 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10490 * configure.srv: Handle tilegx-*-linux*.
10491 * linux-tile-low.c: New file.
10492
0c5bf5a9
JK
104932012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10494
10495 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10496
a493e3e2
PA
104972012-05-24 Pedro Alves <palves@redhat.com>
10498
10499 PR gdb/7205
10500
43aaf8b6 10501 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10502
2ea28649
PA
105032012-05-24 Pedro Alves <palves@redhat.com>
10504
10505 PR gdb/7205
10506
10507 Replace target_signal with gdb_signal throughout.
10508
8d409d16
MR
105092012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10510
10511 * linux-low.c (linux_store_registers): Avoid the copying sequence
10512 when no data has been retrieved by ptrace.
10513
23512c01
MGD
105142012-05-22 Will Deacon <will.deacon@arm.com>
10515
10516 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10517 Include asm/ptrace.h.
10518 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10519 already defined.
10520
4934b29e
MR
105212012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10522
10523 * linux-low.c (linux_store_registers): Don't re-retrieve data
10524 with ptrace that has already been obtained from /proc. Always
10525 copy any data retrieved with ptrace to the buffer supplied.
10526
bde24c0a
PA
105272012-05-11 Yao Qi <yao@codesourcery.com>
10528 Pedro Alves <palves@redhat.com>
10529
10530 * linux-low.c (enum stopping_threads_kind): New.
10531 (stopping_threads): Change type to `enum stopping_threads_kind'.
10532 (handle_extended_wait): If stopping and suspending threads, leave
10533 the new_lwp suspended too.
10534 (linux_wait_for_event): Adjust.
10535 (stop_all_lwps): Set `stopping_threads' to
10536 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10537 whether we're suspending threads or just stopping them. Assert no
10538 recursion happens.
10539
623b6bdf
YQ
105402012-04-29 Yao Qi <yao@codesourcery.com>
10541
10542 * server.h: Move some code to ...
10543 * gdbthread.h: ... here. New.
10544 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10545 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10546 (nto-low.o, win32-low.o): Likewise.
10547 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10548 * regcache.c, remote-utils.c, server.c: Likewise.
10549 * target.c, tracepoint.c, win32-low.c: Likewise.
10550
f15f9948
TJB
105512012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10552
10553 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10554 (PTRACE_ARG4_TYPE): Likewise.
10555 (PTRACE_XFER_TYPE): Likewise.
10556 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10557 ptrace to PTRACE_ARG3_TYPE.
10558 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10559 (PTRACE_ARG4_TYPE): Likewise.
10560 (PTRACE_XFER_TYPE): Likewise.
10561 (linux_detach_one_lwp): Cast fourth argument of
10562 ptrace to long then PTRACE_ARG4_TYPE.
10563 (regsets_fetch_inferior_registers): Cast third argument of
10564 ptrace to long then PTRACE_ARG3_TYPE.
10565 (regsets_store_inferior_registers): Likewise.
10566
38ea300a
PA
105672012-04-20 Pedro Alves <palves@redhat.com>
10568
10569 * configure: Regenerate.
10570
c971b7fa
PA
105712012-04-19 Pedro Alves <palves@redhat.com>
10572
43aaf8b6 10573 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10574 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10575 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10576 (all, install-only, uninstall, clean-info, all-lib, clean): No
10577 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10578 (maintainer-clean realclean distclean): Use subdir_do.
10579 (subdir_do): New.
10580 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10581 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10582 * acinclude.m4: Include acx_configure_dir.m4.
10583 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10584 calls. Call AC_PROG_RANLIB. Configure gnulib using
10585 ACX_CONFIGURE_DIR.
10586 (GNULIB): New.
10587 (GNULIB_STDINT_H): Adjust.
10588 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10589 * gdbreplay.c: Include build-gnulib/config.h.
10590 * server.h: Likewise.
10591 * aclocal.m4: Regenerate.
10592 * config.in: Regenerate.
10593 * configure: Regenerate.
c971b7fa 10594
809277f8
PA
105952012-04-19 Pedro Alves <palves@redhat.com>
10596
10597 * Makefile.in (LIBGNU, INCGNU): Adjust.
10598 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10599 (all, install-only, uninstall, clean-info, all-lib, clean)
10600 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10601 * configure.ac: Adjust AC_OUTPUT output.
10602 * aclocal.m4: Regenerate.
10603 * configure: Regenerate.
10604
fd9bb8b8
PA
106052012-04-19 Pedro Alves <palves@redhat.com>
10606
10607 * Makefile.in (generated_files): New.
10608 (server_h): Remove the explicit dependency on config.h, and depend
10609 on $generated_files.
10610
1c298c66
PA
106112012-04-19 Pedro Alves <palves@redhat.com>
10612
10613 * Makefile.in (INCGNU): Add -Ignulib.
10614
57c4b50b
PA
106152012-04-19 Pedro Alves <palves@redhat.com>
10616
10617 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10618 (INCGNU): ... this, and spell out -I here.
10619 (GNULIB_LIB): Rename to ...
10620 (LIBGNU): ... this.
10621 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10622
1030e047
PA
106232012-04-19 Pedro Alves <palves@redhat.com>
10624
10625 * config.in: Regenerate.
10626
447d4319
PA
106272012-04-19 Pedro Alves <palves@redhat.com>
10628
10629 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10630 * server.h (memmem): Remove declaration.
10631 * config.in: Regenerate.
10632 * configure: Regenerate.
10633
aad9eab9
YQ
106342012-04-19 Yao Qi <yao@codesourcery.com>
10635
10636 * Makefile.in (SFILES): Add common/vec.c.
10637 (OBS): Add vec.o.
10638 (vec.o): New rule.
10639
3e10640f
YQ
106402012-04-19 Yao Qi <yao@codesourcery.com>
10641
10642 * remote-utils.c (prepare_resume_reply): Replace with macro
10643 target_core_of_thread.
10644 * server.c (handle_qxfer_threads_proper): Likewise.
10645 * target.h (traget_core_of_thread): New macro.
10646
71622373
PA
106472012-04-18 Pedro Alves <palves@redhat.com>
10648
10649 * aclocal.m4: Regenerate.
10650 * configure: Regenerate.
10651
80d26939
YQ
106522012-04-16 Yao Qi <yao@codesourcery.com>
10653
10654 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10655 duplicated on address.
10656
42476b70
YQ
106572012-04-16 Yao Qi <yao@codesourcery.com>
10658
10659 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10660 (struct tracepoint_action_ops) <send>: New field.
10661 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10662 (agent_expr_send, x_tracepoint_action_send): New.
10663 (l_tracepoint_action_send): New.
10664 (cmd_qtdp): Download and install tracepoint
10665 according to `use_agent'.
10666 (run_inferior_command): Add one more parameter `len'.
10667 Update callers.
10668 (tracepoint_send_agent): New.
10669 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10670
7bc83639
YQ
106712012-04-16 Yao Qi <yao@codesourcery.com>
10672
10673 * tracepoint.c (download_tracepoints): Moved to ...
10674 (cmd_qtstart): ... here.
10675
5f18041e
YQ
106762012-04-14 Yao Qi <yao@codesourcery.com>
10677
10678 * tracepoint.c: Include inttypes.h.
10679 (struct collect_memory_action): Use sized types.
10680 (struct tracepoint): Likewise.
10681 (cmd_qtdp, stop_tracing): Update print specifiers.
10682 (cmd_qtp, response_tracepoint): Likewise.
10683 (collect_data_at_tracepoint): Likewise.
10684 (collect_data_at_step): Likewise.
10685
55a8c076
YQ
106862012-04-14 Yao Qi <yao@codesourcery.com>
10687
10688 Import gnulib module inttypes.
10689 * aclocal.m4, config.in, configure: Regenerated.
10690
dc750257
YQ
106912012-04-14 Yao Qi <yao@codesourcery.com>
10692
10693 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10694 Makefile and config.status at last.
10695
0ab5faf9
YQ
106962012-04-13 Yao Qi <yao@codesourcery.com>
10697
10698 * tracepoint.c: Include stdint.h unconditionally.
10699
18f5fd81
TJB
107002012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10701
10702 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10703 on BFD_HAVE_SYS_PROCFS_TYPE.
10704 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10705 * configure: Regenerate.
10706 * config.in: Likewise.
10707
4d47af5c
L
107082012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10709
10710 * Makefile.in (clean): Also remove x32.c x32-linux.c
10711 x32-avx.c x32-avx-linux.c.
10712 (x32.o): New target.
10713 (x32.c): Likewise.
10714 (x32-linux.o): Likewise.
10715 (x32-linux.c): Likewise.
10716 (x32-avx.o): Likewise.
10717 (x32-avx.c): Likewise.
10718 (x32-avx-linux.o): Likewise.
10719 (x32-avx-linux.c): Likewise.
10720
10721 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10722 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10723 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10724 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10725 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10726 i386/x32-avx-linux.xml.
10727
10728 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10729 (init_registers_x32_avx_linux): Likwise.
10730 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10731 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10732
ecedbe58
PA
107332012-04-13 Pedro Alves <palves@redhat.com>
10734
10735 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10736 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10737 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10738 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10739 the sub-make.
10740
c92b5177
L
107412012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10742
10743 * linux-x86-low.c (compat_x32_clock_t): New.
10744 (compat_x32_siginfo_t): Likewise.
10745 (compat_x32_siginfo_from_siginfo): Likewise.
10746 (siginfo_from_compat_x32_siginfo): Likewise.
10747 (linux_is_elf64): Likewise.
10748 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10749 and siginfo_from_compat_x32_siginfo for x32.
10750 (x86_arch_setup): Set linux_is_elf64.
10751
214d508e
L
107522012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10753
10754 PR gdb/13969
10755 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10756 e_machine field.
10757 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10758 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10759 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10760 compatible with process.
10761
c9a1864a
YQ
107622012-04-12 Yao Qi <yao@codesourcery.com>
10763
10764 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10765 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10766 (install-only, install-info, clean): Handle sub dir gnulib.
10767 (all-lib, am--refresh): New targets.
10768 (memmem.o): Remove target.
10769 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10770 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10771 (AC_REPLACE_FUNCS): Remove memmem.
10772 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10773 (AC_OUTPUT): Generate Makefile in gnulib/.
10774 * aclocal.m4, config.in, configure: Regenerated.
10775
367ba2c2
MR
107762012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10777
10778 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10779
9d236627
PA
107802012-04-05 Pedro Alves <palves@redhat.com>
10781
10782 -Werror=strict-aliasing
10783
10784 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10785 pointer.
10786
111217b3
PA
107872012-04-04 Pedro Alves <palves@redhat.com>
10788
10789 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10790 (sparc_store_gregset_from_stack, sparc_store_gregset)
10791 (sparc_breakpoint_at): Fix formatting.
10792
8365dcf5
TJB
107932012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10794
10795 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10796 are available.
10797 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10798 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10799 * config.in: Regenerate.
10800 * configure: Likewise.
10801
689cc2ae
PA
108022012-03-29 Pedro Alves <palves@redhat.com>
10803
10804 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10805 Correct ptrace arguments.
10806
c14dfd32
PA
108072012-03-28 Pedro Alves <palves@redhat.com>
10808
10809 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10810 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10811 (IA64_FR1_REGNUM): New defines.
10812 (ia64_fetch_register): New.
10813 (the_low_target): Install it.
10814 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10815 field.
10816 * linux-low.c (linux_fetch_registers): Try the
10817 the_low_target.fetch_register hook first.
10818
10819 * linux-arm-low.c (the_low_target): Adjust.
10820 * linux-bfin-low.c (the_low_target): Adjust.
10821 * linux-cris-low.c (the_low_target): Adjust.
10822 * linux-crisv32-low.c (the_low_target): Adjust.
10823 * linux-m32r-low.c (the_low_target): Adjust.
10824 * linux-m68k-low.c (the_low_target): Adjust.
10825 * linux-mips-low.c (the_low_target): Adjust.
10826 * linux-ppc-low.c (the_low_target): Adjust.
10827 * linux-s390-low.c (the_low_target): Adjust.
10828 * linux-sh-low.c (the_low_target): Adjust.
10829 * linux-sparc-low.c (the_low_target): Adjust.
10830 * linux-tic6x-low.c (the_low_target): Adjust.
10831 * linux-x86-low.c (the_low_target): Adjust.
10832 * linux-xtensa-low.c (the_low_target): Adjust.
10833
63c88e13
PA
108342012-03-26 Pedro Alves <palves@redhat.com>
10835
10836 * server.c (handle_qxfer_libraries): Don't bail early if
10837 the_target->qxfer_libraries_svr4 is not NULL.
10838
fb723180
PA
108392012-03-26 Pedro Alves <palves@redhat.com>
10840
10841 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10842
0afae3cf
PA
108432012-03-23 Pedro Alves <palves@redhat.com>
10844
10845 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10846 "library-list-svr4" element's start tag when the the DSO list is
10847 empty.
10848
485f1ee4
PA
108492012-03-23 Pedro Alves <palves@redhat.com>
10850
10851 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10852 a variable whose type size is the same as the inferior's pointer
10853 size.
10854
a5362b9a
TS
108552012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10856
10857 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10858 struct siginfo.
10859 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10860 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10861 * linux-low.h: Include <signal.h>.
10862 (struct siginfo): Remove forward declaration.
10863 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10864 struct siginfo.
10865
d226c142
MF
108662012-03-21 Mike Frysinger <vapier@gentoo.org>
10867
10868 * .gitignore: Ignore more files.
10869
122f36ef
PA
108702012-03-19 Pedro Alves <palves@redhat.com>
10871 Jan Kratochvil <jan.kratochvil@redhat.com>
10872
10873 * server.c (cont_thread, general_thread): Add describing comments.
10874 (start_inferior): Clear `cont_thread'.
10875 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10876 of a process.
10877
fc3e5175
YQ
108782012-03-15 Yao Qi <yao@codesourcery.com>
10879
10880 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10881 handling to ...
10882 (cmd_qtdp): ... here.
10883
8d0d92cd
YQ
108842012-03-15 Yao Qi <yao@codesourcery.com>
10885
10886 * tracepoint.c (struct tracepoint_action_ops): New.
10887 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10888 (m_tracepoint_action_download): New.
10889 (r_tracepoint_action_download): New.
10890 (x_tracepoint_action_download): New.
10891 (l_tracepoint_action_download): New.
10892 (add_tracepoint_action): Install `action->ops' according type.
10893 (download_tracepoint_1): Move code `download' function pointer
10894 of various tracepoint_action_ops.
10895
87b0bb13
JK
108962012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10897
10898 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10899 linux_ptrace_attach_warnings.
10900
5f572dec
JK
109012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10902
10903 * Makefile.in (linux-ptrace.o): New.
10904 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10905 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10906 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10907 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10908 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10909 of these targets.
10910 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10911
f4647387
YQ
109122012-03-08 Yao Qi <yao@codesourcery.com>
10913 Pedro Alves <palves@redhat.com>
10914
10915 Fix PR server/13392.
10916 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10917 offset of JMP insn.
10918 * tracepoint.c (remove_tracepoint): New.
10919 (cmd_qtdp): Call remove_tracepoint when failed to install.
10920
9b224c5e
PA
109212012-03-07 Pedro Alves <palves@redhat.com>
10922
10923 * linux-low.c (get_detach_signal): New.
10924 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10925 Pass on pending signals to PTRACE_DETACH. Check the result of the
10926 ptrace call.
10927 * server.c (program_signals, program_signals_p): New.
10928 (handle_general_set): Handle QProgramSignals.
10929 * server.h (program_signals, program_signals_p): Declare.
10930
e237a7e2
JK
109312012-03-05 Pedro Alves <palves@redhat.com>
10932 Jan Kratochvil <jan.kratochvil@redhat.com>
10933
10934 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10935 New comment why.
10936
5808517f
YQ
109372012-03-03 Yao Qi <yao@codesourcery.com>
10938
10939 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10940 agent_look_up_symbols.
10941
58b4daa5
YQ
109422012-03-03 Yao Qi <yao@codesourcery.com>
10943
10944 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10945 (linux-x86-low.o): Likewise.
10946 * server.h: Remove in_process_agent_loaded.
10947 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10948 common/agent.c.
10949 Update callers.
10950
8ffcbaaf
YQ
109512012-03-03 Yao Qi <yao@codesourcery.com>
10952
10953 * tracepoint.c (gdb_agent_capability): New global.
10954 (in_process_agent_loaded_ust): Renamed to
10955 `in_process_agent_supports_ust'.
10956 Update callers.
10957 (in_process_agent_supports_ust): Call agent_capability_check.
10958 (clear_installed_tracepoints): Assert that agent supports
10959 agent.
10960
d1feda86
YQ
109612012-03-03 Yao Qi <yao@codesourcery.com>
10962
10963 * linux-low.c (linux_supports_agent): New.
10964 (linux_target_ops): Initialize field `supports_agent' with
10965 linux_supports_agent.
10966 * target.h (struct target_ops) <supports_agent>: New.
10967 (target_supports_agent): New macro.
10968 * server.c (handle_general_set): Handle packet 'QAgent'.
10969 (handle_query): Send `QAgent+'.
10970 * Makefile.in (server.o): Depends on agent.h.
10971
2fa291ac
YQ
109722012-03-03 Yao Qi <yao@codesourcery.com>
10973
10974 * Makefile.in (OBS): Add agent.o.
10975 Add new rule for agent.o.
10976 Track dependence of tracepoint.c on agent.h.
10977 * tracepoint.c (run_inferior_command_1):
10978 (run_inferior_command): Call agent_run_command.
10979 (gdb_ust_connect_sync_socket): Deleted. Move it to
10980 common/agent.c.
10981 (resume_thread, stop_thread): Likewise.
10982 (gdb_ust_socket_init): Renamed to ...
10983 (gdb_agent_socket_init): ... New.
10984 (gdb_ust_thread): Renamed to ...
10985 (gdb_agent_helper_thread): ... New.
10986 (gdb_ust_init): Move some code to ...
10987 (gdb_agent_init): ... here. New.
10988 [HAVE_UST]: Call gdb_ust_init.
10989 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10990 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10991 * config.in, configure: Regenerated.
10992
05044653
PA
109932012-03-02 Pedro Alves <palves@redhat.com>
10994
10995 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10996 * linux-low.c (struct simple_pid_list): New.
10997 (stopped_pids): New a struct simple_pid_list pointer.
10998 (add_to_pid_list, pull_pid_from_list): New.
10999 (handle_extended_wait): Don't assume the first signal new children
11000 report is SIGSTOP. Adjust call to pull_pid_from_list.
11001 (linux_wait_for_lwp): Adjust.
11002
8d00225b
YQ
110032012-03-02 Yao Qi <yao@codesourcery.com>
11004
11005 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11006 debug log.
11007
19560ba5
YQ
110082012-03-02 Yao Qi <yao@codesourcery.com>
11009
11010 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11011 `stop_pc' and `tpoint'. Update caller.
11012
1faeff08
MR
110132012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11014
11015 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11016 * linux-low.c (use_linux_regsets): New macro.
11017 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11018 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11019 (linux_register_in_regsets): New function.
11020 (usr_fetch_inferior_registers): Skip registers covered by
11021 regsets.
11022 (usr_store_inferior_registers): Likewise.
11023 (usr_fetch_inferior_registers): New macro.
11024 (usr_store_inferior_registers): Likewise.
11025 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11026 (linux_store_registers): Likewise.
11027 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11028 prototype.
11029 (init_registers_mips64_dsp_linux): Likewise.
11030 (init_registers_mips_linux): New macro.
11031 (init_registers_mips_dsp_linux): Likewise.
11032 (mips_dsp_num_regs): Likewise.
11033 (DSP_BASE, DSP_CONTROL): New fallback macros.
11034 (mips_base_regs): New macro.
11035 (mips_regmap): Use it. Fix the size.
11036 (mips_dsp_regmap): New variable.
11037 (mips_dsp_regset_bitmap): Likewise.
11038 (mips_arch_setup): New function.
11039 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11040 than mips_regmap.
11041 (mips_cannot_store_register): Likewise.
11042 (the_low_target): Update .arch_setup, .num_regs and .regmap
11043 initializers. Add .regset_bitmap initializer.
11044 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11045 initializer.
11046 * linux-bfin-low.c (the_low_target): Likewise.
11047 * linux-cris-low.c (the_low_target): Likewise.
11048 * linux-crisv32-low.c (the_low_target): Likewise.
11049 * linux-ia64-low.c (the_low_target): Likewise.
11050 * linux-m32r-low.c (the_low_target): Likewise.
11051 * linux-m68k-low.c (the_low_target): Likewise.
11052 * linux-ppc-low.c (the_low_target): Likewise.
11053 * linux-s390-low.c (the_low_target): Likewise.
11054 * linux-sh-low.c (the_low_target): Likewise.
11055 * linux-sparc-low.c (the_low_target): Likewise.
11056 * linux-tic6x-low.c (the_low_target): Likewise.
11057 * linux-x86-low.c (the_low_target): Likewise.
11058 * linux-xtensa-low.c (the_low_target): Likewise.
11059 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11060 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11061 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11062 srv_xmlfiles.
11063 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11064 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11065
c03e6ccc
YQ
110662012-02-29 Yao Qi <yao@codesourcery.com>
11067 Pedro Alves <palves@redhat.com>
11068
11069 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11070 `step_over_finished' is true.
11071
644cebc9
PA
110722012-02-27 Pedro Alves <palves@redhat.com>
11073
11074 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11075 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11076
c14d7ab2
PA
110772012-02-27 Pedro Alves <palves@redhat.com>
11078
11079 PR server/9684
11080 * linux-low.c (pid_is_stopped): New.
11081 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11082
412c89dd
LM
110832012-02-25 Luis Machado <lgustavo@codesourcery.com>
11084
11085 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11086 of conditions.
11087
b745defe
MR
110882012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11089
11090 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11091
9f3a5c85
LM
110922012-02-24 Luis Machado <lgustavo@codesourcery>
11093
11094 * server.c (handle_query): Advertise support for target-side
11095 breakpoint condition evaluation.
11096 (process_point_options): New function.
11097 (process_serial_event): When inserting a breakpoint, check for
11098 a target-side condition that should be evaluated.
11099
11100 * mem-break.c: Include regcache.h and ax.h.
11101 (point_cond_list_t): New data structure.
11102 (breakpoint) <cond_list>: New field.
11103 (find_gdb_breakpoint_at): Make non-static.
11104 (delete_gdb_breakpoint_at): Clear any target-side
11105 conditions.
11106 (clear_gdb_breakpoint_conditions): New function.
11107 (add_condition_to_breakpoint): Likewise.
11108 (add_breakpoint_condition): Likewise.
11109 (gdb_condition_true_at_breakpoint): Likewise.
11110 (gdb_breakpoint_here): Return result directly instead
11111 of going through a local variable.
11112
11113 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11114 (clear_gdb_breakpoint_conditions): Likewise.
11115 (add_breakpoint_condition): Likewise.
11116 (gdb_condition_true_at_breakpoint): Likewise.
11117
11118 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11119 (need_step_over_p): Take target-side breakpoint condition into
11120 consideration.
11121
5e1dc496
LM
111222012-02-24 Luis Machado <lgustavo@codesourcery>
11123
11124 * server.h: Include tracepoint.h.
11125 (agent_mem_read, agent_get_trace_state_variable_value,
11126 agent_set_trace_state_variable_value,
11127 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11128 get_set_tsv_func_addr): New prototypes.
11129
11130 * ax.h: New include file.
11131 * ax.c: New source file.
11132
11133 * tracepoint.c: Include ax.h.
11134 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11135 agent_expr, eval_result_type): Move to ax.h.
11136 (parse_agent_expr): Rename to ...
11137 (gdb_parse_agent_expr): ... this, make it non-static and move
11138 to ax.h.
11139 (unparse_agent_expr) Rename to ...
11140 (gdb_unparse_agent_expr): ... this, make it non-static and move
11141 to ax.h.
11142 (eval_agent_expr): Rename to ...
11143 (eval_tracepoint_agent_expr): ... this.
11144 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11145 forward declarations.
11146 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11147 (agent_get_trace_state_variable_value): New function.
11148 (agent_set_trace_state_variable_value): New function.
11149 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11150 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11151 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11152 (condition_true_at_tracepoint): Likewise.
11153 (parse_agent_expr): Rename to ...
11154 (gdb_parse_agent_expr): ... this and move to ax.c.
11155 (unparse_agent_expr): Rename to ...
11156 (gdb_unparse_agent_expr): ... this and move to ax.c.
11157 (gdb_agent_op_name): Move to ax.c.
11158 (eval_agent_expr): Rename to ...
11159 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11160 and move to ax.c.
11161 (eval_tracepoint_agent_expr): New function.
11162 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11163 non-static.
5e1dc496
LM
11164 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11165 ax.c.
11166 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11167 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11168 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11169 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11170 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11171 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11172 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11173 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11174 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11175 (compile_bytecodes): Remove forward declaration.
11176 (is_goto_target): Move to ax.c.
11177 (compile_bytecodes): Move to ax.c and call
11178 agent_get_trace_state_variable_value (...) and
11179 agent_set_trace_state_variable_value (...).
11180
11181 * Makefile.in: Update ax.c and IPA dependencies.
11182
277e4e52
PA
111832012-02-24 Pedro Alves <palves@redhat.com>
11184
11185 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11186 (cmd_bigqtbuffer_circular): ... this. Only handle
11187 'QTBuffer:circular:'.
11188 (handle_tracepoint_general_set): Adjust.
11189
bf4c19f7
YQ
111902012-02-16 Yao Qi <yao@codesourcery.com>
11191
11192 * inferiors.c: Move code to ...
11193 * dll.c: .... here. New.
11194 * server.h: Declare clear_dlls.
11195 * Makefile.in (SFILES): Add dll.c.
11196 (OBS): Add dll.o
11197 (dll.o): New rule.
11198
d73f2619
YQ
111992012-02-11 Yao Qi <yao@codesourcery.com>
11200
11201 * server.c: (handle_monitor_command): Add a new parameter
11202 `own_buf'.
11203 (handle_query): Update caller.
11204
f8255c2a
JB
112052012-02-09 Joel Brobecker <brobecker@adacore.com>
11206
11207 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11208 * configure, config.in: Regenerate.
11209 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11210 is not defined.
11211
da84f473
PA
112122012-02-02 Pedro Alves <palves@redhat.com>
11213
11214 Try SIGKILL first, then PTRACE_KILL.
11215 * linux-low.c (linux_kill_one_lwp): New.
11216 (linux_kill_one_lwp): Rename to ...
11217 (kill_one_lwp_callback): ... this. Use the new
11218 linux_kill_one_lwp.
11219
e886a173
PA
112202012-02-02 Pedro Alves <palves@redhat.com>
11221
11222 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11223 inferior.
11224
be07f1a2
PA
112252012-01-27 Pedro Alves <palves@redhat.com>
11226
11227 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11228 (elf_64_file_p): Make static.
11229 (linux_pid_exe_is_elf_64_file): New.
11230 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11231 Delete declarations.
11232 (linux_pid_exe_is_elf_64_file): Declare.
11233 * linux-x86-low.c (x86_arch_setup): Use
11234 linux_pid_exe_is_elf_64_file.
11235
d8301ad1
JK
112362012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11237
11238 * linux-low.c (linux_wait_for_event_1): Rename to ...
11239 (linux_wait_for_event): ... here and merge it with former
11240 linux_wait_for_event - new variable wait_ptid, use it.
11241 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11242
01b17894
PA
112432012-01-23 Pedro Alves <palves@redhat.com>
11244
11245 * server.c (main): Avoid yet another case of infinite loop while
11246 detaching/killing after a longjmp.
11247
e825046f
JK
112482012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11249
11250 Code cleanup.
11251 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11252
b9e7b9c3
UW
112532012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11254
11255 * hostio.c (handle_readlink): New function.
11256 (handle_vFile): Call it to handle "vFile:readlink" packets.
11257
901f9912
UW
112582012-01-20 Pedro Alves <palves@redhat.com>
11259 Ulrich Weigand <ulrich.weigand@linaro.org>
11260
11261 * server.c (handle_v_requests): Only support vAttach and vRun to
11262 start multiple processes when in extended protocol mode.
11263
fc1ab1a0
PA
112642012-01-17 Pedro Alves <palves@redhat.com>
11265
11266 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11267 memalign plus mprotect to allocate the scratch buffer.
11268
7d5d4e98
PA
112692012-01-13 Pedro Alves <palves@redhat.com>
11270
11271 * server.c (attach_inferior): Clear `cont_thread'.
11272
f128d5e9
PA
112732012-01-13 Pedro Alves <palves@redhat.com>
11274
11275 * server.c (main): Avoid infinite loop while detaching/killing
11276 after a longjmp.
11277
06db92f0
DE
112782012-01-09 Doug Evans <dje@google.com>
11279
11280 * server.c (start_inferior): Set last_ptid in --wrapper case.
11281
32d92999
YQ
112822012-01-06 Yao Qi <yao@codesourcery.com>
11283
11284 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11285 defined.
11286 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11287
5e0a92a9
YQ
112882012-01-04 Yao Qi <yao@codesourcery.com>
11289
11290 * tracepoint.c (cmd_qtdp): Print debug message
11291 for static tracepoint.
11292
ae639e8c
YQ
112932012-01-04 Yao Qi <yao@codesourcery.com>
11294
11295 * tracepoint.c (trace_vdebug): Differentiate debug message
11296 between gdbserver and IPA.
11297
f72429c5
YQ
112982012-01-03 Yao Qi <yao@codesourcery.com>
11299
11300 * tracepoint.c (tracepoint_was_hit): Don't collect for
11301 static tracepoint.
11302
12c3e59c
JB
113032012-01-02 Joel Brobecker <brobecker@adacore.com>
11304
11305 * terminal.h: Reformat copyright header.
11306
67827812
JB
113072012-01-02 Joel Brobecker <brobecker@adacore.com>
11308
11309 * server.c (gdbserver_version): Update copyright year.
11310 * gdbreplay.c (gdbreplay_version): Likewise.
11311
3e52c33d
JK
113122011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11313
11314 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11315
11316 Revert:
11317 2011-12-18 Hui Zhu <teawater@gmail.com>
11318 * linux-low.c (linux_create_inferior): Save return value to ret.
11319
66f1260e
HZ
113202011-12-18 Hui Zhu <teawater@gmail.com>
11321
11322 * linux-low.c (linux_create_inferior): Save return value to ret.
11323
e77616d7
DE
113242011-12-16 Doug Evans <dje@google.com>
11325
e7b06c57
DE
11326 * linux-low.c (linux_create_inferior): If stdio connection,
11327 redirect stdin from /dev/null, stdout to stderr.
11328 * remote-utils.c (remote_is_stdio): New static global.
11329 (remote_connection_is_stdio): New function.
11330 (remote_prepare): Handle stdio connection.
11331 (remote_open): Ditto.
11332 (remote_close): Don't close stdin for stdio connections.
11333 (read_prim,write_prim): New functions. Replace all calls to
11334 read/write to these.
11335 * server.c (main): Watch for "-" argument. Move call to
11336 remote_prepare before start_inferior.
11337 * server.h (STDIO_CONNECTION_NAME): New macro.
11338 (remote_connection_is_stdio): Declare.
11339
e77616d7
DE
11340 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11341 in debugging output.
11342
82067193
YQ
113432011-12-15 Yao Qi <yao@codesourcery.com>
11344
11345 * tracepoint.c: Include sys/syscall.h.
11346 (gdb_ust_thread): Remove preprocessor conditional.
11347
82bfbe7e
PA
113482011-12-14 Pedro Alves <pedro@codesourcery.com>
11349
11350 * linux-low.c (linux_detach_one_lwp): Call
11351 the_low_target.prepare_to_resume before detaching.
11352
712c6575
YQ
113532011-12-14 Yao Qi <yao@codesourcery.com>
11354
11355 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11356 of write.
11357
d54d1edf
YQ
113582011-12-14 Yao Qi <yao@codesourcery.com>
11359
11360 * i386-low.c (i386_low_stopped_data_address): Initialize local
11361 variable `control'.
11362
6210a125
PA
113632011-12-13 Pedro Alves <pedro@codesourcery.com>
11364
11365 PR remote/13492
11366
11367 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11368 DR_CONTROL unless necessary. Extend comments.
11369 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11370 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11371
2ece8244
YQ
113722011-12-13 Yao Qi <yao@codesourcery.com>
11373
11374 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11375 macros.
11376 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11377
784867a5
JK
113782011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11379
11380 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11381 Print new debug message for such case.
11382
6bf36717
JK
113832011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11384
11385 Fix overlapping memcpy.
11386 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11387 the read_inferior_memory transfer.
11388 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11389 write_inferior_memory transfer.
11390 (set_fast_tracepoint_jump): New variable buf. Use it for the
11391 read_inferior_memory and write_inferior_memory transfers.
11392 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11393 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11394 Use it for the write_inferior_memory transfer.
11395 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11396 buffers.
11397
50275556
MR
113982011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11399
11400 * linux-low.c (fetch_register, store_register): Make code
11401 consistent, fix formatting.
11402
7325beb4
MR
114032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11404
11405 * linux-low.c (usr_store_inferior_registers): Factor out code
11406 to handle individual registers into...
11407 (store_register): ... this new function.
11408
c642a434
UW
114092011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11410
11411 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11412 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11413 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11414 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11415 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11416 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11417 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11418 (srv_xmlfiles): Add new XML files.
11419
11420 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11421 and <sys/uio.h>.
11422 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11423 (init_registers_s390_linux32v1): Add prototype.
11424 (init_registers_s390_linux32v2): Likewise.
11425 (init_registers_s390_linux64v1): Likewise.
11426 (init_registers_s390_linux64v2): Likewise.
11427 (init_registers_s390x_linux64v1): Likewise.
11428 (init_registers_s390x_linux64v2): Likewise.
11429 (s390_num_regs): Increment to 52.
11430 (s390_regmap): Add orig_r2 register.
11431 (s390_num_regs_3264): Increment to 68.
11432 (s390_regmap_3264): Add orig_r2 register.
11433 (s390_collect_ptrace_register): Handle orig_r2 register.
11434 (s390_supply_ptrace_register): Likewise.
11435 (s390_fill_last_break): New function.
11436 (s390_store_last_break): Likewise.
11437 (s390_fill_system_call): New function.
11438 (s390_store_system_call): Likewise.
11439 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11440 register sets.
11441 (s390_check_regset): New function.
11442 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11443 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11444 Update target_regsets for available register sets.
11445
2268b414
JK
114462011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11447 Jan Kratochvil <jan.kratochvil@redhat.com>
11448
11449 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11450 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11451 New.
11452 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11453 * linux-low.h (struct process_info_private): New member r_debug.
11454 * server.c (handle_qxfer_libraries): Call
11455 the_target->qxfer_libraries_svr4.
11456 (handle_qxfer_libraries_svr4): New function.
11457 (qxfer_packets): New entry "libraries-svr4".
11458 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11459 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11460 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11461 PACKET_qXfer_libraries_svr4.
11462
d6db1fab
UW
114632011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11464
11465 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11466 PSW address/mask between 8-byte and 16-byte formats.
11467 (s390_supply_ptrace_register): Likewise.
11468 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11469 basic addressing mode bit.
11470
242f5f1c
SS
114712011-11-24 Stan Shebs <stan@codesourcery.com>
11472
11473 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11474
f196051f
SS
114752011-11-17 Stan Shebs <stan@codesourcery.com>
11476
11477 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11478 (tracing_start_time): New global.
11479 (tracing_stop_time): New global.
11480 (tracing_user_name): New global.
11481 (tracing_notes): New global.
11482 (tracing_stop_note): New global.
11483 (cmd_qtstart): Set traceframe_usage, start_time.
11484 (stop_tracing): Set stop_time.
11485 (cmd_qtstatus): Report additional status.
11486 (cmd_qtp): New function.
11487 (handle_tracepoint_query): Call it.
11488 (cmd_qtnotes): New function.
11489 (handle_tracepoint_general_set): Call it.
11490 (get_timestamp): Rename from tsv_get_timestamp.
11491
405f8e94
SS
114922011-11-14 Stan Shebs <stan@codesourcery.com>
11493 Kwok Cheung Yeung <kcy@codesourcery.com>
11494
11495 * linux-x86-low.c (small_jump_insn): New.
11496 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11497 trampoline and error message, build a trampoline and issue a small
11498 jump instruction to it.
11499 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11500 trampoline and error message.
11501 (x86_get_min_fast_tracepoint_insn_len): New.
11502 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11503 * linux-low.h (struct linux_target_ops): Add arguments to
11504 install_fast_tracepoint_jump_pad operation, add new operation.
11505 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11506 arguments.
11507 (linux_get_min_fast_tracepoint_insn_len): New function.
11508 (linux_target_op): Add new operation.
11509 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11510 (gdb_trampoline_buffer_end): Ditto.
11511 (gdb_trampoline_buffer_error): Ditto.
11512 (struct ipa_sym_addresses): Add fields for new IPA variables.
11513 (symbol_list): Add entries for new IPA variables.
11514 (struct tracepoint): Add fields to hold the address range of the
11515 trampoline used by the tracepoint.
11516 (trampoline_buffer_head): New static variable.
11517 (trampoline_buffer_tail): Ditto.
11518 (claim_trampoline_space): New function.
11519 (have_fast_tracepoint_trampoline_buffer): New function.
11520 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11521 structure.
11522 (install_fast_tracepoint): Ditto, also add error buffer argument.
11523 (cmd_qtminftpilen): New function.
11524 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11525 (fast_tracepoint_from_trampoline_address): New function.
11526 (fast_tracepoint_collecting): Handle trampoline as part of jump
11527 pad space.
11528 (set_trampoline_buffer_space): New function.
11529 (initialize_tracepoint): Initialize new IPA variables.
11530 * target.h (struct target_ops): Add arguments to
11531 install_fast_tracepoint_jump_pad operation, add new
11532 get_min_fast_tracepoint_insn_len operation.
11533 (target_get_min_fast_tracepoint_insn_len): New.
11534 (install_fast_tracepoint_jump_pad): Add arguments.
11535 * server.h (IPA_BUFSIZ): Define.
11536 * linux-i386-ipa.c: Include extra header files.
11537 (initialize_fast_tracepoint_trampoline_buffer): New function.
11538 (initialize_low_tracepoint): Call it.
11539 * server.h (set_trampoline_buffer_space): Declare.
11540 (claim_trampoline_space): Ditto.
11541 (have_fast_tracepoint_trampoline_buffer): Ditto.
11542
1e4d1764
YQ
115432011-11-14 Yao Qi <yao@codesourcery.com>
11544
11545 * server.c (handle_query): Handle InstallInTrace for qSupported.
11546 * tracepoint.c (add_tracepoint): Sort list.
11547 (install_tracepoint, download_tracepoint): New.
11548 (cmd_qtdp): Call them to install and download tracepoints.
11549 (sort_tracepoints): Removed.
11550 (cmd_qtstart): Update.
11551
5c73ff4e
YQ
115522011-11-14 Yao Qi <yao@codesourcery.com>
11553
11554 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11555 * mem-break.h: Declare.
11556 * tracepoint.c (cmd_qtstart): Move some code to ...
11557 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11558 New.
11559 (download_tracepoints): Move some code to ...
11560 (download_tracepoint_1): ... here. New.
11561
86a30030
YQ
115622011-11-08 Yao Qi <yao@codesourcery.com>
11563
11564 * remote-utils.c (relocate_instruction): A comment fix.
11565
8d26e50c
JB
115662011-11-07 Joel Brobecker <brobecker@adacore.com>
11567
11568 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11569 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11570 dr_status_mirror and dr_control_mirror from debug_reg_state.
11571 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11572 (i386_initial_stuff): Remove use of deleted globals.
11573 (i386_get_thread_context, i386_set_thread_context,
11574 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11575 from debug_reg_state.
11576
a59306a3
YQ
115772011-11-05 Yao Qi <yao@codesourcery.com>
11578
11579 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11580 address as TPOINT's.
11581
3065dfb6
SS
115822011-11-02 Stan Shebs <stan@codesourcery.com>
11583
11584 * tracepoint.c (agent_mem_read_string): New function.
11585 (eval_agent_expr): Call it for tracenz.
11586 * server.c (handle_query): Report support for tracenz.
11587
fd0d8c7c
YQ
115882011-11-02 Yao Qi <yao@codesourcery.com>
11589
11590 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11591
609086b1
YQ
115922011-11-02 Yao Qi <yao@codesourcery.com>
11593
11594 * target.h: Fix a typo in comment.
11595
b9fd1791
PA
115962011-10-31 Pedro Alves <pedro@codesourcery.com>
11597
11598 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11599 clobber the breakpoints' shadows with fast tracepoint jumps.
11600 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11601 * target.c (write_inferior_memory): Also pass MYADDR down to
11602 check_mem_write.
11603
03583c20
UW
116042011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11605
11606 * configure.ac: Check support for personality routine.
11607 * configure: Regenerate.
11608 * config.in: Likewise.
11609 * linux-low.c: Include <sys/personality.h>.
11610 Define ADDR_NO_RANDOMIZE if necessary.
11611 (linux_create_inferior): Disable address space randomization when
11612 forking inferior, if requested.
11613 (linux_supports_disable_randomization): New function.
11614 (linux_target_ops): Install it.
11615 * server.h (disable_randomization): Declare.
11616 * server.c (disable_randomization): New global variable.
11617 (handle_general_set): Handle QDisableRandomization.
11618 (handle_query): Likewise for qSupported.
11619 (main): Support --disable-randomization and --no-disable-randomization
11620 command line arguments.
11621 * target.h (struct target_ops): Add supports_disable_randomization.
11622 (target_supports_disable_randomization): New macro.
11623
723b724b
MF
116242011-09-29 Mike Frysinger <vapier@gentoo.org>
11625
11626 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11627 ifdef check.
11628 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11629 [!PT_GETDSBT] (target_loadmap): New definition.
11630 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11631 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11632 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11633 and PT_GETDSBT to LINUX_LOADMAP.
11634 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11635 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11636
55329a5c 116372011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11638
11639 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11640 (arm_linux_hwbp_cap): New static variable.
11641 (arm_linux_get_hwbp_cap): Replace by ...
11642 (arm_linux_init_hwbp_cap): ... this new function.
11643 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11644 (arm_linux_get_hw_watchpoint_count): Likewise.
11645 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11646 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11647 (arm_prepare_to_resume): Use perror_with_name instead of error.
11648
55329a5c 116492011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11650
11651 * linux-arm-low.c: Include <signal.h>.
11652 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11653 (struct arm_linux_hwbp_cap): New data type.
11654 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11655 (struct arm_linux_hw_breakpoint): New data type.
11656 (MAX_BPTS, MAX_WPTS): Define.
11657 (struct arch_process_info, struct arch_lwp_info): New data types.
11658 (arm_linux_get_hwbp_cap): New function.
11659 (arm_linux_get_hw_breakpoint_count): Likewise.
11660 (arm_linux_get_hw_watchpoint_count): Likewise.
11661 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11662 (arm_hwbp_control_initialize): Likewise.
11663 (arm_hwbp_control_is_enabled): Likewise.
11664 (arm_hwbp_control_is_initialized): Likewise.
11665 (arm_hwbp_control_disable): Likewise.
11666 (arm_linux_hw_breakpoint_equal): Likewise.
11667 (arm_linux_hw_point_initialize): Likewise.
11668 (struct update_registers_data): New data structure.
11669 (update_registers_callback: New function.
11670 (arm_insert_point): Likewise.
11671 (arm_remove_point): Likewise.
11672 (arm_stopped_by_watchpoint): Likewise.
11673 (arm_stopped_data_address): Likewise.
11674 (arm_new_process): Likewise.
11675 (arm_new_thread): Likewise.
11676 (arm_prepare_to_resume): Likewise.
11677 (the_low_target): Register arm_insert_point, arm_remove_point,
11678 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11679 arm_new_thread, and arm_prepare_to_resume.
11680
6b9801d4
SS
116812011-09-15 Stan Shebs <stan@codesourcery.com>
11682
11683 * server.h (struct emit_ops): Add compare-goto fields.
11684 * tracepoint.c (gdb_agent_op_sizes): New table.
11685 (emit_eq_goto): New function.
11686 (emit_ne_goto): New function.
11687 (emit_lt_goto): New function.
11688 (emit_le_goto): New function.
11689 (emit_gt_goto): New function.
11690 (emit_ge_goto): New function.
11691 (is_goto_target): New function.
11692 (compile_bytecodes): Recognize special cases of compare-goto
11693 combinations and call specialized emitters for them.
11694 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11695 (amd64_emit_ne_goto): New function.
11696 (amd64_emit_lt_goto): New function.
11697 (amd64_emit_le_goto): New function.
11698 (amd64_emit_gt_goto): New function.
11699 (amd64_emit_ge_goto): New function.
11700 (amd64_emit_ops): Add the new functions.
11701 (i386_emit_eq_goto): New function.
11702 (i386_emit_ne_goto): New function.
11703 (i386_emit_lt_goto): New function.
11704 (i386_emit_le_goto): New function.
11705 (i386_emit_gt_goto): New function.
11706 (i386_emit_ge_goto): New function.
11707 (i386_emit_ops): Add the new functions.
11708
bf15cbda
SS
117092011-09-08 Stan Shebs <stan@codesourcery.com>
11710
11711 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11712 (i386_emit_epilogue): Restore %ebx.
11713
943ca1dd
JZ
117142011-08-31 Jie Zhang <jzhang918@gmail.com>
11715
11716 * server.c (step_thread): Remove definition.
11717 (process_serial_event): Don't handle Hs.
11718 * server.h (step_thread): Remove declaration.
11719 * target.c (set_desired_inferior): Remove use of step_thread.
11720
e3deef73
LM
117212011-08-24 Luis Machado <lgustavo@codesourcery.com>
11722
11723 * linux-low.c: Include linux-procfs.h.
11724 (linux_attach_lwp_1): Update comments.
11725 (linux_attach): Scan for existing threads when attaching to a
11726 process that is the tgid.
11727 * Makefile.in: Update dependencies.
11728
13da1c97
LM
117292011-08-24 Luis Machado <lgustavo@codesourcery.com>
11730
11731 * configure.srv: Add linux-procfs.o dependencies.
11732
881127c9
YQ
117332011-08-14 Yao Qi <yao@codesourcery.com>
11734
11735 * target.h (struct target_ops): Fix indent.
11736 * win32-low.c (win32_target_ops): Fix comment.
11737
58dbd541
YQ
117382011-08-14 Andrew Jenner <andrew@codesourcery.com>
11739 Yao Qi <yao@codesourcery.com>
11740
11741 * Makefile.in (clean): Remove tic6x-*.c files.
11742 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11743 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11744 (tic6x-c64xp-linux.c): Likewise.
11745 * configure.srv: Add support for tic6x-*-uclinux.
11746 * linux-tic6x-low.c: New.
11747 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11748
78d85199
YQ
117492011-08-14 Andrew Stubbs <ams@codesourcery.com>
11750 Yao Qi <yao@codesourcery.com>
11751
11752 * target.h (struct target_ops): Add read_loadmap.
11753 * linux-low.c (struct target_loadseg): New type.
11754 (struct target_loadmap): New type.
11755 (linux_read_loadmap): New function.
11756 (linux_target_ops): Add linux_read_loadmap.
11757 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11758 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11759 to NULL.
78d85199 11760
a959a88d
EZ
117612011-08-05 Eli Zaretskii <eliz@gnu.org>
11762
11763 * win32-low.c: Include <stdint.h>.
11764
1ced966e
PA
117652011-07-22 Pedro Alves <pedro@codesourcery.com>
11766
11767 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11768 to the inferior here.
11769 (i386_remove_aligned_watchpoint): Ditto.
11770 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11771 fit part of the watchpoint in the debug registers.
11772 (i386_update_inferior_debug_regs): New.
11773 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11774 registers, and only update the inferior on success.
11775 (i386_low_remove_watchpoint): Ditto.
11776
d26e3629
KY
117772011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11778
11779 * linux-low.c (compare_ints, unique, list_threads, show_process,
11780 linux_core_of_thread): Delete.
11781 (linux_target_ops): Change linux_core_of_thread to
11782 linux_common_core_of_thread.
11783 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11784 * utils.c (malloc_failure): Change type of argument.
11785 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11786 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11787 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11788 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11789 (IPA_OBJS): Add common-utils-ipa.o.
11790 (ptid_h, linux_osdata_h): New macros.
11791 (server_h): Add common/common-utils.h, common/xml-utils.h,
11792 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11793 common/ptid.h.
11794 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11795 ptid.o, buffer.o): New rules.
11796 (linux-low.o): Add common/linux-osdata.h as a dependency.
11797 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11798 * configure.ac: Add AC_HEADER_DIRENT check.
11799 * config.in: Regenerate.
11800 * configure: Regenerate.
11801 * remote-utils.c (xml_escape_text): Delete.
11802 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11803 buffer_xml_printf): Move to common/buffer.c.
11804 * server.c (main): Remove call to initialize_inferiors.
11805 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11806 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11807 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11808 internal_error, gdb_assert, gdb_assert_fail): Delete.
11809 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11810 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11811 common/buffer.h.
11812 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11813 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11814 initialize_inferiors): Delete.
11815
2275a1a7
PA
118162011-07-20 Pedro Alves <pedro@codesourcery.com>
11817
11818 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11819 symbol error.
11820
0a5b1e09
PA
118212011-05-31 Pedro Alves <pedro@codesourcery.com>
11822
11823 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11824 assertion.
11825 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11826
6938fd34
YQ
118272011-05-26 Yao Qi <yao@codesourcery.com>
11828
11829 * Makefile.in (thread-db.o): Track dependence to
11830 common/gdb_thread_db.h.
11831 * thread-db.c: include gdb_thread_db.h from right place.
11832
b481f9e0
TT
118332011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11834
11835 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11836 __FILE__ and __LINE__ to internal_error.
11837
98a5dd13
DE
118382011-05-13 Doug Evans <dje@google.com>
11839
11840 * thread-db.c (try_thread_db_load_from_sdir): New function.
11841 (try_thread_db_load_from_dir): New function.
11842 (thread_db_load_search): Handle $sdir, ignore $pdir.
11843 Remove trying of system directories if search of
11844 libthread-db-search-path fails, that is now done via $sdir.
11845
d248b706
KY
118462011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11847
11848 * server.c (handle_query): Add EnableDisableTracepoints to the list
11849 of supported features.
43aaf8b6 11850 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11851 tracepoints.
43aaf8b6
PA
11852 (cmd_qtenable_disable): New.
11853 (cmd_qtstart): Install tracepoints even if disabled.
11854 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11855 receiving a QTEnable or QTDisable packet.
11856 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11857 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11858 tracepoints.
11859 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11860
84e578fb
DE
118612011-05-10 Doug Evans <dje@google.com>
11862
11863 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11864
71f55dd8
DE
118652011-05-04 Doug Evans <dje@google.com>
11866
11867 * linux-low.c (linux_join): Skip process lookup.
11868 * spu-low.c (spu_join): Ditto.
11869 * server.c (join_inferiors_callback): Delete.
11870 (process_serial_event): For 'D' packet (detach) call join_inferior
11871 directly.
11872
4d393d60
JM
118732011-05-04 Joseph Myers <joseph@codesourcery.com>
11874
11875 * README: Don't mention xscale*-*-linux*.
11876 * configure.srv (xscale*-*-linux*): Don't handle target.
11877
b00ad6ff
NF
118782011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11879
11880 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11881 casting pointers.
11882 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11883 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11884 (i386_emit_void_call_2): Likewise.
11885
af96c192
YQ
118862011-04-26 Yao Qi <yao@codesourcery.com>
11887
43aaf8b6
PA
11888 * linux-low.c: Move common macros to linux-ptrace.h.
11889 Include linux-ptrace.h.
af96c192
YQ
11890 * Makefile.in (linux_ptrace_h): New.
11891 (linux-low.o): Depends on linux-ptrace.h.
11892
03f2bd59
JK
118932011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11894
11895 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11896 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11897 (remote_prepare): New function with most of the TCP code from ...
11898 (remote_open): ... here. Detect PORT here unconditionally. Move also
11899 setting transport_is_reliable.
11900 * server.c (run_once): New variable.
11901 (gdbserver_usage): Document it.
11902 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11903 the first run if RUN_ONCE.
11904 * server.h (run_once, remote_prepare): New declarations.
11905
7a9dd1b2
TT
119062011-04-19 Tom Tromey <tromey@redhat.com>
11907
11908 * win32-low.c (handle_load_dll): Remove duplicate "the".
11909
81239425
PM
119102011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11911
11912 Remove support for old Cygwin 1.5 versions.
11913 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11914 function to avoid warning.
11915 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11916 warning.
11917
9e0627f1
PM
119182011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11919
11920 * gdbserver/server.h (Macro _): Define it if not available.
11921
588eebee
MS
119222011-03-14 Michael Snyder <msnyder@vmware.com>
11923
348af9f7 11924 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11925
43f70d4c
JB
119262011-03-10 Joel Brobecker <brobecker@adacore.com>
11927
11928 * Makefile.in (maintainer-clean realclean distclean): Remove
11929 "make ... subdir_do" command.
11930
348af9f7
MS
119312011-03-10 Michael Snyder <msnyder@vmware.com>
11932
11933 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11934
11935 * server.c (handle_v_run): Free alloced buffer on early return.
11936
e637a4f5
YQ
119372011-03-09 Yao Qi <yao@codesourcery.com>
11938
11939 Revert:
11940 2011-03-04 Yao Qi <yao@codesourcery.com>
11941
11942 * Makefile.in: Remove GNU make feature --directory.
11943
11944 2011-03-05 Yao Qi <yao@codesourcery.com>
11945
11946 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11947 (subdir_do): New make target. Copied from gdb/Makefile.
11948 (maintainer-clean, realclean, distclean, clean): Call corresponding
11949 make targets in common/Makefile.
11950
11951 2011-02-11 Yao Qi <yao@codesourcery.com>
11952
11953 * configure.ac: Call AC_PROG_RANLIB.
11954 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11955 * configure: Regenerate.
11956
e6edda56
JK
119572011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11958
11959 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11960
e5141119
JB
119612011-03-06 Yao Qi <yao@codesourcery.com>
11962
11963 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11964
64794aa4
JB
119652011-03-05 Yao Qi <yao@codesourcery.com>
11966
11967 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11968 (subdir_do): New make target. Copied from gdb/Makefile.
11969 (maintainer-clean, realclean, distclean, clean): Call corresponding
11970 make targets in common/Makefile.
11971
7a762829
YQ
119722011-03-04 Yao Qi <yao@codesourcery.com>
11973
11974 * Makefile.in: Remove GNU make feature --directory.
11975
348af9f7
MS
119762011-03-04 Michael Snyder <msnyder@vmware.com>
11977
11978 * server.c (queue_stop_reply): Call xmalloc not malloc.
11979
119802011-03-02 Michael Snyder <msnyder@vmware.com>
11981
11982 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11983
9f72fee2
MS
119842011-02-28 Michael Snyder <msnyder@vmware.com>
11985
588eebee
MS
11986 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11987 (cmd_qtframe): Ditto.
11988 (cmd_qtbuffer): Ditto.
11989 (cmd_bigqtbuffer): Ditto.
11990
9f72fee2
MS
11991 * utils.c (decimal2str): Initialize 'width' to nine, then
11992 don't mess with it.
11993
8040bd49
UW
119942011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11995
11996 * hostio.c (require_data): Free *data, not data.
11997
7e52cbd0
JK
119982011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11999
12000 * hostio.c (require_data): Use free, not xfree.
12001
9130f83e
MS
120022011-02-27 Michael Snyder <msnyder@vmware.com>
12003
4b812f4e
MS
12004 * server.c (handle_query): Discard unused value.
12005
9130f83e
MS
12006 * hostio.c (require_data): Free malloc memory before returning
12007 error.
12008
69d37113
MS
120092011-02-26 Michael Snyder <msnyder@vmware.com>
12010
12011 * linux-low.c (list_threads): Call closedir for dirent.
12012
35f5825a
MS
120132011-02-27 Michael Snyder <msnyder@vmware.com>
12014
2a589cef
MS
12015 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12016 a case statement falls through.
12017
0adea5f7
MS
12018 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12019
35f5825a
MS
12020 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12021 in comparison.
12022
238f1c74
MS
120232011-02-26 Michael Snyder <msnyder@vmware.com>
12024
12025 * utils.c (decimal2str): Eliminate dead code and dead param.
12026 (pulongest): Drop dead param from call to decimal2str.
12027 (plongest): Ditto.
12028
633ff500
JB
120292011-02-24 Joel Brobecker <brobecker@adacore.com>
12030
12031 Revert the following patch (not approved yet):
12032 2011-02-21 Hui Zhu <teawater@gmail.com>
12033 * tracepoint.c (tp_printf): New function.
12034 (eval_agent_expr): Handle gdb_agent_op_printf.
12035
f9c6ff72
HZ
120362011-02-21 Hui Zhu <teawater@gmail.com>
12037
12038 * tracepoint.c (tp_printf): New function.
12039 (eval_agent_expr): Handle gdb_agent_op_printf.
12040
94d5e490
TT
120412011-02-18 Tom Tromey <tromey@redhat.com>
12042
12043 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12044 (tracepoint.o): Likewise.
12045 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12046 (gdb_agent_op_names): Likewise.
12047
c7f96d2b
TT
120482011-02-18 Tom Tromey <tromey@redhat.com>
12049
12050 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12051 gdb_agent_op_rot>: New constants.
12052 (gdb_agent_op_names): Add pick and roll.
12053 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12054 cases.
12055
0feedb2c
JK
120562011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12057
12058 * aclocal.m4: Regenerated with aclocal-1.11.1.
12059
b3b9301e
PA
120602011-02-14 Pedro Alves <pedro@codesourcery.com>
12061
12062 * server.c (handle_qxfer_traceframe_info): New.
12063 (qxfer_packets): Register "traceframe-info".
12064 (handle_query): Report support for qXfer:traceframe-info:read+.
12065 * tracepoint.c (match_blocktype): New.
12066 (traceframe_find_block_type): Rename to ...
12067 (traceframe_walk_blocks): ... this. Add callback filter argument,
12068 and use it.
12069 (traceframe_find_block_type): New, reimplemented on top of
12070 traceframe_walk_blocks.
12071 (build_traceframe_info_xml): New.
12072 (traceframe_read_info): New.
12073 * server.h (traceframe_read_info): Declare.
12074
4f3e6fb7
YQ
120752011-02-11 Yao Qi <yao@codesourcery.com>
12076
12077 * configure.ac: Call AC_PROG_RANLIB.
12078 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12079 * configure: Regenerate.
12080
764880b7
PA
120812011-02-07 Pedro Alves <pedro@codesourcery.com>
12082
12083 * server.c (gdb_read_memory): Change return semantics to allow
12084 partial transfers.
12085 (handle_search_memory_1): Adjust.
12086 (process_serial_event) <'m' packet>: Handle partial transfers.
12087 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12088
1c79eb8a
PA
120892011-01-28 Pedro Alves <pedro@codesourcery.com>
12090
12091 * regcache.c (init_register_cache): Initialize
12092 regcache->register_status.
12093 (free_register_cache): Release regcache->register_status.
12094 (regcache_cpy): Copy register_status.
12095 (registers_to_string): Print 'x's for unavailable registers.
12096 (supply_register): Mark the register's status valid or
12097 unavailable, depending on whether a buffer was passed in or not.
12098 (supply_register_zeroed): New.
12099 (supply_regblock): Mark the registers' status valid or
12100 unavailable, depending on whether a buffer was passed in or not.
12101 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12102 (struct regcache): New `register_status' field.
12103 (supply_register_zeroed): Declare.
12104 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12105 supply_register_zeroed, rather than passing a NULL buffer to
12106 supply_register.
12107 * tracepoint.c (fetch_traceframe_registers): Update comment.
12108
85724a0e
PA
121092011-01-28 Pedro Alves <pedro@codesourcery.com>
12110
12111 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12112 buffer explicit.
12113
d08aafef
PA
121142011-01-25 Pedro Alves <pedro@codesourcery.com>
12115
12116 * server.h (decode_xfer_write): Change prototype.
12117 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12118 and don't extract the annex here.
12119 * server.c (decode_xfer_read): Remove `annex' parameter,
12120 and don't extract the annex here.
12121 (decode_xfer): New.
12122 (struct qxfer): New.
12123 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12124 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12125 (handle_qxfer_statictrace): New functions, abstracted out from
12126 handle_query, and made to use the struct qxfer interface.
12127 (handle_threads_qxfer_proper): Rename to ...
12128 (handle_qxfer_threads_proper): ... this.
12129 (handle_threads_qxfer): Rename to ...
12130 (handle_qxfer_threads): ... this. Adjust.
12131 (qxfer_packets): New array.
12132 (handle_qxfer): New function.
12133 (handle_query): Use handle_qxfer.
12134
493e2a69
MS
121352011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12136
12137 * gdbreplay.c: Shorten lines of >= 80 columns.
12138 * linux-low.c: Ditto.
12139 * linux-ppc-low.c: Ditto.
12140 * linux-s390-low.c: Ditto.
12141 * linux-sparc-low.c: Ditto.
12142 * linux-x86-low.c: Ditto.
12143 * linux-xtensa-low.c: Ditto.
12144 * mem-break.c: Ditto.
12145 * nto-low.c: Ditto.
12146 * regcache.h: Ditto.
12147 * remote-utils.c: Ditto.
12148 * server.c: Ditto.
12149 * server.h: Ditto.
12150 * thread-db.c: Ditto.
12151 * tracepoint.c: Ditto.
12152 * utils.c: Ditto.
12153 * win32-low.h: Ditto.
12154
44944448
JB
121552011-01-05 Joel Brobecker <brobecker@adacore.com>
12156
12157 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12158 update.
12159
71ce852c
JB
121602011-01-01 Joel Brobecker <brobecker@adacore.com>
12161
12162 * server.c (gdbserver_version): Update copyright year in version
12163 output.
12164 * gdbreplay.c (gdbreplay_version): Ditto.
12165
eb826dc6
MF
121662010-12-29 Jie Zhang <jie.zhang@analog.com>
12167
12168 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12169 * linux-bfin-low.c: New file.
12170 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12171 PT_DATA_ADDR for BFIN targets.
12172 * Makefile.in (SFILES): Add linux-bfin-low.c.
12173 (clean): Remove reg-bfin.c.
12174 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12175 * README: Mention supported Blackfin targets.
12176
39ab222a
MF
121772010-12-23 Mike Frysinger <vapier@gentoo.org>
12178
12179 * .gitignore: New file.
12180
a1f2ce7d
MF
121812010-11-16 Mike Frysinger <vapier@gentoo.org>
12182
12183 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12184
f474844c
JZ
121852010-10-22 Jie Zhang <jie@codesourcery.com>
12186
12187 * Makefile.in: Add FLAGS_TO_PASS variable.
12188 (install): Remove dependency of install-only and recursively
12189 invoke make for install-only.
12190
f1048712
DE
121912010-10-04 Doug Evans <dje@google.com>
12192
12193 * Makefile.in (uninstall): Use $(DESTDIR).
12194
b53a1623
PA
121952010-09-24 Pedro Alves <pedro@codesourcery.com>
12196
e6ee044d
PA
12197 PR gdb/11842
12198
b53a1623
PA
12199 * linux-x86-low.c (compat_siginfo_from_siginfo)
12200 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12201 si_code is < 0. Check for si_code == SI_TIMER before checking for
12202 si_code < 0.
12203
fa1bd1e4
JB
122042010-09-13 Joel Brobecker <brobecker@adacore.com>
12205
12206 * lynx-i386-low.c: New file.
12207 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12208
47fac8f8
JB
122092010-09-13 Joel Brobecker <brobecker@adacore.com>
12210
12211 * lynx-low.c (ptrace_request_to_str): Remove handling for
12212 request values that have been removed in LynxOS 5.x.
12213
1adfc54d
JB
122142010-09-13 Joel Brobecker <brobecker@adacore.com>
12215
12216 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12217 <ptrace.h>
12218
c2a66c29
NS
122192010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12220
12221 * configure.ac: Add --enable-inprocess-agent option.
12222 * configure: Rebuilt.
12223
32fcada3
YQ
122242010-09-06 Yao Qi <yao@codesourcery.com>
12225
12226 * linux-low.c (linux_kill): Remove unused variable.
12227 (linux_stabilize_threads): Likewise.
12228 * server.c (start_inferior): Likewise.
12229 (queue_stop_reply_callback): Likewise.
12230 * tracepoint.c (do_action_at_tracepoint): Likewise.
12231
0cccb683
YQ
122322010-09-06 Yao Qi <yao@codesourcery.com>
12233
12234 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12235 on return.
12236
423ec54c
JK
122372010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12238
12239 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12240
12ac6819
PA
122412010-09-06 Pedro Alves <pedro@codesourcery.com>
12242
12243 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12244 "$(IPA_DEPFILES)".
12245
8ed54b31
JB
122462010-09-01 Joel Brobecker <brobecker@adacore.com>
12247
12248 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12249 gdbserver/lynx-ppc-low.c: New files.
12250 * Makefile.in (lynx_low_h): New variable.
12251 (lynx-low.o, lynx-ppc-low.o): New rules.
12252 * configure.ac: On LynxOS, link with -lnetinet.
12253 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12254 * configure: regenerate.
12255
bb0116a4
JB
122562010-09-01 Joel Brobecker <brobecker@adacore.com>
12257
12258 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12259 * configure.ac: Add check for vasprintf and vsnprintf.
12260 * configure, config.in: Regenerate.
12261 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12262
a778ab81 122632010-09-01 Joel Brobecker <brobecker@adacore.com>
12264
12265 * gdbreplay.c: Move include of alloca.h up, next to include of
12266 malloc.h.
12267 * server.h: Add include of malloc.h.
12268 * mem-break.c: Remove include of malloc.h.
12269 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12270
8b034a19 122712010-09-01 Joel Brobecker <brobecker@adacore.com>
12272
12273 * Makefile.in (memmem.o): Build with -Wno-error.
12274
122752010-09-01 Joel Brobecker <brobecker@adacore.com>
12276
12277 * utils.c (xsnprintf): Make non-static.
12278 * server.h: Add xsnprintf declaration.
12279 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12280 replace calls to snprintf by calls to xsnprintf throughout.
12281
122822010-09-01 Joel Brobecker <brobecker@adacore.com>
12283
12284 * configure.ac: Add configure check for alloca.
12285 * configure, config.in: Regenerate.
12286 * server.h: Include alloca.h if it exists.
12287 * gdbreplay.c: Include alloca.h if it exists.
12288
1a981360
PA
122892010-08-28 Pedro Alves <pedro@codesourcery.com>
12290
12291 * linux-low.c (__SIGRTMIN): Define if not already defined.
12292 (linux_create_inferior): Check for __ANDROID__ rather than
12293 __SIGRTMIN.
12294 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12295 are already deferred.
12296 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12297 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12298 stopped and already has a pending signal to report.
12299 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12300 a pending signal to report or is moving out of a jump pad.
12301 (linux_init_signals): Check for __ANDROID__ rather than
12302 __SIGRTMIN.
12303
b4d51a55
PA
123042010-08-28 Pedro Alves <pedro@codesourcery.com>
12305
12306 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12307 debug_threads check. Avoid a linear search when not doing debug
12308 output.
12309
ec48365d
PA
123102010-08-27 Pedro Alves <pedro@codesourcery.com>
12311
12312 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12313 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12314 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12315 (process_event): Change local fd's type to gdb_fildes_t.
12316 (create_file_handler): Adjust prototype.
12317 (delete_file_handler): Adjust prototype.
12318 (handle_file_event): Adjust prototype. Use pfildes.
12319 (create_file_event): Adjsut prototype.
12320 * remote-utils.c (remote_desc, listen_desc): Change type to
12321 gdb_fildes_t.
12322 * server.h: New gdb_fildes_t typedef.
12323 [USE_WIN32API]: Include winsock2.h.
12324 (delete_file_handler, add_file_handler): Adjust prototypes.
12325 (pfildes): Declare.
12326 * utils.c (pfildes): New.
12327
854d88f0
PA
123282010-08-27 Pedro Alves <pedro@codesourcery.com>
12329
12330 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12331 * configure: Regenerate.
12332
0146f85b
PA
123332010-08-27 Pedro Alves <pedro@codesourcery.com>
12334
12335 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12336 (linux_done_accessing_memory): ... this.
12337 (linux_target_ops): Adjust.
12338 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12339 * nto-low.c (nto_target_ops): Adjust comment.
12340 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12341 * spu-low.c (spu_target_ops): Adjust comment.
12342 * target.h (target_ops): Rename unprepare_to_access_memory field
12343 to done_accessing_memory.
12344 (unprepare_to_access_memory): Rename to ...
12345 (done_accessing_memory): ... this.
12346
90d74c30
PA
123472010-08-26 Pedro Alves <pedro@codesourcery.com>
12348
12349 * linux-low.c (linux_prepare_to_access_memory): New.
12350 (linux_unprepare_to_access_memory): New.
12351 (linux_target_ops): Install them.
12352 * server.c (read_memory): Rename to ...
12353 (gdb_read_memory): ... this. Use
12354 prepare_to_access_memory/prepare_to_access_memory.
12355 (write_memory): Rename to ...
12356 (gdb_write_memory): ... this. Use
12357 prepare_to_access_memory/prepare_to_access_memory.
12358 (handle_search_memory_1): Adjust.
12359 (process_serial_event): Adjust.
12360 * target.h (struct target_ops): New fields
12361 prepare_to_access_memory and unprepare_to_access_memory.
12362 (prepare_to_access_memory, unprepare_to_access_memory): New.
12363 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12364 prepare_to_access_memory/prepare_to_access_memory.
12365 * nto-low.c (nto_target_ops): Adjust.
12366 * spu-low.c (spu_target_ops): Adjust.
12367 * win32-low.c (win32_target_ops): Adjust.
12368
fd467969
PA
123692010-08-26 Pedro Alves <pedro@codesourcery.com>
12370
12371 * Makefile.in (WARN_CFLAGS): Get it from configure.
12372 (WERROR_CFLAGS): New.
12373 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12374 * configure.ac: Introduce --enable-werror, which adds -Werror to
12375 the compiler command line. Enabled by default. Disable with
12376 --disable-werror. Add -Wdeclaration-after-statement
12377 Wpointer-arith and -Wformat-nonliteral to warning flags.
12378 * configure: Regenerate.
12379
331e2f5f
PA
123802010-08-26 Pedro Alves <pedro@codesourcery.com>
12381
12382 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12383
e581f2b4
PA
123842010-08-26 Pedro Alves <pedro@codesourcery.com>
12385
12386 * gdbreplay.c (remote_error): New.
12387 (gdbchar): New.
12388 (expect): Use gdbchar. Check for error reading from GDB.
12389 Clarify sync error output.
12390 (play): Check for errors writing to GDB.
12391 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12392 * remote-utils.c (getpkt): Check for errors writing to the remote
12393 descriptor.
12394
3c11dd79
PA
123952010-08-25 Pedro Alves <pedro@codesourcery.com>
12396
12397 * linux-low.c (linux_wait_1): Move non-debugging code out of
12398 `debug_threads' control.
12399
d20a8ad9
PA
124002010-08-25 Pedro Alves <pedro@codesourcery.com>
12401
12402 * linux-low.c (linux_wait_1): Don't set last_status here.
12403 * server.c (push_event, queue_stop_reply_callback): Assert we're
12404 not pushing a TARGET_WAITKIND_IGNORE event.
12405 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12406 (myresume, handle_target_event): Set the thread's last_resume_kind
12407 and last_status from the target returned status.
12408
964e4306
PA
124092010-08-25 Pedro Alves <pedro@codesourcery.com>
12410
12411 PR threads/10729
12412
12413 * linux-x86-low.c (update_debug_registers_callback): New.
12414 (i386_dr_low_set_addr): Use it.
12415 (i386_dr_low_get_addr): New.
12416 (i386_dr_low_set_control): Use update_debug_registers_callback.
12417 (i386_dr_low_get_control): New.
12418 (i386_dr_low_get_status): Adjust.
12419 * linux-low.c (linux_stop_lwp): New.
12420 * linux-low.h (linux_stop_lwp): Declare.
12421
12422 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12423 argument instead of a i386_debug_reg_state.
12424 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12425 a i386_debug_reg_state.
12426 (i386_insert_aligned_watchpoint): Adjust.
12427 (i386_remove_aligned_watchpoint): Adjust.
12428 (i386_low_stopped_data_address): Read the debug registers from the
12429 inferior instead of from the mirrors.
12430 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12431 (i386_dr_low_get_addr): Declare.
12432 (i386_dr_low_get_control): Declare.
12433 (i386_dr_low_get_status): Change prototype.
12434
12435 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12436 (i386_dr_low_get_addr): New.
12437 (i386_dr_low_get_control): New.
12438 (i386_dr_low_get_status): Adjust prototype. Return
12439 dr_status_mirror.
12440 (i386_initial_stuff): Clear dr_status_mirror and
12441 dr_control_mirror.
12442 (i386_get_thread_context): Adjust.
12443 (i386_set_thread_context): Adjust.
12444 (i386_thread_added): Adjust.
12445
5f21a75b
PA
124462010-08-24 Pedro Alves <pedro@codesourcery.com>
12447
12448 * linux-low.h (linux_thread_area): Delete declaration.
12449
3e4c1235
TS
124502010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12451
12452 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12453 after its termination.
12454
1971b033
PA
124552010-08-09 Pedro Alves <pedro@codesourcery.com>
12456
12457 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12458 (gdb_wants_all_stopped): Delete.
12459 (linux_wait_1): Don't call them.
12460 * server.c (handle_v_cont): Tag all threads as want-stopped.
12461 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12462 stopped as "client-wants-stopped".
12463
310444ac
PA
124642010-07-31 Pedro Alves <pedro@codesourcery.com>
12465
12466 * Makefile.in (signals_h): New.
12467 (server_h): Depend on it.
12468 (server.o): Don't depend on $(signals_def).
12469 (signals.o): Depend on $(signals_def).
12470
a19cae16
JK
124712010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12472
12473 * Makefile.in (signals_def): New.
12474 (server_h): Append include/gdb/signals.h and signals_def.
12475 (server.o): Append signals_def.
12476
30d50328
JK
124772010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12478
12479 * server.c (handle_target_event): Use target_signal_to_host for
12480 resume_info.sig initialization.
12481 * target.h (struct thread_resume) <sig>: New comment.
12482
5c3216e2
OS
124832010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12484
c6f46ca0
OS
12485 * server.c (handle_query): strcpy() the returned string from paddress()
12486 instead of sprintf().
5c3216e2
OS
12487 * utils.c (paddress): Return phex_nz().
12488
6bd31874
JB
124892010-07-07 Joel Brobecker <brobecker@adacore.com>
12490
12491 * server.c (handle_v_cont): Call mourn_inferior if process
12492 just exited.
12493 (myresume): Likewise.
12494
0fb4aa4b
PA
124952010-07-01 Pedro Alves <pedro@codesourcery.com>
12496
12497 Static tracepoints, and integration with UST.
12498
12499 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12500 * mem-break.c (uninsert_all_breakpoints)
12501 (reinsert_all_breakpoints): New.
12502 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12503 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12504 (gdb_agent_ust_loaded, helper_thread_id)
12505 (gdb_agent_helper_thread_id): New macros.
12506 (struct ipa_sym_addresses): Add addr_ust_loaded,
12507 addr_helper_thread_id, addr_cmd_buf.
12508 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12509 (in_process_agent_loaded_ust): New.
12510 (write_e_ust_not_loaded): New.
12511 (maybe_write_ipa_ust_not_loaded): New.
12512 (struct collect_static_trace_data_action): New.
12513 (enum tracepoint_type) <static_tracepoint>: New.
12514 (struct tracepoint) <handle>: Mention static tracepoints.
12515 (struct static_tracepoint_ctx): New.
12516 (CMD_BUF_SIZE): New.
12517 (add_tracepoint_action): Handle static tracepoint actions.
12518 (unprobe_marker_at): New.
12519 (clear_installed_tracepoints): Handle static tracepoints.
12520 (cmd_qtdp): Handle static tracepoints.
12521 (probe_marker_at): New.
12522 (cmd_qtstart): Handle static tracepoints.
12523 (response_tracepoint): Handle static tracepoints.
12524 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12525 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12526 (get_context_regcache): Handle static tracepoints.
12527 (do_action_at_tracepoint): Handle static tracepoint actions.
12528 (traceframe_find_block_type): Handle static trace data blocks.
12529 (traceframe_read_sdata): New.
12530 (download_tracepoints): Download static tracepoint actions.
12531 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12532 (GDB_PROBE_NAME): New.
12533 (ust_ops): New.
12534 (GET_UST_SYM): New.
12535 (USTF): New.
12536 (dlsym_ust): New.
12537 (ust_marker_to_static_tracepoint): New.
12538 (gdb_probe): New.
12539 (collect_ust_data_at_tracepoint): New.
12540 (gdb_ust_probe): New.
12541 (UNIX_PATH_MAX, SOCK_DIR): New.
12542 (gdb_ust_connect_sync_socket): New.
12543 (resume_thread, stop_thread): New.
12544 (run_inferior_command): New.
12545 (init_named_socket): New.
12546 (gdb_ust_socket_init): New.
12547 (cstr_to_hexstr): New.
12548 (next_st): New.
12549 (first_marker, next_marker): New.
12550 (response_ust_marker): New.
12551 (cmd_qtfstm, cmd_qtsstm): New.
12552 (unprobe_marker_at, probe_marker_at): New.
12553 (cmd_qtstmat, gdb_ust_thread): New.
12554 (gdb_ust_init): New.
12555 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12556 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12557 (ST_REGENTRY): New.
12558 (x86_64_st_collect_regmap): New.
12559 (X86_64_NUM_ST_COLLECT_GREGS): New.
12560 (AMD64_RIP_REGNUM): New.
12561 (supply_static_tracepoint_registers): New.
12562 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12563 (ST_REGENTRY): New.
12564 (i386_st_collect_regmap): New.
12565 (i386_NUM_ST_COLLECT_GREGS): New.
12566 (supply_static_tracepoint_registers): New.
12567 * server.c (handle_query): Handle qXfer:statictrace:read.
12568 <qSupported>: Report support for StaticTracepoints, and
12569 qXfer:statictrace:read features.
12570 * server.h (traceframe_read_sdata)
12571 (supply_static_tracepoint_registers): Declare.
12572 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12573 (unpack_varlen_hex): Include in IPA build.
12574 * Makefile.in (ustlibs, ustinc): New.
12575 (IPA_OBJS): Add remote-utils-ipa.o.
12576 ($(IPA_LIB)): Link -ldl and -lpthread.
12577 (UST_CFLAGS): New.
12578 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12579 * config.in, configure: Regenerate.
12580
9e4344e5
PA
125812010-06-20 Ian Lance Taylor <iant@google.com>
12582 Pedro Alves <pedro@codesourcery.com>
12583
12584 * linux-x86-low.c (always_true): Delete.
12585 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12586 trying to fool the compiler with always_true.
12587
c6beb2cb
PA
125882010-06-20 Pedro Alves <pedro@codesourcery.com>
12589
12590 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12591 conditions in gdbserver.
12592
d2ed6730
UW
125932010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12594
12595 * spu-low.c (spu_read_memory): Wrap around local store limit.
12596 (spu_write_memory): Likewise.
12597
4e29fb54
PA
125982010-06-15 Pedro Alves <pedro@codesourcery.com>
12599
12600 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12601 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12602 LONGEST uses.
12603 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12604 uses.
12605 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12606 uses with LONGEST uses.
12607
6a271cae
PA
126082010-06-14 Stan Shebs <stan@codesourcery.com>
12609 Pedro Alves <pedro@codesourcery.com>
12610
12611 Bytecode compiler.
12612
12613 * linux-x86-low.c: Include limits.h.
12614 (add_insns): New.
12615 (always_true): New.
12616 (EMIT_ASM): New.
12617 (EMIT_ASM32): New.
12618 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12619 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12620 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12621 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12622 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12623 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12624 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12625 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12626 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12627 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12628 (amd64_emit_void_call_2): New.
12629 (amd64_emit_ops): New.
12630 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12631 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12632 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12633 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12634 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12635 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12636 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12637 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12638 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12639 (i386_emit_stack_adjust, i386_emit_int_call_1)
12640 (i386_emit_void_call_2): New.
12641 (i386_emit_ops): New.
12642 (x86_emit_ops): New.
12643 (the_low_target): Install x86_emit_ops.
12644 * server.h (struct emit_ops): New.
12645 (get_raw_reg_func_addr): Declare.
12646 (current_insn_ptr, emit_error): Declare.
12647 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12648 (set_trace_state_variable_value): New defines.
12649 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12650 addr_get_trace_state_variable_value and
12651 addr_set_trace_state_variable_value.
12652 (symbol_list): New fields for get_raw_reg,
12653 get_trace_state_variable_value and set_trace_state_variable_value.
12654 (condfn): New typedef.
12655 (struct tracepoint): New field `compiled_cond'.
12656 (do_action_at_tracepoint): Clear compiled_cond.
12657 (get_trace_state_variable_value, set_trace_state_variable_value):
12658 Export in the IPA.
12659 (condition_true_at_tracepoint): If there's a compiled condition,
12660 run that.
12661 (current_insn_ptr, emit_error): New globals.
12662 (struct bytecode_address): New.
12663 (get_raw_reg_func_addr): New.
12664 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12665 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12666 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12667 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12668 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12669 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12670 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12671 (compile_tracepoint_condition, compile_bytecodes): New.
12672 * target.h (emit_ops): Forward declare.
12673 (struct target_ops): New field emit_ops.
12674 (target_emit_ops): New.
12675 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12676 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12677 * linux-low.c (linux_emit_ops): New.
12678 (linux_target_ops): Install it.
12679 * linux-low.h (struct linux_target_ops): New field emit_ops.
12680
92b72907
UW
126812010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12682
12683 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12684 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12685
fa593d66
PA
126862010-06-01 Pedro Alves <pedro@codesourcery.com>
12687 Stan Shebs <stan@codesourcery.com>
12688
12689 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12690 (all): Depend on $(extra_libraries).
12691 (install-only): Install the IPA.
12692 (IPA_OBJS, IPA_LIB): New.
12693 (clean): Remove the IPA lib.
12694 (IPAGENT_CFLAGS): New.
12695 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12696 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12697 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12698 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12699 * configure.ac: Check for atomic builtins support in the compiler.
12700 (IPA_DEPFILES, extra_libraries): Define.
12701 * configure.srv (ipa_obj): Add description.
12702 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12703 (i[34567]86-*-linux*): Set ipa_obj.
12704 (x86_64-*-linux*): Set ipa_obj.
12705 * linux-low.c (stabilizing_threads): New.
12706 (supports_fast_tracepoints): New.
12707 (linux_detach): Stabilize threads before detaching.
12708 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12709 the lwp is either not stabilizing, or is moving out of a jump pad.
12710 (linux_fast_tracepoint_collecting): New.
12711 (maybe_move_out_of_jump_pad): New.
12712 (enqueue_one_deferred_signal): New.
12713 (dequeue_one_deferred_signal): New.
12714 (linux_wait_for_event_1): If moving out of a jump pad, defer
12715 pending signals to later.
12716 (linux_stabilize_threads): New.
12717 (linux_wait_1): Check if threads need moving out of jump pads, and
12718 do it if so.
12719 (stuck_in_jump_pad_callback): New.
12720 (move_out_of_jump_pad_callback): New.
12721 (lwp_running): New.
12722 (linux_resume_one_lwp): Handle moving out of jump pads.
12723 (linux_set_resume_request): Dequeue deferred signals.
12724 (need_step_over_p): Also step over fast tracepoint jumps.
12725 (start_step_over): Also uninsert fast tracepoint jumps.
12726 (finish_step_over): Also reinsert fast tracepoint jumps.
12727 (linux_install_fast_tracepoint_jump): New.
12728 (linux_target_ops): Install linux_stabilize_threads and
12729 linux_install_fast_tracepoint_jump_pad.
12730 * linux-low.h (linux_target_ops) <get_thread_area,
12731 install_fast_tracepoint_jump_pad>: New fields.
12732 (struct lwp_info) <collecting_fast_tracepoint,
12733 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12734 (linux_get_thread_area): Declare.
12735 * linux-x86-low.c (jump_insn): New.
12736 (x86_get_thread_area): New.
12737 (append_insns): New.
12738 (push_opcode): New.
12739 (amd64_install_fast_tracepoint_jump_pad): New.
12740 (i386_install_fast_tracepoint_jump_pad): New.
12741 (x86_install_fast_tracepoint_jump_pad): New.
12742 (the_low_target): Install x86_get_thread_area and
12743 x86_install_fast_tracepoint_jump_pad.
12744 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12745 (struct fast_tracepoint_jump): New.
12746 (fast_tracepoint_jump_insn): New.
12747 (fast_tracepoint_jump_shadow): New.
12748 (find_fast_tracepoint_jump_at): New.
12749 (fast_tracepoint_jump_here): New.
12750 (delete_fast_tracepoint_jump): New.
12751 (set_fast_tracepoint_jump): New.
12752 (uninsert_fast_tracepoint_jumps_at): New.
12753 (reinsert_fast_tracepoint_jumps_at): New.
12754 (set_breakpoint_at): Use write_inferior_memory.
12755 (uninsert_raw_breakpoint): Use write_inferior_memory.
12756 (check_mem_read): Mask out fast tracepoint jumps.
12757 (check_mem_write): Mask out fast tracepoint jumps.
12758 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12759 (set_fast_tracepoint_jump): Declare.
12760 (delete_fast_tracepoint_jump)
12761 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12762 (reinsert_fast_tracepoint_jumps_at): Declare.
12763 * regcache.c: Don't compile many functions when building the
12764 in-process agent library.
12765 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12766 the register buffer in the heap.
12767 (free_register_cache): If the register buffer isn't owned by the
12768 regcache, don't free it.
12769 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12770 pre-existing register caches.
12771 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12772 type.
12773 (convert_ascii_to_int): : Constify `from' parameter type.
12774 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12775 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12776 the needed buffer in-place.
12777 (relocate_instruction): New.
12778 * server.c (handle_query) <qSymbols>: If the target supports
12779 tracepoints, give it a chance of looking up symbols. Report
12780 support for fast tracepoints.
12781 (handle_status): Stabilize threads.
12782 (process_serial_event): Adjust.
12783 * server.h (struct fast_tracepoint_jump): Forward declare.
12784 (struct process_info) <fast_tracepoint_jumps>: New field.
12785 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12786 (decode_X_packet, decode_M_packet): Adjust.
12787 (relocate_instruction): Declare.
12788 (in_process_agent_loaded): Declare.
12789 (tracepoint_look_up_symbols): Declare.
12790 (struct fast_tpoint_collect_status): Declare.
12791 (fast_tracepoint_collecting): Declare.
12792 (force_unlock_trace_buffer): Declare.
12793 (handle_tracepoint_bkpts): Declare.
12794 (initialize_low_tracepoint)
12795 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12796 * target.h (struct target_ops) <stabilize_threads,
12797 install_fast_tracepoint_jump_pad>: New fields.
12798 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12799 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12800 [HAVE_STDINT_H]: Include stdint.h.
12801 (trace_debug_1): Rename to ...
12802 (trace_vdebug): ... this.
12803 (trace_debug): Rename to ...
12804 (trace_debug_1): ... this. Add `level' parameter.
12805 (trace_debug): New.
12806 (ATTR_USED, ATTR_NOINLINE): New.
12807 (IP_AGENT_EXPORT): New.
12808 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12809 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12810 (about_to_request_buffer_space, trace_buffer_is_full)
12811 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12812 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12813 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12814 (traceframe_write_count, traceframes_created)
12815 (trace_state_variables)
12816 New renaming defines.
12817 (struct ipa_sym_addresses): New.
12818 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12819 (symbol_list): New.
12820 (ipa_sym_addrs): New.
12821 (all_tracepoint_symbols_looked_up): New.
12822 (in_process_agent_loaded): New.
12823 (write_e_ipa_not_loaded): New.
12824 (maybe_write_ipa_not_loaded): New.
12825 (tracepoint_look_up_symbols): New.
12826 (debug_threads) [IN_PROCESS_AGENT]: New.
12827 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12828 (UNKNOWN_SIDE_EFFECTS): New.
12829 (stop_tracing): New.
12830 (flush_trace_buffer): New.
12831 (stop_tracing_bkpt): New.
12832 (flush_trace_buffer_bkpt): New.
12833 (read_inferior_integer): New.
12834 (read_inferior_uinteger): New.
12835 (read_inferior_data_pointer): New.
12836 (write_inferior_data_pointer): New.
12837 (write_inferior_integer): New.
12838 (write_inferior_uinteger): New.
12839 (struct collect_static_trace_data_action): Delete.
12840 (enum tracepoint_type): New.
12841 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12842 <actions_str, step_actions, step_actions_str>: Only include in
12843 GDBserver.
fa593d66
PA
12844 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12845 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12846 (tracepoints): Use IP_AGENT_EXPORT.
12847 (last_tracepoint): Don't include in the IPA.
12848 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12849 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12850 (alloced_trace_state_variables): New.
12851 (trace_state_variables): Use IP_AGENT_EXPORT.
12852 (traceframe_t): Delete unused variable.
12853 (circular_trace_buffer): Don't include in the IPA.
12854 (trace_buffer_start): Delete.
12855 (struct trace_buffer_control): New.
12856 (trace_buffer_free): Delete.
12857 (struct ipa_trace_buffer_control): New.
12858 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12859 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12860 New.
12861 (trace_buffer_ctrl): New.
12862 (TRACE_BUFFER_CTRL_CURR): New.
12863 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12864 Reimplement as macros.
12865 (trace_buffer_wrap): Delete.
12866 (traceframe_write_count, traceframe_read_count)
12867 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12868 (struct tracepoint_hit_ctx) <type>: New field.
12869 (struct fast_tracepoint_ctx): New.
12870 (memory_barrier): New.
12871 (cmpxchg): New.
12872 (record_tracepoint_error): Update atomically in the IPA.
12873 (clear_inferior_trace_buffer): New.
12874 (about_to_request_buffer_space): New.
12875 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12876 updating the same buffer.
12877 (add_tracepoint): Default the tracepoint's type to trap
12878 tracepoint, and orig_size to -1.
12879 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12880 internal variables.
12881 (create_trace_state_variable): New parameter `gdb'. Handle it.
12882 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12883 (cmd_qtdp): Handle fast tracepoints.
12884 (cmd_qtdv): Adjust.
12885 (max_jump_pad_size): New.
12886 (gdb_jump_pad_head): New.
12887 (get_jump_space_head): New.
12888 (claim_jump_space): New.
12889 (sort_tracepoints): New.
12890 (MAX_JUMP_SIZE): New.
12891 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12892 IPA.
12893 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12894 support. Upload fast traceframes, and delete internal IPA
12895 breakpoints.
12896 (stop_tracing_handler): New.
12897 (flush_trace_buffer_handler): New.
12898 (cmd_qtstop): Upload fast tracepoints.
12899 (response_tracepoint): Handle fast tracepoints.
12900 (tracepoint_finished_step): Upload fast traceframes. Set the
12901 tracepoint hit context's tracepoint type.
12902 (handle_tracepoint_bkpts): New.
12903 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12904 type. Add comment about fast tracepoints.
12905 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12906 non-existing action_str field.
12907 (get_context_regcache): Handle fast tracepoints.
12908 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12909 to the regcache.
12910 (fast_tracepoint_from_jump_pad_address): New.
12911 (fast_tracepoint_from_ipa_tpoint_address): New.
12912 (collecting_t): New.
12913 (force_unlock_trace_buffer): New.
12914 (fast_tracepoint_collecting): New.
12915 (collecting): New.
12916 (gdb_collect): New.
12917 (write_inferior_data_ptr): New.
12918 (target_tp_heap): New.
12919 (target_malloc): New.
12920 (download_agent_expr): New.
12921 (UALIGN): New.
12922 (download_tracepoints): New.
12923 (download_trace_state_variables): New.
12924 (upload_fast_traceframes): New.
12925 (IPA_FIRST_TRACEFRAME): New.
12926 (IPA_NEXT_TRACEFRAME_1): New.
12927 (IPA_NEXT_TRACEFRAME): New.
12928 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12929 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12930 (gdb_jump_pad_buffer_end): New.
12931 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12932 (initialize_tracepoint): Adjust.
12933 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12934 buffer. Initialize the low module.
12935 * utils.c (PREFIX, TOOLNAME): New.
12936 (malloc_failure): Use PREFIX.
12937 (error): In the IPA, an error causes an exit.
12938 (fatal, warning): Use PREFIX.
12939 (internal_error): Use TOOLNAME.
12940 (NUMCELLS): Increase to 10.
12941 * configure, config.in: Regenerate.
12942
d149dd1d
PA
129432010-06-01 Pedro Alves <pedro@codesourcery.com>
12944
12945 * server.c (handle_query) <qSupported>: Do two passes over the
12946 qSupported string to avoid nesting strtok.
12947
f6528abd
JK
129482010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12949
12950 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12951 (CDEPS): New.
12952 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12953 -Wl,--dynamic-list.
12954 * configure: Regenerate.
12955 * proc-service.list: New.
12956
ca2a87a0
JK
129572010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12958
12959 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12960 New comment.
12961
363a6e9f
OS
129622010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12963
12964 * gdbreplay.c (remote_open): Check error return from socket() call by
12965 its equality to -1 not by it being negative.
12966 * remote-utils.c (remote_open): Likewise.
12967
d23b6cb1
PA
129682010-05-23 Pedro Alves <pedro@codesourcery.com>
12969
12970 * config.h: Regenerate.
12971
28d3cf85
MK
129722010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12973
12974 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12975 doesn't provide PTRACE_GET_THREAD_AREA.
12976
fea36a59
MK
129772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12978
12979 * linux-m68k-low.c: Include <asm/ptrace.h>
12980 (ps_get_thread_area): Implement.
12981
24b066ba
DE
129822010-05-03 Doug Evans <dje@google.com>
12983
12984 * event-loop.c (struct callback_event): New struct.
12985 (callback_list): New global.
12986 (append_callback_event, delete_callback_event): New functions.
12987 (process_callback): New function.
12988 (start_event_loop): Call it.
12989 * remote-utils.c (NOT_SCHEDULED): Define.
12990 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12991 moved out of readchar.
12992 (readchar): Rewrite. Call reschedule before returning.
12993 (reset_readchar): New function.
12994 (remote_close): Call it.
12995 (process_remaining, reschedule): New functions.
12996 * server.h (callback_handler_func): New typedef.
12997 (append_callback_event, delete_callback_event): Declare.
12998
9836d6ea
PA
129992010-05-03 Pedro Alves <pedro@codesourcery.com>
13000
13001 * proc-service.c (ps_pglobal_lookup): Use
13002 thread_db_look_up_one_symbol.
13003 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13004 parameter. Use it instead of all_symbols_looked_up.
13005 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13006 field.
13007 (all_symbols_looked_up): Don't declare.
13008 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13009 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13010 field.
13011 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13012 Set all_symbols_looked_up here.
13013 (thread_db_look_up_one_symbol): New.
13014 (thread_db_get_tls_address): Adjust.
13015 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13016 thread_db object on the heap, and tentatively set it in the
13017 process structure.
13018 (thread_db_init): Don't set all_symbols_looked_up here.
13019 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13020
7984d532
PA
130212010-05-03 Pedro Alves <pedro@codesourcery.com>
13022
13023 * linux-low.c (linux_kill, linux_detach): Adjust.
13024 (status_pending_p_callback): Remove redundant statement. Check
13025 for !TARGET_WAITIKIND_IGNORE, instead of
13026 TARGET_WAITKIND_STOPPED.
13027 (handle_tracepoints): Make sure LWP is locked. Adjust.
13028 (linux_wait_for_event_1): Adjust.
13029 (linux_cancel_breakpoints): New.
13030 (unsuspend_one_lwp): New.
13031 (unsuspend_all_lwps): New.
13032 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13033 (send_sigstop_callback): Change return type to int, add new
13034 `except' parameter and handle it.
13035 (suspend_and_send_sigstop_callback): New.
13036 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13037 pass them down. If SUSPEND, also increment the lwp's suspend
13038 count.
13039 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13040 (need_step_over_p): Don't consider suspended LWPs.
13041 (start_step_over): Adjust.
13042 (proceed_one_lwp): Change return type to int, add new `except'
13043 parameter and handle it.
13044 (unsuspend_and_proceed_one_lwp): New.
13045 (proceed_all_lwps): Use find_inferior instead of
13046 for_each_inferior.
13047 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13048 also decrement the suspend count of LWPs. Pass `except' down,
13049 instead of hacking its suspend count.
13050 (linux_pause_all): Add `freeze' parameter. Adjust.
13051 (linux_unpause_all): New.
13052 (linux_target_ops): Install linux_unpause_all.
13053 * server.c (handle_status): Adjust.
13054 * target.h (struct target_ops): New fields `unpause_all' and
13055 `cancel_breakpoints'. Add new parameter to `pause_all'.
13056 (pause_all): Add new `freeze' parameter.
13057 (unpause_all): New.
13058 (cancel_breakpoints): New.
13059 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13060 cancel breakpoints.
13061 (cmd_qtstart): Pause threads.
13062 (stop_tracing): Pause threads, and cancel breakpoints.
13063 * win32-low.c (win32_target_ops): Adjust.
13064
e471f25b
PA
130652010-05-03 Pedro Alves <pedro@codesourcery.com>
13066
13067 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13068 the inferior right away from here...
13069 (linux_wait_1): ... to here, and adjust to check the thread's
13070 last_resume_kind instead of the lwp's step or stop_expected flags.
13071
1915ef4f
PA
130722010-05-02 Pedro Alves <pedro@codesourcery.com>
13073
13074 * README: Use consistent `GDB' and `GDBserver' spellings.
13075
f9e39928
PA
130762010-05-02 Pedro Alves <pedro@codesourcery.com>
13077
13078 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13079 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13080 (linux_detach_one_lwp): Assume the lwp is stopped.
13081 (any_thread_of): Delete.
13082 (linux_detach): Stop all lwps here. Don't blindly delete all
13083 breakpoints.
13084 (delete_lwp_callback): New.
13085 (linux_mourn): Delete all lwps of the process that is gone.
13086 (linux_wait_1): Don't delete the last lwp of the process here.
13087 * mem-break.h (mark_breakpoints_out): Declare.
13088 * mem-break.c (mark_breakpoints_out): New.
13089 (free_all_breakpoints): Use it.
13090 * server.c (handle_target_event): If the process is gone, mark
13091 breakpoints out.
13092 * thread-db.c (struct thread_db) <create_bp>: New field.
13093 (thread_db_enable_reporting): Fix prototype. Store a thread event
13094 breakpoint reference in the thread_db struct.
13095 (thread_db_load_search): Clear the thread_db object.
13096 (try_thread_db_load_1): Ditto.
13097 (switch_to_process): New.
13098 (disable_thread_event_reporting): Use it.
13099 (remove_thread_event_breakpoints): New.
13100 (thread_db_detach, thread_db_mourn): Use it.
13101
1e7fc18c
PA
131022010-05-01 Pedro Alves <pedro@codesourcery.com>
13103
13104 * linux-low.c (linux_enable_event_reporting): New.
13105 (linux_wait_for_event_1, handle_extended_wait): Use it.
13106
02fc4de7
PA
131072010-04-30 Pedro Alves <pedro@codesourcery.com>
13108
13109 * linux-low.c (linux_kill_one_lwp, linux_kill)
13110 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13111 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13112 SIGSTOP even if the LWP is stopped.
13113 (send_sigstop_callback): New.
13114 (stop_all_lwps): Use send_sigstop_callback instead.
13115 (linux_resume_one_thread): Adjust.
13116 (proceed_one_lwp): Still proceed an LWP that the client has
13117 requested to stop, if we haven't reported it as stopped yet. Make
13118 sure that LWPs the client want stopped, have a pending SIGSTOP.
13119
bc3b5632
DE
131202010-04-26 Doug Evans <dje@google.com>
13121
ae1ada35
DE
13122 * server.c (handle_general_set): Make static.
13123
bc3b5632
DE
13124 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13125 Print received char after testing for error/eof instead of before.
13126 (input_interrupt): Tweak comment.
13127
65730243
DE
131282010-04-23 Doug Evans <dje@google.com>
13129
13130 * server.c (start_inferior): Print inferior argv if --debug.
13131
a8ae7dc0
AR
131322010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13133
13134 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13135 * nto-x86-low.c: Include server.h
13136
1c07cc19
PM
131372010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13138
13139 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13140 be consistent with other sources of this directory.
13141 (init_registers_amd64): Correct name of source file of this function
13142 in the comment.
13143
e0a61e09
PM
131442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13145
13146 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13147 64-bit executables.
13148
54709339
PM
131492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13150
13151 * win32-i386-low.c: Add 64-bit support.
13152 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13153 (init_registers_amd64): Declare.
13154 (mappings): Add 64-bit version of array.
13155 (init_windows_x86): New function.
13156 (the_low_target): Change init_arch field to init_windows_x86.
13157
e8f0053d
PM
131582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13159
13160 * win32-low.c: Adapt to support also 64-bit architecture.
13161 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13162 (get_image_name): Use SIZE_T type for local variable `done'.
13163 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13164 (toolhelp_get_dll_name): Idem.
13165 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13166 Use uintptr_t typecast to avoid warning.
13167 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13168 (handle_exception): Use phex_nz to avoid warning.
13169 (win32_wait): Remove unused local variable `process'.
13170
c481e77e
PM
131712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13172
13173 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13174 `amd64-avx.o'.
13175
12ea4b69
PM
131762010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13177
13178 * configure.ac: Use `ws2_32' library for srv_mingw.
13179 * configure: Regenerate.
13180 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13181 * remote-utils.c: Likewise.
13182
f6d1620c
L
131832010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13184
13185 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13186 if __x86_64__ is defined.
13187
8e642873
PM
131882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13189
13190 * configure: Regenerate.
13191
711e434b
PM
131922010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13193
13194 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13195 * target.h (target_ops): New get_tib_address field.
13196 * win32-low.h (win32_thread_info): Add thread_local_base field.
13197 * win32-low.c (child_add_thread): Add tlb argument.
13198 Set thread_local_base field to TLB.
13199 (get_child_debug_event): Adapt to child_add_thread change.
13200 (win32_get_tib_address): New function.
13201 (win32_target_ops): Set get_tib_address field to
13202 win32_get_tib_address.
13203 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13204
505106cd
PA
132052010-04-12 Pedro Alves <pedro@codesourcery.com>
13206
505106cd
PA
13207 * linux-low.c (linux_mourn): Also remove the process.
13208 * server.c (handle_target_event): Don't remove the process here.
13209 * nto-low.c (nto_mourn): New.
13210 (nto_target_ops): Install it.
13211 * spu-low.c (spu_mourn): New.
13212 (spu_target_ops): Install it.
13213 * win32-low.c (win32_mourn): New.
13214 (win32_target_ops): Install it.
13215
e8470a06
PA
132162010-04-12 Pedro Alves <pedro@codesourcery.com>
13217
13218 * server.h (buffer_xml_printf): Remove redundant `;'.
13219
45ba0d02
PA
132202010-04-12 Pedro Alves <pedro@codesourcery.com>
13221
13222 * regcache.c (set_register_cache): Invalidate regcaches before
13223 changing the register cache layout.
13224 (regcache_invalidate_one): Allow a NULL regcache.
13225 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13226 regcaches before changing the register cache layout or the target
13227 regsets.
13228
59e04013
L
132292010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13230
13231 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13232 variable warning on Linux/x86-64.
13233
8336d594
PA
132342010-04-11 Pedro Alves <pedro@codesourcery.com>
13235
13236 GDBserver disconnected tracing support.
13237
13238 * linux-low.c (linux_remove_process): Delete.
13239 (add_lwp): Don't set last_resume_kind here.
13240 (linux_kill): Use `mourn'.
13241 (linux_detach): Use `thread_db_detach', and `mourn'.
13242 (linux_mourn): New.
13243 (linux_attach_lwp_1): Adjust comment.
13244 (linux_attach): last_resume_kind moved the thread_info; adjust.
13245 (status_pending_p_callback): Adjust.
13246 (linux_wait_for_event_1): Adjust.
13247 (count_events_callback, select_singlestep_lwp_callback)
13248 (select_event_lwp_callback, cancel_breakpoints_callback)
13249 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13250 (proceed_one_lwp): Adjust.
13251 (linux_async): Add debug output.
13252 (linux_thread_stopped): New.
13253 (linux_pause_all): New.
13254 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13255 linux_pause_all.
13256 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13257 (thread_db_free): Delete declaration.
13258 (thread_db_detach, thread_db_mourn): Declare.
13259 * thread-db.c (thread_db_init): Use thread_db_mourn.
13260 (thread_db_free): Delete, split in two.
13261 (disable_thread_event_reporting): New.
13262 (thread_db_detach): New.
13263 (thread_db_mourn): New.
13264
13265 * server.h (struct thread_info) <last_resume_kind>: New field.
13266 <attached>: Add comment.
13267 <gdb_detached>: New field.
13268 (handler_func): Change return type to int.
13269 (handle_serial_event, handle_target_event): Ditto.
13270 (gdb_connected): Declare.
13271 (tracing): Delete.
13272 (disconnected_tracing): Declare.
13273 (stop_tracing): Declare.
13274
13275 * server.c (handle_query) <qSupported>: Report support for
13276 disconnected tracing.
13277 (queue_stop_reply_callback): Account for running threads.
13278 (gdb_wants_thread_stopped): New.
13279 (gdb_wants_all_threads_stopped): New.
13280 (gdb_reattached_process): New.
13281 (handle_status): Clear the `gdb_detached' flag of all processes.
13282 In all-stop, stop all threads.
13283 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13284 (process_serial_event): If the remote connection breaks, or if an
13285 exit was forced with "monitor exit", force an event loop exit.
13286 Handle disconnected tracing on detach.
13287 (handle_serial_event): Adjust.
13288 (handle_target_event): If GDB isn't connected, forward events back
13289 to the inferior, unless the last process exited, in which case,
13290 exit gdbserver. Adjust interface.
13291
13292 * remote-utils.c (remote_open): Don't block in accept. Instead
13293 register an event loop source on the listen socket file
13294 descriptor. Refactor bits into ...
13295 (listen_desc): ... this new global.
13296 (gdb_connected): ... this new function.
13297 (enable_async_notification): ... this new function.
13298 (handle_accept_event): ... this new function.
13299 (remote_close): Clear remote_desc.
13300
13301 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13302
13303 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13304 New fields.
13305 (mourn_inferior): Define.
13306 (target_process_qsupported): Avoid the dangling else problem.
13307 (thread_stopped): Define.
13308 (pause_all): Define.
13309 (target_waitstatus_to_string): Declare.
13310 * target.c (target_waitstatus_to_string): New.
13311
13312 * tracepoint.c (tracing): Make extern.
13313 (disconnected_tracing): New.
13314 (stop_tracing): Make extern. Handle tracing stops due to GDB
13315 disconnecting.
13316 (cmd_qtdisconnected): New.
13317 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13318 (handle_tracepoint_general_set): Handle QTDisconnected.
13319
13320 * event-loop.c (event_handler_func): Change return type to int.
13321 (process_event): Bail out if the event handler wants the event
13322 loop to stop.
13323 (handle_file_event): Ditto.
13324 (start_event_loop): Bail out if the event handler wants the event
13325 loop to stop.
13326
13327 * nto-low.c (nto_target_ops): Adjust.
13328 * spu-low.c (spu_wait): Don't remove the process here.
13329 (spu_target_ops): Adjust.
13330 * win32-low.c (win32_wait): Don't remove the process here.
13331 (win32_target_ops): Adjust.
13332
5d267c4c
PA
133332010-04-11 Pedro Alves <pedro@codesourcery.com>
13334
13335 * regcache.c (realloc_register_cache): Invalidate inferior's
13336 regcache before recreating it.
13337
623ccd72
PA
133382010-04-09 Pedro Alves <pedro@codesourcery.com>
13339
13340 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13341
219f2f23
PA
133422010-04-09 Stan Shebs <stan@codesourcery.com>
13343 Pedro Alves <pedro@codesourcery.com>
13344
13345 * server.h (LONGEST): New.
13346 (struct thread_info) <while_stepping>: New field.
13347 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13348 Declare.
13349 (initialize_tracepoint, handle_tracepoint_general_set)
13350 (handle_tracepoint_query, tracepoint_finished_step)
13351 (tracepoint_was_hit, release_while_stepping_state_list):
13352 (current_traceframe): Declare.
13353 * server.c (handle_general_set): Handle tracepoint packets.
13354 (read_memory): New.
13355 (write_memory): New.
13356 (handle_search_memory_1): Use read_memory.
13357 (handle_query): Report support for conditional tracepoints, trace
13358 state variables, and tracepoint sources. Handle tracepoint
13359 queries.
13360 (main): Initialize the tracepoints module.
13361 (process_serial_event): Handle traceframe reads/writes.
13362
13363 * linux-low.c (handle_tracepoints): New.
13364 (linux_wait_1): Call it.
13365 (linux_resume_one_lwp): Handle while-stepping.
13366 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13367 (linux_target_ops): Install them.
13368 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13369 New field.
13370 * linux-x86-low.c (x86_supports_tracepoints): New.
13371 (the_low_target). Install it.
13372
13373 * mem-break.h (delete_breakpoint): Declare.
13374 * mem-break.c (delete_breakpoint): Make external.
13375
13376 * target.h (struct target_ops): Add `supports_tracepoints',
13377 `read_pc', and `write_pc' fields.
13378 (target_supports_tracepoints): Define.
13379 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13380 (phex_nz): New.
13381
13382 * regcache.h (struct regcache) <registers_owned>: New field.
13383 (init_register_cache, regcache_cpy): Declare.
13384 (regcache_read_pc, regcache_write_pc): Declare.
13385 (register_cache_size): Declare.
13386 (supply_regblock): Declare.
13387 * regcache.c (init_register_cache): New.
13388 (new_register_cache): Use it.
13389 (regcache_cpy): New.
13390 (register_cache_size): New.
13391 (supply_regblock): New.
13392 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13393
219f2f23
PA
13394 * tracepoint.c: New.
13395
13396 * Makefile.in (OBS): Add tracepoint.o.
13397 (tracepoint.o): New rule.
13398
3a13a53b
L
133992010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13400
13401 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13402 (i386-mmx.o): New.
13403 (i386-mmx.c): Likewise.
13404 (i386-mmx-linux.o): Likewise.
13405 (i386-mmx-linux.c): Likewise.
13406
13407 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13408 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13409 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13410 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13411
13412 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13413 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13414 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13415
1570b33e
L
134162010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13417
13418 * Makefile.in (clean): Updated.
13419 (i386-avx.o): New.
13420 (i386-avx.c): Likewise.
13421 (i386-avx-linux.o): Likewise.
13422 (i386-avx-linux.c): Likewise.
13423 (amd64-avx.o): Likewise.
13424 (amd64-avx.c): Likewise.
13425 (amd64-avx-linux.o): Likewise.
13426 (amd64-avx-linux.c): Likewise.
13427
13428 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13429 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13430 (srv_amd64_regobj): Add amd64-avx.o.
13431 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13432 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13433 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13434 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13435 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13436 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13437 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13438
13439 * i387-fp.c: Include "i386-xstate.h".
13440 (i387_xsave): New.
13441 (i387_cache_to_xsave): Likewise.
13442 (i387_xsave_to_cache): Likewise.
13443 (x86_xcr0): Likewise.
13444
13445 * i387-fp.h (i387_cache_to_xsave): Likewise.
13446 (i387_xsave_to_cache): Likewise.
13447 (x86_xcr0): Likewise.
13448
13449 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13450 * linux-crisv32-low.c (target_regsets): Likewise.
13451 * linux-m68k-low.c (target_regsets): Likewise.
13452 * linux-mips-low.c (target_regsets): Likewise.
13453 * linux-ppc-low.c (target_regsets): Likewise.
13454 * linux-s390-low.c (target_regsets): Likewise.
13455 * linux-sh-low.c (target_regsets): Likewise.
13456 * linux-sparc-low.c (target_regsets): Likewise.
13457 * linux-xtensa-low.c (target_regsets): Likewise.
13458
13459 * linux-low.c: Include <sys/uio.h>.
13460 (regsets_fetch_inferior_registers): Support nt_type.
13461 (regsets_store_inferior_registers): Likewise.
13462 (linux_process_qsupported): New.
13463 (linux_target_ops): Add linux_process_qsupported.
13464
13465 * linux-low.h (regset_info): Add nt_type.
13466 (linux_target_ops): Add process_qsupported.
13467
13468 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13469 and <sys/uio.h>.
13470 (init_registers_i386_avx_linux): New.
13471 (init_registers_amd64_avx_linux): Likewise.
13472 (xmltarget_i386_linux_no_xml): Likewise.
13473 (xmltarget_amd64_linux_no_xml): Likewise.
13474 (PTRACE_GETREGSET): Likewise.
13475 (PTRACE_SETREGSET): Likewise.
13476 (x86_fill_xstateregset): Likewise.
13477 (x86_store_xstateregset): Likewise.
13478 (use_xml): Likewise.
13479 (x86_linux_update_xmltarget): Likewise.
13480 (x86_linux_process_qsupported): Likewise.
13481 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13482 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13483 init_registers_i386_linux here. Call
13484 x86_linux_update_xmltarget.
13485 (the_low_target): Add x86_linux_process_qsupported.
13486
13487 * server.c (handle_query): Call target_process_qsupported.
13488
13489 * target.h (target_ops): Add process_qsupported.
13490 (target_process_qsupported): New.
13491
fc7238bb
PA
134922010-04-03 Pedro Alves <pedro@codesourcery.com>
13493
13494 * inferiors.c (add_thread): Set last_status kind to
13495 TARGET_WAITKIND_IGNORE.
13496 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13497 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13498 (linux_wait_1): Move `thread' local definition to block that uses
13499 it. Don't NULL initialize `event_child'.
13500 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13501 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13502 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13503
bdabb078
PA
135042010-04-01 Pedro Alves <pedro@codesourcery.com>
13505
13506 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13507 an extended waitstatus, or by a watchpoint.
13508 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13509 thread was stepping or has been stopped by a watchpoint.
13510
d3bbe7a0
PA
135112010-04-01 Pedro Alves <pedro@codesourcery.com>
13512
13513 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13514 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13515 of another, then delete the previous, and validate all
13516 breakpoints.
13517 (validate_inserted_breakpoint): New.
13518 (delete_disabled_breakpoints): New.
13519 (validate_breakpoints): New.
13520 (check_mem_read): Validate breakpoints before trusting their
13521 shadow. Delete disabled breakpoints.
13522 (check_mem_write): Validate breakpoints before trusting they
13523 should be inserted. Delete disabled breakpoints.
13524 * mem-break.h (validate_breakpoints):
13525 * server.c (handle_query): Validate breakpoints when we see a
13526 qSymbol query.
13527
8b07ae33
PA
135282010-04-01 Pedro Alves <pedro@codesourcery.com>
13529
13530 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13531 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13532 if we could tell there's a GDB breakpoint at stop_pc.
13533 (need_step_over_p): Don't do a step over if we find a GDB
13534 breakpoint at the resume PC.
13535
13536 * mem-break.c (struct raw_breakpoint): New.
13537 (enum bkpt_type): New type `gdb_breakpoint'.
13538 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13539 fields. New field `raw'.
13540 (find_raw_breakpoint_at): New.
13541 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13542 breakpoint instead.
13543 (set_breakpoint_at): Adjust.
13544 (delete_raw_breakpoint): New.
13545 (release_breakpoint): New.
13546 (delete_breakpoint): Rename to...
13547 (delete_breakpoint_1): ... this. Add proc parameter. Use
13548 release_breakpoint. Return ENOENT.
13549 (delete_breakpoint): Reimplement.
13550 (find_breakpoint_at): Delete.
13551 (find_gdb_breakpoint_at): New.
13552 (delete_breakpoint_at): Delete.
13553 (set_gdb_breakpoint_at): New.
13554 (delete_gdb_breakpoint_at): New.
13555 (gdb_breakpoint_here): New.
13556 (set_reinsert_breakpoint): Use release_breakpoint.
13557 (uninsert_breakpoint): Rename to ...
13558 (uninsert_raw_breakpoint): ... this.
13559 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13560 (reinsert_raw_breakpoint): Change parameter type to
13561 raw_breakpoint.
13562 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13563 instead.
13564 (check_breakpoints): Adjust. Use release_breakpoint.
13565 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13566 (breakpoint_inserted_here): Ditto.
13567 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13568 Don't trust the breakpoint's shadow if it is not inserted.
13569 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13570 (delete_all_breakpoints): Adjust.
13571 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13572 use delete_breakpoint_1.
13573
13574 * mem-break.h (breakpoints_supported): Delete declaration.
13575 (set_gdb_breakpoint_at): Declare.
13576 (gdb_breakpoint_here): Declare.
13577 (delete_breakpoint_at): Delete.
13578 (delete_gdb_breakpoint_at): Declare.
13579
13580 * server.h (struct raw_breakpoint): Forward declare.
13581 (struct process_info): New field `raw_breakpoints'.
13582
13583 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13584 breakpoints.
13585
6bf5e0ba
PA
135862010-03-24 Pedro Alves <pedro@codesourcery.com>
13587
13588 * linux-low.c (status_pending_p_callback): Fix comment.
13589 (linux_wait_for_event_1): Move most of the internal breakpoint
13590 handling from here...
13591 (linux_wait_1): ... to here.
13592 (count_events_callback): New.
13593 (select_singlestep_lwp_callback): New.
13594 (select_event_lwp_callback): New.
13595 (cancel_breakpoints_callback): New.
13596 (select_event_lwp): New.
13597 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13598 priority to all LWPs that have had events that should be reported
13599 to the client. Cancel breakpoints when about to reporting the
13600 event to the client, not while stopping lwps. No longer cancel
13601 finished single-steps here.
13602 (cancel_finished_single_step): Delete.
13603 (cancel_finished_single_steps): Delete.
13604
414a389f
PA
136052010-03-24 Pedro Alves <pedro@codesourcery.com>
13606
13607 * mem-break.c (enum bkpt_type): New.
13608 (struct breakpoint): New field `type'.
13609 (set_breakpoint_at): Change return type to struct breakpoint
13610 pointer. Set type to `other_breakpoint' by default.
13611 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13612 in the breakpoint list.
13613 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13614 (reinsert_breakpoint): Rename to ...
13615 (reinsert_raw_breakpoint): ... this.
13616 (reinsert_breakpoints_at): Adjust.
13617 * mem-break.h (struct breakpoint): Declare.
13618 (set_breakpoint_at): Change return type to struct breakpoint
13619 pointer.
13620
2280c721
PA
136212010-03-24 Pedro Alves <pedro@codesourcery.com>
13622
13623 * server.c (handle_query): Assign, not compare.
13624
d50171e4
PA
136252010-03-24 Pedro Alves <pedro@codesourcery.com>
13626
13627 Teach linux gdbserver to step-over-breakpoints.
13628
13629 * linux-low.c (can_hardware_single_step): New.
13630 (supports_breakpoints): New.
13631 (handle_extended_wait): If stopping threads, read the stop pc of
13632 the new cloned LWP.
13633 (get_pc): New.
13634 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13635 low target doesn't support retrieving the PC.
13636 (add_lwp): Set last_resume_kind to resume_continue.
13637 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13638 (linux_attach): Don't clear stop_expected. Set the lwp's
13639 last_resume_kind to resume_stop.
13640 (linux_detach_one_lwp): Don't check for removed breakpoints.
13641 (check_removed_breakpoint): Delete.
13642 (status_pending_p): Rename to ...
13643 (status_pending_p_callback): ... this. Don't check for removed
13644 breakpoints. Don't consider threads that are stopped from GDB's
13645 perspective.
13646 (linux_wait_for_lwp): Always read the stop_pc here.
13647 (cancel_breakpoint): New.
13648 (step_over_bkpt): New global.
13649 (linux_wait_for_event_1): Implement stepping over breakpoints.
13650 (gdb_wants_lwp_stopped): New.
13651 (gdb_wants_all_stopped): New.
13652 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13653 single-step traps here. Store the thread's last reported target
13654 wait status.
13655 (send_sigstop): Don't clear stop_expected. Always set it,
13656 instead.
13657 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13658 (cancel_finished_single_step): New.
13659 (cancel_finished_single_steps): New.
13660 (wait_for_sigstop): Don't cancel finished single-step traps here.
13661 (linux_resume_one_lwp): Don't check for removed breakpoints.
13662 Don't set `step' on non-hardware step archs.
13663 (linux_set_resume_request): Ignore resume_stop requests if already
13664 stopping or stopped. Set the lwp's last_resume_kind.
13665 (resume_status_pending_p): Don't check for removed breakpoints.
13666 (need_step_over_p): New.
13667 (start_step_over): New.
13668 (finish_step_over): New.
13669 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13670 requests. Clear the thread's last reported target waitstatus.
13671 Don't use the `suspended' flag. Don't consider pending breakpoints.
13672 (linux_resume): Start a step-over if necessary.
13673 (proceed_one_lwp): New.
13674 (proceed_all_lwps): New.
13675 (unstop_all_lwps): New.
13676 * linux-low.h (struct lwp_info): Rewrite comment for the
13677 `suspended' flag. Add the `stop_pc' field. Delete the
13678 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13679 Add `'last_resume_kind' and `need_step_over' fields.
13680 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13681 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13682 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13683 (set_raw_breakpoint_at): New.
13684 (set_breakpoint_at): Rewrite to use it.
13685 (reinsert_breakpoint_handler): Delete.
13686 (set_reinsert_breakpoint): New.
13687 (reinsert_breakpoint_by_bp): Delete.
13688 (delete_reinsert_breakpoints): New.
13689 (uninsert_breakpoint): Rewrite.
13690 (uninsert_breakpoints_at): New.
13691 (reinsert_breakpoint): Rewrite.
13692 (reinsert_breakpoints_at): New.
13693 (check_breakpoints): Rewrite.
13694 (breakpoint_here): New.
13695 (breakpoint_inserted_here): New.
13696 (check_mem_read): Adjust.
13697 * mem-break.h (breakpoints_supported, breakpoint_here)
13698 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13699 (reinsert_breakpoint_by_bp): Delete declaration.
13700 (delete_reinsert_breakpoints): Declare.
13701 (reinsert_breakpoint): Delete declaration.
13702 (reinsert_breakpoints_at): Declare.
13703 (uninsert_breakpoint): Delete declaration.
13704 (uninsert_breakpoints_at): Declare.
13705 (check_breakpoints): Adjust prototype.
13706 * server.h: Adjust include order.
13707 (struct thread_info): Declare here. Add a `last_status' field.
13708
30ba68cb
MS
137092010-03-23 Michael Snyder <msnyder@vmware.com>
13710
13711 * server.c (crc32): New function.
13712 (handle_query): Add handling for 'qCRC:' request.
13713
b9a881c2
PA
137142010-03-23 Pedro Alves <pedro@codesourcery.com>
13715
13716 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13717 lwp had been stopped by a watchpoint.
13718
e92d13d5
PA
137192010-03-16 Pedro Alves <pedro@codesourcery.com>
13720
13721 * server.h (internal_error): Declare.
13722 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13723 * utils.c (internal_error): New function.
13724
64daa791
AS
137252010-03-15 Andreas Schwab <schwab@redhat.com>
13726
13727 * configure.srv: Fix typo setting srv_regobj.
13728
f52cd8cd
PA
137292010-03-15 Pedro Alves <pedro@codesourcery.com>
13730
13731 * linux-low.c (fetch_register): Avoid passing a non string literal
13732 format to `error'.
13733 (usr_store_inferior_registers): Ditto.
13734
93ae6fdc
PA
137352010-03-14 Pedro Alves <pedro@codesourcery.com>
13736
13737 * linux-low.c (linux_write_memory): Bail out early if peeking
13738 memory failed.
13739
c3adc08c
PA
137402010-03-14 Pedro Alves <pedro@codesourcery.com>
13741
13742 * linux-low.h (struct lwp_info): New fields
13743 `stopped_by_watchpoint' and `stopped_data_address'.
13744 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13745 here, and cache them in the lwp object.
13746 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13747 directly.
13748 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13749 field.
13750 (linux_stopped_by_watchpoint): Rewrite.
13751 (linux_stopped_data_address): Rewrite.
13752
bce522a2
PA
137532010-03-06 Simo Melenius <simo.melenius@iki.fi>
13754
13755 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13756 switching the current inferior, not before.
13757
90884b2b
L
137582010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13759
13760 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13761 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13762 i386-linux.c and amd64-linux.c.
13763 (reg-i386.o): Removed.
13764 (reg-i386.c): Likewise.
13765 (reg-i386-linux.o): Likewise.
13766 (reg-i386-linux.c): Likewise.
13767 (reg-x86-64.o): Likewise.
13768 (reg-x86-64.c): Likewise.
13769 (reg-x86-64-linux.o): Likewise.
13770 (reg-x86-64-linux.c): Likewise.
13771 (i386.o): New.
13772 (i386.c): Likewise.
13773 (i386-linux.o): Likewise.
13774 (i386-linux.c): Likewise.
13775 (amd64.o): Likewise.
13776 (amd64.c): Likewise.
13777 (amd64-linux.o): Likewise.
13778 (amd64-linux.c): Likewise.
13779
13780 * configure.srv (srv_i386_regobj): New.
13781 (srv_i386_linux_regobj): Likewise.
13782 (srv_amd64_regobj): Likewise.
13783 (srv_amd64_linux_regobj): Likewise.
13784 (srv_i386_32bit_xmlfiles): Likewise.
13785 (srv_i386_64bit_xmlfiles): Likewise.
13786 (srv_i386_xmlfiles): Likewise.
13787 (srv_amd64_xmlfiles): Likewise.
13788 (srv_i386_linux_xmlfiles): Likewise.
13789 (srv_amd64_linux_xmlfiles): Likewise.
13790 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13791 srv_xmlfiles to $srv_i386_xmlfiles.
13792 (i[34567]86-*-mingw32ce*): Likewise.
13793 (i[34567]86-*-mingw*): Likewise.
13794 (i[34567]86-*-nto*): Likewise.
13795 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13796 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13797 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13798 (x86_64-*-linux*): Likewise.
13799
13800 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13801 (init_registers_amd64_linux): New.
13802 (x86_arch_setup): Replace init_registers_x86_64_linux with
13803 init_registers_amd64_linux.
13804
193f13e6
MK
138052010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13806
13807 * configure.ac: Check for libdl. If it is not available link against
13808 static libthread_db.
13809 * configure: Regenerate.
13810
85d721b8
PA
138112010-02-22 Pedro Alves <pedro@codesourcery.com>
13812
13813 PR9605
13814
13815 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13816 handing a read watchpoint.
13817 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13818
6076632b
DE
138192010-02-12 Doug Evans <dje@google.com>
13820
13821 * linux-low.c (linux_supports_tracefork_flag): Document.
13822 (linux_look_up_symbols): Add comment.
13823
3327ccf7
L
138242010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13825
13826 * regcache.c (supply_register): Clear regcache if buf is NULL.
13827
0718675c 138282010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13829 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13830
13831 * inferiors.c (find_inferior): Add function documentation.
13832 (unloaded_dll): Handle the case where the unloaded dll has not
13833 been previously registered in the dll list.
13834
177321bd
DJ
138352010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13836
13837 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13838 (thumb2_breakpoint): New.
13839 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13840
2b009048
DJ
138412010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13842
13843 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13844 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13845 breakpoints.
13846
3be029c7
PA
138472010-01-21 Pedro Alves <pedro@codesourcery.com>
13848
13849 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13850
18f5de3b
JK
138512010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13852
13853 * linux-s390-low.c (s390_collect_ptrace_register)
13854 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13855
3743bb4f
DE
138562010-01-21 Doug Evans <dje@google.com>
13857
14ce3065
DE
13858 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13859 (PTRACE_ARG4_TYPE): New macro.
13860 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13861 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13862 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13863 (usr_store_inferior_registers): Ditto.
13864 (linux_read_memory, linux_write_memory): Ditto.
13865 (linux_test_for_tracefork): Ditto.
13866
3743bb4f
DE
13867 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13868 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13869
8b315be5
PA
138702010-01-21 Pedro Alves <pedro@codesourcery.com>
13871
13872 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13873 target.
13874
85492558
PA
138752010-01-21 Pedro Alves <pedro@codesourcery.com>
13876
13877 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13878 prototype to take a regcache. Adjust.
13879
442ea881
PA
138802010-01-20 Pedro Alves <pedro@codesourcery.com>
13881
13882 * regcache.h (struct thread_info): Forward declare.
13883 (struct regcache): New.
13884 (new_register_cache): Adjust prototype.
13885 (get_thread_regcache): Declare.
13886 (free_register_cache): Adjust prototype.
13887 (registers_to_string, registers_from_string): Ditto.
13888 (supply_register, supply_register_by_name, collect_register)
13889 (collect_register_as_string, collect_register_by_name): Ditto.
13890 * regcache.c (struct inferior_regcache_data): Delete.
13891 (get_regcache): Rename to ...
13892 (get_thread_regcache): ... this. Adjust. Switch inferior before
13893 fetching registers.
13894 (regcache_invalidate_one): Adjust.
13895 (regcache_invalidate): Fix prototype.
13896 (new_register_cache): Return the new register cache.
13897 (free_register_cache): Change prototype.
13898 (realloc_register_cache): Adjust.
13899 (registers_to_string): Change prototype to take a regcache. Adjust.
13900 (registers_from_string): Ditto.
13901 (register_data): Ditto.
13902 (supply_register): Ditto.
13903 (supply_register_by_name): Ditto.
13904 (collect_register): Ditto.
13905 (collect_register_as_string): Ditto.
13906 (collect_register_by_name): Ditto.
13907 * server.c (process_serial_event): Adjust.
13908 * linux-low.h (regset_fill_func, regset_store_func): Change
13909 prototype.
13910 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13911 Change prototype.
13912 * linux-low.c (get_stop_pc): Adjust.
13913 (check_removed_breakpoint): Adjust.
13914 (linux_wait_for_event): Adjust.
13915 (linux_resume_one_lwp): Adjust.
13916 (fetch_register): Add regcache parameter. Adjust.
13917 (usr_store_inferior_registers): Ditto.
13918 (regsets_fetch_inferior_registers): Ditto.
13919 (regsets_store_inferior_registers): Ditto.
13920 (linux_fetch_registers, linux_store_registers): Ditto.
13921 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13922 regcache. Adjust.
43aaf8b6
PA
13923 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13924 Ditto.
442ea881
PA
13925 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13926 prototype to take a regcache.
13927 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13928 * remote-utils.c (convert_ascii_to_int, outreg)
13929 (prepare_resume_reply): Change prototype to take a regcache.
13930 Adjust.
13931 * target.h (struct target_ops) <fetch_registers, store_registers>:
13932 Change prototype to take a regcache.
13933 (fetch_inferior_registers, store_inferior_registers): Change
13934 prototype to take a regcache. Adjust.
13935 * proc-service.c (ps_lgetregs): Adjust.
13936 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13937 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13938 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13939 take a regcache. Adjust.
13940 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13941 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13942 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13943 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13944 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13945 (cris_cannot_fetch_register):
13946 (cris_breakpoint_at): Change prototype to take a regcache.
13947 Adjust.
13948 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13949 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13950 to take a regcache. Adjust.
13951 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13952 Adjust.
13953 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13954 take a regcache. Adjust.
13955 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13956 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13957 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13958 * linux-mips-low.c (mips_get_pc):
13959 (mips_set_pc): Change prototype to take a regcache. Adjust.
13960 (mips_reinsert_addr): Adjust.
13961 (mips_collect_register): Change prototype to take a regcache.
13962 Adjust.
13963 (mips_supply_register):
13964 (mips_collect_register_32bit, mips_supply_register_32bit)
13965 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13966 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13967 * linux-ppc-low.c (ppc_supply_ptrace_register)
13968 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13969 (parse_spufs_run): Adjust.
13970 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13971 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13972 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13973 take a regcache. Adjust.
13974 * linux-s390-low.c (s390_collect_ptrace_register)
13975 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13976 (s390_set_pc): Change prototype to take a regcache. Adjust.
13977 (s390_arch_setup): Adjust.
13978 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13979 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13980 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13981 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13982 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13983 regcache. Adjust.
13984 (sparc_breakpoint_at): Adjust.
13985 * linux-xtensa-low.c (xtensa_fill_gregset):
13986 (xtensa_store_gregset):
13987 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13988 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13989 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13990 prototype to take a regcache. Adjust.
13991 * win32-arm-low.c (arm_fetch_inferior_register)
13992 (arm_store_inferior_register): Change prototype to take a
13993 regcache. Adjust.
13994 * win32-i386-low.c (i386_fetch_inferior_register)
13995 (i386_store_inferior_register): Change prototype to take a
13996 regcache. Adjust.
13997 * win32-low.c (child_fetch_inferior_registers)
13998 (child_store_inferior_registers): Change prototype to take a
13999 regcache. Adjust.
14000 (win32_wait): Adjust.
14001 (win32_fetch_inferior_registers): Change prototype to take a
14002 regcache. Adjust.
14003 (win32_store_inferior_registers): Adjust.
14004 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14005 store_inferior_register>: Change prototype to take a regcache.
14006
60c3d7b0
DE
140072010-01-20 Doug Evans <dje@google.com>
14008
14009 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14010 #ifdef.
14011 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14012 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14013
dc146f7c
VP
140142010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14015
14016 * linux-low.c (linux_core_of_thread): New.
14017 (compare_ints, show_process, list_threads): New.
14018 (linux_qxfer_osdata): Report threads and cores.
14019 (linux_target_op): Register linux_core_of_thread.
14020 * remote-utils.c (prepare_resume_reply): Report the core.
14021 (buffer_xml_printf): Support %d specifier.
14022 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14023 New.
14024 (handle_query): Handle qXfer:threads. Announce availability
14025 thereof.
14026 * target.h (struct target_ops): New field core_of_thread.
14027
7803799a
UW
140282010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14029
14030 * Makefile.in (clean): Remove new generated files.
14031 (reg-s390.o, reg-s390.c): Remove rules.
14032 (reg-s390x.o, reg-s390x.c): Likewise.
14033 (s390-linux32.o, s390-linux32.c): Add rules.
14034 (s390-linux64.o, s390-linux64.c): Likewise.
14035 (s390x-linux64.o, s390x-linux64.c): Likewise.
14036 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14037 * linux-s390-low.c: Include <elf.h>.
14038 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14039 (init_registers_s390): Remove prototype.
14040 (init_registers_s390x): Likewise.
14041 (init_registers_s390_linux32): Add prototype.
14042 (init_registers_s390_linux64): Likewise.
14043 (init_registers_s390x_linux64): Likewise.
14044 (s390_num_regs_3264): New define.
14045 (s390_regmap_3264): New global variable.
14046 (s390_cannot_fetch_register): Remove obsolete check.
14047 (s390_cannot_store_register): Likewise.
14048 (s390_collect_ptrace_register): Handle upper/lower register halves.
14049 (s390_supply_ptrace_register): Likewise.
14050 (s390_fill_gregset): Update to register number changes.
14051 (s390_get_hwcap): New routine.
14052 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14053 Install appropriate regmap and register set.
14054
6e7ffa39
JB
140552010-01-01 Joel Brobecker <brobecker@adacore.com>
14056
14057 * server.c (gdbserver_version): Update copyright year to 2010.
14058 * gdbreplay.c (gdbreplay_version): Likewise.
14059
957f3f49
DE
140602009-12-28 Doug Evans <dje@google.com>
14061
14062 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14063 elf/external.h. Include <elf.h> instead but only if necessary.
14064
ca5c370d
PA
140652009-12-28 Pedro Alves <pedro@codesourcery.com>
14066
14067 * linux-low.c (linux_remove_process): Remove `detaching'
14068 parameter. Don't release/detach from thread_db here.
14069 (linux_kill): Release/detach from thread_db here, ...
14070 (linux_detach): ... and here, before actually detaching.
14071 (linux_wait_1): ... and here, when a process exits.
14072 * thread-db.c (any_thread_of): New.
14073 (thread_db_free): Switch the current inferior to a thread of the
14074 passed in process.
14075
4ee62156
DE
140762009-12-21 Doug Evans <dje@google.com>
14077
d90e6a88
DE
14078 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14079
c5f62d5f
DE
14080 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14081 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14082 warning ifndef __NR_tkill. Move setting of errno there too.
14083 Delete unnecessary resetting of errno after syscall.
14084 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14085
10e86dd7
DE
14086 * configure.ac: Check for dladdr.
14087 * config.in: Regenerate.
14088 * configure: Regenerate.
14089 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14090 (try_thread_db_load): Update.
14091
4ee62156
DE
14092 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14093
00f515da
DE
140942009-12-18 Doug Evans <dje@google.com>
14095
e9464885
DE
14096 * event-loop.c: Include unistd.h if it exists.
14097
07d4f67e
DE
14098 * linux-low.c (my_waitpid): Move definition away from being in
14099 between linux_tracefork_child/linux_test_for_tracefork.
14100
00f515da
DE
14101 * gdb_proc_service.h (psaddr_t): Fix type.
14102 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14103 signature to match glibc.
14104
1de1badb
DE
141052009-12-16 Doug Evans <dje@google.com>
14106
14107 * linux-low.c (linux_read_memory): Fix argument to read.
14108
aeeb81d1
PA
141092009-11-26 Pedro Alves <pedro@codesourcery.com>
14110
14111 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14112 events, don't leave current_inferior pointing at null.
14113
10357975
PA
141142009-11-26 Pedro Alves <pedro@codesourcery.com>
14115
14116 * win32-low.c (LOG): Delete.
14117 (OUTMSG): Output to stderr.
14118 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14119 on compile time LOG macro.
14120 (win32_wait): Fix debug output.
14121
cf6e3471
PA
141222009-11-26 Pedro Alves <pedro@codesourcery.com>
14123
14124 * win32-low.c (win32_add_one_solib): If the dll name is
14125 "ntdll.dll", prepend the system directory to the dll path.
14126
0c85e18e
MK
141272009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14128
14129 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14130
9ac544ce 141312009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14132 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14133
14134 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14135 * configure.ac: Check for __mcoldfire__ and set
14136 gdb_cv_m68k_is_coldfire.
14137 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14138 reg-cf.o and reg-m68k.o.
14139 * configure: Regenerated.
14140
fd7dd3e6
PA
141412009-11-16 Pedro Alves <pedro@codesourcery.com>
14142
14143 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14144 Pass it to thread_db_free.
14145 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14146 proper `detaching' argument to linux_remove_process.
14147 * linux-low.h (thread_db_free): Add `detaching' parameter.
14148 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14149 to thread_db_free.
14150 (thread_db_free): Add `detaching' parameter. Only
14151 call td_ta_clear_event if detaching from process.
14152
75aa492e
MK
141532009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14154
14155 * thread-db.c (thread_db_free): Fix typo.
14156
21e1bee4
PP
141572009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14158
14159 PR gdb/10838
14160 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14161
8838b45e
NS
141622009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14163
14164 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14165 with an i686 compiler.
14166 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14167 needed.
14168 * configure: Rebuilt.
14169
8a35fb51
SL
141702009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14171
14172 PR gdb/10783
14173
14174 * server.c (handle_search_memory_1): Correct read_addr initialization
14175 in loop for searching subsequent chunks.
14176
96f15937
PP
141772009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14178
14179 * configure.ac: New --with-libthread-db option.
14180 * thread-db.c: Allow direct dependence on libthread_db.
14181 (thread_db_free): Adjust.
14182 * config.in: Regenerate.
14183 * configure: Likewise.
889bf7c5 14184
5f7d1694
PP
141852009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14186
14187 PR gdb/10757
14188 * thread-db.c (attach_thread): New function.
14189 (maybe_attach_thread): Return success/failure.
14190 (find_new_threads_callback): Adjust.
889bf7c5
PA
14191 (thread_db_find_new_threads): Loop until no new threads.
14192
88e3b899
PA
141932009-10-13 Pedro Alves <pedro@codesourcery.com>
14194
14195 * proc-service.c (ps_lgetregs): Formatting.
14196
cdbfd419
PP
141972009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14198
14199 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14200 * configure.ac: Adjust.
14201 * linux-low.h (struct process_info_private): Move members to struct
14202 thread_db.
14203 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14204 * linux-low.c (linux_remove_process): Adjust.
14205 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14206 * server.c (handle_query): Move code ...
14207 (handle_monitor_command): ... here. New function.
14208 * target.h (struct target_ops): New member.
14209 * thread-db.c (struct thread_db): New.
14210 (libthread_db_search_path): New variable.
14211 (thread_db_create_event, thread_db_enable_reporting)
14212 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14213 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14214 (try_thread_db_load_1, dladdr_to_soname): New functions.
14215 (try_thread_db_load, thread_db_load_search): New functions.
14216 (thread_db_init): Search for libthread_db.
14217 (thread_db_free): New function.
14218 (thread_db_handle_monitor_command): Likewise.
14219 * config.in: Regenerate.
14220 * configure: Regenerate.
889bf7c5 14221
4168d2d6
UW
142222009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14223
14224 * spu-low.c (spu_kill): Wait for inferior to terminate.
14225 Call clear_inferiors.
14226 (spu_detach): Call clear_inferiors.
14227
81ecdfbb
RW
142282009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14229
14230 * aclocal.m4: Regenerate.
14231 * config.in: Likewise.
14232 * configure: Likewise.
14233
0b9ff2c0
UW
142342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14235
14236 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14237 (parse_spufs_run): New function.
14238 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14239 (ppc_breakpoint_at): Handle SPU breakpoints.
14240
efcbbd14
UW
142412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14242
14243 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14244 (SPUFS_MAGIC): Define.
14245 (spu_enumerate_spu_ids): New function.
14246 (linux_qxfer_spu): New function.
14247 (linux_target_ops): Install linux_qxfer_spu.
14248
f4d9bade
UW
142492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14250
14251 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14252 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14253 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14254 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14255 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14256 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14257 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14258 (init_registers_powerpc_cell32l): Add prototype.
14259 (init_registers_powerpc_cell64l): Likewise.
14260 (ppc_arch_setup): Detect Cell/B.E. architecture.
14261
96e946ca
RW
142622009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14263
14264 * Makefile.in (datarootdir): New variable.
14265
58d6951d
DJ
142662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14267
14268 * linux-low.c (linux_write_memory): Update debugging output.
14269 * Makefile.in (clean): Add new descriptions.
14270 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14271 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14272 * configure.srv: Add new files for arm*-*-linux*.
14273 * linux-arm-low.c: Add new declarations.
14274 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14275 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14276 (HWCAP_VFPv3D16): New.
14277 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14278 instead of __IWMMXT__.
14279 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14280 (arm_arch_setup): New.
14281 (target_regsets): Remove #ifdef. Add VFP regset.
14282 (the_low_target): Use arm_arch_setup.
14283
12b42a12
DJ
142842009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14285
14286 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14287 the main thread again.
14288
ac8c974e
AR
142892009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14290
14291 Adding Neutrino gdbserver.
14292 * configure: Regenerated.
14293 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14294 * configure.srv (i[34567]86-*-nto*): New target.
14295 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14296 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14297 (nto_comctrl) [__QNX__]: New function.
14298 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14299
4424e0c3 143002009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14301
14302 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14303 srv_tgtobj.
14304
912cf4ba
PA
143052009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14306 Pedro Alves <pedro@codesourcery.com>
14307
14308 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14309 don't support CONTEXT_EXTENDED_REGISTERS.
14310 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14311 (the_low_target): Install them.
14312 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14313 failing with ERROR_PIPE_NOT_CONNECTED.
14314
aa5ca48f
DE
143152009-06-30 Doug Evans <dje@google.com>
14316 Pierre Muller <muller@ics.u-strasbg.fr>
14317
14318 Add h/w watchpoint support to x86-linux, win32-i386.
14319 * Makefile.in (SFILES): Add i386-low.c
14320 (i386_low_h): Define.
14321 (i386-low.o): Add dependencies.
14322 (linux-x86-low.o): Add i386-low.h dependency.
14323 (win32-i386-low.o): Ditto.
14324 * i386-low.c: New file.
14325 * i386-low.h: New file.
14326 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14327 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14328 * linux-low.c (linux_add_process): Initialize arch_private.
14329 (linux_remove_process): Free arch_private.
14330 (add_lwp): Initialize arch_private.
14331 (delete_lwp): Free arch_private.
14332 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14333 provided.
14334 * linux-low.h (process_info_private): New member arch_private.
14335 (lwp_info): New member arch_private.
14336 (linux_target_ops): New members new_process, new_thread,
14337 prepare_to_resume.
14338 (ptid_of): New macro.
14339 * linux-x86-low.c: Include stddef.h, i386-low.h.
14340 (arch_process_info): New struct.
14341 (arch_lwp_info): New struct.
14342 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14343 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14344 (i386_dr_low_get_status): New function.
14345 (x86_insert_point, x86_remove_point): New functions.
14346 (x86_stopped_by_watchpoint): New function.
14347 (x86_stopped_data_address): New function.
14348 (x86_linux_new_process, x86_linux_new_thread): New functions.
14349 (x86_linux_prepare_to_resume): New function.
14350 (the_low_target): Add entries for insert_point, remove_point,
14351 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14352 prepare_to_resume.
14353 * server.c (debug_hw_points): New global.
14354 (monitor_show_help): Document set debug-hw-points.
14355 (handle_query): Process "set debug-hw-points".
14356 * server.h (debug_hw_points): Declare.
14357 (paddress): Declare.
14358 * utils.c (NUMCELLS, CELLSIZE): New macros.
14359 (get_sell, xsnprintf, paddress): New functions.
14360 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14361 remove_point, stopped_by_watchpoint, stopped_data_address.
14362 * win32-i386-low.c: Include i386-low.h.
14363 (debug_reg_state): Replaces dr.
14364 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14365 (i386_dr_low_get_status): New function.
14366 (i386_insert_point, i386_remove_point): New functions.
14367 (i386_stopped_by_watchpoint): New function.
14368 (i386_stopped_data_address): New function.
14369 (i386_initial_stuff): Update.
14370 (get_thread_context,set_thread_context,i386_thread_added): Update.
14371 (the_low_target): Add entries for insert_point,
14372 remove_point, stopped_by_watchpoint, stopped_data_address.
14373 * win32-low.c (win32_insert_watchpoint): New function.
14374 (win32_remove_watchpoint): New function.
14375 (win32_stopped_by_watchpoint): New function.
14376 (win32_stopped_data_address): New function.
14377 (win32_target_ops): Add entries for insert_watchpoint,
14378 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14379 * win32-low.h (win32_target_ops): New members insert_point,
14380 remove_point, stopped_by_watchpoint, stopped_data_address.
14381
d993e290
PA
143822009-06-25 Pedro Alves <pedro@codesourcery.com>
14383
14384 * server.c (process_serial_event): Re-return unsupported, not
14385 error, if the type isn't recognized. Re-allow supporting only
14386 insert or remove packets. Also call require_running for
14387 breakpoints. Add missing break statement to default case. Tidy.
14388 * target.h (struct target_ops): Rename insert_watchpoint to
14389 insert_point, and remove_watchpoint to remove_point.
14390
14391 * linux-low.h (struct linux_target_ops): Likewise.
14392 * linux-low.c (linux_insert_watchpoint): Rename to ...
14393 (linux_insert_point): ... this. Adjust.
14394 (linux_remove_watchpoint): Rename to ...
14395 (linux_remove_point): ... this. Adjust.
14396 (linux_target_ops): Adjust.
14397 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14398 (cris_insert_point): ... this.
14399 (cris_remove_watchpoint): Rename to ...
14400 (cris_remove_point): ... this.
14401 (the_low_target): Adjust.
14402
0f54c268
PM
144032009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14404
14405 * server.c (handle_v_kill): Pass signal_pid to
14406 kill_inferior if multi_process is zero.
14407
c6314022
AR
144082009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14409
14410 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14411 * target.h (target_ops): Comment for *_watchpoint to make it clear
14412 the functions can get types '0' and '1'.
14413
4463ce24
AR
144142009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14415
14416 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14417 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14418 * regcache.c (get_regcache): Likewise.
14419 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14420 * win32-low.c (child_fetch_inferior_registers): Remove check for
14421 regno 0.
14422
cf8fd78b
PA
144232009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14424 Pedro Alves <pedro@codesourcery.com>
14425
14426 * target.h (struct target_ops) <supports_multi_process>: New
14427 callback.
14428 (target_supports_multi_process): New.
14429 * server.c (handle_query): Even if GDB reports support, only
14430 enable multi-process if the target also supports it. Report
14431 multi-process support only if the target backend supports it.
14432 * linux-low.c (linux_supports_multi_process): New function.
14433 (linux_target_ops): Install it as target_supports_multi_process
14434 callback.
14435
47c0c975
DE
144362009-05-24 Doug Evans <dje@google.com>
14437
e09875d4
DE
14438 Global renaming of find_thread_pid to find_thread_ptid.
14439 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14440 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14441 All callers updated.
14442
e27d73f6
DE
14443 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14444 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14445 directly.
14446
47c0c975
DE
14447 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14448 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14449 (linux_resume_one_lwp): Ditto.
14450
2acc282a
DE
144512009-05-23 Doug Evans <dje@google.com>
14452
14453 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14454 from struct inferior_list_entry * to struct lwp_info *.
14455 All callers updated.
14456
9f1036c1
DE
144572009-05-13 Doug Evans <dje@google.com>
14458
14459 * linux-x86-low.c: Don't include assert.h.
14460 (x86_siginfo_fixup): Use fatal, not assert.
14461 (x86_arch_setup): Fix comment.
14462
d0722149
DE
144632009-05-12 Doug Evans <dje@google.com>
14464
14465 Biarch support for i386/amd64 gdbserver.
14466 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14467 Add linux-x86-low.c.
14468 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14469 (linux-x86-low.o): Add.
14470 * linux-x86-64-low.c: Delete.
14471 * linux-i386-low.c: Delete.
14472 * linux-x86-low.c: New file.
14473 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14474 linux-x86-low.o.
14475 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14476 linux-x86-low.o.
14477 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14478 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14479 (linux_child_pid_to_exec_file): New function.
14480 (elf_64_header_p, elf_64_file_p): New functions.
14481 (siginfo_fixup): New function.
14482 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14483 give target a chance to convert layout.
14484 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14485 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14486
fdeb2a12
DE
144872009-05-07 Doug Evans <dje@google.com>
14488
14489 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14490 (regsets_store_inferior_registers): Ditto.
14491
a6dbe5df
PA
144922009-05-06 Pedro Alves <pedro@codesourcery.com>
14493
14494 PR server/10048
14495
14496 * linux-low.c (must_set_ptrace_flags): Delete.
14497 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14498 of the global.
14499 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14500 `lwp->must_set_ptrace_flags' instead.
ba42693b 14501 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14502 (linux_wait_1): ... not here.
14503
5091eb23
DE
145042009-04-30 Doug Evans <dje@google.com>
14505
9f767825
DE
14506 * inferiors.c (started_inferior_callback): New function.
14507 (attached_inferior_callback): New function.
14508 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14509 * server.c (print_started_pid, print_attached_pid): New functions.
14510 (detach_or_kill_for_exit): New function.
14511 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14512 * server.h (have_started_inferiors_p): Declare.
14513 (have_attached_inferiors_p): Declare.
14514
5091eb23
DE
14515 * inferiors.c (remove_process): Fix memory leak, free process.
14516 * linux-low.c (linux_remove_process): New function.
14517 (linux_kill): Call it instead of remove_process.
14518 (linux_detach, linux_wait_1): Ditto.
14519
155c8968
PA
145202009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14521
14522 * configure.srv: Add x86 Windows CE target.
14523
7fe519cb
UW
145242009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14525
14526 * inferiors.c (get_thread_process): Make global.
14527 * server.h (get_thread_process): Add prototype.
14528 * thread-db.c (find_one_thread): Use get_thread_process
14529 instead of current_process.
14530 (thread_db_get_tls_address): Do not crash if called when
14531 thread layer is not yet initialized.
14532
5472f405
UW
145332009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14534
14535 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14536 * spu-low.c (current_tid): Rename to ...
14537 (current_ptid): ... this.
14538 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14539 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14540 ptid_get_lwp (current_ptid) instead of current_tid.
14541 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14542 instead of current_tid. Use find_process_pid to verify pid
14543 argument is valid. Pass proper argument to remove_process.
14544 (spu_thread_alive): Compare current_ptid instead of current_tid.
14545 (spu_resume): Likewise.
14546
55ac2b99
PA
145472009-04-02 Pedro Alves <pedro@codesourcery.com>
14548
14549 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14550 variable.
14551
95954743
PA
145522009-04-01 Pedro Alves <pedro@codesourcery.com>
14553
14554 Implement the multiprocess extensions, and add linux multiprocess
14555 support.
14556
14557 * server.h (ULONGEST): Declare.
14558 (struct ptid, ptid_t): New.
14559 (minus_one_ptid, null_ptid): Declare.
14560 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14561 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14562 (struct inferior_list_entry): Change `id' type from unsigned from
14563 to ptid_t.
14564 (struct sym_cache, struct breakpoint, struct
14565 process_info_private): Forward declare.
14566 (struct process_info): Declare.
14567 (current_process): Declare.
14568 (all_processes): Declare.
14569 (initialize_inferiors): Declare.
14570 (add_thread): Adjust to use ptid_t.
14571 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14572 (add_process, remove_process, find_thread_pid): Declare.
14573 (find_inferior_id): Adjust to use ptid_t.
14574 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14575 (multi_process): Declare.
14576 (push_event): Adjust to use ptid_t.
14577 (read_ptid, write_ptid): Declare.
14578 (prepare_resume_reply): Adjust to use ptid_t.
14579 (clear_symbol_cache): Declare.
14580 * inferiors.c (all_processes): New.
14581 (null_ptid, minus_one_ptid): New.
14582 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14583 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14584 (add_thread): Change unsigned long to ptid. Remove gdb_id
14585 parameter. Adjust.
14586 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14587 (gdb_id_to_thread): Rename to ...
14588 (find_thread_pid): ... this. Change unsigned long to ptid.
14589 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14590 (loaded_dll, pull_pid_from_list): Adjust.
14591 (add_process, remove_process, find_process_pid)
14592 (get_thread_process, current_process, initialize_inferiors): New.
14593 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14594 (struct target_waitstatus) <related_pid>: Ditto.
14595 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14596 return type to int.
14597 (struct target_ops) <join>: Add `pid' argument.
14598 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14599 (struct target_ops) <wait>: Add `ptid' field. Change return type
14600 to ptid.
14601 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14602 (mywait): Add `ptid' argument. Change return type to ptid_t.
14603 (target_pid_to_str): Declare.
14604 * target.c (set_desired_inferior): Adjust to use ptids.
14605 (mywait): Add new `ptid' argument. Adjust.
14606 (target_pid_to_str): New.
14607 * mem-break.h (free_all_breakpoints): Declare.
14608 * mem-break.c (breakpoints): Delelete.
14609 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14610 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14611 to use per-process breakpoint list.
14612 (free_all_breakpoints): New.
14613 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14614 (symbol_cache, all_symbols_looked_up): Delete.
14615 (hexchars): New.
14616 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14617 read_ptid): New.
14618 (prepare_resume_reply): Change ptid argument's type from unsigned
14619 long to ptid_t. Adjust. Implement W;process and X;process.
14620 (free_sym_cache, clear_symbol_cache): New.
14621 (look_up_one_symbol): Adjust to per-process symbol cache. *
14622 * server.c (cont_thread, general_thread, step_thread): Change type
14623 to ptid_t.
14624 (attached): Delete.
14625 (multi_process): New.
14626 (last_ptid): Change type to ptid_t.
14627 (struct vstop_notif) <ptid>: Change type to ptid_t.
14628 (queue_stop_reply, push_event): Change `ptid' argument's type to
14629 ptid_t.
14630 (discard_queued_stop_replies): Add `pid' argument.
14631 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14632 changes. Don't reference the `attached' global.
14633 (attach_inferior): Adjust to mywait interface changes.
14634 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14635 features. Handle and report "multiprocess+". Handle
14636 "qAttached:PID".
14637 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14638 changes.
14639 (handle_v_kill): New.
14640 (handle_v_stopped): Adjust to use target_pid_to_str.
14641 (handle_v_requests): Allow multiple attaches and runs when
14642 multiprocess extensions are in effect. Handle "vKill".
14643 (myresume): Adjust to use ptids.
14644 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14645 (handle_status): Adjust to discard_queued_stop_replies interface
14646 change.
14647 (first_thread_of, kill_inferior_callback)
14648 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14649 (main): Call initialize_inferiors. Adjust to use ptids, killing
14650 and detaching from all inferiors. Handle multiprocess packet
14651 variants.
14652 * linux-low.h: Include gdb_proc_service.h.
14653 (struct process_info_private): New.
14654 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14655 <lwpid_of>: Use ptid_get_lwp.
14656 (get_lwp_thread): Adjust.
14657 (struct lwp_info): Add `dead' member.
14658 (find_lwp_pid): Declare.
14659 * linux-low.c (thread_db_active): Delete.
14660 (new_inferior): Adjust comment.
14661 (inferior_pid): Delete.
14662 (linux_add_process): New.
14663 (handle_extended_wait): Adjust.
14664 (add_lwp): Change unsigned long to ptid.
14665 (linux_create_inferior): Add process to processes table. Adjust
14666 to use ptids. Don't set new_inferior here.
14667 (linux_attach_lwp): Rename to ...
14668 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14669 it. Adjust to use ptids.
14670 (linux_attach_lwp): New.
14671 (linux_attach): Add process to processes table. Don't set
14672 new_inferior here.
14673 (struct counter): New.
14674 (second_thread_of_pid_p, last_thread_of_process_p): New.
14675 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14676 multiple processes.
14677 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14678 processes. Remove process from process table.
14679 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14680 to multiple processes.
14681 (any_thread_of): New.
14682 (linux_detach): Add `pid' argument, and handle it. Remove process
14683 from processes table.
14684 (linux_join): Add `pid' argument. Handle it.
14685 (linux_thread_alive): Change unsighed long argument to ptid_t.
14686 Consider dead lwps as not being alive.
14687 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14688 threads we're not interested in.
14689 (same_lwp, find_lwp_pid): New.
14690 (linux_wait_for_lwp): Change `pid' argument's type from int to
14691 ptid_t. Adjust.
14692 (linux_wait_for_event): Rename to ...
14693 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14694 from int to ptid_t. Adjust.
14695 (linux_wait_for_event): New.
14696 (linux_wait_1): Add `ptid' argument. Change return type to
14697 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14698 that exit from the process table.
14699 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14700 Adjust.
14701 (mark_lwp_dead): New.
14702 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14703 stopping all threads, mark its main lwp as dead.
14704 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14705 ptids.
14706 (fetch_register, usr_store_inferior_registers)
14707 (regsets_fetch_inferior_registers)
14708 (regsets_store_inferior_registers, linux_read_memory)
14709 (linux_write_memory): Inline `inferior_pid'.
14710 (linux_look_up_symbols): Adjust to use per-process
14711 `thread_db_active'.
14712 (linux_request_interrupt): Adjust to use ptids.
14713 (linux_read_auxv): Inline `inferior_pid'.
14714 (initialize_low): Don't reference thread_db_active.
14715 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14716 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14717 (ps_getpid): Return the pid of the current inferior.
14718 * thread-db.c (proc_handle, thread_agent): Delete.
14719 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14720 per-process data.
14721 (find_one_thread): Change argument type to ptid_t. Adjust to
14722 per-process data.
14723 (maybe_attach_thread): Adjust to per-process data and ptids.
14724 (thread_db_find_new_threads): Ditto.
14725 (thread_db_init): Ditto.
14726 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14727 processes table. Adjust to use ptids.
14728 (spu_kill, spu_detach): Adjust interface. Remove process from
14729 processes table.
14730 (spu_join, spu_thread_alive): Adjust interface.
14731 (spu_wait): Adjust interface. Remove process from processes
14732 table. Adjust to use ptids.
14733 * win32-low.c (current_inferior_tid): Delete.
14734 (current_inferior_ptid): New.
14735 (debug_event_ptid): New.
14736 (thread_rec): Take a ptid. Adjust.
14737 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14738 (child_delete_thread): Ditto.
14739 (do_initial_child_stuff): Add `attached' argument. Add process to
14740 processes table.
14741 (child_fetch_inferior_registers, child_store_inferior_registers):
14742 Adjust.
14743 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14744 (win32_attach): Pass 1 to do_initial_child_stuff.
14745 (win32_kill): Adjust interface. Remove process from processes
14746 table.
14747 (win32_detach): Ditto.
14748 (win32_join): Adjust interface.
14749 (win32_thread_alive): Take a ptid.
14750 (win32_resume): Adjust to use ptids.
14751 (get_child_debug_event): Ditto.
14752 (win32_wait): Adjust interface. Remove exiting process from
14753 processes table.
14754
bd99dc85
PA
147552009-04-01 Pedro Alves <pedro@codesourcery.com>
14756
14757 Non-stop mode support.
14758
14759 * server.h (non_stop): Declare.
14760 (gdb_client_data, handler_func): Declare.
14761 (delete_file_handler, add_file_handler, start_event_loop):
14762 Declare.
14763 (handle_serial_event, handle_target_event, push_event)
14764 (putpkt_notif): Declare.
14765 * target.h (enum resume_kind): New.
14766 (struct thread_resume): Replace `step' field by `kind' field.
14767 (TARGET_WNOHANG): Define.
14768 (struct target_ops) <wait>: Add `options' argument.
14769 <supports_non_stop, async, start_non_stop>: New fields.
14770 (target_supports_non_stop, target_async): New.
14771 (start_non_stop): Declare.
14772 (mywait): Add `options' argument.
14773 * target.c (mywait): Add `options' argument. Print child exit
14774 notifications here.
14775 (start_non_stop): New.
14776 * server.c (non_stop, own_buf, mem_buf): New globals.
14777 (struct vstop_notif): New.
14778 (notif_queue): New global.
14779 (queue_stop_reply, push_event, discard_queued_stop_replies)
14780 (send_next_stop_reply): New.
14781 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14782 interface changes.
14783 (attach_inferior): In non-stop mode, don't wait for the target
14784 here.
14785 (handle_general_set): Handle QNonStop.
14786 (handle_query): When handling qC, return the current general
14787 thread, instead of the first thread of the list.
14788 (handle_query): If the backend supports non-stop mode, include
14789 QNonStop+ in the qSupported query response.
14790 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14791 and non-stop mode.
14792 (handle_v_attach, handle_v_run): Handle non-stop mode.
14793 (handle_v_stopped): New.
14794 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14795 (myresume): Adjust to use resume_kind. Handle non-stop.
14796 (queue_stop_reply_callback): New.
14797 (handle_status): Handle non-stop mode.
14798 (main): Clear non_stop flag on reconnection. Use the event-loop.
14799 Refactor serial protocol handling from here ...
14800 (process_serial_event): ... to this new function. When GDB
14801 selects any thread, select one here. In non-stop mode, wait until
14802 GDB acks all pending events before exiting.
14803 (handle_serial_event, handle_target_event): New.
14804 * remote-utils.c (remote_open): Install remote_desc in the event
14805 loop.
14806 (remote_close): Remove remote_desc from the event loop.
14807 (putpkt_binary): Rename to...
14808 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14809 (putpkt_binary): New as wrapper around putpkt_binary_1.
14810 (putpkt_notif): New.
14811 (prepare_resume_reply): In non-stop mode, don't change the
14812 general_thread.
14813 * event-loop.c: New.
14814 * Makefile.in (OBJ): Add event-loop.o.
14815 (event-loop.o): New rule.
14816
14817 * linux-low.h (pid_of): Moved here.
14818 (lwpid_of): New.
14819 (get_lwp_thread): Use lwpid_of.
14820 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14821 * linux-low.c (pid_of): Delete.
14822 (inferior_pid): Use lwpid_of.
14823 (linux_event_pipe): New.
14824 (target_is_async_p): New.
14825 (delete_lwp): New.
14826 (handle_extended_wait): Use lwpid_of.
14827 (add_lwp): Don't set lwpid field.
14828 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14829 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14830 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14831 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14832 first. Adjust to linux_wait_for_event interface changes. Use
14833 lwpid_of.
14834 (linux_detach): Don't delete the main lwp here.
14835 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14836 (status_pending_p): Don't consider explicitly suspended lwps.
14837 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14838 pointer. Add OPTIONS argument. Change return type to int. Use
14839 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14840 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14841 pointer. Add status pointer argument. Return a pid instead of a
14842 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14843 changes. In non-stop mode, don't switch to a random thread.
14844 (linux_wait): Rename to...
14845 (linux_wait_1): ... this. Add target_options argument, and handle
14846 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14847 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14848 clean exit and signal exit code. Don't stop all threads in
14849 non-stop mode. In all-stop mode, only stop all threads when
14850 reporting a stop to GDB. Handle explicit thread stop requests.
14851 (async_file_flush, async_file_mark): New.
14852 (linux_wait): New.
14853 (send_sigstop): Use lwpid_of.
14854 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14855 interface changes. In non-stop mode, don't switch to a random
14856 thread.
14857 (linux_resume_one_lwp): Use lwpid_of.
14858 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14859 (linux_resume_one_thread): ... this. Handle resume_stop. In
14860 non-stop mode, don't look for pending flag in all threads.
14861 (resume_status_pending_p): Don't consider explicitly suspended
14862 threads.
14863 (my_waitpid): Reimplement. Emulate __WALL.
14864 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14865 Use lwpid_of.
14866 (sigchld_handler, linux_supports_non_stop, linux_async)
14867 (linux_start_non_stop): New.
14868 (linux_target_ops): Register linux_supports_non_stop, linux_async
14869 and linux_start_non_stop.
14870 (initialize_low): Install SIGCHLD handler.
14871 * thread-db.c (thread_db_create_event, find_one_thread)
14872 (thread_db_get_tls_address): Use lwpid_of.
14873 * win32-low.c (win32_detach): Adjust to use resume_kind.
14874 (win32_wait): Add `options' argument.
14875 * spu-low.c (spu_resume): Adjust to use resume_kind.
14876 (spu_wait): Add `options' argument.
14877
5b1c542e
PA
148782009-04-01 Pedro Alves <pedro@codesourcery.com>
14879
14880 Decouple target code from remote protocol.
14881
14882 * target.h (enum target_waitkind): New.
14883 (struct target_waitstatus): New.
14884 (struct target_ops) <wait>: Return an unsigned long. Take a
14885 target_waitstatus pointer instead of a char pointer.
14886 (mywait): Likewise.
14887 * target.c (mywait): Change prototype to return an unsigned long.
14888 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14889 * server.h (thread_from_wait, old_thread_from_wait): Delete
14890 declarations.
14891 (prepare_resume_reply): Change prototype to take a
14892 target_waitstatus.
14893 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14894 (last_status, last_ptid): New.
14895 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14896 pid instead of a signal.
14897 (attach_inferior): Remove "status" and "signal" parameters.
14898 Adjust.
14899 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14900 not as an address.
14901 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14902 (handle_v_requests, myresume): Remove "status" and "signal"
14903 parameters. Adjust.
14904 (handle_status): New.
14905 (main): Delete local `status'. Adjust.
14906 * remote-utils.c: Include target.h.
14907 (prepare_resume_reply): Change prototype to take a
14908 target_waitstatus. Adjust.
14909
14910 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14911 interface.
14912 * spu-low.c (spu_wait): Adjust.
14913 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14914 Delete.
14915 (win32_wait): Adjust.
14916
2bd7c093
PA
149172009-04-01 Pedro Alves <pedro@codesourcery.com>
14918
14919 * target.h (struct thread_resume): Delete leave_stopped member.
14920 (struct target_ops): Add a `n' argument to the `resume' callback.
14921 * server.c (start_inferior): Adjust.
14922 (handle_v_cont, myresume): Adjust.
14923 * linux-low.c (check_removed_breakpoint): Adjust to resume
14924 interface change, and to removed leave_stopped field.
14925 (resume_ptr): Delete.
14926 (struct thread_resume_array): New.
14927 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14928 resume interface change.
14929 (linux_continue_one_thread, linux_queue_one_thread)
14930 (resume_status_pending_p): Check if the resume field is NULL
14931 instead of checking the leave_stopped member.
14932 (linux_resume): Adjust to the target resume interface change.
14933 * spu-low.c (spu_resume): Adjust to the target resume interface
14934 change.
14935 * win32-low.c (win32_detach, win32_resume): Ditto.
14936
c35fafde
PA
149372009-04-01 Pedro Alves <pedro@codesourcery.com>
14938
14939 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14940 flag.
14941 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14942 pending.
14943 (linux_continue_one_thread): Only preserve the stepping flag if
14944 there's a pending breakpoint.
14945
0a59d50b
PA
149462009-03-31 Pedro Alves <pedro@codesourcery.com>
14947
14948 * server.c (main): After the inferior having exited, call
14949 remote_close before exiting gdbserver.
14950
f04c6d38
TJB
149512009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14952
14953 Fix size of FPSCR in Power 7 processors.
14954 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14955 (PPC_FEATURE_HAS_DFP): New #define.
14956 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14957 size of the FPSCR.
14958
78e5cee6
PA
149592009-03-23 Pedro Alves <pedro@codesourcery.com>
14960
14961 * server.c (handle_query) Whitespace and formatting.
14962
1b3f6016
PA
149632009-03-22 Pedro Alves <pedro@codesourcery.com>
14964
14965 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14966 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14967 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14968 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14969 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14970 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14971 Makefile.in, configure.ac: Fix whitespace throughout.
14972 * configure: Regenerate.
14973
a07b2135
PA
149742009-03-22 Pedro Alves <pedro@codesourcery.com>
14975
14976 * inferiors.c (find_inferior): Make it safe for the callback
14977 function to delete the currently iterated inferior.
14978
67cc2626
PA
149792009-03-22 Pedro Alves <pedro@codesourcery.com>
14980
14981 * Makefile.in (linuw_low_h): Move higher.
14982 (thread-db.o): Depend on $(linux_low_h).
14983
54a0b537
PA
149842009-03-17 Pedro Alves <pedro@codesourcery.com>
14985
14986 Rename "process" to "lwp" throughout.
14987
14988 * linux-low.c (all_processes): Rename to...
14989 (all_lwps): ... this.
14990 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14991 (add_process): Rename to ...
14992 (add_lwp): ... this. Adjust.
14993 (linux_create_inferior): Adjust.
14994 (linux_attach_lwp): Adjust.
14995 (linux_attach): Adjust.
14996 (linux_kill_one_process): Rename to ...
14997 (linux_kill_one_lwp): ... this. Adjust.
14998 (linux_kill): Adjust.
14999 (linux_detach_one_process): Rename to ...
15000 (linux_detach_one_lwp): ... this. Adjust.
15001 (linux_detach): Adjust.
15002 (check_removed_breakpoint): Adjust.
15003 (status_pending_p): Adjust.
15004 (linux_wait_for_process): Rename to ...
15005 (linux_wait_for_lwp): ... this. Adjust.
15006 (linux_wait_for_event): Adjust.
15007 (send_sigstop): Adjust.
15008 (wait_for_sigstop): Adjust.
15009 (stop_all_processes): Rename to ...
15010 (stop_all_lwps): ... this.
15011 (linux_resume_one_process): Rename to ...
15012 (linux_resume_one_lwp): ... this. Adjust.
15013 (linux_set_resume_request, linux_continue_one_thread)
15014 (linux_queue_one_thread, resume_status_pending_p)
15015 (usr_store_inferior_registers, regsets_store_inferior_registers)
15016 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15017 Adjust.
15018 * linux-low.h (get_process): Rename to ...
15019 (get_lwp): ... this. Adjust.
15020 (get_thread_process): Rename to ...
15021 (get_thread_lwp): ... this. Adjust.
15022 (get_process_thread): Rename to ...
15023 (get_lwp_thread): ... this. Adjust.
15024 (struct process_info): Rename to ...
15025 (struct lwp_info): ... this.
15026 (all_processes): Rename to ...
15027 (all_lwps): ... this.
15028 * proc-service.c (ps_lgetregs): Adjust.
15029 * thread-db.c (thread_db_create_event, find_one_thread)
15030 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15031
0b16c5cf
PA
150322009-03-14 Pedro Alves <pedro@codesourcery.com>
15033
15034 * server.c (handle_query): Handle "qAttached".
15035
32de4b9d
NS
150362009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15037
15038 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15039 GPLv3, update license URL.
15040
2aecd87f
DE
150412009-03-01 Doug Evans <dje@google.com>
15042
93efd302 15043 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15044 (server_h): Add gdb_signals.h.
15045 (signals.o): Update.
15046 * server.h (target_signal_from_host,target_signal_to_host_p)
15047 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15048
86b1f9c5
PM
150492009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15050
15051 * remote-utils.c (getpkt): Also generate remote-debug
15052 information if noack_mode is set.
15053
4aa995e1
PA
150542009-02-06 Pedro Alves <pedro@codesourcery.com>
15055
15056 * server.c (handle_query): Report qXfer:siginfo:read and
15057 qXfer:siginfo:write as supported and handle them.
15058 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15059 * linux-low.c (linux_xfer_siginfo): New.
15060 (linux_target_ops): Set it.
15061
62709adf
PA
150622009-01-26 Pedro Alves <pedro@codesourcery.com>
15063
15064 * server.c (gdbserver_usage): Mention --remote-debug.
15065 (main): Accept '--remote-debug' switch.
15066
aef93bd7
DE
150672009-01-18 Doug Evans <dje@google.com>
15068
15069 * regcache.c (new_register_cache): No need to check result of xcalloc.
15070 * server.c (handle_search_memory): Back out calls to xmalloc,
15071 result is checked and error is returned to user upon failure.
15072 (handle_query): Ditto. Add more checks for result of malloc.
15073 (handle_v_cont): Check result of malloc, report error back to
15074 user upon failure.
15075 (handle_v_run): Ditto. Call freeargv.
15076 * server.h (freeargv): Declare.
15077 * utils.c (freeargv): New fn.
15078
54363045
DE
150792009-01-15 Doug Evans <dje@google.com>
15080
f626972c
DE
15081 * gdbreplay.c (perror_with_name): Make arg const char *.
15082 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15083 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15084 * utils.c (perror_with_name): Make arg const char *.
54363045 15085
18aae699
PA
150862009-01-14 Pedro Alves <pedro@codesourcery.com>
15087
15088 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15089 when handling a EXIT_PROCESS_DEBUG_EVENT.
15090
ff703abe
JB
150912009-01-06 Joel Brobecker <brobecker@adacore.com>
15092
15093 * gdbreplay.c (gdbreplay_version): Update copyright year.
15094 * server.c (gdbserver_version): Likewise.
15095
f21cc1a2 150962009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15097
15098 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15099 (handle_extended_wait): Improve comment.
0e21c1ec 15100
bca929d3
DE
151012008-12-13 Doug Evans <dje@google.com>
15102
15103 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15104 * server.h (ATTR_MALLOC): New macro.
15105 (xmalloc,xcalloc,xstrdup): Declare.
15106 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15107 * inferiors.c: Ditto.
15108 * linux-low.c: Ditto.
15109 * mem-break.c: Ditto.
15110 * regcache.c: Ditto.
15111 * remote-utils.c: Ditto.
15112 * server.c: Ditto.
15113 * target.c: Ditto.
15114 * win32-low.c: Ditto.
15115
97438e3f
DE
151162008-12-12 Doug Evans <dje@google.com>
15117
896c7fbb
DE
15118 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15119 in debugging printf.
15120
97438e3f
DE
15121 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15122
e3b886f8
DE
151232008-12-09 Doug Evans <dje@google.com>
15124
15125 * linux-low.h (struct process_info): Delete member tid, unused.
15126 * thread-db.c (find_one_thread): Update.
15127 (maybe_attach_thread): Update.
15128
07e059b5
VP
151292008-12-02 Pedro Alves <pedro@codesourcery.com>
15130
889bf7c5
PA
15131 * target.h (struct target_ops): Add qxfer_osdata member.
15132 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15133 and dirent.h.
15134 (linux_qxfer_osdata): New functions.
15135 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15136 callback.
15137 * server.c (handle_query): Handle "qXfer:osdata:read:".
15138 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15139 (buffer_xml_printf): New functions.
15140 * server.h (struct buffer): New.
15141 (buffer_grow_str, buffer_grow_str0): New macros.
15142 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15143 (buffer_xml_printf): Declare.
07e059b5 15144
4cab47ab
DE
151452008-11-24 Doug Evans <dje@google.com>
15146
15147 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15148
f142445f
DJ
151492008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15150
15151 * server.c (handle_v_run): Always use the supplied argument list.
15152
d0107bb6 151532008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15154
d0107bb6
BW
15155 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15156 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15157
2c4ad781
TJB
151582008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15159
15160 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15161 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15162 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15163 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15164 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15165 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15166 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15167 XML target descriptions.
15168 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15169 when inferior is running on an ISA 2.05 or later processor. Add
15170 special case to return offset for full 64-bit slot of FPSCR when
15171 in 32-bits.
15172
dfb64f85
DJ
151732008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15174
15175 * Makefile.in (SFILES, clean): Added sparc64 files.
15176 (reg-sparc64.o, reg-sparc64.c): New.
15177 * configure.srv (sparc*-*-linux*): New configuration.
15178 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15179 syscall arguments for SPARC.
15180 (regsets_store_inferior_registers): Likewise.
15181 * linux-sparc-low.c: New file.
15182
66b6e1dd
DE
151832008-10-21 Doug Evans <dje@google.com>
15184
15185 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15186 (READLINE_DIR,READLINE_DEP): Delete.
15187 (INTERNAL_CFLAGS): Update.
15188 (LINTFLAGS): Update.
15189
9b710a42
PA
151902008-10-10 Pedro Alves <pedro@codesourcery.com>
15191
15192 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15193 whole argv from the last run, not just argv[0].
15194
5822d809
PA
151952008-09-08 Pedro Alves <pedro@codesourcery.com>
15196
15197 * regcache.c (new_register_cache): Return NULL if the register
15198 cache size isn't known yet.
15199 (free_register_cache): Avoid dereferencing a NULL regcache.
15200
74aac56f
DJ
152012008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15202
15203 * configure.srv: Merge MIPS and MIPS64.
15204
400b20f5
MR
152052008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15206
15207 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15208
677c5bb1
LM
152092008-08-18 Luis Machado <luisgpm@br.ibm.com>
15210
15211 * Makefile.in: Add required vsx dependencies.
15212
15213 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15214 Declare init_registers_powerpc_vsx32l.
15215 Declare init_registers_powerpc_vsx64l.
15216 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15217 (ppc_arch_setup): Check for VSX in hwcap.
15218 (ppc_fill_vsxregset): New function.
15219 (ppc_store_vsxregset): New function.
15220 Add new VSX entry in regset_info target_regsets.
15221
15222 * configure.srv: Add new VSX dependencies.
15223
a6f3e723
SL
152242008-08-12 Pedro Alves <pedro@codesourcery.com>
15225
15226 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15227 (remote_open): Set or clear transport_is_reliable.
15228 (putpkt_binary): Don't expect acks in noack mode.
15229 (getpkt): Don't send ack/nac in noack mode.
15230 * server.c (handle_general_set): Handle QStartNoAckMode.
15231 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15232 qSupported.
15233 (main): Reset noack_mode on every connection.
15234 * server.h (noack_mode): Declare.
15235
a417dc56
RW
152362008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15237
15238 * Makefile.in (GDBREPLAY_OBS): New variable.
15239 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15240
3221518c
UW
152412008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15242 Daniel Jacobowitz <dan@codesourcery.com>
15243
15244 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15245 (usr_store_inferior_registers): Likewise.
15246 (regsets_store_inferior_registers): Likewise.
15247
ec56be1b
PA
152482008-07-31 Rolf Jansen <rj@surtec.com>
15249 Pedro Alves <pedro@codesourcery.com>
15250
15251 * configure.ac: Check for memmem declaration.
15252 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15253 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15254 (disable_packet_qfThreadInfo): Unconditionally compile.
15255 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15256 * configure, config.in: Regenerate.
15257
2fe5e3ff
DE
152582008-07-28 Doug Kwan <dougkwan@google.com>
15259
15260 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15261 (linux_write_memory): Remove declaration of errno.
15262
836acd6d
UW
152632008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15264
15265 * linux-low.c (handle_extended_wait): Do not use "status"
15266 variable uninitialized.
15267
aeba519e
PA
152682008-07-07 Pedro Alves <pedro@codesourcery.com>
15269
15270 * server.c (handle_v_attach): Inhibit reporting dll changes.
15271
db42f210
PA
152722008-06-27 Pedro Alves <pedro@codesourcery.com>
15273
15274 * remote-utils.c (prepare_resume_reply): If requested, don't
15275 output "thread:TID" in the T stop reply.
15276
15277 * server.c (disable_packet_vCont, disable_packet_Tthread)
15278 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15279 (handle_query): If requested, disable support for qC, qfThreadInfo
15280 and qsThreadInfo.
15281 (handle_v_requests): If requested, disable support for vCont.
15282 (gdbserver_show_disableable): New.
15283 (main): Handle --disable-packet and --disable-packet=LIST.
15284
15285 * server.h (disable_packet_vCont, disable_packet_Tthread)
15286 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15287
8e4c5421
CD
152882008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15289
15290 * server.c (gdbserver_usage): Mention --version.
15291
6e23a804
DJ
152922008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15293
15294 * Makefile.in (gdbreplay.o): New rule.
15295
90aa6a40
JM
152962008-06-06 Joseph Myers <joseph@codesourcery.com>
15297
15298 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15299 message, not gdbserver.
15300
c16158bc 153012008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15302 Nathan Sidwell <nathan@codesourcery.com>
15303 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15304
15305 * acinclude.m4: Include ../../config/acx.m4.
15306 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15307 * configure, config.in: Regenerate.
15308 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15309 * server.c (gdbserver_version): Print PKGVERSION.
15310 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15311 (main): Adjust gdbserver_usage calls.
15312 * gdbreplay.c (version, host_name): Add declarations.
15313 (gdbreplay_version, gdbreplay_usage): New.
15314 (main): Accept --version and --help options.
15315
aeb75bf5
DJ
153162008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15317
15318 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15319 (arm_breakpoint_at): Handle Thumb.
15320 (the_low_target): Add comment.
15321
76b233dd
UW
153222008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15323
15324 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15325
08388c79
DE
153262008-05-09 Doug Evans <dje@google.com>
15327
a3c83fae
DE
15328 * server.h (decode_search_memory_packet): Declare.
15329 * remote-utils.c (decode_search_memory_packet): New fn.
15330 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15331 (handle_search_memory): New fn.
15332 (handle_query): Process qSearch:memory packets.
15333
bb9c3d36
UW
153342008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15335
15336 * regcache.c (registers_length): Remove.
15337 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15338 full register packet.
15339 * regcache.h (registers_length): Remove prototype.
15340 * server.h (PBUFSIZ): Define to 16384.
15341
7284e1be
UW
153422008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15343
15344 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15345 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15346 powerpc-64l.o, and powerpc-altivec64l.o.
15347 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15348 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15349 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15350 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15351 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15352 to srv_xmlfiles.
15353
15354 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15355 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15356 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15357 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15358 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15359 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15360 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15361 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15362 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15363 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15364 (clean): Update.
15365
15366 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15367 (init_registers_powerpc_32l): ... this new prototype.
15368 (init_registers_powerpc_32): Remove, replace by ...
15369 (init_registers_powerpc_altivec32l): ... this new prototype.
15370 (init_registers_powerpc_e500): Remove, replace by ...
15371 (init_registers_powerpc_e500l): ... this new prototype.
15372 (init_registers_ppc64): Remove, replace by ...
15373 (init_registers_powerpc_64l): ... this new prototype.
15374 (init_registers_powerpc_64): Remove, replace by ...
15375 (init_registers_powerpc_altivec64l): ... this new prototype.
15376 (ppc_num_regs): Set to 73.
15377 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15378 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15379 (ppc_cannot_store_register): Handle orig_r3 and trap.
15380 (ppc_arch_setup): Update init_registers_... calls.
15381 (ppc_fill_gregset): Handle orig_r3 and trap.
15382
15383 * inferiors.c (clear_inferiors): Reset current_inferior.
15384
fdc59709
PB
153852008-04-23 Paolo Bonzini <bonzini@gnu.org>
15386
889bf7c5
PA
15387 * acinclude.m4: Add override.m4.
15388 * configure: Regenerate.
fdc59709 15389
c9b2f845
UW
153902008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15391
15392 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15393 initial call to init_register_ppc64.
15394
550512b8
UW
153952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15396
43aaf8b6
PA
15397 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15398 single powerpc*-*-linux* case.
550512b8
UW
15399 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15400
b6430ec3
UW
154012008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15402
15403 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15404 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15405 from reg_xmlfiles.
15406 * linux-ppc-low.c: Include <elf.h>.
15407 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15408 (ppc_hwcap): New global variable.
15409 (ppc_regmap): Remove __SPE__ #ifdef sections.
15410 (ppc_regmap_e500): New global variable.
15411 (ppc_cannot_store_register): Update __SPE__ special case.
15412 (ppc_get_hwcap): New function.
15413 (ppc_arch_setup): Use it to determine whether inferior supports
15414 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15415 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15416 Do not access registers if target does not support AltiVec.
15417 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15418 Do not access registers if target does not support SPE.
15419 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15420
52fa2412
UW
154212008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15422
15423 * linux-low.c (disabled_regsets, num_regsets): New.
15424 (use_regsets_p): Delete.
15425 (linux_wait_for_process): Clear disabled_regsets.
15426 (regsets_fetch_inferior_registers): Check and set it.
15427 (regsets_store_inferior_registers): Likewise.
15428 (linux_fetch_registers, linux_store_registers): Do not use
15429 use_regsets_p.
15430 (initialize_low): Allocate disabled_regsets.
15431
e28b3332
DJ
154322008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15433
15434 * Makefile.in (LIBOBJS): New.
15435 (OBS): Use LIBOBJS.
15436 (memmem.o): New rule.
15437 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15438 * configure: Regenerated.
15439
4536995d
UW
154402008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15441
15442 * server.c (handle_query): Never return "unsupported" for
15443 qXfer:features:read queries.
15444
221c031f
UW
154452008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15446
15447 * server.c (get_features_xml): Fix inverted condition.
15448 (handle_query): Always support qXfer:feature:read.
15449
ccd213ac
DJ
154502008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15451
15452 * server.c (wrapper_argv): New.
15453 (start_inferior): Handle wrapper_argv. If set, expect an extra
15454 trap.
15455 (gdbserver_usage): Document --wrapper.
15456 (main): Parse --wrapper.
15457
6fe305f7
UW
154582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15459
15460 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15461 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15462 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15463 (ppc_set_pc): Likewise.
15464 (ppc_arch_setup): New function.
15465 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15466 of collect_register.
889bf7c5 15467 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15468
5b0a002e
UW
154692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15470
15471 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15472 instead of linux-ppc64-low.o.
15473 * linux-ppc64-low.c: Remove file.
15474 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15475 (linux-ppc64-low.o): Remove rule.
15476
15477 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15478 (init_registers_powerpc_64): Likewise.
15479 (ppc_regmap): Conditionally define depending on __powerpc64__.
15480 (ppc_cannot_store_register): Do not special-case "fpscr" when
15481 compiled on __powerpc64__.
15482 (ppc_collect_ptrace_register): New function.
15483 (ppc_supply_ptrace_register): New function.
15484 (ppc_breakpoint): Change type to "unsigned int".
15485 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15486 (the_low_target): Conditionally provide initializers for the
889bf7c5 15487 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15488 collect_ptrace_register and supply_ptrace_register members.
15489
9b4b61c8
UW
154902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15491
15492 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15493 * server.c (gdbserver_xmltarget): Define.
15494 (get_features_xml): Use it to replace "target.xml" and arch_string.
15495
15496 * configure.srv: Remove srv_xmltarget. Add XML files that were
15497 mentioned there to srv_xmlfiles instead. Remove conditional tests
15498 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15499 srv_xmlfiles and srv_regobj to include all possible choices.
15500 * configure.ac (srv_xmltarget): Remove.
15501 (srv_xmlfiles): Do not add "target.xml".
15502 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15503 checks for supplementary target information.
15504 * configure: Regenerate.
15505 * Makefile.in (XML_TARGET): Remove.
15506 (target.xml): Remove rule.
15507 (clean): Do not clean up target.xml.
15508 (.PRECIOUS): Do not mention target.xml.
15509
15510 * target.h (struct target_ops): Remove arch_string member.
15511 * linux-low.c (linux_arch_string): Remove.
15512 (linux_target_ops): Remove arch_string initializer.
15513 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15514 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15515 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15516 * spu-low.c (spu_arch_string): Remove.
15517 (spu_target_ops): Remove arch_string initializer.
15518 * win32-low.c (win32_arch_string): Remove.
15519 (win32_target_ops): Remove arch_string initializer.
15520 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15521 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15522 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15523
ee1a7ae4
UW
155242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15525
15526 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15527 by collect_ptrace_register and supply_ptrace_register hooks.
15528 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15529 instead of checking for the_low_target.left_pad_xfer.
15530 (usr_store_inferior_registers): Use collect_ptrace_register callback
15531 instead of checking for the_low_target.left_pad_xfer.
15532
15533 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15534 (s390_supply_ptrace_register): Likewise.
15535 (s390_fill_gregset): Call s390_collect_ptrace_register.
15536 (the_low_target): Update.
15537
15538 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15539 (ppc_supply_ptrace_register): Likewise.
15540 (the_low_target): Update.
15541
15542 * linux-i386-low.c (the_low_target): Update.
15543 * linux-x86-64-low.c (the_low_target): Update.
15544
d61ddec4
UW
155452008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15546
15547 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15548 reg-s390.o and reg-s390x.o.
15549
15550 * linux-low.c (new_inferior): New global variable.
15551 (linux_create_inferior, linux_attach): Set it.
15552 (linux_wait_for_process): Call the_low_target.arch_setup after the
15553 target has stopped for the first time.
15554 (initialize_low): Do not call the_low_target.arch_setup.
15555
15556 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15557 (s390_set_pc): Likewise.
15558 (s390_arch_setup): New function.
15559 (the_low_target): Use s390_arch_setup as arch_setup routine.
15560
15561 * regcache.c (realloc_register_cache): New function.
15562 (set_register_cache): Call it for each existing regcache.
15563
d05b4ac3
UW
155642008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15565
15566 * server.h (init_registers): Remove prototype.
15567
15568 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15569 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15570 instead of init_registers ().
15571 * linux-arm-low.c (init_registers_arm): Add prototype.
15572 (init_registers_arm_with_iwmmxt): Likewise.
15573 (the_low_target): Add initializer for arch_setup field.
15574 * linux-cris-low.c (init_registers_cris): Add prototype.
15575 (the_low_target): Add initializer for arch_setup field.
15576 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15577 (the_low_target): Add initializer for arch_setup field.
15578 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15579 (the_low_target): Add initializer for arch_setup field.
15580 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15581 (the_low_target): Add initializer for arch_setup field.
15582 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15583 (the_low_target): Add initializer for arch_setup field.
15584 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15585 (the_low_target): Add initializer for arch_setup field.
15586 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15587 (init_registers_mips64_linux): Likewise.
15588 (the_low_target): Add initializer for arch_setup field.
15589 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15590 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15591 (the_low_target): Add initializer for arch_setup field.
15592 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15593 (init_registers_powerpc_64): Likewise.
15594 (the_low_target): Add initializer for arch_setup field.
15595 * linux-s390-low.c (init_registers_s390): Add prototype.
15596 (init_registers_s390x): Likewise.
15597 (the_low_target): Add initializer for arch_setup field.
15598 * linux-sh-low.c (init_registers_sh): Add prototype.
15599 (the_low_target): Add initializer for arch_setup field.
15600 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15601 (the_low_target): Add initializer for arch_setup field.
15602 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15603 (the_low_target): Add initializer for arch_setup field.
15604
15605 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15606 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15607 instead of init_registers ().
15608 * win32-arm-low.c (init_registers_arm): Add prototype.
15609 (the_low_target): Add initializer for arch_setup field.
15610 * win32-i386-low.c (init_registers_i386): Add prototype.
15611 (the_low_target): Add initializer for arch_setup field.
15612
15613 * spu-low.c (init_registers_spu): Add prototype.
15614 (initialize_low): Call initialie_registers_spu () instead of
15615 initialize_registers ().
15616
fd96d250
PA
156172008-02-19 Pedro Alves <pedro@codesourcery.com>
15618
15619 * server.c (handle_v_requests): When handling the vRun and vAttach
15620 packets, if already debugging a process, don't kill it. Return an
15621 error instead.
15622
d41b6bb4
DJ
156232008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15624
15625 * server.c (handle_query): Correct length check.
15626
5ac588cf
PA
156272008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15628
15629 * win32-low.c (do_initial_child_stuff): Add process handle
15630 parameter. Set current_process_handle and current_process_id from the
15631 parameters. Clear globals.
15632 (win32_create_inferior): Don't set current_process_handle and
15633 current_process_id here. Instead pass them on the call to
15634 do_initial_child_stuff.
15635 (win32_attach): Likewise.
15636 (win32_clear_inferiors): New.
15637 (win32_kill): Don't close the current process handle or the
15638 current thread handle here. Instead call win32_clear_inferiors.
15639 (win32_detach): Don't open a new handle to the process. Call
15640 win32_clear_inferiors.
15641 (win32_join): Don't rely on current_process_handle; open a new
15642 handle using the process id.
15643 (win32_wait): Call win32_clear_inferiors when the inferior process
15644 has exited.
15645
ecd7ecbc
DJ
156462008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15647
15648 * server.c (monitor_show_help): Add "exit".
15649
1525d545
MG
156502008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15651
ecd7ecbc 15652 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15653 (clean): Add reg-xtensa.c.
15654 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15655 * configure.srv (xtensa*-*-linux*) New target.
15656 * linux-xtensa-low.c: New.
15657 * xtensa-xtregs.c: New.
1525d545 15658
59a016f0
PA
156592008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15660
15661 * hostio.c: Don't include errno.h.
15662 (errno_to_fileio_errno): Move to hostio-errno.
15663 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15664 error number outputting to the target->hostio_last_error callback.
15665 (hostio_packet_error): Use FILEIO_EINVAL directly.
15666 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15667 calls to hostio_error.
15668 * hostio-errno.c: New.
15669 * server.h (hostio_last_error_from_errno): Declare.
15670 * target.h (target_ops): Add hostio_last_error member.
15671 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15672 as hostio_last_error handler.
889bf7c5 15673 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15674 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15675 (wince_hostio_last_error): New functions.
15676 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15677 as hostio_last_error handler.
15678 (win32_target_ops) [!_WIN32_WCE]: Register
15679 hostio_last_error_from_errno as hostio_last_error handler.
15680 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15681 (hostio-errno.o): New rule.
15682 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15683 * configure.srv (srv_hostio_err_objs): New variable. Default to
15684 hostio-errno.o.
15685 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15686 * configure: Regenerate.
15687
2d717e4f
DJ
156882008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15689
15690 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15691 (linux_kill, linux_detach): Clean up the process list.
15692 * remote-utils.c (remote_open): Improve port number parsing.
15693 (putpkt_binary, input_interrupt): Only send interrupts if the target
15694 is running.
15695 * server.c (extended_protocol): Make static.
15696 (attached): Define earlier.
15697 (exit_requested, response_needed, program_argv): New variables.
15698 (target_running): New.
15699 (start_inferior): Clear attached here.
15700 (attach_inferior): Set attached here.
15701 (require_running): Define.
15702 (handle_query): Use require_running and target_running. Implement
15703 "monitor exit".
15704 (handle_v_attach, handle_v_run): New.
15705 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15706 (gdbserver_usage): Update.
15707 (main): Redo argument parsing. Handle --debug and --multi. Handle
15708 --attach along with other options or after the port. Save
15709 program_argv. Support no initial program. Resynchronize
15710 communication with GDB after an error. Handle "monitor exit".
15711 Use require_running and target_running. Always allow the extended
15712 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15713 restart in extended mode.
15714 * README: Refer to the GDB manual. Update --attach usage.
15715
7407e2de
AS
157162007-12-20 Andreas Schwab <schwab@suse.de>
15717
15718 * linux-low.c (STACK_SIZE): Define.
15719 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15720 (linux_test_for_tracefork): Likewise.
15721
b65d95c5
DJ
157222007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15723
15724 * linux-low.c (linux_wait_for_event): Update messages. Do not
15725 reinsert auto-delete breakpoints.
15726 * mem-break.c (struct breakpoint): Change return type of handler to
15727 int.
15728 (set_breakpoint_at): Update handler type.
15729 (reinsert_breakpoint_handler): Return 1 instead of calling
15730 delete_breakpoint.
15731 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15732 setting a new one.
15733 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15734 * mem-break.h (set_breakpoint_at): Update handler type.
15735 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15736 * win32-low.c (auto_delete_breakpoint): New.
15737 (get_child_debug_event): Use it.
15738
4e799345
DJ
157392007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15740
15741 * configure.ac: Check for pread and pwrite.
15742 * hostio.c (handle_pread): Fall back to lseek and read.
15743 (handle_pwrite): Fall back to lseek and write.
15744 * config.in, configure: Regenerated.
15745
27524b67
DJ
157462007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15747
15748 * server.c (myresume): Add own_buf argument.
15749 (main): Update calls.
15750
a20d5e98
DJ
157512007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15752
15753 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15754 * remote-utils.c (remote_open): Do not call disable_async_io.
15755 (block_async_io): Delete.
15756 (unblock_async_io): Make static.
15757 (initialize_async_io): New.
15758 * server.c (handle_v_cont): Handle async I/O here.
15759 (myresume): Likewise. Move other common resume tasks here...
15760 (main): ... from here. Call initialize_async_io. Disable async
15761 I/O before the main loop.
15762 * server.h (initialize_async_io): Declare.
15763 (block_async_io, unblock_async_io): Delete prototypes.
15764 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15765
b79d787e
DJ
157662007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15767
15768 * remote-utils.c (readchar): Allow binary data in received messages.
15769
d97903b2
PA
157702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15771
15772 * win32-low.c (attaching): New global.
15773 (win32_create_inferior): Clear the `attaching' global.
15774 (win32_attach): Set the `attaching' global.
15775 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15776 attaching. Only set a breakpoint at the entry point if not
15777 attaching.
15778
311de423
PA
157792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15780
15781 * server.c (main): Don't report dll events on the initial
15782 connection on attaches.
15783
6c2d16d2
PA
157842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15785
15786 * server.c (main): Relax numerical bases supported for the pid of
15787 the --attach command line argument.
15788
5ca906e6
PA
157892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15790
15791 * win32-low.c (win32_attach): Call OpenProcess before
15792 DebugActiveProcess, not after. Add last error output to error
15793 call.
15794
9c6c8194
PA
157952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15796
15797 * win32-low.c (win32_get_thread_context)
15798 (win32_set_thread_context): New functions.
15799 (thread_rec): Use win32_get_thread_context.
15800 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15801 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15802 field.
15803
4d5d1aaa
PA
158042007-12-03 Leo Zayas
15805 Pedro Alves <pedro_alves@portugalmail.pt>
15806
15807 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15808 global variables.
15809 (child_add_thread): Minor cleanup.
15810 (child_continue): Resume artificially suspended threads before
15811 calling ContinueDebugEvent.
15812 (suspend_one_thread): New.
15813 (fake_breakpoint_event): New.
15814 (get_child_debug_event): Change return type to int. Check here if
15815 gdb sent an interrupt request. If a soft interrupt was requested,
15816 fake a breakpoint event. Return 0 if there is no event to handle,
15817 and 1 otherwise.
15818 (win32_wait): Don't check here if gdb sent an interrupt request.
15819 Ensure there is a valid event to handle.
15820 (win32_request_interrupt): Add soft interruption method as last
15821 resort.
15822
c436e841
PA
158232007-12-03 Leo Zayas
15824 Pedro Alves <pedro_alves@portugalmail.pt>
15825
15826 * win32-low.h (win32_thread_info): Add descriptions to the
15827 structure members. Replace `suspend_count' counter by a
15828 `suspended' flag.
15829 * win32-low.c (thread_rec): Update condition of when to get the
15830 context from the inferior. Rely on ContextFlags being set if it
15831 has already been retrieved. Only suspend the inferior thread if
15832 we haven't already. Warn if that fails.
15833 (continue_one_thread): s/suspend_count/suspended/. Only call
15834 ResumeThread once. Warn if that fails.
15835
e7b5fa67
PA
158362007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15837
15838 * win32-low.c (win32_wait): Don't read from the inferior when it
15839 has already exited.
15840
a385171d
PA
158412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15842
15843 * Makefile.in (win32_low_h): New variable.
15844 (win32-low.o): Add dependency on $(win32_low_h).
15845 (win32-arm-low.o, win32-i386-low.o): New rules.
15846
f80c84b3
DJ
158472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15848
15849 * hostio.c: Correct copyright year.
15850
a6b151f1
DJ
158512007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15852
15853 * Makefile.in (OBS): Add hostio.o.
15854 (hostio.o): New rule.
15855 * server.h (handle_vFile): Declare.
15856 * hostio.c: New file.
15857 * server.c (handle_v_requests): Take packet_len and new_packet_len
15858 for binary packets. Call handle_vFile.
15859 (main): Update call to handle_v_requests.
15860
f9387fc3
DJ
158612007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15862
15863 * linux-low.c: Include <sched.h>.
15864
51c2684e
DJ
158652007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15866
15867 * linux-low.c (linux_tracefork_grandchild): New.
15868 (linux_tracefork_child): Use clone.
15869 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15870
75f83163
JB
158712007-10-31 Joel Brobecker <brobecker@adacore.com>
15872
15873 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15874
da5898ce
DJ
158752007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15876
15877 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15878
24a09b5f
DJ
158792007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15880
15881 * inferiors.c (change_inferior_id): Delete.
15882 (add_pid_to_list, pull_pid_from_list): New.
15883 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15884 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15885 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15886 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15887 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15888 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15889 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15890 (using_threads): Always set to 1.
15891 (handle_extended_wait): New.
15892 (add_process): Do not set TID.
15893 (linux_create_inferior): Set must_set_ptrace_flags.
15894 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15895 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15896 (linux_thread_alive): Rename TID argument to LWPID.
15897 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15898 (linux_wait_for_event): Do not use TID or check using_threads. Update
15899 call to dead_thread_notify. Call handle_extended_wait.
15900 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15901 (send_sigstop): Delete sigstop_sent.
15902 (wait_for_sigstop): Avoid TID.
15903 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15904 (linux_test_for_tracefork): New.
15905 (linux_lookup_signals): Use thread_db_active and
15906 linux_supports_tracefork_flag.
15907 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15908 * linux-low.h (get_process_thread): Avoid TID.
15909 (struct process_ifo): Move thread_known and tid to the end. Remove
15910 sigstop_sent.
15911 (linux_attach_lwp, thread_db_init): Update prototypes.
15912 * server.h (change_inferior_id): Delete prototype.
15913 (add_pid_to_list, pull_pid_from_list): New prototypes.
15914 * thread-db.c (thread_db_use_events): New.
15915 (find_first_thread): Rename to...
15916 (find_one_thread): ...this. Update callers and messages. Do not
15917 call fatal. Check thread_db_use_events. Do not call
15918 change_inferior_id or new_thread_notify.
15919 (maybe_attach_thread): Update. Do not call new_thread_notify.
15920 (thread_db_init): Set thread_db_use_events. Check use_events.
15921 * utils.c (fatal, warning): Correct message prefix.
15922
30ed0a8f
DJ
159232007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15924
15925 * Makefile.in (clean): Remove new files.
15926 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15927 (powerpc-64.o, powerpc-64.c): New rules.
15928 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15929 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15930 with SPE.
15931 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15932 SPE targets.
15933 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15934 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15935 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15936 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15937 (target_regsets): Add AltiVec and SPE register sets.
15938 * configure.ac: Check for AltiVec and SPE.
15939 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15940 (ppc_fill_vrregset, ppc_store_vrregset): New.
15941 (target_regsets): Add AltiVec register set.
15942 * configure: Regenerated.
15943
fd462a61
DJ
159442007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15945
15946 * linux-low.c (O_LARGEFILE): Define.
15947 (linux_read_memory): Use /proc/PID/mem.
15948 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15949 * configure, config.in: Regenerated.
15950
69f223ed
DJ
159512007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15952
15953 * linux-low.c (linux_wait_for_event): Do not pass signals while
15954 single-stepping.
15955
aec18585
PA
159562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15957
15958 * win32-low.c (create_process): New.
15959 (win32_create_inferior): Use create_process instead of
15960 CreateProcess. If create_process failed retry appending an ".exe"
15961 suffix. Store the GetLastError result immediatelly after
15962 create_process calls and use it on the call to error.
15963
34d86ddd
PA
159642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15965
15966 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15967
5a0e3bd0
JB
159682007-08-23 Joel Brobecker <brobecker@adacore.com>
15969
15970 * configure.ac: Switch license to GPLv3.
15971
f88c79e6
MS
159722007-08-01 Michael Snyder <msnyder@access-company.com>
15973
15974 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15975
6b3d9b83
PA
159762007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15977
15978 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15979 typedef.
15980 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15981 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15982 CloseToolhelp32Snapshot.
15983 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15984 CloseToolhelp32Snapshot.
15985
c588c53c
MS
159862007-07-27 Michael Snyder <michael.snyder@access-company.com>
15987
15988 * server.c (main): Check for inferior exit before main loop.
15989
aa0403d9
PA
159902007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15991
15992 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15993 instead of on tmp_desc.
15994
255e7678
DJ
159952007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15996 Daniel Jacobowitz <dan@codesourcery.com>
15997
15998 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15999 (add_thread): Minor cleanups.
16000 (clear_inferiors): Move lower in the file. Clear the DLL
16001 list.
16002 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16003 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16004 (xml_escape_text): New.
16005 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16006 for qSupported.
16007 (handle_v_cont): Report errors.
16008 (gdbserver_version): Update.
16009 (main): Correct size of own_buf. Do not report initial DLL events.
16010 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16011 (unloaded_dll, xml_escape_text): New.
16012 * win32-low.c (enum target_waitkind): Update comments.
16013 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16014 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16015 (win32_EnumProcessModules, win32_GetModuleInformation)
16016 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16017 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16018 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16019 (win32_Module32First, win32_Module32Next, load_toolhelp)
16020 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16021 (get_child_debug_event): Handle DLL events.
16022 (win32_wait): Likewise.
16023
0d37add9
DJ
160242007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16025
16026 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16027 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16028
45e2715e
PA
160292007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16030
16031 * win32-low.c (handle_output_debug_string): Ignore event if not
16032 waiting.
16033
c5674cf1
PA
160342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16035
16036 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16037
2bbe3cc1
DJ
160382007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16039
16040 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16041
ae13219e
DJ
160422007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16043
16044 * inferiors.c (change_inferior_id): Add comment.
16045 * linux-low.c (check_removed_breakpoint): Add an early
16046 prototype. Improve debug output.
16047 (linux_attach): Doc update.
16048 (linux_detach_one_process, linux_detach): Clean up before releasing
16049 each process.
16050 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16051 * linux-low.h (struct process_info): Doc improvement.
16052 * mem-break.c (delete_all_breakpoints): New.
16053 * mem-break.h (delete_all_breakpoints): New prototype.
16054 * thread-db.c (find_first_thread): New.
16055 (thread_db_create_event): Call it instead of
16056 thread_db_find_new_threads. Clean up unused variables.
16057 (maybe_attach_thread): Remove first thread handling.
16058 (thread_db_find_new_threads): Use find_first_thread.
16059 (thread_db_get_tls_address): Likewise.
16060
4105de34
DJ
160612007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16062
16063 * thread-db.c (thread_db_find_new_threads): Add prototype.
16064 (thread_db_create_event): Check for the main thread before adding
16065 a new thread.
16066 (maybe_attach_thread): Only enable event reporting if TID == 0.
16067 (thread_db_get_tls_address): Check for new threads.
16068
2b876972
DJ
160692007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16070
16071 * linux-low.c (linux_create_inferior): Try execv before execvp.
16072 * spu-low.c (spu_create_inferior): Likewise.
16073
7a245884
DJ
160742007-06-13 Mike Frysinger <vapier@gentoo.org>
16075
16076 * linux-low.c (linux_create_inferior): Change execv to execvp.
16077 * spu-low.c (spu_create_inferior): Likewies.
16078
117ce543
DJ
160792007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16080
16081 * Makefile.in (clean): Clean new files instead of deleted ones.
16082 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16083 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16084 rules.
16085 * configure.srv: Specify XML files and new regformats for MIPS and
16086 MIPS64 GNU/Linux.
16087 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16088 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16089 an entry for the restart register.
16090 (mips_cannot_fetch_register, mips_cannot_store_register)
16091 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16092 register names to match the XML descriptions.
16093 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16094 restart register instead of $0.
16095
0e7f50da
UW
160962007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16097 Markus Deuling <deuling@de.ibm.com>
16098
16099 * remote-utils.c (decode_xfer_write): New function.
16100 * server.h (decode_xfer_write): Add prototype.
16101 * server.c (handle_query): Add PACKET_LEN argument. Support
16102 qXfer:spu:read and qXfer:spu:write packets.
16103 (main): Pass packet_len to handle_query.
16104 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16105 * target.h (target_ops): Add qxfer_spu.
16106
374c1d38
UW
161072007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16108
16109 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16110 accessing non-seekable spufs files.
16111
bb63802a
UW
161122007-05-16 Markus Deuling <deuling@de.ibm.com>
16113
889bf7c5 16114 * server.c (handle_query): Add reply for qC packet.
bb63802a 16115
7390519e
PA
161162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16117 Leo Zayas <lerele@champenstudios@com>
16118
16119 * server.h (check_remote_input_interrupt_request): New function.
16120 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16121 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16122 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16123 (check_remote_input_interrupt_request): New function.
16124 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16125 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16126 winapi_GenerateConsoleCtrlEvent): New typedefs.
16127 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16128 to 250 ms.
16129 (win32_wait): Check for remote interrupt request
16130 with check_remote_input_interrupt_request.
16131 (win32_request_interrupt): New function.
16132 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16133
34b34921
PA
161342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16135
16136 * win32-low.c (debug_registers_changed,
16137 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16138 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16139 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16140 (thread_rec): Get context using the low target.
16141 (child_add_thread): Call thread_added on the low target,
16142 which does the same thing.
16143 (regptr): Delete.
16144 (do_initial_child_stuff): Remove debug registers references.
16145 Set context using the low target. Resume threads after
16146 setting the contexts.
16147 (child_continue): Remove dead variable. Remove debug
16148 registers references.
16149 (child_fetch_inferior_registers): Go through the low target.
16150 (do_child_store_inferior_registers): Remove.
16151 (child_store_inferior_registers): Go through the low target.
16152 (win32_resume): Remove debug registers references.
16153 Set context using the low target.
16154 (handle_exception): Change return type to void. Don't record
16155 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16156 first chance exception.
889bf7c5 16157 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16158 goto loop. Always return after waiting for debug event.
16159 (win32_wait): Convert to switch statement. Handle spurious
16160 events.
16161
16162 * win32-i386-low.c (debug_registers_changed,
16163 debug_registers_used): New.
16164 (initial_stuff): Rename to ...
16165 (i386_initial_stuff): ... this. Clear debug registers
16166 state variables.
16167 (store_debug_registers): Delete.
16168 (i386_get_thread_context): New.
16169 (load_debug_registers): Delete.
16170 (i386_set_thread_context): New.
16171 (i386_thread_added): New.
16172 (single_step): Rename to ...
16173 (i386_single_step): ... this.
16174 (do_fetch_inferior_registers): Rename to ...
16175 (i386_fetch_inferior_register): ... this.
16176 (i386_store_inferior_register): New.
16177 (the_low_target): Adapt to new interface.
16178
16179 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16180 (arm_get_thread_context): New.
16181 (arm_set_thread_context): New.
16182 (regptr): New.
16183 (do_fetch_inferior_registers): Rename to ...
16184 (arm_fetch_inferior_register): ... this.
16185 (arm_store_inferior_register): New.
16186 (arm_wince_breakpoint): Reimplement as unsigned long.
16187 (arm_wince_breakpoint_len): Define.
16188 (the_low_target): Adapt to new interface.
16189
16190 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16191 load_debug_registers. Add get_thread_context, set_thread_context,
16192 thread_added and store_inferior_register. Rename
16193 fetch_inferior_registers to fetch_inferior_register.
16194 (regptr): Remove declaration.
16195
dd6953e1
PA
161962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16197
16198 * linux-low.c (linux_detach): Change return type to int. Return 0.
16199 * spu-low.c (spu_detach): Likewise.
16200
444d6139
PA
162012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16202
16203 * target.h (target_ops): Change return type of detach to int.
16204 Add join.
16205 (join_inferior): New.
16206 * server.c (main): Don't skip detach support on mingw32.
16207 If the inferior doesn't support detaching return error.
16208 Call join_inferior instead of using waitpid.
16209 * linux-low.c (linux_join): New.
16210 (linux_target_op): Add linux_join.
16211 * spu-low.c (spu_join): New.
16212 (spu_target_ops): Add spu_join.
16213 * win32-low.c (win32_detach): Adapt to new interface.
16214 Reopen current_process_handle before detaching. Issue a child
16215 resume before detaching.
16216 (win32_join): New.
16217 (win32_target_op): Add win32_join.
16218
1d5315fe
PA
162192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16220
16221 * win32-low.c (win32-attach): Fix return value.
16222 * target.h (target_ops): Describe ATTACH return values.
16223
bf914831
PA
162242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16225
16226 * win32-low.c (GETPROCADDRESS): Define.
16227 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16228 (winapi_DebugSetProcessKillOnExit): Likewise.
16229 (win32_create_inferior): Force usage of ansi CreateProcessA.
16230 (win32_attach): Use GETPROCADDRESS.
16231 (win32_detach): Likewise.
16232
f72f3e60
PA
162332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16234
16235 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16236
ed50f18f
PA
162372007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16238
16239 * win32-low.c: Commit leftover changes from 2007-03-29.
16240
0c2ead7e
DJ
162412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16242
16243 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16244 fields short instead of int. Add explicit padding.
16245 (i387_cache_to_fsave): Remove unnecessary casts.
16246 (i387_fsave_to_cache): Doc fix.
16247 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16248
73725ff3
DJ
162492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16250
16251 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16252 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16253
d99f33d8
PA
162542007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16255
16256 * configure.srv (arm*-*-mingw32ce*): Move near the other
16257 arm targets.
16258
68070c10
PA
162592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16260
2482afc6 16261 * configure.ac: Add errno checking.
68070c10
PA
16262 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16263 sys/file.h and malloc.h.
16264 (AC_CHECK_DECLS): Add perror.
16265 (srv_mingwce): Handle.
2482afc6 16266 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16267 win32-i386-low.o to srv_tgtobj.
16268 (i[34567]86-*-mingw*): Likewise.
16269 (arm*-*-mingw32ce*): Add case.
16270 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16271 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16272 [__MINGW32CE__] (strerror): New function.
16273 [__MINGW32CE__] (errno): Define to GetLastError.
16274 [__MINGW32CE__] (COUNTOF): New macro.
16275 (remote_open): Remove extra close call.
16276 * mem-break.c (delete_breakpoint_at): New function.
16277 * mem-break.h (delete_breakpoint_at): Declare.
16278 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16279 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16280 [USE_WIN32API] (read, write): Add char* casts.
16281 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16282 * server.h: Include wincecompat.h on Windows CE.
16283 [HAVE_ERRNO_H]: Check.
16284 (perror): Declare if not declared.
16285 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16286 (perror_with_name): Remove errno declaration.
16287 * wincecompat.h: New.
16288 * wincecompat.c: New.
16289 * win32-low.h: New.
16290 * win32-arm-low.c: New.
16291 * win32-i386-low.c: New.
16292 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16293 (OUTMSG2): Make it safe.
16294 (_T): New macro.
16295 (COUNTOF): New macro.
16296 (NUM_REGS): Get it from the low target.
16297 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16298 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16299 (thread_rec): Let low target handle debug registers.
16300 (child_add_thread): Likewise.
16301 (child_init_thread_list): Likewise.
16302 (continue_one_thread): Likewise.
16303 (regptr): New.
16304 (do_child_fetch_inferior_registers): Move to ...
16305 * win32-i386-low.c: ... here, and rename to ...
16306 (do_fetch_inferior_registers): ... this.
889bf7c5 16307 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16308 Go through the low target.
16309 (do_child_store_inferior_registers): Use regptr.
16310 (strwinerror): New function.
16311 (win32_create_inferior): Handle Windows CE.
16312 Use strwinerror instead of strerror on Windows error
16313 codes. Add program to the error output.
16314 Don't close the main thread handle on Windows CE.
16315 (win32_attach): Use coredll.dll on Windows CE.
16316 (win32_kill): Close current process and current
16317 thread handles.
16318 (win32_detach): Use coredll.dll on Windows CE.
16319 (win32_resume): Let low target handle debug registers, and
16320 step request.
16321 (handle_exception): Add/Remove initial breakpoint. Avoid
16322 non-existant WSTOPSIG on Windows CE.
16323 (win32_read_inferior_memory): Cast to remove warning.
16324 (win32_arch_string): Go through the low target.
16325 (initialize_low): Call set_breakpoint_data with the low
16326 target's breakpoint.
16327 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16328 FOP_REGNUM, mappings): Move to ...
16329 * win32-i386-low.c: ... here.
16330 * win32-low.c (win32_thread_info): Move to ...
16331 * win32-low.h: ... here.
16332 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16333 win32-arm-low.c and wincecompat.c.
16334 (all:): Add $EXEEXT.
16335 (install-only:): Likewise.
16336 (gdbserver:): Likewise.
16337 (gdbreplay:): Likewise.
16338 * config.in: Regenerate.
16339 * configure: Regenerate.
16340
41093d81
PA
163412007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16342
16343 * win32-low.c: Rename typedef thread_info to
16344 win32_thread_info throughout.
16345
544afa54
PA
163462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16347
16348 * win32-i386-low.c: Rename to ...
16349 * win32-low.c: ... this.
16350 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16351 * Makefile.in: Likewise.
16352
bce7165d
PA
163532007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16354
16355 * remote-utils.c (monitor_output): Constify msg parameter.
16356 * server.h (monitor_output): Likewise.
16357 * win32-i386-low.c (handle_output_debug_string): New.
16358 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16359 handle_output_debug_string.
16360 (get_child_debug_event): Likewise.
16361
506c7aa0
DJ
163622007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16363
16364 * server.c (main): Correct strtoul check.
16365
42c81e2a
DJ
163662007-03-27 Jon Ringle <jon@ringle.org>
16367
16368 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16369
9453113a
DJ
163702007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16371
16372 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16373
64a69107
DJ
163742007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16375
16376 * terminal.h: Check HAVE_SGTTY_H.
16377
163782007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16379
16380 * remote-utils.c (remote_open): Print out the assigned port number.
16381
c74d0ad8
DJ
163822007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16383
16384 * remote-utils.c (monitor_output): New function.
16385 * server.c (debug_threads): Define here.
16386 (monitor_show_help): New function.
16387 (handle_query): Handle qRcmd.
16388 (main): Do not handle 'd' packet.
16389 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16390 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16391 of debug_threads.
16392
de7c3b4a
PA
163932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16394
16395 * Makefile.in (EXEEXT): New.
16396 (clean): Use $(EXEEXT).
16397
ef57601b
PA
163982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16399
16400 * target.h (target_ops): Rename send_signal to request_interrupt,
16401 and remove enum target_signal parameter.
16402 * linux-low.c (linux_request_interrupt): Rename from
16403 linux_send_signal, and always send SIGINT.
16404 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16405 and always send SIGINT.
16406 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16407 of send_signal.
16408 (input_interrupt): Likewise.
16409
820f2bda
PA
164102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16411
16412 * server.c (get_features_xml): Check if target implemented
16413 arch_string.
16414 * win32-i386-low.c (win32_arch_string): New.
16415 (win32_target_ops): Add win32_arch_string as arch_string member.
16416
ab39bf24
UW
164172007-02-22 Markus Deuling <deuling@de.ibm.com>
16418
16419 * spu-low.c (spu_arch_string): New.
16420 (spu_target_ops): Add spu_arch_string.
16421
61ff6e04
DJ
164222007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16423
16424 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16425 * configure.ac: Do not check for terminal.h.
16426 * configure, config.in: Regenerated.
16427
fb1e4ffc
DJ
164282007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16429
16430 * Makefile.in (OBS): Add $(XML_BUILTIN).
16431 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16432 (clean): Update.
16433 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16434 (arm-with-iwmmxt.c): New.
16435 * config.in, configure: Regenerate.
16436 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16437 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16438 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16439 (arm*-*-linux*): Add iWMMXt and regset support.
16440 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16441 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16442 (arm_store_wmmxregset, target_regsets): New.
16443 * server.c (get_features_xml): Take annex argument. Check builtin
16444 XML documents.
16445 (handle_query): Handle multiple annexes.
16446
0f48aa01
DJ
164472007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16448
16449 * remote-utils.c [USE_WIN32API] (read, write): Define.
16450 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16451 write.
16452
23181151
DJ
164532007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16454
16455 * linux-i386-low.c (the_low_target): Set arch_string.
16456 * linux-x86-64-low.c (the_low_target): Likewise.
16457 * linux-low.c (linux_arch_string): New.
16458 (linux_target_ops): Add it.
16459 * linux-low.h (struct linux_target_ops): Add arch_string.
16460 * server.c (write_qxfer_response): Use const void * for DATA.
16461 (get_features_xml): New.
16462 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16463 * target.h (struct target_ops): Add arch_string method.
16464
9d606399
DJ
164652007-01-03 Denis Pilat <denis.pilat@st.com>
16466 Daniel Jacobowitz <dan@codesourcery.com>
16467
16468 * linux-low.c (linux_kill): Handle being called with no threads.
16469 * win32-i386-low.c (win32_kill): Likewise.
16470 (get_child_debug_event): Clear current_process_handle.
16471
164722006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16473 Daniel Jacobowitz <dan@codesourcery.com>
16474
16475 * remote-utils.c (remote_open): Check the type of specified
16476 serial port devices before opening them.
16477 * server.c (main): Kill the inferior if an error occurs during
16478 the first remote_open.
16479
a5e13d24
DJ
164802006-12-05 Markus Deuling <deuling@de.ibm.com>
16481
16482 * README: Update supported targets.
16483
186947f7
DJ
164842006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16485
16486 * Makefile.in (clean): Remove reg-mips64.c.
16487 (reg-mips64.c, reg-mips64.o): New rules.
16488 * configure.srv: Handle mips64. Include regset support for mips.
16489 * linux-mips-low.c (union mips_register): New.
16490 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16491 (mips_breakpoint, mips_breakpoint_at): Use int.
16492 (mips_collect_register, mips_supply_register)
16493 (mips_collect_register_32bit, mips_supply_register_32bit)
16494 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16495 (mips_store_fpregset, target_regsets): New.
16496 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16497
a13e2c95
UW
164982006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16499
16500 * configure.srv: Add target "spu*-*-*".
16501 * Makefile.in (clean): Remove reg-spu.c.
16502 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16503 * spu-low.c: New file.
16504
cb7283db
DJ
165052006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16506
16507 * configure.ac: Correct td_thr_tls_get_addr test.
16508 * configure: Regenerated.
16509
89be2091
DJ
165102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16511
16512 * linux-low.c (linux_wait_for_event): Reformat. Use the
16513 pass_signals array.
16514 * remote-utils.c (decode_address_to_semicolon): New.
16515 * server.c (pass_signals, handle_general_set): New.
16516 (handle_query): Mention QPassSignals for qSupported.
16517 (main): Call handle_general_set.
16518 * server.h (pass_signals, decode_address_to_semicolon): New.
16519
000ef4f0
DJ
165202006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16521
16522 * server.c (handle_query): Correct error handling for read_auxv.
16523
b7149293
UW
165242005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16525
16526 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16527 and srv_linux_thread_db to yes.
16528 * linux-s390-low.c (s390_fill_gregset): New function.
16529 (target_regsets): Define data structure.
16530
dae5f5cf
DJ
165312006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16532
16533 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16534 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16535 * config.in, configure: Regenerated.
16536 * inferiors.c (gdb_id_to_thread): New function.
16537 (gdb_id_to_thread_id): Use it.
16538 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16539 * linux-low.h (struct process_info): Add th member.
16540 (thread_db_get_tls_address): New prototype.
16541 * remote-utils.c (decode_address): Make non-static.
16542 * server.c (handle_query): Handle qGetTLSAddr.
16543 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16544 * target.h (struct target_ops): Add get_tls_address.
16545 * thread-db.c (maybe_attach_thread): Save the thread handle.
16546 (thread_db_get_tls_address): New.
16547
32ca6d61
DJ
165482006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16549
16550 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16551 (linux_resume_one_process): Take a siginfo_t *. Update all
16552 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16553 (struct pending_signals): Add a siginfo_t.
16554 (linux_wait_for_process): Always set last_status.
16555 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16556 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16557 * linux-low.h (struct process_info): Add last_status.
16558
5ffff7c1
DJ
165592006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16560
16561 * remote-utils.c (try_rle): New function.
16562 (putpkt_binary): Use it.
16563
8695c747
DJ
165642006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16565
16566 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16567 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16568 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16569 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16570 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16571 point registers.
16572
290fadea
RS
165732006-08-08 Richard Sandiford <richard@codesourcery.com>
16574
16575 * server.c (terminal_fd): New variable.
16576 (old_foreground_pgrp): Likewise.
16577 (restore_old_foreground_pgrp): New function.
16578 (start_inferior): Record the terminal file descriptor in terminal_fd
16579 and its original foreground group in old_foreground_pgrp. Register
16580 restore_old_foreground_pgrp with atexit().
16581
9f2e1e63
DJ
165822006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16583
16584 * server.c (handle_query): Correct qPart to qXfer.
16585
b80864fb
DJ
165862006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16587
16588 * configure.ac: Check for more headers which are missing on
16589 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16590 * configure.srv: Add Cygwin and mingw32.
16591 * remote-utils.c: Don't include headers unconditionally which
16592 are missing on mingw32. Include <winsock.h> for mingw32.
16593 (remote_open): Adjust for mingw32 support. Flush
16594 standard error after writing to it.
16595 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16596 (unblock_async_io, enable_async_io, disable_async_io)
16597 (readchar, getpkt): Update for Winsock support.
16598 (prepare_resume_reply): Expect a protocol signal number.
16599 * server.c: Disable <sys/wait.h> on mingw32.
16600 (start_inferior): Adjust for mingw32 support. Flush
16601 standard error after writing to it.
16602 (attach_inferior): Likewise. Use protocol signal
16603 numbers.
16604 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16605 and names.
16606 * win32-i386-low.c: New file.
16607 * Makefile.in (XM_CLIBS): Set.
16608 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16609 (win32-i386-low.o): New dependency rule.
16610 * linux-low.c (linux_wait): Use target signal numbers.
16611 * target.h (struct target_ops): Doc fix.
16612 * server.h (target_signal_to_name): New prototype.
16613 * gdbreplay.c: Don't include headers unconditionally which
16614 are missing on mingw32. Include <winsock.h> for mingw32.
16615 (remote_close, remote_open): Adjust for Winsock support.
16616 * configure, config.in: Regenerated.
16617
0876f84a
DJ
166182006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16619
16620 * server.c (decode_xfer_read, write_qxfer_response): New.
16621 (handle_query): Take a packet length argument. Handle
16622 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16623 the qSupported response.
16624 (main): Update call to handle_query.
16625
01f9e8fa
DJ
166262006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16627
16628 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16629 (putpkt_binary): Renamed from putpkt and adjusted for binary
16630 data.
16631 (putpkt): New wrapper for putpkt_binary.
16632 (readchar): Don't mask off the high bit.
16633 (decode_X_packet): New function.
16634 * server.c (main): Call putpkt_binary if a handler sets the packet
16635 length. Save the length of the incoming packet. Handle 'X'.
16636 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16637
be2a5f71
DJ
166382006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16639
16640 * server.c (handle_query): Handle qSupported.
16641
ea025f5f
DJ
166422006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16643
16644 * remote-utils.c (all_symbols_looked_up): New variable.
16645 (look_up_one_symbol): Check it.
16646 * server.h (look_up_one_symbol): New declaration.
16647 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16648
9308fc88
DJ
166492006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16650
16651 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16652 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16653 (PTRACE_GET_THREAD_AREA): Define.
16654 (ps_get_thread_area): New function.
16655
52fb6437
NS
166562006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16657
16658 * configure.srv (m68k*-*-uclinux*): New target.
16659 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16660 (linux_resume_one_process): Remove extraneous cast.
16661 (linux_read_offsets): New.
16662 (linux_target_op): Add linux_read_offsets on mmuless systems.
16663 * server.c (handle_query): Add qOffsets logic.
16664 * target.h (struct target_ops): Add read_offsets.
16665
21b0f40c
DJ
166662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16667
16668 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16669 (PTRACE_GET_THREAD_AREA): Define.
16670 (ps_get_thread_area): New function.
16671 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16672 (linux-x86-64-low.o): Update.
16673
0050a760
DJ
166742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16675
16676 * configure.ac: Remove checks for prfpregset_t.
16677 * gdb_proc_service.h: New file.
16678 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16679 new "gdb_proc_service.h".
16680 * proc-service.c: Likewise.
16681 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16682 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16683 * Makefile.in (gdb_proc_service_h): Updated.
16684 * configure, config.in: Regenerated.
16685
b92a518e
DJ
166862006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16687
16688 * remote-utils.c (prepare_resume_reply): Move declaration
16689 of gdb_id_from_wait to the top of the block.
16690
545587ee
DJ
166912006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16692
16693 * linux-low.c (regsets_store_inferior_registers): Read the regset
16694 from the target before filling it.
16695
9db87ebd
DJ
166962006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16697
16698 * server.c (attach_inferior): Return SIGTRAP for a successful
16699 attach.
16700
dd24457d
DJ
167012006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16702
16703 * Makefile.in (OBS): Add version.o.
16704 (STAGESTUFF): Delete.
16705 (version.o): Add dependencies.
16706 (version.c): Replace rule.
16707 (clean): Remove version.c.
16708 * server.c (gdbserver_version): New.
16709 (gdbserver_usage): Use printf.
16710 (main): Handle --version and --help.
16711 * server.h (version, host_name): Add declarations.
16712
6f0f660e
EZ
167132005-12-23 Eli Zaretskii <eliz@gnu.org>
16714
889bf7c5
PA
16715 * linux-arm-low.c:
16716 * linux-arm-low.c:
16717 * inferiors.c:
16718 * i387-fp.h:
16719 * i387-fp.c:
16720 * gdbreplay.c:
16721 * regcache.c:
16722 * proc-service.c:
16723 * mem-break.h:
16724 * mem-break.c:
16725 * linux-x86-64-low.c:
16726 * linux-sh-low.c:
16727 * linux-s390-low.c:
16728 * linux-ppc64-low.c:
16729 * linux-ppc-low.c:
16730 * linux-mips-low.c:
16731 * linux-m68k-low.c:
16732 * linux-m32r-low.c:
16733 * linux-low.h:
16734 * linux-low.c:
16735 * linux-ia64-low.c:
16736 * linux-i386-low.c:
16737 * linux-crisv32-low.c:
16738 * thread-db.c:
16739 * terminal.h:
16740 * target.h:
16741 * target.c:
16742 * server.h:
16743 * server.c:
16744 * remote-utils.c:
16745 * regcache.h:
16746 * utils.c:
16747 * Makefile.in:
16748 * configure.ac:
6f0f660e
EZ
16749 * gdbserver.1: Add (C) after Copyright. Update the FSF
16750 address.
16751
9d1fb177
DJ
167522005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16753
16754 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16755 (arm_breakpoint_at): Recognize both breakpoints.
16756 (the_low_target): Use the correct breakpoint instruction.
16757
011a70c2
DJ
167582005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16759
16760 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16761 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16762 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16763 (the_low_target): Update.
16764
7fb85e41
AS
167652005-10-25 Andreas Schwab <schwab@suse.de>
16766
16767 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16768
16769 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16770 (ia64_num_regs): Reduce to 462.
16771
3db0444b
DJ
167722005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16773
16774 * acinclude.m4: Correct quoting.
16775 * aclocal.m4: Regenerated.
16776
16777 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16778 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16779 (thread_db_init): Call thread_db_err_str.
16780 * configure.ac: Check for TD_VERSION.
16781 * config.in, configure: Regenerated.
16782
bee0189a
DJ
167832005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16784
16785 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16786
e9d25b98
DJ
167872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16788
16789 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16790 is not available. Define HAVE_PTRACE_GETREGS if it is.
16791 * config.in, configure: Regenerated.
16792 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16793 * linux-i386-low.c, linux-m68k-low.c: Update to use
16794 HAVE_PTRACE_GETREGS.
16795 * linux-low.c (regsets_fetch_inferior_registers)
16796 (regsets_store_inferior_registers): Only return 0 if we processed
16797 GENERAL_REGS.
16798 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16799 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16800
a06660f7
DJ
168012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16802
16803 * inferiors.c (struct thread_info): Add gdb_id.
16804 (add_thread): Add gdb_id argument.
16805 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16806 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16807 calls to add_thread.
16808 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16809 * server.c (handle_query): Use thread_to_gdb_id.
16810 (handle_v_cont, main): Use gdb_id_to_thread_id.
16811 * server.h (add_thread): Update prototype.
16812 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16813 prototypes.
16814
5a1f5858
DJ
168152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16816
16817 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16818 left-padded registers.
16819 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16820 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16821
e122f1f5
SE
168222005-07-01 Steve Ellcey <sje@cup.hp.com>
16823
16824 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16825 * configure: Regenerate.
16826 * config.in: Regenerate.
16827 * server.h (NEED_DECLARATION_STRERROR):
16828 Replace with !HAVE_DECL_STRERROR.
16829
d592fa2f
DJ
168302005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16831
16832 * linux-low.c (linux_wait, linux_send_signal): Don't test
16833 an unsigned long variable for > 0 if it could be MAX_ULONG.
16834 * server.c (myresume): Likewise.
16835 * target.c (set_desired_inferior): Likewise.
16836
ccbd4912
MK
168372005-06-13 Mark Kettenis <kettenis@gnu.org>
16838
16839 * configure.ac: Simplify and improve check for socklen_t.
16840 * configure, config.in: Regenerate.
16841
f450004a
DJ
168422005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16843
16844 * acconfig.h: Remove.
16845 * configure.ac: Add a test for socklen_t. Use three-argument
16846 AC_DEFINE throughout.
16847 * config.in: Regenerated using autoheader 2.59.
16848 * configure: Regenerated.
16849
16850 * gdbreplay.c (socklen_t): Provide a default.
16851 (remote_open): Use socklen_t.
16852 * remote-utils.c (socklen_t): Provide a default.
16853 (remote_open): Use socklen_t.
16854 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16855 unsigned char.
16856
16857 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16858 char for buffers.
16859 * linux-low.c (linux_read_memory, linux_write_memory)
16860 (linux_read_auxv): Likewise.
16861 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16862 (check_mem_write): Likewise.
16863 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16864 Likewise.
16865 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16866 (registers_from_string, register_data): Likewise.
16867 * server.c (handle_query, main): Likewise.
16868 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16869 (decode_M_packet): Likewise.
16870 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16871 * target.h (struct target_ops): Update read_memory, write_memory,
16872 and read_auxv.
16873 (read_inferior_memory, write_inferior_memory): Update.
16874 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16875 to unsigned char *.
16876 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16877 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16878 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16879 linux-s390-low.c, linux-sh-low.c: Update for changes in
16880 read_inferior_memory and the_low_target->breakpoint.
16881
eee84df1
DJ
168822005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16883
16884 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16885 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16886 * configure.srv: Add powerpc64-*-linux*.
16887 * linux-ppc64-low.c: New file.
16888
45b134e5
OF
168892005-05-23 Orjan Friberg <orjanf@axis.com>
16890
16891 * linux-cris-low.c: New file with support for CRIS.
16892 * linux-crisv32-low.c: Ditto for CRISv32.
16893 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16894 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16895 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16896 reg-crisv32.o, and reg-crisv32.c to make rules.
16897 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16898 recognized targets.
16899
48d93c75
UW
169002005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16901
16902 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16903 of sizeof (PTRACE_XFER_TYPE).
16904 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16905
e013ee27
OF
169062005-05-12 Orjan Friberg <orjanf@axis.com>
16907
889bf7c5 16908 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16909 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16910 pointers for hardware watchpoint support.
16911 * linux-low.h (struct linux_target_ops): Ditto.
16912 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16913 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16914 to linux_target_ops.
16915 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16916 reply packet.
16917 * server.c (main): Recognize 'Z' and 'z' packets.
16918
b0ded00b
UW
169192005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16920
16921 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16922 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16923 (the_low_target): Add new members.
16924
8643e2ad
DJ
169252005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16926
16927 * proc-service.c (ps_lgetregs): Search all_processes instead of
16928 all_threads.
16929
fc620387
DJ
169302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16931
16932 * server.c (start_inferior): Change return type to int.
16933 (attach_inferior): Change sigptr to int *.
16934 (handle_v_cont, handle_v_requests): Change signal to int *.
16935 (main): Change signal to int.
16936
169372005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16938
16939 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16940 * configure.srv: Add m32r*-*-linux*.
16941 * linux-m32r-low.c: New file.
16942
e0e76420
DJ
169432005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16944
16945 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16946
a1928bad
DJ
169472005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16948
16949 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16950 Take unsigned long arguments for PIDs.
16951 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16952 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16953 (wait_for_sigstop, linux_resume_one_process)
16954 (regsets_fetch_inferior_registers, linux_send_signal)
16955 (linux_read_auxv): Likewise. Update the types of variables holding
16956 PIDs. Update format string specifiers.
16957 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16958 * remote-utils.c (prepare_resume_reply): Likewise.
16959 * server.c (cont_thread, general_thread, step_thread)
16960 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16961 unsigned long.
16962 (handle_query): Update format specifiers.
16963 (handle_v_cont, main): Use strtoul for thread IDs.
16964 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16965 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16966 (general_thread, step_thread, thread_from_wait)
16967 (old_thread_from_wait): Update.
16968 * target.h (struct thread_resume): Use unsigned long for THREAD.
16969 (struct target_ops): Use unsigned long for arguments to attach and
16970 thread_alive.
16971
dcdb98d2
DJ
169722005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16973
16974 * acinclude.m4: Include bfd/bfd.m4 directly.
16975 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16976 <agriffis@toolchain.org>.
16977 * aclocal.m4, configure: Regenerated.
16978
bec39cab
AC
169792005-01-07 Andrew Cagney <cagney@gnu.org>
16980
16981 * configure.ac: Rename configure.in, require autoconf 2.59.
16982 * configure: Re-generate.
16983
434c4c77
DJ
169842004-12-08 Daniel Jacobowitz <dan@debian.org>
16985
16986 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16987 LIBS when finished.
16988 * aclocal.m4: Regenerated.
16989 * configure: Regenerated.
16990
db1d3e1b
AS
169912004-11-21 Andreas Schwab <schwab@suse.de>
16992
16993 * linux-m68k-low.c (m68k_num_gregs): Define.
16994 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16995 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16996 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16997 (m68k_breakpoint_at): New. Add to the_low_target.
16998
16999 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17000 srv_linux_thread_db to yes.
17001
43360365
JB
170022004-10-20 Joel Brobecker <brobecker@gnat.com>
17003
17004 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17005 (ARCH_SET_FS): Likewise.
17006 (ARCH_GET_FS): Likewise.
17007 (ARCH_GET_GS): Likewise.
17008
fd500816
DJ
170092004-10-16 Daniel Jacobowitz <dan@debian.org>
17010
17011 * linux-i386-low.c (ps_get_thread_area): New.
17012 * linux-x86-64-low.c (ps_get_thread_area): New.
17013 * linux-low.c: Include <sys/syscall.h>.
17014 (linux_kill_one_process): Don't kill the first thread here.
17015 (linux_kill): Kill the first thread here.
17016 (kill_lwp): New function.
17017 (send_sigstop, linux_send_signal): Use it.
17018 * proc-service.c: Clean up #ifdefs.
17019 (fpregset_info): Delete.
17020 (ps_lgetregs): Update and enable implementation.
17021 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17022 implementations.
17023 * remote-utils.c (struct sym_cache, symbol_cache): New.
17024 (input_interrupt): Print a clearer message.
17025 (async_io_enabled): New variable.
17026 (enable_async_io, disable_async_io): Use it. Update comments.
17027 (look_up_one_symbol): Use the symbol cache.
17028 * thread-db.c (thread_db_look_up_symbols): New function.
17029 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17030
f6de3c42
DJ
170312004-10-16 Daniel Jacobowitz <dan@debian.org>
17032
17033 * configure.in: Test for -rdynamic.
17034 * configure: Regenerated.
17035 * Makefile (INTERNAL_LDFLAGS): New.
17036 (gdbserver, gdbreplay): Use it.
17037
2c0fc042
AC
170382004-09-02 Andrew Cagney <cagney@gnu.org>
17039
17040 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17041
075b3282
DJ
170422004-03-23 Daniel Jacobowitz <drow@mvista.com>
17043
17044 * linux-low.c (linux_wait): Clear all_processes list also.
17045
fa6a77dc
DJ
170462004-03-12 Daniel Jacobowitz <drow@mvista.com>
17047
17048 * linux-low.c: Include <errno.h>. Remove extern declaration of
17049 errno.
17050
6d782a97
DJ
170512004-03-12 Daniel Jacobowitz <drow@mvista.com>
17052
17053 * gdbreplay.c, server.h, utils.c: Update copyright years.
17054
3a7fb99b
DJ
170552004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17056
17057 * server.c (main): Print child status or termination signal from
17058 variable 'signal', not 'sig'.
17059
c3e735a6
DJ
170602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17061
17062 * linux-low.c (linux_read_memory): Change return type to
17063 int. Check for and return error from ptrace().
17064 * target.c (read_inferior_memory): Change return type to int. Pass
17065 back return status from the_target->read_memory().
17066 * target.h (struct target_ops): Adapt *read_memory() prototype.
17067 Update comment.
17068 (read_inferior_memory): Adapt prototype.
17069 * server.c (main): Return an error packet if
17070 read_inferior_memory() returns an error.
17071
a59d1c82
DJ
170722004-03-04 Daniel Jacobowitz <drow@mvista.com>
17073
17074 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17075 Unify with other clean targets.
17076
dc3f8883
DJ
170772004-02-29 Daniel Jacobowitz <drow@mvista.com>
17078
17079 * server.c (handle_v_cont): Call set_desired_inferior.
17080
89a208da
DJ
170812004-02-29 Daniel Jacobowitz <drow@mvista.com>
17082
17083 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17084
62ea82f5
DJ
170852004-02-29 Daniel Jacobowitz <drow@mvista.com>
17086
17087 * linux-low.c (linux_wait): Unblock async I/O.
17088 (linux_resume): Block and enable async I/O.
17089 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17090 * server.h (block_async_io, unblock_async_io): Add prototypes.
17091
6910d122
DJ
170922004-02-29 Daniel Jacobowitz <drow@mvista.com>
17093
17094 * remote-utils.c (remote_open): Print a status notice after
17095 opening a TCP port.
17096 * server.c (attach_inferior): Print a status notice after
17097 attaching.
17098
170992004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17100
17101 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17102
c89dc5d4
DJ
171032004-02-26 Daniel Jacobowitz <drow@mvista.com>
17104
17105 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17106 error packet.
17107 * server.c, target.h: Update copyright years.
17108
4b8dad4a
RM
171092004-02-25 Roland McGrath <roland@redhat.com>
17110
17111 * target.h (struct target_ops): New member `read_auxv'.
17112 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17113 * linux-low.c (linux_read_auxv): New function.
17114 (linux_target_ops): Initialize `read_auxv' member to that.
17115
d7446758
JB
171162004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17117
17118 Committed by Jim Blandy <jimb@redhat.com>.
17119
17120 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17121 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17122 instead of GPR_SIZE to distiguish s390 and s390x targets.
17123
5544ad89
DJ
171242004-01-31 Daniel Jacobowitz <drow@mvista.com>
17125
17126 * linux-low.c: Update copyright year.
17127 (check_removed_breakpoint): Clear pending_is_breakpoint.
17128 (linux_set_resume_request, linux_queue_one_thread)
17129 (resume_status_pending_p): New functions.
17130 (linux_continue_one_thread): Use process->resume.
17131 (linux_resume): Only resume threads if there are no pending events.
17132 * linux-low.h (struct process_info): Add resume request
17133 pointer.
17134
2a68b70e
DJ
171352004-01-30 Daniel Jacobowitz <drow@mvista.com>
17136
17137 * regcache.c (new_register_cache): Clear the allocated register
17138 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17139
64386c31
DJ
171402003-10-13 Daniel Jacobowitz <drow@mvista.com>
17141
17142 * linux-low.c (linux_resume): Take a struct thread_resume *
17143 argument.
17144 (linux_wait): Update call.
17145 (resume_ptr): New static variable.
17146 (linux_continue_one_thread): Renamed from
17147 linux_continue_one_process. Use resume_ptr.
17148 (linux_resume): Use linux_continue_one_thread.
17149 * server.c (handle_v_cont, handle_v_requests): New functions.
17150 (myresume): New function.
17151 (main): Handle 'v' case.
17152 * target.h (struct thread_resume): New type.
17153 (struct target_ops): Change argument of "resume" to struct
17154 thread_resume *.
17155 (myresume): Delete macro.
17156
c938e9b0
L
171572003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17158
17159 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17160 (uninstall): Support DESTDIR.
17161
7f313d07
BC
17162Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17163
17164 * configure.srv: Add xscale*linux copy of arm*linux entry.
17165
3b2fc2ea
DJ
171662003-07-24 Daniel Jacobowitz <drow@mvista.com>
17167
17168 * linux-arm-low.c (arm_reinsert_addr): New function.
17169 (the_low_target): Add arm_reinsert_addr.
17170
1c0a559e
MK
171712003-07-08 Mark Kettenis <kettenis@gnu.org>
17172
17173 * mem-break.c: Remove whitespace at end of file.
17174
43d5792c
DJ
171752003-06-28 Daniel Jacobowitz <drow@mvista.com>
17176
17177 * configure.in: Check whether we need to prototype strerror.
17178 * server.h: Optionally prototype strerror.
17179 * gdbreplay.c (perror_with_name): Use strerror.
17180 * linux-low.c (linux_attach_lwp): Use strerror.
17181 * utils.c (perror_with_name): Use strerror.
17182 * config.in, configure: Regenerated.
17183
c8a86edf
DJ
171842003-06-28 Daniel Jacobowitz <drow@mvista.com>
17185
17186 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17187 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17188
73d37363
DJ
171892003-06-20 Daniel Jacobowitz <drow@mvista.com>
17190
17191 * Makefile.in (SFILES): Update.
17192 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17193 low-sun3.c: Remove files.
17194
6ad8ae5c
DJ
171952003-06-17 Daniel Jacobowitz <drow@mvista.com>
17196
17197 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17198 (linux_detach_one_process, linux_detach): New functions.
17199 (linux_target_ops): Add linux_detach.
17200 * server.c (main): Handle 'D' packet.
17201 * target.h (struct target_ops): Add "detach" member.
17202 (detach_inferior): Define.
17203
1581182a
MK
172042003-06-13 Mark Kettenis <kettenis@gnu.org>
17205
17206 From Kelley Cook <kelleycook@wideopenwest.com>:
17207 * configure.srv: Accept i[34567]86 variants.
17208
e5379b03
DJ
172092003-06-05 Daniel Jacobowitz <drow@mvista.com>
17210
17211 * linux-low.c (linux_wait_for_event): Correct comment typos.
17212 (linux_resume_one_process): Call check_removed_breakpoint.
17213 (linux_send_signal): New function.
17214 (linux_target_ops): Add linux_send_signal.
17215 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17216 of kill.
17217 * target.h (struct target_ops): Add send_signal.
17218
2ff29de4
JB
172192003-05-29 Jim Blandy <jimb@redhat.com>
17220
17221 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17222 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17223 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17224 away part of the register's value.
17225
254787d4
DJ
172262003-03-26 Daniel Jacobowitz <drow@mvista.com>
17227
17228 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17229 (linux_wait_for_event, linux_init_signals): Likewise.
17230
94e10508
DJ
172312003-03-17 Daniel Jacobowitz <drow@mvista.com>
17232
17233 * configure.in: Check for stdlib.h.
17234 * configure: Regenerated.
17235 * config.in: Regenerated.
17236
4c0711e0
DJ
172372003-01-04 Andreas Schwab <schwab@suse.de>
17238
17239 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17240
ef66e766
AC
172412003-01-02 Andrew Cagney <ac131313@redhat.com>
17242
17243 * Makefile.in: Remove obsolete code.
17244
a1358604
DJ
172452002-11-20 Daniel Jacobowitz <drow@mvista.com>
17246
17247 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17248 defined(PT_FPR0_HI).
17249
23ce3b1c
DJ
172502002-11-17 Stuart Hughes <seh@zee2.com>
17251
17252 * linux-arm-low.c (arm_num_regs): Increase.
17253 (arm_regmap): Include status register.
17254
172552002-11-17 Daniel Jacobowitz <drow@mvista.com>
17256
17257 * linux-low.c (register_addr): Remove incorrect -1 check.
17258
a9fa9f7d
DJ
172592002-08-29 Daniel Jacobowitz <drow@mvista.com>
17260
17261 * linux-low.c (linux_create_inferior): Call setpgid. Return
17262 the new PID.
17263 (unstopped_p, linux_signal_pid): Remove.
17264 (linux_target_ops): Remove linux_signal_pid.
17265 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17266 global instead of target method.
17267 * target.h (struct target_ops): Remove signal_pid. Update comment
17268 for create_inferior.
17269 * server.c (signal_pid): New variable.
17270 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17271 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17272 (attach_inferior): Set signal_pid.
17273
17574093
DJ
172742002-08-23 Daniel Jacobowitz <drow@mvista.com>
17275
17276 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17277
172782002-08-20 Jim Blandy <jimb@redhat.com>
17279
17280 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17281 default for this.
17282
172832002-08-01 Andrew Cagney <cagney@redhat.com>
17284
17285 * Makefile.in: Make chill references obsolete.
17286
172872002-07-24 Kevin Buettner <kevinb@redhat.com>
17288
17289 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17290 * configure: Regenerate.
17291 * config.in: Regenerate.
17292
172932002-07-09 David O'Brien <obrien@FreeBSD.org>
17294
17295 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17296 (perror_with_name, remote_close, remote_open, expect, play): Static.
17297
172982002-07-04 Michal Ludvig <mludvig@suse.cz>
17299
4b8dad4a 17300 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17301 byte offsets instead of an array of indexes.
17302 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17303
173042002-06-13 Daniel Jacobowitz <drow@mvista.com>
17305
17306 * regcache.c: Add comment.
17307
173082002-06-11 Daniel Jacobowitz <drow@mvista.com>
17309
17310 * thread-db.c: New file.
17311 * proc-service.c: New file.
17312 * acinclude.m4: New file.
17313 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17314 proc-service.o, and thread-db.o.
17315 (linux-low.o): Add USE_THREAD_DB.
17316 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17317 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17318 * aclocal.m4: Regenerated.
17319 * config.in: Regenerated.
17320 * configure: Regenerated.
17321 * configure.in: Check for proc_service.h, sys/procfs.h,
17322 thread_db.h, and linux/elf.h headrs.
17323 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17324 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17325 Check for -lthread_db and thread support.
17326 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17327 PowerPC, and SuperH.
17328 * i387-fp.c: Constify arguments.
17329 * i387-fp.h: Likewise.
17330 * inferiors.c: (struct thread_info): Renamed from
17331 `struct inferior_info'. Remove PID member. Use generic inferior
17332 list header. All uses updated.
17333 (inferiors, signal_pid): Removed.
17334 (all_threads): New variable.
17335 (get_thread): Define.
17336 (add_inferior_to_list): New function.
17337 (for_each_inferior): New function.
17338 (change_inferior_id): New function.
17339 (add_inferior): Removed.
17340 (remove_inferior): New function.
17341 (add_thread): New function.
17342 (free_one_thread): New function.
17343 (remove_thread): New function.
17344 (clear_inferiors): Use for_each_inferior and free_one_thread.
17345 (find_inferior): New function.
17346 (find_inferior_id): New function.
17347 (inferior_target_data): Update argument type.
17348 (set_inferior_target_data): Likewise.
17349 (inferior_regcache_data): Likewise.
17350 (set_inferior_regcache_data): Likewise.
17351 * linux-low.c (linux_bp_reinsert): Remove.
17352 (all_processes, stopping_threads, using_thrads)
17353 (struct pending_signals, debug_threads, pid_of): New.
17354 (inferior_pid): Replace with macro.
17355 (struct inferior_linux_data): Remove.
17356 (get_stop_pc, add_process): New functions.
17357 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17358 Use add_process and add_thread.
17359 (linux_attach_lwp): New function, based on old linux_attach. Use
17360 add_process and add_thread. Set stop_expected for new threads.
17361 (linux_attach): New function.
17362 (linux_kill_one_process): New function.
17363 (linux_kill): Kill all LWPs.
17364 (linux_thread_alive): Use find_inferior_id.
17365 (check_removed_breakpoints, status_pending_p): New functions.
17366 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17367 Update. Use WNOHANG. Wait for cloned processes also. Update process
17368 struct for the found process.
17369 (linux_wait_for_event): New function.
17370 (linux_wait): Use it. Support LWPs.
17371 (send_sigstop, wait_for_sigstop, stop_all_processes)
17372 (linux_resume_one_process, linux_continue_one_process): New functions.
17373 (linux_resume): Support LWPs.
17374 (REGISTER_RAW_SIZE): Remove.
17375 (fetch_register): Use register_size instead. Call supply_register.
17376 (usr_store_inferior_registers): Likewise. Call collect_register.
17377 Fix recursive case.
17378 (regsets_fetch_inferior_registers): Improve error message.
17379 (regsets_store_inferior_registers): Add debugging.
17380 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17381 (unstopped_p, linux_signal_pid): New functions.
17382 (linux_target_ops): Add linux_signal_pid.
17383 (linux_init_signals): New function.
17384 (initialize_low): Call it. Initialize using_threads.
17385 * regcache.c (inferior_regcache_data): Add valid
17386 flag.
17387 (get_regcache): Fetch registers lazily. Add fetch argument
17388 and update all callers.
17389 (regcache_invalidate_one, regcache_invalidate): New
17390 functions.
17391 (new_register_cache): Renamed from create_register_cache.
17392 Return the new regcache.
17393 (free_register_cache): Change argument to a void *.
17394 (registers_to_string, registers_from_string): Call get_regcache
17395 with fetch flag set.
17396 (register_data): Make static. Pass fetch flag to get_regcache.
17397 (supply_register): Call get_regcache with fetch flag clear.
17398 (collect_register): Call get_regcache with fetch flag set.
17399 (collect_register_as_string): New function.
17400 * regcache.h: Update.
17401 * remote-utils.c (putpkt): Flush after debug output and use
17402 stderr.
17403 Handle input interrupts while waiting for an ACK.
17404 (input_interrupt): Use signal_pid method.
17405 (getpkt): Flush after debug output and use stderr.
17406 (outreg): Use collect_register_as_string.
17407 (new_thread_notify, dead_thread_notify): New functions.
17408 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17409 and general_thread.
17410 (look_up_one_symbol): Flush after debug output.
17411 * server.c (step_thread, server_waiting): New variables.
17412 (start_inferior): Don't use signal_pid. Update call to mywait.
17413 (attach_inferior): Update call to mywait.
17414 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17415 (main): Don't fetch/store registers explicitly. Use
17416 set_desired_inferior. Support proposed ``Hs'' packet. Update
17417 calls to mywait.
17418 * server.h: Update.
17419 (struct inferior_list, struct_inferior_list_entry): New.
17420 * target.c (set_desired_inferior): New.
17421 (write_inferior_memory): Constify.
17422 (mywait): New function.
17423 * target.h: Update.
17424 (struct target_ops): New signal_pid method.
17425 (mywait): Removed macro, added prototype.
17426
17427 * linux-low.h (regset_func): Removed.
17428 (regset_fill_func, regset_store_func): New.
17429 (enum regset_type): New.
17430 (struct regset_info): Add type field. Use new operation types.
17431 (struct linux_target_ops): stop_pc renamed to get_pc.
17432 Add decr_pc_after_break and breakpoint_at.
17433 (get_process, get_thread_proess, get_process_thread)
17434 (strut process_info, all_processes, linux_attach_lwp)
17435 (thread_db_init): New.
17436
17437 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17438 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17439 (the_low_target): Add new members.
17440 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17441 (i386_store_fpxregset): Constify.
17442 (target_regsets): Add new kind identifier.
17443 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17444 (i386_set_pc): Add debugging.
17445 (i386_breakpoint_at): New function.
17446 (the_low_target): Add new members.
17447 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17448 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17449 (mips_breakpoint_at): New.
17450 (the_low_target): Add new members.
17451 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17452 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17453 (the_low_target): Add new members.
17454 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17455 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17456 (the_low_target): Add new members.
17457 * linux-x86-64-low.c (target_regsets): Add new kind
17458 identifier.
17459
174602002-05-15 Daniel Jacobowitz <drow@mvista.com>
17461
17462 From Martin Pool <mbp@samba.org>:
17463 * server.c (gdbserver_usage): New function.
17464 (main): Call it.
17465
174662002-05-14 Daniel Jacobowitz <drow@mvista.com>
17467
17468 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17469 stop_at -> stop_pc.
17470
174712002-05-04 Andrew Cagney <ac131313@redhat.com>
17472
17473 * Makefile.in: Remove obsolete code.
17474
174752002-04-24 Michal Ludvig <mludvig@suse.cz>
17476
17477 * linux-low.c (regsets_fetch_inferior_registers),
17478 (regsets_store_inferior_registers): Removed cast to int from
17479 ptrace() calls.
17480 * regcache.h: Added declaration of struct inferior_info.
17481
174822002-04-20 Daniel Jacobowitz <drow@mvista.com>
17483
17484 * inferiors.c (struct inferior_info): Add regcache_data.
17485 (add_inferior): Call create_register_cache.
17486 (clear_inferiors): Call free_register_cache.
17487 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17488 * regcache.c (struct inferior_regcache_data): New.
17489 (registers): Remove.
17490 (get_regcache): New function.
17491 (create_register_cache, free_register_cache): New functions.
17492 (set_register_cache): Don't initialize the register cache here.
17493 (registers_to_string, registers_from_string, register_data): Call
17494 get_regcache.
17495 * regcache.h: Add prototypes.
17496 * server.h: Likewise.
17497
174982002-04-20 Daniel Jacobowitz <drow@mvista.com>
17499
17500 * mem-break.c: New file.
17501 * mem-break.h: New file.
17502 * Makefile.in: Add mem-break.o rule; update server.h
17503 dependencies.
17504 * inferiors.c (struct inferior_info): Add target_data
17505 member.
17506 (clear_inferiors): Free target_data member if set.
17507 (inferior_target_data, set_inferior_target_data): New functions.
17508 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17509 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17510 * linux-low.c (linux_bp_reinsert): New variable.
17511 (struct inferior_linux_data): New.
17512 (linux_create_inferior): Use set_inferior_target_data.
17513 (linux_attach): Likewise. Call add_inferior.
17514 (linux_wait_for_one_inferior): New function.
17515 (linux_wait): Call it.
17516 (linux_write_memory): Add const.
17517 (initialize_low): Call set_breakpoint_data.
17518 * linux-low.h (struct linux_target_ops): Add breakpoint
17519 handling members.
17520 * server.c (attach_inferior): Remove extra add_inferior
17521 call.
17522 * server.h: Include mem-break.h. Update inferior.c
17523 prototypes.
17524 * target.c (read_inferior_memory)
17525 (write_inferior_memory): New functions.
17526 * target.h (read_inferior_memory)
17527 (write_inferior_memory): Change macros to prototypes.
17528 (struct target_ops): Update comments. Add const to write_memory
17529 definition.
17530
175312002-04-11 Daniel Jacobowitz <drow@mvista.com>
17532
17533 * linux-low.c (usr_store_inferior_registers): Support
17534 registers which are allowed to fail to store.
17535 * linux-low.h (linux_target_ops): Likewise.
17536 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17537 (ppc_cannot_store_register): FPSCR may not be storable.
17538
175392002-04-09 Daniel Jacobowitz <drow@mvista.com>
17540
17541 * server.h: Include <string.h> if HAVE_STRING_H.
17542 * ChangeLog: Correct paths in last ChangeLog entry.
17543
175442002-04-09 Daniel Jacobowitz <drow@mvista.com>
17545
17546 * linux-low.h: Remove obsolete prototypes.
17547 (struct linux_target_ops): New.
17548 (extern the_low_target): New.
17549 * linux-low.c (num_regs, regmap): Remove declarations.
17550 (register_addr): Use the_low_target explicitly.
17551 (fetch_register): Likewise.
17552 (usr_fetch_inferior_registers): Likewise.
17553 (usr_store_inferior_registers): Likewise.
17554 * linux-arm-low.c (num_regs): Remove.
17555 (arm_num_regs): Define.
17556 (arm_regmap): Renamed from regmap, made static.
17557 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17558 made static.
17559 (arm_cannot_store_register): Renamed from cannot_store_register,
17560 made static.
17561 (the_low_target): New.
17562 * linux-i386-low.c (num_regs): Remove.
17563 (i386_num_regs): Define.
17564 (i386_regmap): Renamed from regmap, made static.
17565 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17566 made static.
17567 (i386_cannot_store_register): Renamed from cannot_store_register,
17568 made static.
17569 (the_low_target): New.
17570 * linux-ia64-low.c (num_regs): Remove.
17571 (ia64_num_regs): Define.
17572 (ia64_regmap): Renamed from regmap, made static.
17573 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17574 made static.
17575 (ia64_cannot_store_register): Renamed from cannot_store_register,
17576 made static.
17577 (the_low_target): New.
17578 * linux-m68k-low.c (num_regs): Remove.
17579 (m68k_num_regs): Define.
17580 (m68k_regmap): Renamed from regmap, made static.
17581 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17582 made static.
17583 (m68k_cannot_store_register): Renamed from cannot_store_register,
17584 made static.
17585 (the_low_target): New.
17586 * linux-mips-low.c (num_regs): Remove.
17587 (mips_num_regs): Define.
17588 (mips_regmap): Renamed from regmap, made static.
17589 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17590 made static.
17591 (mips_cannot_store_register): Renamed from cannot_store_register,
17592 made static.
17593 (the_low_target): New.
17594 * linux-ppc-low.c (num_regs): Remove.
17595 (ppc_num_regs): Define.
17596 (ppc_regmap): Renamed from regmap, made static.
17597 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17598 made static.
17599 (ppc_cannot_store_register): Renamed from cannot_store_register,
17600 made static.
17601 (the_low_target): New.
17602 * linux-s390-low.c (num_regs): Remove.
17603 (s390_num_regs): Define.
17604 (s390_regmap): Renamed from regmap, made static.
17605 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17606 made static.
17607 (s390_cannot_store_register): Renamed from cannot_store_register,
17608 made static.
17609 (the_low_target): New.
17610 * linux-sh-low.c (num_regs): Remove.
17611 (sh_num_regs): Define.
17612 (sh_regmap): Renamed from regmap, made static.
17613 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17614 made static.
17615 (sh_cannot_store_register): Renamed from cannot_store_register,
17616 made static.
17617 (the_low_target): New.
17618 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17619 (the_low_target): New.
17620
176212002-04-09 Daniel Jacobowitz <drow@mvista.com>
17622
17623 * Makefile.in: Add stamp-h target.
17624 * configure.in: Create stamp-h.
17625 * configure: Regenerated.
17626
176272002-04-09 Daniel Jacobowitz <drow@mvista.com>
17628
17629 * inferiors.c: New file.
17630 * target.c: New file.
17631 * target.h: New file.
17632 * Makefile.in: Add target.o and inferiors.o. Update
17633 dependencies.
17634 * linux-low.c (inferior_pid): New static variable,
17635 moved from server.c.
17636 (linux_create_inferior): Renamed from create_inferior.
17637 Call add_inferior. Return 0 on success instead of a PID.
17638 (linux_attach): Renamed from myattach.
17639 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17640 (linux_thread_alive): Renamed from mythread_alive.
17641 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17642 child dies.
17643 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17644 (regsets_store_inferior_registers): Correct error message.
17645 Add missing ``return 0''.
17646 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17647 (linux_store_registers): Renamed from store_inferior_registers.
17648 (linux_read_memory): Renamed from read_inferior_memory.
17649 (linux_write_memory): Renamed from write_inferior_memory.
17650 (linux_target_ops): New structure.
17651 (initialize_low): Call set_target_ops ().
17652 * remote-utils.c (unhexify): New function.
17653 (hexify): New function.
17654 (input_interrupt): Send signals to ``signal_pid''.
17655 * server.c (inferior_pid): Remove.
17656 (start_inferior): Update create_inferior call.
17657 (attach_inferior): Call add_inferior.
17658 (handle_query): New function.
17659 (main): Call handle_query for `q' packets.
17660 * server.h: Include "target.h". Remove obsolete prototypes.
17661 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17662
176632002-04-09 Daniel Jacobowitz <drow@mvista.com>
17664
17665 * Makefile.in: Add WARN_CFLAGS. Update configury
17666 dependencies.
17667 * configure.in: Check for <string.h>
17668 * configure: Regenerate.
17669 * config.in: Regenerate.
17670 * gdbreplay.c: Include needed system headers.
17671 (remote_open): Remove strchr prototype.
17672 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17673 * regcache.c (supply_register): Change buf argument to const void *.
17674 (supply_register_by_name): Likewise.
17675 (collect_register): Change buf argument to void *.
17676 (collect_register_by_name): Likewise.
17677 * regcache.h: Add missing prototypes.
17678 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17679 * server.c (handle_query): New function.
17680 (attached): New static variable, moved out of main.
17681 (main): Quiet longjmp clobber warnings.
17682 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17683 * utils.c (error): Remove NORETURN.
17684 (fatal): Likewise.