Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
abf516c6
UW
12019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4 and powerpc-cell64l-ipa.o.
5 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
6 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
7 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
8 (spu*-*-*): Remove.
9
10 * spu-low.c: Remove file.
11
12 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
13 (parse_spufs_run): Remove.
14 (ppc_get_pc): Remove Cell/B.E. support.
15 (ppc_set_pc): Likewise.
16 (ppc_breakpoint_at): Likewise.
17 (ppc_arch_setup): Likewise.
18 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
19 tdesc_powerpc_cell32l.
20 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
21 or init_registers_powerpc_cell32l.
22 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
23 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
24 or init_registers_powerpc_cell32l.
25 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
26 (init_registers_powerpc_cell32l): Remove prototype.
27 (init_registers_powerpc_cell64l): Likewise.
28
29 * target.h (struct target_ops): Remove qxfer_spu member.
30 * server.c (handle_qxfer_spu): Remove.
31 (qxfer_packets): Remove entry for "spu".
32 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
33 * linux-low.c (SPUFS_MAGIC): Remove.
34 (spu_enumerate_spu_ids): Remove.
35 (linux_qxfer_spu): Remove.
36 (linux_target_ops): Remove qxfer_spu member.
37 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
38 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
39 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
40
2d41fa11
SDJ
412019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
42
43 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
44 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
45 * config.in: Regenerate.
46 * configure: Regenerate.
47
d59b55f0
TT
482019-08-15 Tom Tromey <tromey@adacore.com>
49
50 * target.c (target_write_memory): Use gdb::byte_vector.
51
4196ab2a
TT
522019-08-15 Tom Tromey <tromey@adacore.com>
53
54 * tracepoint.c (write_inferior_data_pointer)
55 (write_inferior_integer, write_inferior_int8)
56 (write_inferior_uinteger, m_tracepoint_action_download)
57 (r_tracepoint_action_download, x_tracepoint_action_download)
58 (l_tracepoint_action_download, clear_inferior_trace_buffer)
59 (download_agent_expr, download_tracepoint_1)
60 (download_trace_state_variables, upload_fast_traceframes): Update.
61 * server.c (gdb_write_memory): Update.
62 * remote-utils.c (relocate_instruction): Update.
63 * proc-service.c (ps_pdwrite): Update.
64 * mem-break.c (remove_memory_breakpoint)
65 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
66 (uninsert_fast_tracepoint_jumps_at)
67 (reinsert_fast_tracepoint_jumps_at): Update.
68 * linux-x86-low.c (append_insns)
69 (i386_install_fast_tracepoint_jump_pad)
70 (amd64_write_goto_address, i386_write_goto_address): Update.
71 * linux-s390-low.c (append_insns, s390_write_goto_address):
72 Update.
73 * linux-ppc-low.c (ppc_relocate_instruction)
74 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
75 (ppc_write_goto_address): Update.
76 * linux-aarch64-low.c (append_insns): Update.
77 * target.h (struct target_ops): Update.
78 (write_inferior_memory): Don't declare.
79 * target.c (target_write_memory): Rename from
80 write_inferior_memory. Remove old target_write_memory.
81
c6778d00
TT
822019-08-15 Tom Tromey <tromey@adacore.com>
83
84 * target.c (write_inferior_memory): Use std::vector.
85
404f2902
FCE
862019-08-06 Frank Ch. Eigler <fche@redhat.com>
87
88 PR build/24886
89 * configure.ac: Drop enable-libmcheck support.
90 * configure, config.in: Rebuild.
91 * acinclude.m4: Don't include it.
92
4c5aa8e0
AH
932019-07-19 Alan Hayward <alan.hayward@arm.com>
94
95 * configure.srv: Remove Arm xml files.
96
7cc17433
AH
972019-07-19 Alan Hayward <alan.hayward@arm.com>
98
99 * configure.srv: Add new files. Remove xml generated files.
100 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
101 registers.
102 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
103 * linux-aarch32-tdesc.c: New file.
104 * linux-aarch32-tdesc.h: New file.
105 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
106 * linux-arm-low.c (init_registers_arm, tdesc_arm)
107 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
108 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
109 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
110 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
111 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
112 (arm_read_description): Call arm_linux_read_description.
113 (initialize_low_arch): Don't init registers.
114 * linux-arm-tdesc.c: New file.
115 * linux-arm-tdesc.h: New file.
116
166a82be
AH
1172019-07-10 Alan Hayward <alan.hayward@arm.com>
118
119 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
120 Move counter inside for.
121 (arm_read_description): Check ptrace earlier.
122 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
123
268a13a5
TT
1242019-07-09 Tom Tromey <tom@tromey.com>
125
126 * configure: Rebuild.
127 * configure.ac: Change common to gdbsupport.
128 * acinclude.m4: Change common to gdbsupport.
129 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
130 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
131 common to gdbsupport.
132 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
133 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
134 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
135 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
136 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
137 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
138 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
139 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
140 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
141 common to gdbsupport.
142
350fab54
AH
1432019-07-04 Alan Hayward <alan.hayward@arm.com>
144
145 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
146 defines.
147 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
148
2b40fda7
AH
1492019-07-04 Alan Hayward <alan.hayward@arm.com>
150
151 * configure.srv: Remove legacy xml.
152 * linux-aarch64-low.c (initialize_low_arch): Remove
153 initialize_low_tdesc call.
154 * linux-aarch64-tdesc-selftest.c: Remove file.
155 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
156 * linux-x86-low.c (initialize_low_arch): Remove
157 initialize_low_tdesc call.
158 * linux-x86-tdesc-selftest.c: Remove file.
159 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
160
7d10623d
TV
1612019-06-20 Tom de Vries <tdevries@suse.de>
162
163 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
164 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
165
8d6a48df
TV
1662019-06-19 Tom de Vries <tdevries@suse.de>
167
168 * debug.h (debug_write): Change return type to ssize_t.
169 * debug.c (debug_write): Same.
170
73cc7272
TT
1712019-06-14 Tom Tromey <tom@tromey.com>
172
173 * configure.ac: Use new path to gnulib.
174 * configure: Rebuild.
175 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
176 to gnulib.
177
08f10e02
TT
1782019-06-11 Tom Tromey <tom@tromey.com>
179
180 * Makefile.in (SFILES): Add alloc.c.
181 (OBS): Add alloc.o.
182 (IPA_OBJS): Add alloc-ipa.o.
183 (alloc-ipa.o): New target.
184 (%.o: ../%.c): New pattern rule.
185
422186a9
TT
1862019-06-10 Tom Tromey <tromey@adacore.com>
187
188 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
189 end warning with a newline.
190 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
191 newline.
192 * thread-db.c (attach_thread): Don't end warning with a newline.
193 (thread_db_notice_clone): Likewise.
194 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
195 newline.
196 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
197 end warning with a newline.
198
b02f78f9
PA
1992019-06-04 Pedro Alves <palves@redhat.com>
200
201 * server.c (captured_main): Use make_unique_xstrdup.
202
88ed7edb
TT
2032019-06-02 Tom Tromey <tom@tromey.com>
204
205 * gdbreplay.c (fromhex): Remove.
206 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
207
33a6bc35
TT
2082019-05-29 Tom Tromey <tromey@adacore.com>
209
210 * configure: Rebuild.
211
e90a813d
KB
2122019-05-06 Kevin Buettner <kevinb@redhat.com>
213
214 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
215 sign extension code on 32-bit builds.
216
353ea2d1
EZ
2172019-05-03 Eli Zaretskii <eliz@gnu.org>
218
219 * remote-utils.c:
220 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
221
b494cdff
TT
2222019-04-19 Tom Tromey <tom@tromey.com>
223
224 * server.c (struct vstop_notif): Derive from notif_event.
225 <base>: Remove.
226 (queue_stop_reply): Update.
227 (remove_all_on_match_ptid): Change type. Rewrite.
228 (discard_queued_stop_replies): Rewrite.
229 (in_queued_stop_replies_ptid): Change type.
230 (in_queued_stop_replies): Rewrite.
231 (notif_stop): Update.
232 (queue_stop_reply_callback): Update.
233 (captured_main): Don't call initialize_notif.
234 (push_stop_notification): Update.
235 * notif.c (notif_write_event, handle_notif_ack)
236 (notif_event_enque, notif_push): Update.
237 (notif_event_xfree, initialize_notif): Remove.
238 * notif.h (struct notif_event): Include <list>, not
239 "common/queue.h".
240 (struct notif_server) <queue>: Now a std::list.
241 (notif_event_p): Remove typedef.
242 (initialize_notif): Don't declare.
243 (struct notif_event): Add virtual destructor.
244
a7e559cc
AH
2452019-04-17 Alan Hayward <alan.hayward@arm.com>
246
247 * ax.c (ax_vdebug): Call debug_printf.
248 * debug.c (debug_write): New function.
249 * debug.h (debug_write): New declaration.
250 * linux-low.c (sigchld_handler): Call debug_write.
251
aeb2e706
AH
2522019-04-17 Alan Hayward <alan.hayward@arm.com>
253
254 * debug.c (debug_set_output): New function.
255 (debug_vprintf): Send output to debug_file.
256 (debug_flush): Likewise.
257 * debug.h (debug_set_output): New declaration.
258 * server.c (handle_monitor_command): Add debug-file option.
259 (captured_main): Likewise.
260
c1bc0935
AH
2612019-04-17 Alan Hayward <alan.hayward@arm.com>
262
263 * debug.c (remote_debug): Add definition.
264 * debug.h (remote_debug): Add declaration.
265 * hostio.c (remote_debug): Remove declaration.
266 * remote-utils.c (struct ui_file): Likewise.
267 (remote_debug): Likewise.
268 * remote-utils.h (remote_debug): Likewise,
269 * server.c (remote_debug): Remove definition.
270
3f52fdbc
KB
2712019-04-10 Kevin Buettner <kevinb@redhat.com>
272
273 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
274 when using a 64-bit gdbserver.
275
b0319eaa
TT
2762019-04-09 Tom Tromey <tromey@adacore.com>
277
278 * linux-low.c (select_event_lwp): Use find_thread_in_random.
279
eedc3f4f
TT
2802019-04-08 Tom Tromey <tom@tromey.com>
281
282 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
283 throw.
284 (linux_resume_one_lwp): Likewise.
285
230d2906
TT
2862019-04-08 Tom Tromey <tom@tromey.com>
287
288 * gdbreplay.c: Update.
289 * linux-low.c: Update.
290 * server.c: Update.
291
a70b8144
TT
2922019-04-08 Tom Tromey <tom@tromey.com>
293
294 * server.c: Use C++ exception handling.
295 * linux-low.c: Use C++ exception handling.
296 * gdbreplay.c: Use C++ exception handling.
297
3d6e9d23
TT
2982019-04-08 Tom Tromey <tom@tromey.com>
299
300 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
301 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
302 (captured_main, main): Update.
303 * gdbreplay.c (main): Update.
304
0570503d
PFC
3052019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
306
307 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
308 value in argument pointer, return 1 if the entry is found and 0
309 otherwise. Move comment.
310 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
311 * linux-low.h (linux_get_auxv): Declare.
312 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
313
227a9e65
TT
3142019-04-05 Tom Tromey <tromey@adacore.com>
315
316 * server.c (gdbserver_usage): Use upper-case for metasyntactic
317 variables.
318
69f4c9cc
AH
3192019-03-28 Alan Hayward <alan.hayward@arm.com>
320
321 * linux-low.c (AT_HWCAP2): Add define if not already included.
322
974c89e0
AH
3232019-03-26 Alan Hayward <alan.hayward@arm.com>
324
325 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
326 (aarch64_arch_setup): Call linux_get_hwcap.
327 * linux-arm-low.c (arm_get_hwcap): Remove function.
328 (arm_read_description): Call linux_get_hwcap.
329 * linux-low.c (linux_get_auxv): New function.
330 (linux_get_hwcap): Likewise.
331 (linux_get_hwcap2): Likewise.
332 * linux-low.h (linux_get_hwcap): New declaration.
333 (linux_get_hwcap2): Likewise.
334 * linux-ppc-low.c (ppc_get_auxv): Remove function.
335 (ppc_arch_setup): Call linux_get_hwcap.
336 * linux-s390-low.c (s390_get_hwcap): Remove function.
337 (s390_arch_setup): Call linux_get_hwcap.
338
1ef53e6b
AH
3392019-03-22 Alan Hayward <alan.hayward@arm.com>
340 Jiong Wang <jiong.wang@arm.com>
341
342 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
343 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
344 to fail.
345 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
346
ee4fbcfa
AH
3472019-03-22 Alan Hayward <alan.hayward@arm.com>
348 Jiong Wang <jiong.wang@arm.com>
349
350 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
351 (aarch64_get_hwcap): New function.
352 (aarch64_arch_setup): Read APIA hwcap.
353
6dc0ebde
AH
3542019-03-22 Alan Hayward <alan.hayward@arm.com>
355 Jiong Wang <jiong.wang@arm.com>
356
357 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
358 (initialize_low_tracepoint): Likewise.
359 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
360 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
361 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
362 (aarch64_linux_read_description): Likewise.
363 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
364
1163a4b7
JB
3652019-03-12 John Baldwin <jhb@FreeBSD.org>
366
367 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
368 i386_create_target_description for 'segments' parameter.
369 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
370 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
371 * win32-i386-low.c (i386_arch_setup): Likewise.
372
d3a70e03
TT
3732019-03-12 Tom Tromey <tromey@adacore.com>
374
375 * linux-low.c (iterate_over_lwps): Update.
376
37991b4f
TT
3772019-03-06 Tom Tromey <tom@tromey.com>
378
379 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
380 (captured_main): Use SCOPE_EXIT.
381
45950eb6
SDJ
3822019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
383
384 * configure.srv: Use '$enable_unittest' instead of '$development'
385 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
386 case.
387
43ac54fc
TT
3882019-02-27 Tom Tromey <tromey@adacore.com>
389
390 * gdbreplay.c (logchar): Handle \r\n.
391
df0da8a2
AH
3922019-02-07 Alan Hayward <alan.hayward@arm.com>
393
394 * linux-low.c (linux_attach): Add process before lwp.
395 * server.c (attach_inferior): Check if already attached.
396
1a5c2598
TT
3972019-02-07 Tom Tromey <tom@tromey.com>
398
399 * x86-tdesc.h: Rename include guard.
400 * x86-low.h: Add include guard.
401 * wincecompat.h: Rename include guard.
402 * win32-low.h: Add include guard.
403 * utils.h: Rename include guard.
404 * tracepoint.h: Rename include guard.
405 * tdesc.h: Rename include guard.
406 * target.h: Rename include guard.
407 * server.h: Rename include guard.
408 * remote-utils.h: Rename include guard.
409 * regcache.h: Rename include guard.
410 * nto-low.h: Rename include guard.
411 * notif.h: Add include guard.
412 * mem-break.h: Rename include guard.
413 * lynx-low.h: Add include guard.
414 * linux-x86-tdesc.h: Add include guard.
415 * linux-s390-tdesc.h: Add include guard.
416 * linux-ppc-tdesc-init.h: Add include guard.
417 * linux-low.h: Add include guard.
418 * linux-aarch64-tdesc.h: Add include guard.
419 * linux-aarch32-low.h: Add include guard.
420 * inferiors.h: Rename include guard.
421 * i387-fp.h: Rename include guard.
422 * hostio.h: Rename include guard.
423 * gdbthread.h: Rename include guard.
424 * gdb_proc_service.h: Rename include guard.
425 * event-loop.h: Rename include guard.
426 * dll.h: Rename include guard.
427 * debug.h: Rename include guard.
428 * ax.h: Rename include guard.
429
956cc47c
SN
4302018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
431
432 PR gdb/23985
433 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
434 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
435
a0707f3c
TT
4362019-01-25 Tom Tromey <tom@tromey.com>
437
438 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
439
0747795c
TT
4402019-01-25 Tom Tromey <tom@tromey.com>
441
442 * win32-low.c: Fix common/ includes.
443 * win32-i386-low.c: Fix common/ includes.
444 * tracepoint.c: Fix common/ includes.
445 * thread-db.c: Fix common/ includes.
446 * target.h: Fix common/ includes.
447 * symbol.c: Fix common/ includes.
448 * spu-low.c: Fix common/ includes.
449 * server.h: Fix common/ includes.
450 * server.c: Fix common/ includes.
451 * remote-utils.c: Fix common/ includes.
452 * regcache.h: Fix common/ includes.
453 * regcache.c: Fix common/ includes.
454 * nto-x86-low.c: Fix common/ includes.
455 * notif.h: Fix common/ includes.
456 * mem-break.h: Fix common/ includes.
457 * lynx-low.c: Fix common/ includes.
458 * lynx-i386-low.c: Fix common/ includes.
459 * linux-x86-tdesc-selftest.c: Fix common/ includes.
460 * linux-x86-low.c: Fix common/ includes.
461 * linux-low.c: Fix common/ includes.
462 * inferiors.h: Fix common/ includes.
463 * i387-fp.c: Fix common/ includes.
464 * hostio.c: Fix common/ includes.
465 * hostio-errno.c: Fix common/ includes.
466 * gdbthread.h: Fix common/ includes.
467 * gdbreplay.c: Fix common/ includes.
468 * fork-child.c: Fix common/ includes.
469 * event-loop.c: Fix common/ includes.
470 * ax.c:
471 (enum gdb_agent_op): Fix common/ includes.
472
be6d4f74
TT
4732019-01-21 Tom Tromey <tom@tromey.com>
474
475 * tracepoint.c: Fix includes.
476 * remote-utils.c: Fix includes.
477 * linux-x86-low.c: Fix includes.
478
66d91b39
JB
4792019-01-01 Joel Brobecker <brobecker@adacore.com>
480
481 * gdbreplay.c (gdbreplay_version): Update copyright year in
482 version message.
483 * server.c (gdbserver_version): Likewise.
484
754e3168
AH
4852018-12-05 Alan Hayward <alan.hayward@arm.com>
486
487 * linux-low.c (add_lwp): Switch ordering.
488
d105de22
TT
4892018-11-29 Tom Tromey <tom@tromey.com>
490
491 * win32-low.c (win32_join): Take pid, not process.
492 * target.h (struct target_ops) <join>: Change argument type.
493 (join_inferior): Change argument name.
494 * spu-low.c (spu_join): Take pid, not process.
495 * server.c (handle_detach): Preserve pid before destroying
496 process.
497 * lynx-low.c (lynx_join): Take pid, not process.
498 * linux-low.c (linux_join): Take pid, not process.
499
50138245
AH
5002018-11-23 Alan Hayward <alan.hayward@arm.com>
501
502 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
503 (aarch64_cannot_fetch_register): Likewise.
504 (struct linux_target_ops): Update references.
505
64f57f3d
PFC
5062018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
507
508 * linux-ppc-low.c: Include nat/linux-ptrace.h.
509
8d619c01
EBM
5102018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
511
512 * configure.srv (ipa_ppc_linux_regobj): Add
513 powerpc-isa207-htm-vsx32l-ipa.o and
514 powerpc-isa207-htm-vsx64l-ipa.o.
515 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
516 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
517 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
518 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
519 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
520 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
521 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
522 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
523 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
524 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
525 (init_registers_powerpc_isa207_htm_vsx32l)
526 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
527 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
528 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
529 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
530 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
531 (ppc_store_tm_ctarregset): New functions.
532 (ppc_regsets): Add entries for HTM regsets.
533 (ppc_arch_setup): Set htm in features struct when needed. Set
534 sizes for the HTM regsets.
535 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
536 (initialize_low_arch): Call
537 init_registers_powerpc_isa207_htm_vsx32l and
538 init_registers_powerpc_isa207_htm_vsx64l.
539 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
540 PPC_TDESC_ISA207_HTM_VSX.
541 (initialize_low_tracepoint): Call
542 init_registers_powerpc_isa207_htm_vsx32l and
543 init_registers_powerpc_isa207_htm_vsx64l.
544
232bfb86
EBM
5452018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
546
547 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
548 rs6000/power-linux-pmu.xml to srv_xmlfiles.
549 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
550 (ppc_store_pmuregset): New functions.
551 (ppc_regsets): Add entries for ebb and pmu regsets.
552 (ppc_arch_setup): Set isa207 in features struct if the ebb and
553 pmu regsets are available. Set sizes for these regsets.
554
f2cf6173
EBM
5552018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
556
557 * configure.srv (ipa_ppc_linux_regobj): Add
558 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
559 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
560 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
561 rs6000/powerpc-isa207-vsx32l.xml, and
562 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
563 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
564 <PPC_TDESC_ISA207_VSX>: New enum value.
565 (init_registers_powerpc_isa207_vsx32l): Declare.
566 (init_registers_powerpc_isa207_vsx64l): Declare.
567 * linux-ppc-low.c (ppc_fill_tarregset): New function.
568 (ppc_store_tarregset): New function.
569 (ppc_regsets): Add entry for the TAR regset.
570 (ppc_arch_setup): Set isa207 in features struct when needed. Set
571 size for the TAR regsets.
572 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
573 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
574 and init_registers_powerpc_isa207_vsx64l.
575 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
576 (initialize_low_tracepoint): Call
577 init_registers_powerpc_isa207_vsx32l and
578 init_registers_powerpc_isa207_vsx64l.
579
7ca18ed6
EBM
5802018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
581 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
582
583 * configure.srv (ipa_ppc_linux_regobj): Add
584 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
585 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
586 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
587 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
588 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
589 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
590 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
591 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
592 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
593 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
594 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
595 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
596 (ppc_hwcap): Add comment.
597 (ppc_hwcap2): New global.
598 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
599 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
600 (ppc_regsets): Add entries for the DSCR and PPR regsets.
601 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
602 when needed. Set sizes for the the DSCR and PPR regsets.
603 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
604 (initialize_low_arch): Call
605 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
606 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
607 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
608 PPC_TDESC_ISA205_PPR_DSCR_VSX.
609 (initialize_low_tracepoint): Call
610 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
611 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
612
5c849b22
PFC
6132018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
614
615 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
616
8ecfd7bd
SDJ
6172018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
618 Simon Marchi <simark@simark.ca>
619
620 * acinclude.m4: Include "../selftest.m4".
621 * configure: Regenerate.
622 * configure.ac: Use "GDB_AC_SELFTEST".
623 * configure.srv: Use "$enable_unittests" instead of
624 "$development" when checking whether unit tests have been
625 enabled.
626 * server.c (captured_main): Update message informing that
627 selftests have been disabled.
628
96643e35
TT
6292018-10-04 Tom Tromey <tom@tromey.com>
630
631 * configure: Rebuild.
632
da4ae14a
TT
6332018-10-04 Tom Tromey <tom@tromey.com>
634
635 * server.c (handle_status): Rename inner "thread".
636 (process_serial_event): Declare "res" in 'm' case.
637 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
638 (iterate_over_lwps): Rename inner "thread".
639 (linux_qxfer_libraries_svr4): Rename inner "len".
640 * gdbthread.h (find_thread_in_random): Rename inner "thread".
641
7c619dbd
GB
6422018-10-01 Gary Benson <gbenson@redhat.com>
643
644 * gdb_proc_service.h: Moved common code to
645 common/gdb_proc_service.h.
646
3795e814
GB
6472018-10-01 Gary Benson <gbenson@redhat.com>
648
649 * gdb_proc_service.h: Synchronize comments and whitespace with
650 GDB's version of this file.
651
49b036f1
TT
6522018-09-25 Tom Tromey <tom@tromey.com>
653
654 * configure: Rebuild.
655 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
656
8ff03f0b
SM
6572018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
658
659 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
660 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
661 ($(IPA_LIB)): Sort IPA_OBJS.
662
a1cd91dc
SM
6632018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
664
665 * Makefile.in: Remove references to $(ADD_DEPS).
666
752312ba
TT
6672018-09-16 Tom Tromey <tom@tromey.com>
668
669 * remote-utils.c (remote_open): Use GNU style for metasyntactic
670 variables.
671 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
672 variables.
673
f1628857
TT
6742018-09-05 Tom Tromey <tom@tromey.com>
675
676 * configure: Rebuild.
677
ad202fcc
SM
6782018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
679
680 PR build/23399
681 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
682
d3d8724a
TT
6832018-08-27 Tom Tromey <tom@tromey.com>
684
685 PR build/23087:
686 * configure: Rebuild.
687
b4f183d2
TT
6882018-08-27 Tom Tromey <tom@tromey.com>
689
690 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
691 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
692 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
693 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
694 (s390x_emit_stack_adjust): Add casts to unsigned char.
695
4e2aa472
SM
6962018-08-22 Simon Marchi <simon.marchi@ericsson.com>
697
698 PR gdb/23374
699 PR gdb/23375
700 * server.h (struct client_state) <disable_randomization>:
701 Initialize to 1.
702
cf4088a9
SM
7032018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
704
705 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
706 variable.
707 (mips_supply_ptrace_register): Likewise.
708
a0de763e
TT
7092018-07-22 Tom Tromey <tom@tromey.com>
710
711 * configure: Rebuild.
712
b0a7723d
TT
7132018-07-22 Tom Tromey <tom@tromey.com>
714
715 * win32-low.c (win32_create_inferior): Remove unused variables.
716 * gdbreplay.c (remote_open): Remove unused variable.
717 * remote-utils.c (remote_prepare): Remove unused variable.
718 * x86-tdesc.h (X86_TDESC_H): Define.
719 (amd64_expedite_regs): Define conditionally.
720 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
721 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
722 * remote-utils.c (readchar): Remove unused variable.
723
a780ef4f
PA
7242018-07-13 Pedro Alves <palves@redhat.com>
725
726 * linux-low.c (linux_kill): Change parameter to process_info
727 pointer instead of pid. Adjust.
728 * lynx-low.c (lynx_kill): Likewise.
729 * nto-low.c (nto_kill): Likewise.
730 * spu-low.c (spu_kill): Likewise.
731 * win32-low.c (win32_kill): Likewise.
732 * server.c (handle_v_kill, kill_inferior_callback)
733 (detach_or_kill_for_exit): Adjust.
734 * target.c (kill_inferior): Change parameter to process_info
735 pointer instead of pid. Adjust.
736 * target.h (struct target_ops) <kill>: Change parameter to
737 process_info pointer instead of pid. Adjust all implementations
738 and callers.
739 (kill_inferior): Likewise.
740
ef2ddb33
PA
7412018-07-13 Pedro Alves <palves@redhat.com>
742
743 * linux-low.c (linux_detach, linux_join): Change parameter to
744 process_info pointer instead of pid. Adjust.
745 * lynx-low.c (lynx_detach, lynx_join): Likewise.
746 * nto-low.c (nto_detach): Likewise.
747 * spu-low.c (spu_detach, spu_join): Likewise.
748 * win32-low.c (win32_detach, win32_join): Likewise.
749 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
750 * target.h (struct target_ops) <detach, join>: Change parameter to
751 process_info pointer instead of pid. Adjust all implementations
752 and callers.
753 (detach_inferior, join_inferior): Rename 'pid' parameter to
754 'proc'.
755
c7ab0aef
SDJ
7562018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
757 Jan Kratochvil <jan.kratochvil@redhat.com>
758 Paul Fertser <fercerpav@gmail.com>
759 Tsutomu Seki <sekiriki@gmail.com>
760
761 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
762 (OBS): Add 'common/netstuff.o'.
763 (GDBREPLAY_OBS): Likewise.
764 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
765 (remote_open): Implement support for IPv6
766 connections.
767 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
768 and 'wspiapi.h'.
769 (handle_accept_event): Accept connections from IPv6 sources.
770 (remote_prepare): Handle IPv6-style hostnames; implement
771 support for IPv6 connections.
772 (remote_open): Implement support for printing connections from
773 IPv6 sources.
774
31445d10
PA
7752018-07-11 Pedro Alves <palves@redhat.com>
776
777 PR gdb/23377
778 * mem-break.c (any_persistent_commands): Add process_info
779 parameter and use it instead of relying on the current process.
780 Change return type to bool.
781 * mem-break.h (any_persistent_commands): Add process_info
782 parameter and change return type to bool.
783 * server.c (handle_detach): Remove require_running_or_return call.
784 Look up the process_info for the process we're about to detach.
785 If not found, return back error to GDB. Adjust
786 any_persistent_commands call to pass down a process pointer.
787
cb197132
PA
7882018-07-11 Pedro Alves <palves@redhat.com>
789
790 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
791 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
792 instead of collect_register_by_name.
793 * regcache.c (regcache_raw_get_unsigned_by_name): New.
794 * regcache.h (regcache_raw_get_unsigned_by_name): New.
795
1b919490
VB
7962018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
797 Pedro Alves <palves@redhat.com>
798
799 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
800
d7e15655
TT
8012018-07-03 Tom Tromey <tom@tromey.com>
802
803 * linux-low.c: Update.
804 * lynx-low.c: Update.
805 * mem-break.c: Update.
806 * nto-low.c: Update.
807 * remote-utils.c: Update.
808 * server.c: Update.
809 * spu-low.c: Update.
810 * target.c: Update.
811 * win32-low.c: Update.
812
26a57c92
TT
8132018-07-03 Tom Tromey <tom@tromey.com>
814
815 * server.c: Update.
816
0e998d96
TT
8172018-07-03 Tom Tromey <tom@tromey.com>
818
819 * linux-low.c: Update.
820
cc6bcb54
TT
8212018-07-03 Tom Tromey <tom@tromey.com>
822
823 * target.c: Update.
824
e38504b3
TT
8252018-07-03 Tom Tromey <tom@tromey.com>
826
827 * linux-low.c: Update.
828 * linux-mips-low.c: Update.
829 * lynx-low.c: Update.
830 * nto-low.c: Update.
831 * remote-utils.c: Update.
832 * server.c: Update.
833 * spu-low.c: Update.
834 * target.c: Update.
835 * thread-db.c: Update.
836
e99b03dc
TT
8372018-07-03 Tom Tromey <tom@tromey.com>
838
839 * linux-low.c: Update.
840 * linux-mips-low.c: Update.
841 * lynx-low.c: Update.
842 * mem-break.c: Update.
843 * nto-low.c: Update.
844 * remote-utils.c: Update.
845 * server.c: Update.
846 * spu-low.c: Update.
847 * target.c: Update.
848 * tracepoint.c: Update.
849
f2907e49
TT
8502018-07-03 Tom Tromey <tom@tromey.com>
851
852 * linux-low.c: Update.
853 * linux-ppc-low.c: Update.
854 * linux-x86-low.c: Update.
855 * proc-service.c: Update.
856 * server.c: Update.
857 * spu-low.c: Update.
858 * thread-db.c: Update.
859 * win32-low.c: Update.
860
fd79271b
TT
8612018-07-03 Tom Tromey <tom@tromey.com>
862
863 * linux-low.c: Update.
864 * lynx-low.c: Update.
865 * nto-low.c: Update.
866 * remote-utils.c: Update.
867 * spu-low.c: Update.
868 * thread-db.c: Update.
869 * win32-low.c: Update.
870
c0867626
SDJ
8712018-06-29 Joel Brobecker <brobecker@adacore.com>
872
873 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
874 parameter in call to 'amd64_create_target_description'.
875
2512d7ef
JK
8762018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
877
878 * x86-tdesc.h: Remove executable permission flag.
879
d0ac1c44
SM
8802018-06-19 Simon Marchi <simon.marchi@ericsson.com>
881
882 * configure.ac: Remove AC_PREREQ, add missing quoting.
883 * configure: Re-generate.
884 * config.in: Re-generate.
885 * aclocal.m4: Re-generate.
886
c4eb05ff
SM
8872018-06-18 Simon Marchi <simon.marchi@ericsson.com>
888
889 * tracepoint.h (current_traceframe): Remove declaration.
890
02895270
AH
8912018-06-18 Alan Hayward <alan.hayward@arm.com>
892
893 * linux-aarch64-low.c (is_sve_tdesc): New function.
894 (aarch64_sve_regs_copy_to_regcache): Likewise.
895 (aarch64_sve_regs_copy_from_regcache): Likewise.
896 (aarch64_regs_info): Add SVE checks.
897 (initialize_low_arch): Initialize SVE.
898
e9902bfc
AH
8992018-06-18 Alan Hayward <alan.hayward@arm.com>
900
901 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
902
fefa175e
AH
9032018-06-11 Alan Hayward <alan.hayward@arm.com>
904
905 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
906 (initialize_low_tracepoint): Likewise
907 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
908 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
909 param.
910 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
911 checks.
912 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
913
b91ad3ff
AH
9142018-06-11 Alan Hayward <alan.hayward@arm.com>
915
916 * server.h (PBUFSIZ): Increase size
917
f868386e
AH
9182018-06-11 Alan Hayward <alan.hayward@arm.com>
919
920 * regcache.c (regcache::raw_compare): New function.
921 * regcache.h (regcache::raw_compare): New declaration.
922
9c861883
AH
9232018-06-11 Alan Hayward <alan.hayward@arm.com>
924
925 * regcache.c (new_register_cache): Use new.
926 (free_register_cache): Use delete.
927 (register_data): Use const.
928 (supply_register): Move body inside regcache.
929 (regcache::raw_supply): New override function.
930 (collect_register): Move body inside regcache.
931 (regcache::raw_collect): New override function.
932 (regcache::get_register_status): New override function.
933 * regcache.h (struct regcache): Inherit from reg_buffer_common.
934
40591844
TT
9352018-06-09 Tom Tromey <tom@tromey.com>
936
937 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
938 declare queue.
939 (event_queue): Use std::queue.
940 (gdb_event_xfree): Remove.
941 (initialize_event_loop, process_event, wait_for_event): Update.
942
6341380d
SC
9432018-06-08 Stan Cox <scox@redhat.com>
944
945 * win32-low.c (win32_create_inferior): last_ptid and last_status
946 moved to client_state.
947
03349c93
PA
9482018-06-08 Pedro Alves <palves@redhat.com>
949
950 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
951 common/common-exceptions.o, common/common-utils.o,
952 common/errors.o, common/print-utils.o and utils.o.
953 * gdbreplay.c: Include "common-defs.h" instead of the two
954 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
955 string.h or alloca.h.
956 (perror_with_name): Delete.
957 (remote_open): Use xstrdup instead of strdup.
958 (main): Rename to ...
959 (captured_main): ... this.
960 (main): New.
961
8dcc53b3
TT
9622018-06-08 Tom Tromey <tom@tromey.com>
963
964 * linux-low.c (linux_low_read_btrace): Update.
965
c12a5089
SC
9662018-06-04 Stan Cox <scox@redhat.com>
967
968 * server.h (struct client_state): New.
969 * server.c (cont_thread, general_thread, multi_process)
970 (report_fork_events, report_vfork_events, report_exec_events)
971 (report_thread_events, swbreak_feature, hwbreak_feature)
972 (vCont_supported, disable_randomization, pass_signals)
973 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
974 Moved to client_state.
975 * remote-utils.c (remote_debug, noack_mode)
976 (transport_is_reliable): Moved to client_state.
977 * tracepoint.c (current_traceframe): Moved to client_state.
978
979 Update all callers.
980 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
981 linux-low.c, remote-utils.h, target.c: Use client_state.
982
122394f1
AH
9832018-05-31 Alan Hayward <alan.hayward@arm.com>
984
985 * configure.srv: Add new c/h file.
986
95228a0d
AH
9872018-05-31 Alan Hayward <alan.hayward@arm.com>
988
989 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
990 null VQ.
991
d8dab6c3
MR
9922018-05-25 Maciej W. Rozycki <macro@mips.com>
993
994 * gdb.arch/mips-fpregset-core.exp: New test.
995 * gdb.arch/mips-fpregset-core.c: New test source.
996
81e25b7c
EK
9972018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
998
999 PR server/23198
1000 * hostio.c (require_int): Do not report overflow for integers
1001 between 0xfffffff and 0x7fffffff.
1002
7e947ad3
MR
10032018-05-22 Maciej W. Rozycki <macro@mips.com>
1004
1005 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1006 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1007 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1008 functions.
1009 (the_low_target): Wire them.
1010
1d75a658
PFC
10112018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1012
1013 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1014 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1015 mode. Call collect_register_by_name with vscr using
1016 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1017 (ppc_store_vrregset): Add and set vscr_offset variable as in
1018 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1019 vscr_offset.
1020
d078308a
PFC
10212018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1022
1023 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1024 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1025 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1026
7273b5fc
PFC
10272018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1028
1029 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1030 (ppc_store_vsxregset): Likewise.
1031 (ppc_fill_vrregset): Likewise.
1032 (ppc_store_vrregset): Likewise.
1033 (ppc_fill_evrregset): Likewise.
1034 (ppc_store_evrregset): Likewise.
1035 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1036 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1037 needed.
1038
2e077f5e
PFC
10392018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1040
1041 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1042 wordsize of the inferior. Call ppc_linux_target_wordsize.
1043
bd64614e
PFC
10442018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1045
1046 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1047 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1048 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1049 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1050 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1051 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1052 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1053 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1054 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1055 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1056 (tdesc_powerpc_e500l): Remove.
1057 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1058 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1059 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1060 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1061 linux-ppc-tdesc.h.
1062 (ppc_arch_setup): Remove target description matching code. Fill a
1063 ppc_linux_features struct and call ppc_linux_match_description
1064 with it.
1065
75d74cca
MR
10662018-05-22 Maciej W. Rozycki <macro@mips.com>
1067
1068 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1069 width of the requested register exceeds the width of the
1070 `ptrace' data type.
1071 (mips_cannot_store_register): Likewise.
1072
e4439e43
MR
10732018-05-21 Maciej W. Rozycki <macro@mips.com>
1074
1075 * linux-mips-low.c (mips_fetch_register): New function. Update
1076 preceding comment.
1077 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1078 (the_low_target): Wire `mips_fetch_register'.
1079
55271bf9
JB
10802018-05-10 Joel Brobecker <brobecker@adacore.com>
1081
1082 * lynx-i386-low.c (LYNXOS_178): New macro.
1083 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1084 the layout on LynxOS-178.
1085 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1086 handle floating point registers that are not supported by
1087 LynxOS-178.
1088
1a34f210
TT
10892018-05-10 Tom Tromey <tom@tromey.com>
1090
1091 * configure: Rebuild.
1092
190852c8
JB
10932018-05-10 Joel Brobecker <brobecker@adacore.com>
1094
1095 PR server/23158:
1096 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1097 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1098 Use it to set the expedite_regs field in the given tdesc.
1099 * x86-tdesc.h: New file.
1100 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1101 Adjust following the addition of the new expedite_regs parameter
1102 to init_target_desc.
1103 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1104 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1105 (i386_linux_read_description, amd64_linux_read_description):
1106 Adjust following the addition of the new expedite_regs parameter
1107 to init_target_desc.
1108 * lynx-i386-low.c: #include "x86-tdesc.h".
1109 (lynx_i386_arch_setup): Adjust following the addition of the new
1110 expedite_regs parameter to init_target_desc.
1111 * nto-x86-low.c: #include "x86-tdesc.h".
1112 (nto_x86_arch_setup): Adjust following the addition of the new
1113 expedite_regs parameter to init_target_desc.
1114 * win32-i386-low.c: #include "x86-tdesc.h".
1115 (i386_arch_setup): Adjust following the addition of the new
1116 expedite_regs parameter to init_target_desc.
1117
7dbac825
JB
11182018-05-10 Joel Brobecker <brobecker@adacore.com>
1119
1120 PR server/23158:
1121 * win32-low.c (win32_create_inferior): Add call to my_wait
1122 setting last_status global.
1123
906994d9
JB
11242018-05-10 Joel Brobecker <brobecker@adacore.com>
1125
1126 PR server/23158:
1127 * win32-low.c (create_process): Only call gdb_tilde_expand if
1128 inferior_cwd is not NULL.
1129
8ee22052
AB
11302018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1131
1132 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1133 registers to the cache if their values have changed.
1134 (i387_xsave_to_cache): Provide default values for x87 control
1135 registers when these features are available, but disabled.
1136 * regcache.c (supply_register_by_name_zeroed): New function.
1137 * regcache.h (supply_register_by_name_zeroed): Declare new
1138 function.
1139
aff689d3
TT
11402018-05-07 Tom Tromey <tom@tromey.com>
1141
1142 * configure: Rebuild.
1143
85e26832
TT
11442018-05-04 Tom Tromey <tom@tromey.com>
1145
1146 * configure: Rebuild.
1147
a3b60e45
JK
11482018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1149 Pedro Alves <palves@redhat.com>
1150
1151 * linux-aarch64-low.c (aarch64_stopped_data_address):
1152 Likewise.
1153
632e107b
TT
11542018-04-27 Tom Tromey <tom@tromey.com>
1155
1156 * configure: Rebuild.
1157
458412c3
TT
11582018-04-23 Tom Tromey <tom@tromey.com>
1159
1160 * configure: Rebuild.
1161
f31c089e
SM
11622018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1163
1164 * Makefile.in (depcomp): Add "..".
1165 (all_deps_files): New and use it.
1166
b319b098
AH
11672018-04-18 Alan Hayward <alan.hayward@arm.com>
1168
1169 * configure.srv (aarch64*-*-linux*): Don't include xml.
1170 (i[34567]86-*-cygwin*): Likewise.
1171 (i[34567]86-*-linux*): Likewise.
1172 (i[34567]86-*-lynxos*): Likewise.
1173 (i[34567]86-*-mingw32ce*): Likewise.
1174 (i[34567]86-*-mingw*): Likewise.
1175 (i[34567]86-*-nto*): Likewise.
1176 (tic6x-*-uclinux): Likewise.
1177 (x86_64-*-linux*): Likewise.
1178 (x86_64-*-mingw*): Likewise.
1179 (x86_64-*-cygwin*): Likewise.
1180
3b74854b
AH
11812018-04-18 Alan Hayward <alan.hayward@arm.com>
1182
1183 * tdesc.c: Remove xml parameter.
1184
e98577a9
AH
11852018-04-18 Alan Hayward <alan.hayward@arm.com>
1186
1187 * server.c (get_features_xml): Remove cast.
1188 * tdesc.c (void target_desc::accept): Fill in function.
1189 (tdesc_get_features_xml): Remove old xml creation.
1190 (print_xml_feature::visit_pre): Add xml vistor.
1191 * tdesc.h (struct target_desc): Make xmltarget mutable.
1192 (tdesc_get_features_xml): Remove declaration.
1193
d278f585
AH
11942018-04-18 Alan Hayward <alan.hayward@arm.com>
1195
1196 * tdesc.c (tdesc_architecture_name): Add new function.
1197 (tdesc_osabi_name): Likewise.
1198 (tdesc_get_features_xml): Use new functions.
1199
eee8a18d
AH
12002018-04-18 Alan Hayward <alan.hayward@arm.com>
1201
1202 * tdesc.c (tdesc_create_flags): Remove.
1203 (tdesc_add_flag): Likewise.
1204 (tdesc_named_type): Likewise.
1205 (tdesc_create_union): Likewise.
1206 (tdesc_create_struct): Likewise.
1207 (tdesc_create_vector): Likewise.
1208 (tdesc_add_bitfield): Likewise.
1209 (tdesc_add_field): Likewise.
1210 (tdesc_set_struct_size): Likewise.
1211
82ec9bc7
AH
12122018-04-18 Alan Hayward <alan.hayward@arm.com>
1213
1214 * tdesc.c (~target_desc): Remove implictly deleted items.
1215 (init_target_desc): Iterate all features.
1216 (tdesc_get_features_xml): Use vector.
1217 (tdesc_create_feature): Create feature.
1218 * tdesc.h (tdesc_feature) Remove
1219 (target_desc): Add features.
1220
ea3e7d71
AH
12212018-04-18 Alan Hayward <alan.hayward@arm.com>
1222
1223 * Makefile.in: Add common/tdesc.c
1224 * tdesc.c (init_target_desc): init all reg_defs from register
1225 vector.
1226 (tdesc_create_reg): Create tdesc_reg.
1227 * tdesc.h (tdesc_feature): Add register vector.
1228
17d08cd4
SM
12292018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1230
1231 * tdesc.h (struct target_desc) <features>: Change type to
1232 std::vector<std::string>.
1233 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1234 changes.
1235 (tdesc_get_features_xml): Likewise.
1236 (tdesc_create_feature): Likewise.
1237
5cd3e386
AH
12382018-03-26 Alan Hayward <alan.hayward@arm.com>
1239
1240 * regcache.c (find_register_by_number): Return a ref.
1241 (find_regno): Use references.
1242 (register_size): Likewise.
1243 (register_data): Likewise.
1244 * tdesc.c (target_desc::~target_desc): Remove free calls.
1245 (target_desc::operator==): Use std::vector compare.
1246 (init_target_desc): Use reference.
1247 (tdesc_create_reg): Use reg constructors.
1248 * tdesc.h (struct target_desc): Replace pointer with object.
1249
dff7492c
AH
12502018-03-23 Alan Hayward <alan.hayward@arm.com>
1251
1252 * regcache.c (find_register_by_number): Make static.
1253 (find_regno): Use find_register_by_number
1254 * regcache.h (struct reg): Remove declaration.
1255
d80e5242
AH
12562018-03-23 Alan Hayward <alan.hayward@arm.com>
1257
1258 * tdesc.c (target_desc::~target_desc): Move to here.
1259 (target_desc::operator==): Likewise.
1260 * tdesc.h (target_desc::~target_desc): Move from here.
1261 (target_desc::operator==): Likewise.
1262
f69c5afb
AA
12632018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1264
1265 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1266
ce29f843
AA
12672018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1268
1269 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1270 S390_TDESC_GS.
1271 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1272 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1273 and init_registers_s390_gs_linux64.
1274
c49bd90b
AA
12752018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1276
1277 * linux-s390-low.c (s390_fill_gs): Remove function.
1278 (s390_fill_gsbc): Remove function.
1279 (s390_regsets): Set fill functions for the guarded storage regsets
1280 to NULL.
1281
7edb9bd3
AA
12822018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1283
1284 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1285 the word size. Add comment.
1286 (s390_get_wordsize): New function.
1287 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1288 pswm with it. Instead, use s390_get_wordsize to determine the
1289 word size first and derive the correct tdesc from that directly.
1290
39be3c7e
SM
12912018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1292
1293 * Makefile.in: Include silent-rules.mk.
1294 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1295 (COMPILE): Add ECHO_CXX.
1296 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1297 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1298 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1299 (version-generated.c): Add ECHO_GEN.
1300 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1301 (IPAGENT_COMPILE): Add ECHO_CXX.
1302 (%-generated.c): Add ECHO_REGDAT.
1303
3ae9ce5d
TT
13042018-03-14 Tom Tromey <tom@tromey.com>
1305
1306 PR cli/14977:
1307 * ax.c (ax_printf): Special case for NULL.
1308
e6a58aa8
SM
13092018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1310
1311 * linux-low.c (linux_qxfer_libraries_svr4): Use
1312 xml_escape_text_append.
1313
f6e8a41e
SM
13142018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1315
1316 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1317
b9671caf
SM
13182018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1319
1320 * server.c (handle_general_set): Remove unnecessary xstrdup.
1321
e80aaf61
SM
13222018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1323
1324 * server.c (parse_debug_format_options): Adjust to
1325 delim_string_to_char_ptr_vec changes.
1326 * thread-db.c (thread_db_load_search): Adjust to
1327 dirnames_to_char_ptr_vec changes.
1328
b1223e78
MM
13292018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1330
1331 * target.h (target_enable_btrace, target_disable_btrace)
1332 (target_read_btrace, target_read_btrace_conf): Turn macro into
1333 inline function. Throw error if target method is not defined.
1334 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1335 check for btrace target method. Be prepared to handle exceptions
1336 from btrace target methods.
1337
81561546
SDJ
13382018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1339
1340 * server.c (captured_main): Change order of error message printed
1341 when the current working directory cannot be found.
1342
25e3c82c
SDJ
13432018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1344
1345 * server.c: Include "filenames.h" and "pathstuff.h".
1346 (program_name): Delete variable.
1347 (program_path): New anonymous class.
1348 (get_exec_wrapper): Use "program_path" instead of
1349 "program_name".
1350 (handle_v_run): Likewise.
1351 (captured_main): Likewise.
1352 (process_serial_event): Likewise.
1353
b4987c95
SDJ
13542018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1355
1356 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1357 (OBJS): Add "pathstuff.o".
1358 * server.c (current_directory): New global variable.
1359 (captured_main): Initialize "current_directory".
1360
f46cd62a
AH
13612018-02-26 Alan Hayward <alan.hayward@arm.com>
1362
1363 * tdesc.c: Use common/tdesc.h.
1364 * tdesc.h: Likewise.
1365
a543c5ca
AH
13662018-02-20 Alan Hayward <alan.hayward@arm.com>
1367 Simon Marchi <simon.marchi@ericsson.com>
1368
1369 * Makefile.in: Switch order of make rules.
1370
b5884fa7
AH
13712018-02-19 Alan Hayward <alan.hayward@arm.com>
1372
1373 * Makefile.in: Add common directory in build.
1374 * configure.ac: Add common reference.
1375 * configure: Regenerate.
1376
de6242d3
MM
13772018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1378
1379 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1380 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1381 * spu-low.c (spu_target_ops): Likewise.
1382 * win32-low.c (win32_target_ops): Likewise.
1383 * server.c (supported_btrace_packets): Report packets unconditionally.
1384 * target.h (target_ops) <supports_btrace>: Remove.
1385 (target_supports_btrace): Remove.
1386
9ee23a85
MM
13872018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1388
1389 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1390 (handle_btrace_disable): Change return type to void. Use exceptions
1391 to report errors.
1392 (handle_btrace_general_set): Catch exception and copy message to
1393 return message.
1394
8ce47547
TT
13952018-02-08 Tom Tromey <tom@tromey.com>
1396
1397 * linux-low.c (install_software_single_step_breakpoints): Use
1398 make_scoped_restore.
1399 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1400 (do_restore_current_thread_cleanup): Remove.
1401 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1402 declare.
1403
45dd3607
TT
14042018-02-08 Tom Tromey <tom@tromey.com>
1405
1406 * mem-break.c (set_raw_breakpoint_at): Use
1407 gdb::unique_xmalloc_ptr.
1408
e671cd59
PA
14092018-01-30 Pedro Alves <palves@redhat.com>
1410
1411 PR gdb/13211
1412 * target.c (target_terminal::terminal_state): Rename to ...
1413 (target_terminal::m_terminal_state): ... this.
1414
a0aad537
JC
14152018-01-19 James Clarke <jrtc27@jrtc27.com>
1416
1417 * linux-low.c (handle_extended_wait): Surround call to
1418 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1419
4d9b86e1
SM
14202018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1421
1422 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1423 linux_ptrace_attach_fail_reason_string now returning an
1424 std::string.
1425 (linux_attach): Likewise.
1426 * thread-db.c (attach_thread): Likewise.
1427
f517c180
EA
14282018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1429
1430 PR gdb/21559
1431 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1432 checking for fs_base/gs_base fields in struct user_regs_struct.
1433 * configure: Regenerate.
1434
9a70f35c
YQ
14352018-01-16 Yao Qi <yao.qi@linaro.org>
1436
1437 PR gdb/18749
1438 * linux-low.c (fetch_register): Call supply_register instead of
1439 error.
1440
605fd3c6
YQ
14412018-01-08 Yao Qi <yao.qi@linaro.org>
1442 Simon Marchi <simon.marchi@ericsson.com>
1443
1444 * Makefile.in (OBS): Remove selftest.o.
1445 * configure.ac: Set srv_selftest_objs if $development is true.
1446 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1447 * configure: Re-generated.
1448 * server.c (captured_main): Wrap variable selftest_filter with
1449 GDB_SELF_TEST.
1450
2cc05030
SM
14512018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1452
1453 * server.c (parse_debug_format_options): Return std::string.
1454 (handle_monitor_command, captured_main): Adjust.
1455
e379cee6
PA
14562018-01-05 Pedro Alves <palves@redhat.com>
1457
1458 PR gdb/18653
1459 * server.c (captured_main): Pass quiet=false to
1460 save_original_signals_state.
1461
82e1e79a
JB
14622018-01-01 Joel Brobecker <brobecker@adacore.com>
1463
1464 * gdbreplay.c (gdbreplay_version): Update copyright year in
1465 version message.
1466 * server.c (gdbserver_version): Likewise.
1467
8e481c3b
TT
14682017-12-08 Tom Tromey <tom@tromey.com>
1469
1470 * ax.c (ax_printf): Update.
1471
a8806230
YQ
14722017-12-07 Yao Qi <yao.qi@linaro.org>
1473
1474 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1475 aarch64_linux_read_description.
1476 * linux-amd64-ipa.c (idx2mask): New array.
1477 (get_ipa_tdesc): Move idx2mask out.
1478 (initialize_low_tracepoint): Initialize target descriptions.
1479 * linux-i386-ipa.c (idx2mask): New array.
1480 (get_ipa_tdesc): Move idx2mask out.
1481 (initialize_low_tracepoint): Initialize target descriptions.
1482
d4a0e8b5
SM
14832017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1484
1485 * tdesc.c (struct tdesc_type): Change return type.
1486 (tdesc_add_flag): Change parameter type.
1487 (tdesc_add_bitfield): Likewise.
1488 (tdesc_add_field): Likewise.
1489 (tdesc_set_struct_size): Likewise.
1490
798a7429
SM
14912017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1492
1493 * regcache.c (registers_to_string): Remove unused variable.
1494
c0e15c9b
SM
14952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1496
1497 * inferiors.c (for_each_inferior_with_data): Remove.
1498 * inferiors.h (for_each_inferior_with_data): Remove.
1499 * server.c (handle_qxfer_threads_worker): Change parameter type.
1500 (handle_qxfer_threads_proper): Use for_each_thread.
1501
f0045347
SM
15022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1503
1504 * inferiors.c (for_each_inferior): Remove.
1505 (clear_inferiors): Use for_each_thread.
1506 * inferiors.h (for_each_inferior): Remove.
1507 * linux-low.c (linux_wait_for_event_filtered): Use
1508 for_each_thread.
1509 (linux_stabilize_threads): Likewise.
1510 * regcache.c (regcache_release): Likewise.
1511 * server.c (gdb_wants_all_threads_stopped): Likewise.
1512 (clear_pending_status_callback): Remove.
1513 (handle_status): Use for_each_thread.
1514 (captured_main): Likewise.
1515 * win32-low.c (child_init_thread_list): Likewise.
1516 (win32_clear_inferiors): Likewise.
1517 (fake_breakpoint_event): Likewise.
1518
9521758b
SM
15192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1520
1521 * inferiors.h (find_inferior): Remove.
1522 * inferiors.c (find_inferior): Remove.
1523
8f86d7aa
SM
15242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1525
1526 * linux-low.c (resume_status_pending_p): Update comment.
1527 (need_step_over_p): Update comment.
1528
e2b44075
SM
15292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1530
1531 * linux-low.c (proceed_one_lwp): Return void, change parameter
1532 type.
1533 (unsuspend_and_proceed_one_lwp): Likewise.
1534 (proceed_all_lwps): Use for_each_thread.
1535 (unstop_all_lwps): Likewise.
1536
c80825ff
SM
15372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1538
1539 * linux-low.c (linux_resume_one_thread): Return void, take
1540 parameter directly.
1541 (linux_resume): Use for_each_thread.
1542
df3e4dbe
SM
15432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1544
1545 * linux-low.c (send_sigstop_callback): Return void, change
1546 parameter type. Rename to...
1547 (send_sigstop): ... this.
1548 (suspend_and_send_sigstop_callback): Return void, change parameter
1549 type. Rename to...
1550 (suspend_and_send_sigstop): ... this.
1551 (stop_all_lwps): Use for_each_thread.
1552
5a6b0a41
SM
15532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1554
1555 * linux-low.c (lwp_running): Return bool, remove unused
1556 argument.
1557 (linux_stabilize_threads): Use find_thread.
1558
39a64da5
SM
15592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1560
1561 * linux-low.c (select_singlestep_lwp_callback): Remove.
1562 (count_events_callback): Remove.
1563 (select_event_lwp_callback): Remove.
1564 (select_event_lwp): Use find_thread/for_each_thread.
1565
a1385b7b
SM
15662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1567
1568 * linux-low.c (not_stopped_callback): Return bool, take filter
1569 argument directly.
1570 (linux_wait_for_event_filtered): Use find_thread.
1571 (linux_wait_1): Likewise.
1572
454296a2
SM
15732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1574
1575 * linux-low.c (same_lwp): Remove.
1576 (find_lwp_pid): Use find_thread.
1577
6b2a85da
SM
15782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1579
1580 * linux-low.c (delete_lwp_callback): Remove.
1581 (linux_mourn): Use for_each_thread.
1582
798a38e8
SM
15832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1584
1585 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1586 args parameter, don't check for pid.
1587 (linux_detach): Use for_each_thread.
1588
e4eb0dec
SM
15892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1590
1591 * linux-low.c (struct counter): Remove.
1592 (second_thread_of_pid_p): Remove.
1593 (last_thread_of_process_p): Use find_thread.
1594
83e1b6c1
SM
15952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1596
1597 * inferiors.c (find_inferior_in_random): Remove.
1598 * inferiors.h (find_inferior_in_random): Remove.
1599 * linux-low.c (status_pending_p_callback): Return bool, accept
1600 parameter ptid directly.
1601 (linux_wait_for_event_filtered): Use find_thread_in_random.
1602 (linux_wait_1): Likewise.
1603
8dc7b443
SM
16042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1605
1606 * inferiors.c (find_inferior_id): Remove.
1607 (find_thread_ptid): Move implemention from find_inferior_id to
1608 here.
1609 * inferiors.h (find_inferior_id): Remove.
1610 * server.c (handle_status): Use find_thread_ptid.
1611 (process_serial_event): Likewise.
1612 * thread-db.c (find_one_thread): Likewise.
1613 (thread_db_thread_handle): Likewise.
1614 * win32-low.c (thread_rec): Likewise.
1615 (child_delete_thread): Likewise.
1616 (win32_thread_alive): Likewise.
1617 (get_child_debug_event): Likewise.
1618
da25033c
SM
16192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1620
1621 * linux-mips-low.c (update_watch_registers_callback): Return
1622 void, remove pid_p parameter, don't check for pid.
1623 (mips_insert_point, mips_remove_point): Use for_each_thread.
1624
c91bb56b
SM
16252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1626
1627 * lynx.low (lynx_delete_thread_callback): Remove.
1628 (lynx_mourn): Use for_each_thread.
1629
634a3254
SM
16302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1631
1632 * regcache.c (regcache_invalidate_one): Remove.
1633 (regcache_invalidate_pid): use for_each_thread.
1634
41272101
TT
16352017-11-26 Tom Tromey <tom@tromey.com>
1636
1637 * linux-low.c (linux_create_inferior): Update.
1638
f5291a6f
UW
16392017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1640
1641 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1642
6654d750
AH
16432017-11-24 Alan Hayward <alan.hayward@arm.com>
1644
1645 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1646 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1647 * linux-aarch64-tdesc-selftest.c: New file.
1648 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1649
16502017-11-24 Alan Hayward <alan.hayward@arm.com>
1651
1652 * configure.srv: Add new file.
1653 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1654 * linux-aarch64-tdesc-selftest.c: New file.
1655 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1656
49bdb7ee
AH
16572017-11-24 Alan Hayward <alan.hayward@arm.com>
1658
1659 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1660 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1661 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1662
d6d7ce56
AH
16632017-11-24 Alan Hayward <alan.hayward@arm.com>
1664
1665 * configure.srv: Add new files.
1666 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1667 aarch64_linux_read_description.
1668 * linux-aarch64-low.c (aarch64_linux_read_description):
1669 Merge with aarch64_arch_setup.
1670 (aarch64_arch_setup): Call aarch64_linux_read_description.
1671 * linux-aarch64-tdesc.c: New file.
1672 * linux-aarch64-tdesc.h: New file.
1673
506fe5f4
YQ
16742017-11-24 Yao Qi <yao.qi@linaro.org>
1675
1676 * configure.srv: Set $srv_regobj for tic6x-linux.
1677 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1678 (tic6x_read_description): Move some code to tic6x_arch_setup.
1679 (tic6x_tdesc_test): New function.
1680 (initialize_low_arch): Call selftests::register_test.
1681
29f9a567
YQ
16822017-11-22 Yao Qi <yao.qi@linaro.org>
1683
1684 * remote-utils.c (prepare_resume_reply): Use memcpy.
1685
578290ec
SM
16862017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1687
1688 * linux-low.c (kill_one_lwp_callback): Return void, take
1689 argument directly, don't filter on pid.
1690 (linux_kill): Use for_each_thread.
1691
eca55aec
SM
16922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1693
1694 * linux-low.c (need_step_over_p): Return bool, remove dummy
1695 argument.
1696 (linux_resume, proceed_all_lwps): Use find_thread.
1697
25c28b4d
SM
16982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1699
1700 * linux-low.c (resume_status_pending_p): Return bool, remove
1701 flag_p argument.
1702 (linux_resume): Use find_thread.
1703
5fdda392
SM
17042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1705
1706 * linux-low.c (struct thread_resume_array): Remove.
1707 (linux_set_resume_request): Return void, take arguments
1708 directly.
1709 (linux_resume): Use for_each_thread.
1710
fcb056a5
SM
17112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1712
1713 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1714 return bool, remove data argument.
1715 (linux_stabilize_threads): Use find_thread.
1716
139720c5
SM
17172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1718
1719 * linux-low.c (unsuspend_one_lwp): Remove.
1720 (unsuspend_all_lwps): Use for_each_thread, inline code from
1721 unsuspend_one_lwp.
1722
6d1e5673
SM
17232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1724
1725 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1726 * linux-low.c (struct iterate_over_lwps_args): Remove.
1727 (iterate_over_lwps_filter): Remove.
1728 (iterate_over_lwps): Use find_thread.
1729
bbf550d5
SM
17302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1731
1732 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1733 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1734 code from reset_lwp_ptrace_options_callback.
1735
00192f77
SM
17362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1737
1738 * linux-arm-low.c (struct update_registers_data): Remove.
1739 (update_registers_callback): Return void, take arguments
1740 directly, don't check thread's pid.
1741 (arm_insert_point, arm_remove_point): Use for_each_thread.
1742
2bee2b6c
SM
17432017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1744
1745 * win32-low.c (continue_one_thread): Return void, take argument
1746 directly.
1747 (child_continue): Use for_each_thread.
1748
0b360f19
SM
17492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1750
1751 * win32-i386-low.c (update_debug_registers_callback): Rename
1752 to ...
1753 (update_debug_registers): ... this, return void, remove pid_p arg.
1754 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1755
f27866ba
SM
17562017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1757
1758 * inferiors.h (struct process_info): Add constructor, initialize
1759 fields..
1760 <syscalls_to_catch>: Change type to std::vector<int>.
1761 * inferiors.c (add_process): Allocate process_info with new.
1762 (remove_process): Free process_info with delete.
1763 * linux-low.c (handle_extended_wait): Adjust.
1764 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1765 * server.c (handle_general_set): Adjust.
1766
e849ea89
PA
17672017-11-16 Pedro Alves <palves@redhat.com>
1768
1769 * remote-utils.c (remote_close): Block SIGIO signals instead of
1770 uninstalling the SIGIO handler.
1771
1d0aa65c
AH
17722017-11-16 Alan Hayward <alan.hayward@arm.com>
1773
1774 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1775
3491a34c
YQ
17762017-11-16 Yao Qi <yao.qi@linaro.org>
1777
1778 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1779 (tic6x_store_gregset): Likewise.
1780 (tic6x_usrregs_info): Move it up.
1781
a602f924
AH
17822017-11-15 Alan Hayward <alan.hayward@arm.com>
1783
1784 * Makefile.in: Update arch rules.
1785 * configure.srv: Explicitly mark arch/ files.
1786
5616b6c3
AS
17872017-11-13 Andreas Schwab <schwab@suse.de>
1788
1789 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1790 function.
1791 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1792
d1928160
PA
17932017-11-06 Pedro Alves <palves@redhat.com>
1794
1795 * config.in, configure: Regenerate.
1796
bac608e7
SM
17972017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1798
1799 * target.c (struct thread_search): Remove.
1800 (thread_search_callback): Remove.
1801 (prepare_to_access_memory): Use for_each_thread instead of
1802 find_inferior. Inline code from thread_search_callback.
1803
eaddb425
SM
18042017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1805
1806 * server.c (struct visit_actioned_threads_data): Remove.
1807 (visit_actioned_threads): Change prototype to take arguments
1808 directly.
1809 (resume): Use find_thread instead of find_inferior.
1810
99078d34
SM
18112017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1812
1813 * server.c (queue_stop_reply_callback): Change prototype, return
1814 void.
1815 (find_status_pending_thread_callback): Remove.
1816 (handle_status): Replace find_inferior with find_thread and
1817 for_each_thread.
1818
cc628f3d
AH
18192017-10-25 Alan Hayward <alan.hayward@arm.com>
1820
1821 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1822 with REGNO.
1823 (aarch64_store_gregset): Likewise.
1824 (aarch64_fill_fpregset): Likewise.
1825 (aarch64_store_fpregset): Likewise.
1826
4d3bb80e
SM
18272017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1828
1829 * gdbthread.h (find_thread, for_each_thread): New functions.
1830 * inferiors.c (thread_of_pid): Remove.
1831 (find_any_thread_of_pid): Use find_thread.
1832 * linux-low.c (num_lwps): Use for_each_thread.
1833
7a7cdfa0
YQ
18342017-10-17 Yao Qi <yao.qi@linaro.org>
1835
1836 * Makefile.in: Remove one rule.
1837 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1838
e675d170
YQ
18392017-10-17 Yao Qi <yao.qi@linaro.org>
1840
1841 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1842 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1843
7eb4e0f9
YQ
18442017-10-17 Yao Qi <yao.qi@linaro.org>
1845
1846 * configure.srv: Rename arm.o with arch/arm.o.
1847
60d6cfc9
YQ
18482017-10-17 Yao Qi <yao.qi@linaro.org>
1849
1850 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1851 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1852 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1853 (arch-i386.o, arch-amd64.o): Remove rules.
1854 (arch/%.o): New rule.
1855 Update POSTCOMPILE and COMPILE.pre.
1856 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1857 * configure: Re-generated.
1858 * configure.srv: Replace arch-i386.o with arch/i386.o.
1859 Replace arch-amd64.o with arch/amd64.o.
1860
5bfda255
YQ
18612017-10-16 Yao Qi <yao.qi@linaro.org>
1862
1863 * configure: Regenerated.
1864
9c80ecd6
SM
18652017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1866
1867 * inferiors.h: (struct inferior_list): Remove.
1868 (struct inferior_list_entry); Remove.
1869 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1870 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1871 get_first_inferior): Remove.
1872 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1873 find_inferior_id, find_inferior_in_random): Change signature.
1874 * inferiors.c (all_threads): Change type to
1875 std::list<thread_info *>.
1876 (get_thread): Remove macro.
1877 (find_inferior, find_inferior_id): Change signature, implement
1878 using find_thread.
1879 (find_inferior_in_random): Change signature, implement using
1880 find_thread_in_random.
1881 (for_each_inferior, for_each_inferior_with_data): Change
1882 signature, implement using for_each_thread.
1883 (add_inferior_to_list, remove_inferior): Remove.
1884 (add_thread, get_first_thread, thread_of_pid,
1885 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1886 (get_first_inferior, one_inferior_p, clear_inferior_list):
1887 Remove.
1888 (clear_inferiors, get_thread_process): Update.
1889 * gdbthread.h: Include <list>.
1890 (struct thread_info) <entry>: Remove field.
1891 <id>: New field.
1892 (all_threads): Change type to std::list<thread_info *>.
1893 (get_first_inferior): Add doc.
1894 (find_thread, for_each_thread, find_thread_in_random): New
1895 functions.
1896 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1897 * linux-arm-low.c (update_registers_callback): Update.
1898 * linux-low.c (second_thread_of_pid_p): Update.
1899 (kill_one_lwp_callback, linux_detach_lwp_callback,
1900 delete_lwp_callback, status_pending_p_callback, same_lwp,
1901 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1902 iterate_over_lwps, not_stopped_callback,
1903 resume_stopped_resumed_lwps, count_events_callback,
1904 select_singlestep_lwp_callback, select_event_lwp_callback,
1905 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1906 suspend_and_send_sigstop_callback, wait_for_sigstop,
1907 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1908 lwp_running, linux_set_resume_request, resume_status_pending_p,
1909 need_step_over_p, start_step_over, linux_resume_one_thread,
1910 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1911 reset_lwp_ptrace_options_callback): Update.
1912 * linux-mips-low.c (update_watch_registers_callback): Update.
1913 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1914 Update.
1915 (free_register_cache_thread_one): Remove.
1916 (regcache_release): Update.
1917 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1918 handle_qxfer_threads_worker): Update.
1919 (handle_query): Update, use list iterator.
1920 (visit_actioned_threads, handle_pending_status,
1921 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1922 clear_pending_status_callback, set_pending_status_callback,
1923 find_status_pending_thread_callback, handle_status,
1924 process_serial_event): Update.
1925 * target.c (thread_search_callback): Update.
1926 * thread-db.c (thread_db_get_tls_address): Update.
1927 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1928 Update.
1929 * win32-i386-low.c (update_debug_registers_callback): Update.
1930 * win32-low.c (delete_thread_info, child_delete_thread,
1931 continue_one_thread, suspend_one_thread,
1932 get_child_debug_event): Adjust.
1933
9179355e
SM
19342017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1935
1936 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1937 * inferiors.h: Include <list>.
1938 (struct process_info) <entry>: Remove field.
1939 <pid>: New field.
1940 (pid_of): Change macro to function.
1941 (ptid_of, lwpid_of): Remove macro.
1942 (all_processes): Change type to std::list<process_info *>.
1943 (ALL_PROCESSES): Remove macro.
1944 (for_each_process, find_process): New function.
1945 * inferiors.c (all_processes): Change type to
1946 std::list<process_info *>.
1947 (find_thread_process): Adjust.
1948 (add_process): Likewise.
1949 (remove_process): Likewise.
1950 (find_process_pid): Likewise.
1951 (get_first_process): Likewise.
1952 (started_inferior_callback): Remove.
1953 (have_started_inferiors_p): Adjust.
1954 (attached_inferior_callback): Remove.
1955 (have_attached_inferiors_p): Adjust.
1956 * linux-low.c (check_zombie_leaders): Likewise.
1957 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1958 (x86_linux_update_xmltarget): Adjust.
1959 * server.c (handle_query): Likewise.
1960 (gdb_reattached_process): Remove.
1961 (handle_status): Adjust.
1962 (kill_inferior_callback): Likewise.
1963 (detach_or_kill_inferior): Remove.
1964 (print_started_pid): Likewise.
1965 (print_attached_pid): Likewise.
1966 (detach_or_kill_for_exit): Update.
1967 (process_serial_event): Likewise.
1968 * linux-arm-low.c (arm_new_fork): Likewise.
1969
c9cb8905
SM
19702017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1971
1972 * dll.h: Include <list>.
1973 (struct dll_info): Add constructor.
1974 <entry>: Remove field.
1975 (all_dlls): Change type to std::list<dll_info>.
1976 * dll.c: Include <algorithm>.
1977 (get_dll): Remove macro.
1978 (all_dlls): Change type to std::list<dll_info *>.
1979 (free_one_dll): Remove.
1980 (match_dll): Likewise.
1981 (loaded_dll): Adjust.
1982 (unloaded_dll): Adjust to all_dlls type change, use
1983 std::find_if. Inline code from match_dll.
1984 (clear_dlls): Adjust to all_dlls type change.
1985 * server.c (emit_dll_description): Remove.
1986 (handle_qxfer_libraries): Adjust to all_dlls type change,
1987 integrate emit_dll_description's functionality.
1988
04ec7890
SM
19892017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1990
1991 * linux-low.h (struct linux_target_ops) <delete_process>: New
1992 field.
1993 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1994 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1995 (struct linux_target_ops): Add delete_process callback.
1996 * linux-arm-low.c (arm_delete_process): New.
1997 (struct linux_target_ops): Add delete_process callback.
1998 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1999 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2000 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2001 * linux-mips-low.c (mips_linux_delete_process): New.
2002 (struct linux_target_ops): Add delete_process callback.
2003 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2004 * linux-s390-low.c (struct linux_target_ops): Likewise.
2005 * linux-sh-low.c (struct linux_target_ops): Likewise.
2006 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2007 * linux-tile-low.c (struct linux_target_ops): Likewise.
2008 * linux-x86-low.c (x86_linux_delete_process): New.
2009 (struct linux_target_ops): Add delete_process callback.
2010 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2011
466eecee
SM
20122017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2013
2014 * linux-aarch64-low.c (the_low_target): Add thread delete
2015 callback.
2016 * linux-arm-low.c (arm_delete_thread): New function.
2017 (the_low_target): Add thread delete callback.
2018 * linux-bfin-low.c (the_low_target): Likewise.
2019 * linux-crisv32-low.c (the_low_target): Likewise.
2020 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2021 set.
2022 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2023 field.
2024 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2025 * linux-mips-low.c (mips_linux_delete_thread): New function.
2026 (the_low_target): Add thread delete callback.
2027 * linux-ppc-low.c (the_low_target): Likewise.
2028 * linux-s390-low.c (the_low_target): Likewise.
2029 * linux-sh-low.c (the_low_target): Likewise.
2030 * linux-tic6x-low.c (the_low_target): Likewise.
2031 * linux-tile-low.c (the_low_target): Likewise.
2032 * linux-x86-low.c (the_low_target): Likewise.
2033 * linux-xtensa-low.c (the_low_target): Likewise.
2034
b79f7801
YZ
20352017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2036
2037 * win32-low.c: Include "common-inferior.h".
2038
bc3b087d
SDJ
20392017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2040
2041 * inferiors.c (set_inferior_cwd): New function.
2042 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2043 (handle_query): Inform that QSetWorkingDir is supported.
2044 * win32-low.c (create_process): Pass the inferior's cwd to
2045 CreateProcess.
2046
d092c5a2
SDJ
20472017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2048
2049 * inferiors.c (current_inferior_cwd): New global variable.
2050 (get_inferior_cwd): New function.
2051 * inferiors.h (struct process_info) <cwd>: New field.
2052
7da0a886
SDJ
20532017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2054
2055 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2056 (OBS): Add gdb_tilde_expand.o.
2057
289a6840
SM
20582017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2059
2060 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2061 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2062
256642e8
PA
20632017-09-29 Pedro Alves <palves@redhat.com>
2064
2065 * ax.c (gdb_parse_agent_expr): Constify.
2066 * ax.h (gdb_parse_agent_expr): Constify.
2067 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2068 Constify.
2069 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2070 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2071 * remote-utils.h (read_ptid): Constify.
2072 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2073 (process_point_options, process_serial_event): Constify.
2074 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2075 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2076 (cmd_qtbuffer): Constify.
2077
5b9ca4d4
PA
20782017-09-29 Pedro Alves <palves@redhat.com>
2079
2080 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2081 fails.
2082
94c207e0
PA
20832017-09-29 Pedro Alves <palves@redhat.com>
2084
2085 * linux-low.c (handle_extended_wait): Pass parent thread instead
2086 of process to thread_db_notice_clone.
2087 * linux-low.h (thread_db_notice_clone): Replace parent process
2088 parameter with parent thread parameter.
2089 * thread-db.c (find_one_thread): Add comment.
2090 (thread_db_notice_clone): Replace parent process parameter with
2091 parent thread parameter. Temporarily switch to the parent thread.
2092
75352e28
SDJ
20932017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2094
2095 * gdbthread.h: Include "common-gdbthread.h".
2096 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2097 "if" when validating the ptid.
2098 * remote-utils.c: Include "gdbthread.h".
2099 (prepare_resume_reply): Use "switch_to_thread".
2100 * target.c (done_accessing_memory): Likewise.
2101
ad339634
AA
21022017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2103
2104 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2105 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2106 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2107 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2108 s390x-gs-linux64-ipa.o to ipa_obj.
2109 * linux-s390-low.c (HWCAP_S390_GS): New define.
2110 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2111 New functions.
2112 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2113 (s390_arch_setup): Check for guarded-storage support and choose
2114 appropriate tdesc.
2115 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2116 init_registers_s390x_gs_linux64.
2117 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2118 enum value.
2119 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2120 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2121
cc4d742f
SM
21222017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2123
2124 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2125
f6327dcb
KB
21262017-09-21 Kevin Buettner <kevinb@redhat.com>
2127
2128 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2129 (thread_db_thread_handle): Declare.
2130 * linux-low.c (linux_target_ops): Initialize thread_handle.
2131 * server.c (handle_qxfer_threads_worker): Add support for
2132 "handle" attribute.
2133 * target.h (struct target_ops): Add new function pointer,
2134 thread_handle.
2135 (target_thread_handle): Define.
2136 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2137 field in lwp.
2138 (thread_db_thread_handle): New function.
2139
86299109
KB
21402017-09-21 Kevin Buettner <kevinb@redhat.com>
2141
2142 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2143 * linux-low.h (thread_db_notice_clone): Declare.
2144 * thread-db.c (thread_db_notice_clone): New function.
2145
f557a88a
PA
21462017-09-21 Pedro Alves <palves@redhat.com>
2147
2148 * server.c (gdb_read_memory, handle_status, process_serial_event)
2149 (handle_serial_event, handle_target_event): Adjust to
2150 set_desired_thread prototype change.
2151 * target.c (set_desired_thread): Remove 'use_general' parameter
2152 and adjust.
2153 * target.h (set_desired_thread): Remove 'use_general' parameter.
2154
223ffa71
TT
21552017-09-20 Tom Tromey <tom@tromey.com>
2156
2157 * target.c (target_terminal::terminal_state): Define.
2158 (target_terminal::init): Rename from target_terminal_init.
2159 (target_terminal::inferior): Rename from
2160 target_terminal_inferior.
2161 (target_terminal::ours): Rename from target_terminal_ours.
2162 (target_terminal::ours_for_output, target_terminal::info): New.
2163
04fd3ba9
SM
21642017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2165
2166 * server.c (accumulate_file_name_length): Remove.
2167 (emit_dll_description): Adjust to std::string change.
2168 (handle_qxfer_libraries): Use std::string to hold document.
2169
5e187554
SM
21702017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2171
2172 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2173 return type of xml_escape_text.
2174 * server.c (emit_dll_description): Likewise.
2175
1526853e
SM
21762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2177
2178 * server.c (captured_main): Accept argument for --selftest.
2179 Update run_tests call.
2180 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2181 when registering selftests.
2182
c4dfafab
SDJ
21832017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2184
2185 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2186 instead of "VEC" for "target_desc.reg_defs".
2187 (regcache_cpy): Likewise.
2188 (registers_to_string): Likewise.
2189 (registers_from_string): Likewise.
2190 (find_regno): Likewise.
2191 (supply_regblock): Likewise.
2192 (regcache_raw_read_unsigned): Likewise.
2193 * tdesc.c (init_target_desc): Likewise.
2194 (tdesc_create_reg): Likewise.
2195 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2196 (struct target_desc) <reg_defs>: Convert to "std::vector".
2197 (target_desc): Do not initialize "reg_defs".
2198 (~target_desc): Update code to use "std::vector" instead of "VEC"
2199 for "target_desc.reg_defs".
2200 (operator==): Likewise.
2201
124aceb4
SM
22022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2203
2204 * inferiors.h (thread_to_gdb_id): Remove.
2205 * inferiors.c (thread_to_gdb_id): Remove.
2206 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2207 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2208 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2209 Likewise.
2210 * nto-low.c (nto_fetch_registers, nto_store_registers,
2211 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2212
96cde54f
SM
22132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2214
2215 * inferiors.h (gdb_id_to_thread_id): Remove.
2216 * inferiors.c (gdb_id_to_thread_id): Remove.
2217 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2218 removal. Move pid declaration closer to where it's used.
2219
e8ca139e
SM
22202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2221
2222 * server.c (handle_detach): New function.
2223 (process_serial_event): Move code out, call handle_detach.
2224
f8a4e119
SM
22252017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2226
2227 * server.c (require_running): Rename to ...
2228 (require_running_or_return): ... this ...
2229 (require_running_or_break): ... and this.
2230 (handle_query, process_serial_event): Adjust.
2231
0eb0a407
SM
22322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2233
2234 * linux-low.c (linux_set_resume_request): Remove unused
2235 variables.
2236
785922a5
SM
22372017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * server.c (first_thread_of): Remove.
2240 (process_serial_event): Replace usage of first_thread_of with
2241 find_any_thread_of_pid.
2242 * tracepoint.c (same_process_p): Remove.
2243 (gdb_agent_about_to_close): Replace usage of same_process_p with
2244 find_any_thread_of_pid.
2245 * linux-x86-low.c (same_process_callback): Remove.
2246 (x86_arch_setup_process_callback): Replace usage of
2247 same_process_callback with find_any_thread_of_pid.
2248 * thread-db.c (any_thread_of): Remove.
2249 (switch_to_process): Replace usage of any_thread_of with
2250 find_any_thread_of_pid.
2251 * inferiors.c (thread_pid_matches_callback): Remove.
2252 (find_thread_process): Adjust to use find_any_thread_of_pid.
2253
a059f00c
SDJ
22542017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2255
2256 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2257 with "!VEC_empty".
a059f00c 2258
cc397f3a
SDJ
22592017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2260
2261 * linux-low.c (handle_extended_wait): Use
2262 "allocate_target_description" instead of "XNEW".
2263 * linux-x86-low.c (initialize_low_arch): Likewise.
2264
22916b07
YQ
22652017-09-05 Yao Qi <yao.qi@linaro.org>
2266
2267 * configure.srv (srv_i386_regobj): Remove.
2268 (srv_amd64_regobj): Remove.
2269 (srv_regobj): Set it to "" for x86 non-linux targets.
2270 * linux-x86-tdesc.c (i386_linux_read_description):
2271 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2272 (init_registers_i386): Remove the declaration.
2273 (tdesc_i386): Remove the declaration.
2274 (lynx_i386_arch_setup): Call i386_create_target_description.
2275 * nto-x86-low.c: Likewise.
2276 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2277 [!__x86_64__]: include arch/i386.h.
2278 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2279
38602d55
YQ
22802017-09-05 Yao Qi <yao.qi@linaro.org>
2281
2282 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2283 i386/amd64-XXX-linux from it.
2284
44b886ff
YQ
22852017-09-05 Yao Qi <yao.qi@linaro.org>
2286
2287 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2288 false.
2289 (ipa_amd64_linux_regobj): Remove.
2290 (ipa_x32_linux_regobj): Remove.
2291
b4570e4b
YQ
22922017-09-05 Yao Qi <yao.qi@linaro.org>
2293
2294 * Makefile.in (arch-amd64.o): New rule.
2295 * configure.srv: Append arch-amd64.o.
2296 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2297 (get_ipa_tdesc): Call amd64_linux_read_description.
2298 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2299 and init_registers_amd64_XXX.
2300 * linux-x86-low.c (x86_linux_read_description): Call
2301 amd64_linux_read_description.
2302 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2303 (initialize_low_arch): Don't call init_registers_x32_XXX and
2304 init_registers_amd64_XXX.
2305 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2306 and tdesc_amd64_XXX.
2307 [__x86_64__] (amd64_tdesc_test): New function.
2308 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2309 and init_registers_amd64_XXX.
2310 * linux-x86-tdesc.c: Include arch/amd64.h.
2311 (xcr0_to_tdesc_idx): New function.
2312 (i386_linux_read_description): New function.
2313 (amd64_get_ipa_tdesc_idx): New function.
2314 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2315 (amd64_get_ipa_tdesc): Declare.
2316
d1f28ea2
YQ
23172017-09-05 Yao Qi <yao.qi@linaro.org>
2318
2319 * configure.srv (srv_i386_linux_xmlfiles): Remove
2320 i386/i386-XXX-linux.xml from it.
2321
25a93583
YQ
23222017-09-05 Yao Qi <yao.qi@linaro.org>
2323
2324 * configure.srv: Set srv_i386_linux_regobj empty if $development
2325 is false.
2326 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2327 initialize_low_tdesc.
2328 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2329 with #if initialize_low_tdesc.
2330 * linux-x86-tdesc-selftest.c: New file.
2331 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2332
5f035c07
YQ
23332017-09-05 Yao Qi <yao.qi@linaro.org>
2334
2335 * Makefile.in (arch-i386.o): New rule.
2336 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2337 (x86_64-*-linux*): Likewise.
2338 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2339 include arch/i386.h.
2340 (i386_linux_read_description): Remove code and call
2341 i386_create_target_description.
2342 * tdesc.c (allocate_target_description): New function.
2343 * tdesc.h (set_tdesc_architecture): Remove declaration.
2344 (set_tdesc_osabi): Likewise.
2345
0abe8a89
YQ
23462017-09-05 Yao Qi <yao.qi@linaro.org>
2347
2348 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2349 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2350 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2351 .xmltarget.
2352 * server.c (get_features_xml): Call tdesc_get_features_xml.
2353 * tdesc.c (set_tdesc_architecture): New function.
2354 (set_tdesc_osabi): New function.
2355 (tdesc_get_features_xml): New function.
2356 (tdesc_create_feature): Add an argument.
2357 * tdesc.h (struct target_desc) <features>: New field.
2358 <arch, osabi>: New field.
2359 (~target_desc): xfree features, arch, and osabi.
2360 (target_desc::oerator==): Don't compare .xmltarget.
2361 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2362 (set_tdesc_osabi): Likewise.
2363 (tdesc_get_features_xml): Likewise.
2364
0a188386
YQ
23652017-09-05 Yao Qi <yao.qi@linaro.org>
2366
2367 * linux-x86-tdesc.c: Include selftest.h.
2368 (i386_tdesc_test): New function.
2369 (initialize_low_tdesc): Call selftests::register_test.
2370 * tdesc.h: Include regdef.h.
2371 (target_desc): Override operator == and !=.
2372
f49ff000
YQ
23732017-09-05 Yao Qi <yao.qi@linaro.org>
2374
2375 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2376 (ipa_obj): Likewise.
2377 * linux-i386-ipa.c: Include common/x86-xstate.h
2378 (get_ipa_tdesc): Call i386_linux_read_description.
2379 (initialize_low_tracepoint): Don't call init_registers_XXX
2380 functions, call initialize_low_tdesc instead.
2381 * linux-x86-low.c (x86_linux_read_description): Call
2382 i386_linux_read_description.
2383 (initialize_low_arch): Don't call init_registers_i386_XXX
2384 functions, call initialize_low_tdesc.
2385 * linux-x86-tdesc.c: New file.
2386 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2387 (i386_get_ipa_tdesc_idx): Declare.
2388 (i386_get_ipa_tdesc): Declare.
2389 (initialize_low_tdesc): Declare.
2390
2b68ef2f
YQ
23912017-09-05 Yao Qi <yao.qi@linaro.org>
2392
2393 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2394 instead of 0.
2395
f7000548
YQ
23962017-09-05 Yao Qi <yao.qi@linaro.org>
2397
2398 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2399 * regcache.c (get_thread_regcache): Use VEC_length.
2400 (init_register_cache): Likewise.
2401 (regcache_cpy): Likewise.
2402 (registers_to_string): Iterate reg_defs via VEC_iterate.
2403 (find_regno): Likewise.
2404 (find_register_by_number): Use VEC_index.
2405 (register_size): Call find_register_by_number.
2406 (register_data): Call find_register_by_number.
2407 (supply_regblock): Use VEC_length.
2408 (regcache_raw_read_unsigned): Likewise.
2409 * tdesc.c (init_target_desc): Iterate reg_defs via
2410 VEC_iterate.
2411 (default_description): Update initializer.
2412 (copy_target_description): Don't update field num_registers.
2413 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2414 <num_registers>: Remove.
2415
50a421ac
SM
24162017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2417
2418 * Makefile.in (.SECONDARY): Define target.
2419
23fdd69e
SM
24202017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2421
2422 * linux-low.c (linux_wait_1): Adjust.
2423 * server.c (queue_stop_reply_callback): Adjust.
2424
0a2dde4a
SDJ
24252017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2426
2427 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2428 QEnvironmentUnset and QEnvironmentReset packets.
2429 (handle_query): Inform remote that QEnvironmentHexEncoded,
2430 QEnvironmentUnset and QEnvironmentReset are supported.
2431
6afd337d
SM
24322017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2433
2434 * inferiors.h (inferior_target_data): Rename to ...
2435 (thread_target_data): ... this.
2436 (inferior_regcache_data): Rename to ...
2437 (thread_regcache_data): ... this.
2438 (set_inferior_regcache_data): Rename to ...
2439 (set_thread_regcache_data): ... this.
2440 * inferiors.c (inferior_target_data): Rename to ...
2441 (thread_target_data): ... this.
2442 (inferior_regcache_data): Rename to ...
2443 (thread_regcache_data): ... this.
2444 (set_inferior_regcache_data): Rename to ...
2445 (set_thread_regcache_data): ... this.
2446 (free_one_thread): Update.
2447 * linux-low.h (get_thread_lwp): Update.
2448 * regcache.c (get_thread_regcache): Update.
2449 (regcache_invalidate_thread): Update.
2450 (free_register_cache_thread): Update.
2451 * win32-i386-low.c (update_debug_registers_callback): Update.
2452 (win32_get_current_dr): Update.
2453 * win32-low.c (thread_rec): Update.
2454 (delete_thread_info): Update.
2455 (continue_one_thread): Update.
2456 (suspend_one_thread): Update.
2457
a160cc46
SM
24582017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2459
2460 * inferiors.c (set_inferior_target_data): Remove.
2461 * inferiors.h (set_inferior_target_data): Remove.
2462
6d580b63
YQ
24632017-08-18 Yao Qi <yao.qi@linaro.org>
2464
2465 * Makefile.in (OBS): Add selftest.o.
2466 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2467 * configure, config.in: Re-generated.
2468 * server.c: Include common/sefltest.h.
2469 (captured_main): Handle option --selftest.
2470
f5a29eb0
YQ
24712017-08-09 Yao Qi <yao.qi@linaro.org>
2472
2473 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2474 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2475 i386-avx-mpx.o and i386-mmx.o.
2476 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2477 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2478 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2479 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2480 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2481 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2482 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2483 i386/amd64-avx-mpx.xml.
2484
57757c2f
YQ
24852017-08-09 Yao Qi <yao.qi@linaro.org>
2486
2487 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2488 and x32-avx-avx512.o.
2489 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2490 i386/x32-avx-avx512.xml.
2491
229d26fc
SM
24922017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2493
2494 * tracepoint.h (enum class fast_tpoint_collect_result): New
2495 enumeration.
2496 (fast_tracepoint_collecting): Change return type to
2497 fast_tpoint_collect_result.
2498 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2499 * linux-low.h: Include tracepoint.h.
2500 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2501 fast_tpoint_collect_result.
2502 * linux-low.c (handle_tracepoints): Adjust.
2503 (linux_fast_tracepoint_collecting): Change return type to
2504 fast_tpoint_collect_result.
2505 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2506 linux_wait_1, stuck_in_jump_pad_callback,
2507 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2508 proceed_one_lwp): Adjust to type change.
2509
2e1e43e1
YQ
25102017-07-10 Yao Qi <yao.qi@linaro.org>
2511
2512 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2513
adc764e7
YQ
25142017-06-29 Yao Qi <yao.qi@linaro.org>
2515
2516 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2517 Remove.
2518 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2519
a206891a
SM
25202017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2521
2522 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2523
9a6c7d9c
SDJ
25242017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2525
2526 * linux-low.c (linux_create_inferior): Adjust code to access the
2527 environment information via 'gdb_environ' class.
2528 * lynx-low.c (lynx_create_inferior): Likewise.
2529 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2530 (get_environ): Return a pointer to 'our_environ'.
2531 (captured_main): Initialize 'our_environ'.
2532 * server.h (get_environ): Adjust prototype.
2533 * spu-low.c (spu_create_inferior): Adjust code to access the
2534 environment information via 'gdb_environ' class.
2535
ae3e2ccf
SM
25362017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2537
2538 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2539 usage of "register" keyword.
2540
3e019bdc
SM
25412017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2542
2543 * configure: Re-generate.
2544
8465943a
SM
25452017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2546
2547 * configure: Re-generate.
2548
cf0dd6f0
SM
25492017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2550
2551 * Makefile.in (COMPILE.pre): Add "-x c++".
2552
9845682b
SDJ
25532017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2554
2555 * fork-child.c: Conditionally include <signal.h>.
2556
aefd8b33
SDJ
25572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2558
2559 * server.c (handle_general_set): Handle new packet
2560 "QStartupWithShell".
2561 (handle_query): Add "QStartupWithShell" to the list of supported
2562 packets.
2563 (gdbserver_usage): Add help text explaining the
2564 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2565 options.
2566 (captured_main): Recognize and act upon the presence of the new
2567 CLI options.
2568
2090129c
SDJ
25692017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2570 Pedro Alves <palves@redhat.com>
2571
2572 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2573 * configure: Regenerate.
2574 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2575 "fork-inferior.o".
2576 (i[34567]86-*-lynxos*): Likewise.
2577 (spu*-*-*): Likewise.
2578 * fork-child.c: New file.
2579 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2580 and "environ.h".
2581 (linux_ptrace_fun): New function.
2582 (linux_create_inferior): Adjust function prototype to reflect
2583 change on "target.h". Adjust function code to use
2584 "fork_inferior".
2585 (linux_request_interrupt): Delete "signal_pid".
2586 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2587 (lynx_ptrace_fun): New function.
2588 (lynx_create_inferior): Adjust function prototype to reflect
2589 change on "target.h". Adjust function code to use
2590 "fork_inferior".
2591 * nto-low.c (nto_create_inferior): Adjust function prototype and
2592 code to reflect change on "target.h". Update comments.
2593 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2594 "common-terminal.h" and "environ.h".
2595 (terminal_fd): Moved to fork-child.c.
2596 (old_foreground_pgrp): Likewise.
2597 (restore_old_foreground_pgrp): Likewise.
2598 (last_status): Make it global.
2599 (last_ptid): Likewise.
2600 (our_environ): New variable.
2601 (startup_with_shell): Likewise.
2602 (program_name): Likewise.
2603 (program_argv): Rename to...
2604 (program_args): ...this.
2605 (wrapper_argv): New variable.
2606 (start_inferior): Delete function.
2607 (get_exec_wrapper): New function.
2608 (get_exec_file): Likewise.
2609 (get_environ): Likewise.
2610 (prefork_hook): Likewise.
2611 (post_fork_inferior): Likewise.
2612 (postfork_hook): Likewise.
2613 (postfork_child_hook): Likewise.
2614 (handle_v_run): Update code to deal with arguments coming from the
2615 remote host. Update calls from "start_inferior" to
2616 "create_inferior".
2617 (captured_main): Likewise. Initialize environment variable. Call
2618 "have_job_control".
2619 * server.h (post_fork_inferior): New prototype.
2620 (get_environ): Likewise.
2621 (last_status): Declare.
2622 (last_ptid): Likewise.
2623 (signal_pid): Likewise.
2624 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2625 (spu_ptrace_fun): New function.
2626 (spu_create_inferior): Adjust function prototype to reflect change
2627 on "target.h". Adjust function code to use "fork_inferior".
2628 * target.c (target_terminal_init): New function.
2629 (target_terminal_inferior): Likewise.
2630 (target_terminal_ours): Likewise.
2631 * target.h: Include <vector>.
2632 (struct target_ops) <create_inferior>: Update prototype.
2633 (create_inferior): Update macro.
2634 * utils.c (gdb_flush_out_err): New function.
2635 * win32-low.c (win32_create_inferior): Adjust function prototype
2636 and code to reflect change on "target.h".
2637
043a4934
SDJ
26382017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2639
2640 * inferiors.c (switch_to_thread): New function.
2641
15652511
SDJ
26422017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2643
2644 * Makefile.in (SFILE): Add "common/job-control.c".
2645 (OBS): Add "job-control.o".
2646
21ea5acd
SDJ
26472017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2648
2649 * Makefile: Remove "@host_makefile_frag@".
2650
e13cb306
PA
26512017-05-05 Pedro Alves <palves@redhat.com>
2652
2653 * configure: Regenerate.
2654
c94fee56
SDJ
26552017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2656
2657 * configure: Regenerate.
2658
a0ff9e1a
SM
26592017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2660
2661 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2662 software_single_step change of return type to
2663 std::vector<CORE_ADDR>.
2664 * linux-low.c (install_software_single_step_breakpoints):
2665 Likewise.
2666 * linux-low.h (install_software_single_step_breakpoints):
2667 Likewise.
2668
be628ab8
SDJ
26692017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2670
2671 * remote-utils.c: Include "gdb_termios.h" instead of
2672 "terminal.h".
2673 * terminal.h: Delete file.
2674
7c5ded6a
SDJ
26752017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2676
2677 * server.c: Include <vector>.
2678 <program_argv, wrapper_argv>: Convert to std::vector.
2679 (start_inferior): Rewrite function to use C++.
2680 (handle_v_run): Likewise. Update code that calculates the argv
2681 based on the vRun packet; use C++.
2682 (captured_main): Likewise.
2683
436252de
SM
26842017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2685
2686 * server.c (handle_v_cont): Initialize thread_resume::thread
2687 with null_ptid.
2688
9bf2a700
PA
26892017-04-05 Pedro Alves <palves@redhat.com>
2690
2691 * configure: Regenerate.
2692
a121b7c1
PA
26932017-04-05 Pedro Alves <palves@redhat.com>
2694
2695 * gdbreplay.c (sync_error): Constify.
2696 * linux-x86-low.c (push_opcode): Constify.
2697
21c8a587
PA
26982017-04-05 Pedro Alves <palves@redhat.com>
2699
2700 * win32-low.c (get_child_debug_event)
2701 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2702 Report TARGET_WAITKIND_SPURIOUS instead.
2703
fb32b4f7
PA
27042017-04-05 Pedro Alves <palves@redhat.com>
2705
e79be6e5
SM
2706 * remote-utils.c (remote_prepare, remote_open): Constify.
2707 * remote-utils.h (remote_prepare, remote_open): Constify.
2708 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2709
65dd1e59
SM
27102017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2711
2712 * Makefile.in (clean): Clear .deps.
2713
8fa5b777
SM
27142017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2715
2716 * .gitignore: Remove generated files, replace with wildcard.
2717 * (clean): Replace removal of generated files with wildcard.
2718 (version.c): Replace with...
2719 (version-generated.c): ...this.
2720 (xml-builtin.c): Replace with...
2721 (xml-builtin-generated.c): ...this.
2722 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2723 (%.c: *regformats*): Replace with...
2724 (%-generated.c: *regformats*): ...this.
2725
a12e714b
MF
27262017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2727
2728 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2729 (xtensa_fill_gregset): Call collect_register_by_name for
2730 threadptr register.
2731 (xtensa_store_gregset): Call supply_register_by_name for
2732 threadptr register.
2733
1a09b50a
MF
27342017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2735
2736 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2737 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2738 (xtensa_store_gregset): Call supply_register for all registers in
2739 a0_regnum..a0_regnum + C0_NREGS range.
2740
1a01e7c6
SM
27412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2742
2743 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2744 (ax-ipa.o: ax.c): Remove.
2745 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2746 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2747 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2748 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2749 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2750
36bc18a8
SM
27512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2752
2753 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2754 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2755 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2756 (errors-ipa.o: ../common/errors.c): Remove.
2757 (format-ipa.o: ../common/format.c): Remove.
2758 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2759
a8ebe3d5
SM
27602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2761
2762 * Makefile.in (%-ipa.o: %.c): New rule.
2763 (tracepoint-ipa.o: tracepoint.c): Remove.
2764 (utils-ipa.o: utils.c): Remove.
2765 (remote-utils-ipa.o: remote-utils.c): Remove.
2766 (regcache-ipa.o: regcache.c): Remove.
2767 (i386-linux-ipa.o: i386-linux.c): Remove.
2768 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2769 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2770 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2771 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2772 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2773 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2774 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2775 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2776 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2777 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2778 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2779 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2780 (aarch64-ipa.o: aarch64.c): Remove.
2781 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2782 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2783 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2784 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2785 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2786 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2787 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2788 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2789 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2790 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2791 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2792 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2793 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2794 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2795 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2796 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2797 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2798 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2799 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2800 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2801 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2802 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2803 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2804 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2805 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2806 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2807 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2808 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2809 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2810 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2811 (tdesc-ipa.o: tdesc.c): Remove.
2812 (x32-linux-ipa.o: x32-linux.c): Remove.
2813 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2814 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2815
50cfacb7
SM
28162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2817
2818 * Makefile.in (%.o: ../arch/%.c): New rule.
2819 (arm.o: ../arch/arm.c): Remove.
2820 (arm-linux.o: ../arch/arm-linux.c): Remove.
2821 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2822 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2823
c5a22423
SM
28242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2825
2826 * Makefile.in (%.o: ../nat/%.c): New rule.
2827 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2828 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2829 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2830 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2831 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2832 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2833 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2834 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2835 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2836 (linux-personality.o: ../nat/linux-personality.c): Remove.
2837 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2838 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2839 (x86-linux.o: ../nat/x86-linux.c): Remove.
2840 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2841 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2842
6bda016b
SM
28432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2844
2845 * Makefile.in (%.o: ../common/%.c): New rule.
2846 (signals.o: ../common/signals.c): Remove.
2847 (print-utils.o: ../common/print-utils.c): Remove.
2848 (rsp-low.o: ../common/rsp-low.c): Remove.
2849 (common-utils.o: ../common/common-utils.c): Remove.
2850 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2851 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2852 (vec.o: ../common/vec.c): Remove.
2853 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2854 (xml-utils.o: ../common/xml-utils.c): Remove.
2855 (ptid.o: ../common/ptid.c): Remove.
2856 (buffer.o: ../common/buffer.c): Remove.
2857 (format.o: ../common/format.c): Remove.
2858 (filestuff.o: ../common/filestuff.c): Remove.
2859 (agent.o: ../common/agent.c): Remove.
2860 (errors.o: ../common/errors.c): Remove.
2861 (environ.o: ../common/environ.c): Remove.
2862 (common-debug.o: ../common/common-debug.c): Remove.
2863 (cleanups.o: ../common/cleanups.c): Remove.
2864 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2865 (fileio.o: ../common/fileio.c): Remove.
2866 (common-regcache.o: ../common/common-regcache.c): Remove.
2867 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2868 (new-op.o: ../common/new-op.c): Remove.
2869 (btrace-common.o: ../common/btrace-common.c): Remove.
2870
21122961
SM
28712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2872
2873 * Makefile.in (%.o: ../target/%.c): New rule.
2874 (waitstatus.o: ../target/waitstatus.c): Remove.
2875
c362e621
SM
28762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2877
2878 * Makefile.in
2879 (%.c: ../regformats/%.dat,
2880 (%.c: ../regformats/arm/%.dat,
2881 (%.c: ../regformats/i386/%.dat,
2882 (%.c: ../regformats/rs6000/%.dat): New rules.
2883 (aarch64.c): Remove.
2884 (reg-arm.c): Remove.
2885 (arm-with-iwmmxt.c): Remove.
2886 (arm-with-vfpv2.c): Remove.
2887 (arm-with-vfpv3.c): Remove.
2888 (arm-with-neon.c): Remove.
2889 (reg-bfin.c): Remove.
2890 (reg-cris.c): Remove.
2891 (reg-crisv32.c): Remove.
2892 (i386.c): Remove.
2893 (i386-linux.c): Remove.
2894 (i386-avx.c): Remove.
2895 (i386-avx-linux.c): Remove.
2896 (i386-avx-avx512.c): Remove.
2897 (i386-avx-avx512-linux.c): Remove.
2898 (i386-mpx.c): Remove.
2899 (i386-mpx-linux.c): Remove.
2900 (i386-avx-mpx-avx512-pku.c): Remove.
2901 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2902 (i386-avx-mpx.c): Remove.
2903 (i386-avx-mpx-linux.c): Remove.
2904 (i386-mmx.c): Remove.
2905 (i386-mmx-linux.c): Remove.
2906 (reg-ia64.c): Remove.
2907 (reg-m32r.c): Remove.
2908 (reg-m68k.c): Remove.
2909 (reg-cf.c): Remove.
2910 (mips-linux.c): Remove.
2911 (mips-dsp-linux.c): Remove.
2912 (mips64-linux.c): Remove.
2913 (mips64-dsp-linux.c): Remove.
2914 (nios2-linux.c): Remove.
2915 (powerpc-32.c): Remove.
2916 (powerpc-32l.c): Remove.
2917 (powerpc-altivec32l.c): Remove.
2918 (powerpc-cell32l.c): Remove.
2919 (powerpc-vsx32l.c): Remove.
2920 (powerpc-isa205-32l.c): Remove.
2921 (powerpc-isa205-altivec32l.c): Remove.
2922 (powerpc-isa205-vsx32l.c): Remove.
2923 (powerpc-e500l.c): Remove.
2924 (powerpc-64l.c): Remove.
2925 (powerpc-altivec64l.c): Remove.
2926 (powerpc-cell64l.c): Remove.
2927 (powerpc-vsx64l.c): Remove.
2928 (powerpc-isa205-64l.c): Remove.
2929 (powerpc-isa205-altivec64l.c): Remove.
2930 (powerpc-isa205-vsx64l.c): Remove.
2931 (s390-linux32.c): Remove.
2932 (s390-linux32v1.c): Remove.
2933 (s390-linux32v2.c): Remove.
2934 (s390-linux64.c): Remove.
2935 (s390-linux64v1.c): Remove.
2936 (s390-linux64v2.c): Remove.
2937 (s390-te-linux64.c): Remove.
2938 (s390-vx-linux64.c): Remove.
2939 (s390-tevx-linux64.c): Remove.
2940 (s390x-linux64.c): Remove.
2941 (s390x-linux64v1.c): Remove.
2942 (s390x-linux64v2.c): Remove.
2943 (s390x-te-linux64.c): Remove.
2944 (s390x-vx-linux64.c): Remove.
2945 (s390x-tevx-linux64.c): Remove.
2946 (tic6x-c64xp-linux.c): Remove.
2947 (tic6x-c64x-linux.c): Remove.
2948 (tic6x-c62x-linux.c): Remove.
2949 (reg-sh.c): Remove.
2950 (reg-sparc64.c): Remove.
2951 (reg-spu.c): Remove.
2952 (amd64.c): Remove.
2953 (amd64-linux.c): Remove.
2954 (amd64-avx.c): Remove.
2955 (amd64-avx-linux.c): Remove.
2956 (amd64-avx-avx512.c): Remove.
2957 (amd64-avx-avx512-linux.c): Remove.
2958 (amd64-mpx.c): Remove.
2959 (amd64-mpx-linux.c): Remove.
2960 (amd64-avx-mpx-avx512-pku.c): Remove.
2961 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2962 (amd64-avx-mpx.c): Remove.
2963 (amd64-avx-mpx-linux.c): Remove.
2964 (x32.c): Remove.
2965 (x32-linux.c): Remove.
2966 (x32-avx.c): Remove.
2967 (x32-avx-linux.c): Remove.
2968 (x32-avx-avx512.c): Remove.
2969 (x32-avx-avx512-linux.c): Remove.
2970 (reg-xtensa.c): Remove.
2971 (reg-tilegx.c): Remove.
2972 (reg-tilegx32.c): Remove.
2973
1672e0d9
SDJ
29742017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2975
2976 * Makefile.in (SFILES): Add "common/environ.c".
2977 (OBJS): Add "common/environ.h".
2978
239b6d10
WT
29792017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2980
2981 * configure.ac: Check if the fs_base and gs_base members of
2982 `struct user_regs_struct' exist.
2983 * config.in: Regenerated.
2984 * configure: Likewise.
2985
694b382c
AT
29862017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2987
2988 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2989 target_read_memory.
2990 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2991 (get_next_pcs_syscall_next_pc): Likewise.
2992
7dc53023
LM
29932016-12-23 Luis Machado <lgustavo@codesourcery.com>
2994
2995 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2996 * nto-x86-low.c: Likewise.
2997
ad02e4fe
SM
29982016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2999
3000 * Makefile.in: Include disable-implicit-rules.mk.
3001
dcb07cfa
PA
30022016-11-23 Pedro Alves <palves@redhat.com>
3003
3004 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3005 (debug_vprintf): Use std::chrono::steady_clock instead of
3006 gettimeofday. Use '.' instead of ':'.
3007 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3008 (get_timestamp): Use std::chrono::steady_clock instead of
3009 gettimeofday.
3010
8629c02c
SM
30112016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3012
3013 * Makefile.in: Fix whitespace formatting.
3014
b593ecca
SM
30152016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3016
3017 * Makefile.in (SFILES, OBS): Flatten list and order
3018 alphabetically.
3019
9986ba08
PA
30202016-11-23 Pedro Alves <palves@redhat.com>
3021
3022 * event-loop.c (handle_file_event): Use warning.
3023 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3024 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3025 Use warning.
3026
4eefa7bc
PA
30272016-11-23 Pedro Alves <palves@redhat.com>
3028
3029 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3030 output.
3031 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3032 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3033 debug_printf and debug_flush for debug output.
3034 * server.c (handle_general_set): Likewise.
3035 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3036 output.
3037
5443506e
SM
30382016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3039
3040 * Makefile.in (.c.o): Replace rule with ...
3041 (%.o: %.c): ... this one.
3042
3b165252
SM
30432016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3044
3045 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3046 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3047 make.
3048 * configure.ac: Remove checks for the make program.
3049 * configure: Re-generate.
3050
0bcda685
PA
30512016-10-28 Pedro Alves <palves@redhat.com>
3052
3053 * Makefile.in (CXX_DIALECT): Get from configure.
3054 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3055 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3056 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3057 * config.in: Regenerate.
3058 * configure: Regenerate.
3059
c3805894
YQ
30602016-10-27 Yao Qi <yao.qi@linaro.org>
3061
3062 * linux-low.c (linux_supports_range_stepping): Return true if
3063 can_software_single_step return true.
3064
89342618
YQ
30652016-10-27 Yao Qi <yao.qi@linaro.org>
3066
3067 * inferiors.c (find_inferior_in_random): New function.
3068 * inferiors.h (find_inferior_in_random): Declare.
3069 * linux-low.c (linux_wait_for_event_filtered): Call
3070 find_inferior_in_random instead of find_inferior.
3071
e3652c84
YQ
30722016-10-27 Yao Qi <yao.qi@linaro.org>
3073
3074 * linux-low.c (linux_wait_1): If single-step breakpoints are
3075 inserted, remove them.
3076
5a04c4cf
PA
30772016-10-26 Pedro Alves <palves@redhat.com>
3078
3079 * linux-low.c (handle_extended_wait): Link parent/child fork
3080 threads.
3081 (linux_wait_1): Unlink them.
3082 (linux_set_resume_request): Ignore resume requests for
3083 already-resumed and unhandled fork child threads.
3084 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3085 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3086 New functions.
3087 (handle_v_requests) <vCont>: Don't call require_running.
3088 * server.h (in_queued_stop_replies): New declaration.
3089
cb93dc7f
YQ
30902016-10-24 Yao Qi <yao.qi@linaro.org>
3091
3092 PR server/20733
3093 * linux-aarch64-low.c (append_insns): Cast the return value to
3094 'uint32_t *'.
3095
a1078bea
YQ
30962016-10-10 Yao Qi <yao.qi@linaro.org>
3097
3098 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3099
1fb77080
SDJ
31002016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3101
3102 * target.c (target_supports_multi_process): New function, moved
3103 from...
3104 * target.h (target_supports_multi_process): ... here. Remove
3105 macro.
3106
39b5a3b9
TT
31072016-10-05 Tom Tromey <tom@tromey.com>
3108
3109 PR remote/20655:
3110 * tracepoint.c (handle_tracepoint_bkpts): Check
3111 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3112
c1d0b70a
YQ
31132016-10-05 Yao Qi <yao.qi@linaro.org>
3114
3115 * configure.srv: Update the path of arm-*.xml files.
3116
0a69eedb
YQ
31172016-10-05 Terry Guo <terry.guo@arm.com>
3118 Yao Qi <yao.qi@linaro.org>
3119
3120 * Makefile.in: Adjust the path of rules.
3121 * configure.srv: Update the path of xml files.
3122 * regformats/arm-with-iwmmxt.dat: Regenerated.
3123 * regformats/arm-with-neon.dat: Likewise.
3124 * regformats/arm-with-vfpv2.dat: Likewise.
3125 * regformats/arm-with-vfpv3.dat Likewise.
3126
17e16485
YQ
31272016-09-30 Yao Qi <yao.qi@linaro.org>
3128
3129 PR gdbserver/20627
3130 * target.c (target_stop_and_wait): Don't call
3131 target_continue_no_signal, use resume_stop instead.
3132
edeeb602
YQ
31332016-09-26 Yao Qi <yao.qi@linaro.org>
3134
3135 * linux-low.c (linux_wait_1): Call debug_exit.
3136
503b1c39
PA
31372016-09-23 Pedro Alves <palves@redhat.com>
3138
3139 * Makefile.in (SFILES): Add common/new-op.c.
3140 (OBS): Add common/new-op.o.
3141 (new-op.o): New rule.
3142
74172ecf
SM
31432016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3144
3145 * .gitinore: Ignore more files.
3146
fc6cda2e
YQ
31472016-09-21 Yao Qi <yao.qi@linaro.org>
3148
3149 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3150 23.
3151
bc1e6c81
SDJ
31522016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3153
3154 * server.c (start_inferior): Call target_mourn_inferior instead of
3155 mourn_inferior; pass ptid_t argument to it.
3156 (resume): Likewise.
3157 (handle_target_event): Likewise.
3158 * target.c (target_mourn_inferior): New function.
3159 * target.h (mourn_inferior): Delete macro.
3160
0e00e962
AA
31612016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3162
3163 * linux-low.c (lwp_is_stepping): New function.
3164
1d8cb77d
CL
31652016-09-06 Carl Love <cel@us.ibm.com>
3166
3167 * server.c (start_inferior): Fixed comment, requested comment change
3168 didn't get updated correctly. Removed reference to ptrace () call as
3169 it is only true on Linux systems.
3170
7313bced
CL
31712016-09-06 Carl Love <cel@us.ibm.com>
3172
3173 * server.c (start_inferior): Do not call
3174 function target_post_create_inferior () if the
3175 inferior process has already exited.
3176
cf6de44d
PA
31772016-09-05 Pedro Alves <palves@redhat.com>
3178
3179 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3180 (COMPILE.pre, CC_LD): Use CXX directly.
3181 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3182 * acinclude.m4: Don't include build-with-cxx.m4.
3183 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3184 * configure: Regenerate.
3185
c1da6748
AT
31862016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3187
3188 PR gdb/19495
3189 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3190 call writing data to own_buf.
3191
f2b9e3df
SDJ
31922016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3193
3194 * target.c (mywait): Call target_wait instead of
3195 the_target->wait.
3196 (target_wait): New function.
3197
049a8570
SDJ
31982016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3199
3200 * server.c (start_inferior): New variable 'ptid'. Replace calls
3201 to the_target->resume by target_continue{,_no_signal}, depending
3202 on the case.
3203 * target.c (target_stop_and_wait): Call target_continue_no_signal
3204 instead of the_target->resume.
3205 (target_continue): New function.
3206
3aa5cfa0
AT
32072016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3208
3209 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3210
754653a7
AZ
32112016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3212
3213 PR server/20491
3214 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3215 ps_prochandle.
3216 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3217 * linux-arm-low.c (ps_get_thread_area): Likewise.
3218 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3219 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3220 * linux-mips-low.c (ps_get_thread_area): Likewise.
3221 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3222 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3223 * linux-x86-low.c (ps_get_thread_area): Likewise.
3224 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3225
ed036b40
PA
32262016-08-19 Pedro Alves <palves@redhat.com>
3227
3228 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3229
c8ef42ee
PA
32302016-08-19 Pedro Alves <palves@redhat.com>
3231
3232 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3233 comment. Use memcpy instead of casting through unsigned long.
3234
9c235a72
PA
32352016-08-19 Pedro Alves <palves@redhat.com>
3236
3237 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3238 allocating around 0x80000000.
3239
201506da
PA
32402016-08-19 Pedro Alves <palves@redhat.com>
3241
3242 PR gdb/20415
3243 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3244 (x32-avx512-linux-ipa.o): New rules.
3245 * configure.ac (x86_64-*-linux*): New x32 check.
3246 * configure.srv (ipa_x32_linux_regobj): New.
3247 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3248 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3249 descriptions.
3250 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3251 descriptions.
3252 * configure: Regenerate.
3253
f348d89a
PA
32542016-08-09 Pedro Alves <palves@redhat.com>
3255
3256 PR gdb/18653
3257 * Makefile.in (OBS): Add signals-state-save-restore.o.
3258 (signals-state-save-restore.o): New rule.
3259 * config.in: Regenerate.
3260 * configure: Regenerate.
3261 * linux-low.c: Include "signals-state-save-restore.h".
3262 (linux_create_inferior): Call
3263 restore_original_signals_state.
3264 * server.c: Include "dispositions-save-restore.h".
3265 (captured_main): Call save_original_signals_state.
3266
1baf5149
PA
32672016-08-05 Pedro Alves <palves@redhat.com>
3268
3269 * configure: Regenerate.
3270
fcd4a73d
YQ
32712016-08-04 Yao Qi <yao.qi@linaro.org>
3272
3273 * linux-low.c (regsets_fetch_inferior_registers): Check
3274 errno is ESRCH or not.
3275
979659d0
YQ
32762016-08-02 Yao Qi <yao.qi@linaro.org>
3277
3278 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3279 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3280 (thread_db_load_search): Update.
3281 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3282 td_ta_set_event and td_ta_event_getmsg.
3283
6598661d
PA
32842016-07-26 Pedro Alves <palves@redhat.com>
3285
3286 PR server/20414
3287 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3288 of unsigned long for 64-bit registers and use uint32_t instead of
3289 unsigned int for 32-bit registers.
3290
9cf12d57
PA
32912016-07-26 Pedro Alves <palves@redhat.com>
3292
3293 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3294 to 'ptrace'.
3295
305450ed
TT
32962016-07-21 Tom Tromey <tom@tromey.com>
3297
3298 * configure: Rebuild.
3299
2583da7c
YQ
33002016-07-21 Yao Qi <yao.qi@linaro.org>
3301
3302 * mem-break.c (find_gdb_breakpoint): Cast bp to
3303 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3304
21536b36
YQ
33052016-07-21 Yao Qi <yao.qi@linaro.org>
3306
3307 * server.c (handle_v_requests): Support s and S actions
3308 if target_supports_software_single_step return true.
3309
8901d193
YQ
33102016-07-21 Yao Qi <yao.qi@linaro.org>
3311
3312 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3313 is resume_step, call maybe_hw_step.
3314 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3315 and unstop them.
3316 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3317 breakpoints or not.
3318 (proceed_one_lwp): If resume request is resume_step, install
3319 reinsert breakpoints and call maybe_hw_step.
3320
0e9a339e
YQ
33212016-07-21 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-low.c (proceed_one_lwp): Declare.
3324 (linux_resume_one_thread): Remove local variable 'step'.
3325 Lift code enqueue signal. Call proceed_one_lwp instead of
3326 linux_resume_one_lwp.
3327
4281b351
YQ
33282016-07-21 Yao Qi <yao.qi@linaro.org>
3329
3330 * linux-low.c (linux_resume_one_thread): Call
3331 enqueue_pending_signal.
3332
984a2c04
YQ
33332016-07-21 Yao Qi <yao.qi@linaro.org>
3334
3335 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3336 * inferiors.c (do_restore_current_thread_cleanup): New function.
3337 (make_cleanup_restore_current_thread): Likewise.
3338 * linux-low.c (install_software_single_step_breakpoints): Call
3339 make_cleanup_restore_current_thread. Switch current_thread to
3340 thread.
3341
bec903c9
YQ
33422016-07-21 Yao Qi <yao.qi@linaro.org>
3343
3344 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3345 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3346 (clone_one_breakpoint): Likewise.
3347 (delete_reinsert_breakpoints): Change parameter to thread.
3348 Callers updated.
3349 (has_reinsert_breakpoints): Likewise.
3350 (uninsert_reinsert_breakpoints): Likewise.
3351 (reinsert_reinsert_breakpoints): Likewise.
3352 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3353 (delete_reinsert_breakpoints): Likewise.
3354 (reinsert_reinsert_breakpoints): Likewise.
3355 (uninsert_reinsert_breakpoints): Likewise.
3356 (has_reinsert_breakpoints): Likewise.
3357
63c40ec7
YQ
33582016-07-21 Yao Qi <yao.qi@linaro.org>
3359
3360 * inferiors.c (get_thread_process): Make parameter const.
3361 * inferiors.h (get_thread_process): Update declaration.
3362 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3363 Add new parameters child_thread and parent_thread. Callers
3364 updated.
3365 * mem-break.h (clone_all_breakpoints): Update declaration.
3366
9aa76cd0
YQ
33672016-07-21 Yao Qi <yao.qi@linaro.org>
3368
3369 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3370 <command_list, handler>: Remove.
3371 (struct gdb_breakpoint): New.
3372 (struct other_breakpoint): New.
3373 (struct reinsert_breakpoint): New.
3374 (is_gdb_breakpoint): New function.
3375 (any_persistent_commands): Update command_list if
3376 is_gdb_breakpoint returns true.
3377 (set_breakpoint): Create breakpoints according to their types.
3378 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3379 (set_gdb_breakpoint_1): Likewise.
3380 (set_gdb_breakpoint): Likewise.
3381 (clear_breakpoint_conditions): Change parameter type to
3382 'struct gdb_breakpoint *'.
3383 (clear_breakpoint_commands): Likewise.
3384 (clear_breakpoint_conditions_and_commands): Likewise.
3385 (add_condition_to_breakpoint): Likewise.
3386 (add_breakpoint_condition): Likewise.
3387 (add_commands_to_breakpoint): Likewise.
3388 (check_breakpoints): Check other_breakpoint.
3389 (clone_one_breakpoint): Clone breakpopint according to its type.
3390 * mem-break.h (struct gdb_breakpoint): Declare.
3391 (set_gdb_breakpoint): Update declaration.
3392 (clear_breakpoint_conditions_and_commands): Likewise.
3393 (add_breakpoint_condition): Likewise.
3394 (add_breakpoint_commands): Likewise.
3395 * server.c (process_point_options): Change parameter type to
3396 'struct gdb_breakpoint *'.
3397
811f8301
YQ
33982016-07-21 Yao Qi <yao.qi@linaro.org>
3399
3400 * mem-break.c (set_breakpoint_at): Rename it to ...
3401 (set_breakpoint_type_at): ... it.
3402 (set_breakpoint_at): Call set_breakpoint_type_at.
3403 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3404 * mem-break.h (set_breakpoint_at): Update comments.
3405
b1c51e36
CLT
34062016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3407
3408 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3409 to buf parameter.
3410 (nios2_store_gregset): Likewise.
3411
ced2dffb
PA
34122016-07-01 Pedro Alves <palves@redhat.com>
3413 Antoine Tremblay <antoine.tremblay@ericsson.com>
3414
3415 * linux-low.c: Change interface to take the target lwp_info
3416 pointer directly and return void. Handle detaching from a zombie
3417 thread.
3418 (linux_detach_lwp_callback): New function.
3419 (linux_detach): Detach from the leader thread after detaching from
3420 the clone threads.
3421
2ac09a5b
YQ
34222016-06-28 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3425 for variable new_offset.
3426 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3427 (aarch64_ftrace_insn_reloc_cb): Likewise.
3428 (aarch64_ftrace_insn_reloc_tb): Likewise.
3429 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3430 PRIx64 instead of PRIx32.
3431
79e7fd4f
YQ
34322016-06-28 Yao Qi <yao.qi@linaro.org>
3433
3434 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3435 (the_low_target): Install arm_get_syscall_trapinfo.
3436
061fc021
YQ
34372016-06-28 Yao Qi <yao.qi@linaro.org>
3438
3439 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3440 function.
3441 (the_low_target): Install aarch64_get_syscall_trapinfo.
3442
4cc32bec
YQ
34432016-06-28 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3446 Callers updated.
3447 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3448 Remove parameter sysno.
3449 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3450 sysret.
3451
782c1122
AA
34522016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3453
3454 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3455 (s390_emit_ne_goto): Likewise.
3456 (s390_emit_lt_goto): Likewise.
3457 (s390_emit_le_goto): Likewise.
3458 (s390_emit_gt_goto): Likewise.
3459 (s390_emit_ge_goto): Likewise.
3460 (s390x_emit_eq_goto): Likewise.
3461 (s390x_emit_ne_goto): Likewise.
3462 (s390x_emit_lt_goto): Likewise.
3463 (s390x_emit_le_goto): Likewise.
3464 (s390x_emit_gt_goto): Likewise.
3465 (s390x_emit_ge_goto): Likewise.
3466 (s390_emit_ops_impl): Mark variable static.
3467 (s390x_emit_ops): Likewise.
3468
2e7b624b
YQ
34692016-06-17 Yao Qi <yao.qi@linaro.org>
3470
3471 * linux-low.c (handle_extended_wait): Call
3472 uninsert_reinsert_breakpoints for the parent process. Remove
3473 reinsert breakpoints from the child process. Reinsert them to
3474 the parent process when vfork is done.
3475 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3476 (reinsert_reinsert_breakpoints): New function.
3477 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3478 (reinsert_reinsert_breakpoints): Declare.
3479
8a81c5d7
YQ
34802016-06-17 Yao Qi <yao.qi@linaro.org>
3481
3482 * linux-low.c (handle_extended_wait): If the parent is doing
3483 step-over, remove the reinsert breakpoints from the forked child.
3484
f50bf8e5
YQ
34852016-06-17 Yao Qi <yao.qi@linaro.org>
3486
3487 * linux-low.c (unsuspend_all_lwps): Declare.
3488 (linux_low_filter_event): If thread exited, call finish_step_over.
3489 If step-over is finished, unsuspend other threads.
3490
8376a3cb
YQ
34912016-06-17 Yao Qi <yao.qi@linaro.org>
3492
3493 * linux-low.c (linux_resume_one_lwp_throw): Assert
3494 has_reinsert_breakpoints returns false.
3495 * mem-break.c (delete_disabled_breakpoints): Assert
3496 bp type isn't reinsert_breakpoint.
3497
f79b145d
YQ
34982016-06-17 Yao Qi <yao.qi@linaro.org>
3499
3500 * linux-low.c (maybe_hw_step): New function.
3501 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3502 (finish_step_over): Switch current_thread to lwp temporarily,
3503 and assert has_reinsert_breakpoints returns true.
3504 (proceed_one_lwp): Call maybe_hw_step.
3505 * mem-break.c (has_reinsert_breakpoints): New function.
3506 * mem-break.h (has_reinsert_breakpoints): Declare.
3507
0ae534d2
JT
35082016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3509
3510 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3511
fcdad592
YQ
35122016-05-17 Yao Qi <yao.qi@linaro.org>
3513
3514 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3515 instead of find_inferior.
3516
9e784964
YQ
35172016-05-05 Yao Qi <yao.qi@linaro.org>
3518
3519 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3520 Initialize res to zero.
3521
cf2ebb6e
YQ
35222016-05-05 Yao Qi <yao.qi@linaro.org>
3523
3524 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3525 to uint32_t.
3526
c1aebf87
UW
35272016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3528
3529 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3530 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3531 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3532
35fd2deb 35332016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3534 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3535
3536 * tracepoint.c (write_inferior_int8): New function.
3537 (cmd_qtenable_disable): Write enable flag using
3538 write_inferior_int8.
3539
484b3c32
YQ
35402016-04-25 Yao Qi <yao.qi@linaro.org>
3541
3542 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3543 (need_step_over_p): Return zero if the LWP has pending signals
3544 can be delivered on software single step target.
3545
85ba7d86
YQ
35462016-04-25 Yao Qi <yao.qi@linaro.org>
3547
3548 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3549 return instead of error.
3550
3539aa13
YQ
35512016-04-22 Yao Qi <yao.qi@linaro.org>
3552
3553 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3554 to 23.
3555
5b061e98
YQ
35562016-04-22 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3559 signal when stepping over breakpoint with software single
3560 step.
3561
3451269c
PA
35622016-04-21 Pedro Alves <palves@redhat.com>
3563
3564 * linux-s390-low.c (s390_collect_ptrace_register)
3565 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3566 add casts.
3567 (s390_check_regset): Use void * instead of gdb_byte *.
3568
a2358508
PA
35692016-04-20 Pedro Alves <palves@redhat.com>
3570
3571 * configure: Renegerate.
3572
6885166d
YQ
35732016-04-20 Yao Qi <yao.qi@linaro.org>
3574
3575 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3576 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3577 number 16.
3578 (arm_store_gregset): Likewise.
3579
2b863f51
WT
35802016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3581
3582 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3583 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3584 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3585 (amd64-avx-mpx-linux.c): New rules.
3586 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3587 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3588 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3589 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3590 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3591 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3592 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3593 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3594 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3595 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3596 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3597 * linux-x86-low.c (x86_linux_read_description): Add case for
3598 X86_XSTATE_AVX_MPX_MASK.
3599 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3600 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3601 init_registers_i386_avx_mpx_linux.
3602 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3603 (initialize_low_tracepoint): Call
3604 init_registers_i386_avx_mpx_linux.
3605 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3606 (initialize_low_tracepoint): Call
3607 init_registers_amd64_avx_mpx_linux.
3608 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3609 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3610 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3611 declarations.
3612
9b30624b
PA
36132016-04-18 Pedro Alves <palves@redhat.com>
3614
3615 * configure: Regenerate.
3616
45e3745e
AT
36172016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3618
3619 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3620 (aarch64_emit_sub): Likewise.
3621
2afc13ff
PA
36222016-04-12 Pedro Alves <palves@redhat.com>
3623
3624 * utils.c (prepare_to_throw_exception): Delete.
3625
6e774b13
SM
36262016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3627
3628 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3629
4dca19f8
MK
36302016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3631
3632 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3633
d0a9981f
MK
36342016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3635
3636 * linux-aarch64-ipa.c: Add <elf.h> include.
3637 * linux-ppc-ipa.c: Add <elf.h> include.
3638 * linux-s390-ipa.c: Add <elf.h> include.
3639
252db07e
MK
36402016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3641
3642 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3643 (get_raw_reg_ptr): Likewise.
3644 (get_trace_state_variable_value_ptr): Likewise.
3645 (set_trace_state_variable_value_ptr): Likewise.
3646 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3647 char *.
3648
14e2b6d9
MK
36492016-03-31 Wei-cheng Wang <cole945@gmail.com>
3650 Marcin Kościelnicki <koriakin@0x04.net>
3651
3652 PR/17221
3653 * linux-ppc-low.c (emit_insns): New function.
3654 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3655 (ppc_emit_prologue): New function.
3656 (ppc_emit_epilogue): New function.
3657 (ppc_emit_add): New function.
3658 (ppc_emit_sub): New function.
3659 (ppc_emit_mul): New function.
3660 (ppc_emit_lsh): New function.
3661 (ppc_emit_rsh_signed): New function.
3662 (ppc_emit_rsh_unsigned): New function.
3663 (ppc_emit_ext): New function.
3664 (ppc_emit_zero_ext): New function.
3665 (ppc_emit_log_not): New function.
3666 (ppc_emit_bit_and): New function.
3667 (ppc_emit_bit_or): New function.
3668 (ppc_emit_bit_xor): New function.
3669 (ppc_emit_bit_not): New function.
3670 (ppc_emit_equal): New function.
3671 (ppc_emit_less_signed): New function.
3672 (ppc_emit_less_unsigned): New function.
3673 (ppc_emit_ref): New function.
3674 (ppc_emit_const): New function.
3675 (ppc_emit_reg): New function.
3676 (ppc_emit_pop): New function.
3677 (ppc_emit_stack_flush): New function.
3678 (ppc_emit_swap): New function.
3679 (ppc_emit_stack_adjust): New function.
3680 (ppc_emit_call): New function.
3681 (ppc_emit_int_call_1): New function.
3682 (ppc_emit_void_call_2): New function.
3683 (ppc_emit_if_goto): New function.
3684 (ppc_emit_goto): New function.
3685 (ppc_emit_eq_goto): New function.
3686 (ppc_emit_ne_goto): New function.
3687 (ppc_emit_lt_goto): New function.
3688 (ppc_emit_le_goto): New function.
3689 (ppc_emit_gt_goto): New function.
3690 (ppc_emit_ge_goto): New function.
3691 (ppc_write_goto_address): New function.
3692 (ppc_emit_ops_impl): New static variable.
3693 (ppc64v1_emit_prologue): New function.
3694 (ppc64v2_emit_prologue): New function.
3695 (ppc64_emit_epilogue): New function.
3696 (ppc64_emit_add): New function.
3697 (ppc64_emit_sub): New function.
3698 (ppc64_emit_mul): New function.
3699 (ppc64_emit_lsh): New function.
3700 (ppc64_emit_rsh_signed): New function.
3701 (ppc64_emit_rsh_unsigned): New function.
3702 (ppc64_emit_ext): New function.
3703 (ppc64_emit_zero_ext): New function.
3704 (ppc64_emit_log_not): New function.
3705 (ppc64_emit_bit_and): New function.
3706 (ppc64_emit_bit_or): New function.
3707 (ppc64_emit_bit_xor): New function.
3708 (ppc64_emit_bit_not): New function.
3709 (ppc64_emit_equal): New function.
3710 (ppc64_emit_less_signed): New function.
3711 (ppc64_emit_less_unsigned): New function.
3712 (ppc64_emit_ref): New function.
3713 (ppc64_emit_const): New function.
3714 (ppc64v1_emit_reg): New function.
3715 (ppc64v2_emit_reg): New function.
3716 (ppc64_emit_pop): New function.
3717 (ppc64_emit_stack_flush): New function.
3718 (ppc64_emit_swap): New function.
3719 (ppc64v1_emit_call): New function.
3720 (ppc64v2_emit_call): New function.
3721 (ppc64v1_emit_int_call_1): New function.
3722 (ppc64v2_emit_int_call_1): New function.
3723 (ppc64v1_emit_void_call_2): New function.
3724 (ppc64v2_emit_void_call_2): New function.
3725 (ppc64_emit_if_goto): New function.
3726 (ppc64_emit_eq_goto): New function.
3727 (ppc64_emit_ne_goto): New function.
3728 (ppc64_emit_lt_goto): New function.
3729 (ppc64_emit_le_goto): New function.
3730 (ppc64_emit_gt_goto): New function.
3731 (ppc64_emit_ge_goto): New function.
3732 (ppc64v1_emit_ops_impl): New static variable.
3733 (ppc64v2_emit_ops_impl): New static variable.
3734 (ppc_emit_ops): New function.
3735 (linux_low_target): Wire in ppc_emit_ops.
3736
a2174ba4
MK
37372016-03-31 Wei-cheng Wang <cole945@gmail.com>
3738 Marcin Kościelnicki <koriakin@0x04.net>
3739
3740 PR/17221
3741 * Makefile.in: Add powerpc-*-ipa.o
3742 * configure.srv: Add ipa_obj for powerpc*-linux.
3743 * linux-ppc-ipa.c: New file.
3744 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3745 includes.
3746 (PPC_FIELD): New macro.
3747 (PPC_SEXT): New macro.
3748 (PPC_OP6): New macro.
3749 (PPC_BO): New macro.
3750 (PPC_LI): New macro.
3751 (PPC_BD): New macro.
3752 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3753 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3754 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3755 (ppc_get_thread_area): New function.
3756 (is_elfv2_inferior): New function.
3757 (gen_ds_form): New function.
3758 (GEN_STD): New macro.
3759 (GEN_STDU): New macro.
3760 (GEN_LD): New macro.
3761 (GEN_LDU): New macro.
3762 (gen_d_form): New function.
3763 (GEN_ADDI): New macro.
3764 (GEN_ADDIS): New macro.
3765 (GEN_LI): New macro.
3766 (GEN_LIS): New macro.
3767 (GEN_ORI): New macro.
3768 (GEN_ORIS): New macro.
3769 (GEN_LWZ): New macro.
3770 (GEN_STW): New macro.
3771 (GEN_STWU): New macro.
3772 (gen_xfx_form): New function.
3773 (GEN_MFSPR): New macro.
3774 (GEN_MTSPR): New macro.
3775 (GEN_MFCR): New macro.
3776 (GEN_MTCR): New macro.
3777 (GEN_SYNC): New macro.
3778 (GEN_LWSYNC): New macro.
3779 (gen_x_form): New function.
3780 (GEN_OR): New macro.
3781 (GEN_MR): New macro.
3782 (GEN_LWARX): New macro.
3783 (GEN_STWCX): New macro.
3784 (GEN_CMPW): New macro.
3785 (gen_md_form): New function.
3786 (GEN_RLDICL): New macro.
3787 (GEN_RLDICR): New macro.
3788 (gen_i_form): New function.
3789 (GEN_B): New macro.
3790 (GEN_BL): New macro.
3791 (gen_b_form): New function.
3792 (GEN_BNE): New macro.
3793 (GEN_LOAD): New macro.
3794 (GEN_STORE): New macro.
3795 (gen_limm): New function.
3796 (gen_atomic_xchg): New function.
3797 (gen_call): New function.
3798 (ppc_relocate_instruction): New function.
3799 (ppc_install_fast_tracepoint_jump_pad): New function.
3800 (ppc_get_min_fast_tracepoint_insn_len): New function.
3801 (ppc_get_ipa_tdesc_idx): New function.
3802 (the_low_target): Wire in the new functions.
3803 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3804 tdescs.
3805 * linux-ppc-tdesc.h: New file.
3806
a13c4696
MK
38072016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3808
3809 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3810 (alloc_jump_pad_buffer): New function.
3811 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3812 (alloc_jump_pad_buffer): New function.
3813 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3814 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3815 (alloc_jump_pad_buffer): New function.
3816 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3817 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3818 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3819 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3820
1cda1512
MK
38212016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3822
3823 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3824 * linux-amd64-ipa.c: Likewise.
3825 * linux-i386-ipa.c: Likewise.
3826 * linux-s390-ipa.c: Likewise.
3827 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3828 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3829 set_trace_state_variable_value_ptr.
3830 (struct ipa_sym_addresses): Likewise.
3831 (symbol_list): Likewise.
3832 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3833 accessing gdb_collect directly.
3834 (gdb_collect_ptr_type): New typedef.
3835 (get_raw_reg_ptr_type): New typedef.
3836 (get_trace_state_variable_value_ptr_type): New typedef.
3837 (set_trace_state_variable_value_ptr_type): New typedef.
3838 (gdb_collect_ptr): New global.
3839 (get_raw_reg_ptr): New global.
3840 (get_trace_state_variable_value_ptr): New global.
3841 (set_trace_state_variable_value_ptr): New global.
3842 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3843 accessing get_raw_reg directly.
3844 (get_get_tsv_func_addr): Likewise for
3845 get_trace_state_variable_value_ptr.
3846 (get_set_tsv_func_addr): Likewise for
3847 set_trace_state_variable_value_ptr.
3848 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3849
72fb5488
SM
38502016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3851
3852 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3853
28170b88
MK
38542016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3855
3856 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3857 packets.
3858 (relocate_instruction): Remove own_buf.
3859 * server.c (own_buf): Make global.
3860 (handle_v_requests): Make global.
3861 * server.h (own_buf): New declaration.
3862 (handle_v_requests): New prototype.
3863
f39e8743
MK
38642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3865
3866 PR 18377
3867 * linux-s390-low.c (add_insns): New function.
3868 (s390_emit_prologue): New function.
3869 (s390_emit_epilogue): New function.
3870 (s390_emit_add): New function.
3871 (s390_emit_sub): New function.
3872 (s390_emit_mul): New function.
3873 (s390_emit_lsh): New function.
3874 (s390_emit_rsh_signed): New function.
3875 (s390_emit_rsh_unsigned): New function.
3876 (s390_emit_ext): New function.
3877 (s390_emit_log_not): New function.
3878 (s390_emit_bit_and): New function.
3879 (s390_emit_bit_or): New function.
3880 (s390_emit_bit_xor): New function.
3881 (s390_emit_bit_not): New function.
3882 (s390_emit_equal): New function.
3883 (s390_emit_less_signed): New function.
3884 (s390_emit_less_unsigned): New function.
3885 (s390_emit_ref): New function.
3886 (s390_emit_if_goto): New function.
3887 (s390_emit_goto): New function.
3888 (s390_write_goto_address): New function.
3889 (s390_emit_litpool): New function.
3890 (s390_emit_const): New function.
3891 (s390_emit_call): New function.
3892 (s390_emit_reg): New function.
3893 (s390_emit_pop): New function.
3894 (s390_emit_stack_flush): New function.
3895 (s390_emit_zero_ext): New function.
3896 (s390_emit_swap): New function.
3897 (s390_emit_stack_adjust): New function.
3898 (s390_emit_set_r2): New function.
3899 (s390_emit_int_call_1): New function.
3900 (s390_emit_void_call_2): New function.
3901 (s390_emit_eq_goto): New function.
3902 (s390_emit_ne_goto): New function.
3903 (s390_emit_lt_goto): New function.
3904 (s390_emit_le_goto): New function.
3905 (s390_emit_gt_goto): New function.
3906 (s390_emit_ge_goto): New function.
3907 (s390x_emit_prologue): New function.
3908 (s390x_emit_epilogue): New function.
3909 (s390x_emit_add): New function.
3910 (s390x_emit_sub): New function.
3911 (s390x_emit_mul): New function.
3912 (s390x_emit_lsh): New function.
3913 (s390x_emit_rsh_signed): New function.
3914 (s390x_emit_rsh_unsigned): New function.
3915 (s390x_emit_ext): New function.
3916 (s390x_emit_log_not): New function.
3917 (s390x_emit_bit_and): New function.
3918 (s390x_emit_bit_or): New function.
3919 (s390x_emit_bit_xor): New function.
3920 (s390x_emit_bit_not): New function.
3921 (s390x_emit_equal): New function.
3922 (s390x_emit_less_signed): New function.
3923 (s390x_emit_less_unsigned): New function.
3924 (s390x_emit_ref): New function.
3925 (s390x_emit_if_goto): New function.
3926 (s390x_emit_const): New function.
3927 (s390x_emit_call): New function.
3928 (s390x_emit_reg): New function.
3929 (s390x_emit_pop): New function.
3930 (s390x_emit_stack_flush): New function.
3931 (s390x_emit_zero_ext): New function.
3932 (s390x_emit_swap): New function.
3933 (s390x_emit_stack_adjust): New function.
3934 (s390x_emit_int_call_1): New function.
3935 (s390x_emit_void_call_2): New function.
3936 (s390x_emit_eq_goto): New function.
3937 (s390x_emit_ne_goto): New function.
3938 (s390x_emit_lt_goto): New function.
3939 (s390x_emit_le_goto): New function.
3940 (s390x_emit_gt_goto): New function.
3941 (s390x_emit_ge_goto): New function.
3942 (s390_emit_ops): New function.
3943 (struct linux_target_ops): Fill in emit_ops hook.
3944
abd9baf9
MK
39452016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3946
3947 PR 18377
3948 * Makefile.in: Add s390 IPA files.
3949 * configure.srv: Build IPA for s390.
3950 * linux-s390-ipa.c: New file.
3951 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3952 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3953 (tdesc_s390_linux32): Likewise.
3954 (init_registers_s390_linux32v1): Likewise.
3955 (tdesc_s390_linux32v1): Likewise.
3956 (init_registers_s390_linux32v2): Likewise.
3957 (tdesc_s390_linux32v2): Likewise.
3958 (init_registers_s390_linux64): Likewise.
3959 (tdesc_s390_linux64): Likewise.
3960 (init_registers_s390_linux64v1): Likewise.
3961 (tdesc_s390_linux64v1): Likewise.
3962 (init_registers_s390_linux64v2): Likewise.
3963 (tdesc_s390_linux64v2): Likewise.
3964 (init_registers_s390_te_linux64): Likewise.
3965 (tdesc_s390_te_linux64): Likewise.
3966 (init_registers_s390_vx_linux64): Likewise.
3967 (tdesc_s390_vx_linux64): Likewise.
3968 (init_registers_s390_tevx_linux64): Likewise.
3969 (tdesc_s390_tevx_linux64): Likewise.
3970 (init_registers_s390x_linux64): Likewise.
3971 (tdesc_s390x_linux64): Likewise.
3972 (init_registers_s390x_linux64v1): Likewise.
3973 (tdesc_s390x_linux64v1): Likewise.
3974 (init_registers_s390x_linux64v2): Likewise.
3975 (tdesc_s390x_linux64v2): Likewise.
3976 (init_registers_s390x_te_linux64): Likewise.
3977 (tdesc_s390x_te_linux64): Likewise.
3978 (init_registers_s390x_vx_linux64): Likewise.
3979 (tdesc_s390x_vx_linux64): Likewise.
3980 (init_registers_s390x_tevx_linux64): Likewise.
3981 (tdesc_s390x_tevx_linux64): Likewise.
3982 (have_hwcap_s390_vx): New static variable.
3983 (s390_arch_setup): Fill have_hwcap_s390_vx.
3984 (s390_get_thread_area): New function.
3985 (s390_ft_entry_gpr_esa): New const.
3986 (s390_ft_entry_gpr_zarch): New const.
3987 (s390_ft_entry_misc): New const.
3988 (s390_ft_entry_fr): New const.
3989 (s390_ft_entry_vr): New const.
3990 (s390_ft_main_31): New const.
3991 (s390_ft_main_64): New const.
3992 (s390_ft_exit_fr): New const.
3993 (s390_ft_exit_vr): New const.
3994 (s390_ft_exit_misc): New const.
3995 (s390_ft_exit_gpr_esa): New const.
3996 (s390_ft_exit_gpr_zarch): New const.
3997 (append_insns): New function.
3998 (s390_relocate_instruction): New function.
3999 (s390_install_fast_tracepoint_jump_pad): New function.
4000 (s390_get_min_fast_tracepoint_insn_len): New function.
4001 (s390_get_ipa_tdesc_idx): New function.
4002 (struct linux_target_ops): Wire in the above functions.
4003 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4004 * linux-s390-tdesc.h: New file.
4005
a4105d04
MK
40062016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4007
4008 * linux-s390-low.c (s390_supports_tracepoints): New function.
4009 (struct linux_target_ops): Fill supports_tracepoints hook.
4010
35ac8b3e
YQ
40112016-03-18 Yao Qi <yao.qi@linaro.org>
4012
4013 * linux-low.c (lwp_signal_can_be_delivered): New function.
4014 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4015
94610ec4
YQ
40162016-03-18 Yao Qi <yao.qi@linaro.org>
4017
4018 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4019 0 if signal is enqueued. Remove 'signal' from one debugging
4020 message. Move one debugging message to some lines below.
4021 Remove code setting 'signal' to 0.
4022
80aea927
YQ
40232016-03-18 Yao Qi <yao.qi@linaro.org>
4024
4025 * linux-low.c (linux_low_filter_event): Remove redundant
4026 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4027
b04fd3be
MK
40282016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4029
4030 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4031 (struct linux_target_ops): Wire in the above.
4032
c40c8d4b
YQ
40332016-03-03 Yao Qi <yao.qi@linaro.org>
4034
4035 * linux-low.c: Update comments to start_step_over.
4036
0f8288ae
YQ
40372016-03-03 Yao Qi <yao.qi@linaro.org>
4038
4039 PR server/19736
4040 * linux-low.c (handle_extended_wait): Set child suspended
4041 if event_lwp->bp_reinsert isn't zero.
4042
fdbd04a8
YQ
40432016-03-02 Yao Qi <yao.qi@linaro.org>
4044
4045 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4046 enqueue_pending_signal.
4047
6896a8fa
MK
40482016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4049
4050 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4051 is actually loaded.
4052
ab503087
MK
40532016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4054
4055 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4056 (s390_regmap_3264) [!__s390x__]: New global.
4057 (s390_collect_ptrace_register): Skip map entries containing -1.
4058 (s390_supply_ptrace_register): Ditto.
4059 (s390_fill_gprs_high): New function.
4060 (s390_store_gprs_high): New function.
4061 (s390_regsets): Add NT_S390_HIGH_GPRS.
4062 (s390_get_hwcap): Enable on 31-bit.
4063 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4064 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4065 Detect NT_S390_HIGH_GPRS.
4066 (s390_usrregs_info_3264): Enable on 31-bit.
4067 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4068 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4069
ae91f625
MK
40702016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4071
4072 PR gdb/13808
4073 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4074 * configure.srv: Ditto.
4075 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4076 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4077 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4078 (init_registers_amd64_linux): Remove prototype.
4079 (tdesc_amd64_linux): Remove declaration.
4080 (get_ipa_tdesc): New function.
4081 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4082 initialize remaining tdescs.
4083 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4084 (init_registers_i386_linux): Remove prototype.
4085 (tdesc_i386_linux): Remove declaration.
4086 (get_ipa_tdesc): New function.
4087 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4088 initialize remaining tdescs.
4089 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4090 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4091 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4092 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4093 (x86_get_ipa_tdesc_idx): New function.
4094 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4095 * linux-x86-tdesc.h: New file.
4096 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4097 (target_get_ipa_tdesc_idx): New macro.
4098 * tracepoint.c (ipa_tdesc_idx): New macro.
4099 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4100 (symbol_list): Add ipa_tdesc_idx.
4101 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4102 (ipa_tdesc): Remove.
4103 (ipa_tdesc_idx): New variable.
4104 (get_context_regcache): Use get_ipa_tdesc.
4105 (gdb_collect): Ditto.
4106 (gdb_probe): Ditto.
4107 * tracepoint.h (get_ipa_tdesc): New prototype.
4108 (ipa_tdesc): Remove.
4109
e7ad2f14
PA
41102016-02-24 Pedro Alves <palves@redhat.com>
4111
4112 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4113 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4114 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4115 Factor out common code between the USE_SIGTRAP_SIGINFO and
4116 !USE_SIGTRAP_SIGINFO blocks.
4117 (linux_low_filter_event): Call save_stop_reason instead of
4118 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4119 Update comments.
4120 (linux_wait_1): Update comments.
4121
657f9cde
WW
41222016-02-24 Wei-cheng Wang <cole945@gmail.com>
4123
4124 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4125 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4126 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4127 ppc_insert_point, ppc_remove_point.
4128
b00b61e1
MK
41292016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4130
4131 * linux-s390-low.c (s390_supports_z_point_type): New function.
4132 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4133
553cb527
YQ
41342016-02-16 Yao Qi <yao.qi@linaro.org>
4135
4136 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4137 PC. Get pc from regcache_read_pc.
4138
a5652c21
YQ
41392016-02-12 Yao Qi <yao.qi@linaro.org>
4140
4141 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4142 or linux_get_pc_32bit.
4143 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4144
ed443b61
YQ
41452016-02-12 Yao Qi <yao.qi@linaro.org>
4146
4147 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4148 arm_linux_get_next_pcs_fixup.
4149
020ecd38
MK
41502016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4151
4152 * tracepoint.c (x_tracepoint_action_download): Change
4153 write_inferior_data_ptr to write_inferior_data_pointer.
4154 (cmd_qtstart): Likewise.
4155 (write_inferior_data_ptr): Remove.
4156 (download_agent_expr): Change write_inferior_data_ptr to
4157 write_inferior_data_pointer.
4158 (download_tracepoint_1): Likewise.
4159 (download_tracepoint): Likewise.
4160 (download_trace_state_variables): Likewise.
4161
7cae9051
WW
41622016-02-11 Wei-cheng Wang <cole945@gmail.com>
4163 Marcin Kościelnicki <koriakin@0x04.net>
4164
4165 * tracepoint.c (struct tracepoint_action_ops): Remove.
4166 (struct tracepoint_action): Remove ops.
4167 (m_tracepoint_action_download, r_tracepoint_action_download)
4168 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4169 size and offset accordingly.
4170 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4171 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4172 (tracepoint_action_send, tracepoint_action_download): New functions.
4173 Helpers for trace action handlers.
4174 (add_tracepoint_action): Remove setup actions ops.
4175 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4176
9f6a71b4
YQ
41772016-02-10 Yao Qi <yao.qi@linaro.org>
4178
4179 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4180
1e94266c
SM
41812016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4182
4183 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4184 to AC_OUTPUT.
4185 * configure: Regenerate.
4186
8adce034
SM
41872016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4188
4189 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4190 void * to gdb_byte *.
4191 * linux-low.c (siginfo_fixup): Likewise.
4192 (linux_xfer_siginfo): Likewise.
4193 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4194 Likewise.
4195 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4196
93813b37
WT
41972016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4198
4199 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4200 to srv_tgtobj.
4201 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4202 to srv_tgtobj.
4203 * linux-x86-low.c [__x86_64__]: Include
4204 "nat/amd64-linux-siginfo.h".
4205 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4206 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4207 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4208 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4209 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4210 (cpt_si_fd, si_timerid, si_overrun): Move from
4211 nat/amd64-linux-siginfo.c.
4212 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4213
8424cc97
SM
42142016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4215
4216 * server.c (skip_to_semicolon): Remove.
4217 (process_point_options): Use strchrnul instead of
4218 skip_to_semicolon.
4219
4d18591b
YQ
42202016-01-26 Yao Qi <yao.qi@linaro.org>
4221
4222 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4223 * linux-low.c (install_software_single_step_breakpoints): Don't
4224 call regcache_read_pc.
4225 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4226 argument pc.
4227
d8020970
YQ
42282016-01-26 Yao Qi <yao.qi@linaro.org>
4229
4230 * linux-low.c (install_software_single_step_breakpoints): Call
4231 regcache_read_pc instead of get_pc.
4232
8b207339
YQ
42332016-01-26 Yao Qi <yao.qi@linaro.org>
4234
4235 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4236 (unblock_async_io): Rename to ...
4237 (block_unblock_async_io): ... it. New function.
4238 (enable_async_io): Don't install SIGIO handler. Unblock it
4239 instead.
4240 (disable_async_io): Don't ignore SIGIO. Block it instead.
4241 (initialize_async_io): Install SIGIO handler. Don't call
4242 unblock_async_io.
4243
18879fef
YQ
42442016-01-26 Yao Qi <yao.qi@linaro.org>
4245
4246 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4247 first character is '\003', call *the_target->request_interrupt.
4248
a0f8e08a
YQ
42492016-01-25 Yao Qi <yao.qi@linaro.org>
4250
4251 * remote-utils.c (new_thread_notify): Remove.
4252 (dead_thread_notify): Likewise.
4253 * remote-utils.h (new_thread_notify): Remove declaration.
4254 (dead_thread_notify): Likewise.
4255
cc5fd9ab
MK
42562016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4257
4258 * gdb.trace/pending.exp: Fix expected message on continue.
4259
99e8eb11
MK
42602016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4261
4262 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4263 it works properly on big-endian machines where sizeof (CORE_ADDR)
4264 != sizeof (void *).
4265
a994041d
PA
42662016-01-21 Pedro Alves <palves@redhat.com>
4267
4268 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4269 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4270 * configure: Regenerate.
4271
f7a6a40d
YQ
42722016-01-21 Yao Qi <yao.qi@linaro.org>
4273
4274 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4275 is_thumb and set it according to CPSR saved on the stack.
4276 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4277 arm_sigreturn_next_pc.
4278
6f69e520
YQ
42792016-01-18 Yao Qi <yao.qi@linaro.org>
4280
4281 * linux-low.c (linux_set_pc_64bit): New function.
4282 (linux_get_pc_64bit): New function.
4283 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4284 Declare.
4285 * linux-sparc-low.c (debug_threads): Remove declaration.
4286 (sparc_get_pc): Remove.
4287 (the_low_target): Use linux_get_pc_64bit instead of
4288 sparc_get_pc.
4289 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4290 (the_low_target): Use linux_get_pc_64bit and
4291 linux_set_pc_64bit.
4292
276d4552
YQ
42932016-01-18 Yao Qi <yao.qi@linaro.org>
4294
4295 * linux-arm-low.c (debug_threads): Remove declaration.
4296 (arm_get_pc, arm_set_pc): Remove.
4297 (the_low_target): Use linux_get_pc_32bit and
4298 linux_set_pc_32bit.
4299 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4300 (the_low_target): Use linux_get_pc_32bit and
4301 linux_set_pc_32bit.
4302 * linux-cris-low.c (debug_threads): Remove declaration.
4303 (cris_get_pc, cris_set_pc,): Remove.
4304 (the_low_target): Use linux_get_pc_32bit and
4305 linux_set_pc_32bit.
4306 * linux-crisv32-low.c (debug_threads): Remove declaration.
4307 (cris_get_pc, cris_set_pc): Remove.
4308 (the_low_target): Use linux_get_pc_32bit and
4309 linux_set_pc_32bit.
4310 * linux-low.c: Include inttypes.h.
4311 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4312 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4313 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4314 (the_low_target): Use linux_get_pc_32bit and
4315 linux_set_pc_32bit.
4316 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4317 (the_low_target): Use linux_get_pc_32bit and
4318 linux_set_pc_32bit.
4319 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4320 (the_low_target): Use linux_get_pc_32bit and
4321 linux_set_pc_32bit.
4322 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4323 (the_low_target): Use linux_get_pc_32bit and
4324 linux_set_pc_32bit.
4325 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4326 (the_low_target): Use linux_get_pc_32bit and
4327 linux_set_pc_32bit.
4328
eb0edac8
GB
43292016-01-18 Gary Benson <gbenson@redhat.com>
4330
4331 * configure.ac (AC_FUNC_FORK): New check.
4332 * config.in: Regenerate.
4333 * configure: Likewise.
4334
1b451dda
YQ
43352016-01-14 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4338 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4339 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4340 arm_get_next_pcs_ctor.
4341
82075af2
JS
43422016-01-12 Josh Stone <jistone@redhat.com>
4343 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4344
4345 * inferiors.h: Include "gdb_vecs.h".
4346 (struct process_info): Add syscalls_to_catch.
4347 * inferiors.c (remove_process): Free syscalls_to_catch.
4348 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4349 syscall_return stops.
4350 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4351 * server.c (handle_general_set): Handle QCatchSyscalls.
4352 (handle_query): Report support for QCatchSyscalls.
4353 * target.h (struct target_ops): Add supports_catch_syscall.
4354 (target_supports_catch_syscall): New macro.
4355 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4356 (struct lwp_info): Add syscall_state.
4357 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4358 Maintain syscall_state and syscalls_to_catch across exec.
4359 (get_syscall_trapinfo): New function, proxy to the_low_target.
4360 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4361 (linux_low_filter_event): Toggle syscall_state entry/return for
4362 syscall traps, and set it ignored for all others.
4363 (gdb_catching_syscalls_p): New function.
4364 (gdb_catch_this_syscall_p): New function.
4365 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4366 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4367 (linux_supports_catch_syscall): New function.
4368 (linux_target_ops): Install it.
4369 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4370 (the_low_target): Install it.
4371
8f13a3ce
MF
43722016-01-12 Mike Frysinger <vapier@gentoo.org>
4373
4374 * acinclude.m4: Include new ../warning.m4 file.
4375 * configure: Regenerated.
4376 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4377
5b3da067
MF
43782016-01-12 Mike Frysinger <vapier@gentoo.org>
4379
4380 * ax.c (is_goto_target): Mark static.
4381 * linux-low.c (register_addr): Likewise.
4382 (linux_fetch_registers, linux_store_registers): Likewise.
4383 * mem-break.c (any_persistent_commands): Fix old prototype.
4384 (add_commands_to_breakpoint): Mark static.
4385 * regcache.c (find_register_by_name): Delete unused func.
4386 * remote-utils.c (hex_or_minus_one): Mark static.
4387 * server.c (monitor_show_help): Mark static.
4388 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4389 handle_v_requests): Likewise.
4390
bc504a31
PA
43912016-01-12 Pedro Alves <palves@redhat.com>
4392
4393 Remove use of the registered trademark symbol throughout.
4394
5a0dd67a
YQ
43952016-01-08 Yao Qi <yao.qi@linaro.org>
4396
4397 * remote-utils.c (getpkt): If c is '\003', call target hook
4398 request_interrupt.
4399
b2ca446f
YQ
44002016-01-06 Yao Qi <yao.qi@linaro.org>
4401
4402 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4403 linux-aarch32-low.c.
4404 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4405 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4406 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4407 (thumb2_breakpoint): Declare.
4408 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4409 linux-aarch32-low.h.
4410 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4411 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4412 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4413
edd88788
JB
44142016-01-01 Joel Brobecker <brobecker@adacore.com>
4415
4416 * gdbreplay.c (gdbreplay_version): Change copyright year in
4417 version message.
4418 * server.c (gdbserver_version): Likewise.
4419
65da7f14
PP
44202015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4421
4422 * server.c (crc32_table): Delete.
4423 (crc32): Use libiberty's xcrc32 function.
4424
4abd5ed2
JB
44252015-12-22 Joel Brobecker <brobecker@adacore.com>
4426
4427 * lynx-low.c (lynx_delete_thread_callback): New function.
4428 (lynx_mourn): Properly delete our process and all of its
4429 threads. Remove call to clear_inferiors.
4430
0e50fe5c
JB
44312015-12-22 Joel Brobecker <brobecker@adacore.com>
4432
4433 * target.c (thread_search_callback): Add check that
4434 the thread_stopped target callback is not NULL before
4435 calling it.
4436
35adc03f
YQ
44372015-12-21 Yao Qi <yao.qi@linaro.org>
4438
4439 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4440 arm breakpoint.
4441
bd2b2909
AT
44422015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4443
4444 * server.c (handle_query): Call target_supports_software_single_step.
4445
7fe5e27e
AT
44462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4447
4448 * linux-low.c (single_step): New function.
4449 (linux_resume_one_lwp_throw): Call single_step.
4450 (start_step_over): Likewise.
4451
d9311bfa
AT
44522015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4453
4454 * Makefile.in (SFILES): Append arch/arm-linux.c,
4455 arch/arm-get-next-pcs.c.
4456 (arm-linux.o): New rule.
4457 (arm-get-next-pcs.o): New rule.
4458 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4459 arm-linux.o.
4460 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4461 to linux-aarch32-low.c.
4462 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4463 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4464 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4465 (thumb2_breakpoint_len): Likewise.
4466 (arm_is_thumb_mode): Make non-static.
4467 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4468 from linux-aarch32-low.c.
4469 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4470 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4471 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4472 (thumb2_breakpoint_len): Likewise.
4473 (arm_is_thumb_mode): New declaration.
4474 * linux-arm-low.c: Include arch/arm-linux.h
4475 aarch/arm-get-next-pcs.h, sys/syscall.h.
4476 (get_next_pcs_ops): New struct.
4477 (get_next_pcs_addr_bits_remove): New function.
4478 (get_next_pcs_is_thumb): New function.
4479 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4480 (arm_sigreturn_next_pc): Likewise.
4481 (get_next_pcs_syscall_next_pc): Likewise.
4482 (arm_gdbserver_get_next_pcs): Likewise.
4483 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4484 Initialize.
4485 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4486 * server.h: Include gdb_vecs.h.
4487
68ce2059
AT
44882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4489
4490 * Makefile.in (SFILES): Append common/common-regcache.c.
4491 (OBS): Append common-regcache.o.
4492 (common-regcache.o): New rule.
4493 * regcache.c (init_register_cache): Initialize cache to
4494 REG_UNAVAILABLE.
4495 (regcache_raw_read_unsigned): New function.
4496 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4497 register_status enum.
4498
fa5308bd
AT
44992015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4500
4501 * linux-aarch64-low.c (the_low_targets): Rename
4502 breakpoint_reinsert_addr to get_next_pcs.
4503 * linux-arm-low.c (the_low_targets): Likewise.
4504 * linux-bfin-low.c (the_low_targets): Likewise.
4505 * linux-cris-low.c (the_low_targets): Likewise.
4506 * linux-crisv32-low.c (the_low_targets): Likewise.
4507 * linux-low.c (can_software_single_step): Likewise.
4508 (install_software_single_step_breakpoints): New function.
4509 (start_step_over): Use install_software_single_step_breakpoints.
4510 * linux-low.h: New CORE_ADDR vector.
4511 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4512 get_next_pcs.
4513 * linux-mips-low.c (the_low_targets): Likewise.
4514 * linux-nios2-low.c (the_low_targets): Likewise.
4515 * linux-sparc-low.c (the_low_targets): Likewise.
4516
4a6ed09b
PA
45172015-12-17 Pedro Alves <palves@redhat.com>
4518
4519 * linux-low.c (linux_kill_one_lwp): Remove references to
4520 LinuxThreads.
4521 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4522 to 'kill'.
4523 (linux_init_signals): Delete.
4524 (initialize_low): Adjust.
4525 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4526
7544db95
PA
45272015-12-16 Pedro Alves <palves@redhat.com>
4528
4529 * configure.ac (compiler warning flags): When testing a
4530 -Wno-foo option, check whether -Wfoo works instead.
4531 * configure: Regenerate.
4532
8020350c
DB
45332015-12-11 Don Breazeal <donb@codesourcery.com>
4534
4535 * server.c (process_serial_event): Don't exit from gdbserver
4536 in remote mode if there are still active inferiors.
4537
db91f502
YQ
45382015-12-11 Yao Qi <yao.qi@linaro.org>
4539
4540 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4541 arm_breakpoint_at if the process is 32-bit.
4542
b37a6290
YQ
45432015-12-11 Yao Qi <yao.qi@linaro.org>
4544
4545 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4546 arm breakpoint.
4547
17b1509a
YQ
45482015-12-07 Yao Qi <yao.qi@linaro.org>
4549
4550 * configure.srv: Append arm.o to srv_tgtobj for
4551 aarch64*-*-linux* target.
4552 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4553 from linux-arm-low.c.
4554 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4555 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4556 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4557 (thumb2_breakpoint_len): Likewise.
4558 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4559 (arm_breakpoint_kinds): Likewise.
4560 (arm_breakpoint_kind_from_pc): Likewise.
4561 (arm_sw_breakpoint_from_kind): Likewise.
4562 (arm_breakpoint_kind_from_current_state): Likewise.
4563 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4564 (arm_sw_breakpoint_from_kind): Declare.
4565 (arm_breakpoint_kind_from_current_state): Declare.
4566 (arm_breakpoint_at): Declare.
4567 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4568 arm_sw_breakpoint_from_kind if process is 32-bit.
4569 (aarch64_breakpoint_kind_from_pc): New function.
4570 (aarch64_breakpoint_kind_from_current_state): New function.
4571 (the_low_target): Initialize fields breakpoint_kind_from_pc
4572 and breakpoint_kind_from_current_state.
4573 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4574 linux-aarch32-low.c.
4575 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4576 (arm_breakpoint, arm_breakpoint_len): Likewise.
4577 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4578 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4579 (arm_is_thumb_mode): Likewise.
4580 (arm_breakpoint_at): Likewise.
4581 (arm_breakpoint_kind_from_pc): Likewise.
4582 (arm_sw_breakpoint_from_kind): Likewise.
4583 (arm_breakpoint_kind_from_current_state): Likewise.
4584
4585 Revert:
4586 2015-08-04 Yao Qi <yao.qi@linaro.org>
4587
4588 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4589 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4590 * server.c (extended_protocol): Remove "static".
4591 * server.h (extended_protocol): Declare it.
4592
ece66d65
JS
45932015-12-04 Josh Stone <jistone@redhat.com>
4594
4595 * target.h (struct target_ops) <arch_setup>: Rename to ...
4596 (struct target_ops) <post_create_inferior>: ... this.
4597 (target_arch_setup): Rename to ...
4598 (target_post_create_inferior): ... this, calling post_create_inferior.
4599 * server.c (start_inferior): Update target_arch_setup calls to
4600 target_post_create_inferior.
4601 * linux-low.c (linux_low_ptrace_options): Forward declare.
4602 (linux_arch_setup): Update its comment for general use.
4603 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4604 (struct linux_target_ops): Use linux_post_create_inferior.
4605 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4606 to post_create_inferior.
4607 * nto-low.c (struct nto_target_ops): Likewise.
4608 * spu-low.c (struct spu_target_ops): Likewise.
4609 * win32-low.c (struct win32_target_ops): Likewise.
4610
e58c48b4
AT
46112015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4612
4613 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4614
fbec8956
AT
46152015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4616
4617 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4618 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4619 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4620 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4621 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4622 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4623 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4624 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4625 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4626 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4627 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4628 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4629
9b4c5f87
AT
46302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4631
4632 * linux-low.c (linux_look_up_symbols): Don't call
4633 linux_supports_traceclone.
4634 * linux-low.h (thread_db_init): Remove use_events argument.
4635 * thread-db.c (thread_db_use_event): Remove global variable.
4636 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4637 (struct thread_db) <td_create_bp>: Remove field.
4638 (thread_db_create_event): Remove function.
4639 (thread_db_enable_reporting): Likewise.
4640 (find_one_thread): Don't check for thread_db_use_events.
4641 (attach_thread): Likewise.
4642 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4643 (try_thread_db_load_1): Don't check for thread_db_use_events.
4644 (thread_db_init): Remove use_events argument and thread events
4645 handling.
4646 (remove_thread_event_breakpoints): Remove function.
4647 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4648
7d00775e
AT
46492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4650
4651 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4652 New function.
4653 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4654 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4655 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4656 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4657 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4658 Initialize.
4659 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4660 New function.
4661 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4662 * linux-low.c (can_hardware_single_step): Use
4663 supports_hardware_single_step.
4664 (can_software_single_step): New function.
4665 (start_step_over): Call can_software_single_step.
4666 (linux_supports_hardware_single_step): New function.
4667 (struct target_ops) <supports_software_single_step>: Initialize.
4668 * linux-low.h (struct linux_target_ops)
4669 <supports_hardware_single_step>: Initialize.
4670 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4671 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4672 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4673 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4674 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4675 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4676 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4677 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4678 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4679 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4680 Initialize.
4681 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4682 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4683 Initialize.
4684 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4685 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4686 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4687 New function.
4688 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4689 * target.h (struct target_ops): <supports_software_single_step>:
4690 New field.
4691 (target_supports_software_single_step): New macro.
4692
2d97cd35
AT
46932015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4694
4695 * linux-low.c (linux_wait_1): Fix pc advance condition.
4696 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4697 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4698
769ef81f
AT
46992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4700
4701 * linux-arm-low.c (arm_is_thumb_mode): New function.
4702 (arm_breakpoint_at): Use arm_is_thumb_mode.
4703 (arm_breakpoint_kind_from_current_state): New function.
4704 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4705 Initialize.
4706 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4707 (linux_breakpoint_kind_from_current_state): New function.
4708 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4709 * linux-low.h (struct linux_target_ops)
4710 <breakpoint_kind_from_current_state>: New field.
4711 * target.h (struct target_ops): Likewise.
4712 (target_breakpoint_kind_from_current_state): New macro.
4713
1bebeeca
PA
47142015-11-30 Pedro Alves <palves@redhat.com>
4715
4716 * linux-low.c (linux_resume): Wake up the event loop before
4717 returning.
4718
a67a9fae
PA
47192015-11-30 Pedro Alves <palves@redhat.com>
4720
4721 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4722 check.
4723 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4724 to -1.
4725 * target.c (struct thread_search): New structure.
4726 (thread_search_callback): New function.
4727 (prev_general_thread): New global.
4728 (prepare_to_access_memory, done_accessing_memory): New functions.
4729 * target.h (prepare_to_access_memory, done_accessing_memory):
4730 Replace macros with function declarations.
4731
f2faf941
PA
47322015-11-30 Pedro Alves <palves@redhat.com>
4733
4734 PR 14618
4735 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4736 report TARGET_WAITKIND_NO_RESUMED.
4737 * remote-utils.c (prepare_resume_reply): Handle
4738 TARGET_WAITKIND_NO_RESUMED.
4739 * server.c (report_no_resumed): New global.
4740 (handle_query) <qSupported>: Handle "no-resumed+". Report
4741 "no-resumed+" support.
4742 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4743 return error if the client doesn't support no-resumed events.
4744 (push_stop_notification): New function.
4745 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4746 events if the client supports them.
4747
a681f9c9
PA
47482015-11-30 Pedro Alves <palves@redhat.com>
4749
4750 * linux-low.c (thread_still_has_status_pending_p): Don't check
4751 vCont;t here.
4752 (lwp_resumed): New function.
4753 (status_pending_p_callback): Return early if the LWP is not
4754 supposed to be resumed.
4755
65706a29
PA
47562015-11-30 Pedro Alves <palves@redhat.com>
4757
4758 * linux-low.c (handle_extended_wait): Assert that the LWP's
4759 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4760 thread create events, leave the new child's status pending.
4761 (linux_low_filter_event): If GDB wants to hear about thread exit
4762 events, leave the LWP marked dead and don't delete it.
4763 (linux_wait_for_event_filtered): Don't check for thread exit.
4764 (filter_exit_event): New function.
4765 (linux_wait_1): Use it, when returning an exit event.
4766 (linux_resume_one_lwp_throw): Assert that the LWP's
4767 waitstatus is TARGET_WAITKIND_IGNORE.
4768 * remote-utils.c (prepare_resume_reply): Handle
4769 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4770 * server.c (report_thread_events): New global.
4771 (handle_general_set): Handle QThreadEvents.
4772 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4773 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4774 TARGET_WAITKIND_THREAD_EXITED.
4775 * server.h (report_thread_events): Declare.
4776
56cf4bed
PA
47772015-11-30 Pedro Alves <palves@redhat.com>
4778
4779 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4780 the thread's last_resume_kind was resume_stop.
4781
500c1d85
PA
47822015-11-30 Pedro Alves <palves@redhat.com>
4783
4784 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4785 before returning.
4786
de979965
PA
47872015-11-30 Pedro Alves <palves@redhat.com>
4788
4789 * server.c (handle_v_requests): Handle vCtrlC.
4790
34c65914
PA
47912015-11-30 Pedro Alves <palves@redhat.com>
4792
4793 * gdbthread.h (find_any_thread_of_pid): Declare.
4794 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4795 functions.
4796 * server.c (handle_query): If current_thread is NULL, look for
4797 another thread of the selected process.
4798
79efa585 47992015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4800 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4801
4802 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4803 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4804 name in reply.
4805 * target.h (struct target_ops) <thread_name>: New field.
4806 (target_thread_name): New macro.
4807
80d82c19
JB
48082015-11-23 Joel Brobecker <brobecker@adacore.com>
4809
4810 * regcache.h (regcache_invalidate_pid): Add declaration.
4811 * regcache.c (regcache_invalidate_pid): New function, extracted
4812 from regcache_invalidate.
4813 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4814 Add trivial documentation comment.
4815 * lynx-low.c: Use regcache_invalidate_pid instead of
4816 regcache_invalidate.
4817
64da5dd5
JB
48182015-11-23 Joel Brobecker <brobecker@adacore.com>
4819
4820 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4821 and Elf64_auxv_t if the target is Android.
4822
37ce4055
DE
48232015-11-22 Doug Evans <xdje42@gmail.com>
4824
4825 * target.h: #include <sys/types.h>.
4826
06e03fff
PA
48272015-11-19 Pedro Alves <palves@redhat.com>
4828
4829 * linux-low.c (linux_process_qsupported): Change prototype.
4830 Adjust.
4831 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4832 Change prototype.
4833 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4834 and adjust to loop over all features.
4835 * server.c (handle_query) <qSupported>: Adjust to call
4836 target_process_qsupported once, passing it a vector of unprocessed
4837 features.
4838 * target.h (struct target_ops) <process_qsupported>: Change
4839 prototype.
4840 (target_process_qsupported): Adjust.
4841
9a084706
PA
48422015-11-19 Pedro Alves <palves@redhat.com>
4843
4844 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4845 mode.
4846 * configure: Regenerate.
4847
dad44a1f
PA
48482015-11-19 Pedro Alves <palves@redhat.com>
4849
4850 * configure: Regenerate.
4851
231c0592
YQ
48522015-11-19 Yao Qi <yao.qi@linaro.org>
4853
4854 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4855 type to uint32_t.
4856
6c1c9a8b
YQ
48572015-11-19 Yao Qi <yao.qi@linaro.org>
4858
4859 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4860 (struct aarch64_operand): Move enum out.
4861
9caa3311
YQ
48622015-11-19 Yao Qi <yao.qi@linaro.org>
4863
4864 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4865 struct user_fpsimd_state *.
4866 (aarch64_store_fpregset): Likewise.
4867
6a69a054
YQ
48682015-11-19 Yao Qi <yao.qi@linaro.org>
4869
4870 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4871 struct user_pt_regs *.
4872 (aarch64_store_gregset): Likewise.
4873
1798301e
PA
48742015-11-18 Pedro Alves <palves@redhat.com>
4875
4876 * Makefile.in (all_object_files): Add $IPA_OBJS.
4877
ce7715e2
PA
48782015-11-17 Pedro Alves <palves@redhat.com>
4879
4880 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4881 GDB_SIGNAL_0 and gdb_signal_to_string.
4882
c0879059
PA
48832015-11-17 Pedro Alves <palves@redhat.com>
4884
4885 * win32-low.c (handle_output_debug_string): Remove parameter.
4886 (win32_kill): Remove our_status local and adjust call to
4887 handle_output_debug_string.
4888 (get_child_debug_event): Adjust call to
4889 handle_output_debug_string.
4890
1996e237
SM
48912015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4892
4893 * linux-mips-low.c (mips_fill_gregset): Add cast.
4894 (mips_store_gregset): Likewise.
4895 (mips_fill_fpregset): Likewise.
4896 (mips_store_fpregset): Likewise.
4897
cbec665b
SM
48982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4899
4900 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4901 priv.
4902
eb3e3c67
SM
49032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4904
4905 * linux-mips-low.c (mips_linux_new_thread): Change type of
4906 watch_type to enum target_hw_bp_type.
4907
171de4b8
SM
49082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4909
4910 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4911 Change return type to arm_hwbp_type.
4912
04248ead
SM
49132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4914
4915 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4916 (arm_store_gregset): Likewise.
4917 * linux-arm-low.c (arm_get_hwcap): Likewise.
4918 (arm_read_description): Likewise.
4919
04b3479c
SM
49202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4921
4922 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4923
2bc84e8a
SM
49242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4925
4926 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4927 (ppc_fill_vsxregset): Likewise.
4928 (ppc_store_vsxregset): Likewise.
4929 (ppc_fill_vrregset): Likewise.
4930 (ppc_store_vrregset): Likewise.
4931 (ppc_fill_evrregset): Likewise.
4932 (ppc_store_evrregset): Likewise.
4933
e6c5bb05
SM
49342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4935
4936 * linux-ppc-low.c (ppc_usrregs_info): Remove
4937 forward-declaration.
4938 (ppc_arch_setup): Move lower in file.
4939
7ea45d72
SM
49402015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4941
4942 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4943 (ps_pdwrite): Likewise.
4944
69291610
HW
49452015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4946
4947 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4948 to after assert checks.
4949
b42945fd
SM
49502015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4951
4952 * proc-service.c (ps_pdread): Add/adjust casts.
4953 (ps_pdwrite): Add/adjust casts.
4954
d6f85c84
SM
49552015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4956
4957 * server.c (handle_search_memory_1): Cast return value of
4958 memmem.
4959
f98cd059
SM
49602015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4961
4962 * server.c (write_qxfer_response): Change type of data to
4963 gdb_byte *.
4964
d2412fa5
PA
49652015-10-29 Pedro Alves <palves@redhat.com>
4966
4967 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4968
c17414a2
PA
49692015-10-29 Pedro Alves <palves@redhat.com>
4970
4971 * tracepoint.c (clear_installed_tracepoints): Add casts.
4972
e053fbc4
PA
49732015-10-29 Pedro Alves <palves@redhat.com>
4974
4975 * server.c (handle_v_cont, process_serial_event): Add enum
4976 gdb_signal casts to signal parsing code.
4977
add67df8
PA
49782015-10-29 Pedro Alves <palves@redhat.com>
4979
4980 * linux-low.h (NULL_REGSET): Define.
4981 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4982 * linux-arm-low.c (arm_regsets): Likewise.
4983 * linux-crisv32-low.c (cris_regsets): Likewise.
4984 * linux-m68k-low.c (m68k_regsets): Likewise.
4985 * linux-mips-low.c (mips_regsets): Likewise.
4986 * linux-nios2-low.c (nios2_regsets): Likewise.
4987 * linux-ppc-low.c (ppc_regsets): Likewise.
4988 * linux-s390-low.c (s390_regsets): Likewise.
4989 * linux-sh-low.c (sh_regsets): Likewise.
4990 * linux-sparc-low.c (sparc_regsets): Likewise.
4991 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4992 * linux-tile-low.c (tile_regsets): Likewise.
4993 * linux-x86-low.c (x86_regsets): Likewise.
4994 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4995
50bc912a
PA
49962015-10-29 Pedro Alves <palves@redhat.com>
4997
4998 * linux-low.h (NULL_REGSET): Define.
4999 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5000 * linux-arm-low.c (arm_regsets): Likewise.
5001 * linux-crisv32-low.c (cris_regsets): Likewise.
5002 * linux-m68k-low.c (m68k_regsets): Likewise.
5003 * linux-mips-low.c (mips_regsets): Likewise.
5004 * linux-nios2-low.c (nios2_regsets): Likewise.
5005 * linux-ppc-low.c (ppc_regsets): Likewise.
5006 * linux-s390-low.c (s390_regsets): Likewise.
5007 * linux-sh-low.c (sh_regsets): Likewise.
5008 * linux-sparc-low.c (sparc_regsets): Likewise.
5009 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5010 * linux-tile-low.c (tile_regsets): Likewise.
5011 * linux-x86-low.c (x86_regsets): Likewise.
5012 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5013
682b2546
DE
50142015-10-26 Doug Evans <dje@google.com>
5015
5016 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5017
963843d4
DE
50182015-10-26 Doug Evans <dje@google.com>
5019
5020 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5021
d41401ac
DE
50222015-10-26 Doug Evans <dje@google.com>
5023
5024 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5025 for debug_printf.
5026 (attach_thread, find_new_threads_callback): Ditto.
5027
3db28855
AT
50282015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5029
5030 * mem-break.h (set_breakpoint_data): Remove.
5031
fb78e89c
AT
50322015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5033
5034 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5035 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5036 (initialize_low): Remove set_breakpoint_data call.
5037 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5038 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5039 (initialize_low): Remove set_breakpoint_data call.
5040 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5041 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5042 (initialize_low): Remove set_breakpoint_data call.
5043
2e6ee069
AT
50442015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5045
5046 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5047 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5048 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5049 * target.h (target_breakpoint_kind_from_pc): New macro.
5050
1652a986
AT
50512015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5052
5053 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5054 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5055 the default breakpoint kind.
5056
abeead09
AT
50572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5058
5059 * linux-arm-low.c (arm_supports_z_point_type): Add software
5060 breakpoint support.
5061
b0b4b501
AT
50622015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5063
5064 * linux-arm-low.c: Refactor breakpoint definitions.
5065 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5066 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5067
8689682c
AT
50682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5069
5070 * Makefile.in: Add arm.c/o.
5071 * configure.srv: Likewise.
5072 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5073 (arm_breakpoint_kind_from_pc): New function.
5074 (arm_sw_breakpoint_from_kind): Return proper kind.
5075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5076
27165294
AT
50772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5078
5079 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5080 removal.
5081 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5082 (struct raw_breakpoint) <size>: Remove.
5083 (struct raw_breakpoint) <kind>: Add.
5084 (bp_size): New function.
5085 (bp_opcode): Likewise.
5086 (find_raw_breakpoint_at): Adjust for kind.
5087 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5088 (remove_memory_breakpoint): Adjust for kind call bp_size.
5089 (set_raw_breakpoint_at): Adjust for kind.
5090 (set_breakpoint): Likewise.
5091 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5092 (delete_raw_breakpoint): Adjust for kind.
5093 (delete_breakpoint): Likewise.
5094 (find_gdb_breakpoint): Likewise.
5095 (set_gdb_breakpoint_1): Likewise.
5096 (set_gdb_breakpoint): Likewise.
5097 (delete_gdb_breakpoint_1): Likewise.
5098 (delete_gdb_breakpoint): Likewise.
5099 (uninsert_raw_breakpoint): Likewise.
5100 (reinsert_raw_breakpoint): Likewise.
5101 (set_breakpoint_data): Remove.
5102 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5103 (check_mem_read): Adjust for kind call bp_size.
5104 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5105 (clone_one_breakpoint): Adjust for kind.
5106 * mem-break.h (set_gdb_breakpoint): Likewise.
5107 (delete_gdb_breakpoint): Likewise.
5108 * server.c (process_serial_event): Likewise.
5109
dd373349
AT
51102015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5111
5112 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5113 (struct linux_target_ops) <breakpoint>: Remove.
5114 (struct linux_target_ops) <breakpoint_len>: Remove.
5115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5117 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5118 (arm_sw_breakpoint_from_kind): New function.
5119 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5120 (struct linux_target_ops) <breakpoint>: Remove.
5121 (struct linux_target_ops) <breakpoint_len>: Remove.
5122 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5123 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5124 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5125 (struct linux_target_ops) <breakpoint>: Remove.
5126 (struct linux_target_ops) <breakpoint_len>: Remove.
5127 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5128 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5129 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5130 (struct linux_target_ops) <breakpoint>: Remove.
5131 (struct linux_target_ops) <breakpoint_len>: Remove.
5132 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5133 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5134 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5135 and sw_breakpoint_from_kind to increment the pc.
5136 (linux_breakpoint_kind_from_pc): New function.
5137 (linux_sw_breakpoint_from_kind): New function.
5138 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5139 (initialize_low): Call breakpoint_kind_from_pc and
5140 sw_breakpoint_from_kind to replace breakpoint_data/len.
5141 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5142 New field.
5143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5144 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5145 (struct linux_target_ops) <breakpoint>: Remove.
5146 (struct linux_target_ops) <breakpoint_len>: Remove.
5147 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5148 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5149 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5150 (struct linux_target_ops) <breakpoint>: Remove.
5151 (struct linux_target_ops) <breakpoint_len>: Remove.
5152 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5153 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5154 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5155 (struct linux_target_ops) <breakpoint>: Remove.
5156 (struct linux_target_ops) <breakpoint_len>: Remove.
5157 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5158 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5159 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5160 (struct linux_target_ops) <breakpoint>: Remove.
5161 (struct linux_target_ops) <breakpoint_len>: Remove.
5162 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5163 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5164 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5165 (struct linux_target_ops) <breakpoint>: Remove.
5166 (struct linux_target_ops) <breakpoint_len>: Remove.
5167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5169 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5170 (struct linux_target_ops) <breakpoint>: Remove.
5171 (struct linux_target_ops) <breakpoint_len>: Remove.
5172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5174 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5175 (struct linux_target_ops) <breakpoint>: Remove.
5176 (struct linux_target_ops) <breakpoint_len>: Remove.
5177 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5178 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5179 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5180 (struct linux_target_ops) <breakpoint>: Remove.
5181 (struct linux_target_ops) <breakpoint_len>: Remove.
5182 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5183 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5184 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5185 (struct linux_target_ops) <breakpoint>: Remove.
5186 (struct linux_target_ops) <breakpoint_len>: Remove.
5187 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5188 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5189 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5190 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5191 (struct linux_target_ops) <breakpoint>: Remove.
5192 (struct linux_target_ops) <breakpoint_len>: Remove.
5193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5195 * linux-xtensa-low.c (xtensa_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
4cd98a19
AT
52012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5202
5203 * linux-cris-low.c (cris_get_pc): Remove void arg.
5204
774ee6d2
AR
52052015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5206
5207 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5208 variable name.
5209
833dcd29
AR
52102015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5211
5212 * inferiors.c (thread_pid_matches_callback): New function.
5213 (find_thread_process): New function.
5214 (remove_thread): Reset current_thread.
5215 (remove_process): Assert threads have been removed first.
5216
8d689ee5
YQ
52172015-10-15 Yao Qi <yao.qi@linaro.org>
5218
5219 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5220 if it is 3.
5221 (aarch64_remove_point): Likewise.
5222 * regcache.c (regcache_register_size): New function.
5223
1c2e1515
YQ
52242015-10-12 Yao Qi <yao.qi@linaro.org>
5225
5226 * linux-aarch64-low.c: Update all callers as emit_load_store
5227 is renamed to aarch64_emit_load_store.
5228
e1c587c3
YQ
52292015-10-12 Yao Qi <yao.qi@linaro.org>
5230
5231 * linux-aarch64-low.c: Update all callers of function renaming
5232 from emit_insn to aarch64_emit_insn.
5233
b6542f81
YQ
52342015-10-12 Yao Qi <yao.qi@linaro.org>
5235
5236 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5237 arch/aarch64-insn.h.
5238 (struct aarch64_memory_operand): Likewise.
5239 (ENCODE): Likewise.
5240 (emit_insn): Move to arch/aarch64-insn.c.
5241 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5242 (emit_load_store): Move to arch/aarch64-insn.c.
5243 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5244 (can_encode_int32): Remove.
5245
246994ce
YQ
52462015-10-12 Yao Qi <yao.qi@linaro.org>
5247
5248 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5249 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5250 (aarch64_relocate_instruction): Likewise.
5251 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5252 (struct aarch64_insn_visitor): Likewise.
5253
0badd99f
YQ
52542015-10-12 Yao Qi <yao.qi@linaro.org>
5255
5256 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5257 (struct aarch64_insn_visitor): New.
5258 (struct aarch64_insn_relocation_data): New.
5259 (aarch64_ftrace_insn_reloc_b): New function.
5260 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5261 (aarch64_ftrace_insn_reloc_cb): Likewise.
5262 (aarch64_ftrace_insn_reloc_tb): Likewise.
5263 (aarch64_ftrace_insn_reloc_adr): Likewise.
5264 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5265 (aarch64_ftrace_insn_reloc_others): Likewise.
5266 (visitor): New.
5267 (aarch64_relocate_instruction): Use visitor.
5268
dfaffe9d
YQ
52692015-10-12 Yao Qi <yao.qi@linaro.org>
5270
5271 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5272 int. Add argument buf.
5273 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5274 aarch64_relocate_instruction.
5275
70b439f0
YQ
52762015-10-12 Yao Qi <yao.qi@linaro.org>
5277
5278 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5279 argument insn. Remove local variable insn. Don't call
5280 target_read_uint32.
5281 (aarch64_install_fast_tracepoint_jump_pad): Call
5282 target_read_uint32.
5283
7781c06f
YQ
52842015-09-30 Yao Qi <yao.qi@linaro.org>
5285
5286 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5287 (emit_load_store_pair): Likewise.
5288
9a3c8263
SM
52892015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5290
5291 * dll.c (match_dll): Add cast(s).
5292 (unloaded_dll): Likewise.
5293 * linux-low.c (second_thread_of_pid_p): Likewise.
5294 (delete_lwp_callback): Likewise.
5295 (count_events_callback): Likewise.
5296 (select_event_lwp_callback): Likewise.
5297 (linux_set_resume_request): Likewise.
5298 * server.c (accumulate_file_name_length): Likewise.
5299 (emit_dll_description): Likewise.
5300 (handle_qxfer_threads_worker): Likewise.
5301 (visit_actioned_threads): Likewise.
5302 * thread-db.c (any_thread_of): Likewise.
5303 * tracepoint.c (same_process_p): Likewise.
5304 (match_blocktype): Likewise.
5305 (build_traceframe_info_xml): Likewise.
5306
224c3ddb
SM
53072015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5308
5309 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5310 assignment.
5311 (gdb_unparse_agent_expr): Likewise.
5312 * hostio.c (require_data): Likewise.
5313 (handle_pread): Likewise.
5314 * linux-low.c (disable_regset): Likewise.
5315 (fetch_register): Likewise.
5316 (store_register): Likewise.
5317 (get_dynamic): Likewise.
5318 (linux_qxfer_libraries_svr4): Likewise.
5319 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5320 (set_fast_tracepoint_jump): Likewise.
5321 (uninsert_fast_tracepoint_jumps_at): Likewise.
5322 (reinsert_fast_tracepoint_jumps_at): Likewise.
5323 (validate_inserted_breakpoint): Likewise.
5324 (clone_agent_expr): Likewise.
5325 * regcache.c (init_register_cache): Likewise.
5326 * remote-utils.c (putpkt_binary_1): Likewise.
5327 (decode_M_packet): Likewise.
5328 (decode_X_packet): Likewise.
5329 (look_up_one_symbol): Likewise.
5330 (relocate_instruction): Likewise.
5331 (monitor_output): Likewise.
5332 * server.c (handle_search_memory): Likewise.
5333 (handle_qxfer_exec_file): Likewise.
5334 (handle_qxfer_libraries): Likewise.
5335 (handle_qxfer): Likewise.
5336 (handle_query): Likewise.
5337 (handle_v_cont): Likewise.
5338 (handle_v_run): Likewise.
5339 (captured_main): Likewise.
5340 * target.c (write_inferior_memory): Likewise.
5341 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5342 * tracepoint.c (init_trace_buffer): Likewise.
5343 (add_tracepoint_action): Likewise.
5344 (add_traceframe): Likewise.
5345 (add_traceframe_block): Likewise.
5346 (cmd_qtdpsrc): Likewise.
5347 (cmd_qtdv): Likewise.
5348 (cmd_qtstatus): Likewise.
5349 (response_source): Likewise.
5350 (response_tsv): Likewise.
5351 (cmd_qtnotes): Likewise.
5352 (gdb_collect): Likewise.
5353 (initialize_tracepoint): Likewise.
5354
afbe19f8
PL
53552015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5356
5357 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5358 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5359 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5360 <NOP>: New.
5361 (enum aarch64_condition_codes): New enum.
5362 (w0): New static global.
5363 (fp): Likewise.
5364 (lr): Likewise.
5365 (struct aarch64_memory_operand) <type>: New
5366 MEMORY_OPERAND_POSTINDEX type.
5367 (postindex_memory_operand): New helper function.
5368 (emit_ret): New function.
5369 (emit_load_store_pair): New function, factored out of emit_stp
5370 with support for MEMORY_OPERAND_POSTINDEX.
5371 (emit_stp): Rewrite using emit_load_store_pair.
5372 (emit_ldp): New function.
5373 (emit_load_store): Likewise.
5374 (emit_ldr): Mention post-index instruction in comment.
5375 (emit_ldrh): New function.
5376 (emit_ldrb): New function.
5377 (emit_ldrsw): Mention post-index instruction in comment.
5378 (emit_str): Likewise.
5379 (emit_subs): New function.
5380 (emit_cmp): Likewise.
5381 (emit_and): Likewise.
5382 (emit_orr): Likewise.
5383 (emit_orn): Likewise.
5384 (emit_eor): Likewise.
5385 (emit_mvn): Likewise.
5386 (emit_lslv): Likewise.
5387 (emit_lsrv): Likewise.
5388 (emit_asrv): Likewise.
5389 (emit_mul): Likewise.
5390 (emit_sbfm): Likewise.
5391 (emit_sbfx): Likewise.
5392 (emit_ubfm): Likewise.
5393 (emit_ubfx): Likewise.
5394 (emit_csinc): Likewise.
5395 (emit_cset): Likewise.
5396 (emit_nop): Likewise.
5397 (emit_ops_insns): New helper function.
5398 (emit_pop): Likewise.
5399 (emit_push): Likewise.
5400 (aarch64_emit_prologue): New function.
5401 (aarch64_emit_epilogue): Likewise.
5402 (aarch64_emit_add): Likewise.
5403 (aarch64_emit_sub): Likewise.
5404 (aarch64_emit_mul): Likewise.
5405 (aarch64_emit_lsh): Likewise.
5406 (aarch64_emit_rsh_signed): Likewise.
5407 (aarch64_emit_rsh_unsigned): Likewise.
5408 (aarch64_emit_ext): Likewise.
5409 (aarch64_emit_log_not): Likewise.
5410 (aarch64_emit_bit_and): Likewise.
5411 (aarch64_emit_bit_or): Likewise.
5412 (aarch64_emit_bit_xor): Likewise.
5413 (aarch64_emit_bit_not): Likewise.
5414 (aarch64_emit_equal): Likewise.
5415 (aarch64_emit_less_signed): Likewise.
5416 (aarch64_emit_less_unsigned): Likewise.
5417 (aarch64_emit_ref): Likewise.
5418 (aarch64_emit_if_goto): Likewise.
5419 (aarch64_emit_goto): Likewise.
5420 (aarch64_write_goto_address): Likewise.
5421 (aarch64_emit_const): Likewise.
5422 (aarch64_emit_call): Likewise.
5423 (aarch64_emit_reg): Likewise.
5424 (aarch64_emit_pop): Likewise.
5425 (aarch64_emit_stack_flush): Likewise.
5426 (aarch64_emit_zero_ext): Likewise.
5427 (aarch64_emit_swap): Likewise.
5428 (aarch64_emit_stack_adjust): Likewise.
5429 (aarch64_emit_int_call_1): Likewise.
5430 (aarch64_emit_void_call_2): Likewise.
5431 (aarch64_emit_eq_goto): Likewise.
5432 (aarch64_emit_ne_goto): Likewise.
5433 (aarch64_emit_lt_goto): Likewise.
5434 (aarch64_emit_le_goto): Likewise.
5435 (aarch64_emit_gt_goto): Likewise.
5436 (aarch64_emit_ge_got): Likewise.
5437 (aarch64_emit_ops_impl): New static global variable.
5438 (aarch64_emit_ops): New target function, return
5439 &aarch64_emit_ops_impl.
5440 (struct linux_target_ops): Install it.
5441
bb903df0
PL
54422015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5443
5444 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5445 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5446 aarch64-ipa.o.
5447 * linux-aarch64-ipa.c: New file.
5448 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5449 and endian.h.
5450 (aarch64_get_thread_area): New target method.
5451 (extract_signed_bitfield): New helper function.
5452 (aarch64_decode_ldr_literal): New function.
5453 (enum aarch64_opcodes): New enum.
5454 (struct aarch64_register): New struct.
5455 (struct aarch64_operand): New struct.
5456 (x0): New static global.
5457 (x1): Likewise.
5458 (x2): Likewise.
5459 (x3): Likewise.
5460 (x4): Likewise.
5461 (w2): Likewise.
5462 (ip0): Likewise.
5463 (sp): Likewise.
5464 (xzr): Likewise.
5465 (aarch64_register): New helper function.
5466 (register_operand): Likewise.
5467 (immediate_operand): Likewise.
5468 (struct aarch64_memory_operand): New struct.
5469 (offset_memory_operand): New helper function.
5470 (preindex_memory_operand): Likewise.
5471 (enum aarch64_system_control_registers): New enum.
5472 (ENCODE): New macro.
5473 (emit_insn): New helper function.
5474 (emit_b): New function.
5475 (emit_bcond): Likewise.
5476 (emit_cb): Likewise.
5477 (emit_tb): Likewise.
5478 (emit_blr): Likewise.
5479 (emit_stp): Likewise.
5480 (emit_ldp_q_offset): Likewise.
5481 (emit_stp_q_offset): Likewise.
5482 (emit_load_store): Likewise.
5483 (emit_ldr): Likewise.
5484 (emit_ldrsw): Likewise.
5485 (emit_str): Likewise.
5486 (emit_ldaxr): Likewise.
5487 (emit_stxr): Likewise.
5488 (emit_stlr): Likewise.
5489 (emit_data_processing_reg): Likewise.
5490 (emit_data_processing): Likewise.
5491 (emit_add): Likewise.
5492 (emit_sub): Likewise.
5493 (emit_mov): Likewise.
5494 (emit_movk): Likewise.
5495 (emit_mov_addr): Likewise.
5496 (emit_mrs): Likewise.
5497 (emit_msr): Likewise.
5498 (emit_sevl): Likewise.
5499 (emit_wfe): Likewise.
5500 (append_insns): Likewise.
5501 (can_encode_int32_in): New helper function.
5502 (aarch64_relocate_instruction): New function.
5503 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5504 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5505 (struct linux_target_ops): Install aarch64_get_thread_area,
5506 aarch64_install_fast_tracepoint_jump_pad and
5507 aarch64_get_min_fast_tracepoint_insn_len.
5508
787749ea
PL
55092015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5510
5511 * Makefile.in (aarch64-insn.o): New rule.
5512 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5513
9812b2e6
YQ
55142015-09-21 Yao Qi <yao.qi@linaro.org>
5515
5516 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5517
18fe412b
YQ
55182015-09-21 Yao Qi <yao.qi@linaro.org>
5519
5520 * tracepoint.c (max_jump_pad_size): Remove.
5521
a0cc84cd
YQ
55222015-09-18 Yao Qi <yao.qi@linaro.org>
5523
5524 * linux-aarch64-low.c: Don't include sys/uio.h.
5525 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5526
d78908cf
WW
55272015-09-16 Wei-cheng Wang <cole945@gmail.com>
5528
5529 * tracepoint.c (eval_result_type): Change prototype.
5530 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5531
d57e0d50
PA
55322015-09-15 Pedro Alves <palves@redhat.com>
5533
5534 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5535 Check whether to report exec events instead of checking whether
5536 multiprocess is enabled.
5537
5a676acc
PA
55382015-09-15 Pedro Alves <palves@redhat.com>
5539
5540 PR remote/18965
5541 * remote-utils.c (prepare_resume_reply): Merge
5542 TARGET_WAITKIND_VFORK_DONE switch case with the
5543 TARGET_WAITKIND_FORKED case.
5544
7c5d0fad
YQ
55452015-09-15 Yao Qi <yao.qi@linaro.org>
5546
5547 * server.c (handle_query): Check string comparison using
5548 "else if" instead of "if".
5549
750ce8d1
YQ
55502015-09-15 Yao Qi <yao.qi@linaro.org>
5551
5552 * server.c (vCont_supported): New global variable.
5553 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5554 matches. Append ";vContSupported+" to own_buf.
5555 (handle_v_requests): Append ";s;S" to own_buf if target supports
5556 hardware single step or vCont_supported is false.
5557 (capture_main): Set vCont_supported to zero.
5558
70b90b91
YQ
55592015-09-15 Yao Qi <yao.qi@linaro.org>
5560
5561 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5562 it to ...
5563 (linux_supports_hardware_single_step): ... New function.
5564 (linux_target_ops): Update.
5565 * lynx-low.c (lynx_target_ops): Set field
5566 supports_hardware_single_step to target_can_do_hardware_single_step.
5567 * nto-low.c (nto_target_ops): Likewise.
5568 * spu-low.c (spu_target_ops): Likewise.
5569 * win32-low.c (win32_target_ops): Likewise.
5570 * target.c (target_can_do_hardware_single_step): New function.
5571 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5572 Remove. <supports_hardware_single_step>: New field.
5573 (target_supports_conditional_breakpoints): Remove.
5574 (target_supports_hardware_single_step): New macro.
5575 (target_can_do_hardware_single_step): Declare.
5576 * server.c (handle_query): Use target_supports_hardware_single_step
5577 instead of target_supports_conditional_breakpoints.
5578
ade90bde
YQ
55792015-09-15 Yao Qi <yao.qi@linaro.org>
5580
5581 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5582 function.
5583 (struct linux_target_ops the_low_target): Install
5584 aarch64_linux_siginfo_fixup.
5585
94585166
DB
55862015-09-11 Don Breazeal <donb@codesourcery.com>
5587 Luis Machado <lgustavo@codesourcery.com>
5588
5589 * linux-low.c (linux_mourn): Static declaration.
5590 (linux_arch_setup): Move in front of
5591 handle_extended_wait.
5592 (linux_arch_setup_thread): New function.
5593 (handle_extended_wait): Handle exec events. Call
5594 linux_arch_setup_thread. Make event_lwp argument a
5595 pointer-to-a-pointer.
5596 (check_zombie_leaders): Do not check stopped threads.
5597 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5598 (linux_low_filter_event): Add lwp and thread for exec'ing
5599 non-leader thread if leader thread has been deleted.
5600 Refactor code into linux_arch_setup_thread and call it.
5601 Pass child lwp pointer by reference to handle_extended_wait.
5602 (linux_wait_for_event_filtered): Update comment.
5603 (linux_wait_1): Prevent clobbering exec event status.
5604 (linux_supports_exec_events): New function.
5605 (linux_target_ops) <supports_exec_events>: Initialize new member.
5606 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5607 new member.
5608 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5609 * server.c (report_exec_events): New global variable.
5610 (handle_query): Handle qSupported query for exec-events feature.
5611 (captured_main): Initialize report_exec_events.
5612 * server.h (report_exec_events): Declare new global variable.
5613 * target.h (struct target_ops) <supports_exec_events>: New
5614 member.
5615 (target_supports_exec_events): New macro.
5616 * win32-low.c (win32_target_ops) <supports_exec_events>:
5617 Initialize new member.
5618
0568462b
MM
56192015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5620
5621 * linux-low.c (linux_low_enable_btrace): Remove.
5622 (linux_target_ops): Replace linux_low_enable_btrace with
5623 linux_enable_btrace.
5624
39edd165
YQ
56252015-09-03 Yao Qi <yao.qi@linaro.org>
5626
5627 * linux-aarch64-low.c (aarch64_insert_point): Call
5628 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5629 returns true.
5630
1db33b5a
UW
56312015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5632
5633 * linux-low.c (check_stopped_by_breakpoint): Use
5634 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5635
ab290430
PA
56362015-08-27 Pedro Alves <palves@redhat.com>
5637
5638 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5639
8d749320
SM
56402015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5641
6711b7f8
SM
5642 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5643 the XNEW-family equivalent.
8d749320
SM
5644 (compile_bytecodes): Likewise.
5645 * dll.c (loaded_dll): Likewise.
5646 * event-loop.c (append_callback_event): Likewise.
5647 (create_file_handler): Likewise.
5648 (create_file_event): Likewise.
5649 * hostio.c (handle_open): Likewise.
5650 * inferiors.c (add_thread): Likewise.
5651 (add_process): Likewise.
5652 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5653 * linux-arm-low.c (arm_new_process): Likewise.
5654 (arm_new_thread): Likewise.
5655 * linux-low.c (add_to_pid_list): Likewise.
5656 (linux_add_process): Likewise.
5657 (handle_extended_wait): Likewise.
5658 (add_lwp): Likewise.
5659 (enqueue_one_deferred_signal): Likewise.
5660 (enqueue_pending_signal): Likewise.
5661 (linux_resume_one_lwp_throw): Likewise.
5662 (linux_resume_one_thread): Likewise.
5663 (linux_read_memory): Likewise.
5664 (linux_write_memory): Likewise.
5665 * linux-mips-low.c (mips_linux_new_process): Likewise.
5666 (mips_linux_new_thread): Likewise.
5667 (mips_add_watchpoint): Likewise.
5668 * linux-x86-low.c (initialize_low_arch): Likewise.
5669 * lynx-low.c (lynx_add_process): Likewise.
5670 * mem-break.c (set_raw_breakpoint_at): Likewise.
5671 (set_breakpoint): Likewise.
5672 (add_condition_to_breakpoint): Likewise.
5673 (add_commands_to_breakpoint): Likewise.
5674 (clone_agent_expr): Likewise.
5675 (clone_one_breakpoint): Likewise.
5676 * regcache.c (new_register_cache): Likewise.
5677 * remote-utils.c (look_up_one_symbol): Likewise.
5678 * server.c (queue_stop_reply): Likewise.
5679 (start_inferior): Likewise.
5680 (queue_stop_reply_callback): Likewise.
5681 (handle_target_event): Likewise.
5682 * spu-low.c (fetch_ppc_memory): Likewise.
5683 (store_ppc_memory): Likewise.
5684 * target.c (set_target_ops): Likewise.
5685 * thread-db.c (thread_db_load_search): Likewise.
5686 (try_thread_db_load_1): Likewise.
5687 * tracepoint.c (add_tracepoint): Likewise.
5688 (add_tracepoint_action): Likewise.
5689 (create_trace_state_variable): Likewise.
5690 (cmd_qtdpsrc): Likewise.
5691 (cmd_qtro): Likewise.
5692 (add_while_stepping_state): Likewise.
5693 * win32-low.c (child_add_thread): Likewise.
5694 (get_image_name): Likewise.
5695
ed8b7b42
YQ
56962015-08-25 Yao Qi <yao.qi@linaro.org>
5697
5698 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5699
db3cb7cb
YQ
57002015-08-25 Yao Qi <yao.qi@linaro.org>
5701
5702 * Makefile.in (aarch64-linux.o): New rule.
5703 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5704 srv_tgtobj.
5705 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5706 (aarch64_init_debug_reg_state): Make it extern.
5707 (aarch64_linux_prepare_to_resume): Remove.
5708
f6011a1c
YQ
57092015-08-25 Yao Qi <yao.qi@linaro.org>
5710
5711 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5712 lwp_arch_private_info and ptid_of_lwp.
5713
88e2cf7e
YQ
57142015-08-25 Yao Qi <yao.qi@linaro.org>
5715
5716 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5717 Find proc_info by find_process_pid. All callers updated.
5718
5e35436e
YQ
57192015-08-25 Yao Qi <yao.qi@linaro.org>
5720
5721 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5722 Remove.
5723 (debug_reg_change_callback): Remove.
5724 (aarch64_notify_debug_reg_change): Remove.
5725
4a8a7965
YQ
57262015-08-25 Yao Qi <yao.qi@linaro.org>
5727
5728 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5729 Call current_lwp_ptid.
5730
32a271ee
YQ
57312015-08-25 Yao Qi <yao.qi@linaro.org>
5732
5733 * linux-aarch64-low.c (debug_reg_change_callback): Use
5734 debug_printf.
5735
0d51c8d7
YQ
57362015-08-25 Yao Qi <yao.qi@linaro.org>
5737
5738 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5739
31a43dd5
YQ
57402015-08-25 Yao Qi <yao.qi@linaro.org>
5741
5742 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5743
8ee52567
YQ
57442015-08-25 Yao Qi <yao.qi@linaro.org>
5745
5746 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5747 the code.
5748
ff3f0f45
YQ
57492015-08-25 Yao Qi <yao.qi@linaro.org>
5750
5751 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5752 Remove.
5753 (debug_reg_change_callback): Remove argument entry and add argument
5754 lwp. Remove local variable thread. Don't print thread id in the
5755 debugging output. Don't check whether pid of thread equals to pid.
5756 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5757 iterate_over_lwps instead find_inferior.
5758
3d40fbb5
PA
57592015-08-24 Pedro Alves <palves@redhat.com>
5760
5761 * inferiors.c (get_first_process): New function.
5762 * inferiors.h (get_first_process): New declaration.
5763 * remote-utils.c (read_ptid): Default to the first process in the
5764 list, instead of to the current thread's process.
5765
438e1e42
PA
57662015-08-24 Pedro Alves <palves@redhat.com>
5767
5768 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5769 * event-loop.c: Likewise.
5770 * remote-utils.c: Likewise.
5771 * tracepoint.c: Likewise.
5772
a8c6d4fc
PA
57732015-08-24 Pedro Alves <palves@redhat.com>
5774
5775 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5776 ptid_get_lwp.
5777
99b0bb12
PA
57782015-08-21 Pedro Alves <palves@redhat.com>
5779
5780 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5781 instead of literal 1.
5782
f8904751
PA
57832015-08-21 Pedro Alves <palves@redhat.com>
5784
5785 * tdesc.c (default_description): Explicitly zero-initialize.
5786
465a859e
PA
57872015-08-21 Pedro Alves <palves@redhat.com>
5788
5789 PR gdb/18749
5790 * inferiors.c (remove_thread): Discard any pending stop reply for
5791 this thread.
5792 * server.c (remove_all_on_match_pid): Rename to ...
5793 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5794 instead of a pid.
5795 (discard_queued_stop_replies): Change parameter to a ptid. Now
5796 extern.
5797 (handle_v_kill, kill_inferior_callback, captured_main)
5798 (process_serial_event): Adjust.
5799 * server.h (discard_queued_stop_replies): Declare.
5800
f0db101d
PA
58012015-08-21 Pedro Alves <palves@redhat.com>
5802
5803 * linux-low.c (wait_for_sigstop): Always switch to no thread
5804 selected if the previously current thread dies.
5805 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5806 process instead of the current thread's.
5807 * remote-utils.c (input_interrupt): Don't check if there's no
5808 current thread.
5809 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5810 current thread to the general thread fails, error out.
5811 (handle_qxfer_auxv, handle_qxfer_libraries)
5812 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5813 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5814 (handle_query): Check if there's a thread selected instead of
5815 checking whether there's any thread in the thread list.
5816 (handle_qxfer_threads, handle_qxfer_btrace)
5817 (handle_qxfer_btrace_conf): Don't error out early if there's no
5818 thread in the thread list.
5819 (handle_v_cont, myresume): Don't set the current thread to the
5820 continue thread.
5821 (process_serial_event) <Hg handling>: Also set thread_id if the
5822 previous general thread is still alive.
5823 (process_serial_event) <g/G handling>: If setting the current
5824 thread to the general thread fails, error out.
5825 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5826 thread's lwp instead of the current thread's.
5827 * target.c (set_desired_thread): If the desired thread was not
5828 found, leave the current thread pointing to NULL. Return an int
5829 (boolean) indicating success.
5830 * target.h (set_desired_thread): Change return type to int.
5831
40045d91
MF
58322015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5833
5834 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5835 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5836 #includes.
5837 (ps_get_thread_area): New function.
5838
45face3b
GB
58392015-08-19 Gary Benson <gbenson@redhat.com>
5840
5841 * hostio.c (handle_pread): Do not attempt to read more data
5842 than hostio_reply_with_data can fit in a packet.
5843
16d5f642
JB
58442015-08-18 Joel Brobecker <brobecker@adacore.com>
5845
5846 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5847
a738da3a
MF
58482015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5849
5850 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5851
33ebda9d
PA
58522015-08-06 Pedro Alves <palves@redhat.com>
5853
5854 * tracepoint.c (expr_eval_result): Now an int.
5855
a44892be
PA
58562015-08-06 Pedro Alves <palves@redhat.com>
5857
5858 * gdbthread.h (struct regcache): Forward declare.
5859 (struct thread_info) <regcache_data>: Now a struct regcache
5860 pointer.
5861 * inferiors.c (inferior_regcache_data)
5862 (set_inferior_regcache_data): Now work with struct regcache
5863 pointers.
5864 * inferiors.h (struct regcache): Forward declare.
5865 (inferior_regcache_data, set_inferior_regcache_data): Now work
5866 with struct regcache pointers.
5867 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5868 (free_register_cache_thread): Remove struct regcache pointer
5869 casts.
5870
608a1e46
PA
58712015-08-06 Pedro Alves <palves@redhat.com>
5872
5873 * server.c (captured_main): On error, print the exception message
5874 to stderr, and if run_once is set, throw a quit.
5875
f0ce0d3a
PA
58762015-08-06 Pedro Alves <palves@redhat.com>
5877
5878 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5879 the current thread.
5880
bf47e248
PA
58812015-08-06 Pedro Alves <palves@redhat.com>
5882
5883 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5884 reading beyond the passed in buffer length.
5885
b6b9ffcc
PL
58862015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5887
5888 * tracepoint.c (symbol_list) <required>: Remove.
5889
863d01bd
PA
58902015-08-06 Pedro Alves <palves@redhat.com>
5891
5892 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5893 count if stopping and suspending threads.
5894 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5895 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5896 (linux_detach): Complete an ongoing step-over.
5897 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5898 throughout.
5899 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5900 (linux_wait_1): If passing a signal to the inferior after
5901 finishing a step-over, unsuspend and re-resume all lwps. If we
5902 see a single-step event but the thread should be continuing, don't
5903 pass the trap to gdb.
5904 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5905 internal_error instead of gdb_assert.
5906 (enqueue_pending_signal): New function.
5907 (check_ptrace_stopped_lwp_gone): Add debug output.
5908 (start_step_over): Use internal_error instead of gdb_assert.
5909 (complete_ongoing_step_over): New function.
5910 (linux_resume_one_thread): Don't resume a suspended thread.
5911 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5912 it stepping.
5913
00db26fa
PA
59142015-08-06 Pedro Alves <palves@redhat.com>
5915
5916 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5917 (linux_thread_alive): Use lwp_is_marked_dead.
5918 (extended_event_reported): Delete.
5919 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5920 instead of extended_event_reported.
5921 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5922 as well.
5923 (lwp_is_marked_dead): New function.
5924 (lwp_running): Use lwp_is_marked_dead.
5925 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5926 comment.
5927
ad071a30
PA
59282015-08-06 Pedro Alves <palves@redhat.com>
5929
5930 * linux-low.c (linux_wait_1): Move fork event output out of the
5931 !report_to_gdb check. Pass event_child->waitstatus to
5932 target_waitstatus_to_string instead of ourstatus.
5933
524b57e6
YQ
59342015-08-04 Yao Qi <yao.qi@linaro.org>
5935
5936 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5937 if current_thread is 32 bit.
5938
6085d6f6
YQ
59392015-08-04 Yao Qi <yao.qi@linaro.org>
5940
5941 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5942 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5943 * server.c (extended_protocol): Remove "static".
5944 * server.h (extended_protocol): Declare it.
5945
8a7e4587
YQ
59462015-08-04 Yao Qi <yao.qi@linaro.org>
5947
5948 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5949 both aarch64 and aarch32.
5950 (aarch64_set_pc): Likewise.
5951
3b53ae99
YQ
59522015-08-04 Yao Qi <yao.qi@linaro.org>
5953
5954 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5955 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5956 arm-with-neon.xml to srv_xmlfiles.
5957 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5958 (is_64bit_tdesc): New function.
5959 (aarch64_linux_read_description): New function.
5960 (aarch64_arch_setup): Call aarch64_linux_read_description.
5961 (regs_info): Rename to regs_info_aarch64.
5962 (aarch64_regs_info): Return right regs_info.
5963 (initialize_low_arch): Call initialize_low_arch_aarch32.
5964
bd9e6534
YQ
59652015-08-04 Yao Qi <yao.qi@linaro.org>
5966
5967 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5968 * linux-aarch32-low.c: New file.
5969 * linux-aarch32-low.h: New file.
5970 * linux-arm-low.c (arm_fill_gregset): Move it to
5971 linux-aarch32-low.c.
5972 (arm_store_gregset): Likewise.
5973 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5974 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5975 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5976 (regs_info): Rename to regs_info_arm.
5977 (arm_regs_info): Return regs_info_aarch32 if
5978 have_ptrace_getregset is 1 and target description is
5979 arm_with_neon or arm_with_vfpv3.
5980 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5981 Call initialize_low_arch_aarch32 instead.
5982
ded48a5e
YQ
59832015-08-04 Yao Qi <yao.qi@linaro.org>
5984
5985 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5986 * linux-low.c: ... here.
5987 * linux-low.h (have_ptrace_getregset): Declare it.
5988
96e9210f
PA
59892015-08-04 Pedro Alves <palves@redhat.com>
5990
5991 * thread-db.c (struct thread_db): Use new typedefs.
5992 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5993 CHK calls.
5994 (disable_thread_event_reporting): Cast result of dlsym to
5995 destination function pointer type.
5996 (thread_db_mourn): Use td_ta_delete_ftype.
5997
af60a1ef
SL
59982015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5999
6000 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6001 arch variant.
6002 (CDX_BREAKPOINT): Define for R2.
6003 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6004 (the_low_target): Add comments.
6005
e8b41681
YQ
60062015-07-30 Yao Qi <yao.qi@linaro.org>
6007
6008 * linux-arm-low.c (arm_hwcap): Remove it.
6009 (arm_read_description): New local variable arm_hwcap. Don't
6010 set arm_hwcap to zero.
6011
89abb039
YQ
60122015-07-30 Yao Qi <yao.qi@linaro.org>
6013
6014 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6015 Use regcache->tdesc instead.
6016 (arm_store_wmmxregset): Likewise.
6017 (arm_fill_vfpregset): Likewise.
6018 (arm_store_vfpregset): Likewise.
6019
deca266c
YQ
60202015-07-30 Yao Qi <yao.qi@linaro.org>
6021
6022 * linux-arm-low.c: Include arch/arm.h.
6023 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6024 (arm_store_gregset): Likewise.
6025
aa58a496
SM
60262015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6027
6028 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6029 ptrace's 4th parameter.
6030
50904b25
YQ
60312015-07-27 Yao Qi <yao.qi@linaro.org>
6032
6033 * configure.srv (case aarch64*-*-linux*): Don't set
6034 srv_linux_usrregs.
6035
5826e159
PA
60362015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6037
6038 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6039 sys/ptrace.h.
6040 * linux-arm-low.c: Likewise.
6041 * linux-cris-low.c: Likewise.
6042 * linux-crisv32-low.c: Likewise.
6043 * linux-low.c: Likewise.
6044 * linux-m68k-low.c: Likewise.
6045 * linux-mips-low.c: Likewise.
6046 * linux-nios2-low.c: Likewise.
6047 * linux-s390-low.c: Likewise.
6048 * linux-sparc-low.c: Likewise.
6049 * linux-tic6x-low.c: Likewise.
6050 * linux-tile-low.c: Likewise.
6051 * linux-x86-low.c: Likewise.
6052
54019719
PA
60532015-07-24 Pedro Alves <palves@redhat.com>
6054
6055 * config.in: Regenerate.
6056 * configure: Regenerate.
6057
eb7aa561
PA
60582015-07-24 Pedro Alves <palves@redhat.com>
6059
6060 * acinclude.m4: Include ../ptrace.m4.
6061 * configure.ac: Call GDB_AC_PTRACE.
6062 * config.in, configure: Regenerate.
6063
55d7b841
YQ
60642015-07-24 Yao Qi <yao.qi@linaro.org>
6065
6066 * linux-low.c (linux_create_inferior): Remove setting to
6067 proc->priv->new_inferior.
6068 (linux_attach): Likewise.
6069 (linux_low_filter_event): Likewise.
6070 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6071
c06cbd92
YQ
60722015-07-24 Yao Qi <yao.qi@linaro.org>
6073
6074 * linux-low.c (linux_arch_setup): New function.
6075 (linux_low_filter_event): If proc->tdesc is NULL and
6076 proc->attached is true, call the_low_target.arch_setup.
6077 Otherwise, keep status pending, and return.
6078 (linux_resume_one_lwp_throw): Don't call get_pc if
6079 thread->while_stepping isn't NULL. Don't call
6080 get_thread_regcache if proc->tdesc is NULL.
6081 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6082 (linux_target_ops): Install arch_setup.
6083 * server.c (start_inferior): Call the_target->arch_setup.
6084 * target.h (struct target_ops) <arch_setup>: New field.
6085 (target_arch_setup): New marco.
6086 * lynx-low.c (lynx_target_ops): Update.
6087 * nto-low.c (nto_target_ops): Update.
6088 * spu-low.c (spu_target_ops): Update.
6089 * win32-low.c (win32_target_ops): Update.
6090
5ae3ebba
YQ
60912015-07-24 Yao Qi <yao.qi@linaro.org>
6092
6093 * linux-low.c (linux_add_process): Don't set
6094 proc->priv->new_inferior.
6095 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6096 (linux_attach): Likewise.
6097
eb97750b
YQ
60982015-07-24 Yao Qi <yao.qi@linaro.org>
6099
6100 * server.c (start_inferior): Code refactor.
6101
51aee833
YQ
61022015-07-24 Yao Qi <yao.qi@linaro.org>
6103
6104 * server.c (process_serial_event): Set general_thread.
6105
af1b22f3
YQ
61062015-07-21 Yao Qi <yao.qi@linaro.org>
6107
6108 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6109 aarch64_linux_get_debug_reg_capacity.
6110
554717a3
YQ
61112015-07-17 Yao Qi <yao.qi@linaro.org>
6112
6113 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6114 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6115 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6116 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6117 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6118 (AARCH64_HWP_ALIGNMENT): Likewise.
6119 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6120 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6121 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6122 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6123 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6124 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6125 (struct aarch64_debug_reg_state): Likewise.
6126 (struct arch_lwp_info): Likewise.
6127 (aarch64_align_watchpoint): Likewise.
6128 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6129 (aarch64_watchpoint_length): Likewise.
6130 (aarch64_point_encode_ctrl_reg): Likewise
6131 (aarch64_point_is_aligned): Likewise.
6132 (aarch64_align_watchpoint): Likewise.
6133 (aarch64_linux_set_debug_regs):
6134 (aarch64_dr_state_insert_one_point): Likewise.
6135 (aarch64_dr_state_remove_one_point): Likewise.
6136 (aarch64_handle_breakpoint): Likewise.
6137 (aarch64_handle_aligned_watchpoint): Likewise.
6138 (aarch64_handle_unaligned_watchpoint): Likewise.
6139 (aarch64_handle_watchpoint): Likewise.
6140
c67ca4de
YQ
61412015-07-17 Yao Qi <yao.qi@linaro.org>
6142
6143 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6144 and don't aarch64_get_debug_reg_state. All callers update.
6145 (aarch64_handle_aligned_watchpoint): Likewise.
6146 (aarch64_handle_unaligned_watchpoint): Likewise.
6147 (aarch64_handle_watchpoint): Likewise.
6148 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6149 (aarch64_remove_point): Likewise.
6150
25abf979
YQ
61512015-07-17 Yao Qi <yao.qi@linaro.org>
6152
6153 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6154 debug_printf.
6155 (aarch64_handle_unaligned_watchpoint): Likewise.
6156
db1ff28b
JK
61572015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6158
6159 Revert the previous 3 commits:
6160 Move gdb_regex* to common/
6161 Move linux_find_memory_regions_full & co.
6162 gdbserver build-id attribute generator
6163
700ca40f
JK
61642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6165 Jan Kratochvil <jan.kratochvil@redhat.com>
6166
6167 gdbserver build-id attribute generator.
6168 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6169 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6170 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6171 (find_phdr): New.
6172 (get_dynamic): Use find_pdhr to traverse program headers.
6173 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6174 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6175 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6176 (get_hex_build_id): New.
6177 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6178 to reply XML document.
6179
9904185c
JK
61802015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6181 Jan Kratochvil <jan.kratochvil@redhat.com>
6182
6183 * target.c: Include target/target-utils.h and fcntl.h.
6184 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6185 (target_fileio_read_stralloc): New functions.
6186
6e5b4429
JK
61872015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6188
6189 * Makefile.in (OBS): Add gdb_regex.o.
6190 (gdb_regex.o): New.
6191 * config.in: Rebuilt.
6192 * configure: Rebuilt.
6193
ddc98fbf
JK
61942015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6195 Jan Kratochvil <jan.kratochvil@redhat.com>
6196
6197 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6198 * Makefile.in (OBS): Add target-utils.o.
6199 (linux-maps.o, target-utils.o): New.
6200 * configure.srv (srv_linux_obj): Add linux-maps.o.
6201
e57bb7a0
PL
62022015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6203
6204 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6205 function, return 1.
6206 (the_low_target): Install it.
6207
586b02a9
PA
62082015-07-14 Pedro Alves <palves@redhat.com>
6209
6210 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6211 Instead, ignore ECHILD, and throw an error for other errnos.
6212
58c1b36c
PA
62132015-07-10 Pedro Alves <palves@redhat.com>
6214
6215 * event-loop.c (struct callback_event) <data>: Change type to
6216 gdb_client_data instance instead of gdb_client_data pointer.
6217 (append_callback_event): Adjust.
6218
421530db
PL
62192015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6220
6221 * linux-aarch64-low.c: Add comments for each linux_target_ops
6222 method. Remove comments already covered in target_ops and
6223 linux_target_ops definitions.
6224 (the_low_target): Add comments for each unimplemented method.
6225
c2d65f38
YQ
62262015-07-09 Yao Qi <yao.qi@linaro.org>
6227
6228 * linux-aarch64-low.c (aarch64_regmap): Remove.
6229 (aarch64_usrregs_info): Remove.
6230 (regs_info): Set field usrregs to NULL.
6231
b20a6524
MM
62322015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6233
6234 * linux-low.c: Include "rsp-low.h"
6235 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6236 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6237 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6238 (handle_btrace_enable_pt): New.
6239 (handle_btrace_general_set): Support "pt".
6240 (handle_btrace_conf_general_set): Support "pt:size".
6241
96c97461
PL
62422015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6243
6244 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6245 Z_PACKET_SW_BP.
6246
37d66942
PL
62472015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6248
6249 * linux-aarch64-low.c: Remove comment about endianness.
6250 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6251 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6252 memcmp.
6253
dc06243f
GB
62542015-06-24 Gary Benson <gbenson@redhat.com>
6255
6256 * linux-i386-ipa.c (stdint.h): Do not include.
6257 * lynx-i386-low.c (stdint.h): Likewise.
6258 * lynx-ppc-low.c (stdint.h): Likewise.
6259 * mem-break.c (stdint.h): Likewise.
6260 * thread-db.c (stdint.h): Likewise.
6261 * tracepoint.c (stdint.h): Likewise.
6262 * win32-low.c (stdint.h): Likewise.
6263
124e13d9
SM
62642015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6265
6266 * server.c (write_qxfer_response): Update call to
6267 remote_escape_output.
6268
909c2cda
JK
62692015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6270 Jan Kratochvil <jan.kratochvil@redhat.com>
6271
6272 Merge multiple hex conversions.
6273 * gdbreplay.c (tohex): Rename to 'fromhex'.
6274 (logchar): Use fromhex.
6275
24c05f46
JK
62762015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6277
6278 * server.c (handle_qxfer_libraries): Set `version' attribute for
6279 <library-list>.
6280
14d2069a
GB
62812015-06-10 Gary Benson <gbenson@redhat.com>
6282
6283 * target.h (struct target_ops) <multifs_open>: New field.
6284 <multifs_unlink>: Likewise.
6285 <multifs_readlink>: Likewise.
6286 * linux-low.c (nat/linux-namespaces.h): New include.
6287 (linux_target_ops): Initialize the_target->multifs_open,
6288 the_target->multifs_unlink and the_target->multifs_readlink.
6289 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6290 * hostio.c (hostio_fs_pid): New static variable.
6291 (hostio_handle_new_gdb_connection): New function.
6292 (handle_setfs): Likewise.
6293 (handle_open): Use the_target->multifs_open as appropriate.
6294 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6295 (handle_readlink): Use the_target->multifs_readlink as
6296 appropriate.
6297 (handle_vFile): Handle vFile:setfs packets.
6298 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6299 after target_handle_new_gdb_connection.
6300
4b8b5e72
GB
63012015-06-10 Gary Benson <gbenson@redhat.com>
6302
6303 * configure.ac (AC_CHECK_FUNCS): Add setns.
6304 * config.in: Regenerate.
6305 * configure: Likewise.
6306 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6307 (linux-namespaces.o): New rule.
6308 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6309
3ac2e371
GB
63102015-06-09 Gary Benson <gbenson@redhat.com>
6311
6312 * hostio.c (handle_open): Process mode argument with
6313 fileio_to_host_mode.
6314
ca9b78ce
YQ
63152015-06-01 Yao Qi <yao.qi@linaro.org>
6316
6317 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6318 * linux-x86-low.c: Likewise.
6319
bfacd19d
DB
63202015-05-28 Don Breazeal <donb@codesourcery.com>
6321
6322 * linux-low.c (handle_extended_wait): Initialize
6323 thread_info.last_resume_kind for new fork children.
6324
452003ef
PA
63252015-05-15 Pedro Alves <palves@redhat.com>
6326
6327 * target.h (target_handle_new_gdb_connection): Rewrite using if
6328 wrapped in do/while.
6329
1041a03c
JB
63302015-05-14 Joel Brobecker <brobecker@adacore.com>
6331
6332 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6333 * configure, config.in: Regenerate.
6334 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6335 Declare typedef.
6336
c269dbdb
DB
63372015-05-12 Don Breazeal <donb@codesourcery.com>
6338
6339 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6340 PTRACE_EVENT_VFORK_DONE.
6341 (linux_low_ptrace_options, extended_event_reported): Add vfork
6342 events.
6343 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6344 and "vforkdone" for RSP 'T' Stop Reply Packet.
6345 * server.h (report_vfork_events): Declare
6346 global variable.
6347
3a8a0396
DB
63482015-05-12 Don Breazeal <donb@codesourcery.com>
6349
6350 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6351 (the_low_target) <new_fork>: Initialize new member.
6352 * linux-arm-low.c (arm_new_fork): New function.
6353 (the_low_target) <new_fork>: Initialize new member.
6354 * linux-low.c (handle_extended_wait): Call new target function
6355 new_fork.
6356 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6357 * linux-mips-low.c (mips_add_watchpoint): New function
6358 extracted from mips_insert_point.
6359 (the_low_target) <new_fork>: Initialize new member.
6360 (mips_linux_new_fork): New function.
6361 (mips_insert_point): Call mips_add_watchpoint.
6362 * linux-x86-low.c (x86_linux_new_fork): New function.
6363 (the_low_target) <new_fork>: Initialize new member.
6364
de0d863e
DB
63652015-05-12 Don Breazeal <donb@codesourcery.com>
6366
6367 * linux-low.c (handle_extended_wait): Implement return value,
6368 rename argument 'event_child' to 'event_lwp', handle
6369 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6370 (linux_low_ptrace_options): New function.
6371 (linux_low_filter_event): Call linux_low_ptrace_options,
6372 use different argument fo linux_enable_event_reporting,
6373 use return value from handle_extended_wait.
6374 (extended_event_reported): New function.
6375 (linux_wait_1): Call extended_event_reported and set
6376 status to report fork events.
6377 (linux_write_memory): Add pid to debug message.
6378 (reset_lwp_ptrace_options_callback): New function.
6379 (linux_handle_new_gdb_connection): New function.
6380 (linux_target_ops): Initialize new structure member.
6381 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6382 * lynx-low.c: Initialize new structure member.
6383 * remote-utils.c (prepare_resume_reply): Implement stop reason
6384 "fork" for "T" stop message.
6385 * server.c (handle_query): Call handle_new_gdb_connection.
6386 * server.h (report_fork_events): Declare global flag.
6387 * target.h (struct target_ops) <handle_new_gdb_connection>:
6388 New member.
6389 (target_handle_new_gdb_connection): New macro.
6390 * win32-low.c: Initialize new structure member.
6391
ddcbc397
DB
63922015-05-12 Don Breazeal <donb@codesourcery.com>
6393
6394 * mem-break.c (APPEND_TO_LIST): Define macro.
6395 (clone_agent_expr): New function.
6396 (clone_one_breakpoint): New function.
6397 (clone_all_breakpoints): New function.
6398 * mem-break.h: Declare new functions.
6399
89245bc0
DB
64002015-05-12 Don Breazeal <donb@codesourcery.com>
6401
6402 * linux-low.c (linux_supports_fork_events): New function.
6403 (linux_supports_vfork_events): New function.
6404 (linux_target_ops): Initialize new structure members.
6405 (initialize_low): Call linux_check_ptrace_features.
6406 * lynx-low.c (lynx_target_ops): Initialize new structure
6407 members.
6408 * server.c (report_fork_events, report_vfork_events):
6409 New global flags.
6410 (handle_query): Add new features to qSupported packet and
6411 response.
6412 (captured_main): Initialize new global variables.
6413 * target.h (struct target_ops) <supports_fork_events>:
6414 New member.
6415 <supports_vfork_events>: New member.
6416 (target_supports_fork_events): New macro.
6417 (target_supports_vfork_events): New macro.
6418 * win32-low.c (win32_target_ops): Initialize new structure
6419 members.
6420
835205d0
GB
64212015-05-12 Gary Benson <gbenson@redhat.com>
6422
6423 * server.c (handle_qxfer_exec_file): Use current process
6424 if annex is empty.
6425
21e94bd9
SL
64262015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6427
6428 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6429 Remove HAVE_PTRACE_GETREGS conditionals.
6430 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6431 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6432
45614f15
YQ
64332015-05-08 Yao Qi <yao.qi@linaro.org>
6434
6435 * linux-low.c (linux_supports_conditional_breakpoints): New
6436 function.
6437 (linux_target_ops): Install new target method.
6438 * lynx-low.c (lynx_target_ops): Install NULL hook for
6439 supports_conditional_breakpoints.
6440 * nto-low.c (nto_target_ops): Likewise.
6441 * spu-low.c (spu_target_ops): Likewise.
6442 * win32-low.c (win32_target_ops): Likewise.
6443 * server.c (handle_query): Check
6444 target_supports_conditional_breakpoints.
6445 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6446 New field.
6447 (target_supports_conditional_breakpoints): New macro.
6448
80ad801e
PA
64492015-05-06 Pedro Alves <palves@redhat.com>
6450
6451 PR server/18081
6452 * server.c (start_inferior): If the process exits, mourn it.
6453
819843c7
GB
64542015-04-21 Gary Benson <gbenson@redhat.com>
6455
6456 * hostio.c (fileio_open_flags_to_host): Factored out to
6457 fileio_to_host_openflags in common/fileio.c. Single use
6458 updated.
6459
a2d5a9d7
MF
64602015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6461
6462 * linux-xtensa-low.c (xtensa_fill_gregset)
6463 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6464 XCHAL_HAVE_LOOP.
6465
deb44829
MF
64662015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6467
6468 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6469 (regs_info): Replace usrregs pointer with NULL.
6470
e57f1de3
GB
64712015-04-17 Gary Benson <gbenson@redhat.com>
6472
6473 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6474 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6475 * server.c (handle_qxfer_exec_file): New function.
6476 (qxfer_packets): Add exec-file entry.
6477 (handle_query): Report qXfer:exec-file:read as supported packet.
6478
62828379
RN
64792015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6480
6481 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6482
b88bb450
GB
64832015-04-09 Gary Benson <gbenson@redhat.com>
6484
6485 * hostio-errno.c (errno_to_fileio_error): Remove function.
6486 Update caller to use remote_fileio_to_fio_error.
6487
c8f4bfdd
YQ
64882015-04-09 Yao Qi <yao.qi@linaro.org>
6489
6490 * linux-low.c (linux_insert_point): Call
6491 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6492 (linux_remove_point): Call remove_memory_breakpoint if type is
6493 raw_bkpt_type_sw.
6494 * linux-x86-low.c (x86_insert_point): Don't call
6495 insert_memory_breakpoint.
6496 (x86_remove_point): Don't call remove_memory_breakpoint.
6497
41f98f02
PA
64982015-04-01 Pedro Alves <palves@redhat.com>
6499 Cleber Rosa <crosa@redhat.com>
6500
6501 * server.c (gdbserver_usage): Reorganize and extend the usage
6502 message.
6503
2bf6fb9d
PA
65042015-03-24 Pedro Alves <palves@redhat.com>
6505
6506 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6507 output. Also dump TRAP_TRACE.
6508 (linux_low_filter_event): In debug output, distinguish a
6509 resume_stop SIGSTOP from a delayed SIGSTOP.
6510
369f6daa
GB
65112015-03-24 Gary Benson <gbenson@redhat.com>
6512
6513 * linux-x86-low.c (x86_linux_new_thread): Moved to
6514 nat/x86-linux.c.
6515 (x86_linux_prepare_to_resume): Likewise.
6516
8e5d4070
GB
65172015-03-24 Gary Benson <gbenson@redhat.com>
6518
6519 * Makefile.in (x86-linux-dregs.o): New rule.
6520 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6521 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6522 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6523 (x86_linux_dr_get): Likewise.
6524 (x86_linux_dr_set): Likewise.
6525 (update_debug_registers_callback): Likewise.
6526 (x86_linux_dr_set_addr): Likewise.
6527 (x86_linux_dr_get_addr): Likewise.
6528 (x86_linux_dr_set_control): Likewise.
6529 (x86_linux_dr_get_control): Likewise.
6530 (x86_linux_dr_get_status): Likewise.
6531 (x86_linux_update_debug_registers): Likewise.
6532
2b95d440
GB
65332015-03-24 Gary Benson <gbenson@redhat.com>
6534
6535 * linux-x86-low.c (x86_linux_update_debug_registers):
6536 New function, factored out from...
6537 (x86_linux_prepare_to_resume): ...this.
6538
14b0bc68
GB
65392015-03-24 Gary Benson <gbenson@redhat.com>
6540
6541 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6542 (x86_linux_dr_set): Likewise.
6543 (update_debug_registers_callback): Likewise.
6544 (x86_linux_dr_set_addr): Likewise.
6545 (x86_linux_dr_get_addr): Likewise.
6546 (x86_linux_dr_set_control): Likewise.
6547 (x86_linux_dr_get_control): Likewise.
6548 (x86_linux_dr_get_status): Likewise.
6549 (x86_linux_prepare_to_resume): Likewise.
6550
5dfe6ca8
GB
65512015-03-24 Gary Benson <gbenson@redhat.com>
6552
6553 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6554 Use perror_with_name. Pass string through gettext.
6555 (x86_linux_dr_set): Likewise.
6556
d33472ad
GB
65572015-03-24 Gary Benson <gbenson@redhat.com>
6558
6559 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6560 (x86_linux_dr_set_addr): ...this.
6561 (x86_dr_low_get_addr): Rename to...
6562 (x86_linux_dr_get_addr): ...this.
6563 (x86_dr_low_set_control): Rename to...
6564 (x86_linux_dr_set_control): ...this.
6565 (x86_dr_low_get_control): Rename to...
6566 (x86_linux_dr_get_control): ...this.
6567 (x86_dr_low_get_status): Rename to...
6568 (x86_linux_dr_get_status): ...this.
6569 (x86_dr_low): Update with new function names.
6570
4b134ca1
GB
65712015-03-24 Gary Benson <gbenson@redhat.com>
6572
6573 * Makefile.in (x86-linux.o): New rule.
6574 * configure.srv: Add x86-linux.o to relevant targets.
6575 * linux-low.c (lwp_set_arch_private_info): New function.
6576 (lwp_arch_private_info): Likewise.
6577 * linux-x86-low.c: Include nat/x86-linux.h.
6578 (arch_lwp_info): Removed structure.
6579 (update_debug_registers_callback):
6580 Use lwp_set_debug_registers_changed.
6581 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6582 and lwp_set_debug_registers_changed.
6583 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6584
34c703da
GB
65852015-03-24 Gary Benson <gbenson@redhat.com>
6586
6587 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6588 * linux-arm-low.c (arm_new_thread): Likewise.
6589 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6590 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6591 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6592 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6593
cff068da
GB
65942015-03-24 Gary Benson <gbenson@redhat.com>
6595
6596 * linux-low.c (ptid_of_lwp): New function.
6597 (lwp_is_stopped): Likewise.
6598 (lwp_stop_reason): Likewise.
6599 * linux-x86-low.c (update_debug_registers_callback):
6600 Use lwp_is_stopped.
6601 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6602 lwp_stop_reason.
6603
b2f7c7e8
GB
66042015-03-24 Gary Benson <gbenson@redhat.com>
6605
6606 * linux-low.h (linux_stop_lwp): Remove declaration.
6607
6d4ee8c6
GB
66082015-03-24 Gary Benson <gbenson@redhat.com>
6609
6610 * linux-low.h: Include nat/linux-nat.h.
6611 * linux-low.c (iterate_over_lwps_args): New structure.
6612 (iterate_over_lwps_filter): New function.
6613 (iterate_over_lwps): Likewise.
6614 * linux-x86-low.c (update_debug_registers_callback):
6615 Update signature to what iterate_over_lwps expects.
6616 Remove PID check that iterate_over_lwps now performs.
6617 (x86_dr_low_set_addr): Use iterate_over_lwps.
6618 (x86_dr_low_set_control): Likewise.
6619
70a0bb6b
GB
66202015-03-24 Gary Benson <gbenson@redhat.com>
6621
6622 * linux-x86-low.c (x86_debug_reg_state): New function.
6623 (x86_linux_prepare_to_resume): Use the above.
6624
7b669087
GB
66252015-03-24 Gary Benson <gbenson@redhat.com>
6626
6627 * linux-low.c (current_lwp_ptid): New function.
6628 * linux-x86-low.c: Include nat/linux-nat.h.
6629 (x86_dr_low_get_addr): Use current_lwp_ptid.
6630 (x86_dr_low_get_control): Likewise.
6631 (x86_dr_low_get_status): Likewise.
6632
eef49a3d
PA
66332015-03-20 Pedro Alves <palves@redhat.com>
6634
6635 * tracepoint.c (cmd_qtstatus): Make "str" const.
6636
b2333d22
PA
66372015-03-20 Pedro Alves <palves@redhat.com>
6638
6639 * server.c (handle_general_set): Make "req_str" const.
6640
23f238d3
PA
66412015-03-19 Pedro Alves <palves@redhat.com>
6642
6643 * linux-low.c (linux_resume_one_lwp): Rename to ...
6644 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6645 instead call perror_with_name.
6646 (check_ptrace_stopped_lwp_gone): New function.
6647 (linux_resume_one_lwp): Reimplement as wrapper around
6648 linux_resume_one_lwp_throw that swallows errors if the LWP is
6649 gone.
6650
91baf43f
PA
66512015-03-19 Pedro Alves <palves@redhat.com>
6652
6653 * linux-low.c (count_events_callback, select_event_lwp_callback):
6654 No longer check whether the thread has resume_stop as last resume
6655 kind.
6656
8bf3b159
PA
66572015-03-19 Pedro Alves <palves@redhat.com>
6658
6659 * linux-low.c (count_events_callback, select_event_lwp_callback):
6660 Use the lwp's status_pending_p field, not the thread's.
6661
b90fc188
PA
66622015-03-19 Pedro Alves <palves@redhat.com>
6663
6664 * linux-low.c (select_event_lwp_callback): Update comments to
6665 no longer mention SIGTRAP.
6666
464b0089
GB
66672015-03-18 Gary Benson <gbenson@redhat.com>
6668
6669 * server.c (handle_query): Do not report vFile:fstat as supported.
6670
aa9e327f
GB
66712015-03-11 Gary Benson <gbenson@redhat.com>
6672
6673 * hostio.c (sys/types.h): New include.
6674 (sys/stat.h): Likewise.
6675 (common-remote-fileio.h): Likewise.
6676 (handle_fstat): New function.
6677 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6678
791c0056
GB
66792015-03-11 Gary Benson <gbenson@redhat.com>
6680
6681 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6682 struct stat.st_blocks and struct stat.st_blksize.
6683 * configure: Regenerate.
6684 * config.in: Likewise.
6685 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6686 (OBS): Add common-remote-fileio.o.
6687 (common-remote-fileio.o): New rule.
6688
9a9df970
PA
66892015-03-09 Pedro Alves <palves@redhat.com>
6690
6691 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6692 'struct sockaddr' pointer in 'accept' call.
6693
9eb1356e
PA
66942015-03-09 Pedro Alves <palves@redhat.com>
6695
6696 Revert:
6697 2015-03-07 Pedro Alves <palves@redhat.com>
6698 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6699 or <winsock2.h> here. Instead include "gdb_socket.h".
6700 (remote_open): Use union gdb_sockaddr_u.
6701 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6702 or <winsock2.h> here. Instead include "gdb_socket.h".
6703 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6704 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6705 or <sys/un.h>.
6706 (init_named_socket, gdb_agent_helper_thread): Use union
6707 gdb_sockaddr_u.
6708
aac331e4
PA
67092015-03-07 Pedro Alves <palves@redhat.com>
6710
6711 * configure.ac (build_warnings): Move
6712 -Wdeclaration-after-statement to the C-specific set.
6713 * configure: Regenerate.
6714
366c75fc
PA
67152015-03-07 Pedro Alves <palves@redhat.com>
6716
6717 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6718 or <winsock2.h> here. Instead include "gdb_socket.h".
6719 (remote_open): Use union gdb_sockaddr_u.
6720 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6721 or <winsock2.h> here. Instead include "gdb_socket.h".
6722 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6723 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6724 or <sys/un.h>.
6725 (init_named_socket, gdb_agent_helper_thread): Use union
6726 gdb_sockaddr_u.
6727
492d29ea
PA
67282015-03-07 Pedro Alves <palves@redhat.com>
6729
6730 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6731 instead.
6732
60a191ed
YQ
67332015-03-06 Yao Qi <yao.qi@linaro.org>
6734
6735 * linux-aarch64-low.c (aarch64_insert_point): Use
6736 show_debug_regs as a boolean.
6737 (aarch64_remove_point): Likewise.
6738
f5771b1d
PA
67392015-03-05 Pedro Alves <palves@redhat.com>
6740
6741 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6742 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6743 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6744 * nto-low.c (nto_target_ops): Likewise.
6745 * spu-low.c (spu_target_ops): Likewise.
6746 * win32-low.c (win32_target_ops): Likewise.
6747
3e572f71
PA
67482015-03-04 Pedro Alves <palves@redhat.com>
6749
72f4393d 6750 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6751 Decide whether a breakpoint triggered based on the SIGTRAP's
6752 siginfo.si_code.
72f4393d
L
6753 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6754 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6755 (linux_low_filter_event): Check for breakpoints before checking
6756 watchpoints.
6757 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6758 siginfo.si_code.
72f4393d
L
6759 (linux_stopped_by_sw_breakpoint)
6760 (linux_supports_stopped_by_sw_breakpoint)
6761 (linux_stopped_by_hw_breakpoint)
6762 (linux_supports_stopped_by_hw_breakpoint): New functions.
6763 (linux_target_ops): Install new target methods.
3e572f71 6764
1ec68e26
PA
67652015-03-04 Pedro Alves <palves@redhat.com>
6766
6767 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6768 * server.c (swbreak_feature, hwbreak_feature): New globals.
6769 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6770 (captured_main): Clear swbreak_feature and hwbreak_feature.
6771 * server.h (swbreak_feature, hwbreak_feature): Declare.
6772 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6773 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6774 supports_stopped_by_hw_breakpoint>: New fields.
6775 (target_supports_stopped_by_sw_breakpoint)
6776 (target_stopped_by_sw_breakpoint)
6777 (target_supports_stopped_by_hw_breakpoint)
6778 (target_stopped_by_hw_breakpoint): Declare.
6779
15c66dd6
PA
67802015-03-04 Pedro Alves <palves@redhat.com>
6781
6782 enum lwp_stop_reason -> enum target_stop_reason
6783 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6784 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6785 (linux_wait_1, stuck_in_jump_pad_callback)
6786 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6787 (linux_stopped_by_watchpoint):
6788 * linux-low.h (enum lwp_stop_reason): Delete.
6789 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6790 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6791
98fc70d6
YQ
67922015-03-04 Yao Qi <yao.qi@linaro.org>
6793
6794 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6795
dd2ac174
GB
67962015-03-03 Gary Benson <gbenson@redhat.com>
6797
6798 * hostio.c (handle_vFile): Fix prefix lengths.
6799
d68e53f4
MM
68002015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6801
6802 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6803 ptr_bits.
6804
bf2d68ab
AA
68052015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6806
6807 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6808 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6809 (clean): Add "rm -f" for above C files.
6810 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6811 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6812 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6813 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6814 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6815 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6816 (init_registers_s390x_vx_linux64)
6817 (init_registers_s390x_tevx_linux64)
6818 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6819 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6820 declarations.
6821 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6822 (s390_store_vxrs_high): New functions.
6823 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6824 NT_S390_VXRS_HIGH.
6825 (s390_arch_setup): Add logic for selecting one of the new target
6826 descriptions. Activate the new vector regsets if applicable.
6827 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6828 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6829 and init_registers_s390x_tevx_linux64.
6830
c966a859
PA
68312015-03-01 Pedro Alves <palves@redhat.com>
6832
6833 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6834 parameter.
6835
4180215b
PA
68362015-02-27 Pedro Alves <palves@redhat.com>
6837
6838 * linux-x86-low.c (u_debugreg_offset): New function.
6839 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6840
749bab01
PA
68412015-02-27 Pedro Alves <palves@redhat.com>
6842
6843 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6844 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6845 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6846 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6847 (ps_lsetfpregs, ps_getpid)
6848 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6849 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6850 (ps_lsetxregs, ps_plog): Declare.
6851
3c14e5a3
PA
68522015-02-27 Pedro Alves <palves@redhat.com>
6853
6854 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6855 IP_AGENT_EXPORT_FUNC.
6856 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6857 IP_AGENT_EXPORT_FUNC.
6858 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6859 (IP_AGENT_EXPORT): Delete.
6860 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6861 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6862 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6863 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6864 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6865 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6866 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6867 (traceframe_read_count, traceframe_write_count)
6868 (traceframes_created, trace_state_variables, get_raw_reg)
6869 (get_trace_state_variable_value, set_trace_state_variable_value)
6870 (ust_loaded, helper_thread_id, cmd_buf): Use
6871 IPA_SYM_EXPORTED_NAME.
6872 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6873 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6874 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6875 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6876 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6877 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6878 EXTERN_C_PUSH/EXTERN_C_POP.
6879 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6880 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6881 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6882 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6883 (traceframe_write_count, traceframe_read_count)
6884 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6885 (about_to_request_buffer_space, get_trace_state_variable_value)
6886 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6887 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6888 EXTERN_C_PUSH/EXTERN_C_POP.
6889 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6890 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6891 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6892 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6893 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6894 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6895 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6896 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6897 Define.
6898 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6899 (IP_AGENT_EXPORT_VAR_DECL): Define.
6900 (tracing): Declare.
6901 (gdb_agent_get_raw_reg): Declare.
6902
fe978cb0
PA
69032015-02-27 Tom Tromey <tromey@redhat.com>
6904 Pedro Alves <palves@redhat.com>
6905
6906 Rename symbols whose names are reserved C++ keywords throughout.
6907
3bc3d82a
PA
69082015-02-27 Pedro Alves <palves@redhat.com>
6909
6910 * Makefile.in (COMPILER): New, get it from autoconf.
6911 (CXX): Get from autoconf instead.
6912 (COMPILE.pre): Use COMPILER.
6913 (CC-LD): Rename to ...
6914 (CC_LD): ... this. Use COMPILER.
6915 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6916 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6917 * acinclude.m4: Include build-with-cxx.m4.
6918 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6919 Disable -Werror by default if building in C++ mode.
6920 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6921 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6922 the C++ compiler. Save/restore CXXFLAGS too.
6923 * configure: Regenerate.
6924
07697489
PA
69252015-02-27 Pedro Alves <palves@redhat.com>
6926
6927 * acinclude.m4: Include libiberty.m4.
6928 * configure.ac: Call libiberty_INIT.
6929 * config.in, configure: Regenerate.
6930
9beb7c4e
PA
69312015-02-26 Pedro Alves <palves@redhat.com>
6932
6933 * linux-low.c (linux_wait_1): When incrementing the PC past a
6934 program breakpoint always use the_low_target.breakpoint_len as
6935 increment, rather than the maximum between that and
6936 the_low_target.decr_pc_after_break.
6937
8090aef2
PA
69382015-02-23 Pedro Alves <palves@redhat.com>
6939
6940 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6941 thread was doing a step-over; always adjust the PC if
6942 we stepped over a permanent breakpoint.
6943 (linux_wait_1): If we stepped over breakpoint that was on top of a
6944 permanent breakpoint, manually advance the PC past it.
6945
bc9540e8
PA
69462015-02-23 Pedro Alves <palves@redhat.com>
6947
6948 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6949 modes.
6950 (x86_fill_gregset, x86_store_gregset): Use it when handling
6951 $orig_eax.
6952
2db9a427
PA
69532015-02-20 Pedro Alves <palves@redhat.com>
6954
6955 * thread-db.c: Include "nat/linux-procfs.h".
6956 (thread_db_init): Skip listing new threads if the kernel supports
6957 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6958
afa8d396
PA
69592015-02-20 Pedro Alves <palves@redhat.com>
6960
6961 * linux-low.c (status_pending_p_callback): Use ptid_match.
6962
c9587f88
AT
69632015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6964
6965 PR breakpoints/16812
6966 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6967 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6968 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6969
b05ec7a5
AT
69702015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6971
6972 PR breakpoints/15956
6973 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6974
d33501a5
MM
69752015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6976
6977 * linux-low.c (linux_low_btrace_conf): Print size.
6978 * server.c (handle_btrace_conf_general_set): New.
6979 (hanle_general_set): Call handle_btrace_conf_general_set.
6980 (handle_query): Report Qbtrace-conf:bts:size as supported.
6981
f4abbc16
MM
69822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6983
6984 * linux-low.c (linux_low_enable_btrace): Update parameters.
6985 (linux_low_btrace_conf): New.
6986 (linux_target_ops)<to_btrace_conf>: Initialize.
6987 * server.c (current_btrace_conf): New.
6988 (handle_btrace_enable): Rename to ...
6989 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6990 to target_enable_btrace. Update comment. Update users.
6991 (handle_qxfer_btrace_conf): New.
6992 (qxfer_packets): Add btrace-conf entry.
6993 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6994 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6995 (target_ops)<read_btrace_conf>: New.
6996 (target_enable_btrace): Update parameters.
6997 (target_read_btrace_conf): New.
6998
043c3577
MM
69992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7000
7001 * server.c (handle_btrace_general_set): Remove call to
7002 target_supports_btrace.
7003 (supported_btrace_packets): New.
7004 (handle_query): Call supported_btrace_packets.
7005 * target.h: include btrace-common.h.
7006 (btrace_target_info): Removed.
7007 (supports_btrace, target_supports_btrace): Update parameters.
7008
734b0e4b
MM
70092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7010
7011 * Makefile.in (SFILES): Add common/btrace-common.c.
7012 (OBS): Add common/btrace-common.o.
7013 (btrace-common.o): Add build rules.
7014 * linux-low: Include btrace-common.h.
7015 (linux_low_read_btrace): Use struct btrace_data. Call
7016 btrace_data_init and btrace_data_fini.
7017
d6c146e9
PA
70182015-02-06 Pedro Alves <palves@redhat.com>
7019
7020 * thread-db.c (find_new_threads_callback): Add debug output.
7021
20ba1ce6
PA
70222015-02-04 Pedro Alves <palves@redhat.com>
7023
7024 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7025 (resume_stopped_resumed_lwps): New function.
7026 (linux_wait_for_event_filtered): Use it.
7027
8cc73a39
SDJ
70282015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7029
7030 * Makefile.in (SFILES): Add linux-personality.c.
7031 (linux-personality.o): New rule.
7032 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7033 list of objects to be built.
7034 * linux-low.c: Include nat/linux-personality.h.
7035 (linux_create_inferior): Remove code to disable address space
7036 randomization (moved to ../nat/linux-personality.c). Create
7037 cleanup to disable address space randomization.
7038
fb23d554
SDJ
70392015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7040
7041 * Makefile.in (posix-strerror.o): New rule.
7042 (mingw-strerror.o): Likewise.
7043 * configure: Regenerated.
7044 * configure.ac: Source file ../common/common.host. Initialize new
7045 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7046
cdf43629
YQ
70472015-01-14 Yao Qi <yao@codesourcery.com>
7048
7049 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7050 (ppc-linux.o): New rule.
7051 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7052 * configure.ac: AC_CHECK_FUNCS(getauxval).
7053 * config.in: Re-generated.
7054 * configure: Re-generated.
7055 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7056 ppc64_64bit_inferior_p
7057
514c5338
YQ
70582015-01-14 Yao Qi <yao@codesourcery.com>
7059
7060 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7061 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7062 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7063 (PT_ORIG_R3, PT_TRAP): Likewise.
7064 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7065 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7066 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7067
3368c1e5
JB
70682015-01-10 Joel Brobecker <brobecker@adacore.com>
7069
7070 * i387-fp.c (i387_cache_to_xsave): In look over
7071 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7072 zmmh_low_space field by use of zmmh_high_space.
7073
582511be
PA
70742015-01-09 Pedro Alves <palves@redhat.com>
7075
7076 * linux-low.c (step_over_bkpt): Move higher up in the file.
7077 (handle_extended_wait): Don't store the stop_pc here.
7078 (get_stop_pc): Adjust comments and rename to ...
7079 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7080 stopped for a software breakpoint or hardware breakpoint.
7081 (thread_still_has_status_pending_p): New function.
7082 (status_pending_p_callback): Use
7083 thread_still_has_status_pending_p. If the event is no longer
7084 interesting, resume the LWP.
7085 (handle_tracepoints): Add assert.
7086 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7087 (wstatus_maybe_breakpoint): New function.
7088 (cancel_breakpoint): Delete function.
7089 (check_stopped_by_watchpoint): New function, factored out from
7090 linux_low_filter_event.
7091 (lp_status_maybe_breakpoint): Delete function.
7092 (linux_low_filter_event): Remove filter_ptid argument.
7093 Leave thread group exits pending here. Store the LWP's stop PC.
7094 Always leave events pending.
7095 (linux_wait_for_event_filtered): Pull all events out of the
7096 kernel, and leave them all pending.
7097 (count_events_callback, select_event_lwp_callback): Consider all
7098 events.
7099 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7100 (select_event_lwp): Only give preference to the stepping LWP in
7101 all-stop mode. Adjust comments.
7102 (ignore_event): New function.
7103 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7104 references to cancel_breakpoints. Adjust to renames. Also give
7105 equal priority to all LWPs that have had events in non-stop mode.
7106 If reporting a software breakpoint event, unadjust the LWP's PC.
7107 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7108 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7109 Adjust.
7110 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7111 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7112 (linux_stopped_by_watchpoint): Adjust.
7113 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7114 * linux-low.h (enum lwp_stop_reason): New.
7115 (struct lwp_info) <stop_pc>: Adjust comment.
7116 <stopped_by_watchpoint>: Delete field.
7117 <stop_reason>: New field.
7118 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7119 * mem-break.c (software_breakpoint_inserted_here)
7120 (hardware_breakpoint_inserted_here): New function.
7121 * mem-break.h (software_breakpoint_inserted_here)
7122 (hardware_breakpoint_inserted_here): Declare.
7123 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7124 (cancel_breakpoints): Delete.
7125 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7126 (upload_fast_traceframes): Remove references to
7127 cancel_breakpoints.
7128
a33e3959
PA
71292015-01-09 Pedro Alves <palves@redhat.com>
7130
7131 * thread-db.c (find_new_threads_callback): Ignore thread if the
7132 kernel thread ID is -1.
7133
8784d563
PA
71342015-01-09 Pedro Alves <palves@redhat.com>
7135
7136 * linux-low.c (linux_attach_fail_reason_string): Move to
7137 nat/linux-ptrace.c, and rename.
7138 (linux_attach_lwp): Update comment.
7139 (attach_proc_task_lwp_callback): New function.
7140 (linux_attach): Adjust to rename and use
7141 linux_proc_attach_tgid_threads.
7142 (linux_attach_fail_reason_string): Delete declaration.
7143
76f2b779
JB
71442015-01-01 Joel Brobecker <brobecker@adacore.com>
7145
7146 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7147 * server.c (gdbserver_version): Likewise.
7148
fafcc06a
SDJ
71492014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7150
7151 * remote-utils.c: Include ctype.h.
7152 (input_interrupt): Explicitly handle the case when the char
7153 received is the NUL byte. Improve the printing of non-ASCII
7154 characters.
7155
beed38b8
JB
71562014-12-16 Joel Brobecker <brobecker@adacore.com>
7157
7158 * linux-low.c (linux_low_filter_event): Update call to
7159 linux_enable_event_reporting following the addition of
7160 a new parameter to that function.
7161
bf330350
CU
71622014-12-16 Catalin Udma <catalin.udma@freescale.com>
7163
7164 PR server/17457
7165 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7166 (AARCH64_FPCR_REGNO): Likewise.
7167 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7168 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7169 (aarch64_store_fpregset): Likewise.
7170
5227d625
JB
71712014-12-15 Joel Brobecker <brobecker@adacore.com>
7172
7173 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7174 Remove FIXME comment about assumption about N.
7175
f93b65a0
JB
71762014-12-13 Joel Brobecker <brobecker@adacore.com>
7177
7178 * configure.ac: If large-file support is disabled in GDBserver,
7179 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7180 * configure: Regenerate.
7181
e5a9158d
AA
71822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7183
7184 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7185 warning upon ENODATA from ptrace.
7186 * linux-s390-low.c (s390_store_tdb): New.
7187 (s390_regsets): Add regset for NT_S390_TDB.
7188
feea5f36
AA
71892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7190
7191 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7192 without a fill_function.
7193 * linux-s390-low.c (s390_fill_last_break): Remove.
7194 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7195 (s390_arch_setup): Use regset's size instead of fill_function for
7196 loop end condition.
7197
098dbe61
AA
71982014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7199
7200 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7201 the regset's store function when ptrace returned an error.
7202 * regcache.c (get_thread_regcache): Invalidate register cache
7203 before fetching inferior's registers.
7204
28eef672
AA
72052014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7206
7207 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7208 while-loop as for-loop.
7209 (regsets_store_inferior_registers): Likewise.
7210
bdca27a2
YQ
72112014-11-28 Yao Qi <yao@codesourcery.com>
7212
7213 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7214 * config.in, configure: Re-generate.
7215 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7216 is defined.
7217
9c232dda
YQ
72182014-11-21 Yao Qi <yao@codesourcery.com>
7219
7220 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7221 (AC_CHECK_HEADERS): Remove malloc.h.
7222 * configure: Re-generated.
7223 * config.in: Re-generated.
7224 * server.h: Don't include alloca.h and malloc.h.
7225 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7226 Don't include malloc.h.
7227
43968415
JB
72282014-11-17 Joel Brobecker <brobecker@adacore.com>
7229
7230 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7231 corresponding ERRNO check in same block.
7232
40e91bc7
PA
72332014-11-12 Pedro Alves <palves@redhat.com>
7234
7235 * server.c (cont_thread): Update comment.
7236 (start_inferior, attach_inferior): No longer clear cont_thread.
7237 (handle_v_cont): No longer set cont_thread.
7238 (captured_main): Clear cont_thread each time a GDB connects.
7239
c2c118cf
PA
72402014-11-12 Pedro Alves <palves@redhat.com>
7241
7242 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7243 thread, and don't resume all threads if the Hc thread has exited.
7244
78708b7c
PA
72452014-11-12 Pedro Alves <palves@redhat.com>
7246
7247 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7248 the process group instead of to a specific LWP.
7249
a2abc7de
PA
72502014-10-15 Pedro Alves <palves@redhat.com>
7251
7252 PR server/17487
7253 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7254 parameter.
7255 (arm_set_thread_context): Delete.
7256 (the_low_target): Adjust.
7257 * win32-i386-low.c (debug_registers_changed)
7258 (debug_registers_used): Delete.
7259 (update_debug_registers_callback): New function.
7260 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7261 needing to update their debug registers.
7262 (win32_get_current_dr): New function.
7263 (x86_dr_low_get_addr, x86_dr_low_get_control)
7264 (x86_dr_low_get_status): Fetch the debug register from the thread
7265 record's context.
7266 (i386_initial_stuff): Adjust.
7267 (i386_get_thread_context): Remove current_event parameter. Don't
7268 clear debug_registers_changed nor copy DR values to
7269 debug_reg_state.
7270 (i386_set_thread_context): Delete.
7271 (i386_prepare_to_resume): New function.
7272 (i386_thread_added): Mark the thread as needing to update irs
7273 debug registers.
7274 (the_low_target): Remove i386_set_thread_context and install
7275 i386_prepare_to_resume.
7276 * win32-low.c (win32_get_thread_context): Adjust.
7277 (win32_set_thread_context): Use SetThreadContext
7278 directly.
7279 (win32_prepare_to_resume): New function.
7280 (win32_require_context): New function, factored out from ...
7281 (thread_rec): ... this.
7282 (continue_one_thread): Call win32_prepare_to_resume on each thread
7283 we're about to continue.
7284 (win32_resume): Call win32_prepare_to_resume on the event thread.
7285 * win32-low.h (struct win32_thread_info)
7286 <debug_registers_changed>: New field.
7287 (struct win32_target_ops): Change prototype of set_thread_context,
7288 delete set_thread_context and add prepare_to_resume.
7289 (win32_require_context): New declaration.
7290
a442d071
GB
72912014-10-08 Gary Benson <gbenson@redhat.com>
7292
7293 * server.h: Do not include common-exceptions.h.
7294
6f1947e8
GB
72952014-10-08 Gary Benson <gbenson@redhat.com>
7296
7297 * server.h: Do not include cleanups.h.
7298
63b434a4
JH
72992014-09-30 James Hogan <james.hogan@imgtec.com>
7300
7301 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7302 mips64-dsp-linux.c.
7303
c4d9ceb6
YQ
73042014-09-23 Yao Qi <yao@codesourcery.com>
7305
7306 * linux-low.c (lp_status_maybe_breakpoint): New function.
7307 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7308 (count_events_callback): Likewise.
7309 (select_event_lwp_callback): Likewise.
7310 (cancel_breakpoints_callback): Likewise.
7311
89a5711c
DB
73122014-09-19 Don Breazeal <donb@codesourcery.com>
7313
7314 * linux-low.c (handle_extended_wait): Call
7315 linux_ptrace_get_extended_event.
7316 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7317 linux_is_extended_waitstatus.
7318
bffc0964
JB
73192014-09-16 Joel Brobecker <brobecker@adacore.com>
7320
7321 * Makefile.in (CPPFLAGS): Define.
7322 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7323 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7324
0bfdf32f
GB
73252014-09-16 Gary Benson <gbenson@redhat.com>
7326
7327 * inferiors.h (current_inferior): Renamed as...
7328 (current_thread): New variable. All uses updated.
7329 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7330 (maybe_move_out_of_jump_pad): Likewise.
7331 (cancel_breakpoint): Likewise.
7332 (linux_low_filter_event): Likewise.
7333 (wait_for_sigstop): Likewise.
7334 (linux_resume_one_lwp): Likewise.
7335 (need_step_over_p): Likewise.
7336 (start_step_over): Likewise.
7337 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7338 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7339 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7340 and save_inferior as saved_thread.
7341 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7342 saved_thread.
7343 (regcache_invalidate_thread): Likewise.
7344 * remote-utils.c (prepare_resume_reply): Likewise.
7345 * thread-db.c (thread_db_get_tls_address): Likewise.
7346 (disable_thread_event_reporting): Likewise.
7347 (remove_thread_event_breakpoints): Likewise.
7348 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7349 as saved_thread.
7350 * target.h (set_desired_inferior): Renamed as...
7351 (set_desired_thread): New declaration. All uses updated.
7352 * server.c (myresume): Updated comment to reference thread instead
7353 of inferior.
7354 (handle_serial_event): Likewise.
7355 (handle_target_event): Likewise.
7356
361c8ade
GB
73572014-09-12 Tom Tromey <tromey@redhat.com>
7358 Gary Benson <gbenson@redhat.com>
7359
7360 * regcache.h: Include common-regcache.h.
7361 (regcache_read_pc): Don't declare.
7362 * regcache.c (get_thread_regcache_for_ptid): New function.
7363
bd9269f7
GB
73642014-09-11 Tom Tromey <tromey@redhat.com>
7365 Gary Benson <gbenson@redhat.com>
7366
7367 * symbol.c: New file.
7368 * Makefile.in (SFILES): Add symbol.c.
7369 (OBS): Add symbol.o.
7370
f8c1d06b
GB
73712014-09-11 Gary Benson <gbenson@redhat.com>
7372
7373 * target.c (target_stop_ptid, target_continue_ptid): New
7374 functions.
7375
721ec300
GB
73762014-09-11 Tom Tromey <tromey@redhat.com>
7377 Gary Benson <gbenson@redhat.com>
7378
7379 * target.h: Include target/target.h.
7380 * target.c (target_read_memory, target_read_uint32)
7381 (target_write_memory): New functions.
7382
c5e92cca
GB
73832014-09-11 Gary Benson <gbenson@redhat.com>
7384
7385 * server.h (debug_hw_points): Don't declare.
7386 * server.c (debug_hw_points): Don't define. Replace all uses
7387 with show_debug_regs.
7388 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7389 all uses with show_debug_regs.
7390
2e4bb98a
EBM
73912014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7392
7393 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7394 endianness into account.
7395 (ppc_supply_ptrace_register): Likewise.
7396
ac740bc7
JH
73972014-09-03 James Hogan <james.hogan@imgtec.com>
7398
7399 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7400 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7401
97ea6506
GB
74022014-09-03 Gary Benson <gbenson@redhat.com>
7403
7404 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7405 ALL_DEBUG_ADDRESS_REGISTERS.
7406
df7e5265
GB
74072014-09-02 Gary Benson <gbenson@redhat.com>
7408
7409 * i386-low.h: Renamed as...
7410 * x86-low.h: New file. All type, function and variable name
7411 prefixes changed from "i386_" to "x86_". All references updated.
7412 * i386-low.c: Renamed as...
7413 * x86-low.c: New file. All type, function and variable name
7414 prefixes changed from "i386_" to "x86_". All references updated.
7415
ed859da7
GB
74162014-09-02 Gary Benson <gbenson@redhat.com>
7417
7418 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7419 (x86_linux_new_thread): Likewise.
7420
860789c7
GB
74212014-08-29 Gary Benson <gbenson@redhat.com>
7422
7423 * server.h (setjmp.h): Do not include.
7424 (toplevel): Do not declare.
7425 (common-exceptions.h): Include.
7426 (cleanups.h): Likewise.
7427 * server.c (toplevel): Do not define.
7428 (exit_code): New static global.
7429 (detach_or_kill_for_exit_cleanup): New function.
7430 (main): New function. Original main renamed to...
7431 (captured_main): New function.
7432 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7433
ff55e1b5
GB
74342014-08-29 Gary Benson <gbenson@redhat.com>
7435
7436 * Makefile.in (SFILES): Add common/common-exceptions.c.
7437 (OBS): Add common-exceptions.o.
7438 (common-exceptions.o): New rule.
7439 * utils.c (prepare_to_throw_exception): New function.
7440
e9bcb658
GB
74412014-08-29 Gary Benson <gbenson@redhat.com>
7442
7443 * config.in: Regenerate.
7444 * configure: Likewise.
7445
e3180625
GB
74462014-08-29 Gary Benson <gbenson@redhat.com>
7447
7448 * Makefile.in (SFILES): Add common/cleanups.c.
7449 (OBS): cleanups.o.
7450 (cleanups.o): New rule.
7451
e3d6ba5d
GB
74522014-08-29 Gary Benson <gbenson@redhat.com>
7453
7454 * utils.c (internal_vwarning): New function.
7455
7096e886
GB
74562014-08-28 Gary Benson <gbenson@redhat.com>
7457
7458 * utils.h (fatal): Remove declaration.
7459 * utils.c (fatal): Remove function.
7460
14ce3192
GB
74612014-08-28 Gary Benson <gbenson@redhat.com>
7462
7463 * tracepoint.c (gdb_agent_init): Replace fatal with
7464 perror_with_name.
7465 (initialize_tracepoint): Likewise.
7466
50278d59
GB
74672014-08-28 Gary Benson <gbenson@redhat.com>
7468
7469 * remote-utils.c (remote_prepare): Replace fatal with error.
7470
aa96c426
GB
74712014-08-28 Gary Benson <gbenson@redhat.com>
7472
7473 * linux-low.c (linux_async): Replace fatal with warning.
7474 Tidy up and return.
7475 (linux_start_non_stop): Return -1 if linux_async failed.
7476
f7160e97
GB
74772014-08-28 Gary Benson <gbenson@redhat.com>
7478
7479 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7480 gdb_assert.
7481 (i386_dr_low_get_addr): Remove vague comment.
7482 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7483 gdb_assert.
7484
38e08fca
GB
74852014-08-28 Gary Benson <gbenson@redhat.com>
7486
7487 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7488 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7489 internal_error.
7490 (linux_resume_one_lwp): Likewise.
7491 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7492 gdb_assert.
7493 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7494 with internal_error.
7495 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7496 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7497 (find_register_by_name): Replace fatal with internal_error.
7498 (find_regno): Likewise.
7499 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7500 * thread-db.c (thread_db_create_event): Likewise.
7501 (thread_db_load_search): Likewise.
7502 (try_thread_db_load_1): Likewise.
7503 * tracepoint.c (get_jump_space_head): Replace fatal with
7504 internal_error.
7505 (claim_trampoline_space): Likewise.
7506 (have_fast_tracepoint_trampoline_buffer): Likewise.
7507 (cmd_qtstart): Likewise.
7508 (stop_tracing): Likewise.
7509 (fast_tracepoint_collecting): Likewise.
7510 (target_malloc): Likewise.
7511 (download_tracepoint): Likewise.
7512 (download_trace_state_variables): Replace check with gdb_assert.
7513 (upload_fast_traceframes): Replace fatal with internal_error.
7514
34abf635
GB
75152014-08-19 Tom Tromey <tromey@redhat.com>
7516 Gary Benson <gbenson@redhat.com>
7517
7518 * Makefile.in (SFILES): Add common/common-debug.c.
7519 (OBS): Add common-debug.o.
7520 (common-debug.o): New rule.
7521 * debug.h (debug_printf): Don't declare.
7522 * debug.c (debug_printf): Renamed and rewritten as...
7523 (debug_vprintf): New function.
7524
f6e94d78
GB
75252014-08-19 Gary Benson <gbenson@redhat.com>
7526
7527 * utils.h: Do not include print-utils.h.
7528
9239eeab
GB
75292014-08-19 Tom Tromey <tromey@redhat.com>
7530 Gary Benson <gbenson@redhat.com>
7531
7532 * server.h: Add static assertion.
7533 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7534
ef87c8bb
GB
75352014-08-19 Tom Tromey <tromey@redhat.com>
7536 Gary Benson <gbenson@redhat.com>
7537
7538 * Makefile.in (SFILES): Add common/errors.c.
7539 (OBS): Add errors.o.
7540 (IPA_OBS): Add errors-ipa.o.
7541 (errors.o): New rule.
7542 (errors-ipa.o): Likewise.
7543 * utils.h (perror_with_name, error, warning): Don't declare.
7544 * utils.c (warning): Renamed and rewritten as...
7545 (vwarning): New function.
7546 (error): Renamed and rewritten as...
7547 (verror): New function.
7548 (internal_error): Renamed and rewritten as...
7549 (internal_verror): New function.
7550
bb974a24
GB
75512014-08-07 Gary Benson <gbenson@redhat.com>
7552
7553 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7554 * configure: Regenerate.
7555 * config.in: Likewise.
7556 * server.h: Do not include errno.h.
7557 * event-loop.c: Likewise.
7558 * hostio-errno.c: Likewise.
7559 * linux-low.c: Likewise.
7560 * remote-utils.c: Likewise.
7561 * spu-low.c: Likewise.
7562 * utils.c: Likewise.
7563 * gdbreplay.c: Unconditionally include errno.h.
7564
6d3d12eb
GB
75652014-08-07 Gary Benson <gbenson@redhat.com>
7566
7567 * server.h: Do not include string.h.
7568 * event-loop.c: Likewise.
7569 * linux-low.c: Likewise.
7570 * regcache.c: Likewise.
7571 * remote-utils.c: Likewise.
7572 * spu-low.c: Likewise.
7573 * utils.c: Likewise.
7574
dccbb609
GB
75752014-08-07 Gary Benson <gbenson@redhat.com>
7576
7577 * server.h: Do not include gdb_assert.h.
7578
e76df0d0
GB
75792014-08-07 Gary Benson <gbenson@redhat.com>
7580
7581 * server.h: Do not include common-utils.h.
7582
4cb9c816
GB
75832014-08-07 Gary Benson <gbenson@redhat.com>
7584
7585 * server.h: Do not include ptid.h.
7586 * notif.h: Likewise.
7587
3995eeee
GB
75882014-08-07 Gary Benson <gbenson@redhat.com>
7589
7590 * server.h: Do not include gdb_locale.h.
7591
cb9f1a9b
GB
75922014-08-07 Gary Benson <gbenson@redhat.com>
7593
7594 * server.h: Do not include gdb/signals.h.
7595 * win32-low.c: Likewise.
7596
a5fceff8
GB
75972014-08-07 Gary Benson <gbenson@redhat.com>
7598
7599 * server.h: Do not include pathmax.h.
7600
b9391142
GB
76012014-08-07 Gary Benson <gbenson@redhat.com>
7602
7603 * server.h: Do not include libiberty.h.
7604 * linux-bfin-low.c: Likewise.
7605
0e443c87
GB
76062014-08-07 Gary Benson <gbenson@redhat.com>
7607
7608 * server.h: Do not include ansidecl.h.
7609
8ebb3f56
GB
76102014-08-07 Gary Benson <gbenson@redhat.com>
7611
7612 * linux-x86-low.c: Do not include stddef.h.
7613 * lynx-ppc-low.c: Likewise.
7614 * tracepoint.c: Likewise.
7615
8980bdf6
GB
76162014-08-07 Gary Benson <gbenson@redhat.com>
7617
7618 * server.h: Do not include stdarg.h.
7619 * nto-low.c: Likewise.
7620
d7096f71
GB
76212014-08-07 Gary Benson <gbenson@redhat.com>
7622
7623 * server.h: Do not include stdlib.h.
7624 * inferiors.c: Likewise.
7625 * linux-low.c: Likewise.
7626 * regcache.c: Likewise.
7627 * spu-low.c: Likewise.
7628 * tracepoint.c: Likewise.
7629 * utils.c: Likewise.
7630
d02f550d
GB
76312014-08-07 Gary Benson <gbenson@redhat.com>
7632
7633 * server.h: Do not include stdio.h.
7634 * linux-low.c: Likewise.
7635 * remote-utils.c: Likewise.
7636 * spu-low.c: Likewise.
7637 * utils.c: Likewise.
7638 * wincecompat.c: Likewise.
7639
87f6c4e3
GB
76402014-08-06 Gary Benson <gbenson@redhat.com>
7641
7642 * regcache.c (init_register_cache): Move conditionals inside if.
7643
7089dca4
GB
76442014-08-06 Gary Benson <gbenson@redhat.com>
7645
7646 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7647
462f517e
GB
76482014-07-31 Gary Benson <gbenson@redhat.com>
7649
7650 * ax.h: Do not include server.h.
7651 * gdbthread.h: Likewise.
7652 * lynx-low.h: Likewise.
7653 * notif.h: Likewise.
7654
976411d6
GB
76552014-07-30 Gary Benson <gbenson@redhat.com>
7656
7657 * server.h: Include common-defs.h.
7658 Do not include config.h or build-gnulib-gdbserver/config.h.
7659
d41f6d8e
GB
76602014-07-30 Gary Benson <gbenson@redhat.com>
7661
7662 * hostio-errno.c: Move server.h to top of includes list.
7663 * inferiors.c: Likewise.
7664 * linux-x86-low.c: Likewise.
7665 * notif.c: Include server.h.
7666
314c6a35
TT
76672014-07-24 Tom Tromey <tromey@redhat.com>
7668 Gary Benson <gbenson@redhat.com>
7669
7670 * server.h (CORE_ADDR): Now unsigned.
7671
69ff6be5
PA
76722014-07-16 Pedro Alves <palves@redhat.com>
7673
7674 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7675
ce9e3fe7
PA
76762014-07-15 Pedro Alves <palves@redhat.com>
7677
7678 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7679 copy.
7680
e76126e8
PA
76812014-07-11 Pedro Alves <palves@redhat.com>
7682
7683 * linux-low.c (kill_wait_lwp): New function, based on
7684 kill_one_lwp_callback, but use my_waitpid directly.
7685 (kill_one_lwp_callback, linux_kill): Use it.
7686
8e9db26e
PA
76872014-06-23 Pedro Alves <palves@redhat.com>
7688
7689 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7690 before setting DR0..DR3.
7691
698b3e08
GB
76922014-06-20 Gary Benson <gbenson@redhat.com>
7693
7694 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7695 * configure: Regenerated.
7696 * config.in: Likewise.
7697
125f8a3d
GB
76982014-06-20 Gary Benson <gbenson@redhat.com>
7699
7700 * Makefile.in (SFILES): Update locations for files moved
7701 from common to nat.
7702 (object file files): Reordered.
7703
42995dbd
GB
77042014-06-20 Gary Benson <gbenson@redhat.com>
7705
7706 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7707 (i386_dr_low_set_addr): Likewise.
7708 (i386_dr_low_get_addr): Likewise.
7709 (i386_dr_low_can_set_control): Likewise.
7710 (i386_dr_low_set_control): Likewise.
7711 (i386_dr_low_get_control): Likewise.
7712 (i386_dr_low_get_status): Likewise.
7713 (i386_get_debug_register_length): Likewise.
7714 * linux-x86-low.c (i386_dr_low_set_addr):
7715 Changed signature. Made static.
7716 (i386_dr_low_get_addr): Likewise.
7717 (i386_dr_low_set_control): Likewise.
7718 (i386_dr_low_get_control): Likewise.
7719 (i386_dr_low_get_status): Likewise.
7720 (i386_dr_low): New global variable.
7721 * win32-i386-low.c (i386_dr_low_set_addr):
7722 Changed signature. Made static.
7723 (i386_dr_low_get_addr): Likewise.
7724 (i386_dr_low_set_control): Likewise.
7725 (i386_dr_low_get_control): Likewise.
7726 (i386_dr_low_get_status): Likewise.
7727 (i386_dr_low): New global variable.
7728
e1d2394b
MS
77292014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7730
7731 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7732 * Makefile.in (AR, AR_FLAGS): Define.
7733 * configure: Regenerate.
7734
3a8ee006
GB
77352014-06-19 Gary Benson <gbenson@redhat.com>
7736
7737 * Makefile.in (i386-dregs.o): New rule.
7738 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7739 * i386-low.c (target.h): Remove include.
7740 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7741 (DR_CONTROL_SHIFT): Likewise.
7742 (DR_CONTROL_SIZE): Likewise.
7743 (DR_RW_EXECUTE): Likewise.
7744 (DR_RW_WRITE): Likewise.
7745 (DR_RW_READ): Likewise.
7746 (DR_RW_IORW): Likewise.
7747 (DR_LEN_1): Likewise.
7748 (DR_LEN_2): Likewise.
7749 (DR_LEN_4): Likewise.
7750 (DR_LEN_8): Likewise.
7751 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7752 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7753 (DR_ENABLE_SIZE): Likewise.
7754 (DR_LOCAL_SLOWDOWN): Likewise.
7755 (DR_GLOBAL_SLOWDOWN): Likewise.
7756 (DR_CONTROL_RESERVED): Likewise.
7757 (I386_DR_CONTROL_MASK): Likewise.
7758 (I386_DR_VACANT): Likewise.
7759 (I386_DR_LOCAL_ENABLE): Likewise.
7760 (I386_DR_GLOBAL_ENABLE): Likewise.
7761 (I386_DR_DISABLE): Likewise.
7762 (I386_DR_SET_RW_LEN): Likewise.
7763 (I386_DR_GET_RW_LEN): Likewise.
7764 (I386_DR_WATCH_HIT): Likewise.
7765 (i386_wp_op_t): Likewise.
7766 (i386_show_dr): Likewise.
7767 (i386_length_and_rw_bits): Likewise.
7768 (i386_insert_aligned_watchpoint): Likewise.
7769 (i386_remove_aligned_watchpoint): Likewise.
7770 (i386_handle_nonaligned_watchpoint): Likewise.
7771 i386_update_inferior_debug_regs(): Likewise.
7772 (i386_dr_insert_watchpoint): Likewise.
7773 (i386_dr_remove_watchpoint): Likewise.
7774 (i386_dr_region_ok_for_watchpoint): Likewise.
7775 (i386_dr_stopped_data_address): Likewise.
7776 (i386_dr_stopped_by_watchpoint): Likewise.
7777
8f26655c
GB
77782014-06-19 Gary Benson <gbenson@redhat.com>
7779
7780 * i386-low.c (i386_dr_show): Renamed to
7781 i386_show_dr and made static. All uses updated.
7782 (i386_dr_length_and_rw_bits): Renamed to
7783 i386_length_and_rw_bits and made static.
7784 All uses updated.
7785 (i386_dr_insert_aligned_watchpoint): Renamed to
7786 i386_insert_aligned_watchpoint and made static.
7787 All uses updated.
7788 (i386_dr_remove_aligned_watchpoint): Renamed to
7789 i386_remove_aligned_watchpoint and made static.
7790 All uses updated.
7791 (i386_dr_update_inferior_debug_regs): Renamed to
7792 i386_update_inferior_debug_regs and made static.
7793 All uses updated.
7794
b9228891
GB
77952014-06-18 Gary Benson <gbenson@redhat.com>
7796
5171def3
GB
7797 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7798 (i386_dr_low_can_set_control): Likewise.
7799 (i386_get_debug_register_length): Likewise.
7800 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7801 (i386_dr_low_can_set_control): Likewise.
7802 (i386_get_debug_register_length): Likewise.
7803
78042014-06-17 Gary Benson <gbenson@redhat.com>
7805
b9228891
GB
7806 * i386-low.h (i386-dregs.h): New include.
7807 (DR_FIRSTADDR): Now in i386-dregs.h.
7808 (DR_LASTADDR): Likewise.
7809 (DR_NADDR): Likewise.
7810 (DR_STATUS): Likewise.
7811 (DR_CONTROL): Likewise.
7812 (i386_debug_reg_state): Likewise.
7813 (i386_dr_insert_watchpoint): Likewise.
7814 (i386_dr_remove_watchpoint): Likewise.
7815 (i386_dr_region_ok_for_watchpoint): Likewise.
7816 (i386_dr_stopped_data_address): Likewise.
7817 (i386_dr_stopped_by_watchpoint): Likewise.
7818 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7819
4be83cc2
GB
78202014-06-18 Gary Benson <gbenson@redhat.com>
7821
7822 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7823 i386_dr_insert_watchpoint.
7824 (i386_low_remove_watchpoint): Renamed to
7825 i386_dr_remove_watchpoint.
7826 (i386_low_region_ok_for_watchpoint): Renamed to
7827 i386_dr_region_ok_for_watchpoint.
7828 (i386_low_stopped_data_address): Renamed to
7829 i386_dr_stopped_data_address.
7830 (i386_low_stopped_by_watchpoint): Renamed to
7831 i386_dr_stopped_by_watchpoint.
7832 * i386-low.c (i386_show_dr): Renamed to
7833 i386_dr_show and made nonstatic. All uses updated.
7834 (i386_length_and_rw_bits): Renamed to
7835 i386_dr_length_and_rw_bits and made nonstatic.
7836 All uses updated.
7837 (i386_insert_aligned_watchpoint): Renamed to
7838 i386_dr_insert_aligned_watchpoint and made nonstatic.
7839 All uses updated.
7840 (i386_remove_aligned_watchpoint): Renamed to
7841 i386_dr_remove_aligned_watchpoint and made nonstatic.
7842 All uses updated.
7843 (i386_update_inferior_debug_regs): Renamed to
7844 i386_dr_update_inferior_debug_regs and made nonstatic.
7845 All uses updated.
7846 (i386_low_insert_watchpoint): Renamed to
7847 i386_dr_insert_watchpoint. All uses updated.
7848 (i386_low_remove_watchpoint): Renamed to
7849 i386_dr_remove_watchpoint. All uses updated.
7850 (i386_low_region_ok_for_watchpoint): Renamed to
7851 i386_dr_region_ok_for_watchpoint. All uses updated.
7852 (i386_low_stopped_data_address): Renamed to
7853 i386_dr_stopped_data_address. All uses updated.
7854 (i386_low_stopped_by_watchpoint): Renamed to
7855 i386_dr_stopped_by_watchpoint. All uses updated.
7856
131aa0d4
GB
78572014-06-18 Gary Benson <gbenson@redhat.com>
7858
7859 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7860 (i386_dr_low_can_set_control): Likewise.
7861 (i386_insert_aligned_watchpoint): New check.
7862
d9305f7f
GB
78632014-06-18 Gary Benson <gbenson@redhat.com>
7864
7865 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7866 Renamed to state.
7867
e927c9fc
GB
78682014-06-18 Gary Benson <gbenson@redhat.com>
7869
7870 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7871 instead of fatal and error.
7872 (i386_handle_nonaligned_watchpoint): Likewise.
7873
1b6d4134
GB
78742014-06-18 Gary Benson <gbenson@redhat.com>
7875
7876 * i386-low.c (i386_get_debug_register_length): New macro.
7877 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7878 (i386_show_dr): Use debug_printf instead of fprintf. Use
7879 phex to format values.
7880
6e62758f
GB
78812014-06-18 Gary Benson <gbenson@redhat.com>
7882
7883 * i386-low.h: Comment changes.
7884 * i386-low.c: Likewise.
7885
fc6e2f03
GB
78862014-06-18 Gary Benson <gbenson@redhat.com>
7887
7888 * i386-low.c: Whitespace changes.
7889
f9d1eeed
TT
78902014-06-12 Tom Tromey <tromey@redhat.com>
7891
7892 * utils.c (freeargv): Remove.
7893
0b04e523
TT
78942014-06-12 Tom Tromey <tromey@redhat.com>
7895
7896 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7897 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7898 (parse_debug_format_options): Likewise.
7899 (gdbserver_usage): Likewise.
7900 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7901 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7902 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7903 against libiberty.
7904 ($(LIBGNU)): Depend on libiberty.
7905 (all-lib): Recurse into all subdirs.
7906 (install-only): Invoke "install" target in subdirs.
7907 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7908 targets.
7909 * configure: Rebuild.
7910 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7911 for vasprintf, vsnprintf, or gettimeofday.
7912 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7913 srv_tgtobj.
7914
270c9937
JB
79152014-06-05 Joel Brobecker <brobecker@adacore.com>
7916
7917 * development.sh: Delete.
7918 * Makefile.in (config.status): Adjust dependency on development.sh.
7919 * configure.ac: Adjust development.sh source call.
7920 * configure: Regenerate.
7921
0a261ed8
PA
79222014-06-02 Pedro Alves <palves@redhat.com>
7923
7924 * ax.c (gdb_free_agent_expr): New function.
7925 * ax.h (gdb_free_agent_expr): New declaration.
7926 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7927 list.
7928 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7929 static.
7930 (clear_breakpoint_conditions_and_commands): New function.
7931 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7932 (clear_breakpoint_conditions_and_commands): New declaration.
7933
e9dae05e
RR
79342014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7935
7936 * linux-aarch64-low.c (asm/ptrace.h): Include.
7937
5876f503
JK
79382014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7939
7940 Fix TLS access for -static -pthread.
7941 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7942 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7943 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7944
802e8e6d
PA
79452014-05-20 Pedro Alves <palves@redhat.com>
7946
7947 * linux-aarch64-low.c (aarch64_insert_point)
7948 (aarch64_remove_point): No longer check whether the type is
7949 supported here. Adjust to new interface.
7950 (the_low_target): Install aarch64_supports_z_point_type as
7951 supports_z_point_type method.
7952 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7953 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7954 instead of a Z packet char. Adjust.
7955 (arm_supports_z_point_type): New function.
7956 (arm_insert_point, arm_remove_point): Adjust to new interface.
7957 (the_low_target): Install arm_supports_z_point_type.
7958 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7959 (cris_insert_point, cris_remove_point): Adjust to new interface.
7960 Don't check whether the type is supported here.
7961 (the_low_target): Install cris_supports_z_point_type.
7962 * linux-low.c (linux_supports_z_point_type): New function.
7963 (linux_insert_point, linux_remove_point): Adjust to new interface.
7964 * linux-low.h (struct linux_target_ops) <insert_point,
7965 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7966 raw_breakpoint pointer parameter.
7967 <supports_z_point_type>: New method.
7968 * linux-mips-low.c (mips_supports_z_point_type): New function.
7969 (mips_insert_point, mips_remove_point): Adjust to new interface.
7970 Use mips_supports_z_point_type.
7971 (the_low_target): Install mips_supports_z_point_type.
7972 * linux-ppc-low.c (the_low_target): Install NULL as
7973 supports_z_point_type method.
7974 * linux-s390-low.c (the_low_target): Install NULL as
7975 supports_z_point_type method.
7976 * linux-sparc-low.c (the_low_target): Install NULL as
7977 supports_z_point_type method.
7978 * linux-x86-low.c (x86_supports_z_point_type): New function.
7979 (x86_insert_point): Adjust to new insert_point interface. Use
7980 insert_memory_breakpoint. Adjust to new
7981 i386_low_insert_watchpoint interface.
7982 (x86_remove_point): Adjust to remove_point interface. Use
7983 remove_memory_breakpoint. Adjust to new
7984 i386_low_remove_watchpoint interface.
7985 (the_low_target): Install x86_supports_z_point_type.
7986 * lynx-low.c (lynx_target_ops): Install NULL as
7987 supports_z_point_type callback.
7988 * nto-low.c (nto_supports_z_point_type): New.
7989 (nto_insert_point, nto_remove_point): Adjust to new interface.
7990 (nto_target_ops): Install nto_supports_z_point_type.
7991 * mem-break.c: Adjust intro comment.
7992 (struct raw_breakpoint) <raw_type, size>: New fields.
7993 <inserted>: Update comment.
7994 <shlib_disabled>: Delete field.
7995 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7996 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7997 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7998 (raw_bkpt_type_to_target_hw_bp_type): New function.
7999 (find_enabled_raw_code_breakpoint_at): New function.
8000 (find_raw_breakpoint_at): New type and size parameters. Use them.
8001 (insert_memory_breakpoint): New function, based off
8002 set_raw_breakpoint_at.
8003 (remove_memory_breakpoint): New function.
8004 (set_raw_breakpoint_at): Reimplement.
8005 (set_breakpoint): New, based on set_breakpoint_at.
8006 (set_breakpoint_at): Reimplement.
8007 (delete_raw_breakpoint): Go through the_target->remove_point
8008 instead of assuming memory breakpoints.
8009 (find_gdb_breakpoint_at): Delete.
8010 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8011 (find_gdb_breakpoint): New function.
8012 (set_gdb_breakpoint_at): Delete.
8013 (z_type_supported): New function.
8014 (set_gdb_breakpoint_1): New function, loosely based off
8015 set_gdb_breakpoint_at.
8016 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8017 (delete_gdb_breakpoint_at): Delete.
8018 (delete_gdb_breakpoint_1): New function, loosely based off
8019 delete_gdb_breakpoint_at.
8020 (delete_gdb_breakpoint): New function.
8021 (clear_gdb_breakpoint_conditions): Rename to ...
8022 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8023 breakpoint.
8024 (add_condition_to_breakpoint): Make static.
8025 (add_breakpoint_condition): Take a struct breakpoint pointer
8026 instead of an address. Adjust.
8027 (gdb_condition_true_at_breakpoint): Rename to ...
8028 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8029 z_type parameter.
8030 (gdb_condition_true_at_breakpoint): Reimplement.
8031 (add_breakpoint_commands): Take a struct breakpoint pointer
8032 instead of an address. Adjust.
8033 (gdb_no_commands_at_breakpoint): Rename to ...
8034 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8035 parameter. Return true if no breakpoint was found. Change debug
8036 output.
8037 (gdb_no_commands_at_breakpoint): Reimplement.
8038 (run_breakpoint_commands): Rename to ...
8039 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8040 and change return type to boolean.
8041 (run_breakpoint_commands): New function.
8042 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8043 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8044 breakpoint. Go through the_target->remove_point instead of
8045 assuming memory breakpoint.
8046 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8047 software and hardware breakpoints.
8048 (reinsert_raw_breakpoint): Go through the_target->insert_point
8049 instead of assuming memory breakpoint.
8050 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8051 software and hardware breakpoints.
8052 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8053 Check both software and hardware breakpoints.
8054 (validate_inserted_breakpoint): Assert the breakpoint is a
8055 software breakpoint. Set the inserted flag to -1 instead of
8056 setting shlib_disabled.
8057 (delete_disabled_breakpoints): Adjust.
8058 (validate_breakpoints): Only validate software breakpoints.
8059 Adjust to inserted flag change.
8060 (check_mem_read, check_mem_write): Skip breakpoint types other
8061 than software breakpoints. Adjust to inserted flag change.
8062 * mem-break.h (enum raw_bkpt_type): New enum.
8063 (raw_breakpoint, struct process_info): Forward declare.
8064 (Z_packet_to_target_hw_bp_type): Delete declaration.
8065 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8066 (set_gdb_breakpoint, delete_gdb_breakpoint)
8067 (clear_breakpoint_conditions): New declarations.
8068 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8069 (breakpoint_inserted_here): Update comment.
8070 (add_breakpoint_condition, add_breakpoint_commands): Replace
8071 address parameter with a breakpoint pointer parameter.
8072 (gdb_breakpoint_here): Update comment.
8073 (delete_gdb_breakpoint_at): Delete.
8074 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8075 * server.c (process_point_options): Take a struct breakpoint
8076 pointer instead of an address. Adjust.
8077 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8078 delete_gdb_breakpoint.
8079 * spu-low.c (spu_target_ops): Install NULL as
8080 supports_z_point_type method.
8081 * target.h: Include mem-break.h.
8082 (struct target_ops) <prepare_to_access_memory>: Update comment.
8083 <supports_z_point_type>: New field.
8084 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8085 instead of a char. Also take a raw breakpoint pointer.
8086 * win32-arm-low.c (the_low_target): Install NULL as
8087 supports_z_point_type.
8088 * win32-i386-low.c (i386_supports_z_point_type): New function.
8089 (i386_insert_point, i386_remove_point): Adjust to new interface.
8090 (the_low_target): Install i386_supports_z_point_type.
8091 * win32-low.c (win32_supports_z_point_type): New function.
8092 (win32_insert_point, win32_remove_point): Adjust to new interface.
8093 (win32_target_ops): Install win32_supports_z_point_type.
8094 * win32-low.h (struct win32_target_ops):
8095 <supports_z_point_type>: New method.
8096 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8097 instead of a char. Also take a raw breakpoint pointer.
8098
932539e3
PA
80992014-05-20 Pedro Alves <palves@redhat.com>
8100
8101 * mem-break.h: Include break-common.h.
8102 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8103 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8104 (Z_packet_to_target_hw_bp_type): New declaration.
8105 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8106 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8107 (Z_PACKET_ACCESS_WP): Delete macros.
8108 (Z_packet_to_hw_type): Delete function.
8109 * i386-low.h: Don't include break-common.h here.
8110 (Z_packet_to_hw_type): Delete declaration.
8111 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8112 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8113 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8114 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8115 * linux-aarch64-low.c: Don't include break-common.h here.
8116 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8117 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8118 (Z_packet_to_target_hw_bp_type): Delete function.
8119 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8120 function.
8121 (mips_insert_point, mips_remove_point): Use
8122 Z_packet_to_target_hw_bp_type.
8123
4ff0d3d8
PA
81242014-05-20 Pedro Alves <palves@redhat.com>
8125
8126 * linux-aarch64-low.c: Include break-common.h.
8127 (enum target_point_type): Delete.
8128 (Z_packet_to_point_type): Rename to ...
8129 (Z_packet_to_target_hw_bp_type): ... this, and return a
8130 target_hw_bp_type instead.
8131 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8132 instead of an enum target_point_type.
8133 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8134 breakpoint type.
8135 (aarch64_dr_state_insert_one_point)
8136 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8137 (aarch64_handle_aligned_watchpoint)
8138 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8139 Take an enum target_hw_bp_type instead of an enum
8140 target_point_type.
8141 (aarch64_supports_z_point_type): New function.
8142 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8143 use Z_packet_to_target_hw_bp_type.
8144
786dc519
JB
81452014-05-20 Joel Brobecker <brobecker@adacore.com>
8146
8147 * configure.ac: Only use -Werror by default when DEVELOPMENT
8148 is true.
8149 * configure: Regenerate.
8150
9e0aa64f
JK
81512014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8152
8153 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8154 * linux-x86-low.c (X86_64_USER_REGS): New.
8155 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8156
2b577b92
YQ
81572014-04-28 Yao Qi <yao@codesourcery.com>
8158
8159 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8160 name.
8161
94611da2
PA
81622014-04-25 Pedro Alves <palves@redhat.com>
8163
8164 PR server/16255
8165 * linux-low.c (linux_attach_fail_reason_string): New function.
8166 (linux_attach_lwp): Delete.
8167 (linux_attach_lwp_1): Rename to ...
8168 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8169 argument. Remove "initial" parameter. Return int instead of
8170 void. Don't error or warn here.
8171 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8172 failure to attach to the tgid. Call warning when failing to
8173 attach to an lwp.
8174 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8175 argument. Remove "initial" parameter. Return int instead of
8176 void. Don't error or warn here.
8177 (linux_attach_fail_reason_string): New declaration.
8178 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8179 interface change. Use linux_attach_fail_reason_string.
8180
01f9f808
MS
81812014-04-24 Michael Sturm <michael.sturm@mintel.com>
8182 Walfred Tedeschi <walfred.tedeschi@intel.com>
8183
8184 * Makefile.in: Added rules to handle new files
8185 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8186 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8187 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8188 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8189 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8190 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8191 x32-avx512-linux.o.
8192 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8193 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8194 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8195 i386/x32-avx512.xml.
8196 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8197 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8198 i386/x32-avx512-linux.xml.
8199 * i387-fp.c (num_avx512_k_registers): New constant for number
8200 of K registers.
8201 (num_avx512_zmmh_low_registers): New constant for number of
8202 lower ZMM registers (0-15).
8203 (num_avx512_zmmh_high_registers): New constant for number of
8204 higher ZMM registers (16-31).
8205 (num_avx512_ymmh_registers): New contant for number of higher
8206 YMM registers (ymm16-31 added by avx521 on x86_64).
8207 (num_avx512_xmm_registers): New constant for number of higher
8208 XMM registers (xmm16-31 added by AVX512 on x86_64).
8209 (struct i387_xsave): Add space for AVX512 registers.
8210 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8211 Add code to handle AVX512 registers.
8212 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8213 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8214 prototypei from generated file.
8215 (tdesc_amd64_avx512_linux): Likewise.
8216 (init_registers_x32_avx512_linux): Likewise.
8217 (tdesc_x32_avx512_linux): Likewise.
8218 (init_registers_i386_avx512_linux): Likewise.
8219 (tdesc_i386_avx512_linux): Likewise.
8220 (x86_64_regmap): Add AVX512 registers.
8221 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8222 mask.
8223 (initialize_low_arch): Add code to initialize AVX512 registers.
8224
51aa91f9
PA
82252014-04-23 Pedro Alves <palves@redhat.com>
8226
8227 * mem-break.c (find_gdb_breakpoint_at): Make static.
8228 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8229
a4165e94
PA
82302014-04-23 Pedro Alves <palves@redhat.com>
8231
8232 * i386-low.c: Don't include break-common.h here.
8233 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8234 prototype to take target_hw_bp_type as argument instead of a Z
8235 packet char.
8236 * i386-low.h: Include break-common.h here.
8237 (Z_packet_to_hw_type): Declare.
8238 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8239 prototypes.
8240 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8241 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8242 (x86_remove_point): Convert the packet number to a
8243 target_hw_bp_type before calling i386_low_remove_watchpoint.
8244 * win32-i386-low.c (i386_insert_point): Convert the packet number
8245 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8246 (i386_remove_point): Convert the packet number to a
8247 target_hw_bp_type before calling i386_low_remove_watchpoint.
8248
b8acf843
PA
82492014-04-23 Pedro Alves <palves@redhat.com>
8250
8251 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8252
d708bcd1
PA
82532014-04-10 Pedro Alves <palves@redhat.com>
8254
8255 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8256 Check if the condition or command is NULL before checking if the
8257 breakpoint is known. On success, return true.
8258 * mem-break.h (add_breakpoint_condition): Document return.
8259 (add_breakpoint_commands): Add describing comment.
8260 * server.c (skip_to_semicolon): New function.
8261 (process_point_options): Use it.
8262
2eec7d5b
PA
82632014-04-09 Pedro Alves <palves@redhat.com>
8264
8265 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8266 to lwpid_of.
8267
fa96cb38
PA
82682014-02-27 Pedro Alves <palves@redhat.com>
8269
8270 PR 12702
8271 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8272 macros.
8273 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8274 output.
8275 (last_thread_of_process_p): Take a PID argument instead of a
8276 thread pointer.
8277 (linux_wait_for_lwp): Delete.
8278 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8279 functions.
8280 (linux_low_filter_event): New function, party factored out from
8281 linux_wait_for_event.
8282 (linux_wait_for_event): Rename to ...
8283 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8284 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8285 sigsuspend. Check for zombie leaders.
8286 (linux_wait_for_event): Reimplement as wrapper around
8287 linux_wait_for_event_filtered.
8288 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8289 a normal or signal exit is seen, it's the whole process exiting.
8290 (wait_for_sigstop): No longer a for_each_inferior callback.
8291 Rewrite on top of linux_wait_for_event_filtered.
8292 (stop_all_lwps): Call wait_for_sigstop directly.
8293 * server.c (resume, handle_target_event): Handle
8294 TARGET_WAITKIND_NO_RESUMED.
8295
d763de10
JB
82962014-02-26 Joel Brobecker <brobecker@adacore.com>
8297
8298 * win32-low.c (psapi_get_dll_name,
8299 * win32_CreateToolhelp32Snapshot): Delete.
8300 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8301 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8302 Delete.
8303 (handle_load_dll): Add function description.
8304 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8305
850a0f76
JB
83062014-02-26 Joel Brobecker <brobecker@adacore.com>
8307
8308 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8309 Add comment.
8310 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8311 base address when calling win32_add_one_solib.
8312 (handle_load_dll): Delete local variable load_addr.
8313 Remove 0x1000 offset applied to DLL base address when calling
8314 win32_add_one_solib.
8315 (handle_unload_dll): Add comment.
8316
f25b3fc3
JB
83172014-02-26 Joel Brobecker <brobecker@adacore.com>
8318
8319 * win32-low.c (win32_add_all_dlls): Renames
8320 win32_ensure_ntdll_loaded. Rewrite function documentation.
8321 Adjust implementation to always load all DLLs.
8322 Add 0x1000 offset to DLL base address when calling
8323 win32_add_one_solib.
8324 (child_initialization_done): New static global.
8325 (do_initial_child_stuff): Set child_initialization_done to
8326 zero during child initialization, and 1 after. Replace call
8327 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8328 Add comment.
8329 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8330 (handle_unload_dll): Add function documentation.
8331 (get_child_debug_event): Ignore load and unload DLL events
8332 during child initialization.
8333
d86d4aaf
DE
83342014-02-20 Doug Evans <dje@google.com>
8335
3bc32da3 8336 Remove global all_lwps.
d86d4aaf
DE
8337 * inferiors.h (ptid_of): Move here from linux-low.h.
8338 (pid_of, lwpid_of): Ditto.
8339 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8340 parameter is a struct thread_info * now.
8341 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8342 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8343 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8344 directly.
8345 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8346 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8347 * linux-arm-low.c (update_registers_callback): Update, "entry"
8348 parameter is a struct thread_info * now.
8349 Fetch lwpid from current_inferior directly.
8350 (arm_insert_point): Pass &all_threads to find_inferior instead of
8351 &all_lwps.
8352 (arm_remove_point): Ditto.
8353 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8354 (arm_prepare_to_resume): Fetch pid from thread.
8355 (arm_read_description): Fetch lwpid from current_inferior directly.
8356 * linux-low.c (all_lwps): Delete.
8357 (delete_lwp): Delete call to remove_inferior.
8358 (handle_extended_wait): Fetch lwpid from thread.
8359 (add_lwp): Don't set lwp->entry.id. Remove call to
8360 add_inferior_to_list.
8361 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8362 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8363 (kill_one_lwp_callback): Ditto.
8364 (linux_kill): Don't dereference NULL pointer.
8365 Fetch ptid,lwpid from thread.
8366 (get_detach_signal): Fetch ptid from thread.
8367 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8368 Simplify call to regcache_invalidate_thread.
8369 (delete_lwp_callback): Update, "entry" parameter is a
8370 struct thread_info * now. Fetch pid from thread.
8371 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8372 (status_pending_p_callback): Update, "entry" parameter is a
8373 struct thread_info * now. Fetch ptid from thread.
8374 (find_lwp_pid): Update, "entry" parameter is a
8375 struct thread_info * now.
8376 (linux_wait_for_lwp): Fetch pid from thread.
8377 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8378 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8379 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8380 (dequeue_one_deferred_signal): Ditto.
8381 (cancel_breakpoint): Fetch ptid from current_inferior.
8382 (linux_wait_for_event): Pass &all_threads to find_inferior,
8383 not &all_lwps. Fetch ptid, lwpid from thread.
8384 (count_events_callback): Update, "entry" parameter is a
8385 struct thread_info * now.
8386 (select_singlestep_lwp_callback): Ditto.
8387 (select_event_lwp_callback): Ditto.
8388 (cancel_breakpoints_callback): Ditto.
8389 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8390 not &all_lwps.
8391 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8392 (unsuspend_one_lwp): Update, "entry" parameter is a
8393 struct thread_info * now.
8394 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8395 not &all_lwps.
8396 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8397 Fetch lwpid from thread, not lwp.
8398 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8399 Pass &all_threads to find_inferior, not &all_lwps.
8400 (send_sigstop): Fetch lwpid from thread, not lwp.
8401 (send_sigstop_callback): Update, "entry" parameter is a
8402 struct thread_info * now.
8403 (suspend_and_send_sigstop_callback): Ditto.
8404 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8405 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8406 struct thread_info * now.
8407 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8408 from thread, lwp.
8409 (lwp_running): Update, "entry" parameter is a
8410 struct thread_info * now.
8411 (stop_all_lwps): Fetch ptid from thread.
8412 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8413 (linux_resume_one_lwp): Fetch lwpid from thread.
8414 (linux_set_resume_request): Update, "entry" parameter is a
8415 struct thread_info * now. Fetch pid, lwpid from thread.
8416 (resume_status_pending_p): Update, "entry" parameter is a
8417 struct thread_info * now.
8418 (need_step_over_p): Ditto. Fetch lwpid from thread.
8419 (start_step_over): Fetch lwpid from thread.
8420 (linux_resume_one_thread): Update, "entry" parameter is a
8421 struct thread_info * now. Fetch lwpid from thread.
8422 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8423 (proceed_one_lwp): Update, "entry" parameter is a
8424 struct thread_info * now. Fetch lwpid from thread.
8425 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8426 struct thread_info * now.
8427 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8428 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8429 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8430 directly.
8431 (regsets_store_inferior_registers): Ditto.
8432 (fetch_register, store_register): Ditto.
8433 (linux_read_memory, linux_write_memory): Ditto.
8434 (linux_request_interrupt): Ditto.
8435 (linux_read_auxv): Ditto.
8436 (linux_xfer_siginfo): Ditto.
8437 (linux_qxfer_spu): Ditto.
8438 (linux_qxfer_libraries_svr4): Ditto.
8439 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8440 moved to inferiors.h.
8441 (get_lwp): Delete.
8442 (get_thread_lwp): Update.
8443 (struct lwp_info): Delete member "entry". Simplify comment for
8444 member "thread".
8445 (all_lwps): Delete.
8446 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8447 current_inferior directly.
8448 (update_watch_registers_callback): Update, "entry" parameter is a
8449 struct thread_info * now. Fetch pid from thread.
8450 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8451 (mips_insert_point): Fetch lwpid from current_inferior.
8452 Pass &all_threads to find_inferior, not &all_lwps.
8453 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8454 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8455 directly.
8456 (mips_stopped_data_address): Ditto.
8457 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8458 directly.
8459 * linux-tile-low.c (tile_arch_setup): Ditto.
8460 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8461 (update_debug_registers_callback): Update, "entry" parameter is a
8462 struct thread_info * now. Fetch pid from thread.
8463 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8464 Pass &all_threads to find_inferior, not &all_lwps.
8465 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8466 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8467 Pass &all_threads to find_inferior, not &all_lwps.
8468 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8469 (i386_dr_low_get_status): Ditto.
8470 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8471 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8472 (x86_linux_read_description): Ditto.
8473 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8474
3b8361aa
DE
84752014-02-20 Doug Evans <dje@google.com>
8476
8477 * inferiors.c (get_first_inferior): Fix buglet.
8478
f7667f0d
DE
84792014-02-19 Doug Evans <dje@google.com>
8480
8481 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8482 * inferiors.c (add_thread): Change result type to struct thread_info *.
8483 All callers updated.
8484 (add_lwp): Call add_thread here instead of in callers.
8485 All callers updated.
8486 * linux-low.h (get_lwp_thread): Rewrite.
8487 (struct lwp_info): New member "thread".
8488
b3312d80
DE
84892014-02-19 Doug Evans <dje@google.com>
8490
8491 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8492 All callers updated.
8493
ecc6f45c
DE
84942014-02-19 Doug Evans <dje@google.com>
8495
8496 * inferiors.c (add_thread): Fix whitespace.
8497
649ebbca
DE
84982014-02-19 Doug Evans <dje@google.com>
8499
8500 * dll.c (clear_dlls): Replace accessing list implemention details
8501 with API function.
8502 * gdbthread.h (get_first_thread): Declare.
8503 * inferiors.c (for_each_inferior_with_data): New function.
8504 (get_first_thread): New function.
8505 (find_thread_ptid): Simplify.
8506 (get_first_inferior): New function.
8507 (clear_list): Delete.
8508 (one_inferior_p): New function.
8509 (clear_inferior_list): New function.
8510 (clear_inferiors): Update.
8511 * inferiors.h (for_each_inferior_with_data): Declare.
8512 (clear_inferior_list): Declare.
8513 (one_inferior_p): Declare.
8514 (get_first_inferior): Declare.
8515 * linux-low.c (linux_wait_for_event): Replace accessing list
8516 implemention details with API function.
8517 * server.c (target_running): Ditto.
8518 (accumulate_file_name_length): New function.
8519 (emit_dll_description): New function.
8520 (handle_qxfer_libraries): Replace accessing list implemention
8521 details with API function.
8522 (handle_qxfer_threads_worker): New function.
8523 (handle_qxfer_threads_proper): Replace accessing list implemention
8524 details with API function.
8525 (handle_query): Ditto.
8526 (visit_actioned_threads_callback_ftype): New typedef.
8527 (visit_actioned_threads_data): New struct.
8528 (visit_actioned_threads): Rewrite to be find_inferior callback.
8529 (resume): Call find_inferior.
8530 (handle_status): Replace accessing list implemention
8531 details with API function.
8532 (process_serial_event): Replace accessing list implemention details
8533 with API function.
8534 * target.c (set_desired_inferior): Replace accessing list implemention
8535 details with API function.
8536 * tracepoint.c (same_process_p): New function.
8537 (gdb_agent_about_to_close): Replace accessing list implemention
8538 details with API function.
8539 * win32-low.c (child_delete_thread): Replace accessing list
8540 implemention details with API function.
8541 (match_dll_by_basename): New function.
8542 (dll_is_loaded_by_basename): New function.
8543 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8544 details call to dll_is_loaded_by_basename.
8545
80894984
DE
85462014-02-19 Doug Evans <dje@google.com>
8547
8548 * dll.h (struct dll_info): Add comment.
8549 * gdbthread.h (struct thread_info): Add comment.
8550 (current_ptid): Simplify.
8551 * inferiors.c (add_process): Update.
8552 (remove_process): Update.
8553 * inferiors.h (struct process_info): Rename member "head" to "entry".
8554 * linux-low.c (delete_lwp): Update.
8555 (add_lwp): Update.
8556 (last_thread_of_process_p): Update.
8557 (kill_one_lwp_callback, linux_kill): Update.
8558 (status_pending_p_callback): Update.
8559 (wait_for_sigstop): Update. Simplify read of ptid.
8560 (start_step_over): Update.
8561 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8562 (get_lwp_thread): Update.
8563 (struct lwp_info): Rename member "head" to "entry".
8564 * regcache.h (inferior_list_entry): Delete.
8565 * server.c (kill_inferior_callback): Update.
8566 (detach_or_kill_inferior_callback): Update.
8567 (print_started_pid): Update.
8568 (print_attached_pid): Update.
8569 (process_serial_event): Simplify read of ptid.
8570 * thread-db.c (thread_db_create_event): Update.
8571 (thread_db_get_tls_address): Update.
8572 * win32-low.c (current_inferior_ptid): Simplify.
8573
46917d26
TT
85742014-02-19 Tom Tromey <tromey@redhat.com>
8575
8576 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8577 argument.
8578 (target_supports_btrace): Update.
8579
0759a81e
YQ
85802014-02-14 Yao Qi <yao@codesourcery.com>
8581
8582 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8583 (rsp-low-ipa.o): New target.
8584
a7191e8b
TT
85852014-02-12 Tom Tromey <tromey@redhat.com>
8586
8587 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8588 convert_ascii_to_int.
8589 * regcache.c (registers_to_string): Likewise.
8590 * remote-utils.c (decode_M_packet): Likewise.
8591 * server.c (process_serial_event): Likewise.
8592
ff0e980e
TT
85932014-02-12 Tom Tromey <tromey@redhat.com>
8594
8595 * server.c (handle_query, handle_v_run): Use hex2bin, not
8596 unhexify.
8597 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8598
e9371aff
TT
85992014-02-12 Tom Tromey <tromey@redhat.com>
8600
8601 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8602 convert_int_to_ascii.
8603 * regcache.c (registers_to_string, collect_register_as_string):
8604 Likewise.
8605 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8606 Likewise.
8607 * server.c (process_serial_event): Likewise.
8608 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8609 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8610
971dc0b8
TT
86112014-02-12 Tom Tromey <tromey@redhat.com>
8612
8613 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8614 bin2hex, not hexify.
8615 * tracepoint.c (cmd_qtstatus): Likewise.
8616
0a822afb
TT
86172014-02-12 Tom Tromey <tromey@redhat.com>
8618
8619 * remote-utils.c (monitor_output): Pass explicit length to
8620 hexify.
8621
9c3d6531
TT
86222014-02-12 Tom Tromey <tromey@redhat.com>
8623
8624 * tracepoint.c: Include rsp-low.h.
8625 * server.c: Include rsp-low.h.
8626 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8627 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8628 declare.
8629 * remote-utils.c: Include rsp-low.h.
8630 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8631 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8632 (convert_int_to_ascii, convert_ascii_to_int): Move to
8633 common/rsp-low.c.
8634 * regcache.c: Include rsp-low.h.
8635 * ax.c: Include rsp-low.h.
8636 * Makefile.in (SFILES): Add common/rsp-low.c.
8637 (OBS): Add rsp-low.o.
8638 (rsp-low.o): New target.
8639
01fd3ea5
TT
86402014-02-12 Tom Tromey <tromey@redhat.com>
8641
8642 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8643 Include print-utils.h.
8644 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8645 (plongest, thirty_two, phex_nz): Remove.
8646 * Makefile.in (SFILES): Add common/print-utils.c.
8647 (OBS): Add print-utils.o.
8648 (print-utils-ipa.o): New target.
8649 (print-utils.o): New target.
8650 (IPA_OBJS): Add print-utils-ipa.o.
8651
e99dc820
TT
86522014-02-06 Tom Tromey <tromey@redhat.com>
8653
8654 * Makefile.in (SFILES): Fix indentation.
8655
ee1e2d4f
DE
86562014-02-05 Doug Evans <dje@google.com>
8657
8658 * linux-low.c (linux_wait_for_event): Improve comment.
8659 (linux_wait_1): Keep current_inferior in sync with event_child.
8660
f5a02773
DE
86612014-01-22 Doug Evans <dje@google.com>
8662
8663 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8664
87ce2a04
DE
86652014-01-22 Doug Evans <dje@google.com>
8666
8667 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8668 * configure: Regenerate.
8669 * config.in: Regenerate.
8670 * Makefile.in (SFILES): Add debug.c.
8671 (OBS): Add debug.o.
8672 * debug.c: New file.
8673 * debug.h: New file.
8674 * linux-aarch64-low.c (*): Update all debugging printfs to use
8675 debug_printf instead of fprintf.
8676 * linux-arm-low.c (*): Ditto.
8677 * linux-cris-low.c (*): Ditto.
8678 * linux-crisv32-low.c (*): Ditto.
8679 * linux-m32r-low.c (*): Ditto.
8680 * linux-sparc-low.c (*): Ditto.
8681 * linux-x86.c (*): Ditto.
8682 * linux-low.c (*): Ditto.
8683 (linux_wait_1): Add calls to debug_enter, debug_exit.
8684 (linux_wait): Remove redundant debugging printf.
8685 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8686 (linux_resume, unstop_all_lwps): Ditto.
8687 * mem-break.c (*): Update all debugging printfs to use
8688 debug_printf instead of fprintf.
8689 * remote-utils.c (*): Ditto.
8690 * thread-db.c (*): Ditto.
8691 * server.c #include <ctype.h>, "gdb_vecs.h".
8692 (debug_threads): Moved to debug.c.
8693 (*): Update all debugging printfs to use debug_printf instead of
8694 fprintf.
8695 (start_inferior): Replace call to fflush with call to debug_flush.
8696 (monitor_show_help): Mention set debug-format.
8697 (parse_debug_format_options): New function.
8698 (handle_monitor_command): Handle "monitor set debug-format".
8699 (gdbserver_usage): Mention --debug-format.
8700 (main): Parse --debug-format.
8701 * server.h (debug_threads): Declaration moved to debug.h.
8702 #include "debug.h".
8703 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8704 trace_debug_1 that uses debug_printf.
8705 (tracepoint_look_up_symbols): Update all debugging printfs to use
8706 debug_printf instead of fprintf.
8707
e671835b
BS
87082014-01-20 Baruch Siach <baruch@tkos.co.il>
8709
8710 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8711 sys/ptrace.h.
8712
b5737fa9
PA
87132014-01-17 Pedro Alves <palves@redhat.com>
8714
ea38d2a9 8715 PR build/16445
c7faa97a
PA
8716 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8717 defined after including gdb_proc_service.h.
b5737fa9 8718
40ed484e
DE
87192014-01-16 Doug Evans <dje@google.com>
8720
8721 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8722 (match_dll): Use it.
8723
969c39fb
MM
87242014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8725
8726 * target.h (target_ops) <read_btrace>: Change parameters and
8727 return type to allow error reporting.
8728 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8729 trace reading errors on.
8730 * linux-low.c (linux_low_read_btrace): Pass trace reading
8731 errors on.
8732 (linux_low_disable_btrace): New.
8733
ab7f45ba
DE
87342014-01-15 Doug Evans <dje@google.com>
8735
8736 * inferiors.c (thread_id_to_gdb_id): Delete.
8737 * inferiors.h (thread_id_to_gdb_id): Delete.
8738
66af0f44
EZ
87392014-01-13 Eli Zaretskii <eliz@gnu.org>
8740
8741 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8742 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8743 versions.
8744
9939e131
PA
87452014-01-08 Pedro Alves <palves@redhat.com>
8746
8747 * server.c (handle_status): Don't discard previous queued stop
8748 replies or thread's pending status here.
8749 (main) <disconnection>: Do it here instead.
8750
b7ea362b
PA
87512014-01-08 Pedro Alves <palves@redhat.com>
8752
8753 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8754 * server.c (visit_actioned_threads, handle_pending_status): New
8755 function.
8756 (handle_v_cont): Factor out parts to ...
8757 (resume): ... this new function. If in all-stop, and a thread
8758 being resumed has a pending status, report it without actually
8759 resuming.
8760 (myresume): Adjust to use the new 'resume' function.
8761 (clear_pending_status_callback, set_pending_status_callback)
8762 (find_status_pending_thread_callback): New functions.
8763 (handle_status): Handle the case of multiple threads having
8764 interesting statuses to report. Report threads' real last signal
8765 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8766 with an interesting thread to report the status for, instead of
8767 always reporting the status of the first thread.
8768
28498c42
JB
87692014-01-01 Joel Brobecker <brobecker@adacore.com>
8770
8771 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8772 * gdbreplay.c (gdbreplay_version): Likewise.
8773
f45c82da
YZ
87742013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8775
8776 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8777 iov.iov_len with the real length in use.
8778
379a5e2d
JB
87792013-12-13 Joel Brobecker <brobecker@adacore.com>
8780
8781 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8782 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8783 for all targets that use win32-low.c.
8784 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8785 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8786
4210d83e
PA
87872013-12-13 Pedro Alves <palves@redhat.com>
8788
8789 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8790 if equal to TARGET_WAITKIND_LOADED.
8791 * win32-low.c (cached_status): New static global.
8792 (win32_wait): Add declaration.
8793 (do_initial_child_stuff): Flush all initial pending debug events
8794 up to the initial breakpoint.
8795 (win32_wait): If CACHED_STATUS was set, return that instead
8796 of doing a real wait. Remove the code resuming the execution
8797 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8798 during the initial phase. Also remove the code changing
8799 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8800 TARGET_WAITKIND_STOPPED.
8801
e7f0d979
YQ
88022013-12-11 Yao Qi <yao@codesourcery.com>
8803
8804 * notif.c (handle_notif_ack): Return 0 if no notification
8805 matches.
8806
ebcf782c
DE
88072013-11-20 Doug Evans <dje@google.com>
8808
8809 * linux-low.c (linux_set_resume_request): Fix comment.
8810
20ad9378
DE
88112013-11-20 Doug Evans <dje@google.com>
8812
8813 * linux-low.c (resume_status_pending_p): Tweak comment.
8814
a196ebeb
WT
88152013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8816
8817 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8818 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8819 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8820 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8821 (srv_amd64_regobj): Add amd64-mpx.o.
8822 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8823 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8824 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8825 * i387-fp.c (num_pl_bnd_register) Added constant.
8826 (num_pl_bnd_cfg_registers) Added constant.
8827 (struct i387_xsave) Added reserved area and MPX fields.
8828 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8829 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8830 function.
8831 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8832 (init_registers_amd64_mpx_linux): Declare new function.
8833 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8834 (x86_64_regmap): Add MPX registers.
8835 (x86_linux_read_description): Add MPX case.
8836 (initialize_low_arch): Initialize MPX targets.
8837
0080a2f6
TT
88382013-11-18 Tom Tromey <tromey@redhat.com>
8839
8840 * configure: Rebuild.
8841 * configure.ac: Don't check for stdlib.h.
8842 * gdbreplay.c: Unconditionally include stdlib.h.
8843
2978b111
TT
88442013-11-18 Tom Tromey <tromey@redhat.com>
8845
8846 * config.in: Rebuild.
8847 * configure: Rebuild.
8848 * configure.ac: Don't use AC_HEADER_DIRENT.
8849
a3d08894
TT
88502013-11-18 Tom Tromey <tromey@redhat.com>
8851
8852 * server.h: Don't check HAVE_STRING_H.
8853 * gdbreplay.c: Don't check HAVE_STRING_H.
8854 * configure: Rebuild.
8855
0a5dd17d
TT
88562013-11-18 Tom Tromey <tromey@redhat.com>
8857
8858 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8859 LIBGNU.
8860
1bd2f0ba
TT
88612013-11-08 Tom Tromey <tromey@redhat.com>
8862
8863 * configure, config.in: Rebuild.
8864 * configure.ac: Remove unused configury.
8865
3266f10b
TT
88662013-11-08 Tom Tromey <tromey@redhat.com>
8867
8868 * acinclude.m4: Include common.m4, codeset.m4.
8869 * configure, config.in: Rebuild.
8870 * configure.ac: Use GDB_AC_COMMON.
8871
6682d959
AA
88722013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8873
8874 * linux-s390-low.c (HWCAP_S390_TE): New define.
8875 (s390_arch_setup): Consider the TE field in the HWCAP for
8876 determining 'have_regset_tdb'.
8877
fd0a4d76
SDJ
88782013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8879
8880 PR gdb/16014
8881 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8882 call to sizeof.
8883
1a3d890b
PA
88842013-10-02 Pedro Alves <palves@redhat.com>
8885
8886 * server.c (process_serial_event): Don't output "GDBserver
8887 exiting" if GDB is connected through stdio.
8888 * target.c (mywait): Likewise, be silent if GDB is connected
8889 through stdio.
8890
97ad4581
JB
88912013-10-01 Joel Brobecker <brobecker@adacore.com>
8892
8893 * lynx-low.c (lynx_add_threads_after_attach): New function.
8894 (lynx_attach): Remove call to add_thread. Add call to
8895 lynx_add_threads_after_attach instead.
8896
5b4e221c
MF
88972013-09-28 Mike Frysinger <vapier@gentoo.org>
8898
8899 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8900 * config.in, configure: Regenerated.
8901
ee47b2f8
YQ
89022013-09-18 Yao Qi <yao@codesourcery.com>
8903
8904 PR server/15959
8905 * server.c (start_inferior): Clear 'resume_info'.
8906
d6707650 89072013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8908
d6707650
JW
8909 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8910 for each register.
8911
9243dd0e 89122013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8913
9243dd0e
JW
8914 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8915 linux-tile-low.o to srv_tgtobj.
8916
c623a6ef
WN
89172013-09-16 Will Newton <will.newton@linaro.org>
8918
8919 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8920 out regs.
8921
fb71d39e
PA
89222013-09-06 Pedro Alves <palves@redhat.com>
8923
8924 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8925 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8926 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8927 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8928 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8929 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8930
8e7e9910
PA
89312013-09-06 Pedro Alves <palves@redhat.com>
8932
8933 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8934 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8935
7c3a12ca
PA
89362013-09-06 Pedro Alves <palves@redhat.com>
8937
8938 * linux-amd64-ipa.c: Include tracepoint.h.
8939 * linux-i386-ipa.c: Include tracepoint.h.
8940
8eb3d7b6
RW
89412013-09-06 Ricard Wanderlof <ricardw@axis.com>
8942
8943 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8944 (ps_get_thread_area): New function.
8945
eddddb9d
RW
89462013-09-06 Ricard Wanderlof <ricardw@axis.com>
8947
8948 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8949 (initialize_low_arch): Call init_registers_crisv32 rather than
8950 init_register_crisv32.
8951
533b0600
PA
89522013-09-05 Pedro Alves <palves@redhat.com>
8953
8954 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8955 to ...
8956 * hostio.h: ... this new file.
8957 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8958 win32-low.c: Include hostio.h.
8959
0ce3d3b5
PA
89602013-09-05 Pedro Alves <palves@redhat.com>
8961
8962 * server.h (gdb_client_data, handler_func, callback_handler_func)
8963 (delete_file_handler, add_file_handler, append_callback_event)
8964 (delete_callback_event, start_event_loop, initialize_event_loop):
8965 Move to event-loop.h and include it.
8966 * event-loop.h: New file.
8967
799cdc37
PA
89682013-09-05 Pedro Alves <palves@redhat.com>
8969
8970 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8971 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8972 (loaded_dll, unloaded_dll): Move to ...
8973 * dll.h: ... this new file.
8974 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8975
6a6bbd9d
PA
89762013-09-05 Pedro Alves <palves@redhat.com>
8977
8978 * server.h (current_process, get_thread_process, all_processes)
8979 (add_inferior_to_list, for_each_inferior, current_inferior)
8980 (remove_inferior, add_process, remove_process, find_process_pid)
8981 (have_started_inferiors_p, have_attached_inferiors_p)
8982 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8983 (clear_inferiors, find_inferior, find_inferior_id)
8984 (inferior_target_data, set_inferior_target_data)
8985 (inferior_regcache_data, set_inferior_regcache_data): Move to
8986 inferiors.h, and include it.
8987 * inferiors.h: New file.
8988
f699aaba
PA
89892013-09-05 Pedro Alves <palves@redhat.com>
8990
8991 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8992 Move ...
72f4393d 8993 * ax.h: ... here.
f699aaba 8994
c144c7a0
PA
89952013-09-05 Pedro Alves <palves@redhat.com>
8996
8997 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8998 tracepoint.h.
8999 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9000 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9001 (handle_tracepoint_general_set, handle_tracepoint_query)
9002 (tracepoint_finished_step, tracepoint_was_hit)
9003 (release_while_stepping_state_list, current_traceframe)
9004 (in_readonly_region, traceframe_read_mem)
9005 (fetch_traceframe_registers, traceframe_read_sdata)
9006 (traceframe_read_info, struct fast_tpoint_collect_status)
9007 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9008 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9009 (supply_fast_tracepoint_registers)
9010 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9011 (ipa_tdesc, claim_trampoline_space)
9012 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9013 (agent_mem_read, agent_get_trace_state_variable_value)
9014 (agent_set_trace_state_variable_value, agent_tsv_read)
9015 (agent_mem_read_string, get_raw_reg_func_addr)
9016 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9017 * tracepoint.h: ... this new file.
9018
ff42e6ab
PA
90192013-09-05 Pedro Alves <palves@redhat.com>
9020
9021 * server.h (perror_with_name, error, fatal, warning, paddress)
9022 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9023 include it.
9024 * utils.h: New file.
9025
541af0f4
PA
90262013-09-05 Pedro Alves <palves@redhat.com>
9027
9028 * server.h (remote_debug, noack_mode, transport_is_reliable)
9029 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9030 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9031 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9032 (write_enn, initialize_async_io, enable_async_io)
9033 (disable_async_io, check_remote_input_interrupt_request)
9034 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9035 (dead_thread_notify, prepare_resume_reply)
9036 (decode_address_to_semicolon, decode_address, decode_m_packet)
9037 (decode_M_packet, decode_X_packet, decode_xfer_write)
9038 (decode_search_memory_packet, unhexify, hexify)
9039 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9040 (look_up_one_symbol, relocate_instruction)
9041 (monitor_output): Move to remote-utils.h, and include it.
9042 * remote-utils.h: New file.
9043
eebdf26b
PA
90442013-09-05 Pedro Alves <palves@redhat.com>
9045
9046 * server.h (_): Delete.
9047
3aafd2ff
PA
90482013-09-02 Pedro Alves <palves@redhat.com>
9049
9050 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9051 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9052 allocated.
9053 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9054
cee83bcb
PM
90552013-09-02 Pierre Muller <muller@sourceware.org>
9056
9057 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9058 or WriteProcessMemory complete successfully and handle
9059 ERROR_PARTIAL_COPY error.
9060
9a13b2fa
PA
90612013-09-02 Pedro Alves <palves@redhat.com>
9062
9063 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9064 error instead of EIO.
9065
602e3198
JK
90662013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9067
9068 PR server/15604
9069 * linux-low.c: Include filestuff.h.
9070 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9071 * lynx-low.c: Include filestuff.h.
9072 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9073 * server.c: Include filestuff.h.
9074 (main): Call notice_open_fds.
9075 * spu-low.c: Include filestuff.h.
9076 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9077
96d7229d
LM
90782013-08-22 Luis Machado <lgustavo@codesourcery.com>
9079
9080 * Makefile.in: Explain why ../target and ../nat are not
9081 listed as include file search paths.
9082 (linux-waitpid.o): New object file rule.
9083 * configure.srv (srv_native_linux_obj): New variable.
9084 Replace all occurrences of linux native object files with
9085 $srv_native_linux_obj.
9086 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9087 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9088 (linux_enable_event_reporting): Remove declaration.
9089 (my_waitpid): Moved to common/linux-waitpid.c.
9090 (linux_wait_for_event): Pass ptid when calling
9091 linux_enable_event_reporting.
9092 (linux_supports_tracefork_flag): Remove.
9093 (linux_enable_event_reporting): Likewise.
9094 (linux_tracefork_grandchild): Remove.
9095 (STACK_SIZE): Moved to common/linux-ptrace.c.
9096 (linux_tracefork_child): Remove.
9097 (linux_test_for_tracefork): Remove.
9098 (linux_look_up_symbols): Call linux_supports_traceclone.
9099 (initialize_low): Remove call to linux_test_for_tracefork.
9100 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9101 common/linux-ptrace.h.
9102 (PTRACE_TYPE_ARG4): Likewise.
9103 Include linux-ptrace.h.
9104
32940073
PA
91052013-08-21 Pedro Alves <palves@redhat.com>
9106
9107 * config.in: Renegerate.
9108
33b60d58 91092013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9110
33b60d58
LM
9111 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9112 (SFILES): Remove $(srcdir)/common/target-common.c and
9113 add $(srcdir)/target/waitstatus.c.
9114 (OBS): Remove target-common.o and add waitstatus.o.
9115 (server_h): Remove $(srcdir)/../common/target-common.h and
9116 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9117 and $(srcdir)/../target/waitstatus.h.
9118 (target-common.o): Remove.
9119 (waitstatus.o): New target object file.
9120 * target.h: Do not include target-common.h and
9121 include target/resume.h, target/wait.h and
9122 target/waitstatus.h.
9123
b8e1b30e
LM
91242013-08-13 Luis Machado <lgustavo@codesourcery.com>
9125
9126 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9127 to PTRACE_TYPE_ARG3.
9128 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9129 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9130 PTRACE_TYPE_ARG4.
9131 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9132 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9133
7a60ad40
YQ
91342013-07-27 Jie Zhang <jie@codesourcery.com>
9135 Daniel Jacobowitz <dan@codesourcery.com>
9136 Yao Qi <yao@codesourcery.com>
9137
9138 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9139 (mips-linux-watch.o): New rule.
9140 (mips_linux_watch_h): New variable.
9141 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9142 srv_tgtobj.
9143 * linux-mips-low.c: Include mips-linux-watch.h.
9144 (struct arch_process_info, struct arch_lwp_info): New.
9145 (update_watch_registers_callback): New function.
9146 (mips_linux_new_process, mips_linux_new_thread) New functions.
9147 (mips_linux_prepare_to_resume, mips_insert_point): New
9148 functions.
9149 (mips_remove_point, mips_stopped_by_watchpoint): New
9150 functions.
9151 (rsp_bp_type_to_target_hw_bp_type): New function.
9152 (mips_stopped_data_address): New function.
9153 (the_low_target): Add watchpoint support functions.
9154
de6f69ad
YQ
91552013-07-27 Yao Qi <yao@codesourcery.com>
9156
9157 * i386-low.c: Include break-common.h.
9158 (enum target_hw_bp_type): Remove.
9159
3360c0bf
LM
91602013-07-24 Luis Machado <lgustavo@codesourcery.com>
9161
9162 * Makefile.in (SFILES): /common/target-common.c.
9163 (OBS): Add target-common.o.
9164 (server_h): Add $(srcdir)/../common/target-common.h.
9165 (target-common.o): New target.
9166 * server.c (queue_stop_reply_callback): Free
9167 status string after use.
9168 * target.c (target_waitstatus_to_string): Remove.
9169 * target.h: Include target-common.h.
9170 (resume_kind): Likewise.
9171 (target_waitkind): Likewise.
9172 (target_waitstatus): Likewise.
9173 (TARGET_WNOHANG): Likewise.
9174
bd885420
YQ
91752013-07-04 Yao Qi <yao@codesourcery.com>
9176
9177 * Makefile.in (host_alias): Use @host_noncanonical@.
9178 (target_alias): Use @target_noncanonical@.
9179 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9180 ACX_NONCANONICAL_HOST.
9181 * configure: Regenerated.
9182
9183 Revert:
9184 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9185
9186 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9187 * configure: Rebuild.
9188 * Makefile.in (version_host, version_target): Get from configure.
9189 (version.c): Use $(version_host) and $(version_target).
9190
17ef446e
PA
91912013-07-03 Pedro Alves <palves@redhat.com>
9192
9193 * Makefile.in (config.status): Depend on development.sh.
9194 * acinclude.m4: Include libmcheck.m4.
9195 * configure: Regenerate.
9196
7a9a7487
MG
91972013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9198
9199 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9200 attribute inside the parentheses.
9201 (winapi_DebugSetProcessKillOnExit): Ditto.
9202 (winapi_DebugBreakProcess): Ditto.
9203 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9204
49b64de6
MG
92052013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9206
9207 * notif.h (notif_event): Add a dummy member to avoid compiler
9208 errors.
9209
d5749ee7
PA
92102013-07-01 Pedro Alves <palves@redhat.com>
9211
9212 * hostio.c (HOSTIO_PATH_MAX): Define.
9213 (require_filename, handle_open, handle_unlink, handle_readlink):
9214 Use it.
9215
d8d2a3ee
PA
92162013-07-01 Pedro Alves <palves@redhat.com>
9217
9218 * server.h: Include "pathmax.h".
9219 * linux-low.c: Don't include sys/param.h.
9220 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9221 MAXPATHLEN.
9222 * win32-low.c: Don't include sys/param.h.
9223 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9224
bc7dea8d
PA
92252013-07-01 Pedro Alves <palves@redhat.com>
9226
9227 * event-loop.c: Don't check HAVE_UNISTD_H before including
9228 <unistd.h>.
9229 * gdbreplay.c: Likewise.
9230 * remote-utils.c: Likewise.
9231 * server.c: Likewise.
9232 * configure.ac: Don't check for unistd.h.
9233 * configure: Regenerate.
9234
d6c2da54
TT
92352013-06-28 Tom Tromey <tromey@redhat.com>
9236
9237 * Makefile.in (version.c): Use version.in, not
9238 common/version.in.
9239
257b6bec
MG
92402013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9241
9242 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9243 * configure: Rebuild.
9244 * Makefile.in (version_host, version_target): Get from configure.
9245 (version.c): Use $(version_host) and $(version_target).
9246
86ebe149
DK
92472013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9248
9249 Fix trace-status to output user name without trailing colon.
9250 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9251
f30aa5af
DK
92522013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9253
9254 Fix trace-status to output proper start-time and stop-time.
9255 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9256 output start time and stop time in hex as gdb expects.
9257
28a93511
YQ
92582013-06-26 Pedro Alves <pedro@codesourcery.com>
9259
9260 * tracepoint.c (build_traceframe_info_xml): Output trace state
9261 variables present in the trace buffer.
9262
01208463
TT
92632013-06-24 Tom Tromey <tromey@redhat.com>
9264
9265 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9266 create-version.sh.
9267 (version.o): Remove.
9268 * gdbreplay.c: Include version.h.
9269 (version, host_name): Don't declare.
9270 * server.h: Include version.h.
9271 (version, host_name): Don't declare.
9272
760256f9
PA
92732013-06-12 Pedro Alves <palves@redhat.com>
9274
9275 * linux-x86-low.c (linux_is_elf64): Delete global.
9276 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9277 with local linux_pid_exe_is_elf_64_file use.
9278
030031ee
PA
92792013-06-11 Pedro Alves <palves@redhat.com>
9280
9281 * linux-low.c (regset_disabled, disable_regset): New functions.
9282 (regsets_fetch_inferior_registers)
9283 (regsets_store_inferior_registers): Use them.
9284 (initialize_regsets_info); Don't allocate the disabled_regsets
9285 array here.
9286 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9287 comment.
9288
5da6eb0a
PA
92892013-06-11 Pedro Alves <palves@redhat.com>
9290
9291 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9292 xmalloc.
9293
7e5aaa09
PA
92942013-06-11 Pedro Alves <palves@redhat.com>
9295
9296 * linux-x86-low.c (initialize_low_arch): Call
9297 init_registers_x32_avx_linux.
9298
d878444c
JK
92992013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9300
9301 Fix compatibility with Android Bionic.
9302 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9303 it is not empty.
9304
3aee8918
PA
93052013-06-07 Pedro Alves <palves@redhat.com>
9306
5f2b57b5 9307 PR server/14823
3aee8918
PA
9308 * Makefile.in (OBS): Add tdesc.o.
9309 (IPA_OBJS): Add tdesc-ipa.o.
9310 (tdesc-ipa.o): New rule.
9311 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9312 interface.
9313 * linux-low.c (new_inferior): Delete.
9314 (disabled_regsets, num_regsets): Delete.
9315 (linux_add_process): Adjust to set the new per-process
9316 new_inferior flag.
9317 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9318 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9319 was a stop. When calling arch_setup, switch the current inferior
9320 to the thread that got an event.
9321 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9322 (regsets_fetch_inferior_registers)
9323 (regsets_store_inferior_registers): New regsets_info parameter.
9324 Adjust to use it.
9325 (linux_register_in_regsets): New regs_info parameter. Adjust to
9326 use it.
9327 (register_addr, fetch_register, store_register): New usrregs_info
9328 parameter. Adjust to use it.
9329 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9330 parameter regs_info. Adjust to use it.
9331 (linux_fetch_registers): Get the current inferior's regs_info, and
9332 adjust to use it.
9333 (linux_store_registers): Ditto.
9334 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9335 (initialize_low): Don't initialize the target_regsets here. Call
9336 initialize_low_arch.
9337 * linux-low.h (target_regsets): Delete declaration.
9338 (struct regsets_info): New.
9339 (struct usrregs_info): New.
9340 (struct regs_info): New.
9341 (struct process_info_private) <new_inferior>: New field.
9342 (struct linux_target_ops): Delete the num_regs, regmap, and
9343 regset_bitmap fields. New field regs_info.
9344 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9345 * i387-fp.c (num_xmm_registers): Delete.
9346 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9347 calls to new interface.
9348 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9349 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9350 Infer the number of xmm registers from the regcache's target
9351 description.
9352 * i387-fp.h (num_xmm_registers): Delete.
9353 * inferiors.c (add_thread): Don't install the thread's regcache
9354 here.
9355 * proc-service.c (gregset_info): Fetch the current inferior's
9356 regs_info. Adjust to use it.
9357 * regcache.c: Include tdesc.h.
9358 (register_bytes, reg_defs, num_registers)
9359 (gdbserver_expedite_regs): Delete.
9360 (get_thread_regcache): If the thread doesn't have a regcache yet,
9361 create one, instead of aborting gdbserver.
9362 (regcache_invalidate_one): Rename to ...
9363 (regcache_invalidate_thread): ... this.
9364 (regcache_invalidate_one): New.
9365 (regcache_invalidate): Only invalidate registers of the current
9366 process.
9367 (init_register_cache): Add target_desc parameter, and use it.
9368 (new_register_cache): Ditto. Assert the target description has a
9369 non zero registers_size.
9370 (regcache_cpy): Add assertions. Adjust.
9371 (realloc_register_cache, set_register_cache): Delete.
9372 (registers_to_string, registers_from_string): Adjust.
9373 (find_register_by_name, find_regno, find_register_by_number)
9374 (register_cache_size): Add target_desc parameter, and use it.
9375 (free_register_cache_thread, free_register_cache_thread_one)
9376 (regcache_release, register_cache_size): New.
9377 (register_size): Add target_desc parameter, and use it.
9378 (register_data, supply_register, supply_register_zeroed)
9379 (supply_regblock, supply_register_by_name, collect_register)
9380 (collect_register_as_string, collect_register_by_name): Adjust.
9381 * regcache.h (struct target_desc): Forward declare.
9382 (struct regcache) <tdesc>: New field.
9383 (init_register_cache, new_register_cache): Add target_desc
9384 parameter.
9385 (regcache_invalidate_thread): Declare.
9386 (regcache_invalidate_one): Delete declaration.
9387 (regcache_release): Declare.
9388 (find_register_by_number, register_cache_size, register_size)
9389 (find_regno): Add target_desc parameter.
9390 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9391 declarations.
9392 * remote-utils.c: Include tdesc.h.
9393 (outreg, prepare_resume_reply): Adjust.
9394 * server.c: Include tdesc.h.
9395 (gdbserver_xmltarget): Delete declaration.
9396 (get_features_xml, process_serial_event): Adjust.
9397 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9398 declare.
9399 (struct process_info) <tdesc>: New field.
9400 (ipa_tdesc): Declare.
9401 * tdesc.c: New file.
9402 * tdesc.h: New file.
9403 * tracepoint.c: Include tdesc.h.
9404 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9405 (get_context_regcache): Adjust to pass ipa_tdesc down.
9406 (do_action_at_tracepoint): Adjust to get the register cache size
9407 from the context regcache's description.
9408 (traceframe_walk_blocks): Adjust to get the register cache size
9409 from the current trace frame's description.
9410 (traceframe_get_pc): Adjust to get current trace frame's
9411 description and pass it down.
9412 (gdb_collect): Adjust to get the register cache size from the
9413 IPA's description.
9414 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9415 (gdbserver_xmltarget): Delete.
9416 (initialize_low_tracepoint): Set the ipa's target description.
9417 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9418 (initialize_low_tracepoint): Set the ipa's target description.
9419 * linux-x86-low.c: Include tdesc.h.
9420 [__x86_64__] (is_64bit_tdesc): New.
9421 (ps_get_thread_area, x86_get_thread_area): Use it.
9422 (i386_cannot_store_register): Rename to ...
9423 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9424 (i386_cannot_fetch_register): Rename to ...
9425 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9426 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9427 to new interface.
9428 (target_regsets): Rename to ...
9429 (x86_regsets): ... this.
9430 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9431 interface.
9432 (x86_siginfo_fixup): Use is_64bit_tdesc.
9433 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9434 (tdesc_x32_avx_linux, tdesc_x32_linux)
9435 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9436 Declare.
9437 (x86_linux_update_xmltarget): Delete.
9438 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9439 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9440 (AMD64_LINUX_USER64_CS): New.
9441 (x86_linux_read_description): New, based on
9442 x86_linux_update_xmltarget.
9443 (same_process_callback): New.
9444 (x86_arch_setup_process_callback): New.
9445 (x86_linux_update_xmltarget): New.
9446 (x86_regsets_info): New.
9447 (amd64_linux_regs_info): New.
9448 (i386_linux_usrregs_info): New.
9449 (i386_linux_regs_info): New.
9450 (x86_linux_regs_info): New.
9451 (x86_arch_setup): Reimplement.
9452 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9453 (x86_emit_ops): Ditto.
9454 (the_low_target): Adjust. Install x86_linux_regs_info,
9455 x86_cannot_fetch_register, and x86_cannot_store_register.
9456 (initialize_low_arch): New.
9457 * linux-ia64-low.c (tdesc_ia64): Declare.
9458 (ia64_fetch_register): Adjust.
9459 (ia64_usrregs_info, regs_info): New globals.
9460 (ia64_regs_info): New function.
9461 (the_low_target): Adjust.
9462 (initialize_low_arch): New function.
9463 * linux-sparc-low.c (tdesc_sparc64): Declare.
9464 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9465 Adjust.
9466 (sparc_arch_setup): New function.
9467 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9468 (the_low_target): Adjust.
9469 (initialize_low_arch): New function.
9470 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9471 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9472 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9473 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9474 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9475 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9476 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9477 (tdesc_powerpc_isa205_vsx64l): Declare.
9478 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9479 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9480 (ppc_set_pc, ppc_get_hwcap): Adjust.
9481 (ppc_usrregs_info): Forward declare.
9482 (!__powerpc64__) ppc_regmap_adjusted: New global.
9483 (ppc_arch_setup): Adjust to the current process'es target
9484 description.
9485 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9486 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9487 (ppc_store_evrregset): Adjust.
9488 (target_regsets): Rename to ...
9489 (ppc_regsets): ... this, and make static.
9490 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9491 (ppc_regs_info): New function.
9492 (the_low_target): Adjust.
9493 (initialize_low_arch): New function.
9494 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9495 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9496 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9497 (tdesc_s390x_linux64v2): Declare.
9498 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9499 (s390_fill_gregset, s390_store_last_break): Adjust.
9500 (target_regsets): Rename to ...
9501 (s390_regsets): ... this, and make static.
9502 (s390_get_pc, s390_set_pc): Adjust.
9503 (s390_get_hwcap): New target_desc parameter, and use it.
9504 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9505 (s390_arch_setup): Adjust to set the current process'es target
9506 description. Don't adjust the regmap.
9507 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9508 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9509 (regs_info_3264): New globals.
9510 (s390_regs_info): New function.
9511 (the_low_target): Adjust.
9512 (initialize_low_arch): New function.
9513 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9514 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9515 [__mips64] (init_registers_mips_linux)
9516 (init_registers_mips_dsp_linux): Delete defines.
9517 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9518 (have_dsp): New global.
9519 (mips_read_description): New, based on mips_arch_setup.
9520 (mips_arch_setup): Reimplement.
9521 (get_usrregs_info): New function.
9522 (mips_cannot_fetch_register, mips_cannot_store_register)
9523 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9524 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9525 (target_regsets): Rename to ...
9526 (mips_regsets): ... this, and make static.
9527 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9528 (dsp_regs_info, regs_info): New globals.
9529 (mips_regs_info): New function.
9530 (the_low_target): Adjust.
9531 (initialize_low_arch): New function.
9532 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9533 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9534 Declare.
9535 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9536 (arm_read_description): New, with bits factored from
9537 arm_arch_setup.
9538 (arm_arch_setup): Reimplement.
9539 (target_regsets): Rename to ...
9540 (arm_regsets): ... this, and make static.
9541 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9542 (arm_regs_info): New function.
9543 (the_low_target): Adjust.
9544 (initialize_low_arch): New function.
9545 * linux-m68k-low.c (tdesc_m68k): Declare.
9546 (target_regsets): Rename to ...
9547 (m68k_regsets): ... this, and make static.
9548 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9549 (m68k_regs_info): New function.
9550 (m68k_arch_setup): New function.
9551 (the_low_target): Adjust.
9552 (initialize_low_arch): New function.
9553 * linux-sh-low.c (tdesc_sharch): Declare.
9554 (target_regsets): Rename to ...
9555 (sh_regsets): ... this, and make static.
9556 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9557 (sh_regs_info, sh_arch_setup): New functions.
9558 (the_low_target): Adjust.
9559 (initialize_low_arch): New function.
9560 * linux-bfin-low.c (tdesc_bfin): Declare.
9561 (bfin_arch_setup): New function.
9562 (bfin_usrregs_info, regs_info): New globals.
9563 (bfin_regs_info): New function.
9564 (the_low_target): Adjust.
9565 (initialize_low_arch): New function.
9566 * linux-cris-low.c (tdesc_cris): Declare.
9567 (cris_arch_setup): New function.
9568 (cris_usrregs_info, regs_info): New globals.
9569 (cris_regs_info): New function.
9570 (the_low_target): Adjust.
9571 (initialize_low_arch): New function.
9572 * linux-cris-low.c (tdesc_crisv32): Declare.
9573 (cris_arch_setup): New function.
9574 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9575 (cris_regs_info): New function.
9576 (the_low_target): Adjust.
9577 (initialize_low_arch): New function.
9578 * linux-m32r-low.c (tdesc_m32r): Declare.
9579 (m32r_arch_setup): New function.
9580 (m32r_usrregs_info, regs_info): New globals.
9581 (m32r_regs_info): Adjust.
9582 (initialize_low_arch): New function.
9583 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9584 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9585 (tic6x_usrregs_info): Forward declare.
9586 (tic6x_read_description): New function, based on ...
9587 (tic6x_arch_setup): ... this. Reimplement.
9588 (target_regsets): Rename to ...
9589 (tic6x_regsets): ... this, and make static.
9590 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9591 (tic6x_regs_info): New function.
9592 (the_low_target): Adjust.
9593 (initialize_low_arch): New function.
9594 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9595 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9596 (target_regsets): Rename to ...
9597 (xtensa_regsets): ... this, and make static.
9598 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9599 globals.
9600 (xtensa_arch_setup, xtensa_regs_info): New functions.
9601 (the_low_target): Adjust.
9602 (initialize_low_arch): New function.
9603 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9604 (nios2_arch_setup): Set the current process'es tdesc.
9605 (target_regsets): Rename to ...
9606 (nios2_regsets): ... this.
9607 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9608 (nios2_regs_info): New function.
9609 (the_low_target): Adjust.
9610 (initialize_low_arch): New function.
a261b8f5
PA
9611 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9612 (aarch64_arch_setup): Set the current process'es tdesc.
9613 (target_regsets): Rename to ...
9614 (aarch64_regsets): ... this.
9615 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9616 (aarch64_regs_info): New function.
9617 (the_low_target): Adjust.
9618 (initialize_low_arch): New function.
3aee8918
PA
9619 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9620 globals.
9621 (target_regsets): Rename to ...
9622 (tile_regsets): ... this.
9623 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9624 (tile_regs_info): New function.
9625 (tile_arch_setup): Set the current process'es tdesc.
9626 (the_low_target): Adjust.
9627 (initialize_low_arch): New function.
9628 * spu-low.c (tdesc_spu): Declare.
9629 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9630 * win32-arm-low.c (tdesc_arm): Declare.
9631 (arm_arch_setup): New function.
9632 (the_low_target): Install arm_arch_setup instead of
9633 init_registers_arm.
9634 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9635 (init_windows_x86): Rename to ...
9636 (i386_arch_setup): ... this. Set `win32_tdesc'.
9637 (the_low_target): Adjust.
9638 * win32-low.c (win32_tdesc): New global.
9639 (child_add_thread): Don't create the thread cache here.
9640 (do_initial_child_stuff): Set the new process'es tdesc.
9641 * win32-low.h (struct target_desc): Forward declare.
9642 (win32_tdesc): Declare.
9643 * lynx-i386-low.c (tdesc_i386): Declare global.
9644 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9645 * lynx-low.c (lynx_tdesc): New global.
9646 (lynx_add_process): Set the new process'es tdesc.
9647 * lynx-low.h (struct target_desc): Forward declare.
9648 (lynx_tdesc): Declare global.
9649 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9650 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9651 * nto-low.c (nto_tdesc): New global.
9652 (do_attach): Set the new process'es tdesc.
9653 * nto-low.h (struct target_desc): Forward declare.
9654 (nto_tdesc): Declare.
9655 * nto-x86-low.c (tdesc_i386): Declare.
9656 (nto_x86_arch_setup): Set `nto_tdesc'.
9657
b1fbec62
GB
96582013-06-04 Gary Benson <gbenson@redhat.com>
9659
9660 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9661 to qSupported response when appropriate.
9662 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9663 with nonzero-length annex.
9664 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9665 arguments supplied in annex.
9666
d1ec4ce7
DE
96672013-05-31 Doug Evans <dje@google.com>
9668
ac44adcb 9669 PR server/15594
d1ec4ce7
DE
9670 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9671 64 bits in 64-cross-32 environment.
9672
9b25f2d3
PA
96732013-05-28 Pedro Alves <palves@redhat.com>
9674
9675 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9676 (aarch64-without-fpu.c): Delete rule.
9677 * configure.srv (aarch64*-*-linux*): Remove references to
9678 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9679 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9680 declaration.
9681
6740dc9c
PA
96822013-05-24 Pedro Alves <palves@redhat.com>
9683
9684 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9685 instead of strchr/decode_address. Error if the range isn't split
9686 with a ','. Don't assume there's be a ':' in the action.
9687
c2d6af84
PA
96882013-05-23 Yao Qi <yao@codesourcery.com>
9689 Pedro Alves <palves@redhat.com>
9690
9691 * linux-low.c (lwp_in_step_range): New function.
9692 (linux_wait_1): If the thread was range stepping and stopped
9693 outside the stepping range, report the stop to GDB. Otherwise,
9694 continue stepping. Add range stepping debug output.
9695 (linux_set_resume_request): Copy the step range from the resume
9696 request to the lwp.
9697 (linux_supports_range_stepping): New.
9698 (linux_target_ops) <supports_range_stepping>: Set to
9699 linux_supports_range_stepping.
9700 * linux-low.h (struct linux_target_ops)
9701 <supports_range_stepping>: New field.
9702 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9703 * linux-x86-low.c (x86_supports_range_stepping): New.
9704 (the_low_target) <supports_range_stepping>: Set to
9705 x86_supports_range_stepping.
9706 * server.c (handle_v_cont): Handle 'r' action.
9707 (handle_v_requests): Append ";r" if the target supports range
9708 stepping.
9709 * target.h (struct thread_resume) <step_range_start,
9710 step_range_end>: New fields.
9711 (struct target_ops) <supports_range_stepping>:
9712 New field.
9713 (target_supports_range_stepping): New macro.
9714
58794e1a
JB
97152013-05-17 Joel Brobecker <brobecker@adacore.com>
9716
9717 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9718 confusion in comment.
9719
d631c5a7
JB
97202013-05-17 Joel Brobecker <brobecker@adacore.com>
9721
9722 * lynx-low.c (struct process_info_private): New type.
9723 (lynx_add_process): New function.
9724 (lynx_create_inferior, lynx_attach): Replace calls to
9725 add_process by calls to lynx_add_process.
9726 (lynx_resume): If PTID is null, then try using
9727 current_process()->private->last_wait_event_ptid.
9728 Add comments.
9729 (lynx_clear_inferiors): Delete. The contents of that function
9730 has been inlined in lynx_mourn;
9731 (lynx_wait_1): Save the ptid in the process's private data.
9732 (lynx_mourn): Free the process' private data. Replace call
9733 to lynx_clear_inferiors by call to clear_inferiors.
9734
96f7a20f
YQ
97352013-05-17 Yao Qi <yao@codesourcery.com>
9736
9737 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9738 the right place.
9739
db0dfaa0
LM
97402013-05-16 Luis Machado <lgustavo@codesourcery.com>
9741
9742 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9743 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9744 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9745 PT_TEXT_END_ADDR guards. Update comments.
9746 (linux_target_op) <read_offsets>: Conditionally define to
9747 linux_read_offsets if the target is UCLIBC and if it defines
9748 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9749
68f5f838
SL
97502013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9751 Andrew Jenner <andrew@codesourcery.com>
9752
9753 * Makefile.in (SFILES): Add linux-nios2-low.c.
9754 (clean): Add action to delete nios2-linux.c.
9755 (nios2-linux.c): New rule.
9756 * configure.srv: Add nios2*-*-linux*.
9757 * linux-nios2-low.c: New.
9758
1ebff1fd
HAQ
97592013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9760
9761 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9762
f6150862
HZ
97632013-04-25 Hui Zhu <hui@codesourcery.com>
9764
9765 PR gdb/15186
f6150862
HZ
9766 * ax.c (ax_printf): Add fflush.
9767
614c279d
TT
97682013-04-22 Tom Tromey <tromey@redhat.com>
9769
9770 * Makefile.in (SFILES): Add filestuff.c.
9771 (OBS): Add filestuff.o.
9772 (filestuff.o): New target.
9773 * config.in, configure: Rebuild.
9774 * configure.ac: Check for fdwalk, pipe2.
9775
7d4e5717
PA
97762013-04-17 Pedro Alves <palves@redhat.com>
9777
9778 * configure.ac (USE_THREAD_DB): Delete variable.
9779 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9780 Don't AC_SUBST USE_THREAD_DB.
9781 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9782 * config.in, configure: Regenerate.
9783
d5c93e41
PA
97842013-04-16 Pedro Alves <palves@redhat.com>
9785
9786 * linux-low.h (struct lwp_info) <thread_known>: Move under
9787 the USE_THREAD_DB #ifdef.
9788
04f5fe89
PA
97892013-04-16 Pedro Alves <palves@redhat.com>
9790
9791 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9792 (linux-low.o): Delete rule.
9793 * linux-low.h: Always include "gdb_thread_db.h" instead of
9794 conditionally including thread_db.h.
9795 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9796 HAVE_THREAD_DB_H.
9797
480b27bf
JK
97982013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9799
9800 * Makefile.in (install-only): Fix make install regression.
9801
43662968
JK
98022013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9803
9804 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9805 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9806 installation.
9807 * gdbserver.1: Remove.
9808
3e74e146
PA
98092013-03-22 Pedro Alves <palves@redhat.com>
9810
9811 * linux-low.c (handle_extended_wait): Don't call
9812 linux_enable_event_reporting.
9813
a8347a2a
TT
98142013-03-15 Tony Theodore <tonyt@logyst.com>
9815
9816 PR build/9098:
9817 * Makefile.in (SHELL): Use @SHELL@.
9818
eeb56fa7
SDJ
98192013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9820
9821 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9822 compiler warning.
9823
4fa7e2ff
JB
98242013-03-13 Joel Brobecker <brobecker@adacore.com>
9825
9826 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9827 Remove extraneous NULL element.
9828
8ddb1965
YQ
98292013-03-13 Yao Qi <yao@codesourcery.com>
9830
9831 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9832 'V' block in trace frame.
9833
9accd112
MM
98342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9835
9836 * target.h (struct target_ops): Add btrace ops.
9837 (target_supports_btrace): New macro.
9838 (target_enable_btrace): New macro.
9839 (target_disable_btrace): New macro.
9840 (target_read_btrace): New macro.
9841 * gdbthread.h (struct thread_info): Add btrace field.
9842 * server.c: Include btrace-common.h.
9843 (handle_btrace_general_set): New function.
9844 (handle_btrace_enable): New function.
9845 (handle_btrace_disable): New function.
9846 (handle_general_set): Call handle_btrace_general_set.
9847 (handle_qxfer_btrace): New function.
9848 (struct qxfer qxfer_packets[]): Add btrace entry.
9849 * inferiors.c (remove_thread): Disable btrace.
9850 * linux-low: Include linux-btrace.h.
9851 (linux_low_enable_btrace): New function.
9852 (linux_low_read_btrace): New function.
9853 (linux_target_ops): Add btrace ops.
9854 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9855 Add srv_linux_btrace=yes.
9856 (x86_64-*-linux*): Add linux-btrace.o.
9857 Add srv_linux_btrace=yes.
9858 * configure.ac: Define HAVE_LINUX_BTRACE.
9859 * config.in: Regenerated.
9860 * configure: Regenerated.
9861
5cc22e4c
MM
98622013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9863
9864 * server.c (handle_qxfer): Preserve error message if -3 is
9865 returned.
9866 (qxfer): Document the -3 return value.
9867
7c97f91e
MM
98682013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9869
9870 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9871 (linux_btrace_h): New variable.
9872 (linux-btrace.o): New rule.
9873
be9a119c 98742013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9875 Hafiz Abid Qadeer <abidh@codesourcery.com>
9876
9877 * tracepoint.c (trace_buffer_size): New global.
9878 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9879 (init_trace_buffer): Change to one-argument function. Allocate
9880 trace buffer memory.
9881 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9882 handle QTBuffer:size packet.
9883 (cmd_bigqtbuffer_size): New function.
9884 (initialize_tracepoint): Call init_trace_buffer with
9885 DEFAULT_TRACE_BUFFER_SIZE.
9886 * server.c (handle_query): Add QTBuffer:size in the
9887 supported packets.
9888
e64f7499
YQ
98892013-03-07 Yao Qi <yao@codesourcery.com>
9890
9891 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9892 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9893 of -1.
9894 (cmd_qtsp): Adjust condition. Do post increment.
9895 Set cur_action and cur_step_action back to 0.
9896
f0ae6fc3
PA
98972013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9898
9899 PR server/15236
9900 * linux-low.c (linux_write_memory): Return early success if LEN is
9901 zero.
9902
b5b0b0af
CV
99032013-03-05 Corinna Vinschen <vinschen@redhat.de>
9904
334ad4a8 9905 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9906
589bc927
TT
99072013-02-28 Tom Tromey <tromey@redhat.com>
9908
9909 * configure.ac: Invoke AC_SYS_LARGEFILE.
9910 * configure, config.in: Rebuild.
9911
dfe07582
CV
99122013-02-28 Corinna Vinschen <vinschen@redhat.com>
9913
9914 * win32-low.c: Throughout, fix format strings and casts of
9915 printf-like functions to avoid type related warnings on all
9916 platforms.
9917 (get_child_debug_event): Print dwDebugEventCode as hex since
9918 that's how it's usually documented.
9919
736cd585
YQ
99202013-02-28 Yao Qi <yao@codesourcery.com>
9921
9922 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9923 pulongest.
9924
e1f58301
JW
99252013-02-27 Jiong Wang <jiwang@tilera.com>
9926
9927 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9928 (reg-tilegx32.c): New rule.
9929 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9930 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9931 different register info initializer according to elf class.
9932 (init_registers_tilgx32): New function. The tilegx32 register info
9933 initializer.
9934 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9935 (tile_store_gregset): Likewise.
9936
d171ca78
YQ
99372013-02-27 Yao Qi <yao@codesourcery.com>
9938
9939 * server.c (process_point_options): Print debug message when
9940 debug_threads is true.
9941
282bbdf3
YQ
99422013-02-26 Yao Qi <yao@codesourcery.com>
9943
9944 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9945
aca22551
PA
99462013-02-19 Pedro Alves <palves@redhat.com>
9947 Kai Tietz <ktietz@redhat.com>
9948
9949 PR gdb/15161
9950
9951 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9952 instead of strtoul to extract address from packet.
9953 (process_serial_event) <'z'>: Likewise.
9954
4f3cee1c
YQ
99552013-02-18 Yao Qi <yao@codesourcery.com>
9956
9957 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9958
8e1d55a3
PA
99592013-02-14 Pedro Alves <palves@redhat.com>
9960
9961 Plug memory leak.
9962
9963 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9964 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9965
458820da
PA
99662013-02-14 Pedro Alves <palves@redhat.com>
9967
9968 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9969
baea0dae
PA
99702013-02-14 Pedro Alves <palves@redhat.com>
9971
9972 * tracepoint.c (save_string): Delete.
9973 (add_tracepoint_action): Use savestring instead of save_string.
9974
0b1afbb3
PA
99752013-02-12 Pedro Alves <palves@redhat.com>
9976
9977 * linux-xtensa-low.c: Ditto.
9978 * xtensa-xtregs.c: Ditto.
9979
8a4ac37e
PA
99802013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9981
9982 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9983 thread_db.
9984
148de6bb
MS
99852013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9986
9987 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9988 aarch64_num_wp_regs and aarch64_num_bp_regs to
9989 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9990
55fac6e0
MS
99912013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9992
9993 * linux-aarch64-low.c (ps_get_thread_area): Replace
9994 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9995
176eb98c
MS
99962013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9997 Marcus Shawcroft <marcus.shawcroft@arm.com>
9998 Nigel Stephens <nigel.stephens@arm.com>
9999 Yufeng Zhang <yufeng.zhang@arm.com>
10000
10001 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10002 (aarch64.c, aarch64-without-fpu.c): New targets.
10003 * configure.srv (aarch64*-*-linux*): New.
10004 * linux-aarch64-low.c: New file.
10005
56f7af9c
MS
100062013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10007
43aaf8b6 10008 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10009 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10010 (dequeue_one_deferred_signal, linux_resume_one_thread)
10011 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10012 (linux_tracefork_grandchild, linux_test_for_tracefork)
10013 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10014 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10015 where the argument is 0.
10016
60f662b0
YQ
100172013-01-25 Yao Qi <yao@codesourcery.com>
10018
10019 * event-loop.c: Include "queue.h".
10020 (gdb_event_p): New typedef.
10021 (struct gdb_event) <next_event>: Remove.
10022 (event_queue): Change to QUEUE(gdb_event_p).
10023 (async_queue_event): Remove.
10024 (gdb_event_xfree): New.
10025 (initialize_event_loop): New.
10026 (process_event): Use API from QUEUE.
10027 (wait_for_event): Likewise.
10028 * server.c (main): Call initialize_event_loop.
10029 * server.h (initialize_event_loop): Declare.
10030
5ae4861a
YQ
100312013-01-18 Yao Qi <yao@codesourcery.com>
10032
10033 * ax.h (struct eval_agent_expr_context): New.
10034 (gdb_eval_agent_expr): Update declaration.
10035 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10036 TFRAME. Add new argument CTX.
10037 * server.h (struct eval_agent_expr_context): Declare.
10038 (agent_mem_read, agent_tsv_read): Update declaration.
10039 (agent_mem_read_string): Likewise.
10040 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10041 (add_traceframe_block): Add new argument TPOINT.
10042 Increase TPOINT->traceframe_usage.
10043 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10044 eval_tracepoint_agent_expr.
10045 (condition_true_at_tracepoint): Likewise.
10046 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10047 (agent_mem_read_string, agent_tsv_read): Likewise.
10048
85e00e85
YQ
100492013-01-16 Yao Qi <yao@codesourcery.com>
10050
10051 * linux-low.c (linux_resume_one_lwp): Don't check
10052 'lwp->bp_reinsert != 0'.
10053
4039cf45
JB
100542013-01-07 Joel Brobecker <brobecker@adacore.com>
10055 Pedro Alves <palves@redhat.com>
10056
10057 * lynx-low.c (ptrace_request_to_str): Define a temporary
10058 macro and use it to simplify this function's implementation.
10059
9044dee2
JB
100602013-01-07 Joel Brobecker <brobecker@adacore.com>
10061
10062 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10063 sets errno.
10064
e6352c8f
JB
100652013-01-07 Joel Brobecker <brobecker@adacore.com>
10066
10067 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10068
50681a27
JB
100692013-01-07 Joel Brobecker <brobecker@adacore.com>
10070
10071 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10072
3f6e77ef
JB
100732013-01-07 Joel Brobecker <brobecker@adacore.com>
10074
10075 * lynx-low.c (lynx_resume): Use the resume_info parameter
10076 to determine the ptid for the lynx_ptrace call, unless
10077 it is equal to minus_one_ptid, in which case we use the
10078 ptid of the current_inferior.
10079 (lynx_wait_1): After having received a thread create/exit
10080 event, resume the inferior's execution using the signaling
10081 thread's ptid, rather than the old ptid.
10082
7fda33ae
JB
100832013-01-07 Joel Brobecker <brobecker@adacore.com>
10084
10085 * lynx-low.c (lynx_resume): Delete variable ret.
10086
b9786c74
JB
100872013-01-01 Joel Brobecker <brobecker@adacore.com>
10088
10089 * gdbreplay.c (gdbreplay_version): Update copyright year.
10090 * server.c (gdbserver_version): Likewise.
10091
8b93d60f
JB
100922012-12-17 Joel Brobecker <brobecker@adacore.com>
10093
10094 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10095 new thread.
10096
037335a7
JB
100972012-12-17 Joel Brobecker <brobecker@adacore.com>
10098
10099 * lynx-low.c (ptrace_request_to_str): Add handling for
10100 PTRACE_GETTRACESIG.
10101
52d4cbd8
JB
101022012-12-17 Joel Brobecker <brobecker@adacore.com>
10103
10104 * lynx-low.c (lynx_attach): Delete variable new_process.
10105
ab8f6ca9
JB
101062012-12-17 Joel Brobecker <brobecker@adacore.com>
10107
10108 * lynx-low.c (lynx_create_inferior): Delete variable
10109 new_process.
10110
78cbc024
JB
101112012-12-17 Joel Brobecker <brobecker@adacore.com>
10112
10113 * lynx-low.c (ptrace_request_to_str): Do not handle
10114 PTRACE_GETTHREADLIST if this macro does not exist.
10115
14a00470
YQ
101162012-12-15 Yao Qi <yao@codesourcery.com>
10117
10118 * Makefile.in (OBS): Add notif.o.
10119 * notif.c, notif.h: New.
10120 * server.c: Include "notif.h".
10121 (struct vstop_notif) <next>: Remove.
10122 <base>: New field.
10123 (queue_stop_reply): Update.
10124 (push_event, send_next_stop_reply): Remove.
10125 (discard_queued_stop_replies): Update.
10126 (notif_stop): New variable.
10127 (handle_v_stopped): Remove.
10128 (handle_v_requests): Don't call handle_v_stopped. Call
10129 handle_ack_notif instead.
10130 (queue_stop_reply_callback): Call notif_event_enque instead
10131 of queue_stop_reply.
10132 (handle_status): Don't call send_next_stop_reply, call
10133 notif_write_event instead.
10134 (kill_inferior_callback): Likewise.
10135 (detach_or_kill_inferior_callback): Likewise.
10136 (main): Call initialize_notif.
10137 (process_serial_event): Call QUEUE_is_empty.
10138 (handle_target_event): Call notif_push instead of push event.
10139 * server.h (push_event): Remove declaration.
10140
61c125b9
TT
101412012-12-10 Tom Tromey <tromey@redhat.com>
10142
10143 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10144 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10145 macros.
10146 (.c.o): Rewrite.
10147 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10148 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10149 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10150 (amd64-linux-ipa.o, ax.o): Rewrite.
10151 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10152 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10153 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10154 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10155 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10156 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10157 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10158 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10159 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10160 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10161 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10162 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10163 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10164 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10165 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10166 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10167 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10168 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10169 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10170 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10171 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10172 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10173 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10174 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10175 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10176 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10177 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10178 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10179 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10180 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10181 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10182 (reg-tilegx.o): Remove.
10183 (all_object_files): New macro.
10184 Include .deps files.
10185 * aclocal.m4, configure: Rebuild.
10186 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10187 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10188 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10189
e90e9ad9
TT
101902012-12-05 Tom Tromey <tromey@redhat.com>
10191
10192 PR gdb/14917:
10193 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10194
02d403bf 101952012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10196
10197 * configure.ac: Check for linux/perf_event.h.
10198 * config.in: Regenerated.
10199 * configure: Regenerated.
10200
0270a750
PA
102012012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10202
10203 * hostio.c (handle_readlink): Decrease buffer size
10204 parameter passed to readlink by one byte.
10205
8c29b58e
YQ
102062012-11-26 Yao Qi <yao@codesourcery.com>
10207
10208 * configure.ac (build_warnings): Append '-Wempty-body'.
10209 * configure: Regenerated.
10210 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10211 body.
10212
8bdce1ff
PM
102132012-11-15 Pierre Muller <muller@sourceware.org>
10214
10215 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10216 * config.in: Regenerate.
10217 * configure: Regenerate.
10218 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10219 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10220 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10221 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10222 header.
10223 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10224 instead of <sys/wait.h> header.
10225 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10226
02d403bf 102272012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10228
10229 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10230 (various make rules): Remove -DGDBSERVER
10231
fbd5db48
YQ
102322012-11-09 Yao Qi <yao@codesourcery.com>
10233
10234 * spu-low.c (current_ptid): Move it to ..
10235 * gdbthread.h: ... here. New.
10236 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10237 * server.c (myresume, process_serial_event): Likewise.
10238 * thread-db.c (thread_db_find_new_threads): Likewise.
10239 * tracepoint.c (run_inferior_command): Likewise.
10240
b3dc46ff
AB
102412012-10-01 Andrew Burgess <aburgess@broadcom.com>
10242
10243 * server.c (handle_search_memory_1): Include access length in
10244 warning message.
10245
07c04788
HPN
102462012-09-05 Michael Brandt <michael.brandt@axis.com>
10247
10248 * linux-crisv32-low.c: Fix compile errors.
10249
918d227b
YQ
102502012-09-04 Yao Qi <yao@codesourcery.com>
10251
10252 * tracepoint.c (cmd_qtsv): Adjust debug message.
10253 Don't check CUR_TPOINT.
10254
18c1b81a
YQ
102552012-08-28 Yao Qi <yao@codesourcery.com>
10256
10257 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10258 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10259 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10260 Remove declarations of xmalloc, xreallloc, xstrdup and
10261 freeargv.
10262 * Makefile.in (libiberty_h): New.
10263 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10264 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10265
dc82f37b
YQ
102662012-08-23 Yao Qi <yao@codesourcery.com>
10267
10268 * server.h: Remove declaration of 'xsnprintf'.
10269
406b1477
KS
102702012-08-22 Keith Seitz <keiths@redhat.com>
10271
10272 * server.h: Include build-gnulib-gbserver/config.h.
10273 * gdbreplay.c: Likewise.
10274
e6712ff1
DE
102752012-08-08 Doug Evans <dje@google.com>
10276
10277 * Makefile.in (SFILES): Add gdb_vecs.c.
10278 (OBS): Add gdb_vecs.o.
10279 (gdb_vecs_h, host_defs_h): New variables.
10280 (thread-db.o): Add $(gdb_vecs_h) dependency.
10281 (gdb_vecs.o): New rule.
10282 * thread-db.c: #include "gdb_vecs.h".
10283 (thread_db_load_search): Use a vector to iterate over path elements.
10284 Handle text appearing after "$pdir".
10285
10286 * configure.ac: Add check for strstr.
10287 * config.in: Regenerate.
10288 * configure: Regenerate.
10289
7c3270ae
UW
102902012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10291
10292 * hostio.c (handle_pread): If pread fails, fall back to attempting
10293 lseek/read.
10294 (handle_pwrite): Likewise for pwrite.
10295
b62e2b27
UW
102962012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10297
10298 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10299 between unsupported TYPE and unimplementable ADDR/LEN combination.
10300 (arm_insert_point): Act on new return value.
10301
78a99e91
PA
103022012-07-31 Pedro Alves <palves@redhat.com>
10303
10304 * server.c (process_point_options): Only skip tokens if we find
10305 one that is unrecognized. Don't treat 'X' specially while
10306 skipping unrecognized tokens.
10307
fcf303ab
UW
103082012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10309
10310 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10311 to 4-byte-align HW breakpoint addresses for Thumb.
10312
7255706c
YQ
103132012-07-27 Yao Qi <yao@codesourcery.com>
10314
10315 PR remote/14161.
10316
10317 * server.h: Declare gdb_agent_about_to_close.
10318 * target.c (kill_inferior): Include "agent.h".
10319 New. Send command 'kill'.
10320 * target.h (kill_inferior): Removed macro.
10321 * tracepoint.c (gdb_agent_about_to_close): New.
10322 (gdb_agent_helper_thread): Handle command 'close'.
10323 Wait endlessly until the inferior stops.
10324 Install gdb_agent_remove_socket to atexit hook.
10325 (agent_socket_name): New static variable.
10326 (gdb_agent_socket_init): Replace local variable 'name' with
10327 'agent_socket_name'.
10328 (gdb_agent_remove_socket): New.
10329
5a3f286f
YQ
103302012-07-27 Yao Qi <yao@codesourcery.com>
10331
10332 * server.c (process_point_options): Stop at 'X' when parsing.
10333
961bd387
ME
103342012-07-19 Michael Eager <eager@eagercon.com>
10335
a261b8f5 10336 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10337 to hw_execute.
10338 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10339 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10340 hardware breakpoint.
10341
aa7c7447
JK
103422012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10343
10344 * gdbserver/linux-low.c (initialize_low): Call
10345 linux_ptrace_init_warnings.
10346
7f216e7c
DE
103472012-07-02 Doug Evans <dje@google.com>
10348
10349 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10350 pointer to int.
10351
d3ce09f5
SS
103522012-07-02 Stan Shebs <stan@codesourcery.com>
10353
10354 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10355 (ax.o): Add it to build rule.
10356 (ax-ipa.o): Ditto.
10357 (OBS): Add format.o.
10358 (IPA_OBS): Add format.o.
10359 * server.c (handle_query): Claim support for breakpoint commands.
10360 (process_point_options): Add command case.
10361 (process_serial_event): Leave running if there are printfs in
10362 effect.
10363 * mem-break.h (any_persistent_commands): Declare.
10364 (add_breakpoint_commands): Declare.
10365 (gdb_no_commands_at_breakpoint): Declare.
10366 (run_breakpoint_commands): Declare.
10367 * mem-break.c (struct point_command_list): New struct.
10368 (struct breakpoint): New field command_list.
10369 (any_persistent_commands): New function.
10370 (add_commands_to_breakpoint): New function.
10371 (add_breakpoint_commands): New function.
10372 (gdb_no_commands_at_breakpoint): New function.
10373 (run_breakpoint_commands): New function.
10374 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10375 locally.
10376 * ax.c: Include format.h.
10377 (ax_printf): New function.
10378 (gdb_eval_agent_expr): Add printf opcode.
10379
2f8f6aed
YQ
103802012-06-13 Yao Qi <yao@codesourcery.com>
10381
10382 * server.c (start_inferior): Remove duplicated writes to fields
10383 'last_resume_kind' and 'last_status' of 'current_inferior'.
10384
0c9070b3
YQ
103852012-06-12 Yao Qi <yao@codesourcery.com>
10386 Pedro Alves <palves@redhat.com>
10387
10388 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10389 comment.
10390 * server.c (handle_v_cont): Extend comment.
10391
c52daf70
YQ
103922012-06-11 Yao Qi <yao@codesourcery.com>
10393
10394 * linux-low.c (linux_attach): Add 'static'.
10395
d38bbb0a
YQ
103962012-06-06 Yao Qi <yao@codesourcery.com>
10397
10398 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10399
89dc0afd
JK
104002012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10401
10402 Fix gcc -flto compilation warning.
10403 * server.c (main): Make variable multi_mode and attach volatile.
10404
75f62ce7
TJB
104052012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10406
10407 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10408 if the platform doesn't know about it.
10409
65f479b6
PA
104102012-05-30 Jeff Kenton <jkenton@tilera.com>
10411
10412 * Makefile.in (SFILES): Add linux-tile-low.c.
10413 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10414 * configure.srv: Handle tilegx-*-linux*.
10415 * linux-tile-low.c: New file.
10416
0c5bf5a9
JK
104172012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10418
10419 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10420
a493e3e2
PA
104212012-05-24 Pedro Alves <palves@redhat.com>
10422
10423 PR gdb/7205
10424
43aaf8b6 10425 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10426
2ea28649
PA
104272012-05-24 Pedro Alves <palves@redhat.com>
10428
10429 PR gdb/7205
10430
10431 Replace target_signal with gdb_signal throughout.
10432
8d409d16
MR
104332012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10434
10435 * linux-low.c (linux_store_registers): Avoid the copying sequence
10436 when no data has been retrieved by ptrace.
10437
23512c01
MGD
104382012-05-22 Will Deacon <will.deacon@arm.com>
10439
10440 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10441 Include asm/ptrace.h.
10442 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10443 already defined.
10444
4934b29e
MR
104452012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10446
10447 * linux-low.c (linux_store_registers): Don't re-retrieve data
10448 with ptrace that has already been obtained from /proc. Always
10449 copy any data retrieved with ptrace to the buffer supplied.
10450
bde24c0a
PA
104512012-05-11 Yao Qi <yao@codesourcery.com>
10452 Pedro Alves <palves@redhat.com>
10453
10454 * linux-low.c (enum stopping_threads_kind): New.
10455 (stopping_threads): Change type to `enum stopping_threads_kind'.
10456 (handle_extended_wait): If stopping and suspending threads, leave
10457 the new_lwp suspended too.
10458 (linux_wait_for_event): Adjust.
10459 (stop_all_lwps): Set `stopping_threads' to
10460 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10461 whether we're suspending threads or just stopping them. Assert no
10462 recursion happens.
10463
623b6bdf
YQ
104642012-04-29 Yao Qi <yao@codesourcery.com>
10465
10466 * server.h: Move some code to ...
10467 * gdbthread.h: ... here. New.
10468 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10469 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10470 (nto-low.o, win32-low.o): Likewise.
10471 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10472 * regcache.c, remote-utils.c, server.c: Likewise.
10473 * target.c, tracepoint.c, win32-low.c: Likewise.
10474
f15f9948
TJB
104752012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10476
10477 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10478 (PTRACE_ARG4_TYPE): Likewise.
10479 (PTRACE_XFER_TYPE): Likewise.
10480 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10481 ptrace to PTRACE_ARG3_TYPE.
10482 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10483 (PTRACE_ARG4_TYPE): Likewise.
10484 (PTRACE_XFER_TYPE): Likewise.
10485 (linux_detach_one_lwp): Cast fourth argument of
10486 ptrace to long then PTRACE_ARG4_TYPE.
10487 (regsets_fetch_inferior_registers): Cast third argument of
10488 ptrace to long then PTRACE_ARG3_TYPE.
10489 (regsets_store_inferior_registers): Likewise.
10490
38ea300a
PA
104912012-04-20 Pedro Alves <palves@redhat.com>
10492
10493 * configure: Regenerate.
10494
c971b7fa
PA
104952012-04-19 Pedro Alves <palves@redhat.com>
10496
43aaf8b6 10497 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10498 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10499 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10500 (all, install-only, uninstall, clean-info, all-lib, clean): No
10501 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10502 (maintainer-clean realclean distclean): Use subdir_do.
10503 (subdir_do): New.
10504 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10505 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10506 * acinclude.m4: Include acx_configure_dir.m4.
10507 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10508 calls. Call AC_PROG_RANLIB. Configure gnulib using
10509 ACX_CONFIGURE_DIR.
10510 (GNULIB): New.
10511 (GNULIB_STDINT_H): Adjust.
10512 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10513 * gdbreplay.c: Include build-gnulib/config.h.
10514 * server.h: Likewise.
10515 * aclocal.m4: Regenerate.
10516 * config.in: Regenerate.
10517 * configure: Regenerate.
c971b7fa 10518
809277f8
PA
105192012-04-19 Pedro Alves <palves@redhat.com>
10520
10521 * Makefile.in (LIBGNU, INCGNU): Adjust.
10522 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10523 (all, install-only, uninstall, clean-info, all-lib, clean)
10524 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10525 * configure.ac: Adjust AC_OUTPUT output.
10526 * aclocal.m4: Regenerate.
10527 * configure: Regenerate.
10528
fd9bb8b8
PA
105292012-04-19 Pedro Alves <palves@redhat.com>
10530
10531 * Makefile.in (generated_files): New.
10532 (server_h): Remove the explicit dependency on config.h, and depend
10533 on $generated_files.
10534
1c298c66
PA
105352012-04-19 Pedro Alves <palves@redhat.com>
10536
10537 * Makefile.in (INCGNU): Add -Ignulib.
10538
57c4b50b
PA
105392012-04-19 Pedro Alves <palves@redhat.com>
10540
10541 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10542 (INCGNU): ... this, and spell out -I here.
10543 (GNULIB_LIB): Rename to ...
10544 (LIBGNU): ... this.
10545 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10546
1030e047
PA
105472012-04-19 Pedro Alves <palves@redhat.com>
10548
10549 * config.in: Regenerate.
10550
447d4319
PA
105512012-04-19 Pedro Alves <palves@redhat.com>
10552
10553 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10554 * server.h (memmem): Remove declaration.
10555 * config.in: Regenerate.
10556 * configure: Regenerate.
10557
aad9eab9
YQ
105582012-04-19 Yao Qi <yao@codesourcery.com>
10559
10560 * Makefile.in (SFILES): Add common/vec.c.
10561 (OBS): Add vec.o.
10562 (vec.o): New rule.
10563
3e10640f
YQ
105642012-04-19 Yao Qi <yao@codesourcery.com>
10565
10566 * remote-utils.c (prepare_resume_reply): Replace with macro
10567 target_core_of_thread.
10568 * server.c (handle_qxfer_threads_proper): Likewise.
10569 * target.h (traget_core_of_thread): New macro.
10570
71622373
PA
105712012-04-18 Pedro Alves <palves@redhat.com>
10572
10573 * aclocal.m4: Regenerate.
10574 * configure: Regenerate.
10575
80d26939
YQ
105762012-04-16 Yao Qi <yao@codesourcery.com>
10577
10578 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10579 duplicated on address.
10580
42476b70
YQ
105812012-04-16 Yao Qi <yao@codesourcery.com>
10582
10583 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10584 (struct tracepoint_action_ops) <send>: New field.
10585 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10586 (agent_expr_send, x_tracepoint_action_send): New.
10587 (l_tracepoint_action_send): New.
10588 (cmd_qtdp): Download and install tracepoint
10589 according to `use_agent'.
10590 (run_inferior_command): Add one more parameter `len'.
10591 Update callers.
10592 (tracepoint_send_agent): New.
10593 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10594
7bc83639
YQ
105952012-04-16 Yao Qi <yao@codesourcery.com>
10596
10597 * tracepoint.c (download_tracepoints): Moved to ...
10598 (cmd_qtstart): ... here.
10599
5f18041e
YQ
106002012-04-14 Yao Qi <yao@codesourcery.com>
10601
10602 * tracepoint.c: Include inttypes.h.
10603 (struct collect_memory_action): Use sized types.
10604 (struct tracepoint): Likewise.
10605 (cmd_qtdp, stop_tracing): Update print specifiers.
10606 (cmd_qtp, response_tracepoint): Likewise.
10607 (collect_data_at_tracepoint): Likewise.
10608 (collect_data_at_step): Likewise.
10609
55a8c076
YQ
106102012-04-14 Yao Qi <yao@codesourcery.com>
10611
10612 Import gnulib module inttypes.
10613 * aclocal.m4, config.in, configure: Regenerated.
10614
dc750257
YQ
106152012-04-14 Yao Qi <yao@codesourcery.com>
10616
10617 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10618 Makefile and config.status at last.
10619
0ab5faf9
YQ
106202012-04-13 Yao Qi <yao@codesourcery.com>
10621
10622 * tracepoint.c: Include stdint.h unconditionally.
10623
18f5fd81
TJB
106242012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10625
10626 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10627 on BFD_HAVE_SYS_PROCFS_TYPE.
10628 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10629 * configure: Regenerate.
10630 * config.in: Likewise.
10631
4d47af5c
L
106322012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10633
10634 * Makefile.in (clean): Also remove x32.c x32-linux.c
10635 x32-avx.c x32-avx-linux.c.
10636 (x32.o): New target.
10637 (x32.c): Likewise.
10638 (x32-linux.o): Likewise.
10639 (x32-linux.c): Likewise.
10640 (x32-avx.o): Likewise.
10641 (x32-avx.c): Likewise.
10642 (x32-avx-linux.o): Likewise.
10643 (x32-avx-linux.c): Likewise.
10644
10645 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10646 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10647 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10648 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10649 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10650 i386/x32-avx-linux.xml.
10651
10652 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10653 (init_registers_x32_avx_linux): Likwise.
10654 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10655 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10656
ecedbe58
PA
106572012-04-13 Pedro Alves <palves@redhat.com>
10658
10659 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10660 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10661 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10662 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10663 the sub-make.
10664
c92b5177
L
106652012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10666
10667 * linux-x86-low.c (compat_x32_clock_t): New.
10668 (compat_x32_siginfo_t): Likewise.
10669 (compat_x32_siginfo_from_siginfo): Likewise.
10670 (siginfo_from_compat_x32_siginfo): Likewise.
10671 (linux_is_elf64): Likewise.
10672 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10673 and siginfo_from_compat_x32_siginfo for x32.
10674 (x86_arch_setup): Set linux_is_elf64.
10675
214d508e
L
106762012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10677
10678 PR gdb/13969
10679 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10680 e_machine field.
10681 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10682 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10683 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10684 compatible with process.
10685
c9a1864a
YQ
106862012-04-12 Yao Qi <yao@codesourcery.com>
10687
10688 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10689 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10690 (install-only, install-info, clean): Handle sub dir gnulib.
10691 (all-lib, am--refresh): New targets.
10692 (memmem.o): Remove target.
10693 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10694 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10695 (AC_REPLACE_FUNCS): Remove memmem.
10696 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10697 (AC_OUTPUT): Generate Makefile in gnulib/.
10698 * aclocal.m4, config.in, configure: Regenerated.
10699
367ba2c2
MR
107002012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10701
10702 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10703
9d236627
PA
107042012-04-05 Pedro Alves <palves@redhat.com>
10705
10706 -Werror=strict-aliasing
10707
10708 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10709 pointer.
10710
111217b3
PA
107112012-04-04 Pedro Alves <palves@redhat.com>
10712
10713 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10714 (sparc_store_gregset_from_stack, sparc_store_gregset)
10715 (sparc_breakpoint_at): Fix formatting.
10716
8365dcf5
TJB
107172012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10718
10719 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10720 are available.
10721 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10722 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10723 * config.in: Regenerate.
10724 * configure: Likewise.
10725
689cc2ae
PA
107262012-03-29 Pedro Alves <palves@redhat.com>
10727
10728 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10729 Correct ptrace arguments.
10730
c14dfd32
PA
107312012-03-28 Pedro Alves <palves@redhat.com>
10732
10733 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10734 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10735 (IA64_FR1_REGNUM): New defines.
10736 (ia64_fetch_register): New.
10737 (the_low_target): Install it.
10738 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10739 field.
10740 * linux-low.c (linux_fetch_registers): Try the
10741 the_low_target.fetch_register hook first.
10742
10743 * linux-arm-low.c (the_low_target): Adjust.
10744 * linux-bfin-low.c (the_low_target): Adjust.
10745 * linux-cris-low.c (the_low_target): Adjust.
10746 * linux-crisv32-low.c (the_low_target): Adjust.
10747 * linux-m32r-low.c (the_low_target): Adjust.
10748 * linux-m68k-low.c (the_low_target): Adjust.
10749 * linux-mips-low.c (the_low_target): Adjust.
10750 * linux-ppc-low.c (the_low_target): Adjust.
10751 * linux-s390-low.c (the_low_target): Adjust.
10752 * linux-sh-low.c (the_low_target): Adjust.
10753 * linux-sparc-low.c (the_low_target): Adjust.
10754 * linux-tic6x-low.c (the_low_target): Adjust.
10755 * linux-x86-low.c (the_low_target): Adjust.
10756 * linux-xtensa-low.c (the_low_target): Adjust.
10757
63c88e13
PA
107582012-03-26 Pedro Alves <palves@redhat.com>
10759
10760 * server.c (handle_qxfer_libraries): Don't bail early if
10761 the_target->qxfer_libraries_svr4 is not NULL.
10762
fb723180
PA
107632012-03-26 Pedro Alves <palves@redhat.com>
10764
10765 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10766
0afae3cf
PA
107672012-03-23 Pedro Alves <palves@redhat.com>
10768
10769 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10770 "library-list-svr4" element's start tag when the the DSO list is
10771 empty.
10772
485f1ee4
PA
107732012-03-23 Pedro Alves <palves@redhat.com>
10774
10775 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10776 a variable whose type size is the same as the inferior's pointer
10777 size.
10778
a5362b9a
TS
107792012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10780
10781 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10782 struct siginfo.
10783 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10784 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10785 * linux-low.h: Include <signal.h>.
10786 (struct siginfo): Remove forward declaration.
10787 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10788 struct siginfo.
10789
d226c142
MF
107902012-03-21 Mike Frysinger <vapier@gentoo.org>
10791
10792 * .gitignore: Ignore more files.
10793
122f36ef
PA
107942012-03-19 Pedro Alves <palves@redhat.com>
10795 Jan Kratochvil <jan.kratochvil@redhat.com>
10796
10797 * server.c (cont_thread, general_thread): Add describing comments.
10798 (start_inferior): Clear `cont_thread'.
10799 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10800 of a process.
10801
fc3e5175
YQ
108022012-03-15 Yao Qi <yao@codesourcery.com>
10803
10804 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10805 handling to ...
10806 (cmd_qtdp): ... here.
10807
8d0d92cd
YQ
108082012-03-15 Yao Qi <yao@codesourcery.com>
10809
10810 * tracepoint.c (struct tracepoint_action_ops): New.
10811 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10812 (m_tracepoint_action_download): New.
10813 (r_tracepoint_action_download): New.
10814 (x_tracepoint_action_download): New.
10815 (l_tracepoint_action_download): New.
10816 (add_tracepoint_action): Install `action->ops' according type.
10817 (download_tracepoint_1): Move code `download' function pointer
10818 of various tracepoint_action_ops.
10819
87b0bb13
JK
108202012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10821
10822 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10823 linux_ptrace_attach_warnings.
10824
5f572dec
JK
108252012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10826
10827 * Makefile.in (linux-ptrace.o): New.
10828 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10829 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10830 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10831 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10832 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10833 of these targets.
10834 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10835
f4647387
YQ
108362012-03-08 Yao Qi <yao@codesourcery.com>
10837 Pedro Alves <palves@redhat.com>
10838
10839 Fix PR server/13392.
10840 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10841 offset of JMP insn.
10842 * tracepoint.c (remove_tracepoint): New.
10843 (cmd_qtdp): Call remove_tracepoint when failed to install.
10844
9b224c5e
PA
108452012-03-07 Pedro Alves <palves@redhat.com>
10846
10847 * linux-low.c (get_detach_signal): New.
10848 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10849 Pass on pending signals to PTRACE_DETACH. Check the result of the
10850 ptrace call.
10851 * server.c (program_signals, program_signals_p): New.
10852 (handle_general_set): Handle QProgramSignals.
10853 * server.h (program_signals, program_signals_p): Declare.
10854
e237a7e2
JK
108552012-03-05 Pedro Alves <palves@redhat.com>
10856 Jan Kratochvil <jan.kratochvil@redhat.com>
10857
10858 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10859 New comment why.
10860
5808517f
YQ
108612012-03-03 Yao Qi <yao@codesourcery.com>
10862
10863 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10864 agent_look_up_symbols.
10865
58b4daa5
YQ
108662012-03-03 Yao Qi <yao@codesourcery.com>
10867
10868 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10869 (linux-x86-low.o): Likewise.
10870 * server.h: Remove in_process_agent_loaded.
10871 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10872 common/agent.c.
10873 Update callers.
10874
8ffcbaaf
YQ
108752012-03-03 Yao Qi <yao@codesourcery.com>
10876
10877 * tracepoint.c (gdb_agent_capability): New global.
10878 (in_process_agent_loaded_ust): Renamed to
10879 `in_process_agent_supports_ust'.
10880 Update callers.
10881 (in_process_agent_supports_ust): Call agent_capability_check.
10882 (clear_installed_tracepoints): Assert that agent supports
10883 agent.
10884
d1feda86
YQ
108852012-03-03 Yao Qi <yao@codesourcery.com>
10886
10887 * linux-low.c (linux_supports_agent): New.
10888 (linux_target_ops): Initialize field `supports_agent' with
10889 linux_supports_agent.
10890 * target.h (struct target_ops) <supports_agent>: New.
10891 (target_supports_agent): New macro.
10892 * server.c (handle_general_set): Handle packet 'QAgent'.
10893 (handle_query): Send `QAgent+'.
10894 * Makefile.in (server.o): Depends on agent.h.
10895
2fa291ac
YQ
108962012-03-03 Yao Qi <yao@codesourcery.com>
10897
10898 * Makefile.in (OBS): Add agent.o.
10899 Add new rule for agent.o.
10900 Track dependence of tracepoint.c on agent.h.
10901 * tracepoint.c (run_inferior_command_1):
10902 (run_inferior_command): Call agent_run_command.
10903 (gdb_ust_connect_sync_socket): Deleted. Move it to
10904 common/agent.c.
10905 (resume_thread, stop_thread): Likewise.
10906 (gdb_ust_socket_init): Renamed to ...
10907 (gdb_agent_socket_init): ... New.
10908 (gdb_ust_thread): Renamed to ...
10909 (gdb_agent_helper_thread): ... New.
10910 (gdb_ust_init): Move some code to ...
10911 (gdb_agent_init): ... here. New.
10912 [HAVE_UST]: Call gdb_ust_init.
10913 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10914 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10915 * config.in, configure: Regenerated.
10916
05044653
PA
109172012-03-02 Pedro Alves <palves@redhat.com>
10918
10919 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10920 * linux-low.c (struct simple_pid_list): New.
10921 (stopped_pids): New a struct simple_pid_list pointer.
10922 (add_to_pid_list, pull_pid_from_list): New.
10923 (handle_extended_wait): Don't assume the first signal new children
10924 report is SIGSTOP. Adjust call to pull_pid_from_list.
10925 (linux_wait_for_lwp): Adjust.
10926
8d00225b
YQ
109272012-03-02 Yao Qi <yao@codesourcery.com>
10928
10929 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10930 debug log.
10931
19560ba5
YQ
109322012-03-02 Yao Qi <yao@codesourcery.com>
10933
10934 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10935 `stop_pc' and `tpoint'. Update caller.
10936
1faeff08
MR
109372012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10938
10939 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10940 * linux-low.c (use_linux_regsets): New macro.
10941 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10942 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10943 (linux_register_in_regsets): New function.
10944 (usr_fetch_inferior_registers): Skip registers covered by
10945 regsets.
10946 (usr_store_inferior_registers): Likewise.
10947 (usr_fetch_inferior_registers): New macro.
10948 (usr_store_inferior_registers): Likewise.
10949 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10950 (linux_store_registers): Likewise.
10951 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10952 prototype.
10953 (init_registers_mips64_dsp_linux): Likewise.
10954 (init_registers_mips_linux): New macro.
10955 (init_registers_mips_dsp_linux): Likewise.
10956 (mips_dsp_num_regs): Likewise.
10957 (DSP_BASE, DSP_CONTROL): New fallback macros.
10958 (mips_base_regs): New macro.
10959 (mips_regmap): Use it. Fix the size.
10960 (mips_dsp_regmap): New variable.
10961 (mips_dsp_regset_bitmap): Likewise.
10962 (mips_arch_setup): New function.
10963 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10964 than mips_regmap.
10965 (mips_cannot_store_register): Likewise.
10966 (the_low_target): Update .arch_setup, .num_regs and .regmap
10967 initializers. Add .regset_bitmap initializer.
10968 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10969 initializer.
10970 * linux-bfin-low.c (the_low_target): Likewise.
10971 * linux-cris-low.c (the_low_target): Likewise.
10972 * linux-crisv32-low.c (the_low_target): Likewise.
10973 * linux-ia64-low.c (the_low_target): Likewise.
10974 * linux-m32r-low.c (the_low_target): Likewise.
10975 * linux-m68k-low.c (the_low_target): Likewise.
10976 * linux-ppc-low.c (the_low_target): Likewise.
10977 * linux-s390-low.c (the_low_target): Likewise.
10978 * linux-sh-low.c (the_low_target): Likewise.
10979 * linux-sparc-low.c (the_low_target): Likewise.
10980 * linux-tic6x-low.c (the_low_target): Likewise.
10981 * linux-x86-low.c (the_low_target): Likewise.
10982 * linux-xtensa-low.c (the_low_target): Likewise.
10983 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10984 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10985 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10986 srv_xmlfiles.
10987 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10988 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10989
c03e6ccc
YQ
109902012-02-29 Yao Qi <yao@codesourcery.com>
10991 Pedro Alves <palves@redhat.com>
10992
10993 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10994 `step_over_finished' is true.
10995
644cebc9
PA
109962012-02-27 Pedro Alves <palves@redhat.com>
10997
10998 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10999 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11000
c14d7ab2
PA
110012012-02-27 Pedro Alves <palves@redhat.com>
11002
11003 PR server/9684
11004 * linux-low.c (pid_is_stopped): New.
11005 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11006
412c89dd
LM
110072012-02-25 Luis Machado <lgustavo@codesourcery.com>
11008
11009 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11010 of conditions.
11011
b745defe
MR
110122012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11013
11014 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11015
9f3a5c85
LM
110162012-02-24 Luis Machado <lgustavo@codesourcery>
11017
11018 * server.c (handle_query): Advertise support for target-side
11019 breakpoint condition evaluation.
11020 (process_point_options): New function.
11021 (process_serial_event): When inserting a breakpoint, check for
11022 a target-side condition that should be evaluated.
11023
11024 * mem-break.c: Include regcache.h and ax.h.
11025 (point_cond_list_t): New data structure.
11026 (breakpoint) <cond_list>: New field.
11027 (find_gdb_breakpoint_at): Make non-static.
11028 (delete_gdb_breakpoint_at): Clear any target-side
11029 conditions.
11030 (clear_gdb_breakpoint_conditions): New function.
11031 (add_condition_to_breakpoint): Likewise.
11032 (add_breakpoint_condition): Likewise.
11033 (gdb_condition_true_at_breakpoint): Likewise.
11034 (gdb_breakpoint_here): Return result directly instead
11035 of going through a local variable.
11036
11037 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11038 (clear_gdb_breakpoint_conditions): Likewise.
11039 (add_breakpoint_condition): Likewise.
11040 (gdb_condition_true_at_breakpoint): Likewise.
11041
11042 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11043 (need_step_over_p): Take target-side breakpoint condition into
11044 consideration.
11045
5e1dc496
LM
110462012-02-24 Luis Machado <lgustavo@codesourcery>
11047
11048 * server.h: Include tracepoint.h.
11049 (agent_mem_read, agent_get_trace_state_variable_value,
11050 agent_set_trace_state_variable_value,
11051 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11052 get_set_tsv_func_addr): New prototypes.
11053
11054 * ax.h: New include file.
11055 * ax.c: New source file.
11056
11057 * tracepoint.c: Include ax.h.
11058 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11059 agent_expr, eval_result_type): Move to ax.h.
11060 (parse_agent_expr): Rename to ...
11061 (gdb_parse_agent_expr): ... this, make it non-static and move
11062 to ax.h.
11063 (unparse_agent_expr) Rename to ...
11064 (gdb_unparse_agent_expr): ... this, make it non-static and move
11065 to ax.h.
11066 (eval_agent_expr): Rename to ...
11067 (eval_tracepoint_agent_expr): ... this.
11068 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11069 forward declarations.
11070 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11071 (agent_get_trace_state_variable_value): New function.
11072 (agent_set_trace_state_variable_value): New function.
11073 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11074 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11075 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11076 (condition_true_at_tracepoint): Likewise.
11077 (parse_agent_expr): Rename to ...
11078 (gdb_parse_agent_expr): ... this and move to ax.c.
11079 (unparse_agent_expr): Rename to ...
11080 (gdb_unparse_agent_expr): ... this and move to ax.c.
11081 (gdb_agent_op_name): Move to ax.c.
11082 (eval_agent_expr): Rename to ...
11083 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11084 and move to ax.c.
11085 (eval_tracepoint_agent_expr): New function.
11086 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11087 non-static.
5e1dc496
LM
11088 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11089 ax.c.
11090 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11091 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11092 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11093 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11094 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11095 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11096 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11097 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11098 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11099 (compile_bytecodes): Remove forward declaration.
11100 (is_goto_target): Move to ax.c.
11101 (compile_bytecodes): Move to ax.c and call
11102 agent_get_trace_state_variable_value (...) and
11103 agent_set_trace_state_variable_value (...).
11104
11105 * Makefile.in: Update ax.c and IPA dependencies.
11106
277e4e52
PA
111072012-02-24 Pedro Alves <palves@redhat.com>
11108
11109 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11110 (cmd_bigqtbuffer_circular): ... this. Only handle
11111 'QTBuffer:circular:'.
11112 (handle_tracepoint_general_set): Adjust.
11113
bf4c19f7
YQ
111142012-02-16 Yao Qi <yao@codesourcery.com>
11115
11116 * inferiors.c: Move code to ...
11117 * dll.c: .... here. New.
11118 * server.h: Declare clear_dlls.
11119 * Makefile.in (SFILES): Add dll.c.
11120 (OBS): Add dll.o
11121 (dll.o): New rule.
11122
d73f2619
YQ
111232012-02-11 Yao Qi <yao@codesourcery.com>
11124
11125 * server.c: (handle_monitor_command): Add a new parameter
11126 `own_buf'.
11127 (handle_query): Update caller.
11128
f8255c2a
JB
111292012-02-09 Joel Brobecker <brobecker@adacore.com>
11130
11131 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11132 * configure, config.in: Regenerate.
11133 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11134 is not defined.
11135
da84f473
PA
111362012-02-02 Pedro Alves <palves@redhat.com>
11137
11138 Try SIGKILL first, then PTRACE_KILL.
11139 * linux-low.c (linux_kill_one_lwp): New.
11140 (linux_kill_one_lwp): Rename to ...
11141 (kill_one_lwp_callback): ... this. Use the new
11142 linux_kill_one_lwp.
11143
e886a173
PA
111442012-02-02 Pedro Alves <palves@redhat.com>
11145
11146 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11147 inferior.
11148
be07f1a2
PA
111492012-01-27 Pedro Alves <palves@redhat.com>
11150
11151 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11152 (elf_64_file_p): Make static.
11153 (linux_pid_exe_is_elf_64_file): New.
11154 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11155 Delete declarations.
11156 (linux_pid_exe_is_elf_64_file): Declare.
11157 * linux-x86-low.c (x86_arch_setup): Use
11158 linux_pid_exe_is_elf_64_file.
11159
d8301ad1
JK
111602012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11161
11162 * linux-low.c (linux_wait_for_event_1): Rename to ...
11163 (linux_wait_for_event): ... here and merge it with former
11164 linux_wait_for_event - new variable wait_ptid, use it.
11165 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11166
01b17894
PA
111672012-01-23 Pedro Alves <palves@redhat.com>
11168
11169 * server.c (main): Avoid yet another case of infinite loop while
11170 detaching/killing after a longjmp.
11171
e825046f
JK
111722012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11173
11174 Code cleanup.
11175 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11176
b9e7b9c3
UW
111772012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11178
11179 * hostio.c (handle_readlink): New function.
11180 (handle_vFile): Call it to handle "vFile:readlink" packets.
11181
901f9912
UW
111822012-01-20 Pedro Alves <palves@redhat.com>
11183 Ulrich Weigand <ulrich.weigand@linaro.org>
11184
11185 * server.c (handle_v_requests): Only support vAttach and vRun to
11186 start multiple processes when in extended protocol mode.
11187
fc1ab1a0
PA
111882012-01-17 Pedro Alves <palves@redhat.com>
11189
11190 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11191 memalign plus mprotect to allocate the scratch buffer.
11192
7d5d4e98
PA
111932012-01-13 Pedro Alves <palves@redhat.com>
11194
11195 * server.c (attach_inferior): Clear `cont_thread'.
11196
f128d5e9
PA
111972012-01-13 Pedro Alves <palves@redhat.com>
11198
11199 * server.c (main): Avoid infinite loop while detaching/killing
11200 after a longjmp.
11201
06db92f0
DE
112022012-01-09 Doug Evans <dje@google.com>
11203
11204 * server.c (start_inferior): Set last_ptid in --wrapper case.
11205
32d92999
YQ
112062012-01-06 Yao Qi <yao@codesourcery.com>
11207
11208 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11209 defined.
11210 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11211
5e0a92a9
YQ
112122012-01-04 Yao Qi <yao@codesourcery.com>
11213
11214 * tracepoint.c (cmd_qtdp): Print debug message
11215 for static tracepoint.
11216
ae639e8c
YQ
112172012-01-04 Yao Qi <yao@codesourcery.com>
11218
11219 * tracepoint.c (trace_vdebug): Differentiate debug message
11220 between gdbserver and IPA.
11221
f72429c5
YQ
112222012-01-03 Yao Qi <yao@codesourcery.com>
11223
11224 * tracepoint.c (tracepoint_was_hit): Don't collect for
11225 static tracepoint.
11226
12c3e59c
JB
112272012-01-02 Joel Brobecker <brobecker@adacore.com>
11228
11229 * terminal.h: Reformat copyright header.
11230
67827812
JB
112312012-01-02 Joel Brobecker <brobecker@adacore.com>
11232
11233 * server.c (gdbserver_version): Update copyright year.
11234 * gdbreplay.c (gdbreplay_version): Likewise.
11235
3e52c33d
JK
112362011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11237
11238 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11239
11240 Revert:
11241 2011-12-18 Hui Zhu <teawater@gmail.com>
11242 * linux-low.c (linux_create_inferior): Save return value to ret.
11243
66f1260e
HZ
112442011-12-18 Hui Zhu <teawater@gmail.com>
11245
11246 * linux-low.c (linux_create_inferior): Save return value to ret.
11247
e77616d7
DE
112482011-12-16 Doug Evans <dje@google.com>
11249
e7b06c57
DE
11250 * linux-low.c (linux_create_inferior): If stdio connection,
11251 redirect stdin from /dev/null, stdout to stderr.
11252 * remote-utils.c (remote_is_stdio): New static global.
11253 (remote_connection_is_stdio): New function.
11254 (remote_prepare): Handle stdio connection.
11255 (remote_open): Ditto.
11256 (remote_close): Don't close stdin for stdio connections.
11257 (read_prim,write_prim): New functions. Replace all calls to
11258 read/write to these.
11259 * server.c (main): Watch for "-" argument. Move call to
11260 remote_prepare before start_inferior.
11261 * server.h (STDIO_CONNECTION_NAME): New macro.
11262 (remote_connection_is_stdio): Declare.
11263
e77616d7
DE
11264 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11265 in debugging output.
11266
82067193
YQ
112672011-12-15 Yao Qi <yao@codesourcery.com>
11268
11269 * tracepoint.c: Include sys/syscall.h.
11270 (gdb_ust_thread): Remove preprocessor conditional.
11271
82bfbe7e
PA
112722011-12-14 Pedro Alves <pedro@codesourcery.com>
11273
11274 * linux-low.c (linux_detach_one_lwp): Call
11275 the_low_target.prepare_to_resume before detaching.
11276
712c6575
YQ
112772011-12-14 Yao Qi <yao@codesourcery.com>
11278
11279 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11280 of write.
11281
d54d1edf
YQ
112822011-12-14 Yao Qi <yao@codesourcery.com>
11283
11284 * i386-low.c (i386_low_stopped_data_address): Initialize local
11285 variable `control'.
11286
6210a125
PA
112872011-12-13 Pedro Alves <pedro@codesourcery.com>
11288
11289 PR remote/13492
11290
11291 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11292 DR_CONTROL unless necessary. Extend comments.
11293 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11294 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11295
2ece8244
YQ
112962011-12-13 Yao Qi <yao@codesourcery.com>
11297
11298 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11299 macros.
11300 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11301
784867a5
JK
113022011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11303
11304 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11305 Print new debug message for such case.
11306
6bf36717
JK
113072011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11308
11309 Fix overlapping memcpy.
11310 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11311 the read_inferior_memory transfer.
11312 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11313 write_inferior_memory transfer.
11314 (set_fast_tracepoint_jump): New variable buf. Use it for the
11315 read_inferior_memory and write_inferior_memory transfers.
11316 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11317 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11318 Use it for the write_inferior_memory transfer.
11319 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11320 buffers.
11321
50275556
MR
113222011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11323
11324 * linux-low.c (fetch_register, store_register): Make code
11325 consistent, fix formatting.
11326
7325beb4
MR
113272011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11328
11329 * linux-low.c (usr_store_inferior_registers): Factor out code
11330 to handle individual registers into...
11331 (store_register): ... this new function.
11332
c642a434
UW
113332011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11334
11335 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11336 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11337 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11338 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11339 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11340 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11341 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11342 (srv_xmlfiles): Add new XML files.
11343
11344 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11345 and <sys/uio.h>.
11346 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11347 (init_registers_s390_linux32v1): Add prototype.
11348 (init_registers_s390_linux32v2): Likewise.
11349 (init_registers_s390_linux64v1): Likewise.
11350 (init_registers_s390_linux64v2): Likewise.
11351 (init_registers_s390x_linux64v1): Likewise.
11352 (init_registers_s390x_linux64v2): Likewise.
11353 (s390_num_regs): Increment to 52.
11354 (s390_regmap): Add orig_r2 register.
11355 (s390_num_regs_3264): Increment to 68.
11356 (s390_regmap_3264): Add orig_r2 register.
11357 (s390_collect_ptrace_register): Handle orig_r2 register.
11358 (s390_supply_ptrace_register): Likewise.
11359 (s390_fill_last_break): New function.
11360 (s390_store_last_break): Likewise.
11361 (s390_fill_system_call): New function.
11362 (s390_store_system_call): Likewise.
11363 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11364 register sets.
11365 (s390_check_regset): New function.
11366 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11367 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11368 Update target_regsets for available register sets.
11369
2268b414
JK
113702011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11371 Jan Kratochvil <jan.kratochvil@redhat.com>
11372
11373 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11374 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11375 New.
11376 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11377 * linux-low.h (struct process_info_private): New member r_debug.
11378 * server.c (handle_qxfer_libraries): Call
11379 the_target->qxfer_libraries_svr4.
11380 (handle_qxfer_libraries_svr4): New function.
11381 (qxfer_packets): New entry "libraries-svr4".
11382 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11383 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11384 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11385 PACKET_qXfer_libraries_svr4.
11386
d6db1fab
UW
113872011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11388
11389 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11390 PSW address/mask between 8-byte and 16-byte formats.
11391 (s390_supply_ptrace_register): Likewise.
11392 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11393 basic addressing mode bit.
11394
242f5f1c
SS
113952011-11-24 Stan Shebs <stan@codesourcery.com>
11396
11397 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11398
f196051f
SS
113992011-11-17 Stan Shebs <stan@codesourcery.com>
11400
11401 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11402 (tracing_start_time): New global.
11403 (tracing_stop_time): New global.
11404 (tracing_user_name): New global.
11405 (tracing_notes): New global.
11406 (tracing_stop_note): New global.
11407 (cmd_qtstart): Set traceframe_usage, start_time.
11408 (stop_tracing): Set stop_time.
11409 (cmd_qtstatus): Report additional status.
11410 (cmd_qtp): New function.
11411 (handle_tracepoint_query): Call it.
11412 (cmd_qtnotes): New function.
11413 (handle_tracepoint_general_set): Call it.
11414 (get_timestamp): Rename from tsv_get_timestamp.
11415
405f8e94
SS
114162011-11-14 Stan Shebs <stan@codesourcery.com>
11417 Kwok Cheung Yeung <kcy@codesourcery.com>
11418
11419 * linux-x86-low.c (small_jump_insn): New.
11420 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11421 trampoline and error message, build a trampoline and issue a small
11422 jump instruction to it.
11423 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11424 trampoline and error message.
11425 (x86_get_min_fast_tracepoint_insn_len): New.
11426 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11427 * linux-low.h (struct linux_target_ops): Add arguments to
11428 install_fast_tracepoint_jump_pad operation, add new operation.
11429 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11430 arguments.
11431 (linux_get_min_fast_tracepoint_insn_len): New function.
11432 (linux_target_op): Add new operation.
11433 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11434 (gdb_trampoline_buffer_end): Ditto.
11435 (gdb_trampoline_buffer_error): Ditto.
11436 (struct ipa_sym_addresses): Add fields for new IPA variables.
11437 (symbol_list): Add entries for new IPA variables.
11438 (struct tracepoint): Add fields to hold the address range of the
11439 trampoline used by the tracepoint.
11440 (trampoline_buffer_head): New static variable.
11441 (trampoline_buffer_tail): Ditto.
11442 (claim_trampoline_space): New function.
11443 (have_fast_tracepoint_trampoline_buffer): New function.
11444 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11445 structure.
11446 (install_fast_tracepoint): Ditto, also add error buffer argument.
11447 (cmd_qtminftpilen): New function.
11448 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11449 (fast_tracepoint_from_trampoline_address): New function.
11450 (fast_tracepoint_collecting): Handle trampoline as part of jump
11451 pad space.
11452 (set_trampoline_buffer_space): New function.
11453 (initialize_tracepoint): Initialize new IPA variables.
11454 * target.h (struct target_ops): Add arguments to
11455 install_fast_tracepoint_jump_pad operation, add new
11456 get_min_fast_tracepoint_insn_len operation.
11457 (target_get_min_fast_tracepoint_insn_len): New.
11458 (install_fast_tracepoint_jump_pad): Add arguments.
11459 * server.h (IPA_BUFSIZ): Define.
11460 * linux-i386-ipa.c: Include extra header files.
11461 (initialize_fast_tracepoint_trampoline_buffer): New function.
11462 (initialize_low_tracepoint): Call it.
11463 * server.h (set_trampoline_buffer_space): Declare.
11464 (claim_trampoline_space): Ditto.
11465 (have_fast_tracepoint_trampoline_buffer): Ditto.
11466
1e4d1764
YQ
114672011-11-14 Yao Qi <yao@codesourcery.com>
11468
11469 * server.c (handle_query): Handle InstallInTrace for qSupported.
11470 * tracepoint.c (add_tracepoint): Sort list.
11471 (install_tracepoint, download_tracepoint): New.
11472 (cmd_qtdp): Call them to install and download tracepoints.
11473 (sort_tracepoints): Removed.
11474 (cmd_qtstart): Update.
11475
5c73ff4e
YQ
114762011-11-14 Yao Qi <yao@codesourcery.com>
11477
11478 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11479 * mem-break.h: Declare.
11480 * tracepoint.c (cmd_qtstart): Move some code to ...
11481 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11482 New.
11483 (download_tracepoints): Move some code to ...
11484 (download_tracepoint_1): ... here. New.
11485
86a30030
YQ
114862011-11-08 Yao Qi <yao@codesourcery.com>
11487
11488 * remote-utils.c (relocate_instruction): A comment fix.
11489
8d26e50c
JB
114902011-11-07 Joel Brobecker <brobecker@adacore.com>
11491
11492 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11493 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11494 dr_status_mirror and dr_control_mirror from debug_reg_state.
11495 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11496 (i386_initial_stuff): Remove use of deleted globals.
11497 (i386_get_thread_context, i386_set_thread_context,
11498 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11499 from debug_reg_state.
11500
a59306a3
YQ
115012011-11-05 Yao Qi <yao@codesourcery.com>
11502
11503 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11504 address as TPOINT's.
11505
3065dfb6
SS
115062011-11-02 Stan Shebs <stan@codesourcery.com>
11507
11508 * tracepoint.c (agent_mem_read_string): New function.
11509 (eval_agent_expr): Call it for tracenz.
11510 * server.c (handle_query): Report support for tracenz.
11511
fd0d8c7c
YQ
115122011-11-02 Yao Qi <yao@codesourcery.com>
11513
11514 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11515
609086b1
YQ
115162011-11-02 Yao Qi <yao@codesourcery.com>
11517
11518 * target.h: Fix a typo in comment.
11519
b9fd1791
PA
115202011-10-31 Pedro Alves <pedro@codesourcery.com>
11521
11522 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11523 clobber the breakpoints' shadows with fast tracepoint jumps.
11524 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11525 * target.c (write_inferior_memory): Also pass MYADDR down to
11526 check_mem_write.
11527
03583c20
UW
115282011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11529
11530 * configure.ac: Check support for personality routine.
11531 * configure: Regenerate.
11532 * config.in: Likewise.
11533 * linux-low.c: Include <sys/personality.h>.
11534 Define ADDR_NO_RANDOMIZE if necessary.
11535 (linux_create_inferior): Disable address space randomization when
11536 forking inferior, if requested.
11537 (linux_supports_disable_randomization): New function.
11538 (linux_target_ops): Install it.
11539 * server.h (disable_randomization): Declare.
11540 * server.c (disable_randomization): New global variable.
11541 (handle_general_set): Handle QDisableRandomization.
11542 (handle_query): Likewise for qSupported.
11543 (main): Support --disable-randomization and --no-disable-randomization
11544 command line arguments.
11545 * target.h (struct target_ops): Add supports_disable_randomization.
11546 (target_supports_disable_randomization): New macro.
11547
723b724b
MF
115482011-09-29 Mike Frysinger <vapier@gentoo.org>
11549
11550 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11551 ifdef check.
11552 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11553 [!PT_GETDSBT] (target_loadmap): New definition.
11554 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11555 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11556 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11557 and PT_GETDSBT to LINUX_LOADMAP.
11558 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11559 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11560
55329a5c 115612011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11562
11563 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11564 (arm_linux_hwbp_cap): New static variable.
11565 (arm_linux_get_hwbp_cap): Replace by ...
11566 (arm_linux_init_hwbp_cap): ... this new function.
11567 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11568 (arm_linux_get_hw_watchpoint_count): Likewise.
11569 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11570 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11571 (arm_prepare_to_resume): Use perror_with_name instead of error.
11572
55329a5c 115732011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11574
11575 * linux-arm-low.c: Include <signal.h>.
11576 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11577 (struct arm_linux_hwbp_cap): New data type.
11578 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11579 (struct arm_linux_hw_breakpoint): New data type.
11580 (MAX_BPTS, MAX_WPTS): Define.
11581 (struct arch_process_info, struct arch_lwp_info): New data types.
11582 (arm_linux_get_hwbp_cap): New function.
11583 (arm_linux_get_hw_breakpoint_count): Likewise.
11584 (arm_linux_get_hw_watchpoint_count): Likewise.
11585 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11586 (arm_hwbp_control_initialize): Likewise.
11587 (arm_hwbp_control_is_enabled): Likewise.
11588 (arm_hwbp_control_is_initialized): Likewise.
11589 (arm_hwbp_control_disable): Likewise.
11590 (arm_linux_hw_breakpoint_equal): Likewise.
11591 (arm_linux_hw_point_initialize): Likewise.
11592 (struct update_registers_data): New data structure.
11593 (update_registers_callback: New function.
11594 (arm_insert_point): Likewise.
11595 (arm_remove_point): Likewise.
11596 (arm_stopped_by_watchpoint): Likewise.
11597 (arm_stopped_data_address): Likewise.
11598 (arm_new_process): Likewise.
11599 (arm_new_thread): Likewise.
11600 (arm_prepare_to_resume): Likewise.
11601 (the_low_target): Register arm_insert_point, arm_remove_point,
11602 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11603 arm_new_thread, and arm_prepare_to_resume.
11604
6b9801d4
SS
116052011-09-15 Stan Shebs <stan@codesourcery.com>
11606
11607 * server.h (struct emit_ops): Add compare-goto fields.
11608 * tracepoint.c (gdb_agent_op_sizes): New table.
11609 (emit_eq_goto): New function.
11610 (emit_ne_goto): New function.
11611 (emit_lt_goto): New function.
11612 (emit_le_goto): New function.
11613 (emit_gt_goto): New function.
11614 (emit_ge_goto): New function.
11615 (is_goto_target): New function.
11616 (compile_bytecodes): Recognize special cases of compare-goto
11617 combinations and call specialized emitters for them.
11618 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11619 (amd64_emit_ne_goto): New function.
11620 (amd64_emit_lt_goto): New function.
11621 (amd64_emit_le_goto): New function.
11622 (amd64_emit_gt_goto): New function.
11623 (amd64_emit_ge_goto): New function.
11624 (amd64_emit_ops): Add the new functions.
11625 (i386_emit_eq_goto): New function.
11626 (i386_emit_ne_goto): New function.
11627 (i386_emit_lt_goto): New function.
11628 (i386_emit_le_goto): New function.
11629 (i386_emit_gt_goto): New function.
11630 (i386_emit_ge_goto): New function.
11631 (i386_emit_ops): Add the new functions.
11632
bf15cbda
SS
116332011-09-08 Stan Shebs <stan@codesourcery.com>
11634
11635 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11636 (i386_emit_epilogue): Restore %ebx.
11637
943ca1dd
JZ
116382011-08-31 Jie Zhang <jzhang918@gmail.com>
11639
11640 * server.c (step_thread): Remove definition.
11641 (process_serial_event): Don't handle Hs.
11642 * server.h (step_thread): Remove declaration.
11643 * target.c (set_desired_inferior): Remove use of step_thread.
11644
e3deef73
LM
116452011-08-24 Luis Machado <lgustavo@codesourcery.com>
11646
11647 * linux-low.c: Include linux-procfs.h.
11648 (linux_attach_lwp_1): Update comments.
11649 (linux_attach): Scan for existing threads when attaching to a
11650 process that is the tgid.
11651 * Makefile.in: Update dependencies.
11652
13da1c97
LM
116532011-08-24 Luis Machado <lgustavo@codesourcery.com>
11654
11655 * configure.srv: Add linux-procfs.o dependencies.
11656
881127c9
YQ
116572011-08-14 Yao Qi <yao@codesourcery.com>
11658
11659 * target.h (struct target_ops): Fix indent.
11660 * win32-low.c (win32_target_ops): Fix comment.
11661
58dbd541
YQ
116622011-08-14 Andrew Jenner <andrew@codesourcery.com>
11663 Yao Qi <yao@codesourcery.com>
11664
11665 * Makefile.in (clean): Remove tic6x-*.c files.
11666 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11667 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11668 (tic6x-c64xp-linux.c): Likewise.
11669 * configure.srv: Add support for tic6x-*-uclinux.
11670 * linux-tic6x-low.c: New.
11671 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11672
78d85199
YQ
116732011-08-14 Andrew Stubbs <ams@codesourcery.com>
11674 Yao Qi <yao@codesourcery.com>
11675
11676 * target.h (struct target_ops): Add read_loadmap.
11677 * linux-low.c (struct target_loadseg): New type.
11678 (struct target_loadmap): New type.
11679 (linux_read_loadmap): New function.
11680 (linux_target_ops): Add linux_read_loadmap.
11681 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11682 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11683 to NULL.
78d85199 11684
a959a88d
EZ
116852011-08-05 Eli Zaretskii <eliz@gnu.org>
11686
11687 * win32-low.c: Include <stdint.h>.
11688
1ced966e
PA
116892011-07-22 Pedro Alves <pedro@codesourcery.com>
11690
11691 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11692 to the inferior here.
11693 (i386_remove_aligned_watchpoint): Ditto.
11694 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11695 fit part of the watchpoint in the debug registers.
11696 (i386_update_inferior_debug_regs): New.
11697 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11698 registers, and only update the inferior on success.
11699 (i386_low_remove_watchpoint): Ditto.
11700
d26e3629
KY
117012011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11702
11703 * linux-low.c (compare_ints, unique, list_threads, show_process,
11704 linux_core_of_thread): Delete.
11705 (linux_target_ops): Change linux_core_of_thread to
11706 linux_common_core_of_thread.
11707 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11708 * utils.c (malloc_failure): Change type of argument.
11709 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11710 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11711 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11712 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11713 (IPA_OBJS): Add common-utils-ipa.o.
11714 (ptid_h, linux_osdata_h): New macros.
11715 (server_h): Add common/common-utils.h, common/xml-utils.h,
11716 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11717 common/ptid.h.
11718 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11719 ptid.o, buffer.o): New rules.
11720 (linux-low.o): Add common/linux-osdata.h as a dependency.
11721 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11722 * configure.ac: Add AC_HEADER_DIRENT check.
11723 * config.in: Regenerate.
11724 * configure: Regenerate.
11725 * remote-utils.c (xml_escape_text): Delete.
11726 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11727 buffer_xml_printf): Move to common/buffer.c.
11728 * server.c (main): Remove call to initialize_inferiors.
11729 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11730 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11731 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11732 internal_error, gdb_assert, gdb_assert_fail): Delete.
11733 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11734 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11735 common/buffer.h.
11736 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11737 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11738 initialize_inferiors): Delete.
11739
2275a1a7
PA
117402011-07-20 Pedro Alves <pedro@codesourcery.com>
11741
11742 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11743 symbol error.
11744
0a5b1e09
PA
117452011-05-31 Pedro Alves <pedro@codesourcery.com>
11746
11747 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11748 assertion.
11749 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11750
6938fd34
YQ
117512011-05-26 Yao Qi <yao@codesourcery.com>
11752
11753 * Makefile.in (thread-db.o): Track dependence to
11754 common/gdb_thread_db.h.
11755 * thread-db.c: include gdb_thread_db.h from right place.
11756
b481f9e0
TT
117572011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11758
11759 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11760 __FILE__ and __LINE__ to internal_error.
11761
98a5dd13
DE
117622011-05-13 Doug Evans <dje@google.com>
11763
11764 * thread-db.c (try_thread_db_load_from_sdir): New function.
11765 (try_thread_db_load_from_dir): New function.
11766 (thread_db_load_search): Handle $sdir, ignore $pdir.
11767 Remove trying of system directories if search of
11768 libthread-db-search-path fails, that is now done via $sdir.
11769
d248b706
KY
117702011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11771
11772 * server.c (handle_query): Add EnableDisableTracepoints to the list
11773 of supported features.
43aaf8b6 11774 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11775 tracepoints.
43aaf8b6
PA
11776 (cmd_qtenable_disable): New.
11777 (cmd_qtstart): Install tracepoints even if disabled.
11778 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11779 receiving a QTEnable or QTDisable packet.
11780 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11781 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11782 tracepoints.
11783 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11784
84e578fb
DE
117852011-05-10 Doug Evans <dje@google.com>
11786
11787 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11788
71f55dd8
DE
117892011-05-04 Doug Evans <dje@google.com>
11790
11791 * linux-low.c (linux_join): Skip process lookup.
11792 * spu-low.c (spu_join): Ditto.
11793 * server.c (join_inferiors_callback): Delete.
11794 (process_serial_event): For 'D' packet (detach) call join_inferior
11795 directly.
11796
4d393d60
JM
117972011-05-04 Joseph Myers <joseph@codesourcery.com>
11798
11799 * README: Don't mention xscale*-*-linux*.
11800 * configure.srv (xscale*-*-linux*): Don't handle target.
11801
b00ad6ff
NF
118022011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11803
11804 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11805 casting pointers.
11806 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11807 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11808 (i386_emit_void_call_2): Likewise.
11809
af96c192
YQ
118102011-04-26 Yao Qi <yao@codesourcery.com>
11811
43aaf8b6
PA
11812 * linux-low.c: Move common macros to linux-ptrace.h.
11813 Include linux-ptrace.h.
af96c192
YQ
11814 * Makefile.in (linux_ptrace_h): New.
11815 (linux-low.o): Depends on linux-ptrace.h.
11816
03f2bd59
JK
118172011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11818
11819 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11820 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11821 (remote_prepare): New function with most of the TCP code from ...
11822 (remote_open): ... here. Detect PORT here unconditionally. Move also
11823 setting transport_is_reliable.
11824 * server.c (run_once): New variable.
11825 (gdbserver_usage): Document it.
11826 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11827 the first run if RUN_ONCE.
11828 * server.h (run_once, remote_prepare): New declarations.
11829
7a9dd1b2
TT
118302011-04-19 Tom Tromey <tromey@redhat.com>
11831
11832 * win32-low.c (handle_load_dll): Remove duplicate "the".
11833
81239425
PM
118342011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11835
11836 Remove support for old Cygwin 1.5 versions.
11837 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11838 function to avoid warning.
11839 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11840 warning.
11841
9e0627f1
PM
118422011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11843
11844 * gdbserver/server.h (Macro _): Define it if not available.
11845
588eebee
MS
118462011-03-14 Michael Snyder <msnyder@vmware.com>
11847
348af9f7 11848 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11849
43f70d4c
JB
118502011-03-10 Joel Brobecker <brobecker@adacore.com>
11851
11852 * Makefile.in (maintainer-clean realclean distclean): Remove
11853 "make ... subdir_do" command.
11854
348af9f7
MS
118552011-03-10 Michael Snyder <msnyder@vmware.com>
11856
11857 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11858
11859 * server.c (handle_v_run): Free alloced buffer on early return.
11860
e637a4f5
YQ
118612011-03-09 Yao Qi <yao@codesourcery.com>
11862
11863 Revert:
11864 2011-03-04 Yao Qi <yao@codesourcery.com>
11865
11866 * Makefile.in: Remove GNU make feature --directory.
11867
11868 2011-03-05 Yao Qi <yao@codesourcery.com>
11869
11870 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11871 (subdir_do): New make target. Copied from gdb/Makefile.
11872 (maintainer-clean, realclean, distclean, clean): Call corresponding
11873 make targets in common/Makefile.
11874
11875 2011-02-11 Yao Qi <yao@codesourcery.com>
11876
11877 * configure.ac: Call AC_PROG_RANLIB.
11878 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11879 * configure: Regenerate.
11880
e6edda56
JK
118812011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11882
11883 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11884
e5141119
JB
118852011-03-06 Yao Qi <yao@codesourcery.com>
11886
11887 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11888
64794aa4
JB
118892011-03-05 Yao Qi <yao@codesourcery.com>
11890
11891 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11892 (subdir_do): New make target. Copied from gdb/Makefile.
11893 (maintainer-clean, realclean, distclean, clean): Call corresponding
11894 make targets in common/Makefile.
11895
7a762829
YQ
118962011-03-04 Yao Qi <yao@codesourcery.com>
11897
11898 * Makefile.in: Remove GNU make feature --directory.
11899
348af9f7
MS
119002011-03-04 Michael Snyder <msnyder@vmware.com>
11901
11902 * server.c (queue_stop_reply): Call xmalloc not malloc.
11903
119042011-03-02 Michael Snyder <msnyder@vmware.com>
11905
11906 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11907
9f72fee2
MS
119082011-02-28 Michael Snyder <msnyder@vmware.com>
11909
588eebee
MS
11910 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11911 (cmd_qtframe): Ditto.
11912 (cmd_qtbuffer): Ditto.
11913 (cmd_bigqtbuffer): Ditto.
11914
9f72fee2
MS
11915 * utils.c (decimal2str): Initialize 'width' to nine, then
11916 don't mess with it.
11917
8040bd49
UW
119182011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11919
11920 * hostio.c (require_data): Free *data, not data.
11921
7e52cbd0
JK
119222011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11923
11924 * hostio.c (require_data): Use free, not xfree.
11925
9130f83e
MS
119262011-02-27 Michael Snyder <msnyder@vmware.com>
11927
4b812f4e
MS
11928 * server.c (handle_query): Discard unused value.
11929
9130f83e
MS
11930 * hostio.c (require_data): Free malloc memory before returning
11931 error.
11932
69d37113
MS
119332011-02-26 Michael Snyder <msnyder@vmware.com>
11934
11935 * linux-low.c (list_threads): Call closedir for dirent.
11936
35f5825a
MS
119372011-02-27 Michael Snyder <msnyder@vmware.com>
11938
2a589cef
MS
11939 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11940 a case statement falls through.
11941
0adea5f7
MS
11942 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11943
35f5825a
MS
11944 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11945 in comparison.
11946
238f1c74
MS
119472011-02-26 Michael Snyder <msnyder@vmware.com>
11948
11949 * utils.c (decimal2str): Eliminate dead code and dead param.
11950 (pulongest): Drop dead param from call to decimal2str.
11951 (plongest): Ditto.
11952
633ff500
JB
119532011-02-24 Joel Brobecker <brobecker@adacore.com>
11954
11955 Revert the following patch (not approved yet):
11956 2011-02-21 Hui Zhu <teawater@gmail.com>
11957 * tracepoint.c (tp_printf): New function.
11958 (eval_agent_expr): Handle gdb_agent_op_printf.
11959
f9c6ff72
HZ
119602011-02-21 Hui Zhu <teawater@gmail.com>
11961
11962 * tracepoint.c (tp_printf): New function.
11963 (eval_agent_expr): Handle gdb_agent_op_printf.
11964
94d5e490
TT
119652011-02-18 Tom Tromey <tromey@redhat.com>
11966
11967 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11968 (tracepoint.o): Likewise.
11969 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11970 (gdb_agent_op_names): Likewise.
11971
c7f96d2b
TT
119722011-02-18 Tom Tromey <tromey@redhat.com>
11973
11974 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11975 gdb_agent_op_rot>: New constants.
11976 (gdb_agent_op_names): Add pick and roll.
11977 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11978 cases.
11979
0feedb2c
JK
119802011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11981
11982 * aclocal.m4: Regenerated with aclocal-1.11.1.
11983
b3b9301e
PA
119842011-02-14 Pedro Alves <pedro@codesourcery.com>
11985
11986 * server.c (handle_qxfer_traceframe_info): New.
11987 (qxfer_packets): Register "traceframe-info".
11988 (handle_query): Report support for qXfer:traceframe-info:read+.
11989 * tracepoint.c (match_blocktype): New.
11990 (traceframe_find_block_type): Rename to ...
11991 (traceframe_walk_blocks): ... this. Add callback filter argument,
11992 and use it.
11993 (traceframe_find_block_type): New, reimplemented on top of
11994 traceframe_walk_blocks.
11995 (build_traceframe_info_xml): New.
11996 (traceframe_read_info): New.
11997 * server.h (traceframe_read_info): Declare.
11998
4f3e6fb7
YQ
119992011-02-11 Yao Qi <yao@codesourcery.com>
12000
12001 * configure.ac: Call AC_PROG_RANLIB.
12002 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12003 * configure: Regenerate.
12004
764880b7
PA
120052011-02-07 Pedro Alves <pedro@codesourcery.com>
12006
12007 * server.c (gdb_read_memory): Change return semantics to allow
12008 partial transfers.
12009 (handle_search_memory_1): Adjust.
12010 (process_serial_event) <'m' packet>: Handle partial transfers.
12011 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12012
1c79eb8a
PA
120132011-01-28 Pedro Alves <pedro@codesourcery.com>
12014
12015 * regcache.c (init_register_cache): Initialize
12016 regcache->register_status.
12017 (free_register_cache): Release regcache->register_status.
12018 (regcache_cpy): Copy register_status.
12019 (registers_to_string): Print 'x's for unavailable registers.
12020 (supply_register): Mark the register's status valid or
12021 unavailable, depending on whether a buffer was passed in or not.
12022 (supply_register_zeroed): New.
12023 (supply_regblock): Mark the registers' status valid or
12024 unavailable, depending on whether a buffer was passed in or not.
12025 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12026 (struct regcache): New `register_status' field.
12027 (supply_register_zeroed): Declare.
12028 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12029 supply_register_zeroed, rather than passing a NULL buffer to
12030 supply_register.
12031 * tracepoint.c (fetch_traceframe_registers): Update comment.
12032
85724a0e
PA
120332011-01-28 Pedro Alves <pedro@codesourcery.com>
12034
12035 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12036 buffer explicit.
12037
d08aafef
PA
120382011-01-25 Pedro Alves <pedro@codesourcery.com>
12039
12040 * server.h (decode_xfer_write): Change prototype.
12041 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12042 and don't extract the annex here.
12043 * server.c (decode_xfer_read): Remove `annex' parameter,
12044 and don't extract the annex here.
12045 (decode_xfer): New.
12046 (struct qxfer): New.
12047 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12048 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12049 (handle_qxfer_statictrace): New functions, abstracted out from
12050 handle_query, and made to use the struct qxfer interface.
12051 (handle_threads_qxfer_proper): Rename to ...
12052 (handle_qxfer_threads_proper): ... this.
12053 (handle_threads_qxfer): Rename to ...
12054 (handle_qxfer_threads): ... this. Adjust.
12055 (qxfer_packets): New array.
12056 (handle_qxfer): New function.
12057 (handle_query): Use handle_qxfer.
12058
493e2a69
MS
120592011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12060
12061 * gdbreplay.c: Shorten lines of >= 80 columns.
12062 * linux-low.c: Ditto.
12063 * linux-ppc-low.c: Ditto.
12064 * linux-s390-low.c: Ditto.
12065 * linux-sparc-low.c: Ditto.
12066 * linux-x86-low.c: Ditto.
12067 * linux-xtensa-low.c: Ditto.
12068 * mem-break.c: Ditto.
12069 * nto-low.c: Ditto.
12070 * regcache.h: Ditto.
12071 * remote-utils.c: Ditto.
12072 * server.c: Ditto.
12073 * server.h: Ditto.
12074 * thread-db.c: Ditto.
12075 * tracepoint.c: Ditto.
12076 * utils.c: Ditto.
12077 * win32-low.h: Ditto.
12078
44944448
JB
120792011-01-05 Joel Brobecker <brobecker@adacore.com>
12080
12081 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12082 update.
12083
71ce852c
JB
120842011-01-01 Joel Brobecker <brobecker@adacore.com>
12085
12086 * server.c (gdbserver_version): Update copyright year in version
12087 output.
12088 * gdbreplay.c (gdbreplay_version): Ditto.
12089
eb826dc6
MF
120902010-12-29 Jie Zhang <jie.zhang@analog.com>
12091
12092 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12093 * linux-bfin-low.c: New file.
12094 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12095 PT_DATA_ADDR for BFIN targets.
12096 * Makefile.in (SFILES): Add linux-bfin-low.c.
12097 (clean): Remove reg-bfin.c.
12098 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12099 * README: Mention supported Blackfin targets.
12100
39ab222a
MF
121012010-12-23 Mike Frysinger <vapier@gentoo.org>
12102
12103 * .gitignore: New file.
12104
a1f2ce7d
MF
121052010-11-16 Mike Frysinger <vapier@gentoo.org>
12106
12107 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12108
f474844c
JZ
121092010-10-22 Jie Zhang <jie@codesourcery.com>
12110
12111 * Makefile.in: Add FLAGS_TO_PASS variable.
12112 (install): Remove dependency of install-only and recursively
12113 invoke make for install-only.
12114
f1048712
DE
121152010-10-04 Doug Evans <dje@google.com>
12116
12117 * Makefile.in (uninstall): Use $(DESTDIR).
12118
b53a1623
PA
121192010-09-24 Pedro Alves <pedro@codesourcery.com>
12120
e6ee044d
PA
12121 PR gdb/11842
12122
b53a1623
PA
12123 * linux-x86-low.c (compat_siginfo_from_siginfo)
12124 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12125 si_code is < 0. Check for si_code == SI_TIMER before checking for
12126 si_code < 0.
12127
fa1bd1e4
JB
121282010-09-13 Joel Brobecker <brobecker@adacore.com>
12129
12130 * lynx-i386-low.c: New file.
12131 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12132
47fac8f8
JB
121332010-09-13 Joel Brobecker <brobecker@adacore.com>
12134
12135 * lynx-low.c (ptrace_request_to_str): Remove handling for
12136 request values that have been removed in LynxOS 5.x.
12137
1adfc54d
JB
121382010-09-13 Joel Brobecker <brobecker@adacore.com>
12139
12140 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12141 <ptrace.h>
12142
c2a66c29
NS
121432010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12144
12145 * configure.ac: Add --enable-inprocess-agent option.
12146 * configure: Rebuilt.
12147
32fcada3
YQ
121482010-09-06 Yao Qi <yao@codesourcery.com>
12149
12150 * linux-low.c (linux_kill): Remove unused variable.
12151 (linux_stabilize_threads): Likewise.
12152 * server.c (start_inferior): Likewise.
12153 (queue_stop_reply_callback): Likewise.
12154 * tracepoint.c (do_action_at_tracepoint): Likewise.
12155
0cccb683
YQ
121562010-09-06 Yao Qi <yao@codesourcery.com>
12157
12158 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12159 on return.
12160
423ec54c
JK
121612010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12162
12163 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12164
12ac6819
PA
121652010-09-06 Pedro Alves <pedro@codesourcery.com>
12166
12167 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12168 "$(IPA_DEPFILES)".
12169
8ed54b31
JB
121702010-09-01 Joel Brobecker <brobecker@adacore.com>
12171
12172 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12173 gdbserver/lynx-ppc-low.c: New files.
12174 * Makefile.in (lynx_low_h): New variable.
12175 (lynx-low.o, lynx-ppc-low.o): New rules.
12176 * configure.ac: On LynxOS, link with -lnetinet.
12177 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12178 * configure: regenerate.
12179
bb0116a4
JB
121802010-09-01 Joel Brobecker <brobecker@adacore.com>
12181
12182 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12183 * configure.ac: Add check for vasprintf and vsnprintf.
12184 * configure, config.in: Regenerate.
12185 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12186
a778ab81 121872010-09-01 Joel Brobecker <brobecker@adacore.com>
12188
12189 * gdbreplay.c: Move include of alloca.h up, next to include of
12190 malloc.h.
12191 * server.h: Add include of malloc.h.
12192 * mem-break.c: Remove include of malloc.h.
12193 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12194
8b034a19 121952010-09-01 Joel Brobecker <brobecker@adacore.com>
12196
12197 * Makefile.in (memmem.o): Build with -Wno-error.
12198
121992010-09-01 Joel Brobecker <brobecker@adacore.com>
12200
12201 * utils.c (xsnprintf): Make non-static.
12202 * server.h: Add xsnprintf declaration.
12203 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12204 replace calls to snprintf by calls to xsnprintf throughout.
12205
122062010-09-01 Joel Brobecker <brobecker@adacore.com>
12207
12208 * configure.ac: Add configure check for alloca.
12209 * configure, config.in: Regenerate.
12210 * server.h: Include alloca.h if it exists.
12211 * gdbreplay.c: Include alloca.h if it exists.
12212
1a981360
PA
122132010-08-28 Pedro Alves <pedro@codesourcery.com>
12214
12215 * linux-low.c (__SIGRTMIN): Define if not already defined.
12216 (linux_create_inferior): Check for __ANDROID__ rather than
12217 __SIGRTMIN.
12218 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12219 are already deferred.
12220 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12221 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12222 stopped and already has a pending signal to report.
12223 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12224 a pending signal to report or is moving out of a jump pad.
12225 (linux_init_signals): Check for __ANDROID__ rather than
12226 __SIGRTMIN.
12227
b4d51a55
PA
122282010-08-28 Pedro Alves <pedro@codesourcery.com>
12229
12230 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12231 debug_threads check. Avoid a linear search when not doing debug
12232 output.
12233
ec48365d
PA
122342010-08-27 Pedro Alves <pedro@codesourcery.com>
12235
12236 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12237 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12238 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12239 (process_event): Change local fd's type to gdb_fildes_t.
12240 (create_file_handler): Adjust prototype.
12241 (delete_file_handler): Adjust prototype.
12242 (handle_file_event): Adjust prototype. Use pfildes.
12243 (create_file_event): Adjsut prototype.
12244 * remote-utils.c (remote_desc, listen_desc): Change type to
12245 gdb_fildes_t.
12246 * server.h: New gdb_fildes_t typedef.
12247 [USE_WIN32API]: Include winsock2.h.
12248 (delete_file_handler, add_file_handler): Adjust prototypes.
12249 (pfildes): Declare.
12250 * utils.c (pfildes): New.
12251
854d88f0
PA
122522010-08-27 Pedro Alves <pedro@codesourcery.com>
12253
12254 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12255 * configure: Regenerate.
12256
0146f85b
PA
122572010-08-27 Pedro Alves <pedro@codesourcery.com>
12258
12259 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12260 (linux_done_accessing_memory): ... this.
12261 (linux_target_ops): Adjust.
12262 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12263 * nto-low.c (nto_target_ops): Adjust comment.
12264 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12265 * spu-low.c (spu_target_ops): Adjust comment.
12266 * target.h (target_ops): Rename unprepare_to_access_memory field
12267 to done_accessing_memory.
12268 (unprepare_to_access_memory): Rename to ...
12269 (done_accessing_memory): ... this.
12270
90d74c30
PA
122712010-08-26 Pedro Alves <pedro@codesourcery.com>
12272
12273 * linux-low.c (linux_prepare_to_access_memory): New.
12274 (linux_unprepare_to_access_memory): New.
12275 (linux_target_ops): Install them.
12276 * server.c (read_memory): Rename to ...
12277 (gdb_read_memory): ... this. Use
12278 prepare_to_access_memory/prepare_to_access_memory.
12279 (write_memory): Rename to ...
12280 (gdb_write_memory): ... this. Use
12281 prepare_to_access_memory/prepare_to_access_memory.
12282 (handle_search_memory_1): Adjust.
12283 (process_serial_event): Adjust.
12284 * target.h (struct target_ops): New fields
12285 prepare_to_access_memory and unprepare_to_access_memory.
12286 (prepare_to_access_memory, unprepare_to_access_memory): New.
12287 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12288 prepare_to_access_memory/prepare_to_access_memory.
12289 * nto-low.c (nto_target_ops): Adjust.
12290 * spu-low.c (spu_target_ops): Adjust.
12291 * win32-low.c (win32_target_ops): Adjust.
12292
fd467969
PA
122932010-08-26 Pedro Alves <pedro@codesourcery.com>
12294
12295 * Makefile.in (WARN_CFLAGS): Get it from configure.
12296 (WERROR_CFLAGS): New.
12297 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12298 * configure.ac: Introduce --enable-werror, which adds -Werror to
12299 the compiler command line. Enabled by default. Disable with
12300 --disable-werror. Add -Wdeclaration-after-statement
12301 Wpointer-arith and -Wformat-nonliteral to warning flags.
12302 * configure: Regenerate.
12303
331e2f5f
PA
123042010-08-26 Pedro Alves <pedro@codesourcery.com>
12305
12306 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12307
e581f2b4
PA
123082010-08-26 Pedro Alves <pedro@codesourcery.com>
12309
12310 * gdbreplay.c (remote_error): New.
12311 (gdbchar): New.
12312 (expect): Use gdbchar. Check for error reading from GDB.
12313 Clarify sync error output.
12314 (play): Check for errors writing to GDB.
12315 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12316 * remote-utils.c (getpkt): Check for errors writing to the remote
12317 descriptor.
12318
3c11dd79
PA
123192010-08-25 Pedro Alves <pedro@codesourcery.com>
12320
12321 * linux-low.c (linux_wait_1): Move non-debugging code out of
12322 `debug_threads' control.
12323
d20a8ad9
PA
123242010-08-25 Pedro Alves <pedro@codesourcery.com>
12325
12326 * linux-low.c (linux_wait_1): Don't set last_status here.
12327 * server.c (push_event, queue_stop_reply_callback): Assert we're
12328 not pushing a TARGET_WAITKIND_IGNORE event.
12329 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12330 (myresume, handle_target_event): Set the thread's last_resume_kind
12331 and last_status from the target returned status.
12332
964e4306
PA
123332010-08-25 Pedro Alves <pedro@codesourcery.com>
12334
12335 PR threads/10729
12336
12337 * linux-x86-low.c (update_debug_registers_callback): New.
12338 (i386_dr_low_set_addr): Use it.
12339 (i386_dr_low_get_addr): New.
12340 (i386_dr_low_set_control): Use update_debug_registers_callback.
12341 (i386_dr_low_get_control): New.
12342 (i386_dr_low_get_status): Adjust.
12343 * linux-low.c (linux_stop_lwp): New.
12344 * linux-low.h (linux_stop_lwp): Declare.
12345
12346 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12347 argument instead of a i386_debug_reg_state.
12348 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12349 a i386_debug_reg_state.
12350 (i386_insert_aligned_watchpoint): Adjust.
12351 (i386_remove_aligned_watchpoint): Adjust.
12352 (i386_low_stopped_data_address): Read the debug registers from the
12353 inferior instead of from the mirrors.
12354 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12355 (i386_dr_low_get_addr): Declare.
12356 (i386_dr_low_get_control): Declare.
12357 (i386_dr_low_get_status): Change prototype.
12358
12359 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12360 (i386_dr_low_get_addr): New.
12361 (i386_dr_low_get_control): New.
12362 (i386_dr_low_get_status): Adjust prototype. Return
12363 dr_status_mirror.
12364 (i386_initial_stuff): Clear dr_status_mirror and
12365 dr_control_mirror.
12366 (i386_get_thread_context): Adjust.
12367 (i386_set_thread_context): Adjust.
12368 (i386_thread_added): Adjust.
12369
5f21a75b
PA
123702010-08-24 Pedro Alves <pedro@codesourcery.com>
12371
12372 * linux-low.h (linux_thread_area): Delete declaration.
12373
3e4c1235
TS
123742010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12375
12376 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12377 after its termination.
12378
1971b033
PA
123792010-08-09 Pedro Alves <pedro@codesourcery.com>
12380
12381 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12382 (gdb_wants_all_stopped): Delete.
12383 (linux_wait_1): Don't call them.
12384 * server.c (handle_v_cont): Tag all threads as want-stopped.
12385 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12386 stopped as "client-wants-stopped".
12387
310444ac
PA
123882010-07-31 Pedro Alves <pedro@codesourcery.com>
12389
12390 * Makefile.in (signals_h): New.
12391 (server_h): Depend on it.
12392 (server.o): Don't depend on $(signals_def).
12393 (signals.o): Depend on $(signals_def).
12394
a19cae16
JK
123952010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12396
12397 * Makefile.in (signals_def): New.
12398 (server_h): Append include/gdb/signals.h and signals_def.
12399 (server.o): Append signals_def.
12400
30d50328
JK
124012010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12402
12403 * server.c (handle_target_event): Use target_signal_to_host for
12404 resume_info.sig initialization.
12405 * target.h (struct thread_resume) <sig>: New comment.
12406
5c3216e2
OS
124072010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12408
c6f46ca0
OS
12409 * server.c (handle_query): strcpy() the returned string from paddress()
12410 instead of sprintf().
5c3216e2
OS
12411 * utils.c (paddress): Return phex_nz().
12412
6bd31874
JB
124132010-07-07 Joel Brobecker <brobecker@adacore.com>
12414
12415 * server.c (handle_v_cont): Call mourn_inferior if process
12416 just exited.
12417 (myresume): Likewise.
12418
0fb4aa4b
PA
124192010-07-01 Pedro Alves <pedro@codesourcery.com>
12420
12421 Static tracepoints, and integration with UST.
12422
12423 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12424 * mem-break.c (uninsert_all_breakpoints)
12425 (reinsert_all_breakpoints): New.
12426 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12427 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12428 (gdb_agent_ust_loaded, helper_thread_id)
12429 (gdb_agent_helper_thread_id): New macros.
12430 (struct ipa_sym_addresses): Add addr_ust_loaded,
12431 addr_helper_thread_id, addr_cmd_buf.
12432 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12433 (in_process_agent_loaded_ust): New.
12434 (write_e_ust_not_loaded): New.
12435 (maybe_write_ipa_ust_not_loaded): New.
12436 (struct collect_static_trace_data_action): New.
12437 (enum tracepoint_type) <static_tracepoint>: New.
12438 (struct tracepoint) <handle>: Mention static tracepoints.
12439 (struct static_tracepoint_ctx): New.
12440 (CMD_BUF_SIZE): New.
12441 (add_tracepoint_action): Handle static tracepoint actions.
12442 (unprobe_marker_at): New.
12443 (clear_installed_tracepoints): Handle static tracepoints.
12444 (cmd_qtdp): Handle static tracepoints.
12445 (probe_marker_at): New.
12446 (cmd_qtstart): Handle static tracepoints.
12447 (response_tracepoint): Handle static tracepoints.
12448 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12449 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12450 (get_context_regcache): Handle static tracepoints.
12451 (do_action_at_tracepoint): Handle static tracepoint actions.
12452 (traceframe_find_block_type): Handle static trace data blocks.
12453 (traceframe_read_sdata): New.
12454 (download_tracepoints): Download static tracepoint actions.
12455 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12456 (GDB_PROBE_NAME): New.
12457 (ust_ops): New.
12458 (GET_UST_SYM): New.
12459 (USTF): New.
12460 (dlsym_ust): New.
12461 (ust_marker_to_static_tracepoint): New.
12462 (gdb_probe): New.
12463 (collect_ust_data_at_tracepoint): New.
12464 (gdb_ust_probe): New.
12465 (UNIX_PATH_MAX, SOCK_DIR): New.
12466 (gdb_ust_connect_sync_socket): New.
12467 (resume_thread, stop_thread): New.
12468 (run_inferior_command): New.
12469 (init_named_socket): New.
12470 (gdb_ust_socket_init): New.
12471 (cstr_to_hexstr): New.
12472 (next_st): New.
12473 (first_marker, next_marker): New.
12474 (response_ust_marker): New.
12475 (cmd_qtfstm, cmd_qtsstm): New.
12476 (unprobe_marker_at, probe_marker_at): New.
12477 (cmd_qtstmat, gdb_ust_thread): New.
12478 (gdb_ust_init): New.
12479 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12480 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12481 (ST_REGENTRY): New.
12482 (x86_64_st_collect_regmap): New.
12483 (X86_64_NUM_ST_COLLECT_GREGS): New.
12484 (AMD64_RIP_REGNUM): New.
12485 (supply_static_tracepoint_registers): New.
12486 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12487 (ST_REGENTRY): New.
12488 (i386_st_collect_regmap): New.
12489 (i386_NUM_ST_COLLECT_GREGS): New.
12490 (supply_static_tracepoint_registers): New.
12491 * server.c (handle_query): Handle qXfer:statictrace:read.
12492 <qSupported>: Report support for StaticTracepoints, and
12493 qXfer:statictrace:read features.
12494 * server.h (traceframe_read_sdata)
12495 (supply_static_tracepoint_registers): Declare.
12496 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12497 (unpack_varlen_hex): Include in IPA build.
12498 * Makefile.in (ustlibs, ustinc): New.
12499 (IPA_OBJS): Add remote-utils-ipa.o.
12500 ($(IPA_LIB)): Link -ldl and -lpthread.
12501 (UST_CFLAGS): New.
12502 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12503 * config.in, configure: Regenerate.
12504
9e4344e5
PA
125052010-06-20 Ian Lance Taylor <iant@google.com>
12506 Pedro Alves <pedro@codesourcery.com>
12507
12508 * linux-x86-low.c (always_true): Delete.
12509 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12510 trying to fool the compiler with always_true.
12511
c6beb2cb
PA
125122010-06-20 Pedro Alves <pedro@codesourcery.com>
12513
12514 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12515 conditions in gdbserver.
12516
d2ed6730
UW
125172010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12518
12519 * spu-low.c (spu_read_memory): Wrap around local store limit.
12520 (spu_write_memory): Likewise.
12521
4e29fb54
PA
125222010-06-15 Pedro Alves <pedro@codesourcery.com>
12523
12524 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12525 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12526 LONGEST uses.
12527 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12528 uses.
12529 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12530 uses with LONGEST uses.
12531
6a271cae
PA
125322010-06-14 Stan Shebs <stan@codesourcery.com>
12533 Pedro Alves <pedro@codesourcery.com>
12534
12535 Bytecode compiler.
12536
12537 * linux-x86-low.c: Include limits.h.
12538 (add_insns): New.
12539 (always_true): New.
12540 (EMIT_ASM): New.
12541 (EMIT_ASM32): New.
12542 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12543 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12544 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12545 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12546 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12547 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12548 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12549 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12550 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12551 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12552 (amd64_emit_void_call_2): New.
12553 (amd64_emit_ops): New.
12554 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12555 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12556 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12557 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12558 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12559 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12560 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12561 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12562 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12563 (i386_emit_stack_adjust, i386_emit_int_call_1)
12564 (i386_emit_void_call_2): New.
12565 (i386_emit_ops): New.
12566 (x86_emit_ops): New.
12567 (the_low_target): Install x86_emit_ops.
12568 * server.h (struct emit_ops): New.
12569 (get_raw_reg_func_addr): Declare.
12570 (current_insn_ptr, emit_error): Declare.
12571 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12572 (set_trace_state_variable_value): New defines.
12573 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12574 addr_get_trace_state_variable_value and
12575 addr_set_trace_state_variable_value.
12576 (symbol_list): New fields for get_raw_reg,
12577 get_trace_state_variable_value and set_trace_state_variable_value.
12578 (condfn): New typedef.
12579 (struct tracepoint): New field `compiled_cond'.
12580 (do_action_at_tracepoint): Clear compiled_cond.
12581 (get_trace_state_variable_value, set_trace_state_variable_value):
12582 Export in the IPA.
12583 (condition_true_at_tracepoint): If there's a compiled condition,
12584 run that.
12585 (current_insn_ptr, emit_error): New globals.
12586 (struct bytecode_address): New.
12587 (get_raw_reg_func_addr): New.
12588 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12589 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12590 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12591 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12592 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12593 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12594 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12595 (compile_tracepoint_condition, compile_bytecodes): New.
12596 * target.h (emit_ops): Forward declare.
12597 (struct target_ops): New field emit_ops.
12598 (target_emit_ops): New.
12599 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12600 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12601 * linux-low.c (linux_emit_ops): New.
12602 (linux_target_ops): Install it.
12603 * linux-low.h (struct linux_target_ops): New field emit_ops.
12604
92b72907
UW
126052010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12606
12607 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12608 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12609
fa593d66
PA
126102010-06-01 Pedro Alves <pedro@codesourcery.com>
12611 Stan Shebs <stan@codesourcery.com>
12612
12613 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12614 (all): Depend on $(extra_libraries).
12615 (install-only): Install the IPA.
12616 (IPA_OBJS, IPA_LIB): New.
12617 (clean): Remove the IPA lib.
12618 (IPAGENT_CFLAGS): New.
12619 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12620 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12621 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12622 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12623 * configure.ac: Check for atomic builtins support in the compiler.
12624 (IPA_DEPFILES, extra_libraries): Define.
12625 * configure.srv (ipa_obj): Add description.
12626 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12627 (i[34567]86-*-linux*): Set ipa_obj.
12628 (x86_64-*-linux*): Set ipa_obj.
12629 * linux-low.c (stabilizing_threads): New.
12630 (supports_fast_tracepoints): New.
12631 (linux_detach): Stabilize threads before detaching.
12632 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12633 the lwp is either not stabilizing, or is moving out of a jump pad.
12634 (linux_fast_tracepoint_collecting): New.
12635 (maybe_move_out_of_jump_pad): New.
12636 (enqueue_one_deferred_signal): New.
12637 (dequeue_one_deferred_signal): New.
12638 (linux_wait_for_event_1): If moving out of a jump pad, defer
12639 pending signals to later.
12640 (linux_stabilize_threads): New.
12641 (linux_wait_1): Check if threads need moving out of jump pads, and
12642 do it if so.
12643 (stuck_in_jump_pad_callback): New.
12644 (move_out_of_jump_pad_callback): New.
12645 (lwp_running): New.
12646 (linux_resume_one_lwp): Handle moving out of jump pads.
12647 (linux_set_resume_request): Dequeue deferred signals.
12648 (need_step_over_p): Also step over fast tracepoint jumps.
12649 (start_step_over): Also uninsert fast tracepoint jumps.
12650 (finish_step_over): Also reinsert fast tracepoint jumps.
12651 (linux_install_fast_tracepoint_jump): New.
12652 (linux_target_ops): Install linux_stabilize_threads and
12653 linux_install_fast_tracepoint_jump_pad.
12654 * linux-low.h (linux_target_ops) <get_thread_area,
12655 install_fast_tracepoint_jump_pad>: New fields.
12656 (struct lwp_info) <collecting_fast_tracepoint,
12657 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12658 (linux_get_thread_area): Declare.
12659 * linux-x86-low.c (jump_insn): New.
12660 (x86_get_thread_area): New.
12661 (append_insns): New.
12662 (push_opcode): New.
12663 (amd64_install_fast_tracepoint_jump_pad): New.
12664 (i386_install_fast_tracepoint_jump_pad): New.
12665 (x86_install_fast_tracepoint_jump_pad): New.
12666 (the_low_target): Install x86_get_thread_area and
12667 x86_install_fast_tracepoint_jump_pad.
12668 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12669 (struct fast_tracepoint_jump): New.
12670 (fast_tracepoint_jump_insn): New.
12671 (fast_tracepoint_jump_shadow): New.
12672 (find_fast_tracepoint_jump_at): New.
12673 (fast_tracepoint_jump_here): New.
12674 (delete_fast_tracepoint_jump): New.
12675 (set_fast_tracepoint_jump): New.
12676 (uninsert_fast_tracepoint_jumps_at): New.
12677 (reinsert_fast_tracepoint_jumps_at): New.
12678 (set_breakpoint_at): Use write_inferior_memory.
12679 (uninsert_raw_breakpoint): Use write_inferior_memory.
12680 (check_mem_read): Mask out fast tracepoint jumps.
12681 (check_mem_write): Mask out fast tracepoint jumps.
12682 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12683 (set_fast_tracepoint_jump): Declare.
12684 (delete_fast_tracepoint_jump)
12685 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12686 (reinsert_fast_tracepoint_jumps_at): Declare.
12687 * regcache.c: Don't compile many functions when building the
12688 in-process agent library.
12689 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12690 the register buffer in the heap.
12691 (free_register_cache): If the register buffer isn't owned by the
12692 regcache, don't free it.
12693 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12694 pre-existing register caches.
12695 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12696 type.
12697 (convert_ascii_to_int): : Constify `from' parameter type.
12698 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12699 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12700 the needed buffer in-place.
12701 (relocate_instruction): New.
12702 * server.c (handle_query) <qSymbols>: If the target supports
12703 tracepoints, give it a chance of looking up symbols. Report
12704 support for fast tracepoints.
12705 (handle_status): Stabilize threads.
12706 (process_serial_event): Adjust.
12707 * server.h (struct fast_tracepoint_jump): Forward declare.
12708 (struct process_info) <fast_tracepoint_jumps>: New field.
12709 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12710 (decode_X_packet, decode_M_packet): Adjust.
12711 (relocate_instruction): Declare.
12712 (in_process_agent_loaded): Declare.
12713 (tracepoint_look_up_symbols): Declare.
12714 (struct fast_tpoint_collect_status): Declare.
12715 (fast_tracepoint_collecting): Declare.
12716 (force_unlock_trace_buffer): Declare.
12717 (handle_tracepoint_bkpts): Declare.
12718 (initialize_low_tracepoint)
12719 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12720 * target.h (struct target_ops) <stabilize_threads,
12721 install_fast_tracepoint_jump_pad>: New fields.
12722 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12723 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12724 [HAVE_STDINT_H]: Include stdint.h.
12725 (trace_debug_1): Rename to ...
12726 (trace_vdebug): ... this.
12727 (trace_debug): Rename to ...
12728 (trace_debug_1): ... this. Add `level' parameter.
12729 (trace_debug): New.
12730 (ATTR_USED, ATTR_NOINLINE): New.
12731 (IP_AGENT_EXPORT): New.
12732 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12733 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12734 (about_to_request_buffer_space, trace_buffer_is_full)
12735 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12736 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12737 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12738 (traceframe_write_count, traceframes_created)
12739 (trace_state_variables)
12740 New renaming defines.
12741 (struct ipa_sym_addresses): New.
12742 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12743 (symbol_list): New.
12744 (ipa_sym_addrs): New.
12745 (all_tracepoint_symbols_looked_up): New.
12746 (in_process_agent_loaded): New.
12747 (write_e_ipa_not_loaded): New.
12748 (maybe_write_ipa_not_loaded): New.
12749 (tracepoint_look_up_symbols): New.
12750 (debug_threads) [IN_PROCESS_AGENT]: New.
12751 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12752 (UNKNOWN_SIDE_EFFECTS): New.
12753 (stop_tracing): New.
12754 (flush_trace_buffer): New.
12755 (stop_tracing_bkpt): New.
12756 (flush_trace_buffer_bkpt): New.
12757 (read_inferior_integer): New.
12758 (read_inferior_uinteger): New.
12759 (read_inferior_data_pointer): New.
12760 (write_inferior_data_pointer): New.
12761 (write_inferior_integer): New.
12762 (write_inferior_uinteger): New.
12763 (struct collect_static_trace_data_action): Delete.
12764 (enum tracepoint_type): New.
12765 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12766 <actions_str, step_actions, step_actions_str>: Only include in
12767 GDBserver.
fa593d66
PA
12768 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12769 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12770 (tracepoints): Use IP_AGENT_EXPORT.
12771 (last_tracepoint): Don't include in the IPA.
12772 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12773 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12774 (alloced_trace_state_variables): New.
12775 (trace_state_variables): Use IP_AGENT_EXPORT.
12776 (traceframe_t): Delete unused variable.
12777 (circular_trace_buffer): Don't include in the IPA.
12778 (trace_buffer_start): Delete.
12779 (struct trace_buffer_control): New.
12780 (trace_buffer_free): Delete.
12781 (struct ipa_trace_buffer_control): New.
12782 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12783 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12784 New.
12785 (trace_buffer_ctrl): New.
12786 (TRACE_BUFFER_CTRL_CURR): New.
12787 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12788 Reimplement as macros.
12789 (trace_buffer_wrap): Delete.
12790 (traceframe_write_count, traceframe_read_count)
12791 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12792 (struct tracepoint_hit_ctx) <type>: New field.
12793 (struct fast_tracepoint_ctx): New.
12794 (memory_barrier): New.
12795 (cmpxchg): New.
12796 (record_tracepoint_error): Update atomically in the IPA.
12797 (clear_inferior_trace_buffer): New.
12798 (about_to_request_buffer_space): New.
12799 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12800 updating the same buffer.
12801 (add_tracepoint): Default the tracepoint's type to trap
12802 tracepoint, and orig_size to -1.
12803 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12804 internal variables.
12805 (create_trace_state_variable): New parameter `gdb'. Handle it.
12806 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12807 (cmd_qtdp): Handle fast tracepoints.
12808 (cmd_qtdv): Adjust.
12809 (max_jump_pad_size): New.
12810 (gdb_jump_pad_head): New.
12811 (get_jump_space_head): New.
12812 (claim_jump_space): New.
12813 (sort_tracepoints): New.
12814 (MAX_JUMP_SIZE): New.
12815 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12816 IPA.
12817 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12818 support. Upload fast traceframes, and delete internal IPA
12819 breakpoints.
12820 (stop_tracing_handler): New.
12821 (flush_trace_buffer_handler): New.
12822 (cmd_qtstop): Upload fast tracepoints.
12823 (response_tracepoint): Handle fast tracepoints.
12824 (tracepoint_finished_step): Upload fast traceframes. Set the
12825 tracepoint hit context's tracepoint type.
12826 (handle_tracepoint_bkpts): New.
12827 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12828 type. Add comment about fast tracepoints.
12829 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12830 non-existing action_str field.
12831 (get_context_regcache): Handle fast tracepoints.
12832 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12833 to the regcache.
12834 (fast_tracepoint_from_jump_pad_address): New.
12835 (fast_tracepoint_from_ipa_tpoint_address): New.
12836 (collecting_t): New.
12837 (force_unlock_trace_buffer): New.
12838 (fast_tracepoint_collecting): New.
12839 (collecting): New.
12840 (gdb_collect): New.
12841 (write_inferior_data_ptr): New.
12842 (target_tp_heap): New.
12843 (target_malloc): New.
12844 (download_agent_expr): New.
12845 (UALIGN): New.
12846 (download_tracepoints): New.
12847 (download_trace_state_variables): New.
12848 (upload_fast_traceframes): New.
12849 (IPA_FIRST_TRACEFRAME): New.
12850 (IPA_NEXT_TRACEFRAME_1): New.
12851 (IPA_NEXT_TRACEFRAME): New.
12852 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12853 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12854 (gdb_jump_pad_buffer_end): New.
12855 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12856 (initialize_tracepoint): Adjust.
12857 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12858 buffer. Initialize the low module.
12859 * utils.c (PREFIX, TOOLNAME): New.
12860 (malloc_failure): Use PREFIX.
12861 (error): In the IPA, an error causes an exit.
12862 (fatal, warning): Use PREFIX.
12863 (internal_error): Use TOOLNAME.
12864 (NUMCELLS): Increase to 10.
12865 * configure, config.in: Regenerate.
12866
d149dd1d
PA
128672010-06-01 Pedro Alves <pedro@codesourcery.com>
12868
12869 * server.c (handle_query) <qSupported>: Do two passes over the
12870 qSupported string to avoid nesting strtok.
12871
f6528abd
JK
128722010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12873
12874 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12875 (CDEPS): New.
12876 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12877 -Wl,--dynamic-list.
12878 * configure: Regenerate.
12879 * proc-service.list: New.
12880
ca2a87a0
JK
128812010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12882
12883 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12884 New comment.
12885
363a6e9f
OS
128862010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12887
12888 * gdbreplay.c (remote_open): Check error return from socket() call by
12889 its equality to -1 not by it being negative.
12890 * remote-utils.c (remote_open): Likewise.
12891
d23b6cb1
PA
128922010-05-23 Pedro Alves <pedro@codesourcery.com>
12893
12894 * config.h: Regenerate.
12895
28d3cf85
MK
128962010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12897
12898 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12899 doesn't provide PTRACE_GET_THREAD_AREA.
12900
fea36a59
MK
129012010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12902
12903 * linux-m68k-low.c: Include <asm/ptrace.h>
12904 (ps_get_thread_area): Implement.
12905
24b066ba
DE
129062010-05-03 Doug Evans <dje@google.com>
12907
12908 * event-loop.c (struct callback_event): New struct.
12909 (callback_list): New global.
12910 (append_callback_event, delete_callback_event): New functions.
12911 (process_callback): New function.
12912 (start_event_loop): Call it.
12913 * remote-utils.c (NOT_SCHEDULED): Define.
12914 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12915 moved out of readchar.
12916 (readchar): Rewrite. Call reschedule before returning.
12917 (reset_readchar): New function.
12918 (remote_close): Call it.
12919 (process_remaining, reschedule): New functions.
12920 * server.h (callback_handler_func): New typedef.
12921 (append_callback_event, delete_callback_event): Declare.
12922
9836d6ea
PA
129232010-05-03 Pedro Alves <pedro@codesourcery.com>
12924
12925 * proc-service.c (ps_pglobal_lookup): Use
12926 thread_db_look_up_one_symbol.
12927 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12928 parameter. Use it instead of all_symbols_looked_up.
12929 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12930 field.
12931 (all_symbols_looked_up): Don't declare.
12932 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12933 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12934 field.
12935 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12936 Set all_symbols_looked_up here.
12937 (thread_db_look_up_one_symbol): New.
12938 (thread_db_get_tls_address): Adjust.
12939 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12940 thread_db object on the heap, and tentatively set it in the
12941 process structure.
12942 (thread_db_init): Don't set all_symbols_looked_up here.
12943 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12944
7984d532
PA
129452010-05-03 Pedro Alves <pedro@codesourcery.com>
12946
12947 * linux-low.c (linux_kill, linux_detach): Adjust.
12948 (status_pending_p_callback): Remove redundant statement. Check
12949 for !TARGET_WAITIKIND_IGNORE, instead of
12950 TARGET_WAITKIND_STOPPED.
12951 (handle_tracepoints): Make sure LWP is locked. Adjust.
12952 (linux_wait_for_event_1): Adjust.
12953 (linux_cancel_breakpoints): New.
12954 (unsuspend_one_lwp): New.
12955 (unsuspend_all_lwps): New.
12956 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12957 (send_sigstop_callback): Change return type to int, add new
12958 `except' parameter and handle it.
12959 (suspend_and_send_sigstop_callback): New.
12960 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12961 pass them down. If SUSPEND, also increment the lwp's suspend
12962 count.
12963 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12964 (need_step_over_p): Don't consider suspended LWPs.
12965 (start_step_over): Adjust.
12966 (proceed_one_lwp): Change return type to int, add new `except'
12967 parameter and handle it.
12968 (unsuspend_and_proceed_one_lwp): New.
12969 (proceed_all_lwps): Use find_inferior instead of
12970 for_each_inferior.
12971 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12972 also decrement the suspend count of LWPs. Pass `except' down,
12973 instead of hacking its suspend count.
12974 (linux_pause_all): Add `freeze' parameter. Adjust.
12975 (linux_unpause_all): New.
12976 (linux_target_ops): Install linux_unpause_all.
12977 * server.c (handle_status): Adjust.
12978 * target.h (struct target_ops): New fields `unpause_all' and
12979 `cancel_breakpoints'. Add new parameter to `pause_all'.
12980 (pause_all): Add new `freeze' parameter.
12981 (unpause_all): New.
12982 (cancel_breakpoints): New.
12983 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12984 cancel breakpoints.
12985 (cmd_qtstart): Pause threads.
12986 (stop_tracing): Pause threads, and cancel breakpoints.
12987 * win32-low.c (win32_target_ops): Adjust.
12988
e471f25b
PA
129892010-05-03 Pedro Alves <pedro@codesourcery.com>
12990
12991 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12992 the inferior right away from here...
12993 (linux_wait_1): ... to here, and adjust to check the thread's
12994 last_resume_kind instead of the lwp's step or stop_expected flags.
12995
1915ef4f
PA
129962010-05-02 Pedro Alves <pedro@codesourcery.com>
12997
12998 * README: Use consistent `GDB' and `GDBserver' spellings.
12999
f9e39928
PA
130002010-05-02 Pedro Alves <pedro@codesourcery.com>
13001
13002 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13003 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13004 (linux_detach_one_lwp): Assume the lwp is stopped.
13005 (any_thread_of): Delete.
13006 (linux_detach): Stop all lwps here. Don't blindly delete all
13007 breakpoints.
13008 (delete_lwp_callback): New.
13009 (linux_mourn): Delete all lwps of the process that is gone.
13010 (linux_wait_1): Don't delete the last lwp of the process here.
13011 * mem-break.h (mark_breakpoints_out): Declare.
13012 * mem-break.c (mark_breakpoints_out): New.
13013 (free_all_breakpoints): Use it.
13014 * server.c (handle_target_event): If the process is gone, mark
13015 breakpoints out.
13016 * thread-db.c (struct thread_db) <create_bp>: New field.
13017 (thread_db_enable_reporting): Fix prototype. Store a thread event
13018 breakpoint reference in the thread_db struct.
13019 (thread_db_load_search): Clear the thread_db object.
13020 (try_thread_db_load_1): Ditto.
13021 (switch_to_process): New.
13022 (disable_thread_event_reporting): Use it.
13023 (remove_thread_event_breakpoints): New.
13024 (thread_db_detach, thread_db_mourn): Use it.
13025
1e7fc18c
PA
130262010-05-01 Pedro Alves <pedro@codesourcery.com>
13027
13028 * linux-low.c (linux_enable_event_reporting): New.
13029 (linux_wait_for_event_1, handle_extended_wait): Use it.
13030
02fc4de7
PA
130312010-04-30 Pedro Alves <pedro@codesourcery.com>
13032
13033 * linux-low.c (linux_kill_one_lwp, linux_kill)
13034 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13035 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13036 SIGSTOP even if the LWP is stopped.
13037 (send_sigstop_callback): New.
13038 (stop_all_lwps): Use send_sigstop_callback instead.
13039 (linux_resume_one_thread): Adjust.
13040 (proceed_one_lwp): Still proceed an LWP that the client has
13041 requested to stop, if we haven't reported it as stopped yet. Make
13042 sure that LWPs the client want stopped, have a pending SIGSTOP.
13043
bc3b5632
DE
130442010-04-26 Doug Evans <dje@google.com>
13045
ae1ada35
DE
13046 * server.c (handle_general_set): Make static.
13047
bc3b5632
DE
13048 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13049 Print received char after testing for error/eof instead of before.
13050 (input_interrupt): Tweak comment.
13051
65730243
DE
130522010-04-23 Doug Evans <dje@google.com>
13053
13054 * server.c (start_inferior): Print inferior argv if --debug.
13055
a8ae7dc0
AR
130562010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13057
13058 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13059 * nto-x86-low.c: Include server.h
13060
1c07cc19
PM
130612010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13062
13063 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13064 be consistent with other sources of this directory.
13065 (init_registers_amd64): Correct name of source file of this function
13066 in the comment.
13067
e0a61e09
PM
130682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13069
13070 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13071 64-bit executables.
13072
54709339
PM
130732010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13074
13075 * win32-i386-low.c: Add 64-bit support.
13076 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13077 (init_registers_amd64): Declare.
13078 (mappings): Add 64-bit version of array.
13079 (init_windows_x86): New function.
13080 (the_low_target): Change init_arch field to init_windows_x86.
13081
e8f0053d
PM
130822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13083
13084 * win32-low.c: Adapt to support also 64-bit architecture.
13085 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13086 (get_image_name): Use SIZE_T type for local variable `done'.
13087 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13088 (toolhelp_get_dll_name): Idem.
13089 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13090 Use uintptr_t typecast to avoid warning.
13091 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13092 (handle_exception): Use phex_nz to avoid warning.
13093 (win32_wait): Remove unused local variable `process'.
13094
c481e77e
PM
130952010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13096
13097 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13098 `amd64-avx.o'.
13099
12ea4b69
PM
131002010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13101
13102 * configure.ac: Use `ws2_32' library for srv_mingw.
13103 * configure: Regenerate.
13104 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13105 * remote-utils.c: Likewise.
13106
f6d1620c
L
131072010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13108
13109 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13110 if __x86_64__ is defined.
13111
8e642873
PM
131122010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13113
13114 * configure: Regenerate.
13115
711e434b
PM
131162010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13117
13118 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13119 * target.h (target_ops): New get_tib_address field.
13120 * win32-low.h (win32_thread_info): Add thread_local_base field.
13121 * win32-low.c (child_add_thread): Add tlb argument.
13122 Set thread_local_base field to TLB.
13123 (get_child_debug_event): Adapt to child_add_thread change.
13124 (win32_get_tib_address): New function.
13125 (win32_target_ops): Set get_tib_address field to
13126 win32_get_tib_address.
13127 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13128
505106cd
PA
131292010-04-12 Pedro Alves <pedro@codesourcery.com>
13130
505106cd
PA
13131 * linux-low.c (linux_mourn): Also remove the process.
13132 * server.c (handle_target_event): Don't remove the process here.
13133 * nto-low.c (nto_mourn): New.
13134 (nto_target_ops): Install it.
13135 * spu-low.c (spu_mourn): New.
13136 (spu_target_ops): Install it.
13137 * win32-low.c (win32_mourn): New.
13138 (win32_target_ops): Install it.
13139
e8470a06
PA
131402010-04-12 Pedro Alves <pedro@codesourcery.com>
13141
13142 * server.h (buffer_xml_printf): Remove redundant `;'.
13143
45ba0d02
PA
131442010-04-12 Pedro Alves <pedro@codesourcery.com>
13145
13146 * regcache.c (set_register_cache): Invalidate regcaches before
13147 changing the register cache layout.
13148 (regcache_invalidate_one): Allow a NULL regcache.
13149 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13150 regcaches before changing the register cache layout or the target
13151 regsets.
13152
59e04013
L
131532010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13154
13155 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13156 variable warning on Linux/x86-64.
13157
8336d594
PA
131582010-04-11 Pedro Alves <pedro@codesourcery.com>
13159
13160 GDBserver disconnected tracing support.
13161
13162 * linux-low.c (linux_remove_process): Delete.
13163 (add_lwp): Don't set last_resume_kind here.
13164 (linux_kill): Use `mourn'.
13165 (linux_detach): Use `thread_db_detach', and `mourn'.
13166 (linux_mourn): New.
13167 (linux_attach_lwp_1): Adjust comment.
13168 (linux_attach): last_resume_kind moved the thread_info; adjust.
13169 (status_pending_p_callback): Adjust.
13170 (linux_wait_for_event_1): Adjust.
13171 (count_events_callback, select_singlestep_lwp_callback)
13172 (select_event_lwp_callback, cancel_breakpoints_callback)
13173 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13174 (proceed_one_lwp): Adjust.
13175 (linux_async): Add debug output.
13176 (linux_thread_stopped): New.
13177 (linux_pause_all): New.
13178 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13179 linux_pause_all.
13180 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13181 (thread_db_free): Delete declaration.
13182 (thread_db_detach, thread_db_mourn): Declare.
13183 * thread-db.c (thread_db_init): Use thread_db_mourn.
13184 (thread_db_free): Delete, split in two.
13185 (disable_thread_event_reporting): New.
13186 (thread_db_detach): New.
13187 (thread_db_mourn): New.
13188
13189 * server.h (struct thread_info) <last_resume_kind>: New field.
13190 <attached>: Add comment.
13191 <gdb_detached>: New field.
13192 (handler_func): Change return type to int.
13193 (handle_serial_event, handle_target_event): Ditto.
13194 (gdb_connected): Declare.
13195 (tracing): Delete.
13196 (disconnected_tracing): Declare.
13197 (stop_tracing): Declare.
13198
13199 * server.c (handle_query) <qSupported>: Report support for
13200 disconnected tracing.
13201 (queue_stop_reply_callback): Account for running threads.
13202 (gdb_wants_thread_stopped): New.
13203 (gdb_wants_all_threads_stopped): New.
13204 (gdb_reattached_process): New.
13205 (handle_status): Clear the `gdb_detached' flag of all processes.
13206 In all-stop, stop all threads.
13207 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13208 (process_serial_event): If the remote connection breaks, or if an
13209 exit was forced with "monitor exit", force an event loop exit.
13210 Handle disconnected tracing on detach.
13211 (handle_serial_event): Adjust.
13212 (handle_target_event): If GDB isn't connected, forward events back
13213 to the inferior, unless the last process exited, in which case,
13214 exit gdbserver. Adjust interface.
13215
13216 * remote-utils.c (remote_open): Don't block in accept. Instead
13217 register an event loop source on the listen socket file
13218 descriptor. Refactor bits into ...
13219 (listen_desc): ... this new global.
13220 (gdb_connected): ... this new function.
13221 (enable_async_notification): ... this new function.
13222 (handle_accept_event): ... this new function.
13223 (remote_close): Clear remote_desc.
13224
13225 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13226
13227 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13228 New fields.
13229 (mourn_inferior): Define.
13230 (target_process_qsupported): Avoid the dangling else problem.
13231 (thread_stopped): Define.
13232 (pause_all): Define.
13233 (target_waitstatus_to_string): Declare.
13234 * target.c (target_waitstatus_to_string): New.
13235
13236 * tracepoint.c (tracing): Make extern.
13237 (disconnected_tracing): New.
13238 (stop_tracing): Make extern. Handle tracing stops due to GDB
13239 disconnecting.
13240 (cmd_qtdisconnected): New.
13241 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13242 (handle_tracepoint_general_set): Handle QTDisconnected.
13243
13244 * event-loop.c (event_handler_func): Change return type to int.
13245 (process_event): Bail out if the event handler wants the event
13246 loop to stop.
13247 (handle_file_event): Ditto.
13248 (start_event_loop): Bail out if the event handler wants the event
13249 loop to stop.
13250
13251 * nto-low.c (nto_target_ops): Adjust.
13252 * spu-low.c (spu_wait): Don't remove the process here.
13253 (spu_target_ops): Adjust.
13254 * win32-low.c (win32_wait): Don't remove the process here.
13255 (win32_target_ops): Adjust.
13256
5d267c4c
PA
132572010-04-11 Pedro Alves <pedro@codesourcery.com>
13258
13259 * regcache.c (realloc_register_cache): Invalidate inferior's
13260 regcache before recreating it.
13261
623ccd72
PA
132622010-04-09 Pedro Alves <pedro@codesourcery.com>
13263
13264 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13265
219f2f23
PA
132662010-04-09 Stan Shebs <stan@codesourcery.com>
13267 Pedro Alves <pedro@codesourcery.com>
13268
13269 * server.h (LONGEST): New.
13270 (struct thread_info) <while_stepping>: New field.
13271 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13272 Declare.
13273 (initialize_tracepoint, handle_tracepoint_general_set)
13274 (handle_tracepoint_query, tracepoint_finished_step)
13275 (tracepoint_was_hit, release_while_stepping_state_list):
13276 (current_traceframe): Declare.
13277 * server.c (handle_general_set): Handle tracepoint packets.
13278 (read_memory): New.
13279 (write_memory): New.
13280 (handle_search_memory_1): Use read_memory.
13281 (handle_query): Report support for conditional tracepoints, trace
13282 state variables, and tracepoint sources. Handle tracepoint
13283 queries.
13284 (main): Initialize the tracepoints module.
13285 (process_serial_event): Handle traceframe reads/writes.
13286
13287 * linux-low.c (handle_tracepoints): New.
13288 (linux_wait_1): Call it.
13289 (linux_resume_one_lwp): Handle while-stepping.
13290 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13291 (linux_target_ops): Install them.
13292 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13293 New field.
13294 * linux-x86-low.c (x86_supports_tracepoints): New.
13295 (the_low_target). Install it.
13296
13297 * mem-break.h (delete_breakpoint): Declare.
13298 * mem-break.c (delete_breakpoint): Make external.
13299
13300 * target.h (struct target_ops): Add `supports_tracepoints',
13301 `read_pc', and `write_pc' fields.
13302 (target_supports_tracepoints): Define.
13303 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13304 (phex_nz): New.
13305
13306 * regcache.h (struct regcache) <registers_owned>: New field.
13307 (init_register_cache, regcache_cpy): Declare.
13308 (regcache_read_pc, regcache_write_pc): Declare.
13309 (register_cache_size): Declare.
13310 (supply_regblock): Declare.
13311 * regcache.c (init_register_cache): New.
13312 (new_register_cache): Use it.
13313 (regcache_cpy): New.
13314 (register_cache_size): New.
13315 (supply_regblock): New.
13316 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13317
219f2f23
PA
13318 * tracepoint.c: New.
13319
13320 * Makefile.in (OBS): Add tracepoint.o.
13321 (tracepoint.o): New rule.
13322
3a13a53b
L
133232010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13324
13325 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13326 (i386-mmx.o): New.
13327 (i386-mmx.c): Likewise.
13328 (i386-mmx-linux.o): Likewise.
13329 (i386-mmx-linux.c): Likewise.
13330
13331 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13332 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13333 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13334 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13335
13336 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13337 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13338 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13339
1570b33e
L
133402010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13341
13342 * Makefile.in (clean): Updated.
13343 (i386-avx.o): New.
13344 (i386-avx.c): Likewise.
13345 (i386-avx-linux.o): Likewise.
13346 (i386-avx-linux.c): Likewise.
13347 (amd64-avx.o): Likewise.
13348 (amd64-avx.c): Likewise.
13349 (amd64-avx-linux.o): Likewise.
13350 (amd64-avx-linux.c): Likewise.
13351
13352 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13353 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13354 (srv_amd64_regobj): Add amd64-avx.o.
13355 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13356 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13357 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13358 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13359 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13360 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13361 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13362
13363 * i387-fp.c: Include "i386-xstate.h".
13364 (i387_xsave): New.
13365 (i387_cache_to_xsave): Likewise.
13366 (i387_xsave_to_cache): Likewise.
13367 (x86_xcr0): Likewise.
13368
13369 * i387-fp.h (i387_cache_to_xsave): Likewise.
13370 (i387_xsave_to_cache): Likewise.
13371 (x86_xcr0): Likewise.
13372
13373 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13374 * linux-crisv32-low.c (target_regsets): Likewise.
13375 * linux-m68k-low.c (target_regsets): Likewise.
13376 * linux-mips-low.c (target_regsets): Likewise.
13377 * linux-ppc-low.c (target_regsets): Likewise.
13378 * linux-s390-low.c (target_regsets): Likewise.
13379 * linux-sh-low.c (target_regsets): Likewise.
13380 * linux-sparc-low.c (target_regsets): Likewise.
13381 * linux-xtensa-low.c (target_regsets): Likewise.
13382
13383 * linux-low.c: Include <sys/uio.h>.
13384 (regsets_fetch_inferior_registers): Support nt_type.
13385 (regsets_store_inferior_registers): Likewise.
13386 (linux_process_qsupported): New.
13387 (linux_target_ops): Add linux_process_qsupported.
13388
13389 * linux-low.h (regset_info): Add nt_type.
13390 (linux_target_ops): Add process_qsupported.
13391
13392 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13393 and <sys/uio.h>.
13394 (init_registers_i386_avx_linux): New.
13395 (init_registers_amd64_avx_linux): Likewise.
13396 (xmltarget_i386_linux_no_xml): Likewise.
13397 (xmltarget_amd64_linux_no_xml): Likewise.
13398 (PTRACE_GETREGSET): Likewise.
13399 (PTRACE_SETREGSET): Likewise.
13400 (x86_fill_xstateregset): Likewise.
13401 (x86_store_xstateregset): Likewise.
13402 (use_xml): Likewise.
13403 (x86_linux_update_xmltarget): Likewise.
13404 (x86_linux_process_qsupported): Likewise.
13405 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13406 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13407 init_registers_i386_linux here. Call
13408 x86_linux_update_xmltarget.
13409 (the_low_target): Add x86_linux_process_qsupported.
13410
13411 * server.c (handle_query): Call target_process_qsupported.
13412
13413 * target.h (target_ops): Add process_qsupported.
13414 (target_process_qsupported): New.
13415
fc7238bb
PA
134162010-04-03 Pedro Alves <pedro@codesourcery.com>
13417
13418 * inferiors.c (add_thread): Set last_status kind to
13419 TARGET_WAITKIND_IGNORE.
13420 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13421 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13422 (linux_wait_1): Move `thread' local definition to block that uses
13423 it. Don't NULL initialize `event_child'.
13424 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13425 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13426 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13427
bdabb078
PA
134282010-04-01 Pedro Alves <pedro@codesourcery.com>
13429
13430 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13431 an extended waitstatus, or by a watchpoint.
13432 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13433 thread was stepping or has been stopped by a watchpoint.
13434
d3bbe7a0
PA
134352010-04-01 Pedro Alves <pedro@codesourcery.com>
13436
13437 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13438 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13439 of another, then delete the previous, and validate all
13440 breakpoints.
13441 (validate_inserted_breakpoint): New.
13442 (delete_disabled_breakpoints): New.
13443 (validate_breakpoints): New.
13444 (check_mem_read): Validate breakpoints before trusting their
13445 shadow. Delete disabled breakpoints.
13446 (check_mem_write): Validate breakpoints before trusting they
13447 should be inserted. Delete disabled breakpoints.
13448 * mem-break.h (validate_breakpoints):
13449 * server.c (handle_query): Validate breakpoints when we see a
13450 qSymbol query.
13451
8b07ae33
PA
134522010-04-01 Pedro Alves <pedro@codesourcery.com>
13453
13454 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13455 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13456 if we could tell there's a GDB breakpoint at stop_pc.
13457 (need_step_over_p): Don't do a step over if we find a GDB
13458 breakpoint at the resume PC.
13459
13460 * mem-break.c (struct raw_breakpoint): New.
13461 (enum bkpt_type): New type `gdb_breakpoint'.
13462 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13463 fields. New field `raw'.
13464 (find_raw_breakpoint_at): New.
13465 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13466 breakpoint instead.
13467 (set_breakpoint_at): Adjust.
13468 (delete_raw_breakpoint): New.
13469 (release_breakpoint): New.
13470 (delete_breakpoint): Rename to...
13471 (delete_breakpoint_1): ... this. Add proc parameter. Use
13472 release_breakpoint. Return ENOENT.
13473 (delete_breakpoint): Reimplement.
13474 (find_breakpoint_at): Delete.
13475 (find_gdb_breakpoint_at): New.
13476 (delete_breakpoint_at): Delete.
13477 (set_gdb_breakpoint_at): New.
13478 (delete_gdb_breakpoint_at): New.
13479 (gdb_breakpoint_here): New.
13480 (set_reinsert_breakpoint): Use release_breakpoint.
13481 (uninsert_breakpoint): Rename to ...
13482 (uninsert_raw_breakpoint): ... this.
13483 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13484 (reinsert_raw_breakpoint): Change parameter type to
13485 raw_breakpoint.
13486 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13487 instead.
13488 (check_breakpoints): Adjust. Use release_breakpoint.
13489 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13490 (breakpoint_inserted_here): Ditto.
13491 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13492 Don't trust the breakpoint's shadow if it is not inserted.
13493 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13494 (delete_all_breakpoints): Adjust.
13495 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13496 use delete_breakpoint_1.
13497
13498 * mem-break.h (breakpoints_supported): Delete declaration.
13499 (set_gdb_breakpoint_at): Declare.
13500 (gdb_breakpoint_here): Declare.
13501 (delete_breakpoint_at): Delete.
13502 (delete_gdb_breakpoint_at): Declare.
13503
13504 * server.h (struct raw_breakpoint): Forward declare.
13505 (struct process_info): New field `raw_breakpoints'.
13506
13507 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13508 breakpoints.
13509
6bf5e0ba
PA
135102010-03-24 Pedro Alves <pedro@codesourcery.com>
13511
13512 * linux-low.c (status_pending_p_callback): Fix comment.
13513 (linux_wait_for_event_1): Move most of the internal breakpoint
13514 handling from here...
13515 (linux_wait_1): ... to here.
13516 (count_events_callback): New.
13517 (select_singlestep_lwp_callback): New.
13518 (select_event_lwp_callback): New.
13519 (cancel_breakpoints_callback): New.
13520 (select_event_lwp): New.
13521 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13522 priority to all LWPs that have had events that should be reported
13523 to the client. Cancel breakpoints when about to reporting the
13524 event to the client, not while stopping lwps. No longer cancel
13525 finished single-steps here.
13526 (cancel_finished_single_step): Delete.
13527 (cancel_finished_single_steps): Delete.
13528
414a389f
PA
135292010-03-24 Pedro Alves <pedro@codesourcery.com>
13530
13531 * mem-break.c (enum bkpt_type): New.
13532 (struct breakpoint): New field `type'.
13533 (set_breakpoint_at): Change return type to struct breakpoint
13534 pointer. Set type to `other_breakpoint' by default.
13535 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13536 in the breakpoint list.
13537 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13538 (reinsert_breakpoint): Rename to ...
13539 (reinsert_raw_breakpoint): ... this.
13540 (reinsert_breakpoints_at): Adjust.
13541 * mem-break.h (struct breakpoint): Declare.
13542 (set_breakpoint_at): Change return type to struct breakpoint
13543 pointer.
13544
2280c721
PA
135452010-03-24 Pedro Alves <pedro@codesourcery.com>
13546
13547 * server.c (handle_query): Assign, not compare.
13548
d50171e4
PA
135492010-03-24 Pedro Alves <pedro@codesourcery.com>
13550
13551 Teach linux gdbserver to step-over-breakpoints.
13552
13553 * linux-low.c (can_hardware_single_step): New.
13554 (supports_breakpoints): New.
13555 (handle_extended_wait): If stopping threads, read the stop pc of
13556 the new cloned LWP.
13557 (get_pc): New.
13558 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13559 low target doesn't support retrieving the PC.
13560 (add_lwp): Set last_resume_kind to resume_continue.
13561 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13562 (linux_attach): Don't clear stop_expected. Set the lwp's
13563 last_resume_kind to resume_stop.
13564 (linux_detach_one_lwp): Don't check for removed breakpoints.
13565 (check_removed_breakpoint): Delete.
13566 (status_pending_p): Rename to ...
13567 (status_pending_p_callback): ... this. Don't check for removed
13568 breakpoints. Don't consider threads that are stopped from GDB's
13569 perspective.
13570 (linux_wait_for_lwp): Always read the stop_pc here.
13571 (cancel_breakpoint): New.
13572 (step_over_bkpt): New global.
13573 (linux_wait_for_event_1): Implement stepping over breakpoints.
13574 (gdb_wants_lwp_stopped): New.
13575 (gdb_wants_all_stopped): New.
13576 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13577 single-step traps here. Store the thread's last reported target
13578 wait status.
13579 (send_sigstop): Don't clear stop_expected. Always set it,
13580 instead.
13581 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13582 (cancel_finished_single_step): New.
13583 (cancel_finished_single_steps): New.
13584 (wait_for_sigstop): Don't cancel finished single-step traps here.
13585 (linux_resume_one_lwp): Don't check for removed breakpoints.
13586 Don't set `step' on non-hardware step archs.
13587 (linux_set_resume_request): Ignore resume_stop requests if already
13588 stopping or stopped. Set the lwp's last_resume_kind.
13589 (resume_status_pending_p): Don't check for removed breakpoints.
13590 (need_step_over_p): New.
13591 (start_step_over): New.
13592 (finish_step_over): New.
13593 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13594 requests. Clear the thread's last reported target waitstatus.
13595 Don't use the `suspended' flag. Don't consider pending breakpoints.
13596 (linux_resume): Start a step-over if necessary.
13597 (proceed_one_lwp): New.
13598 (proceed_all_lwps): New.
13599 (unstop_all_lwps): New.
13600 * linux-low.h (struct lwp_info): Rewrite comment for the
13601 `suspended' flag. Add the `stop_pc' field. Delete the
13602 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13603 Add `'last_resume_kind' and `need_step_over' fields.
13604 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13605 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13606 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13607 (set_raw_breakpoint_at): New.
13608 (set_breakpoint_at): Rewrite to use it.
13609 (reinsert_breakpoint_handler): Delete.
13610 (set_reinsert_breakpoint): New.
13611 (reinsert_breakpoint_by_bp): Delete.
13612 (delete_reinsert_breakpoints): New.
13613 (uninsert_breakpoint): Rewrite.
13614 (uninsert_breakpoints_at): New.
13615 (reinsert_breakpoint): Rewrite.
13616 (reinsert_breakpoints_at): New.
13617 (check_breakpoints): Rewrite.
13618 (breakpoint_here): New.
13619 (breakpoint_inserted_here): New.
13620 (check_mem_read): Adjust.
13621 * mem-break.h (breakpoints_supported, breakpoint_here)
13622 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13623 (reinsert_breakpoint_by_bp): Delete declaration.
13624 (delete_reinsert_breakpoints): Declare.
13625 (reinsert_breakpoint): Delete declaration.
13626 (reinsert_breakpoints_at): Declare.
13627 (uninsert_breakpoint): Delete declaration.
13628 (uninsert_breakpoints_at): Declare.
13629 (check_breakpoints): Adjust prototype.
13630 * server.h: Adjust include order.
13631 (struct thread_info): Declare here. Add a `last_status' field.
13632
30ba68cb
MS
136332010-03-23 Michael Snyder <msnyder@vmware.com>
13634
13635 * server.c (crc32): New function.
13636 (handle_query): Add handling for 'qCRC:' request.
13637
b9a881c2
PA
136382010-03-23 Pedro Alves <pedro@codesourcery.com>
13639
13640 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13641 lwp had been stopped by a watchpoint.
13642
e92d13d5
PA
136432010-03-16 Pedro Alves <pedro@codesourcery.com>
13644
13645 * server.h (internal_error): Declare.
13646 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13647 * utils.c (internal_error): New function.
13648
64daa791
AS
136492010-03-15 Andreas Schwab <schwab@redhat.com>
13650
13651 * configure.srv: Fix typo setting srv_regobj.
13652
f52cd8cd
PA
136532010-03-15 Pedro Alves <pedro@codesourcery.com>
13654
13655 * linux-low.c (fetch_register): Avoid passing a non string literal
13656 format to `error'.
13657 (usr_store_inferior_registers): Ditto.
13658
93ae6fdc
PA
136592010-03-14 Pedro Alves <pedro@codesourcery.com>
13660
13661 * linux-low.c (linux_write_memory): Bail out early if peeking
13662 memory failed.
13663
c3adc08c
PA
136642010-03-14 Pedro Alves <pedro@codesourcery.com>
13665
13666 * linux-low.h (struct lwp_info): New fields
13667 `stopped_by_watchpoint' and `stopped_data_address'.
13668 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13669 here, and cache them in the lwp object.
13670 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13671 directly.
13672 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13673 field.
13674 (linux_stopped_by_watchpoint): Rewrite.
13675 (linux_stopped_data_address): Rewrite.
13676
bce522a2
PA
136772010-03-06 Simo Melenius <simo.melenius@iki.fi>
13678
13679 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13680 switching the current inferior, not before.
13681
90884b2b
L
136822010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13683
13684 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13685 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13686 i386-linux.c and amd64-linux.c.
13687 (reg-i386.o): Removed.
13688 (reg-i386.c): Likewise.
13689 (reg-i386-linux.o): Likewise.
13690 (reg-i386-linux.c): Likewise.
13691 (reg-x86-64.o): Likewise.
13692 (reg-x86-64.c): Likewise.
13693 (reg-x86-64-linux.o): Likewise.
13694 (reg-x86-64-linux.c): Likewise.
13695 (i386.o): New.
13696 (i386.c): Likewise.
13697 (i386-linux.o): Likewise.
13698 (i386-linux.c): Likewise.
13699 (amd64.o): Likewise.
13700 (amd64.c): Likewise.
13701 (amd64-linux.o): Likewise.
13702 (amd64-linux.c): Likewise.
13703
13704 * configure.srv (srv_i386_regobj): New.
13705 (srv_i386_linux_regobj): Likewise.
13706 (srv_amd64_regobj): Likewise.
13707 (srv_amd64_linux_regobj): Likewise.
13708 (srv_i386_32bit_xmlfiles): Likewise.
13709 (srv_i386_64bit_xmlfiles): Likewise.
13710 (srv_i386_xmlfiles): Likewise.
13711 (srv_amd64_xmlfiles): Likewise.
13712 (srv_i386_linux_xmlfiles): Likewise.
13713 (srv_amd64_linux_xmlfiles): Likewise.
13714 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13715 srv_xmlfiles to $srv_i386_xmlfiles.
13716 (i[34567]86-*-mingw32ce*): Likewise.
13717 (i[34567]86-*-mingw*): Likewise.
13718 (i[34567]86-*-nto*): Likewise.
13719 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13720 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13721 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13722 (x86_64-*-linux*): Likewise.
13723
13724 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13725 (init_registers_amd64_linux): New.
13726 (x86_arch_setup): Replace init_registers_x86_64_linux with
13727 init_registers_amd64_linux.
13728
193f13e6
MK
137292010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13730
13731 * configure.ac: Check for libdl. If it is not available link against
13732 static libthread_db.
13733 * configure: Regenerate.
13734
85d721b8
PA
137352010-02-22 Pedro Alves <pedro@codesourcery.com>
13736
13737 PR9605
13738
13739 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13740 handing a read watchpoint.
13741 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13742
6076632b
DE
137432010-02-12 Doug Evans <dje@google.com>
13744
13745 * linux-low.c (linux_supports_tracefork_flag): Document.
13746 (linux_look_up_symbols): Add comment.
13747
3327ccf7
L
137482010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13749
13750 * regcache.c (supply_register): Clear regcache if buf is NULL.
13751
0718675c 137522010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13753 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13754
13755 * inferiors.c (find_inferior): Add function documentation.
13756 (unloaded_dll): Handle the case where the unloaded dll has not
13757 been previously registered in the dll list.
13758
177321bd
DJ
137592010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13760
13761 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13762 (thumb2_breakpoint): New.
13763 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13764
2b009048
DJ
137652010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13766
13767 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13768 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13769 breakpoints.
13770
3be029c7
PA
137712010-01-21 Pedro Alves <pedro@codesourcery.com>
13772
13773 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13774
18f5de3b
JK
137752010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13776
13777 * linux-s390-low.c (s390_collect_ptrace_register)
13778 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13779
3743bb4f
DE
137802010-01-21 Doug Evans <dje@google.com>
13781
14ce3065
DE
13782 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13783 (PTRACE_ARG4_TYPE): New macro.
13784 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13785 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13786 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13787 (usr_store_inferior_registers): Ditto.
13788 (linux_read_memory, linux_write_memory): Ditto.
13789 (linux_test_for_tracefork): Ditto.
13790
3743bb4f
DE
13791 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13792 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13793
8b315be5
PA
137942010-01-21 Pedro Alves <pedro@codesourcery.com>
13795
13796 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13797 target.
13798
85492558
PA
137992010-01-21 Pedro Alves <pedro@codesourcery.com>
13800
13801 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13802 prototype to take a regcache. Adjust.
13803
442ea881
PA
138042010-01-20 Pedro Alves <pedro@codesourcery.com>
13805
13806 * regcache.h (struct thread_info): Forward declare.
13807 (struct regcache): New.
13808 (new_register_cache): Adjust prototype.
13809 (get_thread_regcache): Declare.
13810 (free_register_cache): Adjust prototype.
13811 (registers_to_string, registers_from_string): Ditto.
13812 (supply_register, supply_register_by_name, collect_register)
13813 (collect_register_as_string, collect_register_by_name): Ditto.
13814 * regcache.c (struct inferior_regcache_data): Delete.
13815 (get_regcache): Rename to ...
13816 (get_thread_regcache): ... this. Adjust. Switch inferior before
13817 fetching registers.
13818 (regcache_invalidate_one): Adjust.
13819 (regcache_invalidate): Fix prototype.
13820 (new_register_cache): Return the new register cache.
13821 (free_register_cache): Change prototype.
13822 (realloc_register_cache): Adjust.
13823 (registers_to_string): Change prototype to take a regcache. Adjust.
13824 (registers_from_string): Ditto.
13825 (register_data): Ditto.
13826 (supply_register): Ditto.
13827 (supply_register_by_name): Ditto.
13828 (collect_register): Ditto.
13829 (collect_register_as_string): Ditto.
13830 (collect_register_by_name): Ditto.
13831 * server.c (process_serial_event): Adjust.
13832 * linux-low.h (regset_fill_func, regset_store_func): Change
13833 prototype.
13834 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13835 Change prototype.
13836 * linux-low.c (get_stop_pc): Adjust.
13837 (check_removed_breakpoint): Adjust.
13838 (linux_wait_for_event): Adjust.
13839 (linux_resume_one_lwp): Adjust.
13840 (fetch_register): Add regcache parameter. Adjust.
13841 (usr_store_inferior_registers): Ditto.
13842 (regsets_fetch_inferior_registers): Ditto.
13843 (regsets_store_inferior_registers): Ditto.
13844 (linux_fetch_registers, linux_store_registers): Ditto.
13845 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13846 regcache. Adjust.
43aaf8b6
PA
13847 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13848 Ditto.
442ea881
PA
13849 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13850 prototype to take a regcache.
13851 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13852 * remote-utils.c (convert_ascii_to_int, outreg)
13853 (prepare_resume_reply): Change prototype to take a regcache.
13854 Adjust.
13855 * target.h (struct target_ops) <fetch_registers, store_registers>:
13856 Change prototype to take a regcache.
13857 (fetch_inferior_registers, store_inferior_registers): Change
13858 prototype to take a regcache. Adjust.
13859 * proc-service.c (ps_lgetregs): Adjust.
13860 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13861 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13862 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13863 take a regcache. Adjust.
13864 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13865 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13866 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13867 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13868 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13869 (cris_cannot_fetch_register):
13870 (cris_breakpoint_at): Change prototype to take a regcache.
13871 Adjust.
13872 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13873 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13874 to take a regcache. Adjust.
13875 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13876 Adjust.
13877 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13878 take a regcache. Adjust.
13879 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13880 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13881 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13882 * linux-mips-low.c (mips_get_pc):
13883 (mips_set_pc): Change prototype to take a regcache. Adjust.
13884 (mips_reinsert_addr): Adjust.
13885 (mips_collect_register): Change prototype to take a regcache.
13886 Adjust.
13887 (mips_supply_register):
13888 (mips_collect_register_32bit, mips_supply_register_32bit)
13889 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13890 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13891 * linux-ppc-low.c (ppc_supply_ptrace_register)
13892 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13893 (parse_spufs_run): Adjust.
13894 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13895 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13896 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13897 take a regcache. Adjust.
13898 * linux-s390-low.c (s390_collect_ptrace_register)
13899 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13900 (s390_set_pc): Change prototype to take a regcache. Adjust.
13901 (s390_arch_setup): Adjust.
13902 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13903 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13904 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13905 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13906 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13907 regcache. Adjust.
13908 (sparc_breakpoint_at): Adjust.
13909 * linux-xtensa-low.c (xtensa_fill_gregset):
13910 (xtensa_store_gregset):
13911 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13912 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13913 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13914 prototype to take a regcache. Adjust.
13915 * win32-arm-low.c (arm_fetch_inferior_register)
13916 (arm_store_inferior_register): Change prototype to take a
13917 regcache. Adjust.
13918 * win32-i386-low.c (i386_fetch_inferior_register)
13919 (i386_store_inferior_register): Change prototype to take a
13920 regcache. Adjust.
13921 * win32-low.c (child_fetch_inferior_registers)
13922 (child_store_inferior_registers): Change prototype to take a
13923 regcache. Adjust.
13924 (win32_wait): Adjust.
13925 (win32_fetch_inferior_registers): Change prototype to take a
13926 regcache. Adjust.
13927 (win32_store_inferior_registers): Adjust.
13928 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13929 store_inferior_register>: Change prototype to take a regcache.
13930
60c3d7b0
DE
139312010-01-20 Doug Evans <dje@google.com>
13932
13933 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13934 #ifdef.
13935 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13936 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13937
dc146f7c
VP
139382010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13939
13940 * linux-low.c (linux_core_of_thread): New.
13941 (compare_ints, show_process, list_threads): New.
13942 (linux_qxfer_osdata): Report threads and cores.
13943 (linux_target_op): Register linux_core_of_thread.
13944 * remote-utils.c (prepare_resume_reply): Report the core.
13945 (buffer_xml_printf): Support %d specifier.
13946 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13947 New.
13948 (handle_query): Handle qXfer:threads. Announce availability
13949 thereof.
13950 * target.h (struct target_ops): New field core_of_thread.
13951
7803799a
UW
139522010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13953
13954 * Makefile.in (clean): Remove new generated files.
13955 (reg-s390.o, reg-s390.c): Remove rules.
13956 (reg-s390x.o, reg-s390x.c): Likewise.
13957 (s390-linux32.o, s390-linux32.c): Add rules.
13958 (s390-linux64.o, s390-linux64.c): Likewise.
13959 (s390x-linux64.o, s390x-linux64.c): Likewise.
13960 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13961 * linux-s390-low.c: Include <elf.h>.
13962 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13963 (init_registers_s390): Remove prototype.
13964 (init_registers_s390x): Likewise.
13965 (init_registers_s390_linux32): Add prototype.
13966 (init_registers_s390_linux64): Likewise.
13967 (init_registers_s390x_linux64): Likewise.
13968 (s390_num_regs_3264): New define.
13969 (s390_regmap_3264): New global variable.
13970 (s390_cannot_fetch_register): Remove obsolete check.
13971 (s390_cannot_store_register): Likewise.
13972 (s390_collect_ptrace_register): Handle upper/lower register halves.
13973 (s390_supply_ptrace_register): Likewise.
13974 (s390_fill_gregset): Update to register number changes.
13975 (s390_get_hwcap): New routine.
13976 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13977 Install appropriate regmap and register set.
13978
6e7ffa39
JB
139792010-01-01 Joel Brobecker <brobecker@adacore.com>
13980
13981 * server.c (gdbserver_version): Update copyright year to 2010.
13982 * gdbreplay.c (gdbreplay_version): Likewise.
13983
957f3f49
DE
139842009-12-28 Doug Evans <dje@google.com>
13985
13986 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13987 elf/external.h. Include <elf.h> instead but only if necessary.
13988
ca5c370d
PA
139892009-12-28 Pedro Alves <pedro@codesourcery.com>
13990
13991 * linux-low.c (linux_remove_process): Remove `detaching'
13992 parameter. Don't release/detach from thread_db here.
13993 (linux_kill): Release/detach from thread_db here, ...
13994 (linux_detach): ... and here, before actually detaching.
13995 (linux_wait_1): ... and here, when a process exits.
13996 * thread-db.c (any_thread_of): New.
13997 (thread_db_free): Switch the current inferior to a thread of the
13998 passed in process.
13999
4ee62156
DE
140002009-12-21 Doug Evans <dje@google.com>
14001
d90e6a88
DE
14002 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14003
c5f62d5f
DE
14004 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14005 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14006 warning ifndef __NR_tkill. Move setting of errno there too.
14007 Delete unnecessary resetting of errno after syscall.
14008 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14009
10e86dd7
DE
14010 * configure.ac: Check for dladdr.
14011 * config.in: Regenerate.
14012 * configure: Regenerate.
14013 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14014 (try_thread_db_load): Update.
14015
4ee62156
DE
14016 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14017
00f515da
DE
140182009-12-18 Doug Evans <dje@google.com>
14019
e9464885
DE
14020 * event-loop.c: Include unistd.h if it exists.
14021
07d4f67e
DE
14022 * linux-low.c (my_waitpid): Move definition away from being in
14023 between linux_tracefork_child/linux_test_for_tracefork.
14024
00f515da
DE
14025 * gdb_proc_service.h (psaddr_t): Fix type.
14026 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14027 signature to match glibc.
14028
1de1badb
DE
140292009-12-16 Doug Evans <dje@google.com>
14030
14031 * linux-low.c (linux_read_memory): Fix argument to read.
14032
aeeb81d1
PA
140332009-11-26 Pedro Alves <pedro@codesourcery.com>
14034
14035 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14036 events, don't leave current_inferior pointing at null.
14037
10357975
PA
140382009-11-26 Pedro Alves <pedro@codesourcery.com>
14039
14040 * win32-low.c (LOG): Delete.
14041 (OUTMSG): Output to stderr.
14042 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14043 on compile time LOG macro.
14044 (win32_wait): Fix debug output.
14045
cf6e3471
PA
140462009-11-26 Pedro Alves <pedro@codesourcery.com>
14047
14048 * win32-low.c (win32_add_one_solib): If the dll name is
14049 "ntdll.dll", prepend the system directory to the dll path.
14050
0c85e18e
MK
140512009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14052
14053 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14054
9ac544ce 140552009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14056 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14057
14058 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14059 * configure.ac: Check for __mcoldfire__ and set
14060 gdb_cv_m68k_is_coldfire.
14061 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14062 reg-cf.o and reg-m68k.o.
14063 * configure: Regenerated.
14064
fd7dd3e6
PA
140652009-11-16 Pedro Alves <pedro@codesourcery.com>
14066
14067 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14068 Pass it to thread_db_free.
14069 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14070 proper `detaching' argument to linux_remove_process.
14071 * linux-low.h (thread_db_free): Add `detaching' parameter.
14072 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14073 to thread_db_free.
14074 (thread_db_free): Add `detaching' parameter. Only
14075 call td_ta_clear_event if detaching from process.
14076
75aa492e
MK
140772009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14078
14079 * thread-db.c (thread_db_free): Fix typo.
14080
21e1bee4
PP
140812009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14082
14083 PR gdb/10838
14084 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14085
8838b45e
NS
140862009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14087
14088 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14089 with an i686 compiler.
14090 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14091 needed.
14092 * configure: Rebuilt.
14093
8a35fb51
SL
140942009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14095
14096 PR gdb/10783
14097
14098 * server.c (handle_search_memory_1): Correct read_addr initialization
14099 in loop for searching subsequent chunks.
14100
96f15937
PP
141012009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14102
14103 * configure.ac: New --with-libthread-db option.
14104 * thread-db.c: Allow direct dependence on libthread_db.
14105 (thread_db_free): Adjust.
14106 * config.in: Regenerate.
14107 * configure: Likewise.
889bf7c5 14108
5f7d1694
PP
141092009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14110
14111 PR gdb/10757
14112 * thread-db.c (attach_thread): New function.
14113 (maybe_attach_thread): Return success/failure.
14114 (find_new_threads_callback): Adjust.
889bf7c5
PA
14115 (thread_db_find_new_threads): Loop until no new threads.
14116
88e3b899
PA
141172009-10-13 Pedro Alves <pedro@codesourcery.com>
14118
14119 * proc-service.c (ps_lgetregs): Formatting.
14120
cdbfd419
PP
141212009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14122
14123 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14124 * configure.ac: Adjust.
14125 * linux-low.h (struct process_info_private): Move members to struct
14126 thread_db.
14127 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14128 * linux-low.c (linux_remove_process): Adjust.
14129 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14130 * server.c (handle_query): Move code ...
14131 (handle_monitor_command): ... here. New function.
14132 * target.h (struct target_ops): New member.
14133 * thread-db.c (struct thread_db): New.
14134 (libthread_db_search_path): New variable.
14135 (thread_db_create_event, thread_db_enable_reporting)
14136 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14137 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14138 (try_thread_db_load_1, dladdr_to_soname): New functions.
14139 (try_thread_db_load, thread_db_load_search): New functions.
14140 (thread_db_init): Search for libthread_db.
14141 (thread_db_free): New function.
14142 (thread_db_handle_monitor_command): Likewise.
14143 * config.in: Regenerate.
14144 * configure: Regenerate.
889bf7c5 14145
4168d2d6
UW
141462009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14147
14148 * spu-low.c (spu_kill): Wait for inferior to terminate.
14149 Call clear_inferiors.
14150 (spu_detach): Call clear_inferiors.
14151
81ecdfbb
RW
141522009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14153
14154 * aclocal.m4: Regenerate.
14155 * config.in: Likewise.
14156 * configure: Likewise.
14157
0b9ff2c0
UW
141582009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14159
14160 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14161 (parse_spufs_run): New function.
14162 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14163 (ppc_breakpoint_at): Handle SPU breakpoints.
14164
efcbbd14
UW
141652009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14166
14167 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14168 (SPUFS_MAGIC): Define.
14169 (spu_enumerate_spu_ids): New function.
14170 (linux_qxfer_spu): New function.
14171 (linux_target_ops): Install linux_qxfer_spu.
14172
f4d9bade
UW
141732009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14174
14175 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14176 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14177 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14178 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14179 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14180 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14181 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14182 (init_registers_powerpc_cell32l): Add prototype.
14183 (init_registers_powerpc_cell64l): Likewise.
14184 (ppc_arch_setup): Detect Cell/B.E. architecture.
14185
96e946ca
RW
141862009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14187
14188 * Makefile.in (datarootdir): New variable.
14189
58d6951d
DJ
141902009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14191
14192 * linux-low.c (linux_write_memory): Update debugging output.
14193 * Makefile.in (clean): Add new descriptions.
14194 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14195 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14196 * configure.srv: Add new files for arm*-*-linux*.
14197 * linux-arm-low.c: Add new declarations.
14198 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14199 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14200 (HWCAP_VFPv3D16): New.
14201 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14202 instead of __IWMMXT__.
14203 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14204 (arm_arch_setup): New.
14205 (target_regsets): Remove #ifdef. Add VFP regset.
14206 (the_low_target): Use arm_arch_setup.
14207
12b42a12
DJ
142082009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14211 the main thread again.
14212
ac8c974e
AR
142132009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14214
14215 Adding Neutrino gdbserver.
14216 * configure: Regenerated.
14217 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14218 * configure.srv (i[34567]86-*-nto*): New target.
14219 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14220 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14221 (nto_comctrl) [__QNX__]: New function.
14222 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14223
4424e0c3 142242009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14225
14226 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14227 srv_tgtobj.
14228
912cf4ba
PA
142292009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14230 Pedro Alves <pedro@codesourcery.com>
14231
14232 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14233 don't support CONTEXT_EXTENDED_REGISTERS.
14234 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14235 (the_low_target): Install them.
14236 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14237 failing with ERROR_PIPE_NOT_CONNECTED.
14238
aa5ca48f
DE
142392009-06-30 Doug Evans <dje@google.com>
14240 Pierre Muller <muller@ics.u-strasbg.fr>
14241
14242 Add h/w watchpoint support to x86-linux, win32-i386.
14243 * Makefile.in (SFILES): Add i386-low.c
14244 (i386_low_h): Define.
14245 (i386-low.o): Add dependencies.
14246 (linux-x86-low.o): Add i386-low.h dependency.
14247 (win32-i386-low.o): Ditto.
14248 * i386-low.c: New file.
14249 * i386-low.h: New file.
14250 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14251 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14252 * linux-low.c (linux_add_process): Initialize arch_private.
14253 (linux_remove_process): Free arch_private.
14254 (add_lwp): Initialize arch_private.
14255 (delete_lwp): Free arch_private.
14256 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14257 provided.
14258 * linux-low.h (process_info_private): New member arch_private.
14259 (lwp_info): New member arch_private.
14260 (linux_target_ops): New members new_process, new_thread,
14261 prepare_to_resume.
14262 (ptid_of): New macro.
14263 * linux-x86-low.c: Include stddef.h, i386-low.h.
14264 (arch_process_info): New struct.
14265 (arch_lwp_info): New struct.
14266 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14267 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14268 (i386_dr_low_get_status): New function.
14269 (x86_insert_point, x86_remove_point): New functions.
14270 (x86_stopped_by_watchpoint): New function.
14271 (x86_stopped_data_address): New function.
14272 (x86_linux_new_process, x86_linux_new_thread): New functions.
14273 (x86_linux_prepare_to_resume): New function.
14274 (the_low_target): Add entries for insert_point, remove_point,
14275 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14276 prepare_to_resume.
14277 * server.c (debug_hw_points): New global.
14278 (monitor_show_help): Document set debug-hw-points.
14279 (handle_query): Process "set debug-hw-points".
14280 * server.h (debug_hw_points): Declare.
14281 (paddress): Declare.
14282 * utils.c (NUMCELLS, CELLSIZE): New macros.
14283 (get_sell, xsnprintf, paddress): New functions.
14284 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14285 remove_point, stopped_by_watchpoint, stopped_data_address.
14286 * win32-i386-low.c: Include i386-low.h.
14287 (debug_reg_state): Replaces dr.
14288 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14289 (i386_dr_low_get_status): New function.
14290 (i386_insert_point, i386_remove_point): New functions.
14291 (i386_stopped_by_watchpoint): New function.
14292 (i386_stopped_data_address): New function.
14293 (i386_initial_stuff): Update.
14294 (get_thread_context,set_thread_context,i386_thread_added): Update.
14295 (the_low_target): Add entries for insert_point,
14296 remove_point, stopped_by_watchpoint, stopped_data_address.
14297 * win32-low.c (win32_insert_watchpoint): New function.
14298 (win32_remove_watchpoint): New function.
14299 (win32_stopped_by_watchpoint): New function.
14300 (win32_stopped_data_address): New function.
14301 (win32_target_ops): Add entries for insert_watchpoint,
14302 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14303 * win32-low.h (win32_target_ops): New members insert_point,
14304 remove_point, stopped_by_watchpoint, stopped_data_address.
14305
d993e290
PA
143062009-06-25 Pedro Alves <pedro@codesourcery.com>
14307
14308 * server.c (process_serial_event): Re-return unsupported, not
14309 error, if the type isn't recognized. Re-allow supporting only
14310 insert or remove packets. Also call require_running for
14311 breakpoints. Add missing break statement to default case. Tidy.
14312 * target.h (struct target_ops): Rename insert_watchpoint to
14313 insert_point, and remove_watchpoint to remove_point.
14314
14315 * linux-low.h (struct linux_target_ops): Likewise.
14316 * linux-low.c (linux_insert_watchpoint): Rename to ...
14317 (linux_insert_point): ... this. Adjust.
14318 (linux_remove_watchpoint): Rename to ...
14319 (linux_remove_point): ... this. Adjust.
14320 (linux_target_ops): Adjust.
14321 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14322 (cris_insert_point): ... this.
14323 (cris_remove_watchpoint): Rename to ...
14324 (cris_remove_point): ... this.
14325 (the_low_target): Adjust.
14326
0f54c268
PM
143272009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14328
14329 * server.c (handle_v_kill): Pass signal_pid to
14330 kill_inferior if multi_process is zero.
14331
c6314022
AR
143322009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14333
14334 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14335 * target.h (target_ops): Comment for *_watchpoint to make it clear
14336 the functions can get types '0' and '1'.
14337
4463ce24
AR
143382009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14339
14340 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14341 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14342 * regcache.c (get_regcache): Likewise.
14343 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14344 * win32-low.c (child_fetch_inferior_registers): Remove check for
14345 regno 0.
14346
cf8fd78b
PA
143472009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14348 Pedro Alves <pedro@codesourcery.com>
14349
14350 * target.h (struct target_ops) <supports_multi_process>: New
14351 callback.
14352 (target_supports_multi_process): New.
14353 * server.c (handle_query): Even if GDB reports support, only
14354 enable multi-process if the target also supports it. Report
14355 multi-process support only if the target backend supports it.
14356 * linux-low.c (linux_supports_multi_process): New function.
14357 (linux_target_ops): Install it as target_supports_multi_process
14358 callback.
14359
47c0c975
DE
143602009-05-24 Doug Evans <dje@google.com>
14361
e09875d4
DE
14362 Global renaming of find_thread_pid to find_thread_ptid.
14363 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14364 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14365 All callers updated.
14366
e27d73f6
DE
14367 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14368 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14369 directly.
14370
47c0c975
DE
14371 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14372 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14373 (linux_resume_one_lwp): Ditto.
14374
2acc282a
DE
143752009-05-23 Doug Evans <dje@google.com>
14376
14377 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14378 from struct inferior_list_entry * to struct lwp_info *.
14379 All callers updated.
14380
9f1036c1
DE
143812009-05-13 Doug Evans <dje@google.com>
14382
14383 * linux-x86-low.c: Don't include assert.h.
14384 (x86_siginfo_fixup): Use fatal, not assert.
14385 (x86_arch_setup): Fix comment.
14386
d0722149
DE
143872009-05-12 Doug Evans <dje@google.com>
14388
14389 Biarch support for i386/amd64 gdbserver.
14390 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14391 Add linux-x86-low.c.
14392 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14393 (linux-x86-low.o): Add.
14394 * linux-x86-64-low.c: Delete.
14395 * linux-i386-low.c: Delete.
14396 * linux-x86-low.c: New file.
14397 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14398 linux-x86-low.o.
14399 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14400 linux-x86-low.o.
14401 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14402 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14403 (linux_child_pid_to_exec_file): New function.
14404 (elf_64_header_p, elf_64_file_p): New functions.
14405 (siginfo_fixup): New function.
14406 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14407 give target a chance to convert layout.
14408 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14409 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14410
fdeb2a12
DE
144112009-05-07 Doug Evans <dje@google.com>
14412
14413 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14414 (regsets_store_inferior_registers): Ditto.
14415
a6dbe5df
PA
144162009-05-06 Pedro Alves <pedro@codesourcery.com>
14417
14418 PR server/10048
14419
14420 * linux-low.c (must_set_ptrace_flags): Delete.
14421 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14422 of the global.
14423 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14424 `lwp->must_set_ptrace_flags' instead.
ba42693b 14425 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14426 (linux_wait_1): ... not here.
14427
5091eb23
DE
144282009-04-30 Doug Evans <dje@google.com>
14429
9f767825
DE
14430 * inferiors.c (started_inferior_callback): New function.
14431 (attached_inferior_callback): New function.
14432 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14433 * server.c (print_started_pid, print_attached_pid): New functions.
14434 (detach_or_kill_for_exit): New function.
14435 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14436 * server.h (have_started_inferiors_p): Declare.
14437 (have_attached_inferiors_p): Declare.
14438
5091eb23
DE
14439 * inferiors.c (remove_process): Fix memory leak, free process.
14440 * linux-low.c (linux_remove_process): New function.
14441 (linux_kill): Call it instead of remove_process.
14442 (linux_detach, linux_wait_1): Ditto.
14443
155c8968
PA
144442009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14445
14446 * configure.srv: Add x86 Windows CE target.
14447
7fe519cb
UW
144482009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14449
14450 * inferiors.c (get_thread_process): Make global.
14451 * server.h (get_thread_process): Add prototype.
14452 * thread-db.c (find_one_thread): Use get_thread_process
14453 instead of current_process.
14454 (thread_db_get_tls_address): Do not crash if called when
14455 thread layer is not yet initialized.
14456
5472f405
UW
144572009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14458
14459 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14460 * spu-low.c (current_tid): Rename to ...
14461 (current_ptid): ... this.
14462 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14463 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14464 ptid_get_lwp (current_ptid) instead of current_tid.
14465 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14466 instead of current_tid. Use find_process_pid to verify pid
14467 argument is valid. Pass proper argument to remove_process.
14468 (spu_thread_alive): Compare current_ptid instead of current_tid.
14469 (spu_resume): Likewise.
14470
55ac2b99
PA
144712009-04-02 Pedro Alves <pedro@codesourcery.com>
14472
14473 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14474 variable.
14475
95954743
PA
144762009-04-01 Pedro Alves <pedro@codesourcery.com>
14477
14478 Implement the multiprocess extensions, and add linux multiprocess
14479 support.
14480
14481 * server.h (ULONGEST): Declare.
14482 (struct ptid, ptid_t): New.
14483 (minus_one_ptid, null_ptid): Declare.
14484 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14485 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14486 (struct inferior_list_entry): Change `id' type from unsigned from
14487 to ptid_t.
14488 (struct sym_cache, struct breakpoint, struct
14489 process_info_private): Forward declare.
14490 (struct process_info): Declare.
14491 (current_process): Declare.
14492 (all_processes): Declare.
14493 (initialize_inferiors): Declare.
14494 (add_thread): Adjust to use ptid_t.
14495 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14496 (add_process, remove_process, find_thread_pid): Declare.
14497 (find_inferior_id): Adjust to use ptid_t.
14498 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14499 (multi_process): Declare.
14500 (push_event): Adjust to use ptid_t.
14501 (read_ptid, write_ptid): Declare.
14502 (prepare_resume_reply): Adjust to use ptid_t.
14503 (clear_symbol_cache): Declare.
14504 * inferiors.c (all_processes): New.
14505 (null_ptid, minus_one_ptid): New.
14506 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14507 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14508 (add_thread): Change unsigned long to ptid. Remove gdb_id
14509 parameter. Adjust.
14510 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14511 (gdb_id_to_thread): Rename to ...
14512 (find_thread_pid): ... this. Change unsigned long to ptid.
14513 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14514 (loaded_dll, pull_pid_from_list): Adjust.
14515 (add_process, remove_process, find_process_pid)
14516 (get_thread_process, current_process, initialize_inferiors): New.
14517 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14518 (struct target_waitstatus) <related_pid>: Ditto.
14519 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14520 return type to int.
14521 (struct target_ops) <join>: Add `pid' argument.
14522 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14523 (struct target_ops) <wait>: Add `ptid' field. Change return type
14524 to ptid.
14525 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14526 (mywait): Add `ptid' argument. Change return type to ptid_t.
14527 (target_pid_to_str): Declare.
14528 * target.c (set_desired_inferior): Adjust to use ptids.
14529 (mywait): Add new `ptid' argument. Adjust.
14530 (target_pid_to_str): New.
14531 * mem-break.h (free_all_breakpoints): Declare.
14532 * mem-break.c (breakpoints): Delelete.
14533 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14534 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14535 to use per-process breakpoint list.
14536 (free_all_breakpoints): New.
14537 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14538 (symbol_cache, all_symbols_looked_up): Delete.
14539 (hexchars): New.
14540 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14541 read_ptid): New.
14542 (prepare_resume_reply): Change ptid argument's type from unsigned
14543 long to ptid_t. Adjust. Implement W;process and X;process.
14544 (free_sym_cache, clear_symbol_cache): New.
14545 (look_up_one_symbol): Adjust to per-process symbol cache. *
14546 * server.c (cont_thread, general_thread, step_thread): Change type
14547 to ptid_t.
14548 (attached): Delete.
14549 (multi_process): New.
14550 (last_ptid): Change type to ptid_t.
14551 (struct vstop_notif) <ptid>: Change type to ptid_t.
14552 (queue_stop_reply, push_event): Change `ptid' argument's type to
14553 ptid_t.
14554 (discard_queued_stop_replies): Add `pid' argument.
14555 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14556 changes. Don't reference the `attached' global.
14557 (attach_inferior): Adjust to mywait interface changes.
14558 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14559 features. Handle and report "multiprocess+". Handle
14560 "qAttached:PID".
14561 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14562 changes.
14563 (handle_v_kill): New.
14564 (handle_v_stopped): Adjust to use target_pid_to_str.
14565 (handle_v_requests): Allow multiple attaches and runs when
14566 multiprocess extensions are in effect. Handle "vKill".
14567 (myresume): Adjust to use ptids.
14568 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14569 (handle_status): Adjust to discard_queued_stop_replies interface
14570 change.
14571 (first_thread_of, kill_inferior_callback)
14572 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14573 (main): Call initialize_inferiors. Adjust to use ptids, killing
14574 and detaching from all inferiors. Handle multiprocess packet
14575 variants.
14576 * linux-low.h: Include gdb_proc_service.h.
14577 (struct process_info_private): New.
14578 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14579 <lwpid_of>: Use ptid_get_lwp.
14580 (get_lwp_thread): Adjust.
14581 (struct lwp_info): Add `dead' member.
14582 (find_lwp_pid): Declare.
14583 * linux-low.c (thread_db_active): Delete.
14584 (new_inferior): Adjust comment.
14585 (inferior_pid): Delete.
14586 (linux_add_process): New.
14587 (handle_extended_wait): Adjust.
14588 (add_lwp): Change unsigned long to ptid.
14589 (linux_create_inferior): Add process to processes table. Adjust
14590 to use ptids. Don't set new_inferior here.
14591 (linux_attach_lwp): Rename to ...
14592 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14593 it. Adjust to use ptids.
14594 (linux_attach_lwp): New.
14595 (linux_attach): Add process to processes table. Don't set
14596 new_inferior here.
14597 (struct counter): New.
14598 (second_thread_of_pid_p, last_thread_of_process_p): New.
14599 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14600 multiple processes.
14601 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14602 processes. Remove process from process table.
14603 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14604 to multiple processes.
14605 (any_thread_of): New.
14606 (linux_detach): Add `pid' argument, and handle it. Remove process
14607 from processes table.
14608 (linux_join): Add `pid' argument. Handle it.
14609 (linux_thread_alive): Change unsighed long argument to ptid_t.
14610 Consider dead lwps as not being alive.
14611 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14612 threads we're not interested in.
14613 (same_lwp, find_lwp_pid): New.
14614 (linux_wait_for_lwp): Change `pid' argument's type from int to
14615 ptid_t. Adjust.
14616 (linux_wait_for_event): Rename to ...
14617 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14618 from int to ptid_t. Adjust.
14619 (linux_wait_for_event): New.
14620 (linux_wait_1): Add `ptid' argument. Change return type to
14621 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14622 that exit from the process table.
14623 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14624 Adjust.
14625 (mark_lwp_dead): New.
14626 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14627 stopping all threads, mark its main lwp as dead.
14628 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14629 ptids.
14630 (fetch_register, usr_store_inferior_registers)
14631 (regsets_fetch_inferior_registers)
14632 (regsets_store_inferior_registers, linux_read_memory)
14633 (linux_write_memory): Inline `inferior_pid'.
14634 (linux_look_up_symbols): Adjust to use per-process
14635 `thread_db_active'.
14636 (linux_request_interrupt): Adjust to use ptids.
14637 (linux_read_auxv): Inline `inferior_pid'.
14638 (initialize_low): Don't reference thread_db_active.
14639 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14640 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14641 (ps_getpid): Return the pid of the current inferior.
14642 * thread-db.c (proc_handle, thread_agent): Delete.
14643 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14644 per-process data.
14645 (find_one_thread): Change argument type to ptid_t. Adjust to
14646 per-process data.
14647 (maybe_attach_thread): Adjust to per-process data and ptids.
14648 (thread_db_find_new_threads): Ditto.
14649 (thread_db_init): Ditto.
14650 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14651 processes table. Adjust to use ptids.
14652 (spu_kill, spu_detach): Adjust interface. Remove process from
14653 processes table.
14654 (spu_join, spu_thread_alive): Adjust interface.
14655 (spu_wait): Adjust interface. Remove process from processes
14656 table. Adjust to use ptids.
14657 * win32-low.c (current_inferior_tid): Delete.
14658 (current_inferior_ptid): New.
14659 (debug_event_ptid): New.
14660 (thread_rec): Take a ptid. Adjust.
14661 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14662 (child_delete_thread): Ditto.
14663 (do_initial_child_stuff): Add `attached' argument. Add process to
14664 processes table.
14665 (child_fetch_inferior_registers, child_store_inferior_registers):
14666 Adjust.
14667 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14668 (win32_attach): Pass 1 to do_initial_child_stuff.
14669 (win32_kill): Adjust interface. Remove process from processes
14670 table.
14671 (win32_detach): Ditto.
14672 (win32_join): Adjust interface.
14673 (win32_thread_alive): Take a ptid.
14674 (win32_resume): Adjust to use ptids.
14675 (get_child_debug_event): Ditto.
14676 (win32_wait): Adjust interface. Remove exiting process from
14677 processes table.
14678
bd99dc85
PA
146792009-04-01 Pedro Alves <pedro@codesourcery.com>
14680
14681 Non-stop mode support.
14682
14683 * server.h (non_stop): Declare.
14684 (gdb_client_data, handler_func): Declare.
14685 (delete_file_handler, add_file_handler, start_event_loop):
14686 Declare.
14687 (handle_serial_event, handle_target_event, push_event)
14688 (putpkt_notif): Declare.
14689 * target.h (enum resume_kind): New.
14690 (struct thread_resume): Replace `step' field by `kind' field.
14691 (TARGET_WNOHANG): Define.
14692 (struct target_ops) <wait>: Add `options' argument.
14693 <supports_non_stop, async, start_non_stop>: New fields.
14694 (target_supports_non_stop, target_async): New.
14695 (start_non_stop): Declare.
14696 (mywait): Add `options' argument.
14697 * target.c (mywait): Add `options' argument. Print child exit
14698 notifications here.
14699 (start_non_stop): New.
14700 * server.c (non_stop, own_buf, mem_buf): New globals.
14701 (struct vstop_notif): New.
14702 (notif_queue): New global.
14703 (queue_stop_reply, push_event, discard_queued_stop_replies)
14704 (send_next_stop_reply): New.
14705 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14706 interface changes.
14707 (attach_inferior): In non-stop mode, don't wait for the target
14708 here.
14709 (handle_general_set): Handle QNonStop.
14710 (handle_query): When handling qC, return the current general
14711 thread, instead of the first thread of the list.
14712 (handle_query): If the backend supports non-stop mode, include
14713 QNonStop+ in the qSupported query response.
14714 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14715 and non-stop mode.
14716 (handle_v_attach, handle_v_run): Handle non-stop mode.
14717 (handle_v_stopped): New.
14718 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14719 (myresume): Adjust to use resume_kind. Handle non-stop.
14720 (queue_stop_reply_callback): New.
14721 (handle_status): Handle non-stop mode.
14722 (main): Clear non_stop flag on reconnection. Use the event-loop.
14723 Refactor serial protocol handling from here ...
14724 (process_serial_event): ... to this new function. When GDB
14725 selects any thread, select one here. In non-stop mode, wait until
14726 GDB acks all pending events before exiting.
14727 (handle_serial_event, handle_target_event): New.
14728 * remote-utils.c (remote_open): Install remote_desc in the event
14729 loop.
14730 (remote_close): Remove remote_desc from the event loop.
14731 (putpkt_binary): Rename to...
14732 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14733 (putpkt_binary): New as wrapper around putpkt_binary_1.
14734 (putpkt_notif): New.
14735 (prepare_resume_reply): In non-stop mode, don't change the
14736 general_thread.
14737 * event-loop.c: New.
14738 * Makefile.in (OBJ): Add event-loop.o.
14739 (event-loop.o): New rule.
14740
14741 * linux-low.h (pid_of): Moved here.
14742 (lwpid_of): New.
14743 (get_lwp_thread): Use lwpid_of.
14744 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14745 * linux-low.c (pid_of): Delete.
14746 (inferior_pid): Use lwpid_of.
14747 (linux_event_pipe): New.
14748 (target_is_async_p): New.
14749 (delete_lwp): New.
14750 (handle_extended_wait): Use lwpid_of.
14751 (add_lwp): Don't set lwpid field.
14752 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14753 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14754 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14755 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14756 first. Adjust to linux_wait_for_event interface changes. Use
14757 lwpid_of.
14758 (linux_detach): Don't delete the main lwp here.
14759 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14760 (status_pending_p): Don't consider explicitly suspended lwps.
14761 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14762 pointer. Add OPTIONS argument. Change return type to int. Use
14763 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14764 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14765 pointer. Add status pointer argument. Return a pid instead of a
14766 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14767 changes. In non-stop mode, don't switch to a random thread.
14768 (linux_wait): Rename to...
14769 (linux_wait_1): ... this. Add target_options argument, and handle
14770 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14771 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14772 clean exit and signal exit code. Don't stop all threads in
14773 non-stop mode. In all-stop mode, only stop all threads when
14774 reporting a stop to GDB. Handle explicit thread stop requests.
14775 (async_file_flush, async_file_mark): New.
14776 (linux_wait): New.
14777 (send_sigstop): Use lwpid_of.
14778 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14779 interface changes. In non-stop mode, don't switch to a random
14780 thread.
14781 (linux_resume_one_lwp): Use lwpid_of.
14782 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14783 (linux_resume_one_thread): ... this. Handle resume_stop. In
14784 non-stop mode, don't look for pending flag in all threads.
14785 (resume_status_pending_p): Don't consider explicitly suspended
14786 threads.
14787 (my_waitpid): Reimplement. Emulate __WALL.
14788 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14789 Use lwpid_of.
14790 (sigchld_handler, linux_supports_non_stop, linux_async)
14791 (linux_start_non_stop): New.
14792 (linux_target_ops): Register linux_supports_non_stop, linux_async
14793 and linux_start_non_stop.
14794 (initialize_low): Install SIGCHLD handler.
14795 * thread-db.c (thread_db_create_event, find_one_thread)
14796 (thread_db_get_tls_address): Use lwpid_of.
14797 * win32-low.c (win32_detach): Adjust to use resume_kind.
14798 (win32_wait): Add `options' argument.
14799 * spu-low.c (spu_resume): Adjust to use resume_kind.
14800 (spu_wait): Add `options' argument.
14801
5b1c542e
PA
148022009-04-01 Pedro Alves <pedro@codesourcery.com>
14803
14804 Decouple target code from remote protocol.
14805
14806 * target.h (enum target_waitkind): New.
14807 (struct target_waitstatus): New.
14808 (struct target_ops) <wait>: Return an unsigned long. Take a
14809 target_waitstatus pointer instead of a char pointer.
14810 (mywait): Likewise.
14811 * target.c (mywait): Change prototype to return an unsigned long.
14812 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14813 * server.h (thread_from_wait, old_thread_from_wait): Delete
14814 declarations.
14815 (prepare_resume_reply): Change prototype to take a
14816 target_waitstatus.
14817 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14818 (last_status, last_ptid): New.
14819 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14820 pid instead of a signal.
14821 (attach_inferior): Remove "status" and "signal" parameters.
14822 Adjust.
14823 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14824 not as an address.
14825 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14826 (handle_v_requests, myresume): Remove "status" and "signal"
14827 parameters. Adjust.
14828 (handle_status): New.
14829 (main): Delete local `status'. Adjust.
14830 * remote-utils.c: Include target.h.
14831 (prepare_resume_reply): Change prototype to take a
14832 target_waitstatus. Adjust.
14833
14834 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14835 interface.
14836 * spu-low.c (spu_wait): Adjust.
14837 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14838 Delete.
14839 (win32_wait): Adjust.
14840
2bd7c093
PA
148412009-04-01 Pedro Alves <pedro@codesourcery.com>
14842
14843 * target.h (struct thread_resume): Delete leave_stopped member.
14844 (struct target_ops): Add a `n' argument to the `resume' callback.
14845 * server.c (start_inferior): Adjust.
14846 (handle_v_cont, myresume): Adjust.
14847 * linux-low.c (check_removed_breakpoint): Adjust to resume
14848 interface change, and to removed leave_stopped field.
14849 (resume_ptr): Delete.
14850 (struct thread_resume_array): New.
14851 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14852 resume interface change.
14853 (linux_continue_one_thread, linux_queue_one_thread)
14854 (resume_status_pending_p): Check if the resume field is NULL
14855 instead of checking the leave_stopped member.
14856 (linux_resume): Adjust to the target resume interface change.
14857 * spu-low.c (spu_resume): Adjust to the target resume interface
14858 change.
14859 * win32-low.c (win32_detach, win32_resume): Ditto.
14860
c35fafde
PA
148612009-04-01 Pedro Alves <pedro@codesourcery.com>
14862
14863 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14864 flag.
14865 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14866 pending.
14867 (linux_continue_one_thread): Only preserve the stepping flag if
14868 there's a pending breakpoint.
14869
0a59d50b
PA
148702009-03-31 Pedro Alves <pedro@codesourcery.com>
14871
14872 * server.c (main): After the inferior having exited, call
14873 remote_close before exiting gdbserver.
14874
f04c6d38
TJB
148752009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14876
14877 Fix size of FPSCR in Power 7 processors.
14878 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14879 (PPC_FEATURE_HAS_DFP): New #define.
14880 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14881 size of the FPSCR.
14882
78e5cee6
PA
148832009-03-23 Pedro Alves <pedro@codesourcery.com>
14884
14885 * server.c (handle_query) Whitespace and formatting.
14886
1b3f6016
PA
148872009-03-22 Pedro Alves <pedro@codesourcery.com>
14888
14889 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14890 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14891 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14892 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14893 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14894 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14895 Makefile.in, configure.ac: Fix whitespace throughout.
14896 * configure: Regenerate.
14897
a07b2135
PA
148982009-03-22 Pedro Alves <pedro@codesourcery.com>
14899
14900 * inferiors.c (find_inferior): Make it safe for the callback
14901 function to delete the currently iterated inferior.
14902
67cc2626
PA
149032009-03-22 Pedro Alves <pedro@codesourcery.com>
14904
14905 * Makefile.in (linuw_low_h): Move higher.
14906 (thread-db.o): Depend on $(linux_low_h).
14907
54a0b537
PA
149082009-03-17 Pedro Alves <pedro@codesourcery.com>
14909
14910 Rename "process" to "lwp" throughout.
14911
14912 * linux-low.c (all_processes): Rename to...
14913 (all_lwps): ... this.
14914 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14915 (add_process): Rename to ...
14916 (add_lwp): ... this. Adjust.
14917 (linux_create_inferior): Adjust.
14918 (linux_attach_lwp): Adjust.
14919 (linux_attach): Adjust.
14920 (linux_kill_one_process): Rename to ...
14921 (linux_kill_one_lwp): ... this. Adjust.
14922 (linux_kill): Adjust.
14923 (linux_detach_one_process): Rename to ...
14924 (linux_detach_one_lwp): ... this. Adjust.
14925 (linux_detach): Adjust.
14926 (check_removed_breakpoint): Adjust.
14927 (status_pending_p): Adjust.
14928 (linux_wait_for_process): Rename to ...
14929 (linux_wait_for_lwp): ... this. Adjust.
14930 (linux_wait_for_event): Adjust.
14931 (send_sigstop): Adjust.
14932 (wait_for_sigstop): Adjust.
14933 (stop_all_processes): Rename to ...
14934 (stop_all_lwps): ... this.
14935 (linux_resume_one_process): Rename to ...
14936 (linux_resume_one_lwp): ... this. Adjust.
14937 (linux_set_resume_request, linux_continue_one_thread)
14938 (linux_queue_one_thread, resume_status_pending_p)
14939 (usr_store_inferior_registers, regsets_store_inferior_registers)
14940 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14941 Adjust.
14942 * linux-low.h (get_process): Rename to ...
14943 (get_lwp): ... this. Adjust.
14944 (get_thread_process): Rename to ...
14945 (get_thread_lwp): ... this. Adjust.
14946 (get_process_thread): Rename to ...
14947 (get_lwp_thread): ... this. Adjust.
14948 (struct process_info): Rename to ...
14949 (struct lwp_info): ... this.
14950 (all_processes): Rename to ...
14951 (all_lwps): ... this.
14952 * proc-service.c (ps_lgetregs): Adjust.
14953 * thread-db.c (thread_db_create_event, find_one_thread)
14954 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14955
0b16c5cf
PA
149562009-03-14 Pedro Alves <pedro@codesourcery.com>
14957
14958 * server.c (handle_query): Handle "qAttached".
14959
32de4b9d
NS
149602009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14961
14962 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14963 GPLv3, update license URL.
14964
2aecd87f
DE
149652009-03-01 Doug Evans <dje@google.com>
14966
93efd302 14967 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14968 (server_h): Add gdb_signals.h.
14969 (signals.o): Update.
14970 * server.h (target_signal_from_host,target_signal_to_host_p)
14971 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14972
86b1f9c5
PM
149732009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14974
14975 * remote-utils.c (getpkt): Also generate remote-debug
14976 information if noack_mode is set.
14977
4aa995e1
PA
149782009-02-06 Pedro Alves <pedro@codesourcery.com>
14979
14980 * server.c (handle_query): Report qXfer:siginfo:read and
14981 qXfer:siginfo:write as supported and handle them.
14982 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14983 * linux-low.c (linux_xfer_siginfo): New.
14984 (linux_target_ops): Set it.
14985
62709adf
PA
149862009-01-26 Pedro Alves <pedro@codesourcery.com>
14987
14988 * server.c (gdbserver_usage): Mention --remote-debug.
14989 (main): Accept '--remote-debug' switch.
14990
aef93bd7
DE
149912009-01-18 Doug Evans <dje@google.com>
14992
14993 * regcache.c (new_register_cache): No need to check result of xcalloc.
14994 * server.c (handle_search_memory): Back out calls to xmalloc,
14995 result is checked and error is returned to user upon failure.
14996 (handle_query): Ditto. Add more checks for result of malloc.
14997 (handle_v_cont): Check result of malloc, report error back to
14998 user upon failure.
14999 (handle_v_run): Ditto. Call freeargv.
15000 * server.h (freeargv): Declare.
15001 * utils.c (freeargv): New fn.
15002
54363045
DE
150032009-01-15 Doug Evans <dje@google.com>
15004
f626972c
DE
15005 * gdbreplay.c (perror_with_name): Make arg const char *.
15006 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15007 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15008 * utils.c (perror_with_name): Make arg const char *.
54363045 15009
18aae699
PA
150102009-01-14 Pedro Alves <pedro@codesourcery.com>
15011
15012 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15013 when handling a EXIT_PROCESS_DEBUG_EVENT.
15014
ff703abe
JB
150152009-01-06 Joel Brobecker <brobecker@adacore.com>
15016
15017 * gdbreplay.c (gdbreplay_version): Update copyright year.
15018 * server.c (gdbserver_version): Likewise.
15019
f21cc1a2 150202009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15021
15022 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15023 (handle_extended_wait): Improve comment.
0e21c1ec 15024
bca929d3
DE
150252008-12-13 Doug Evans <dje@google.com>
15026
15027 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15028 * server.h (ATTR_MALLOC): New macro.
15029 (xmalloc,xcalloc,xstrdup): Declare.
15030 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15031 * inferiors.c: Ditto.
15032 * linux-low.c: Ditto.
15033 * mem-break.c: Ditto.
15034 * regcache.c: Ditto.
15035 * remote-utils.c: Ditto.
15036 * server.c: Ditto.
15037 * target.c: Ditto.
15038 * win32-low.c: Ditto.
15039
97438e3f
DE
150402008-12-12 Doug Evans <dje@google.com>
15041
896c7fbb
DE
15042 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15043 in debugging printf.
15044
97438e3f
DE
15045 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15046
e3b886f8
DE
150472008-12-09 Doug Evans <dje@google.com>
15048
15049 * linux-low.h (struct process_info): Delete member tid, unused.
15050 * thread-db.c (find_one_thread): Update.
15051 (maybe_attach_thread): Update.
15052
07e059b5
VP
150532008-12-02 Pedro Alves <pedro@codesourcery.com>
15054
889bf7c5
PA
15055 * target.h (struct target_ops): Add qxfer_osdata member.
15056 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15057 and dirent.h.
15058 (linux_qxfer_osdata): New functions.
15059 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15060 callback.
15061 * server.c (handle_query): Handle "qXfer:osdata:read:".
15062 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15063 (buffer_xml_printf): New functions.
15064 * server.h (struct buffer): New.
15065 (buffer_grow_str, buffer_grow_str0): New macros.
15066 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15067 (buffer_xml_printf): Declare.
07e059b5 15068
4cab47ab
DE
150692008-11-24 Doug Evans <dje@google.com>
15070
15071 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15072
f142445f
DJ
150732008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15074
15075 * server.c (handle_v_run): Always use the supplied argument list.
15076
d0107bb6 150772008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15078
d0107bb6
BW
15079 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15080 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15081
2c4ad781
TJB
150822008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15083
15084 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15085 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15086 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15087 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15088 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15089 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15090 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15091 XML target descriptions.
15092 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15093 when inferior is running on an ISA 2.05 or later processor. Add
15094 special case to return offset for full 64-bit slot of FPSCR when
15095 in 32-bits.
15096
dfb64f85
DJ
150972008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15098
15099 * Makefile.in (SFILES, clean): Added sparc64 files.
15100 (reg-sparc64.o, reg-sparc64.c): New.
15101 * configure.srv (sparc*-*-linux*): New configuration.
15102 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15103 syscall arguments for SPARC.
15104 (regsets_store_inferior_registers): Likewise.
15105 * linux-sparc-low.c: New file.
15106
66b6e1dd
DE
151072008-10-21 Doug Evans <dje@google.com>
15108
15109 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15110 (READLINE_DIR,READLINE_DEP): Delete.
15111 (INTERNAL_CFLAGS): Update.
15112 (LINTFLAGS): Update.
15113
9b710a42
PA
151142008-10-10 Pedro Alves <pedro@codesourcery.com>
15115
15116 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15117 whole argv from the last run, not just argv[0].
15118
5822d809
PA
151192008-09-08 Pedro Alves <pedro@codesourcery.com>
15120
15121 * regcache.c (new_register_cache): Return NULL if the register
15122 cache size isn't known yet.
15123 (free_register_cache): Avoid dereferencing a NULL regcache.
15124
74aac56f
DJ
151252008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15126
15127 * configure.srv: Merge MIPS and MIPS64.
15128
400b20f5
MR
151292008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15130
15131 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15132
677c5bb1
LM
151332008-08-18 Luis Machado <luisgpm@br.ibm.com>
15134
15135 * Makefile.in: Add required vsx dependencies.
15136
15137 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15138 Declare init_registers_powerpc_vsx32l.
15139 Declare init_registers_powerpc_vsx64l.
15140 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15141 (ppc_arch_setup): Check for VSX in hwcap.
15142 (ppc_fill_vsxregset): New function.
15143 (ppc_store_vsxregset): New function.
15144 Add new VSX entry in regset_info target_regsets.
15145
15146 * configure.srv: Add new VSX dependencies.
15147
a6f3e723
SL
151482008-08-12 Pedro Alves <pedro@codesourcery.com>
15149
15150 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15151 (remote_open): Set or clear transport_is_reliable.
15152 (putpkt_binary): Don't expect acks in noack mode.
15153 (getpkt): Don't send ack/nac in noack mode.
15154 * server.c (handle_general_set): Handle QStartNoAckMode.
15155 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15156 qSupported.
15157 (main): Reset noack_mode on every connection.
15158 * server.h (noack_mode): Declare.
15159
a417dc56
RW
151602008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15161
15162 * Makefile.in (GDBREPLAY_OBS): New variable.
15163 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15164
3221518c
UW
151652008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15166 Daniel Jacobowitz <dan@codesourcery.com>
15167
15168 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15169 (usr_store_inferior_registers): Likewise.
15170 (regsets_store_inferior_registers): Likewise.
15171
ec56be1b
PA
151722008-07-31 Rolf Jansen <rj@surtec.com>
15173 Pedro Alves <pedro@codesourcery.com>
15174
15175 * configure.ac: Check for memmem declaration.
15176 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15177 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15178 (disable_packet_qfThreadInfo): Unconditionally compile.
15179 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15180 * configure, config.in: Regenerate.
15181
2fe5e3ff
DE
151822008-07-28 Doug Kwan <dougkwan@google.com>
15183
15184 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15185 (linux_write_memory): Remove declaration of errno.
15186
836acd6d
UW
151872008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15188
15189 * linux-low.c (handle_extended_wait): Do not use "status"
15190 variable uninitialized.
15191
aeba519e
PA
151922008-07-07 Pedro Alves <pedro@codesourcery.com>
15193
15194 * server.c (handle_v_attach): Inhibit reporting dll changes.
15195
db42f210
PA
151962008-06-27 Pedro Alves <pedro@codesourcery.com>
15197
15198 * remote-utils.c (prepare_resume_reply): If requested, don't
15199 output "thread:TID" in the T stop reply.
15200
15201 * server.c (disable_packet_vCont, disable_packet_Tthread)
15202 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15203 (handle_query): If requested, disable support for qC, qfThreadInfo
15204 and qsThreadInfo.
15205 (handle_v_requests): If requested, disable support for vCont.
15206 (gdbserver_show_disableable): New.
15207 (main): Handle --disable-packet and --disable-packet=LIST.
15208
15209 * server.h (disable_packet_vCont, disable_packet_Tthread)
15210 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15211
8e4c5421
CD
152122008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15213
15214 * server.c (gdbserver_usage): Mention --version.
15215
6e23a804
DJ
152162008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15217
15218 * Makefile.in (gdbreplay.o): New rule.
15219
90aa6a40
JM
152202008-06-06 Joseph Myers <joseph@codesourcery.com>
15221
15222 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15223 message, not gdbserver.
15224
c16158bc 152252008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15226 Nathan Sidwell <nathan@codesourcery.com>
15227 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15228
15229 * acinclude.m4: Include ../../config/acx.m4.
15230 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15231 * configure, config.in: Regenerate.
15232 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15233 * server.c (gdbserver_version): Print PKGVERSION.
15234 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15235 (main): Adjust gdbserver_usage calls.
15236 * gdbreplay.c (version, host_name): Add declarations.
15237 (gdbreplay_version, gdbreplay_usage): New.
15238 (main): Accept --version and --help options.
15239
aeb75bf5
DJ
152402008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15241
15242 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15243 (arm_breakpoint_at): Handle Thumb.
15244 (the_low_target): Add comment.
15245
76b233dd
UW
152462008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15247
15248 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15249
08388c79
DE
152502008-05-09 Doug Evans <dje@google.com>
15251
a3c83fae
DE
15252 * server.h (decode_search_memory_packet): Declare.
15253 * remote-utils.c (decode_search_memory_packet): New fn.
15254 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15255 (handle_search_memory): New fn.
15256 (handle_query): Process qSearch:memory packets.
15257
bb9c3d36
UW
152582008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15259
15260 * regcache.c (registers_length): Remove.
15261 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15262 full register packet.
15263 * regcache.h (registers_length): Remove prototype.
15264 * server.h (PBUFSIZ): Define to 16384.
15265
7284e1be
UW
152662008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15267
15268 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15269 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15270 powerpc-64l.o, and powerpc-altivec64l.o.
15271 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15272 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15273 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15274 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15275 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15276 to srv_xmlfiles.
15277
15278 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15279 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15280 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15281 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15282 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15283 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15284 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15285 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15286 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15287 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15288 (clean): Update.
15289
15290 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15291 (init_registers_powerpc_32l): ... this new prototype.
15292 (init_registers_powerpc_32): Remove, replace by ...
15293 (init_registers_powerpc_altivec32l): ... this new prototype.
15294 (init_registers_powerpc_e500): Remove, replace by ...
15295 (init_registers_powerpc_e500l): ... this new prototype.
15296 (init_registers_ppc64): Remove, replace by ...
15297 (init_registers_powerpc_64l): ... this new prototype.
15298 (init_registers_powerpc_64): Remove, replace by ...
15299 (init_registers_powerpc_altivec64l): ... this new prototype.
15300 (ppc_num_regs): Set to 73.
15301 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15302 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15303 (ppc_cannot_store_register): Handle orig_r3 and trap.
15304 (ppc_arch_setup): Update init_registers_... calls.
15305 (ppc_fill_gregset): Handle orig_r3 and trap.
15306
15307 * inferiors.c (clear_inferiors): Reset current_inferior.
15308
fdc59709
PB
153092008-04-23 Paolo Bonzini <bonzini@gnu.org>
15310
889bf7c5
PA
15311 * acinclude.m4: Add override.m4.
15312 * configure: Regenerate.
fdc59709 15313
c9b2f845
UW
153142008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15315
15316 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15317 initial call to init_register_ppc64.
15318
550512b8
UW
153192008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15320
43aaf8b6
PA
15321 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15322 single powerpc*-*-linux* case.
550512b8
UW
15323 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15324
b6430ec3
UW
153252008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15326
15327 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15328 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15329 from reg_xmlfiles.
15330 * linux-ppc-low.c: Include <elf.h>.
15331 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15332 (ppc_hwcap): New global variable.
15333 (ppc_regmap): Remove __SPE__ #ifdef sections.
15334 (ppc_regmap_e500): New global variable.
15335 (ppc_cannot_store_register): Update __SPE__ special case.
15336 (ppc_get_hwcap): New function.
15337 (ppc_arch_setup): Use it to determine whether inferior supports
15338 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15339 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15340 Do not access registers if target does not support AltiVec.
15341 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15342 Do not access registers if target does not support SPE.
15343 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15344
52fa2412
UW
153452008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15346
15347 * linux-low.c (disabled_regsets, num_regsets): New.
15348 (use_regsets_p): Delete.
15349 (linux_wait_for_process): Clear disabled_regsets.
15350 (regsets_fetch_inferior_registers): Check and set it.
15351 (regsets_store_inferior_registers): Likewise.
15352 (linux_fetch_registers, linux_store_registers): Do not use
15353 use_regsets_p.
15354 (initialize_low): Allocate disabled_regsets.
15355
e28b3332
DJ
153562008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15357
15358 * Makefile.in (LIBOBJS): New.
15359 (OBS): Use LIBOBJS.
15360 (memmem.o): New rule.
15361 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15362 * configure: Regenerated.
15363
4536995d
UW
153642008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15365
15366 * server.c (handle_query): Never return "unsupported" for
15367 qXfer:features:read queries.
15368
221c031f
UW
153692008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15370
15371 * server.c (get_features_xml): Fix inverted condition.
15372 (handle_query): Always support qXfer:feature:read.
15373
ccd213ac
DJ
153742008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15375
15376 * server.c (wrapper_argv): New.
15377 (start_inferior): Handle wrapper_argv. If set, expect an extra
15378 trap.
15379 (gdbserver_usage): Document --wrapper.
15380 (main): Parse --wrapper.
15381
6fe305f7
UW
153822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15383
15384 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15385 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15386 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15387 (ppc_set_pc): Likewise.
15388 (ppc_arch_setup): New function.
15389 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15390 of collect_register.
889bf7c5 15391 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15392
5b0a002e
UW
153932008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15394
15395 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15396 instead of linux-ppc64-low.o.
15397 * linux-ppc64-low.c: Remove file.
15398 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15399 (linux-ppc64-low.o): Remove rule.
15400
15401 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15402 (init_registers_powerpc_64): Likewise.
15403 (ppc_regmap): Conditionally define depending on __powerpc64__.
15404 (ppc_cannot_store_register): Do not special-case "fpscr" when
15405 compiled on __powerpc64__.
15406 (ppc_collect_ptrace_register): New function.
15407 (ppc_supply_ptrace_register): New function.
15408 (ppc_breakpoint): Change type to "unsigned int".
15409 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15410 (the_low_target): Conditionally provide initializers for the
889bf7c5 15411 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15412 collect_ptrace_register and supply_ptrace_register members.
15413
9b4b61c8
UW
154142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15415
15416 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15417 * server.c (gdbserver_xmltarget): Define.
15418 (get_features_xml): Use it to replace "target.xml" and arch_string.
15419
15420 * configure.srv: Remove srv_xmltarget. Add XML files that were
15421 mentioned there to srv_xmlfiles instead. Remove conditional tests
15422 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15423 srv_xmlfiles and srv_regobj to include all possible choices.
15424 * configure.ac (srv_xmltarget): Remove.
15425 (srv_xmlfiles): Do not add "target.xml".
15426 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15427 checks for supplementary target information.
15428 * configure: Regenerate.
15429 * Makefile.in (XML_TARGET): Remove.
15430 (target.xml): Remove rule.
15431 (clean): Do not clean up target.xml.
15432 (.PRECIOUS): Do not mention target.xml.
15433
15434 * target.h (struct target_ops): Remove arch_string member.
15435 * linux-low.c (linux_arch_string): Remove.
15436 (linux_target_ops): Remove arch_string initializer.
15437 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15438 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15439 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15440 * spu-low.c (spu_arch_string): Remove.
15441 (spu_target_ops): Remove arch_string initializer.
15442 * win32-low.c (win32_arch_string): Remove.
15443 (win32_target_ops): Remove arch_string initializer.
15444 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15445 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15446 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15447
ee1a7ae4
UW
154482008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15449
15450 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15451 by collect_ptrace_register and supply_ptrace_register hooks.
15452 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15453 instead of checking for the_low_target.left_pad_xfer.
15454 (usr_store_inferior_registers): Use collect_ptrace_register callback
15455 instead of checking for the_low_target.left_pad_xfer.
15456
15457 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15458 (s390_supply_ptrace_register): Likewise.
15459 (s390_fill_gregset): Call s390_collect_ptrace_register.
15460 (the_low_target): Update.
15461
15462 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15463 (ppc_supply_ptrace_register): Likewise.
15464 (the_low_target): Update.
15465
15466 * linux-i386-low.c (the_low_target): Update.
15467 * linux-x86-64-low.c (the_low_target): Update.
15468
d61ddec4
UW
154692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15470
15471 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15472 reg-s390.o and reg-s390x.o.
15473
15474 * linux-low.c (new_inferior): New global variable.
15475 (linux_create_inferior, linux_attach): Set it.
15476 (linux_wait_for_process): Call the_low_target.arch_setup after the
15477 target has stopped for the first time.
15478 (initialize_low): Do not call the_low_target.arch_setup.
15479
15480 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15481 (s390_set_pc): Likewise.
15482 (s390_arch_setup): New function.
15483 (the_low_target): Use s390_arch_setup as arch_setup routine.
15484
15485 * regcache.c (realloc_register_cache): New function.
15486 (set_register_cache): Call it for each existing regcache.
15487
d05b4ac3
UW
154882008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15489
15490 * server.h (init_registers): Remove prototype.
15491
15492 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15493 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15494 instead of init_registers ().
15495 * linux-arm-low.c (init_registers_arm): Add prototype.
15496 (init_registers_arm_with_iwmmxt): Likewise.
15497 (the_low_target): Add initializer for arch_setup field.
15498 * linux-cris-low.c (init_registers_cris): Add prototype.
15499 (the_low_target): Add initializer for arch_setup field.
15500 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15501 (the_low_target): Add initializer for arch_setup field.
15502 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15503 (the_low_target): Add initializer for arch_setup field.
15504 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15505 (the_low_target): Add initializer for arch_setup field.
15506 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15507 (the_low_target): Add initializer for arch_setup field.
15508 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15509 (the_low_target): Add initializer for arch_setup field.
15510 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15511 (init_registers_mips64_linux): Likewise.
15512 (the_low_target): Add initializer for arch_setup field.
15513 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15514 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15515 (the_low_target): Add initializer for arch_setup field.
15516 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15517 (init_registers_powerpc_64): Likewise.
15518 (the_low_target): Add initializer for arch_setup field.
15519 * linux-s390-low.c (init_registers_s390): Add prototype.
15520 (init_registers_s390x): Likewise.
15521 (the_low_target): Add initializer for arch_setup field.
15522 * linux-sh-low.c (init_registers_sh): Add prototype.
15523 (the_low_target): Add initializer for arch_setup field.
15524 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15525 (the_low_target): Add initializer for arch_setup field.
15526 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15527 (the_low_target): Add initializer for arch_setup field.
15528
15529 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15530 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15531 instead of init_registers ().
15532 * win32-arm-low.c (init_registers_arm): Add prototype.
15533 (the_low_target): Add initializer for arch_setup field.
15534 * win32-i386-low.c (init_registers_i386): Add prototype.
15535 (the_low_target): Add initializer for arch_setup field.
15536
15537 * spu-low.c (init_registers_spu): Add prototype.
15538 (initialize_low): Call initialie_registers_spu () instead of
15539 initialize_registers ().
15540
fd96d250
PA
155412008-02-19 Pedro Alves <pedro@codesourcery.com>
15542
15543 * server.c (handle_v_requests): When handling the vRun and vAttach
15544 packets, if already debugging a process, don't kill it. Return an
15545 error instead.
15546
d41b6bb4
DJ
155472008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15548
15549 * server.c (handle_query): Correct length check.
15550
5ac588cf
PA
155512008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15552
15553 * win32-low.c (do_initial_child_stuff): Add process handle
15554 parameter. Set current_process_handle and current_process_id from the
15555 parameters. Clear globals.
15556 (win32_create_inferior): Don't set current_process_handle and
15557 current_process_id here. Instead pass them on the call to
15558 do_initial_child_stuff.
15559 (win32_attach): Likewise.
15560 (win32_clear_inferiors): New.
15561 (win32_kill): Don't close the current process handle or the
15562 current thread handle here. Instead call win32_clear_inferiors.
15563 (win32_detach): Don't open a new handle to the process. Call
15564 win32_clear_inferiors.
15565 (win32_join): Don't rely on current_process_handle; open a new
15566 handle using the process id.
15567 (win32_wait): Call win32_clear_inferiors when the inferior process
15568 has exited.
15569
ecd7ecbc
DJ
155702008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15571
15572 * server.c (monitor_show_help): Add "exit".
15573
1525d545
MG
155742008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15575
ecd7ecbc 15576 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15577 (clean): Add reg-xtensa.c.
15578 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15579 * configure.srv (xtensa*-*-linux*) New target.
15580 * linux-xtensa-low.c: New.
15581 * xtensa-xtregs.c: New.
1525d545 15582
59a016f0
PA
155832008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15584
15585 * hostio.c: Don't include errno.h.
15586 (errno_to_fileio_errno): Move to hostio-errno.
15587 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15588 error number outputting to the target->hostio_last_error callback.
15589 (hostio_packet_error): Use FILEIO_EINVAL directly.
15590 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15591 calls to hostio_error.
15592 * hostio-errno.c: New.
15593 * server.h (hostio_last_error_from_errno): Declare.
15594 * target.h (target_ops): Add hostio_last_error member.
15595 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15596 as hostio_last_error handler.
889bf7c5 15597 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15598 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15599 (wince_hostio_last_error): New functions.
15600 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15601 as hostio_last_error handler.
15602 (win32_target_ops) [!_WIN32_WCE]: Register
15603 hostio_last_error_from_errno as hostio_last_error handler.
15604 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15605 (hostio-errno.o): New rule.
15606 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15607 * configure.srv (srv_hostio_err_objs): New variable. Default to
15608 hostio-errno.o.
15609 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15610 * configure: Regenerate.
15611
2d717e4f
DJ
156122008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15613
15614 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15615 (linux_kill, linux_detach): Clean up the process list.
15616 * remote-utils.c (remote_open): Improve port number parsing.
15617 (putpkt_binary, input_interrupt): Only send interrupts if the target
15618 is running.
15619 * server.c (extended_protocol): Make static.
15620 (attached): Define earlier.
15621 (exit_requested, response_needed, program_argv): New variables.
15622 (target_running): New.
15623 (start_inferior): Clear attached here.
15624 (attach_inferior): Set attached here.
15625 (require_running): Define.
15626 (handle_query): Use require_running and target_running. Implement
15627 "monitor exit".
15628 (handle_v_attach, handle_v_run): New.
15629 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15630 (gdbserver_usage): Update.
15631 (main): Redo argument parsing. Handle --debug and --multi. Handle
15632 --attach along with other options or after the port. Save
15633 program_argv. Support no initial program. Resynchronize
15634 communication with GDB after an error. Handle "monitor exit".
15635 Use require_running and target_running. Always allow the extended
15636 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15637 restart in extended mode.
15638 * README: Refer to the GDB manual. Update --attach usage.
15639
7407e2de
AS
156402007-12-20 Andreas Schwab <schwab@suse.de>
15641
15642 * linux-low.c (STACK_SIZE): Define.
15643 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15644 (linux_test_for_tracefork): Likewise.
15645
b65d95c5
DJ
156462007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15647
15648 * linux-low.c (linux_wait_for_event): Update messages. Do not
15649 reinsert auto-delete breakpoints.
15650 * mem-break.c (struct breakpoint): Change return type of handler to
15651 int.
15652 (set_breakpoint_at): Update handler type.
15653 (reinsert_breakpoint_handler): Return 1 instead of calling
15654 delete_breakpoint.
15655 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15656 setting a new one.
15657 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15658 * mem-break.h (set_breakpoint_at): Update handler type.
15659 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15660 * win32-low.c (auto_delete_breakpoint): New.
15661 (get_child_debug_event): Use it.
15662
4e799345
DJ
156632007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15664
15665 * configure.ac: Check for pread and pwrite.
15666 * hostio.c (handle_pread): Fall back to lseek and read.
15667 (handle_pwrite): Fall back to lseek and write.
15668 * config.in, configure: Regenerated.
15669
27524b67
DJ
156702007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15671
15672 * server.c (myresume): Add own_buf argument.
15673 (main): Update calls.
15674
a20d5e98
DJ
156752007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15676
15677 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15678 * remote-utils.c (remote_open): Do not call disable_async_io.
15679 (block_async_io): Delete.
15680 (unblock_async_io): Make static.
15681 (initialize_async_io): New.
15682 * server.c (handle_v_cont): Handle async I/O here.
15683 (myresume): Likewise. Move other common resume tasks here...
15684 (main): ... from here. Call initialize_async_io. Disable async
15685 I/O before the main loop.
15686 * server.h (initialize_async_io): Declare.
15687 (block_async_io, unblock_async_io): Delete prototypes.
15688 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15689
b79d787e
DJ
156902007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15691
15692 * remote-utils.c (readchar): Allow binary data in received messages.
15693
d97903b2
PA
156942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15695
15696 * win32-low.c (attaching): New global.
15697 (win32_create_inferior): Clear the `attaching' global.
15698 (win32_attach): Set the `attaching' global.
15699 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15700 attaching. Only set a breakpoint at the entry point if not
15701 attaching.
15702
311de423
PA
157032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15704
15705 * server.c (main): Don't report dll events on the initial
15706 connection on attaches.
15707
6c2d16d2
PA
157082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15709
15710 * server.c (main): Relax numerical bases supported for the pid of
15711 the --attach command line argument.
15712
5ca906e6
PA
157132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15714
15715 * win32-low.c (win32_attach): Call OpenProcess before
15716 DebugActiveProcess, not after. Add last error output to error
15717 call.
15718
9c6c8194
PA
157192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15720
15721 * win32-low.c (win32_get_thread_context)
15722 (win32_set_thread_context): New functions.
15723 (thread_rec): Use win32_get_thread_context.
15724 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15725 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15726 field.
15727
4d5d1aaa
PA
157282007-12-03 Leo Zayas
15729 Pedro Alves <pedro_alves@portugalmail.pt>
15730
15731 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15732 global variables.
15733 (child_add_thread): Minor cleanup.
15734 (child_continue): Resume artificially suspended threads before
15735 calling ContinueDebugEvent.
15736 (suspend_one_thread): New.
15737 (fake_breakpoint_event): New.
15738 (get_child_debug_event): Change return type to int. Check here if
15739 gdb sent an interrupt request. If a soft interrupt was requested,
15740 fake a breakpoint event. Return 0 if there is no event to handle,
15741 and 1 otherwise.
15742 (win32_wait): Don't check here if gdb sent an interrupt request.
15743 Ensure there is a valid event to handle.
15744 (win32_request_interrupt): Add soft interruption method as last
15745 resort.
15746
c436e841
PA
157472007-12-03 Leo Zayas
15748 Pedro Alves <pedro_alves@portugalmail.pt>
15749
15750 * win32-low.h (win32_thread_info): Add descriptions to the
15751 structure members. Replace `suspend_count' counter by a
15752 `suspended' flag.
15753 * win32-low.c (thread_rec): Update condition of when to get the
15754 context from the inferior. Rely on ContextFlags being set if it
15755 has already been retrieved. Only suspend the inferior thread if
15756 we haven't already. Warn if that fails.
15757 (continue_one_thread): s/suspend_count/suspended/. Only call
15758 ResumeThread once. Warn if that fails.
15759
e7b5fa67
PA
157602007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15761
15762 * win32-low.c (win32_wait): Don't read from the inferior when it
15763 has already exited.
15764
a385171d
PA
157652007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15766
15767 * Makefile.in (win32_low_h): New variable.
15768 (win32-low.o): Add dependency on $(win32_low_h).
15769 (win32-arm-low.o, win32-i386-low.o): New rules.
15770
f80c84b3
DJ
157712007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15772
15773 * hostio.c: Correct copyright year.
15774
a6b151f1
DJ
157752007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15776
15777 * Makefile.in (OBS): Add hostio.o.
15778 (hostio.o): New rule.
15779 * server.h (handle_vFile): Declare.
15780 * hostio.c: New file.
15781 * server.c (handle_v_requests): Take packet_len and new_packet_len
15782 for binary packets. Call handle_vFile.
15783 (main): Update call to handle_v_requests.
15784
f9387fc3
DJ
157852007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15786
15787 * linux-low.c: Include <sched.h>.
15788
51c2684e
DJ
157892007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15790
15791 * linux-low.c (linux_tracefork_grandchild): New.
15792 (linux_tracefork_child): Use clone.
15793 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15794
75f83163
JB
157952007-10-31 Joel Brobecker <brobecker@adacore.com>
15796
15797 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15798
da5898ce
DJ
157992007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15800
15801 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15802
24a09b5f
DJ
158032007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15804
15805 * inferiors.c (change_inferior_id): Delete.
15806 (add_pid_to_list, pull_pid_from_list): New.
15807 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15808 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15809 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15810 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15811 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15812 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15813 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15814 (using_threads): Always set to 1.
15815 (handle_extended_wait): New.
15816 (add_process): Do not set TID.
15817 (linux_create_inferior): Set must_set_ptrace_flags.
15818 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15819 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15820 (linux_thread_alive): Rename TID argument to LWPID.
15821 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15822 (linux_wait_for_event): Do not use TID or check using_threads. Update
15823 call to dead_thread_notify. Call handle_extended_wait.
15824 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15825 (send_sigstop): Delete sigstop_sent.
15826 (wait_for_sigstop): Avoid TID.
15827 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15828 (linux_test_for_tracefork): New.
15829 (linux_lookup_signals): Use thread_db_active and
15830 linux_supports_tracefork_flag.
15831 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15832 * linux-low.h (get_process_thread): Avoid TID.
15833 (struct process_ifo): Move thread_known and tid to the end. Remove
15834 sigstop_sent.
15835 (linux_attach_lwp, thread_db_init): Update prototypes.
15836 * server.h (change_inferior_id): Delete prototype.
15837 (add_pid_to_list, pull_pid_from_list): New prototypes.
15838 * thread-db.c (thread_db_use_events): New.
15839 (find_first_thread): Rename to...
15840 (find_one_thread): ...this. Update callers and messages. Do not
15841 call fatal. Check thread_db_use_events. Do not call
15842 change_inferior_id or new_thread_notify.
15843 (maybe_attach_thread): Update. Do not call new_thread_notify.
15844 (thread_db_init): Set thread_db_use_events. Check use_events.
15845 * utils.c (fatal, warning): Correct message prefix.
15846
30ed0a8f
DJ
158472007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15848
15849 * Makefile.in (clean): Remove new files.
15850 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15851 (powerpc-64.o, powerpc-64.c): New rules.
15852 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15853 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15854 with SPE.
15855 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15856 SPE targets.
15857 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15858 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15859 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15860 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15861 (target_regsets): Add AltiVec and SPE register sets.
15862 * configure.ac: Check for AltiVec and SPE.
15863 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15864 (ppc_fill_vrregset, ppc_store_vrregset): New.
15865 (target_regsets): Add AltiVec register set.
15866 * configure: Regenerated.
15867
fd462a61
DJ
158682007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15869
15870 * linux-low.c (O_LARGEFILE): Define.
15871 (linux_read_memory): Use /proc/PID/mem.
15872 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15873 * configure, config.in: Regenerated.
15874
69f223ed
DJ
158752007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15876
15877 * linux-low.c (linux_wait_for_event): Do not pass signals while
15878 single-stepping.
15879
aec18585
PA
158802007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15881
15882 * win32-low.c (create_process): New.
15883 (win32_create_inferior): Use create_process instead of
15884 CreateProcess. If create_process failed retry appending an ".exe"
15885 suffix. Store the GetLastError result immediatelly after
15886 create_process calls and use it on the call to error.
15887
34d86ddd
PA
158882007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15889
15890 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15891
5a0e3bd0
JB
158922007-08-23 Joel Brobecker <brobecker@adacore.com>
15893
15894 * configure.ac: Switch license to GPLv3.
15895
f88c79e6
MS
158962007-08-01 Michael Snyder <msnyder@access-company.com>
15897
15898 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15899
6b3d9b83
PA
159002007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15901
15902 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15903 typedef.
15904 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15905 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15906 CloseToolhelp32Snapshot.
15907 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15908 CloseToolhelp32Snapshot.
15909
c588c53c
MS
159102007-07-27 Michael Snyder <michael.snyder@access-company.com>
15911
15912 * server.c (main): Check for inferior exit before main loop.
15913
aa0403d9
PA
159142007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15915
15916 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15917 instead of on tmp_desc.
15918
255e7678
DJ
159192007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15920 Daniel Jacobowitz <dan@codesourcery.com>
15921
15922 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15923 (add_thread): Minor cleanups.
15924 (clear_inferiors): Move lower in the file. Clear the DLL
15925 list.
15926 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15927 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15928 (xml_escape_text): New.
15929 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15930 for qSupported.
15931 (handle_v_cont): Report errors.
15932 (gdbserver_version): Update.
15933 (main): Correct size of own_buf. Do not report initial DLL events.
15934 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15935 (unloaded_dll, xml_escape_text): New.
15936 * win32-low.c (enum target_waitkind): Update comments.
15937 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15938 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15939 (win32_EnumProcessModules, win32_GetModuleInformation)
15940 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15941 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15942 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15943 (win32_Module32First, win32_Module32Next, load_toolhelp)
15944 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15945 (get_child_debug_event): Handle DLL events.
15946 (win32_wait): Likewise.
15947
0d37add9
DJ
159482007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15949
15950 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15951 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15952
45e2715e
PA
159532007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15954
15955 * win32-low.c (handle_output_debug_string): Ignore event if not
15956 waiting.
15957
c5674cf1
PA
159582007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15959
15960 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15961
2bbe3cc1
DJ
159622007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15963
15964 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15965
ae13219e
DJ
159662007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15967
15968 * inferiors.c (change_inferior_id): Add comment.
15969 * linux-low.c (check_removed_breakpoint): Add an early
15970 prototype. Improve debug output.
15971 (linux_attach): Doc update.
15972 (linux_detach_one_process, linux_detach): Clean up before releasing
15973 each process.
15974 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15975 * linux-low.h (struct process_info): Doc improvement.
15976 * mem-break.c (delete_all_breakpoints): New.
15977 * mem-break.h (delete_all_breakpoints): New prototype.
15978 * thread-db.c (find_first_thread): New.
15979 (thread_db_create_event): Call it instead of
15980 thread_db_find_new_threads. Clean up unused variables.
15981 (maybe_attach_thread): Remove first thread handling.
15982 (thread_db_find_new_threads): Use find_first_thread.
15983 (thread_db_get_tls_address): Likewise.
15984
4105de34
DJ
159852007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15986
15987 * thread-db.c (thread_db_find_new_threads): Add prototype.
15988 (thread_db_create_event): Check for the main thread before adding
15989 a new thread.
15990 (maybe_attach_thread): Only enable event reporting if TID == 0.
15991 (thread_db_get_tls_address): Check for new threads.
15992
2b876972
DJ
159932007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15994
15995 * linux-low.c (linux_create_inferior): Try execv before execvp.
15996 * spu-low.c (spu_create_inferior): Likewise.
15997
7a245884
DJ
159982007-06-13 Mike Frysinger <vapier@gentoo.org>
15999
16000 * linux-low.c (linux_create_inferior): Change execv to execvp.
16001 * spu-low.c (spu_create_inferior): Likewies.
16002
117ce543
DJ
160032007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16004
16005 * Makefile.in (clean): Clean new files instead of deleted ones.
16006 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16007 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16008 rules.
16009 * configure.srv: Specify XML files and new regformats for MIPS and
16010 MIPS64 GNU/Linux.
16011 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16012 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16013 an entry for the restart register.
16014 (mips_cannot_fetch_register, mips_cannot_store_register)
16015 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16016 register names to match the XML descriptions.
16017 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16018 restart register instead of $0.
16019
0e7f50da
UW
160202007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16021 Markus Deuling <deuling@de.ibm.com>
16022
16023 * remote-utils.c (decode_xfer_write): New function.
16024 * server.h (decode_xfer_write): Add prototype.
16025 * server.c (handle_query): Add PACKET_LEN argument. Support
16026 qXfer:spu:read and qXfer:spu:write packets.
16027 (main): Pass packet_len to handle_query.
16028 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16029 * target.h (target_ops): Add qxfer_spu.
16030
374c1d38
UW
160312007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16032
16033 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16034 accessing non-seekable spufs files.
16035
bb63802a
UW
160362007-05-16 Markus Deuling <deuling@de.ibm.com>
16037
889bf7c5 16038 * server.c (handle_query): Add reply for qC packet.
bb63802a 16039
7390519e
PA
160402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16041 Leo Zayas <lerele@champenstudios@com>
16042
16043 * server.h (check_remote_input_interrupt_request): New function.
16044 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16045 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16046 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16047 (check_remote_input_interrupt_request): New function.
16048 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16049 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16050 winapi_GenerateConsoleCtrlEvent): New typedefs.
16051 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16052 to 250 ms.
16053 (win32_wait): Check for remote interrupt request
16054 with check_remote_input_interrupt_request.
16055 (win32_request_interrupt): New function.
16056 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16057
34b34921
PA
160582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16059
16060 * win32-low.c (debug_registers_changed,
16061 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16062 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16063 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16064 (thread_rec): Get context using the low target.
16065 (child_add_thread): Call thread_added on the low target,
16066 which does the same thing.
16067 (regptr): Delete.
16068 (do_initial_child_stuff): Remove debug registers references.
16069 Set context using the low target. Resume threads after
16070 setting the contexts.
16071 (child_continue): Remove dead variable. Remove debug
16072 registers references.
16073 (child_fetch_inferior_registers): Go through the low target.
16074 (do_child_store_inferior_registers): Remove.
16075 (child_store_inferior_registers): Go through the low target.
16076 (win32_resume): Remove debug registers references.
16077 Set context using the low target.
16078 (handle_exception): Change return type to void. Don't record
16079 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16080 first chance exception.
889bf7c5 16081 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16082 goto loop. Always return after waiting for debug event.
16083 (win32_wait): Convert to switch statement. Handle spurious
16084 events.
16085
16086 * win32-i386-low.c (debug_registers_changed,
16087 debug_registers_used): New.
16088 (initial_stuff): Rename to ...
16089 (i386_initial_stuff): ... this. Clear debug registers
16090 state variables.
16091 (store_debug_registers): Delete.
16092 (i386_get_thread_context): New.
16093 (load_debug_registers): Delete.
16094 (i386_set_thread_context): New.
16095 (i386_thread_added): New.
16096 (single_step): Rename to ...
16097 (i386_single_step): ... this.
16098 (do_fetch_inferior_registers): Rename to ...
16099 (i386_fetch_inferior_register): ... this.
16100 (i386_store_inferior_register): New.
16101 (the_low_target): Adapt to new interface.
16102
16103 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16104 (arm_get_thread_context): New.
16105 (arm_set_thread_context): New.
16106 (regptr): New.
16107 (do_fetch_inferior_registers): Rename to ...
16108 (arm_fetch_inferior_register): ... this.
16109 (arm_store_inferior_register): New.
16110 (arm_wince_breakpoint): Reimplement as unsigned long.
16111 (arm_wince_breakpoint_len): Define.
16112 (the_low_target): Adapt to new interface.
16113
16114 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16115 load_debug_registers. Add get_thread_context, set_thread_context,
16116 thread_added and store_inferior_register. Rename
16117 fetch_inferior_registers to fetch_inferior_register.
16118 (regptr): Remove declaration.
16119
dd6953e1
PA
161202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16121
16122 * linux-low.c (linux_detach): Change return type to int. Return 0.
16123 * spu-low.c (spu_detach): Likewise.
16124
444d6139
PA
161252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16126
16127 * target.h (target_ops): Change return type of detach to int.
16128 Add join.
16129 (join_inferior): New.
16130 * server.c (main): Don't skip detach support on mingw32.
16131 If the inferior doesn't support detaching return error.
16132 Call join_inferior instead of using waitpid.
16133 * linux-low.c (linux_join): New.
16134 (linux_target_op): Add linux_join.
16135 * spu-low.c (spu_join): New.
16136 (spu_target_ops): Add spu_join.
16137 * win32-low.c (win32_detach): Adapt to new interface.
16138 Reopen current_process_handle before detaching. Issue a child
16139 resume before detaching.
16140 (win32_join): New.
16141 (win32_target_op): Add win32_join.
16142
1d5315fe
PA
161432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16144
16145 * win32-low.c (win32-attach): Fix return value.
16146 * target.h (target_ops): Describe ATTACH return values.
16147
bf914831
PA
161482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16149
16150 * win32-low.c (GETPROCADDRESS): Define.
16151 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16152 (winapi_DebugSetProcessKillOnExit): Likewise.
16153 (win32_create_inferior): Force usage of ansi CreateProcessA.
16154 (win32_attach): Use GETPROCADDRESS.
16155 (win32_detach): Likewise.
16156
f72f3e60
PA
161572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16158
16159 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16160
ed50f18f
PA
161612007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16162
16163 * win32-low.c: Commit leftover changes from 2007-03-29.
16164
0c2ead7e
DJ
161652007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16166
16167 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16168 fields short instead of int. Add explicit padding.
16169 (i387_cache_to_fsave): Remove unnecessary casts.
16170 (i387_fsave_to_cache): Doc fix.
16171 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16172
73725ff3
DJ
161732007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16174
16175 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16176 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16177
d99f33d8
PA
161782007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16179
16180 * configure.srv (arm*-*-mingw32ce*): Move near the other
16181 arm targets.
16182
68070c10
PA
161832007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16184
2482afc6 16185 * configure.ac: Add errno checking.
68070c10
PA
16186 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16187 sys/file.h and malloc.h.
16188 (AC_CHECK_DECLS): Add perror.
16189 (srv_mingwce): Handle.
2482afc6 16190 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16191 win32-i386-low.o to srv_tgtobj.
16192 (i[34567]86-*-mingw*): Likewise.
16193 (arm*-*-mingw32ce*): Add case.
16194 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16195 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16196 [__MINGW32CE__] (strerror): New function.
16197 [__MINGW32CE__] (errno): Define to GetLastError.
16198 [__MINGW32CE__] (COUNTOF): New macro.
16199 (remote_open): Remove extra close call.
16200 * mem-break.c (delete_breakpoint_at): New function.
16201 * mem-break.h (delete_breakpoint_at): Declare.
16202 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16203 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16204 [USE_WIN32API] (read, write): Add char* casts.
16205 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16206 * server.h: Include wincecompat.h on Windows CE.
16207 [HAVE_ERRNO_H]: Check.
16208 (perror): Declare if not declared.
16209 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16210 (perror_with_name): Remove errno declaration.
16211 * wincecompat.h: New.
16212 * wincecompat.c: New.
16213 * win32-low.h: New.
16214 * win32-arm-low.c: New.
16215 * win32-i386-low.c: New.
16216 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16217 (OUTMSG2): Make it safe.
16218 (_T): New macro.
16219 (COUNTOF): New macro.
16220 (NUM_REGS): Get it from the low target.
16221 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16222 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16223 (thread_rec): Let low target handle debug registers.
16224 (child_add_thread): Likewise.
16225 (child_init_thread_list): Likewise.
16226 (continue_one_thread): Likewise.
16227 (regptr): New.
16228 (do_child_fetch_inferior_registers): Move to ...
16229 * win32-i386-low.c: ... here, and rename to ...
16230 (do_fetch_inferior_registers): ... this.
889bf7c5 16231 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16232 Go through the low target.
16233 (do_child_store_inferior_registers): Use regptr.
16234 (strwinerror): New function.
16235 (win32_create_inferior): Handle Windows CE.
16236 Use strwinerror instead of strerror on Windows error
16237 codes. Add program to the error output.
16238 Don't close the main thread handle on Windows CE.
16239 (win32_attach): Use coredll.dll on Windows CE.
16240 (win32_kill): Close current process and current
16241 thread handles.
16242 (win32_detach): Use coredll.dll on Windows CE.
16243 (win32_resume): Let low target handle debug registers, and
16244 step request.
16245 (handle_exception): Add/Remove initial breakpoint. Avoid
16246 non-existant WSTOPSIG on Windows CE.
16247 (win32_read_inferior_memory): Cast to remove warning.
16248 (win32_arch_string): Go through the low target.
16249 (initialize_low): Call set_breakpoint_data with the low
16250 target's breakpoint.
16251 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16252 FOP_REGNUM, mappings): Move to ...
16253 * win32-i386-low.c: ... here.
16254 * win32-low.c (win32_thread_info): Move to ...
16255 * win32-low.h: ... here.
16256 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16257 win32-arm-low.c and wincecompat.c.
16258 (all:): Add $EXEEXT.
16259 (install-only:): Likewise.
16260 (gdbserver:): Likewise.
16261 (gdbreplay:): Likewise.
16262 * config.in: Regenerate.
16263 * configure: Regenerate.
16264
41093d81
PA
162652007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16266
16267 * win32-low.c: Rename typedef thread_info to
16268 win32_thread_info throughout.
16269
544afa54
PA
162702007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16271
16272 * win32-i386-low.c: Rename to ...
16273 * win32-low.c: ... this.
16274 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16275 * Makefile.in: Likewise.
16276
bce7165d
PA
162772007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16278
16279 * remote-utils.c (monitor_output): Constify msg parameter.
16280 * server.h (monitor_output): Likewise.
16281 * win32-i386-low.c (handle_output_debug_string): New.
16282 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16283 handle_output_debug_string.
16284 (get_child_debug_event): Likewise.
16285
506c7aa0
DJ
162862007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16287
16288 * server.c (main): Correct strtoul check.
16289
42c81e2a
DJ
162902007-03-27 Jon Ringle <jon@ringle.org>
16291
16292 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16293
9453113a
DJ
162942007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16295
16296 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16297
64a69107
DJ
162982007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16299
16300 * terminal.h: Check HAVE_SGTTY_H.
16301
163022007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16303
16304 * remote-utils.c (remote_open): Print out the assigned port number.
16305
c74d0ad8
DJ
163062007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16307
16308 * remote-utils.c (monitor_output): New function.
16309 * server.c (debug_threads): Define here.
16310 (monitor_show_help): New function.
16311 (handle_query): Handle qRcmd.
16312 (main): Do not handle 'd' packet.
16313 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16314 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16315 of debug_threads.
16316
de7c3b4a
PA
163172007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16318
16319 * Makefile.in (EXEEXT): New.
16320 (clean): Use $(EXEEXT).
16321
ef57601b
PA
163222007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16323
16324 * target.h (target_ops): Rename send_signal to request_interrupt,
16325 and remove enum target_signal parameter.
16326 * linux-low.c (linux_request_interrupt): Rename from
16327 linux_send_signal, and always send SIGINT.
16328 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16329 and always send SIGINT.
16330 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16331 of send_signal.
16332 (input_interrupt): Likewise.
16333
820f2bda
PA
163342007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16335
16336 * server.c (get_features_xml): Check if target implemented
16337 arch_string.
16338 * win32-i386-low.c (win32_arch_string): New.
16339 (win32_target_ops): Add win32_arch_string as arch_string member.
16340
ab39bf24
UW
163412007-02-22 Markus Deuling <deuling@de.ibm.com>
16342
16343 * spu-low.c (spu_arch_string): New.
16344 (spu_target_ops): Add spu_arch_string.
16345
61ff6e04
DJ
163462007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16347
16348 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16349 * configure.ac: Do not check for terminal.h.
16350 * configure, config.in: Regenerated.
16351
fb1e4ffc
DJ
163522007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16353
16354 * Makefile.in (OBS): Add $(XML_BUILTIN).
16355 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16356 (clean): Update.
16357 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16358 (arm-with-iwmmxt.c): New.
16359 * config.in, configure: Regenerate.
16360 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16361 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16362 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16363 (arm*-*-linux*): Add iWMMXt and regset support.
16364 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16365 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16366 (arm_store_wmmxregset, target_regsets): New.
16367 * server.c (get_features_xml): Take annex argument. Check builtin
16368 XML documents.
16369 (handle_query): Handle multiple annexes.
16370
0f48aa01
DJ
163712007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16372
16373 * remote-utils.c [USE_WIN32API] (read, write): Define.
16374 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16375 write.
16376
23181151
DJ
163772007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16378
16379 * linux-i386-low.c (the_low_target): Set arch_string.
16380 * linux-x86-64-low.c (the_low_target): Likewise.
16381 * linux-low.c (linux_arch_string): New.
16382 (linux_target_ops): Add it.
16383 * linux-low.h (struct linux_target_ops): Add arch_string.
16384 * server.c (write_qxfer_response): Use const void * for DATA.
16385 (get_features_xml): New.
16386 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16387 * target.h (struct target_ops): Add arch_string method.
16388
9d606399
DJ
163892007-01-03 Denis Pilat <denis.pilat@st.com>
16390 Daniel Jacobowitz <dan@codesourcery.com>
16391
16392 * linux-low.c (linux_kill): Handle being called with no threads.
16393 * win32-i386-low.c (win32_kill): Likewise.
16394 (get_child_debug_event): Clear current_process_handle.
16395
163962006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16397 Daniel Jacobowitz <dan@codesourcery.com>
16398
16399 * remote-utils.c (remote_open): Check the type of specified
16400 serial port devices before opening them.
16401 * server.c (main): Kill the inferior if an error occurs during
16402 the first remote_open.
16403
a5e13d24
DJ
164042006-12-05 Markus Deuling <deuling@de.ibm.com>
16405
16406 * README: Update supported targets.
16407
186947f7
DJ
164082006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16409
16410 * Makefile.in (clean): Remove reg-mips64.c.
16411 (reg-mips64.c, reg-mips64.o): New rules.
16412 * configure.srv: Handle mips64. Include regset support for mips.
16413 * linux-mips-low.c (union mips_register): New.
16414 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16415 (mips_breakpoint, mips_breakpoint_at): Use int.
16416 (mips_collect_register, mips_supply_register)
16417 (mips_collect_register_32bit, mips_supply_register_32bit)
16418 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16419 (mips_store_fpregset, target_regsets): New.
16420 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16421
a13e2c95
UW
164222006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16423
16424 * configure.srv: Add target "spu*-*-*".
16425 * Makefile.in (clean): Remove reg-spu.c.
16426 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16427 * spu-low.c: New file.
16428
cb7283db
DJ
164292006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16430
16431 * configure.ac: Correct td_thr_tls_get_addr test.
16432 * configure: Regenerated.
16433
89be2091
DJ
164342006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16435
16436 * linux-low.c (linux_wait_for_event): Reformat. Use the
16437 pass_signals array.
16438 * remote-utils.c (decode_address_to_semicolon): New.
16439 * server.c (pass_signals, handle_general_set): New.
16440 (handle_query): Mention QPassSignals for qSupported.
16441 (main): Call handle_general_set.
16442 * server.h (pass_signals, decode_address_to_semicolon): New.
16443
000ef4f0
DJ
164442006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16445
16446 * server.c (handle_query): Correct error handling for read_auxv.
16447
b7149293
UW
164482005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16449
16450 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16451 and srv_linux_thread_db to yes.
16452 * linux-s390-low.c (s390_fill_gregset): New function.
16453 (target_regsets): Define data structure.
16454
dae5f5cf
DJ
164552006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16456
16457 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16458 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16459 * config.in, configure: Regenerated.
16460 * inferiors.c (gdb_id_to_thread): New function.
16461 (gdb_id_to_thread_id): Use it.
16462 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16463 * linux-low.h (struct process_info): Add th member.
16464 (thread_db_get_tls_address): New prototype.
16465 * remote-utils.c (decode_address): Make non-static.
16466 * server.c (handle_query): Handle qGetTLSAddr.
16467 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16468 * target.h (struct target_ops): Add get_tls_address.
16469 * thread-db.c (maybe_attach_thread): Save the thread handle.
16470 (thread_db_get_tls_address): New.
16471
32ca6d61
DJ
164722006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16473
16474 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16475 (linux_resume_one_process): Take a siginfo_t *. Update all
16476 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16477 (struct pending_signals): Add a siginfo_t.
16478 (linux_wait_for_process): Always set last_status.
16479 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16480 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16481 * linux-low.h (struct process_info): Add last_status.
16482
5ffff7c1
DJ
164832006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16484
16485 * remote-utils.c (try_rle): New function.
16486 (putpkt_binary): Use it.
16487
8695c747
DJ
164882006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16489
16490 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16491 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16492 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16493 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16494 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16495 point registers.
16496
290fadea
RS
164972006-08-08 Richard Sandiford <richard@codesourcery.com>
16498
16499 * server.c (terminal_fd): New variable.
16500 (old_foreground_pgrp): Likewise.
16501 (restore_old_foreground_pgrp): New function.
16502 (start_inferior): Record the terminal file descriptor in terminal_fd
16503 and its original foreground group in old_foreground_pgrp. Register
16504 restore_old_foreground_pgrp with atexit().
16505
9f2e1e63
DJ
165062006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16507
16508 * server.c (handle_query): Correct qPart to qXfer.
16509
b80864fb
DJ
165102006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16511
16512 * configure.ac: Check for more headers which are missing on
16513 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16514 * configure.srv: Add Cygwin and mingw32.
16515 * remote-utils.c: Don't include headers unconditionally which
16516 are missing on mingw32. Include <winsock.h> for mingw32.
16517 (remote_open): Adjust for mingw32 support. Flush
16518 standard error after writing to it.
16519 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16520 (unblock_async_io, enable_async_io, disable_async_io)
16521 (readchar, getpkt): Update for Winsock support.
16522 (prepare_resume_reply): Expect a protocol signal number.
16523 * server.c: Disable <sys/wait.h> on mingw32.
16524 (start_inferior): Adjust for mingw32 support. Flush
16525 standard error after writing to it.
16526 (attach_inferior): Likewise. Use protocol signal
16527 numbers.
16528 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16529 and names.
16530 * win32-i386-low.c: New file.
16531 * Makefile.in (XM_CLIBS): Set.
16532 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16533 (win32-i386-low.o): New dependency rule.
16534 * linux-low.c (linux_wait): Use target signal numbers.
16535 * target.h (struct target_ops): Doc fix.
16536 * server.h (target_signal_to_name): New prototype.
16537 * gdbreplay.c: Don't include headers unconditionally which
16538 are missing on mingw32. Include <winsock.h> for mingw32.
16539 (remote_close, remote_open): Adjust for Winsock support.
16540 * configure, config.in: Regenerated.
16541
0876f84a
DJ
165422006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16543
16544 * server.c (decode_xfer_read, write_qxfer_response): New.
16545 (handle_query): Take a packet length argument. Handle
16546 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16547 the qSupported response.
16548 (main): Update call to handle_query.
16549
01f9e8fa
DJ
165502006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16551
16552 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16553 (putpkt_binary): Renamed from putpkt and adjusted for binary
16554 data.
16555 (putpkt): New wrapper for putpkt_binary.
16556 (readchar): Don't mask off the high bit.
16557 (decode_X_packet): New function.
16558 * server.c (main): Call putpkt_binary if a handler sets the packet
16559 length. Save the length of the incoming packet. Handle 'X'.
16560 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16561
be2a5f71
DJ
165622006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16563
16564 * server.c (handle_query): Handle qSupported.
16565
ea025f5f
DJ
165662006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16567
16568 * remote-utils.c (all_symbols_looked_up): New variable.
16569 (look_up_one_symbol): Check it.
16570 * server.h (look_up_one_symbol): New declaration.
16571 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16572
9308fc88
DJ
165732006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16574
16575 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16576 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16577 (PTRACE_GET_THREAD_AREA): Define.
16578 (ps_get_thread_area): New function.
16579
52fb6437
NS
165802006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16581
16582 * configure.srv (m68k*-*-uclinux*): New target.
16583 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16584 (linux_resume_one_process): Remove extraneous cast.
16585 (linux_read_offsets): New.
16586 (linux_target_op): Add linux_read_offsets on mmuless systems.
16587 * server.c (handle_query): Add qOffsets logic.
16588 * target.h (struct target_ops): Add read_offsets.
16589
21b0f40c
DJ
165902006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16591
16592 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16593 (PTRACE_GET_THREAD_AREA): Define.
16594 (ps_get_thread_area): New function.
16595 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16596 (linux-x86-64-low.o): Update.
16597
0050a760
DJ
165982006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16599
16600 * configure.ac: Remove checks for prfpregset_t.
16601 * gdb_proc_service.h: New file.
16602 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16603 new "gdb_proc_service.h".
16604 * proc-service.c: Likewise.
16605 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16606 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16607 * Makefile.in (gdb_proc_service_h): Updated.
16608 * configure, config.in: Regenerated.
16609
b92a518e
DJ
166102006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16611
16612 * remote-utils.c (prepare_resume_reply): Move declaration
16613 of gdb_id_from_wait to the top of the block.
16614
545587ee
DJ
166152006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16616
16617 * linux-low.c (regsets_store_inferior_registers): Read the regset
16618 from the target before filling it.
16619
9db87ebd
DJ
166202006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16621
16622 * server.c (attach_inferior): Return SIGTRAP for a successful
16623 attach.
16624
dd24457d
DJ
166252006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16626
16627 * Makefile.in (OBS): Add version.o.
16628 (STAGESTUFF): Delete.
16629 (version.o): Add dependencies.
16630 (version.c): Replace rule.
16631 (clean): Remove version.c.
16632 * server.c (gdbserver_version): New.
16633 (gdbserver_usage): Use printf.
16634 (main): Handle --version and --help.
16635 * server.h (version, host_name): Add declarations.
16636
6f0f660e
EZ
166372005-12-23 Eli Zaretskii <eliz@gnu.org>
16638
889bf7c5
PA
16639 * linux-arm-low.c:
16640 * linux-arm-low.c:
16641 * inferiors.c:
16642 * i387-fp.h:
16643 * i387-fp.c:
16644 * gdbreplay.c:
16645 * regcache.c:
16646 * proc-service.c:
16647 * mem-break.h:
16648 * mem-break.c:
16649 * linux-x86-64-low.c:
16650 * linux-sh-low.c:
16651 * linux-s390-low.c:
16652 * linux-ppc64-low.c:
16653 * linux-ppc-low.c:
16654 * linux-mips-low.c:
16655 * linux-m68k-low.c:
16656 * linux-m32r-low.c:
16657 * linux-low.h:
16658 * linux-low.c:
16659 * linux-ia64-low.c:
16660 * linux-i386-low.c:
16661 * linux-crisv32-low.c:
16662 * thread-db.c:
16663 * terminal.h:
16664 * target.h:
16665 * target.c:
16666 * server.h:
16667 * server.c:
16668 * remote-utils.c:
16669 * regcache.h:
16670 * utils.c:
16671 * Makefile.in:
16672 * configure.ac:
6f0f660e
EZ
16673 * gdbserver.1: Add (C) after Copyright. Update the FSF
16674 address.
16675
9d1fb177
DJ
166762005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16677
16678 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16679 (arm_breakpoint_at): Recognize both breakpoints.
16680 (the_low_target): Use the correct breakpoint instruction.
16681
011a70c2
DJ
166822005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16683
16684 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16685 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16686 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16687 (the_low_target): Update.
16688
7fb85e41
AS
166892005-10-25 Andreas Schwab <schwab@suse.de>
16690
16691 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16692
16693 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16694 (ia64_num_regs): Reduce to 462.
16695
3db0444b
DJ
166962005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16697
16698 * acinclude.m4: Correct quoting.
16699 * aclocal.m4: Regenerated.
16700
16701 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16702 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16703 (thread_db_init): Call thread_db_err_str.
16704 * configure.ac: Check for TD_VERSION.
16705 * config.in, configure: Regenerated.
16706
bee0189a
DJ
167072005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16708
16709 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16710
e9d25b98
DJ
167112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16712
16713 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16714 is not available. Define HAVE_PTRACE_GETREGS if it is.
16715 * config.in, configure: Regenerated.
16716 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16717 * linux-i386-low.c, linux-m68k-low.c: Update to use
16718 HAVE_PTRACE_GETREGS.
16719 * linux-low.c (regsets_fetch_inferior_registers)
16720 (regsets_store_inferior_registers): Only return 0 if we processed
16721 GENERAL_REGS.
16722 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16723 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16724
a06660f7
DJ
167252005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16726
16727 * inferiors.c (struct thread_info): Add gdb_id.
16728 (add_thread): Add gdb_id argument.
16729 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16730 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16731 calls to add_thread.
16732 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16733 * server.c (handle_query): Use thread_to_gdb_id.
16734 (handle_v_cont, main): Use gdb_id_to_thread_id.
16735 * server.h (add_thread): Update prototype.
16736 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16737 prototypes.
16738
5a1f5858
DJ
167392005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16740
16741 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16742 left-padded registers.
16743 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16744 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16745
e122f1f5
SE
167462005-07-01 Steve Ellcey <sje@cup.hp.com>
16747
16748 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16749 * configure: Regenerate.
16750 * config.in: Regenerate.
16751 * server.h (NEED_DECLARATION_STRERROR):
16752 Replace with !HAVE_DECL_STRERROR.
16753
d592fa2f
DJ
167542005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16755
16756 * linux-low.c (linux_wait, linux_send_signal): Don't test
16757 an unsigned long variable for > 0 if it could be MAX_ULONG.
16758 * server.c (myresume): Likewise.
16759 * target.c (set_desired_inferior): Likewise.
16760
ccbd4912
MK
167612005-06-13 Mark Kettenis <kettenis@gnu.org>
16762
16763 * configure.ac: Simplify and improve check for socklen_t.
16764 * configure, config.in: Regenerate.
16765
f450004a
DJ
167662005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16767
16768 * acconfig.h: Remove.
16769 * configure.ac: Add a test for socklen_t. Use three-argument
16770 AC_DEFINE throughout.
16771 * config.in: Regenerated using autoheader 2.59.
16772 * configure: Regenerated.
16773
16774 * gdbreplay.c (socklen_t): Provide a default.
16775 (remote_open): Use socklen_t.
16776 * remote-utils.c (socklen_t): Provide a default.
16777 (remote_open): Use socklen_t.
16778 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16779 unsigned char.
16780
16781 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16782 char for buffers.
16783 * linux-low.c (linux_read_memory, linux_write_memory)
16784 (linux_read_auxv): Likewise.
16785 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16786 (check_mem_write): Likewise.
16787 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16788 Likewise.
16789 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16790 (registers_from_string, register_data): Likewise.
16791 * server.c (handle_query, main): Likewise.
16792 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16793 (decode_M_packet): Likewise.
16794 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16795 * target.h (struct target_ops): Update read_memory, write_memory,
16796 and read_auxv.
16797 (read_inferior_memory, write_inferior_memory): Update.
16798 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16799 to unsigned char *.
16800 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16801 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16802 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16803 linux-s390-low.c, linux-sh-low.c: Update for changes in
16804 read_inferior_memory and the_low_target->breakpoint.
16805
eee84df1
DJ
168062005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16807
16808 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16809 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16810 * configure.srv: Add powerpc64-*-linux*.
16811 * linux-ppc64-low.c: New file.
16812
45b134e5
OF
168132005-05-23 Orjan Friberg <orjanf@axis.com>
16814
16815 * linux-cris-low.c: New file with support for CRIS.
16816 * linux-crisv32-low.c: Ditto for CRISv32.
16817 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16818 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16819 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16820 reg-crisv32.o, and reg-crisv32.c to make rules.
16821 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16822 recognized targets.
16823
48d93c75
UW
168242005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16825
16826 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16827 of sizeof (PTRACE_XFER_TYPE).
16828 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16829
e013ee27
OF
168302005-05-12 Orjan Friberg <orjanf@axis.com>
16831
889bf7c5 16832 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16833 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16834 pointers for hardware watchpoint support.
16835 * linux-low.h (struct linux_target_ops): Ditto.
16836 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16837 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16838 to linux_target_ops.
16839 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16840 reply packet.
16841 * server.c (main): Recognize 'Z' and 'z' packets.
16842
b0ded00b
UW
168432005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16844
16845 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16846 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16847 (the_low_target): Add new members.
16848
8643e2ad
DJ
168492005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16850
16851 * proc-service.c (ps_lgetregs): Search all_processes instead of
16852 all_threads.
16853
fc620387
DJ
168542005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16855
16856 * server.c (start_inferior): Change return type to int.
16857 (attach_inferior): Change sigptr to int *.
16858 (handle_v_cont, handle_v_requests): Change signal to int *.
16859 (main): Change signal to int.
16860
168612005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16862
16863 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16864 * configure.srv: Add m32r*-*-linux*.
16865 * linux-m32r-low.c: New file.
16866
e0e76420
DJ
168672005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16868
16869 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16870
a1928bad
DJ
168712005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16872
16873 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16874 Take unsigned long arguments for PIDs.
16875 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16876 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16877 (wait_for_sigstop, linux_resume_one_process)
16878 (regsets_fetch_inferior_registers, linux_send_signal)
16879 (linux_read_auxv): Likewise. Update the types of variables holding
16880 PIDs. Update format string specifiers.
16881 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16882 * remote-utils.c (prepare_resume_reply): Likewise.
16883 * server.c (cont_thread, general_thread, step_thread)
16884 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16885 unsigned long.
16886 (handle_query): Update format specifiers.
16887 (handle_v_cont, main): Use strtoul for thread IDs.
16888 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16889 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16890 (general_thread, step_thread, thread_from_wait)
16891 (old_thread_from_wait): Update.
16892 * target.h (struct thread_resume): Use unsigned long for THREAD.
16893 (struct target_ops): Use unsigned long for arguments to attach and
16894 thread_alive.
16895
dcdb98d2
DJ
168962005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16897
16898 * acinclude.m4: Include bfd/bfd.m4 directly.
16899 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16900 <agriffis@toolchain.org>.
16901 * aclocal.m4, configure: Regenerated.
16902
bec39cab
AC
169032005-01-07 Andrew Cagney <cagney@gnu.org>
16904
16905 * configure.ac: Rename configure.in, require autoconf 2.59.
16906 * configure: Re-generate.
16907
434c4c77
DJ
169082004-12-08 Daniel Jacobowitz <dan@debian.org>
16909
16910 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16911 LIBS when finished.
16912 * aclocal.m4: Regenerated.
16913 * configure: Regenerated.
16914
db1d3e1b
AS
169152004-11-21 Andreas Schwab <schwab@suse.de>
16916
16917 * linux-m68k-low.c (m68k_num_gregs): Define.
16918 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16919 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16920 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16921 (m68k_breakpoint_at): New. Add to the_low_target.
16922
16923 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16924 srv_linux_thread_db to yes.
16925
43360365
JB
169262004-10-20 Joel Brobecker <brobecker@gnat.com>
16927
16928 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16929 (ARCH_SET_FS): Likewise.
16930 (ARCH_GET_FS): Likewise.
16931 (ARCH_GET_GS): Likewise.
16932
fd500816
DJ
169332004-10-16 Daniel Jacobowitz <dan@debian.org>
16934
16935 * linux-i386-low.c (ps_get_thread_area): New.
16936 * linux-x86-64-low.c (ps_get_thread_area): New.
16937 * linux-low.c: Include <sys/syscall.h>.
16938 (linux_kill_one_process): Don't kill the first thread here.
16939 (linux_kill): Kill the first thread here.
16940 (kill_lwp): New function.
16941 (send_sigstop, linux_send_signal): Use it.
16942 * proc-service.c: Clean up #ifdefs.
16943 (fpregset_info): Delete.
16944 (ps_lgetregs): Update and enable implementation.
16945 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16946 implementations.
16947 * remote-utils.c (struct sym_cache, symbol_cache): New.
16948 (input_interrupt): Print a clearer message.
16949 (async_io_enabled): New variable.
16950 (enable_async_io, disable_async_io): Use it. Update comments.
16951 (look_up_one_symbol): Use the symbol cache.
16952 * thread-db.c (thread_db_look_up_symbols): New function.
16953 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16954
f6de3c42
DJ
169552004-10-16 Daniel Jacobowitz <dan@debian.org>
16956
16957 * configure.in: Test for -rdynamic.
16958 * configure: Regenerated.
16959 * Makefile (INTERNAL_LDFLAGS): New.
16960 (gdbserver, gdbreplay): Use it.
16961
2c0fc042
AC
169622004-09-02 Andrew Cagney <cagney@gnu.org>
16963
16964 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16965
075b3282
DJ
169662004-03-23 Daniel Jacobowitz <drow@mvista.com>
16967
16968 * linux-low.c (linux_wait): Clear all_processes list also.
16969
fa6a77dc
DJ
169702004-03-12 Daniel Jacobowitz <drow@mvista.com>
16971
16972 * linux-low.c: Include <errno.h>. Remove extern declaration of
16973 errno.
16974
6d782a97
DJ
169752004-03-12 Daniel Jacobowitz <drow@mvista.com>
16976
16977 * gdbreplay.c, server.h, utils.c: Update copyright years.
16978
3a7fb99b
DJ
169792004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16980
16981 * server.c (main): Print child status or termination signal from
16982 variable 'signal', not 'sig'.
16983
c3e735a6
DJ
169842004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16985
16986 * linux-low.c (linux_read_memory): Change return type to
16987 int. Check for and return error from ptrace().
16988 * target.c (read_inferior_memory): Change return type to int. Pass
16989 back return status from the_target->read_memory().
16990 * target.h (struct target_ops): Adapt *read_memory() prototype.
16991 Update comment.
16992 (read_inferior_memory): Adapt prototype.
16993 * server.c (main): Return an error packet if
16994 read_inferior_memory() returns an error.
16995
a59d1c82
DJ
169962004-03-04 Daniel Jacobowitz <drow@mvista.com>
16997
16998 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16999 Unify with other clean targets.
17000
dc3f8883
DJ
170012004-02-29 Daniel Jacobowitz <drow@mvista.com>
17002
17003 * server.c (handle_v_cont): Call set_desired_inferior.
17004
89a208da
DJ
170052004-02-29 Daniel Jacobowitz <drow@mvista.com>
17006
17007 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17008
62ea82f5
DJ
170092004-02-29 Daniel Jacobowitz <drow@mvista.com>
17010
17011 * linux-low.c (linux_wait): Unblock async I/O.
17012 (linux_resume): Block and enable async I/O.
17013 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17014 * server.h (block_async_io, unblock_async_io): Add prototypes.
17015
6910d122
DJ
170162004-02-29 Daniel Jacobowitz <drow@mvista.com>
17017
17018 * remote-utils.c (remote_open): Print a status notice after
17019 opening a TCP port.
17020 * server.c (attach_inferior): Print a status notice after
17021 attaching.
17022
170232004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17024
17025 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17026
c89dc5d4
DJ
170272004-02-26 Daniel Jacobowitz <drow@mvista.com>
17028
17029 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17030 error packet.
17031 * server.c, target.h: Update copyright years.
17032
4b8dad4a
RM
170332004-02-25 Roland McGrath <roland@redhat.com>
17034
17035 * target.h (struct target_ops): New member `read_auxv'.
17036 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17037 * linux-low.c (linux_read_auxv): New function.
17038 (linux_target_ops): Initialize `read_auxv' member to that.
17039
d7446758
JB
170402004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17041
17042 Committed by Jim Blandy <jimb@redhat.com>.
17043
17044 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17045 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17046 instead of GPR_SIZE to distiguish s390 and s390x targets.
17047
5544ad89
DJ
170482004-01-31 Daniel Jacobowitz <drow@mvista.com>
17049
17050 * linux-low.c: Update copyright year.
17051 (check_removed_breakpoint): Clear pending_is_breakpoint.
17052 (linux_set_resume_request, linux_queue_one_thread)
17053 (resume_status_pending_p): New functions.
17054 (linux_continue_one_thread): Use process->resume.
17055 (linux_resume): Only resume threads if there are no pending events.
17056 * linux-low.h (struct process_info): Add resume request
17057 pointer.
17058
2a68b70e
DJ
170592004-01-30 Daniel Jacobowitz <drow@mvista.com>
17060
17061 * regcache.c (new_register_cache): Clear the allocated register
17062 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17063
64386c31
DJ
170642003-10-13 Daniel Jacobowitz <drow@mvista.com>
17065
17066 * linux-low.c (linux_resume): Take a struct thread_resume *
17067 argument.
17068 (linux_wait): Update call.
17069 (resume_ptr): New static variable.
17070 (linux_continue_one_thread): Renamed from
17071 linux_continue_one_process. Use resume_ptr.
17072 (linux_resume): Use linux_continue_one_thread.
17073 * server.c (handle_v_cont, handle_v_requests): New functions.
17074 (myresume): New function.
17075 (main): Handle 'v' case.
17076 * target.h (struct thread_resume): New type.
17077 (struct target_ops): Change argument of "resume" to struct
17078 thread_resume *.
17079 (myresume): Delete macro.
17080
c938e9b0
L
170812003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17082
17083 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17084 (uninstall): Support DESTDIR.
17085
7f313d07
BC
17086Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17087
17088 * configure.srv: Add xscale*linux copy of arm*linux entry.
17089
3b2fc2ea
DJ
170902003-07-24 Daniel Jacobowitz <drow@mvista.com>
17091
17092 * linux-arm-low.c (arm_reinsert_addr): New function.
17093 (the_low_target): Add arm_reinsert_addr.
17094
1c0a559e
MK
170952003-07-08 Mark Kettenis <kettenis@gnu.org>
17096
17097 * mem-break.c: Remove whitespace at end of file.
17098
43d5792c
DJ
170992003-06-28 Daniel Jacobowitz <drow@mvista.com>
17100
17101 * configure.in: Check whether we need to prototype strerror.
17102 * server.h: Optionally prototype strerror.
17103 * gdbreplay.c (perror_with_name): Use strerror.
17104 * linux-low.c (linux_attach_lwp): Use strerror.
17105 * utils.c (perror_with_name): Use strerror.
17106 * config.in, configure: Regenerated.
17107
c8a86edf
DJ
171082003-06-28 Daniel Jacobowitz <drow@mvista.com>
17109
17110 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17111 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17112
73d37363
DJ
171132003-06-20 Daniel Jacobowitz <drow@mvista.com>
17114
17115 * Makefile.in (SFILES): Update.
17116 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17117 low-sun3.c: Remove files.
17118
6ad8ae5c
DJ
171192003-06-17 Daniel Jacobowitz <drow@mvista.com>
17120
17121 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17122 (linux_detach_one_process, linux_detach): New functions.
17123 (linux_target_ops): Add linux_detach.
17124 * server.c (main): Handle 'D' packet.
17125 * target.h (struct target_ops): Add "detach" member.
17126 (detach_inferior): Define.
17127
1581182a
MK
171282003-06-13 Mark Kettenis <kettenis@gnu.org>
17129
17130 From Kelley Cook <kelleycook@wideopenwest.com>:
17131 * configure.srv: Accept i[34567]86 variants.
17132
e5379b03
DJ
171332003-06-05 Daniel Jacobowitz <drow@mvista.com>
17134
17135 * linux-low.c (linux_wait_for_event): Correct comment typos.
17136 (linux_resume_one_process): Call check_removed_breakpoint.
17137 (linux_send_signal): New function.
17138 (linux_target_ops): Add linux_send_signal.
17139 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17140 of kill.
17141 * target.h (struct target_ops): Add send_signal.
17142
2ff29de4
JB
171432003-05-29 Jim Blandy <jimb@redhat.com>
17144
17145 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17146 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17147 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17148 away part of the register's value.
17149
254787d4
DJ
171502003-03-26 Daniel Jacobowitz <drow@mvista.com>
17151
17152 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17153 (linux_wait_for_event, linux_init_signals): Likewise.
17154
94e10508
DJ
171552003-03-17 Daniel Jacobowitz <drow@mvista.com>
17156
17157 * configure.in: Check for stdlib.h.
17158 * configure: Regenerated.
17159 * config.in: Regenerated.
17160
4c0711e0
DJ
171612003-01-04 Andreas Schwab <schwab@suse.de>
17162
17163 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17164
ef66e766
AC
171652003-01-02 Andrew Cagney <ac131313@redhat.com>
17166
17167 * Makefile.in: Remove obsolete code.
17168
a1358604
DJ
171692002-11-20 Daniel Jacobowitz <drow@mvista.com>
17170
17171 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17172 defined(PT_FPR0_HI).
17173
23ce3b1c
DJ
171742002-11-17 Stuart Hughes <seh@zee2.com>
17175
17176 * linux-arm-low.c (arm_num_regs): Increase.
17177 (arm_regmap): Include status register.
17178
171792002-11-17 Daniel Jacobowitz <drow@mvista.com>
17180
17181 * linux-low.c (register_addr): Remove incorrect -1 check.
17182
a9fa9f7d
DJ
171832002-08-29 Daniel Jacobowitz <drow@mvista.com>
17184
17185 * linux-low.c (linux_create_inferior): Call setpgid. Return
17186 the new PID.
17187 (unstopped_p, linux_signal_pid): Remove.
17188 (linux_target_ops): Remove linux_signal_pid.
17189 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17190 global instead of target method.
17191 * target.h (struct target_ops): Remove signal_pid. Update comment
17192 for create_inferior.
17193 * server.c (signal_pid): New variable.
17194 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17195 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17196 (attach_inferior): Set signal_pid.
17197
17574093
DJ
171982002-08-23 Daniel Jacobowitz <drow@mvista.com>
17199
17200 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17201
172022002-08-20 Jim Blandy <jimb@redhat.com>
17203
17204 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17205 default for this.
17206
172072002-08-01 Andrew Cagney <cagney@redhat.com>
17208
17209 * Makefile.in: Make chill references obsolete.
17210
172112002-07-24 Kevin Buettner <kevinb@redhat.com>
17212
17213 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17214 * configure: Regenerate.
17215 * config.in: Regenerate.
17216
172172002-07-09 David O'Brien <obrien@FreeBSD.org>
17218
17219 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17220 (perror_with_name, remote_close, remote_open, expect, play): Static.
17221
172222002-07-04 Michal Ludvig <mludvig@suse.cz>
17223
4b8dad4a 17224 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17225 byte offsets instead of an array of indexes.
17226 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17227
172282002-06-13 Daniel Jacobowitz <drow@mvista.com>
17229
17230 * regcache.c: Add comment.
17231
172322002-06-11 Daniel Jacobowitz <drow@mvista.com>
17233
17234 * thread-db.c: New file.
17235 * proc-service.c: New file.
17236 * acinclude.m4: New file.
17237 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17238 proc-service.o, and thread-db.o.
17239 (linux-low.o): Add USE_THREAD_DB.
17240 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17241 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17242 * aclocal.m4: Regenerated.
17243 * config.in: Regenerated.
17244 * configure: Regenerated.
17245 * configure.in: Check for proc_service.h, sys/procfs.h,
17246 thread_db.h, and linux/elf.h headrs.
17247 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17248 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17249 Check for -lthread_db and thread support.
17250 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17251 PowerPC, and SuperH.
17252 * i387-fp.c: Constify arguments.
17253 * i387-fp.h: Likewise.
17254 * inferiors.c: (struct thread_info): Renamed from
17255 `struct inferior_info'. Remove PID member. Use generic inferior
17256 list header. All uses updated.
17257 (inferiors, signal_pid): Removed.
17258 (all_threads): New variable.
17259 (get_thread): Define.
17260 (add_inferior_to_list): New function.
17261 (for_each_inferior): New function.
17262 (change_inferior_id): New function.
17263 (add_inferior): Removed.
17264 (remove_inferior): New function.
17265 (add_thread): New function.
17266 (free_one_thread): New function.
17267 (remove_thread): New function.
17268 (clear_inferiors): Use for_each_inferior and free_one_thread.
17269 (find_inferior): New function.
17270 (find_inferior_id): New function.
17271 (inferior_target_data): Update argument type.
17272 (set_inferior_target_data): Likewise.
17273 (inferior_regcache_data): Likewise.
17274 (set_inferior_regcache_data): Likewise.
17275 * linux-low.c (linux_bp_reinsert): Remove.
17276 (all_processes, stopping_threads, using_thrads)
17277 (struct pending_signals, debug_threads, pid_of): New.
17278 (inferior_pid): Replace with macro.
17279 (struct inferior_linux_data): Remove.
17280 (get_stop_pc, add_process): New functions.
17281 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17282 Use add_process and add_thread.
17283 (linux_attach_lwp): New function, based on old linux_attach. Use
17284 add_process and add_thread. Set stop_expected for new threads.
17285 (linux_attach): New function.
17286 (linux_kill_one_process): New function.
17287 (linux_kill): Kill all LWPs.
17288 (linux_thread_alive): Use find_inferior_id.
17289 (check_removed_breakpoints, status_pending_p): New functions.
17290 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17291 Update. Use WNOHANG. Wait for cloned processes also. Update process
17292 struct for the found process.
17293 (linux_wait_for_event): New function.
17294 (linux_wait): Use it. Support LWPs.
17295 (send_sigstop, wait_for_sigstop, stop_all_processes)
17296 (linux_resume_one_process, linux_continue_one_process): New functions.
17297 (linux_resume): Support LWPs.
17298 (REGISTER_RAW_SIZE): Remove.
17299 (fetch_register): Use register_size instead. Call supply_register.
17300 (usr_store_inferior_registers): Likewise. Call collect_register.
17301 Fix recursive case.
17302 (regsets_fetch_inferior_registers): Improve error message.
17303 (regsets_store_inferior_registers): Add debugging.
17304 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17305 (unstopped_p, linux_signal_pid): New functions.
17306 (linux_target_ops): Add linux_signal_pid.
17307 (linux_init_signals): New function.
17308 (initialize_low): Call it. Initialize using_threads.
17309 * regcache.c (inferior_regcache_data): Add valid
17310 flag.
17311 (get_regcache): Fetch registers lazily. Add fetch argument
17312 and update all callers.
17313 (regcache_invalidate_one, regcache_invalidate): New
17314 functions.
17315 (new_register_cache): Renamed from create_register_cache.
17316 Return the new regcache.
17317 (free_register_cache): Change argument to a void *.
17318 (registers_to_string, registers_from_string): Call get_regcache
17319 with fetch flag set.
17320 (register_data): Make static. Pass fetch flag to get_regcache.
17321 (supply_register): Call get_regcache with fetch flag clear.
17322 (collect_register): Call get_regcache with fetch flag set.
17323 (collect_register_as_string): New function.
17324 * regcache.h: Update.
17325 * remote-utils.c (putpkt): Flush after debug output and use
17326 stderr.
17327 Handle input interrupts while waiting for an ACK.
17328 (input_interrupt): Use signal_pid method.
17329 (getpkt): Flush after debug output and use stderr.
17330 (outreg): Use collect_register_as_string.
17331 (new_thread_notify, dead_thread_notify): New functions.
17332 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17333 and general_thread.
17334 (look_up_one_symbol): Flush after debug output.
17335 * server.c (step_thread, server_waiting): New variables.
17336 (start_inferior): Don't use signal_pid. Update call to mywait.
17337 (attach_inferior): Update call to mywait.
17338 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17339 (main): Don't fetch/store registers explicitly. Use
17340 set_desired_inferior. Support proposed ``Hs'' packet. Update
17341 calls to mywait.
17342 * server.h: Update.
17343 (struct inferior_list, struct_inferior_list_entry): New.
17344 * target.c (set_desired_inferior): New.
17345 (write_inferior_memory): Constify.
17346 (mywait): New function.
17347 * target.h: Update.
17348 (struct target_ops): New signal_pid method.
17349 (mywait): Removed macro, added prototype.
17350
17351 * linux-low.h (regset_func): Removed.
17352 (regset_fill_func, regset_store_func): New.
17353 (enum regset_type): New.
17354 (struct regset_info): Add type field. Use new operation types.
17355 (struct linux_target_ops): stop_pc renamed to get_pc.
17356 Add decr_pc_after_break and breakpoint_at.
17357 (get_process, get_thread_proess, get_process_thread)
17358 (strut process_info, all_processes, linux_attach_lwp)
17359 (thread_db_init): New.
17360
17361 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17362 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17363 (the_low_target): Add new members.
17364 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17365 (i386_store_fpxregset): Constify.
17366 (target_regsets): Add new kind identifier.
17367 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17368 (i386_set_pc): Add debugging.
17369 (i386_breakpoint_at): New function.
17370 (the_low_target): Add new members.
17371 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17372 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17373 (mips_breakpoint_at): New.
17374 (the_low_target): Add new members.
17375 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17376 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17377 (the_low_target): Add new members.
17378 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17379 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17380 (the_low_target): Add new members.
17381 * linux-x86-64-low.c (target_regsets): Add new kind
17382 identifier.
17383
173842002-05-15 Daniel Jacobowitz <drow@mvista.com>
17385
17386 From Martin Pool <mbp@samba.org>:
17387 * server.c (gdbserver_usage): New function.
17388 (main): Call it.
17389
173902002-05-14 Daniel Jacobowitz <drow@mvista.com>
17391
17392 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17393 stop_at -> stop_pc.
17394
173952002-05-04 Andrew Cagney <ac131313@redhat.com>
17396
17397 * Makefile.in: Remove obsolete code.
17398
173992002-04-24 Michal Ludvig <mludvig@suse.cz>
17400
17401 * linux-low.c (regsets_fetch_inferior_registers),
17402 (regsets_store_inferior_registers): Removed cast to int from
17403 ptrace() calls.
17404 * regcache.h: Added declaration of struct inferior_info.
17405
174062002-04-20 Daniel Jacobowitz <drow@mvista.com>
17407
17408 * inferiors.c (struct inferior_info): Add regcache_data.
17409 (add_inferior): Call create_register_cache.
17410 (clear_inferiors): Call free_register_cache.
17411 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17412 * regcache.c (struct inferior_regcache_data): New.
17413 (registers): Remove.
17414 (get_regcache): New function.
17415 (create_register_cache, free_register_cache): New functions.
17416 (set_register_cache): Don't initialize the register cache here.
17417 (registers_to_string, registers_from_string, register_data): Call
17418 get_regcache.
17419 * regcache.h: Add prototypes.
17420 * server.h: Likewise.
17421
174222002-04-20 Daniel Jacobowitz <drow@mvista.com>
17423
17424 * mem-break.c: New file.
17425 * mem-break.h: New file.
17426 * Makefile.in: Add mem-break.o rule; update server.h
17427 dependencies.
17428 * inferiors.c (struct inferior_info): Add target_data
17429 member.
17430 (clear_inferiors): Free target_data member if set.
17431 (inferior_target_data, set_inferior_target_data): New functions.
17432 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17433 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17434 * linux-low.c (linux_bp_reinsert): New variable.
17435 (struct inferior_linux_data): New.
17436 (linux_create_inferior): Use set_inferior_target_data.
17437 (linux_attach): Likewise. Call add_inferior.
17438 (linux_wait_for_one_inferior): New function.
17439 (linux_wait): Call it.
17440 (linux_write_memory): Add const.
17441 (initialize_low): Call set_breakpoint_data.
17442 * linux-low.h (struct linux_target_ops): Add breakpoint
17443 handling members.
17444 * server.c (attach_inferior): Remove extra add_inferior
17445 call.
17446 * server.h: Include mem-break.h. Update inferior.c
17447 prototypes.
17448 * target.c (read_inferior_memory)
17449 (write_inferior_memory): New functions.
17450 * target.h (read_inferior_memory)
17451 (write_inferior_memory): Change macros to prototypes.
17452 (struct target_ops): Update comments. Add const to write_memory
17453 definition.
17454
174552002-04-11 Daniel Jacobowitz <drow@mvista.com>
17456
17457 * linux-low.c (usr_store_inferior_registers): Support
17458 registers which are allowed to fail to store.
17459 * linux-low.h (linux_target_ops): Likewise.
17460 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17461 (ppc_cannot_store_register): FPSCR may not be storable.
17462
174632002-04-09 Daniel Jacobowitz <drow@mvista.com>
17464
17465 * server.h: Include <string.h> if HAVE_STRING_H.
17466 * ChangeLog: Correct paths in last ChangeLog entry.
17467
174682002-04-09 Daniel Jacobowitz <drow@mvista.com>
17469
17470 * linux-low.h: Remove obsolete prototypes.
17471 (struct linux_target_ops): New.
17472 (extern the_low_target): New.
17473 * linux-low.c (num_regs, regmap): Remove declarations.
17474 (register_addr): Use the_low_target explicitly.
17475 (fetch_register): Likewise.
17476 (usr_fetch_inferior_registers): Likewise.
17477 (usr_store_inferior_registers): Likewise.
17478 * linux-arm-low.c (num_regs): Remove.
17479 (arm_num_regs): Define.
17480 (arm_regmap): Renamed from regmap, made static.
17481 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17482 made static.
17483 (arm_cannot_store_register): Renamed from cannot_store_register,
17484 made static.
17485 (the_low_target): New.
17486 * linux-i386-low.c (num_regs): Remove.
17487 (i386_num_regs): Define.
17488 (i386_regmap): Renamed from regmap, made static.
17489 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17490 made static.
17491 (i386_cannot_store_register): Renamed from cannot_store_register,
17492 made static.
17493 (the_low_target): New.
17494 * linux-ia64-low.c (num_regs): Remove.
17495 (ia64_num_regs): Define.
17496 (ia64_regmap): Renamed from regmap, made static.
17497 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17498 made static.
17499 (ia64_cannot_store_register): Renamed from cannot_store_register,
17500 made static.
17501 (the_low_target): New.
17502 * linux-m68k-low.c (num_regs): Remove.
17503 (m68k_num_regs): Define.
17504 (m68k_regmap): Renamed from regmap, made static.
17505 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17506 made static.
17507 (m68k_cannot_store_register): Renamed from cannot_store_register,
17508 made static.
17509 (the_low_target): New.
17510 * linux-mips-low.c (num_regs): Remove.
17511 (mips_num_regs): Define.
17512 (mips_regmap): Renamed from regmap, made static.
17513 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17514 made static.
17515 (mips_cannot_store_register): Renamed from cannot_store_register,
17516 made static.
17517 (the_low_target): New.
17518 * linux-ppc-low.c (num_regs): Remove.
17519 (ppc_num_regs): Define.
17520 (ppc_regmap): Renamed from regmap, made static.
17521 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17522 made static.
17523 (ppc_cannot_store_register): Renamed from cannot_store_register,
17524 made static.
17525 (the_low_target): New.
17526 * linux-s390-low.c (num_regs): Remove.
17527 (s390_num_regs): Define.
17528 (s390_regmap): Renamed from regmap, made static.
17529 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17530 made static.
17531 (s390_cannot_store_register): Renamed from cannot_store_register,
17532 made static.
17533 (the_low_target): New.
17534 * linux-sh-low.c (num_regs): Remove.
17535 (sh_num_regs): Define.
17536 (sh_regmap): Renamed from regmap, made static.
17537 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17538 made static.
17539 (sh_cannot_store_register): Renamed from cannot_store_register,
17540 made static.
17541 (the_low_target): New.
17542 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17543 (the_low_target): New.
17544
175452002-04-09 Daniel Jacobowitz <drow@mvista.com>
17546
17547 * Makefile.in: Add stamp-h target.
17548 * configure.in: Create stamp-h.
17549 * configure: Regenerated.
17550
175512002-04-09 Daniel Jacobowitz <drow@mvista.com>
17552
17553 * inferiors.c: New file.
17554 * target.c: New file.
17555 * target.h: New file.
17556 * Makefile.in: Add target.o and inferiors.o. Update
17557 dependencies.
17558 * linux-low.c (inferior_pid): New static variable,
17559 moved from server.c.
17560 (linux_create_inferior): Renamed from create_inferior.
17561 Call add_inferior. Return 0 on success instead of a PID.
17562 (linux_attach): Renamed from myattach.
17563 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17564 (linux_thread_alive): Renamed from mythread_alive.
17565 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17566 child dies.
17567 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17568 (regsets_store_inferior_registers): Correct error message.
17569 Add missing ``return 0''.
17570 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17571 (linux_store_registers): Renamed from store_inferior_registers.
17572 (linux_read_memory): Renamed from read_inferior_memory.
17573 (linux_write_memory): Renamed from write_inferior_memory.
17574 (linux_target_ops): New structure.
17575 (initialize_low): Call set_target_ops ().
17576 * remote-utils.c (unhexify): New function.
17577 (hexify): New function.
17578 (input_interrupt): Send signals to ``signal_pid''.
17579 * server.c (inferior_pid): Remove.
17580 (start_inferior): Update create_inferior call.
17581 (attach_inferior): Call add_inferior.
17582 (handle_query): New function.
17583 (main): Call handle_query for `q' packets.
17584 * server.h: Include "target.h". Remove obsolete prototypes.
17585 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17586
175872002-04-09 Daniel Jacobowitz <drow@mvista.com>
17588
17589 * Makefile.in: Add WARN_CFLAGS. Update configury
17590 dependencies.
17591 * configure.in: Check for <string.h>
17592 * configure: Regenerate.
17593 * config.in: Regenerate.
17594 * gdbreplay.c: Include needed system headers.
17595 (remote_open): Remove strchr prototype.
17596 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17597 * regcache.c (supply_register): Change buf argument to const void *.
17598 (supply_register_by_name): Likewise.
17599 (collect_register): Change buf argument to void *.
17600 (collect_register_by_name): Likewise.
17601 * regcache.h: Add missing prototypes.
17602 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17603 * server.c (handle_query): New function.
17604 (attached): New static variable, moved out of main.
17605 (main): Quiet longjmp clobber warnings.
17606 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17607 * utils.c (error): Remove NORETURN.
17608 (fatal): Likewise.
This page took 2.264644 seconds and 4 git commands to generate.