]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb/gdbserver/
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e1f58301
JW
12013-02-27 Jiong Wang <jiwang@tilera.com>
2
3 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4 (reg-tilegx32.c): New rule.
5 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7 different register info initializer according to elf class.
8 (init_registers_tilgx32): New function. The tilegx32 register info
9 initializer.
10 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11 (tile_store_gregset): Likewise.
12
d171ca78
YQ
132013-02-27 Yao Qi <yao@codesourcery.com>
14
15 * server.c (process_point_options): Print debug message when
16 debug_threads is true.
17
282bbdf3
YQ
182013-02-26 Yao Qi <yao@codesourcery.com>
19
20 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
21
aca22551
PA
222013-02-19 Pedro Alves <palves@redhat.com>
23 Kai Tietz <ktietz@redhat.com>
24
25 PR gdb/15161
26
27 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
28 instead of strtoul to extract address from packet.
29 (process_serial_event) <'z'>: Likewise.
30
4f3cee1c
YQ
312013-02-18 Yao Qi <yao@codesourcery.com>
32
33 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
34
8e1d55a3
PA
352013-02-14 Pedro Alves <palves@redhat.com>
36
37 Plug memory leak.
38
39 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
40 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
41
458820da
PA
422013-02-14 Pedro Alves <palves@redhat.com>
43
44 * tracepoint.c (cmd_qtdpsrc): Use savestring.
45
baea0dae
PA
462013-02-14 Pedro Alves <palves@redhat.com>
47
48 * tracepoint.c (save_string): Delete.
49 (add_tracepoint_action): Use savestring instead of save_string.
50
0b1afbb3
PA
512013-02-12 Pedro Alves <palves@redhat.com>
52
53 * linux-xtensa-low.c: Ditto.
54 * xtensa-xtregs.c: Ditto.
55
8a4ac37e
PA
562013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
57
58 * thread-db.c (thread_db_get_tls_address): NULL pointer check
59 thread_db.
60
148de6bb
MS
612013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
62
63 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
64 aarch64_num_wp_regs and aarch64_num_bp_regs to
65 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
66
55fac6e0
MS
672013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
68
69 * linux-aarch64-low.c (ps_get_thread_area): Replace
70 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
71
176eb98c
MS
722013-02-04 Jim MacArthur <jim.macarthur@arm.com>
73 Marcus Shawcroft <marcus.shawcroft@arm.com>
74 Nigel Stephens <nigel.stephens@arm.com>
75 Yufeng Zhang <yufeng.zhang@arm.com>
76
77 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
78 (aarch64.c, aarch64-without-fpu.c): New targets.
79 * configure.srv (aarch64*-*-linux*): New.
80 * linux-aarch64-low.c: New file.
81
56f7af9c
MS
822013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
83
43aaf8b6 84 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
85 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
86 (dequeue_one_deferred_signal, linux_resume_one_thread)
87 (fetch_register, linux_write_memory, linux_enable_event_reporting)
88 (linux_tracefork_grandchild, linux_test_for_tracefork)
89 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
90 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
91 where the argument is 0.
92
60f662b0
YQ
932013-01-25 Yao Qi <yao@codesourcery.com>
94
95 * event-loop.c: Include "queue.h".
96 (gdb_event_p): New typedef.
97 (struct gdb_event) <next_event>: Remove.
98 (event_queue): Change to QUEUE(gdb_event_p).
99 (async_queue_event): Remove.
100 (gdb_event_xfree): New.
101 (initialize_event_loop): New.
102 (process_event): Use API from QUEUE.
103 (wait_for_event): Likewise.
104 * server.c (main): Call initialize_event_loop.
105 * server.h (initialize_event_loop): Declare.
106
5ae4861a
YQ
1072013-01-18 Yao Qi <yao@codesourcery.com>
108
109 * ax.h (struct eval_agent_expr_context): New.
110 (gdb_eval_agent_expr): Update declaration.
111 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
112 TFRAME. Add new argument CTX.
113 * server.h (struct eval_agent_expr_context): Declare.
114 (agent_mem_read, agent_tsv_read): Update declaration.
115 (agent_mem_read_string): Likewise.
116 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
117 (add_traceframe_block): Add new argument TPOINT.
118 Increase TPOINT->traceframe_usage.
119 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
120 eval_tracepoint_agent_expr.
121 (condition_true_at_tracepoint): Likewise.
122 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
123 (agent_mem_read_string, agent_tsv_read): Likewise.
124
85e00e85
YQ
1252013-01-16 Yao Qi <yao@codesourcery.com>
126
127 * linux-low.c (linux_resume_one_lwp): Don't check
128 'lwp->bp_reinsert != 0'.
129
4039cf45
JB
1302013-01-07 Joel Brobecker <brobecker@adacore.com>
131 Pedro Alves <palves@redhat.com>
132
133 * lynx-low.c (ptrace_request_to_str): Define a temporary
134 macro and use it to simplify this function's implementation.
135
9044dee2
JB
1362013-01-07 Joel Brobecker <brobecker@adacore.com>
137
138 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
139 sets errno.
140
e6352c8f
JB
1412013-01-07 Joel Brobecker <brobecker@adacore.com>
142
143 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
144
50681a27
JB
1452013-01-07 Joel Brobecker <brobecker@adacore.com>
146
147 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
148
3f6e77ef
JB
1492013-01-07 Joel Brobecker <brobecker@adacore.com>
150
151 * lynx-low.c (lynx_resume): Use the resume_info parameter
152 to determine the ptid for the lynx_ptrace call, unless
153 it is equal to minus_one_ptid, in which case we use the
154 ptid of the current_inferior.
155 (lynx_wait_1): After having received a thread create/exit
156 event, resume the inferior's execution using the signaling
157 thread's ptid, rather than the old ptid.
158
7fda33ae
JB
1592013-01-07 Joel Brobecker <brobecker@adacore.com>
160
161 * lynx-low.c (lynx_resume): Delete variable ret.
162
b9786c74
JB
1632013-01-01 Joel Brobecker <brobecker@adacore.com>
164
165 * gdbreplay.c (gdbreplay_version): Update copyright year.
166 * server.c (gdbserver_version): Likewise.
167
8b93d60f
JB
1682012-12-17 Joel Brobecker <brobecker@adacore.com>
169
170 * lynx-low.c (lynx_wait_1): Add debug trace before adding
171 new thread.
172
037335a7
JB
1732012-12-17 Joel Brobecker <brobecker@adacore.com>
174
175 * lynx-low.c (ptrace_request_to_str): Add handling for
176 PTRACE_GETTRACESIG.
177
52d4cbd8
JB
1782012-12-17 Joel Brobecker <brobecker@adacore.com>
179
180 * lynx-low.c (lynx_attach): Delete variable new_process.
181
ab8f6ca9
JB
1822012-12-17 Joel Brobecker <brobecker@adacore.com>
183
184 * lynx-low.c (lynx_create_inferior): Delete variable
185 new_process.
186
78cbc024
JB
1872012-12-17 Joel Brobecker <brobecker@adacore.com>
188
189 * lynx-low.c (ptrace_request_to_str): Do not handle
190 PTRACE_GETTHREADLIST if this macro does not exist.
191
14a00470
YQ
1922012-12-15 Yao Qi <yao@codesourcery.com>
193
194 * Makefile.in (OBS): Add notif.o.
195 * notif.c, notif.h: New.
196 * server.c: Include "notif.h".
197 (struct vstop_notif) <next>: Remove.
198 <base>: New field.
199 (queue_stop_reply): Update.
200 (push_event, send_next_stop_reply): Remove.
201 (discard_queued_stop_replies): Update.
202 (notif_stop): New variable.
203 (handle_v_stopped): Remove.
204 (handle_v_requests): Don't call handle_v_stopped. Call
205 handle_ack_notif instead.
206 (queue_stop_reply_callback): Call notif_event_enque instead
207 of queue_stop_reply.
208 (handle_status): Don't call send_next_stop_reply, call
209 notif_write_event instead.
210 (kill_inferior_callback): Likewise.
211 (detach_or_kill_inferior_callback): Likewise.
212 (main): Call initialize_notif.
213 (process_serial_event): Call QUEUE_is_empty.
214 (handle_target_event): Call notif_push instead of push event.
215 * server.h (push_event): Remove declaration.
216
61c125b9
TT
2172012-12-10 Tom Tromey <tromey@redhat.com>
218
219 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
220 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
221 macros.
222 (.c.o): Rewrite.
223 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
224 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
225 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
226 (amd64-linux-ipa.o, ax.o): Rewrite.
227 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
228 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
229 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
230 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
231 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
232 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
233 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
234 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
235 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
236 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
237 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
238 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
239 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
240 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
241 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
242 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
243 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
244 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
245 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
246 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
247 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
248 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
249 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
250 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
251 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
252 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
253 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
254 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
255 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
256 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
257 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
258 (reg-tilegx.o): Remove.
259 (all_object_files): New macro.
260 Include .deps files.
261 * aclocal.m4, configure: Rebuild.
262 * acinclude.m4: Include depstand.m4, lead-dot.m4.
263 * configure.ac: Invoke ZW_CREATE_DEPDIR,
264 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
265
e90e9ad9
TT
2662012-12-05 Tom Tromey <tromey@redhat.com>
267
268 PR gdb/14917:
269 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
270
02d403bf 2712012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
272
273 * configure.ac: Check for linux/perf_event.h.
274 * config.in: Regenerated.
275 * configure: Regenerated.
276
0270a750
PA
2772012-11-26 Maxime Villard <rustyBSD@gmx.fr>
278
279 * hostio.c (handle_readlink): Decrease buffer size
280 parameter passed to readlink by one byte.
281
8c29b58e
YQ
2822012-11-26 Yao Qi <yao@codesourcery.com>
283
284 * configure.ac (build_warnings): Append '-Wempty-body'.
285 * configure: Regenerated.
286 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
287 body.
288
8bdce1ff
PM
2892012-11-15 Pierre Muller <muller@sourceware.org>
290
291 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
292 * config.in: Regenerate.
293 * configure: Regenerate.
294 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
295 Use "gdb_wait.h" header instead of <sys/wait.h> header.
296 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
297 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
298 header.
299 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
300 instead of <sys/wait.h> header.
301 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
302
02d403bf 3032012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
304
305 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
306 (various make rules): Remove -DGDBSERVER
307
fbd5db48
YQ
3082012-11-09 Yao Qi <yao@codesourcery.com>
309
310 * spu-low.c (current_ptid): Move it to ..
311 * gdbthread.h: ... here. New.
312 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
313 * server.c (myresume, process_serial_event): Likewise.
314 * thread-db.c (thread_db_find_new_threads): Likewise.
315 * tracepoint.c (run_inferior_command): Likewise.
316
b3dc46ff
AB
3172012-10-01 Andrew Burgess <aburgess@broadcom.com>
318
319 * server.c (handle_search_memory_1): Include access length in
320 warning message.
321
07c04788
HPN
3222012-09-05 Michael Brandt <michael.brandt@axis.com>
323
324 * linux-crisv32-low.c: Fix compile errors.
325
918d227b
YQ
3262012-09-04 Yao Qi <yao@codesourcery.com>
327
328 * tracepoint.c (cmd_qtsv): Adjust debug message.
329 Don't check CUR_TPOINT.
330
18c1b81a
YQ
3312012-08-28 Yao Qi <yao@codesourcery.com>
332
333 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
334 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
335 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
336 Remove declarations of xmalloc, xreallloc, xstrdup and
337 freeargv.
338 * Makefile.in (libiberty_h): New.
339 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
340 (linux-bfin-low.o): Append dependency 'libiberty.h'.
341
dc82f37b
YQ
3422012-08-23 Yao Qi <yao@codesourcery.com>
343
344 * server.h: Remove declaration of 'xsnprintf'.
345
406b1477
KS
3462012-08-22 Keith Seitz <keiths@redhat.com>
347
348 * server.h: Include build-gnulib-gbserver/config.h.
349 * gdbreplay.c: Likewise.
350
e6712ff1
DE
3512012-08-08 Doug Evans <dje@google.com>
352
353 * Makefile.in (SFILES): Add gdb_vecs.c.
354 (OBS): Add gdb_vecs.o.
355 (gdb_vecs_h, host_defs_h): New variables.
356 (thread-db.o): Add $(gdb_vecs_h) dependency.
357 (gdb_vecs.o): New rule.
358 * thread-db.c: #include "gdb_vecs.h".
359 (thread_db_load_search): Use a vector to iterate over path elements.
360 Handle text appearing after "$pdir".
361
362 * configure.ac: Add check for strstr.
363 * config.in: Regenerate.
364 * configure: Regenerate.
365
7c3270ae
UW
3662012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
367
368 * hostio.c (handle_pread): If pread fails, fall back to attempting
369 lseek/read.
370 (handle_pwrite): Likewise for pwrite.
371
b62e2b27
UW
3722012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
373
374 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
375 between unsupported TYPE and unimplementable ADDR/LEN combination.
376 (arm_insert_point): Act on new return value.
377
78a99e91
PA
3782012-07-31 Pedro Alves <palves@redhat.com>
379
380 * server.c (process_point_options): Only skip tokens if we find
381 one that is unrecognized. Don't treat 'X' specially while
382 skipping unrecognized tokens.
383
fcf303ab
UW
3842012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
385
386 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
387 to 4-byte-align HW breakpoint addresses for Thumb.
388
7255706c
YQ
3892012-07-27 Yao Qi <yao@codesourcery.com>
390
391 PR remote/14161.
392
393 * server.h: Declare gdb_agent_about_to_close.
394 * target.c (kill_inferior): Include "agent.h".
395 New. Send command 'kill'.
396 * target.h (kill_inferior): Removed macro.
397 * tracepoint.c (gdb_agent_about_to_close): New.
398 (gdb_agent_helper_thread): Handle command 'close'.
399 Wait endlessly until the inferior stops.
400 Install gdb_agent_remove_socket to atexit hook.
401 (agent_socket_name): New static variable.
402 (gdb_agent_socket_init): Replace local variable 'name' with
403 'agent_socket_name'.
404 (gdb_agent_remove_socket): New.
405
5a3f286f
YQ
4062012-07-27 Yao Qi <yao@codesourcery.com>
407
408 * server.c (process_point_options): Stop at 'X' when parsing.
409
961bd387
ME
4102012-07-19 Michael Eager <eager@eagercon.com>
411
412 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
413 to hw_execute.
414 * linux-x86-low.c (x86_insert_point, x86_remove_point):
415 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
416 hardware breakpoint.
417
aa7c7447
JK
4182012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
419
420 * gdbserver/linux-low.c (initialize_low): Call
421 linux_ptrace_init_warnings.
422
7f216e7c
DE
4232012-07-02 Doug Evans <dje@google.com>
424
425 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
426 pointer to int.
427
d3ce09f5
SS
4282012-07-02 Stan Shebs <stan@codesourcery.com>
429
430 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
431 (ax.o): Add it to build rule.
432 (ax-ipa.o): Ditto.
433 (OBS): Add format.o.
434 (IPA_OBS): Add format.o.
435 * server.c (handle_query): Claim support for breakpoint commands.
436 (process_point_options): Add command case.
437 (process_serial_event): Leave running if there are printfs in
438 effect.
439 * mem-break.h (any_persistent_commands): Declare.
440 (add_breakpoint_commands): Declare.
441 (gdb_no_commands_at_breakpoint): Declare.
442 (run_breakpoint_commands): Declare.
443 * mem-break.c (struct point_command_list): New struct.
444 (struct breakpoint): New field command_list.
445 (any_persistent_commands): New function.
446 (add_commands_to_breakpoint): New function.
447 (add_breakpoint_commands): New function.
448 (gdb_no_commands_at_breakpoint): New function.
449 (run_breakpoint_commands): New function.
450 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
451 locally.
452 * ax.c: Include format.h.
453 (ax_printf): New function.
454 (gdb_eval_agent_expr): Add printf opcode.
455
2f8f6aed
YQ
4562012-06-13 Yao Qi <yao@codesourcery.com>
457
458 * server.c (start_inferior): Remove duplicated writes to fields
459 'last_resume_kind' and 'last_status' of 'current_inferior'.
460
0c9070b3
YQ
4612012-06-12 Yao Qi <yao@codesourcery.com>
462 Pedro Alves <palves@redhat.com>
463
464 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
465 comment.
466 * server.c (handle_v_cont): Extend comment.
467
c52daf70
YQ
4682012-06-11 Yao Qi <yao@codesourcery.com>
469
470 * linux-low.c (linux_attach): Add 'static'.
471
d38bbb0a
YQ
4722012-06-06 Yao Qi <yao@codesourcery.com>
473
474 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
475
89dc0afd
JK
4762012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
477
478 Fix gcc -flto compilation warning.
479 * server.c (main): Make variable multi_mode and attach volatile.
480
75f62ce7
TJB
4812012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
482
483 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
484 if the platform doesn't know about it.
485
65f479b6
PA
4862012-05-30 Jeff Kenton <jkenton@tilera.com>
487
488 * Makefile.in (SFILES): Add linux-tile-low.c.
489 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
490 * configure.srv: Handle tilegx-*-linux*.
491 * linux-tile-low.c: New file.
492
0c5bf5a9
JK
4932012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
494
495 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
496
a493e3e2
PA
4972012-05-24 Pedro Alves <palves@redhat.com>
498
499 PR gdb/7205
500
43aaf8b6 501 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 502
2ea28649
PA
5032012-05-24 Pedro Alves <palves@redhat.com>
504
505 PR gdb/7205
506
507 Replace target_signal with gdb_signal throughout.
508
8d409d16
MR
5092012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
510
511 * linux-low.c (linux_store_registers): Avoid the copying sequence
512 when no data has been retrieved by ptrace.
513
23512c01
MGD
5142012-05-22 Will Deacon <will.deacon@arm.com>
515
516 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
517 Include asm/ptrace.h.
518 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
519 already defined.
520
4934b29e
MR
5212012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
522
523 * linux-low.c (linux_store_registers): Don't re-retrieve data
524 with ptrace that has already been obtained from /proc. Always
525 copy any data retrieved with ptrace to the buffer supplied.
526
bde24c0a
PA
5272012-05-11 Yao Qi <yao@codesourcery.com>
528 Pedro Alves <palves@redhat.com>
529
530 * linux-low.c (enum stopping_threads_kind): New.
531 (stopping_threads): Change type to `enum stopping_threads_kind'.
532 (handle_extended_wait): If stopping and suspending threads, leave
533 the new_lwp suspended too.
534 (linux_wait_for_event): Adjust.
535 (stop_all_lwps): Set `stopping_threads' to
536 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
537 whether we're suspending threads or just stopping them. Assert no
538 recursion happens.
539
623b6bdf
YQ
5402012-04-29 Yao Qi <yao@codesourcery.com>
541
542 * server.h: Move some code to ...
543 * gdbthread.h: ... here. New.
544 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
545 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
546 (nto-low.o, win32-low.o): Likewise.
547 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
548 * regcache.c, remote-utils.c, server.c: Likewise.
549 * target.c, tracepoint.c, win32-low.c: Likewise.
550
f15f9948
TJB
5512012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
552
553 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
554 (PTRACE_ARG4_TYPE): Likewise.
555 (PTRACE_XFER_TYPE): Likewise.
556 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
557 ptrace to PTRACE_ARG3_TYPE.
558 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
559 (PTRACE_ARG4_TYPE): Likewise.
560 (PTRACE_XFER_TYPE): Likewise.
561 (linux_detach_one_lwp): Cast fourth argument of
562 ptrace to long then PTRACE_ARG4_TYPE.
563 (regsets_fetch_inferior_registers): Cast third argument of
564 ptrace to long then PTRACE_ARG3_TYPE.
565 (regsets_store_inferior_registers): Likewise.
566
38ea300a
PA
5672012-04-20 Pedro Alves <palves@redhat.com>
568
569 * configure: Regenerate.
570
c971b7fa
PA
5712012-04-19 Pedro Alves <palves@redhat.com>
572
43aaf8b6 573 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 574 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
575 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
576 (all, install-only, uninstall, clean-info, all-lib, clean): No
577 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
578 (maintainer-clean realclean distclean): Use subdir_do.
579 (subdir_do): New.
580 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 581 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
582 * acinclude.m4: Include acx_configure_dir.m4.
583 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
584 calls. Call AC_PROG_RANLIB. Configure gnulib using
585 ACX_CONFIGURE_DIR.
586 (GNULIB): New.
587 (GNULIB_STDINT_H): Adjust.
588 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
589 * gdbreplay.c: Include build-gnulib/config.h.
590 * server.h: Likewise.
591 * aclocal.m4: Regenerate.
592 * config.in: Regenerate.
593 * configure: Regenerate.
c971b7fa 594
809277f8
PA
5952012-04-19 Pedro Alves <palves@redhat.com>
596
597 * Makefile.in (LIBGNU, INCGNU): Adjust.
598 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
599 (all, install-only, uninstall, clean-info, all-lib, clean)
600 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
601 * configure.ac: Adjust AC_OUTPUT output.
602 * aclocal.m4: Regenerate.
603 * configure: Regenerate.
604
fd9bb8b8
PA
6052012-04-19 Pedro Alves <palves@redhat.com>
606
607 * Makefile.in (generated_files): New.
608 (server_h): Remove the explicit dependency on config.h, and depend
609 on $generated_files.
610
1c298c66
PA
6112012-04-19 Pedro Alves <palves@redhat.com>
612
613 * Makefile.in (INCGNU): Add -Ignulib.
614
57c4b50b
PA
6152012-04-19 Pedro Alves <palves@redhat.com>
616
617 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
618 (INCGNU): ... this, and spell out -I here.
619 (GNULIB_LIB): Rename to ...
620 (LIBGNU): ... this.
621 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
622
1030e047
PA
6232012-04-19 Pedro Alves <palves@redhat.com>
624
625 * config.in: Regenerate.
626
447d4319
PA
6272012-04-19 Pedro Alves <palves@redhat.com>
628
629 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
630 * server.h (memmem): Remove declaration.
631 * config.in: Regenerate.
632 * configure: Regenerate.
633
aad9eab9
YQ
6342012-04-19 Yao Qi <yao@codesourcery.com>
635
636 * Makefile.in (SFILES): Add common/vec.c.
637 (OBS): Add vec.o.
638 (vec.o): New rule.
639
3e10640f
YQ
6402012-04-19 Yao Qi <yao@codesourcery.com>
641
642 * remote-utils.c (prepare_resume_reply): Replace with macro
643 target_core_of_thread.
644 * server.c (handle_qxfer_threads_proper): Likewise.
645 * target.h (traget_core_of_thread): New macro.
646
71622373
PA
6472012-04-18 Pedro Alves <palves@redhat.com>
648
649 * aclocal.m4: Regenerate.
650 * configure: Regenerate.
651
80d26939
YQ
6522012-04-16 Yao Qi <yao@codesourcery.com>
653
654 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
655 duplicated on address.
656
42476b70
YQ
6572012-04-16 Yao Qi <yao@codesourcery.com>
658
659 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
660 (struct tracepoint_action_ops) <send>: New field.
661 (m_tracepoint_action_send, r_tracepoint_action_send): New.
662 (agent_expr_send, x_tracepoint_action_send): New.
663 (l_tracepoint_action_send): New.
664 (cmd_qtdp): Download and install tracepoint
665 according to `use_agent'.
666 (run_inferior_command): Add one more parameter `len'.
667 Update callers.
668 (tracepoint_send_agent): New.
669 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
670
7bc83639
YQ
6712012-04-16 Yao Qi <yao@codesourcery.com>
672
673 * tracepoint.c (download_tracepoints): Moved to ...
674 (cmd_qtstart): ... here.
675
5f18041e
YQ
6762012-04-14 Yao Qi <yao@codesourcery.com>
677
678 * tracepoint.c: Include inttypes.h.
679 (struct collect_memory_action): Use sized types.
680 (struct tracepoint): Likewise.
681 (cmd_qtdp, stop_tracing): Update print specifiers.
682 (cmd_qtp, response_tracepoint): Likewise.
683 (collect_data_at_tracepoint): Likewise.
684 (collect_data_at_step): Likewise.
685
55a8c076
YQ
6862012-04-14 Yao Qi <yao@codesourcery.com>
687
688 Import gnulib module inttypes.
689 * aclocal.m4, config.in, configure: Regenerated.
690
dc750257
YQ
6912012-04-14 Yao Qi <yao@codesourcery.com>
692
693 * Makefile.in (maintainer-clean, realclean, distclean): Remove
694 Makefile and config.status at last.
695
0ab5faf9
YQ
6962012-04-13 Yao Qi <yao@codesourcery.com>
697
698 * tracepoint.c: Include stdint.h unconditionally.
699
18f5fd81
TJB
7002012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
701
702 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
703 on BFD_HAVE_SYS_PROCFS_TYPE.
704 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
705 * configure: Regenerate.
706 * config.in: Likewise.
707
4d47af5c
L
7082012-04-13 H.J. Lu <hongjiu.lu@intel.com>
709
710 * Makefile.in (clean): Also remove x32.c x32-linux.c
711 x32-avx.c x32-avx-linux.c.
712 (x32.o): New target.
713 (x32.c): Likewise.
714 (x32-linux.o): Likewise.
715 (x32-linux.c): Likewise.
716 (x32-avx.o): Likewise.
717 (x32-avx.c): Likewise.
718 (x32-avx-linux.o): Likewise.
719 (x32-avx-linux.c): Likewise.
720
721 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
722 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
723 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
724 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
725 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
726 i386/x32-avx-linux.xml.
727
728 * linux-x86-low.c (init_registers_x32_linux): New prototype.
729 (init_registers_x32_avx_linux): Likwise.
730 (x86_linux_update_xmltarget): Call init_registers_x32_linux
731 or init_registers_x32_avx_linux if linux_is_elf64 is false.
732
ecedbe58
PA
7332012-04-13 Pedro Alves <palves@redhat.com>
734
735 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
736 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
737 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
738 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
739 the sub-make.
740
c92b5177
L
7412012-04-12 H.J. Lu <hongjiu.lu@intel.com>
742
743 * linux-x86-low.c (compat_x32_clock_t): New.
744 (compat_x32_siginfo_t): Likewise.
745 (compat_x32_siginfo_from_siginfo): Likewise.
746 (siginfo_from_compat_x32_siginfo): Likewise.
747 (linux_is_elf64): Likewise.
748 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
749 and siginfo_from_compat_x32_siginfo for x32.
750 (x86_arch_setup): Set linux_is_elf64.
751
214d508e
L
7522012-04-12 H.J. Lu <hongjiu.lu@intel.com>
753
754 PR gdb/13969
755 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
756 e_machine field.
757 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
758 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
759 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
760 compatible with process.
761
c9a1864a
YQ
7622012-04-12 Yao Qi <yao@codesourcery.com>
763
764 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
765 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
766 (install-only, install-info, clean): Handle sub dir gnulib.
767 (all-lib, am--refresh): New targets.
768 (memmem.o): Remove target.
769 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
770 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
771 (AC_REPLACE_FUNCS): Remove memmem.
772 Invoke gl_INIT and AM_INIT_AUTOMAKE.
773 (AC_OUTPUT): Generate Makefile in gnulib/.
774 * aclocal.m4, config.in, configure: Regenerated.
775
367ba2c2
MR
7762012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
777
778 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
779
9d236627
PA
7802012-04-05 Pedro Alves <palves@redhat.com>
781
782 -Werror=strict-aliasing
783
784 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
785 pointer.
786
111217b3
PA
7872012-04-04 Pedro Alves <palves@redhat.com>
788
789 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
790 (sparc_store_gregset_from_stack, sparc_store_gregset)
791 (sparc_breakpoint_at): Fix formatting.
792
8365dcf5
TJB
7932012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
794
795 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
796 are available.
797 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
798 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
799 * config.in: Regenerate.
800 * configure: Likewise.
801
689cc2ae
PA
8022012-03-29 Pedro Alves <palves@redhat.com>
803
804 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
805 Correct ptrace arguments.
806
c14dfd32
PA
8072012-03-28 Pedro Alves <palves@redhat.com>
808
809 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
810 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
811 (IA64_FR1_REGNUM): New defines.
812 (ia64_fetch_register): New.
813 (the_low_target): Install it.
814 * linux-low.h (struct linux_target_ops) <fetch_register>: New
815 field.
816 * linux-low.c (linux_fetch_registers): Try the
817 the_low_target.fetch_register hook first.
818
819 * linux-arm-low.c (the_low_target): Adjust.
820 * linux-bfin-low.c (the_low_target): Adjust.
821 * linux-cris-low.c (the_low_target): Adjust.
822 * linux-crisv32-low.c (the_low_target): Adjust.
823 * linux-m32r-low.c (the_low_target): Adjust.
824 * linux-m68k-low.c (the_low_target): Adjust.
825 * linux-mips-low.c (the_low_target): Adjust.
826 * linux-ppc-low.c (the_low_target): Adjust.
827 * linux-s390-low.c (the_low_target): Adjust.
828 * linux-sh-low.c (the_low_target): Adjust.
829 * linux-sparc-low.c (the_low_target): Adjust.
830 * linux-tic6x-low.c (the_low_target): Adjust.
831 * linux-x86-low.c (the_low_target): Adjust.
832 * linux-xtensa-low.c (the_low_target): Adjust.
833
63c88e13
PA
8342012-03-26 Pedro Alves <palves@redhat.com>
835
836 * server.c (handle_qxfer_libraries): Don't bail early if
837 the_target->qxfer_libraries_svr4 is not NULL.
838
fb723180
PA
8392012-03-26 Pedro Alves <palves@redhat.com>
840
841 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
842
0afae3cf
PA
8432012-03-23 Pedro Alves <palves@redhat.com>
844
845 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
846 "library-list-svr4" element's start tag when the the DSO list is
847 empty.
848
485f1ee4
PA
8492012-03-23 Pedro Alves <palves@redhat.com>
850
851 * linux-low.c (read_one_ptr): Read the inferior's pointer through
852 a variable whose type size is the same as the inferior's pointer
853 size.
854
a5362b9a
TS
8552012-03-21 Thomas Schwinge <thomas@codesourcery.com>
856
857 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
858 struct siginfo.
859 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
860 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
861 * linux-low.h: Include <signal.h>.
862 (struct siginfo): Remove forward declaration.
863 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
864 struct siginfo.
865
d226c142
MF
8662012-03-21 Mike Frysinger <vapier@gentoo.org>
867
868 * .gitignore: Ignore more files.
869
122f36ef
PA
8702012-03-19 Pedro Alves <palves@redhat.com>
871 Jan Kratochvil <jan.kratochvil@redhat.com>
872
873 * server.c (cont_thread, general_thread): Add describing comments.
874 (start_inferior): Clear `cont_thread'.
875 (handle_v_cont): Don't set `cont_thread' if resuming all threads
876 of a process.
877
fc3e5175
YQ
8782012-03-15 Yao Qi <yao@codesourcery.com>
879
880 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
881 handling to ...
882 (cmd_qtdp): ... here.
883
8d0d92cd
YQ
8842012-03-15 Yao Qi <yao@codesourcery.com>
885
886 * tracepoint.c (struct tracepoint_action_ops): New.
887 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
888 (m_tracepoint_action_download): New.
889 (r_tracepoint_action_download): New.
890 (x_tracepoint_action_download): New.
891 (l_tracepoint_action_download): New.
892 (add_tracepoint_action): Install `action->ops' according type.
893 (download_tracepoint_1): Move code `download' function pointer
894 of various tracepoint_action_ops.
895
87b0bb13
JK
8962012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
897
898 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
899 linux_ptrace_attach_warnings.
900
5f572dec
JK
9012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
902
903 * Makefile.in (linux-ptrace.o): New.
904 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
905 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
906 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
907 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
908 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
909 of these targets.
910 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
911
f4647387
YQ
9122012-03-08 Yao Qi <yao@codesourcery.com>
913 Pedro Alves <palves@redhat.com>
914
915 Fix PR server/13392.
916 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
917 offset of JMP insn.
918 * tracepoint.c (remove_tracepoint): New.
919 (cmd_qtdp): Call remove_tracepoint when failed to install.
920
9b224c5e
PA
9212012-03-07 Pedro Alves <palves@redhat.com>
922
923 * linux-low.c (get_detach_signal): New.
924 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
925 Pass on pending signals to PTRACE_DETACH. Check the result of the
926 ptrace call.
927 * server.c (program_signals, program_signals_p): New.
928 (handle_general_set): Handle QProgramSignals.
929 * server.h (program_signals, program_signals_p): Declare.
930
e237a7e2
JK
9312012-03-05 Pedro Alves <palves@redhat.com>
932 Jan Kratochvil <jan.kratochvil@redhat.com>
933
934 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
935 New comment why.
936
5808517f
YQ
9372012-03-03 Yao Qi <yao@codesourcery.com>
938
939 * tracepoint.c (tracepoint_look_up_symbols): Update call to
940 agent_look_up_symbols.
941
58b4daa5
YQ
9422012-03-03 Yao Qi <yao@codesourcery.com>
943
944 * Makefile.in (linux-low.o): Keep dependence on agent.h.
945 (linux-x86-low.o): Likewise.
946 * server.h: Remove in_process_agent_loaded.
947 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
948 common/agent.c.
949 Update callers.
950
8ffcbaaf
YQ
9512012-03-03 Yao Qi <yao@codesourcery.com>
952
953 * tracepoint.c (gdb_agent_capability): New global.
954 (in_process_agent_loaded_ust): Renamed to
955 `in_process_agent_supports_ust'.
956 Update callers.
957 (in_process_agent_supports_ust): Call agent_capability_check.
958 (clear_installed_tracepoints): Assert that agent supports
959 agent.
960
d1feda86
YQ
9612012-03-03 Yao Qi <yao@codesourcery.com>
962
963 * linux-low.c (linux_supports_agent): New.
964 (linux_target_ops): Initialize field `supports_agent' with
965 linux_supports_agent.
966 * target.h (struct target_ops) <supports_agent>: New.
967 (target_supports_agent): New macro.
968 * server.c (handle_general_set): Handle packet 'QAgent'.
969 (handle_query): Send `QAgent+'.
970 * Makefile.in (server.o): Depends on agent.h.
971
2fa291ac
YQ
9722012-03-03 Yao Qi <yao@codesourcery.com>
973
974 * Makefile.in (OBS): Add agent.o.
975 Add new rule for agent.o.
976 Track dependence of tracepoint.c on agent.h.
977 * tracepoint.c (run_inferior_command_1):
978 (run_inferior_command): Call agent_run_command.
979 (gdb_ust_connect_sync_socket): Deleted. Move it to
980 common/agent.c.
981 (resume_thread, stop_thread): Likewise.
982 (gdb_ust_socket_init): Renamed to ...
983 (gdb_agent_socket_init): ... New.
984 (gdb_ust_thread): Renamed to ...
985 (gdb_agent_helper_thread): ... New.
986 (gdb_ust_init): Move some code to ...
987 (gdb_agent_init): ... here. New.
988 [HAVE_UST]: Call gdb_ust_init.
989 (initialize_tracepoint_ftlib): Call gdb_agent_init.
990 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
991 * config.in, configure: Regenerated.
992
05044653
PA
9932012-03-02 Pedro Alves <palves@redhat.com>
994
995 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
996 * linux-low.c (struct simple_pid_list): New.
997 (stopped_pids): New a struct simple_pid_list pointer.
998 (add_to_pid_list, pull_pid_from_list): New.
999 (handle_extended_wait): Don't assume the first signal new children
1000 report is SIGSTOP. Adjust call to pull_pid_from_list.
1001 (linux_wait_for_lwp): Adjust.
1002
8d00225b
YQ
10032012-03-02 Yao Qi <yao@codesourcery.com>
1004
1005 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1006 debug log.
1007
19560ba5
YQ
10082012-03-02 Yao Qi <yao@codesourcery.com>
1009
1010 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1011 `stop_pc' and `tpoint'. Update caller.
1012
1faeff08
MR
10132012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1014
1015 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1016 * linux-low.c (use_linux_regsets): New macro.
1017 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1018 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1019 (linux_register_in_regsets): New function.
1020 (usr_fetch_inferior_registers): Skip registers covered by
1021 regsets.
1022 (usr_store_inferior_registers): Likewise.
1023 (usr_fetch_inferior_registers): New macro.
1024 (usr_store_inferior_registers): Likewise.
1025 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1026 (linux_store_registers): Likewise.
1027 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1028 prototype.
1029 (init_registers_mips64_dsp_linux): Likewise.
1030 (init_registers_mips_linux): New macro.
1031 (init_registers_mips_dsp_linux): Likewise.
1032 (mips_dsp_num_regs): Likewise.
1033 (DSP_BASE, DSP_CONTROL): New fallback macros.
1034 (mips_base_regs): New macro.
1035 (mips_regmap): Use it. Fix the size.
1036 (mips_dsp_regmap): New variable.
1037 (mips_dsp_regset_bitmap): Likewise.
1038 (mips_arch_setup): New function.
1039 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1040 than mips_regmap.
1041 (mips_cannot_store_register): Likewise.
1042 (the_low_target): Update .arch_setup, .num_regs and .regmap
1043 initializers. Add .regset_bitmap initializer.
1044 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1045 initializer.
1046 * linux-bfin-low.c (the_low_target): Likewise.
1047 * linux-cris-low.c (the_low_target): Likewise.
1048 * linux-crisv32-low.c (the_low_target): Likewise.
1049 * linux-ia64-low.c (the_low_target): Likewise.
1050 * linux-m32r-low.c (the_low_target): Likewise.
1051 * linux-m68k-low.c (the_low_target): Likewise.
1052 * linux-ppc-low.c (the_low_target): Likewise.
1053 * linux-s390-low.c (the_low_target): Likewise.
1054 * linux-sh-low.c (the_low_target): Likewise.
1055 * linux-sparc-low.c (the_low_target): Likewise.
1056 * linux-tic6x-low.c (the_low_target): Likewise.
1057 * linux-x86-low.c (the_low_target): Likewise.
1058 * linux-xtensa-low.c (the_low_target): Likewise.
1059 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1060 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1061 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1062 srv_xmlfiles.
1063 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1064 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1065
c03e6ccc
YQ
10662012-02-29 Yao Qi <yao@codesourcery.com>
1067 Pedro Alves <palves@redhat.com>
1068
1069 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1070 `step_over_finished' is true.
1071
644cebc9
PA
10722012-02-27 Pedro Alves <palves@redhat.com>
1073
1074 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1075 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1076
c14d7ab2
PA
10772012-02-27 Pedro Alves <palves@redhat.com>
1078
1079 PR server/9684
1080 * linux-low.c (pid_is_stopped): New.
1081 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1082
412c89dd
LM
10832012-02-25 Luis Machado <lgustavo@codesourcery.com>
1084
1085 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1086 of conditions.
1087
b745defe
MR
10882012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1089
1090 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1091
9f3a5c85
LM
10922012-02-24 Luis Machado <lgustavo@codesourcery>
1093
1094 * server.c (handle_query): Advertise support for target-side
1095 breakpoint condition evaluation.
1096 (process_point_options): New function.
1097 (process_serial_event): When inserting a breakpoint, check for
1098 a target-side condition that should be evaluated.
1099
1100 * mem-break.c: Include regcache.h and ax.h.
1101 (point_cond_list_t): New data structure.
1102 (breakpoint) <cond_list>: New field.
1103 (find_gdb_breakpoint_at): Make non-static.
1104 (delete_gdb_breakpoint_at): Clear any target-side
1105 conditions.
1106 (clear_gdb_breakpoint_conditions): New function.
1107 (add_condition_to_breakpoint): Likewise.
1108 (add_breakpoint_condition): Likewise.
1109 (gdb_condition_true_at_breakpoint): Likewise.
1110 (gdb_breakpoint_here): Return result directly instead
1111 of going through a local variable.
1112
1113 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1114 (clear_gdb_breakpoint_conditions): Likewise.
1115 (add_breakpoint_condition): Likewise.
1116 (gdb_condition_true_at_breakpoint): Likewise.
1117
1118 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1119 (need_step_over_p): Take target-side breakpoint condition into
1120 consideration.
1121
5e1dc496
LM
11222012-02-24 Luis Machado <lgustavo@codesourcery>
1123
1124 * server.h: Include tracepoint.h.
1125 (agent_mem_read, agent_get_trace_state_variable_value,
1126 agent_set_trace_state_variable_value,
1127 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1128 get_set_tsv_func_addr): New prototypes.
1129
1130 * ax.h: New include file.
1131 * ax.c: New source file.
1132
1133 * tracepoint.c: Include ax.h.
1134 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1135 agent_expr, eval_result_type): Move to ax.h.
1136 (parse_agent_expr): Rename to ...
1137 (gdb_parse_agent_expr): ... this, make it non-static and move
1138 to ax.h.
1139 (unparse_agent_expr) Rename to ...
1140 (gdb_unparse_agent_expr): ... this, make it non-static and move
1141 to ax.h.
1142 (eval_agent_expr): Rename to ...
1143 (eval_tracepoint_agent_expr): ... this.
1144 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1145 forward declarations.
1146 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1147 (agent_get_trace_state_variable_value): New function.
1148 (agent_set_trace_state_variable_value): New function.
1149 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1150 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1151 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1152 (condition_true_at_tracepoint): Likewise.
1153 (parse_agent_expr): Rename to ...
1154 (gdb_parse_agent_expr): ... this and move to ax.c.
1155 (unparse_agent_expr): Rename to ...
1156 (gdb_unparse_agent_expr): ... this and move to ax.c.
1157 (gdb_agent_op_name): Move to ax.c.
1158 (eval_agent_expr): Rename to ...
1159 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1160 and move to ax.c.
1161 (eval_tracepoint_agent_expr): New function.
1162 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 1163 non-static.
5e1dc496
LM
1164 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1165 ax.c.
1166 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1167 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1168 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1169 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1170 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1171 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1172 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1173 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1174 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1175 (compile_bytecodes): Remove forward declaration.
1176 (is_goto_target): Move to ax.c.
1177 (compile_bytecodes): Move to ax.c and call
1178 agent_get_trace_state_variable_value (...) and
1179 agent_set_trace_state_variable_value (...).
1180
1181 * Makefile.in: Update ax.c and IPA dependencies.
1182
277e4e52
PA
11832012-02-24 Pedro Alves <palves@redhat.com>
1184
1185 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1186 (cmd_bigqtbuffer_circular): ... this. Only handle
1187 'QTBuffer:circular:'.
1188 (handle_tracepoint_general_set): Adjust.
1189
bf4c19f7
YQ
11902012-02-16 Yao Qi <yao@codesourcery.com>
1191
1192 * inferiors.c: Move code to ...
1193 * dll.c: .... here. New.
1194 * server.h: Declare clear_dlls.
1195 * Makefile.in (SFILES): Add dll.c.
1196 (OBS): Add dll.o
1197 (dll.o): New rule.
1198
d73f2619
YQ
11992012-02-11 Yao Qi <yao@codesourcery.com>
1200
1201 * server.c: (handle_monitor_command): Add a new parameter
1202 `own_buf'.
1203 (handle_query): Update caller.
1204
f8255c2a
JB
12052012-02-09 Joel Brobecker <brobecker@adacore.com>
1206
1207 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1208 * configure, config.in: Regenerate.
1209 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1210 is not defined.
1211
da84f473
PA
12122012-02-02 Pedro Alves <palves@redhat.com>
1213
1214 Try SIGKILL first, then PTRACE_KILL.
1215 * linux-low.c (linux_kill_one_lwp): New.
1216 (linux_kill_one_lwp): Rename to ...
1217 (kill_one_lwp_callback): ... this. Use the new
1218 linux_kill_one_lwp.
1219
e886a173
PA
12202012-02-02 Pedro Alves <palves@redhat.com>
1221
1222 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1223 inferior.
1224
be07f1a2
PA
12252012-01-27 Pedro Alves <palves@redhat.com>
1226
1227 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1228 (elf_64_file_p): Make static.
1229 (linux_pid_exe_is_elf_64_file): New.
1230 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1231 Delete declarations.
1232 (linux_pid_exe_is_elf_64_file): Declare.
1233 * linux-x86-low.c (x86_arch_setup): Use
1234 linux_pid_exe_is_elf_64_file.
1235
d8301ad1
JK
12362012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1237
1238 * linux-low.c (linux_wait_for_event_1): Rename to ...
1239 (linux_wait_for_event): ... here and merge it with former
1240 linux_wait_for_event - new variable wait_ptid, use it.
1241 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1242
01b17894
PA
12432012-01-23 Pedro Alves <palves@redhat.com>
1244
1245 * server.c (main): Avoid yet another case of infinite loop while
1246 detaching/killing after a longjmp.
1247
e825046f
JK
12482012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1249
1250 Code cleanup.
1251 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1252
b9e7b9c3
UW
12532012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1254
1255 * hostio.c (handle_readlink): New function.
1256 (handle_vFile): Call it to handle "vFile:readlink" packets.
1257
901f9912
UW
12582012-01-20 Pedro Alves <palves@redhat.com>
1259 Ulrich Weigand <ulrich.weigand@linaro.org>
1260
1261 * server.c (handle_v_requests): Only support vAttach and vRun to
1262 start multiple processes when in extended protocol mode.
1263
fc1ab1a0
PA
12642012-01-17 Pedro Alves <palves@redhat.com>
1265
1266 * tracepoint.c (initialize_tracepoint): Use mmap instead of
1267 memalign plus mprotect to allocate the scratch buffer.
1268
7d5d4e98
PA
12692012-01-13 Pedro Alves <palves@redhat.com>
1270
1271 * server.c (attach_inferior): Clear `cont_thread'.
1272
f128d5e9
PA
12732012-01-13 Pedro Alves <palves@redhat.com>
1274
1275 * server.c (main): Avoid infinite loop while detaching/killing
1276 after a longjmp.
1277
06db92f0
DE
12782012-01-09 Doug Evans <dje@google.com>
1279
1280 * server.c (start_inferior): Set last_ptid in --wrapper case.
1281
32d92999
YQ
12822012-01-06 Yao Qi <yao@codesourcery.com>
1283
1284 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1285 defined.
1286 [IN_PROCESS_AGENT] (debug_agent): New global variable.
1287
5e0a92a9
YQ
12882012-01-04 Yao Qi <yao@codesourcery.com>
1289
1290 * tracepoint.c (cmd_qtdp): Print debug message
1291 for static tracepoint.
1292
ae639e8c
YQ
12932012-01-04 Yao Qi <yao@codesourcery.com>
1294
1295 * tracepoint.c (trace_vdebug): Differentiate debug message
1296 between gdbserver and IPA.
1297
f72429c5
YQ
12982012-01-03 Yao Qi <yao@codesourcery.com>
1299
1300 * tracepoint.c (tracepoint_was_hit): Don't collect for
1301 static tracepoint.
1302
12c3e59c
JB
13032012-01-02 Joel Brobecker <brobecker@adacore.com>
1304
1305 * terminal.h: Reformat copyright header.
1306
67827812
JB
13072012-01-02 Joel Brobecker <brobecker@adacore.com>
1308
1309 * server.c (gdbserver_version): Update copyright year.
1310 * gdbreplay.c (gdbreplay_version): Likewise.
1311
3e52c33d
JK
13122011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1313
1314 * linux-low.c (linux_create_inferior): Put empty if clause for write.
1315
1316 Revert:
1317 2011-12-18 Hui Zhu <teawater@gmail.com>
1318 * linux-low.c (linux_create_inferior): Save return value to ret.
1319
66f1260e
HZ
13202011-12-18 Hui Zhu <teawater@gmail.com>
1321
1322 * linux-low.c (linux_create_inferior): Save return value to ret.
1323
e77616d7
DE
13242011-12-16 Doug Evans <dje@google.com>
1325
e7b06c57
DE
1326 * linux-low.c (linux_create_inferior): If stdio connection,
1327 redirect stdin from /dev/null, stdout to stderr.
1328 * remote-utils.c (remote_is_stdio): New static global.
1329 (remote_connection_is_stdio): New function.
1330 (remote_prepare): Handle stdio connection.
1331 (remote_open): Ditto.
1332 (remote_close): Don't close stdin for stdio connections.
1333 (read_prim,write_prim): New functions. Replace all calls to
1334 read/write to these.
1335 * server.c (main): Watch for "-" argument. Move call to
1336 remote_prepare before start_inferior.
1337 * server.h (STDIO_CONNECTION_NAME): New macro.
1338 (remote_connection_is_stdio): Declare.
1339
e77616d7
DE
1340 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
1341 in debugging output.
1342
82067193
YQ
13432011-12-15 Yao Qi <yao@codesourcery.com>
1344
1345 * tracepoint.c: Include sys/syscall.h.
1346 (gdb_ust_thread): Remove preprocessor conditional.
1347
82bfbe7e
PA
13482011-12-14 Pedro Alves <pedro@codesourcery.com>
1349
1350 * linux-low.c (linux_detach_one_lwp): Call
1351 the_low_target.prepare_to_resume before detaching.
1352
712c6575
YQ
13532011-12-14 Yao Qi <yao@codesourcery.com>
1354
1355 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1356 of write.
1357
d54d1edf
YQ
13582011-12-14 Yao Qi <yao@codesourcery.com>
1359
1360 * i386-low.c (i386_low_stopped_data_address): Initialize local
1361 variable `control'.
1362
6210a125
PA
13632011-12-13 Pedro Alves <pedro@codesourcery.com>
1364
1365 PR remote/13492
1366
1367 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1368 DR_CONTROL unless necessary. Extend comments.
1369 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1370 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1371
2ece8244
YQ
13722011-12-13 Yao Qi <yao@codesourcery.com>
1373
1374 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1375 macros.
1376 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1377
784867a5
JK
13782011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1379
1380 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1381 Print new debug message for such case.
1382
6bf36717
JK
13832011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1384
1385 Fix overlapping memcpy.
1386 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1387 the read_inferior_memory transfer.
1388 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1389 write_inferior_memory transfer.
1390 (set_fast_tracepoint_jump): New variable buf. Use it for the
1391 read_inferior_memory and write_inferior_memory transfers.
1392 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1393 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1394 Use it for the write_inferior_memory transfer.
1395 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1396 buffers.
1397
50275556
MR
13982011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1399
1400 * linux-low.c (fetch_register, store_register): Make code
1401 consistent, fix formatting.
1402
7325beb4
MR
14032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1404
1405 * linux-low.c (usr_store_inferior_registers): Factor out code
1406 to handle individual registers into...
1407 (store_register): ... this new function.
1408
c642a434
UW
14092011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1410
1411 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1412 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1413 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1414 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1415 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1416 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1417 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1418 (srv_xmlfiles): Add new XML files.
1419
1420 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1421 and <sys/uio.h>.
1422 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1423 (init_registers_s390_linux32v1): Add prototype.
1424 (init_registers_s390_linux32v2): Likewise.
1425 (init_registers_s390_linux64v1): Likewise.
1426 (init_registers_s390_linux64v2): Likewise.
1427 (init_registers_s390x_linux64v1): Likewise.
1428 (init_registers_s390x_linux64v2): Likewise.
1429 (s390_num_regs): Increment to 52.
1430 (s390_regmap): Add orig_r2 register.
1431 (s390_num_regs_3264): Increment to 68.
1432 (s390_regmap_3264): Add orig_r2 register.
1433 (s390_collect_ptrace_register): Handle orig_r2 register.
1434 (s390_supply_ptrace_register): Likewise.
1435 (s390_fill_last_break): New function.
1436 (s390_store_last_break): Likewise.
1437 (s390_fill_system_call): New function.
1438 (s390_store_system_call): Likewise.
1439 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1440 register sets.
1441 (s390_check_regset): New function.
1442 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1443 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1444 Update target_regsets for available register sets.
1445
2268b414
JK
14462011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1447 Jan Kratochvil <jan.kratochvil@redhat.com>
1448
1449 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1450 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1451 New.
1452 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1453 * linux-low.h (struct process_info_private): New member r_debug.
1454 * server.c (handle_qxfer_libraries): Call
1455 the_target->qxfer_libraries_svr4.
1456 (handle_qxfer_libraries_svr4): New function.
1457 (qxfer_packets): New entry "libraries-svr4".
1458 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1459 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1460 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1461 PACKET_qXfer_libraries_svr4.
1462
d6db1fab
UW
14632011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1464
1465 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1466 PSW address/mask between 8-byte and 16-byte formats.
1467 (s390_supply_ptrace_register): Likewise.
1468 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1469 basic addressing mode bit.
1470
242f5f1c
SS
14712011-11-24 Stan Shebs <stan@codesourcery.com>
1472
1473 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1474
f196051f
SS
14752011-11-17 Stan Shebs <stan@codesourcery.com>
1476
1477 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1478 (tracing_start_time): New global.
1479 (tracing_stop_time): New global.
1480 (tracing_user_name): New global.
1481 (tracing_notes): New global.
1482 (tracing_stop_note): New global.
1483 (cmd_qtstart): Set traceframe_usage, start_time.
1484 (stop_tracing): Set stop_time.
1485 (cmd_qtstatus): Report additional status.
1486 (cmd_qtp): New function.
1487 (handle_tracepoint_query): Call it.
1488 (cmd_qtnotes): New function.
1489 (handle_tracepoint_general_set): Call it.
1490 (get_timestamp): Rename from tsv_get_timestamp.
1491
405f8e94
SS
14922011-11-14 Stan Shebs <stan@codesourcery.com>
1493 Kwok Cheung Yeung <kcy@codesourcery.com>
1494
1495 * linux-x86-low.c (small_jump_insn): New.
1496 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1497 trampoline and error message, build a trampoline and issue a small
1498 jump instruction to it.
1499 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1500 trampoline and error message.
1501 (x86_get_min_fast_tracepoint_insn_len): New.
1502 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1503 * linux-low.h (struct linux_target_ops): Add arguments to
1504 install_fast_tracepoint_jump_pad operation, add new operation.
1505 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1506 arguments.
1507 (linux_get_min_fast_tracepoint_insn_len): New function.
1508 (linux_target_op): Add new operation.
1509 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1510 (gdb_trampoline_buffer_end): Ditto.
1511 (gdb_trampoline_buffer_error): Ditto.
1512 (struct ipa_sym_addresses): Add fields for new IPA variables.
1513 (symbol_list): Add entries for new IPA variables.
1514 (struct tracepoint): Add fields to hold the address range of the
1515 trampoline used by the tracepoint.
1516 (trampoline_buffer_head): New static variable.
1517 (trampoline_buffer_tail): Ditto.
1518 (claim_trampoline_space): New function.
1519 (have_fast_tracepoint_trampoline_buffer): New function.
1520 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1521 structure.
1522 (install_fast_tracepoint): Ditto, also add error buffer argument.
1523 (cmd_qtminftpilen): New function.
1524 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1525 (fast_tracepoint_from_trampoline_address): New function.
1526 (fast_tracepoint_collecting): Handle trampoline as part of jump
1527 pad space.
1528 (set_trampoline_buffer_space): New function.
1529 (initialize_tracepoint): Initialize new IPA variables.
1530 * target.h (struct target_ops): Add arguments to
1531 install_fast_tracepoint_jump_pad operation, add new
1532 get_min_fast_tracepoint_insn_len operation.
1533 (target_get_min_fast_tracepoint_insn_len): New.
1534 (install_fast_tracepoint_jump_pad): Add arguments.
1535 * server.h (IPA_BUFSIZ): Define.
1536 * linux-i386-ipa.c: Include extra header files.
1537 (initialize_fast_tracepoint_trampoline_buffer): New function.
1538 (initialize_low_tracepoint): Call it.
1539 * server.h (set_trampoline_buffer_space): Declare.
1540 (claim_trampoline_space): Ditto.
1541 (have_fast_tracepoint_trampoline_buffer): Ditto.
1542
1e4d1764
YQ
15432011-11-14 Yao Qi <yao@codesourcery.com>
1544
1545 * server.c (handle_query): Handle InstallInTrace for qSupported.
1546 * tracepoint.c (add_tracepoint): Sort list.
1547 (install_tracepoint, download_tracepoint): New.
1548 (cmd_qtdp): Call them to install and download tracepoints.
1549 (sort_tracepoints): Removed.
1550 (cmd_qtstart): Update.
1551
5c73ff4e
YQ
15522011-11-14 Yao Qi <yao@codesourcery.com>
1553
1554 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1555 * mem-break.h: Declare.
1556 * tracepoint.c (cmd_qtstart): Move some code to ...
1557 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1558 New.
1559 (download_tracepoints): Move some code to ...
1560 (download_tracepoint_1): ... here. New.
1561
86a30030
YQ
15622011-11-08 Yao Qi <yao@codesourcery.com>
1563
1564 * remote-utils.c (relocate_instruction): A comment fix.
1565
8d26e50c
JB
15662011-11-07 Joel Brobecker <brobecker@adacore.com>
1567
1568 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1569 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1570 dr_status_mirror and dr_control_mirror from debug_reg_state.
1571 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1572 (i386_initial_stuff): Remove use of deleted globals.
1573 (i386_get_thread_context, i386_set_thread_context,
1574 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1575 from debug_reg_state.
1576
a59306a3
YQ
15772011-11-05 Yao Qi <yao@codesourcery.com>
1578
1579 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1580 address as TPOINT's.
1581
3065dfb6
SS
15822011-11-02 Stan Shebs <stan@codesourcery.com>
1583
1584 * tracepoint.c (agent_mem_read_string): New function.
1585 (eval_agent_expr): Call it for tracenz.
1586 * server.c (handle_query): Report support for tracenz.
1587
fd0d8c7c
YQ
15882011-11-02 Yao Qi <yao@codesourcery.com>
1589
1590 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1591
609086b1
YQ
15922011-11-02 Yao Qi <yao@codesourcery.com>
1593
1594 * target.h: Fix a typo in comment.
1595
b9fd1791
PA
15962011-10-31 Pedro Alves <pedro@codesourcery.com>
1597
1598 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1599 clobber the breakpoints' shadows with fast tracepoint jumps.
1600 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1601 * target.c (write_inferior_memory): Also pass MYADDR down to
1602 check_mem_write.
1603
03583c20
UW
16042011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1605
1606 * configure.ac: Check support for personality routine.
1607 * configure: Regenerate.
1608 * config.in: Likewise.
1609 * linux-low.c: Include <sys/personality.h>.
1610 Define ADDR_NO_RANDOMIZE if necessary.
1611 (linux_create_inferior): Disable address space randomization when
1612 forking inferior, if requested.
1613 (linux_supports_disable_randomization): New function.
1614 (linux_target_ops): Install it.
1615 * server.h (disable_randomization): Declare.
1616 * server.c (disable_randomization): New global variable.
1617 (handle_general_set): Handle QDisableRandomization.
1618 (handle_query): Likewise for qSupported.
1619 (main): Support --disable-randomization and --no-disable-randomization
1620 command line arguments.
1621 * target.h (struct target_ops): Add supports_disable_randomization.
1622 (target_supports_disable_randomization): New macro.
1623
723b724b
MF
16242011-09-29 Mike Frysinger <vapier@gentoo.org>
1625
1626 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1627 ifdef check.
1628 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1629 [!PT_GETDSBT] (target_loadmap): New definition.
1630 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1631 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1632 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1633 and PT_GETDSBT to LINUX_LOADMAP.
1634 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1635 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1636
55329a5c 16372011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
1638
1639 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1640 (arm_linux_hwbp_cap): New static variable.
1641 (arm_linux_get_hwbp_cap): Replace by ...
1642 (arm_linux_init_hwbp_cap): ... this new function.
1643 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1644 (arm_linux_get_hw_watchpoint_count): Likewise.
1645 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1646 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1647 (arm_prepare_to_resume): Use perror_with_name instead of error.
1648
55329a5c 16492011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
1650
1651 * linux-arm-low.c: Include <signal.h>.
1652 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1653 (struct arm_linux_hwbp_cap): New data type.
1654 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1655 (struct arm_linux_hw_breakpoint): New data type.
1656 (MAX_BPTS, MAX_WPTS): Define.
1657 (struct arch_process_info, struct arch_lwp_info): New data types.
1658 (arm_linux_get_hwbp_cap): New function.
1659 (arm_linux_get_hw_breakpoint_count): Likewise.
1660 (arm_linux_get_hw_watchpoint_count): Likewise.
1661 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1662 (arm_hwbp_control_initialize): Likewise.
1663 (arm_hwbp_control_is_enabled): Likewise.
1664 (arm_hwbp_control_is_initialized): Likewise.
1665 (arm_hwbp_control_disable): Likewise.
1666 (arm_linux_hw_breakpoint_equal): Likewise.
1667 (arm_linux_hw_point_initialize): Likewise.
1668 (struct update_registers_data): New data structure.
1669 (update_registers_callback: New function.
1670 (arm_insert_point): Likewise.
1671 (arm_remove_point): Likewise.
1672 (arm_stopped_by_watchpoint): Likewise.
1673 (arm_stopped_data_address): Likewise.
1674 (arm_new_process): Likewise.
1675 (arm_new_thread): Likewise.
1676 (arm_prepare_to_resume): Likewise.
1677 (the_low_target): Register arm_insert_point, arm_remove_point,
1678 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1679 arm_new_thread, and arm_prepare_to_resume.
1680
6b9801d4
SS
16812011-09-15 Stan Shebs <stan@codesourcery.com>
1682
1683 * server.h (struct emit_ops): Add compare-goto fields.
1684 * tracepoint.c (gdb_agent_op_sizes): New table.
1685 (emit_eq_goto): New function.
1686 (emit_ne_goto): New function.
1687 (emit_lt_goto): New function.
1688 (emit_le_goto): New function.
1689 (emit_gt_goto): New function.
1690 (emit_ge_goto): New function.
1691 (is_goto_target): New function.
1692 (compile_bytecodes): Recognize special cases of compare-goto
1693 combinations and call specialized emitters for them.
1694 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1695 (amd64_emit_ne_goto): New function.
1696 (amd64_emit_lt_goto): New function.
1697 (amd64_emit_le_goto): New function.
1698 (amd64_emit_gt_goto): New function.
1699 (amd64_emit_ge_goto): New function.
1700 (amd64_emit_ops): Add the new functions.
1701 (i386_emit_eq_goto): New function.
1702 (i386_emit_ne_goto): New function.
1703 (i386_emit_lt_goto): New function.
1704 (i386_emit_le_goto): New function.
1705 (i386_emit_gt_goto): New function.
1706 (i386_emit_ge_goto): New function.
1707 (i386_emit_ops): Add the new functions.
1708
bf15cbda
SS
17092011-09-08 Stan Shebs <stan@codesourcery.com>
1710
1711 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1712 (i386_emit_epilogue): Restore %ebx.
1713
943ca1dd
JZ
17142011-08-31 Jie Zhang <jzhang918@gmail.com>
1715
1716 * server.c (step_thread): Remove definition.
1717 (process_serial_event): Don't handle Hs.
1718 * server.h (step_thread): Remove declaration.
1719 * target.c (set_desired_inferior): Remove use of step_thread.
1720
e3deef73
LM
17212011-08-24 Luis Machado <lgustavo@codesourcery.com>
1722
1723 * linux-low.c: Include linux-procfs.h.
1724 (linux_attach_lwp_1): Update comments.
1725 (linux_attach): Scan for existing threads when attaching to a
1726 process that is the tgid.
1727 * Makefile.in: Update dependencies.
1728
13da1c97
LM
17292011-08-24 Luis Machado <lgustavo@codesourcery.com>
1730
1731 * configure.srv: Add linux-procfs.o dependencies.
1732
881127c9
YQ
17332011-08-14 Yao Qi <yao@codesourcery.com>
1734
1735 * target.h (struct target_ops): Fix indent.
1736 * win32-low.c (win32_target_ops): Fix comment.
1737
58dbd541
YQ
17382011-08-14 Andrew Jenner <andrew@codesourcery.com>
1739 Yao Qi <yao@codesourcery.com>
1740
1741 * Makefile.in (clean): Remove tic6x-*.c files.
1742 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1743 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1744 (tic6x-c64xp-linux.c): Likewise.
1745 * configure.srv: Add support for tic6x-*-uclinux.
1746 * linux-tic6x-low.c: New.
1747 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1748
78d85199
YQ
17492011-08-14 Andrew Stubbs <ams@codesourcery.com>
1750 Yao Qi <yao@codesourcery.com>
1751
1752 * target.h (struct target_ops): Add read_loadmap.
1753 * linux-low.c (struct target_loadseg): New type.
1754 (struct target_loadmap): New type.
1755 (linux_read_loadmap): New function.
1756 (linux_target_ops): Add linux_read_loadmap.
1757 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
1758 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
1759 to NULL.
78d85199 1760
a959a88d
EZ
17612011-08-05 Eli Zaretskii <eliz@gnu.org>
1762
1763 * win32-low.c: Include <stdint.h>.
1764
1ced966e
PA
17652011-07-22 Pedro Alves <pedro@codesourcery.com>
1766
1767 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1768 to the inferior here.
1769 (i386_remove_aligned_watchpoint): Ditto.
1770 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1771 fit part of the watchpoint in the debug registers.
1772 (i386_update_inferior_debug_regs): New.
1773 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1774 registers, and only update the inferior on success.
1775 (i386_low_remove_watchpoint): Ditto.
1776
d26e3629
KY
17772011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1778
1779 * linux-low.c (compare_ints, unique, list_threads, show_process,
1780 linux_core_of_thread): Delete.
1781 (linux_target_ops): Change linux_core_of_thread to
1782 linux_common_core_of_thread.
1783 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1784 * utils.c (malloc_failure): Change type of argument.
1785 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1786 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1787 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1788 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1789 (IPA_OBJS): Add common-utils-ipa.o.
1790 (ptid_h, linux_osdata_h): New macros.
1791 (server_h): Add common/common-utils.h, common/xml-utils.h,
1792 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1793 common/ptid.h.
1794 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1795 ptid.o, buffer.o): New rules.
1796 (linux-low.o): Add common/linux-osdata.h as a dependency.
1797 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1798 * configure.ac: Add AC_HEADER_DIRENT check.
1799 * config.in: Regenerate.
1800 * configure: Regenerate.
1801 * remote-utils.c (xml_escape_text): Delete.
1802 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1803 buffer_xml_printf): Move to common/buffer.c.
1804 * server.c (main): Remove call to initialize_inferiors.
1805 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1806 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1807 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1808 internal_error, gdb_assert, gdb_assert_fail): Delete.
1809 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1810 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1811 common/buffer.h.
1812 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1813 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1814 initialize_inferiors): Delete.
1815
2275a1a7
PA
18162011-07-20 Pedro Alves <pedro@codesourcery.com>
1817
1818 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1819 symbol error.
1820
0a5b1e09
PA
18212011-05-31 Pedro Alves <pedro@codesourcery.com>
1822
1823 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1824 assertion.
1825 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1826
6938fd34
YQ
18272011-05-26 Yao Qi <yao@codesourcery.com>
1828
1829 * Makefile.in (thread-db.o): Track dependence to
1830 common/gdb_thread_db.h.
1831 * thread-db.c: include gdb_thread_db.h from right place.
1832
b481f9e0
TT
18332011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1834
1835 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1836 __FILE__ and __LINE__ to internal_error.
1837
98a5dd13
DE
18382011-05-13 Doug Evans <dje@google.com>
1839
1840 * thread-db.c (try_thread_db_load_from_sdir): New function.
1841 (try_thread_db_load_from_dir): New function.
1842 (thread_db_load_search): Handle $sdir, ignore $pdir.
1843 Remove trying of system directories if search of
1844 libthread-db-search-path fails, that is now done via $sdir.
1845
d248b706
KY
18462011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1847
1848 * server.c (handle_query): Add EnableDisableTracepoints to the list
1849 of supported features.
43aaf8b6 1850 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 1851 tracepoints.
43aaf8b6
PA
1852 (cmd_qtenable_disable): New.
1853 (cmd_qtstart): Install tracepoints even if disabled.
1854 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1855 receiving a QTEnable or QTDisable packet.
1856 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1857 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1858 tracepoints.
1859 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 1860
84e578fb
DE
18612011-05-10 Doug Evans <dje@google.com>
1862
1863 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1864
71f55dd8
DE
18652011-05-04 Doug Evans <dje@google.com>
1866
1867 * linux-low.c (linux_join): Skip process lookup.
1868 * spu-low.c (spu_join): Ditto.
1869 * server.c (join_inferiors_callback): Delete.
1870 (process_serial_event): For 'D' packet (detach) call join_inferior
1871 directly.
1872
4d393d60
JM
18732011-05-04 Joseph Myers <joseph@codesourcery.com>
1874
1875 * README: Don't mention xscale*-*-linux*.
1876 * configure.srv (xscale*-*-linux*): Don't handle target.
1877
b00ad6ff
NF
18782011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1879
1880 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1881 casting pointers.
1882 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1883 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1884 (i386_emit_void_call_2): Likewise.
1885
af96c192
YQ
18862011-04-26 Yao Qi <yao@codesourcery.com>
1887
43aaf8b6
PA
1888 * linux-low.c: Move common macros to linux-ptrace.h.
1889 Include linux-ptrace.h.
af96c192
YQ
1890 * Makefile.in (linux_ptrace_h): New.
1891 (linux-low.o): Depends on linux-ptrace.h.
1892
03f2bd59
JK
18932011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1894
1895 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1896 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1897 (remote_prepare): New function with most of the TCP code from ...
1898 (remote_open): ... here. Detect PORT here unconditionally. Move also
1899 setting transport_is_reliable.
1900 * server.c (run_once): New variable.
1901 (gdbserver_usage): Document it.
1902 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1903 the first run if RUN_ONCE.
1904 * server.h (run_once, remote_prepare): New declarations.
1905
7a9dd1b2
TT
19062011-04-19 Tom Tromey <tromey@redhat.com>
1907
1908 * win32-low.c (handle_load_dll): Remove duplicate "the".
1909
81239425
PM
19102011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1911
1912 Remove support for old Cygwin 1.5 versions.
1913 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1914 function to avoid warning.
1915 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1916 warning.
1917
9e0627f1
PM
19182011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1919
1920 * gdbserver/server.h (Macro _): Define it if not available.
1921
588eebee
MS
19222011-03-14 Michael Snyder <msnyder@vmware.com>
1923
348af9f7 1924 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 1925
43f70d4c
JB
19262011-03-10 Joel Brobecker <brobecker@adacore.com>
1927
1928 * Makefile.in (maintainer-clean realclean distclean): Remove
1929 "make ... subdir_do" command.
1930
348af9f7
MS
19312011-03-10 Michael Snyder <msnyder@vmware.com>
1932
1933 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1934
1935 * server.c (handle_v_run): Free alloced buffer on early return.
1936
e637a4f5
YQ
19372011-03-09 Yao Qi <yao@codesourcery.com>
1938
1939 Revert:
1940 2011-03-04 Yao Qi <yao@codesourcery.com>
1941
1942 * Makefile.in: Remove GNU make feature --directory.
1943
1944 2011-03-05 Yao Qi <yao@codesourcery.com>
1945
1946 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1947 (subdir_do): New make target. Copied from gdb/Makefile.
1948 (maintainer-clean, realclean, distclean, clean): Call corresponding
1949 make targets in common/Makefile.
1950
1951 2011-02-11 Yao Qi <yao@codesourcery.com>
1952
1953 * configure.ac: Call AC_PROG_RANLIB.
1954 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1955 * configure: Regenerate.
1956
e6edda56
JK
19572011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1958
1959 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1960
e5141119
JB
19612011-03-06 Yao Qi <yao@codesourcery.com>
1962
1963 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1964
64794aa4
JB
19652011-03-05 Yao Qi <yao@codesourcery.com>
1966
1967 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1968 (subdir_do): New make target. Copied from gdb/Makefile.
1969 (maintainer-clean, realclean, distclean, clean): Call corresponding
1970 make targets in common/Makefile.
1971
7a762829
YQ
19722011-03-04 Yao Qi <yao@codesourcery.com>
1973
1974 * Makefile.in: Remove GNU make feature --directory.
1975
348af9f7
MS
19762011-03-04 Michael Snyder <msnyder@vmware.com>
1977
1978 * server.c (queue_stop_reply): Call xmalloc not malloc.
1979
19802011-03-02 Michael Snyder <msnyder@vmware.com>
1981
1982 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1983
9f72fee2
MS
19842011-02-28 Michael Snyder <msnyder@vmware.com>
1985
588eebee
MS
1986 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1987 (cmd_qtframe): Ditto.
1988 (cmd_qtbuffer): Ditto.
1989 (cmd_bigqtbuffer): Ditto.
1990
9f72fee2
MS
1991 * utils.c (decimal2str): Initialize 'width' to nine, then
1992 don't mess with it.
1993
8040bd49
UW
19942011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1995
1996 * hostio.c (require_data): Free *data, not data.
1997
7e52cbd0
JK
19982011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1999
2000 * hostio.c (require_data): Use free, not xfree.
2001
9130f83e
MS
20022011-02-27 Michael Snyder <msnyder@vmware.com>
2003
4b812f4e
MS
2004 * server.c (handle_query): Discard unused value.
2005
9130f83e
MS
2006 * hostio.c (require_data): Free malloc memory before returning
2007 error.
2008
69d37113
MS
20092011-02-26 Michael Snyder <msnyder@vmware.com>
2010
2011 * linux-low.c (list_threads): Call closedir for dirent.
2012
35f5825a
MS
20132011-02-27 Michael Snyder <msnyder@vmware.com>
2014
2a589cef
MS
2015 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2016 a case statement falls through.
2017
0adea5f7
MS
2018 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2019
35f5825a
MS
2020 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2021 in comparison.
2022
238f1c74
MS
20232011-02-26 Michael Snyder <msnyder@vmware.com>
2024
2025 * utils.c (decimal2str): Eliminate dead code and dead param.
2026 (pulongest): Drop dead param from call to decimal2str.
2027 (plongest): Ditto.
2028
633ff500
JB
20292011-02-24 Joel Brobecker <brobecker@adacore.com>
2030
2031 Revert the following patch (not approved yet):
2032 2011-02-21 Hui Zhu <teawater@gmail.com>
2033 * tracepoint.c (tp_printf): New function.
2034 (eval_agent_expr): Handle gdb_agent_op_printf.
2035
f9c6ff72
HZ
20362011-02-21 Hui Zhu <teawater@gmail.com>
2037
2038 * tracepoint.c (tp_printf): New function.
2039 (eval_agent_expr): Handle gdb_agent_op_printf.
2040
94d5e490
TT
20412011-02-18 Tom Tromey <tromey@redhat.com>
2042
2043 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2044 (tracepoint.o): Likewise.
2045 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2046 (gdb_agent_op_names): Likewise.
2047
c7f96d2b
TT
20482011-02-18 Tom Tromey <tromey@redhat.com>
2049
2050 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2051 gdb_agent_op_rot>: New constants.
2052 (gdb_agent_op_names): Add pick and roll.
2053 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2054 cases.
2055
0feedb2c
JK
20562011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2057
2058 * aclocal.m4: Regenerated with aclocal-1.11.1.
2059
b3b9301e
PA
20602011-02-14 Pedro Alves <pedro@codesourcery.com>
2061
2062 * server.c (handle_qxfer_traceframe_info): New.
2063 (qxfer_packets): Register "traceframe-info".
2064 (handle_query): Report support for qXfer:traceframe-info:read+.
2065 * tracepoint.c (match_blocktype): New.
2066 (traceframe_find_block_type): Rename to ...
2067 (traceframe_walk_blocks): ... this. Add callback filter argument,
2068 and use it.
2069 (traceframe_find_block_type): New, reimplemented on top of
2070 traceframe_walk_blocks.
2071 (build_traceframe_info_xml): New.
2072 (traceframe_read_info): New.
2073 * server.h (traceframe_read_info): Declare.
2074
4f3e6fb7
YQ
20752011-02-11 Yao Qi <yao@codesourcery.com>
2076
2077 * configure.ac: Call AC_PROG_RANLIB.
2078 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2079 * configure: Regenerate.
2080
764880b7
PA
20812011-02-07 Pedro Alves <pedro@codesourcery.com>
2082
2083 * server.c (gdb_read_memory): Change return semantics to allow
2084 partial transfers.
2085 (handle_search_memory_1): Adjust.
2086 (process_serial_event) <'m' packet>: Handle partial transfers.
2087 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2088
1c79eb8a
PA
20892011-01-28 Pedro Alves <pedro@codesourcery.com>
2090
2091 * regcache.c (init_register_cache): Initialize
2092 regcache->register_status.
2093 (free_register_cache): Release regcache->register_status.
2094 (regcache_cpy): Copy register_status.
2095 (registers_to_string): Print 'x's for unavailable registers.
2096 (supply_register): Mark the register's status valid or
2097 unavailable, depending on whether a buffer was passed in or not.
2098 (supply_register_zeroed): New.
2099 (supply_regblock): Mark the registers' status valid or
2100 unavailable, depending on whether a buffer was passed in or not.
2101 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2102 (struct regcache): New `register_status' field.
2103 (supply_register_zeroed): Declare.
2104 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2105 supply_register_zeroed, rather than passing a NULL buffer to
2106 supply_register.
2107 * tracepoint.c (fetch_traceframe_registers): Update comment.
2108
85724a0e
PA
21092011-01-28 Pedro Alves <pedro@codesourcery.com>
2110
2111 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2112 buffer explicit.
2113
d08aafef
PA
21142011-01-25 Pedro Alves <pedro@codesourcery.com>
2115
2116 * server.h (decode_xfer_write): Change prototype.
2117 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2118 and don't extract the annex here.
2119 * server.c (decode_xfer_read): Remove `annex' parameter,
2120 and don't extract the annex here.
2121 (decode_xfer): New.
2122 (struct qxfer): New.
2123 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2124 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2125 (handle_qxfer_statictrace): New functions, abstracted out from
2126 handle_query, and made to use the struct qxfer interface.
2127 (handle_threads_qxfer_proper): Rename to ...
2128 (handle_qxfer_threads_proper): ... this.
2129 (handle_threads_qxfer): Rename to ...
2130 (handle_qxfer_threads): ... this. Adjust.
2131 (qxfer_packets): New array.
2132 (handle_qxfer): New function.
2133 (handle_query): Use handle_qxfer.
2134
493e2a69
MS
21352011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2136
2137 * gdbreplay.c: Shorten lines of >= 80 columns.
2138 * linux-low.c: Ditto.
2139 * linux-ppc-low.c: Ditto.
2140 * linux-s390-low.c: Ditto.
2141 * linux-sparc-low.c: Ditto.
2142 * linux-x86-low.c: Ditto.
2143 * linux-xtensa-low.c: Ditto.
2144 * mem-break.c: Ditto.
2145 * nto-low.c: Ditto.
2146 * regcache.h: Ditto.
2147 * remote-utils.c: Ditto.
2148 * server.c: Ditto.
2149 * server.h: Ditto.
2150 * thread-db.c: Ditto.
2151 * tracepoint.c: Ditto.
2152 * utils.c: Ditto.
2153 * win32-low.h: Ditto.
2154
44944448
JB
21552011-01-05 Joel Brobecker <brobecker@adacore.com>
2156
2157 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2158 update.
2159
71ce852c
JB
21602011-01-01 Joel Brobecker <brobecker@adacore.com>
2161
2162 * server.c (gdbserver_version): Update copyright year in version
2163 output.
2164 * gdbreplay.c (gdbreplay_version): Ditto.
2165
eb826dc6
MF
21662010-12-29 Jie Zhang <jie.zhang@analog.com>
2167
2168 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2169 * linux-bfin-low.c: New file.
2170 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2171 PT_DATA_ADDR for BFIN targets.
2172 * Makefile.in (SFILES): Add linux-bfin-low.c.
2173 (clean): Remove reg-bfin.c.
2174 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2175 * README: Mention supported Blackfin targets.
2176
39ab222a
MF
21772010-12-23 Mike Frysinger <vapier@gentoo.org>
2178
2179 * .gitignore: New file.
2180
a1f2ce7d
MF
21812010-11-16 Mike Frysinger <vapier@gentoo.org>
2182
2183 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2184
f474844c
JZ
21852010-10-22 Jie Zhang <jie@codesourcery.com>
2186
2187 * Makefile.in: Add FLAGS_TO_PASS variable.
2188 (install): Remove dependency of install-only and recursively
2189 invoke make for install-only.
2190
f1048712
DE
21912010-10-04 Doug Evans <dje@google.com>
2192
2193 * Makefile.in (uninstall): Use $(DESTDIR).
2194
b53a1623
PA
21952010-09-24 Pedro Alves <pedro@codesourcery.com>
2196
e6ee044d
PA
2197 PR gdb/11842
2198
b53a1623
PA
2199 * linux-x86-low.c (compat_siginfo_from_siginfo)
2200 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2201 si_code is < 0. Check for si_code == SI_TIMER before checking for
2202 si_code < 0.
2203
fa1bd1e4
JB
22042010-09-13 Joel Brobecker <brobecker@adacore.com>
2205
2206 * lynx-i386-low.c: New file.
2207 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2208
47fac8f8
JB
22092010-09-13 Joel Brobecker <brobecker@adacore.com>
2210
2211 * lynx-low.c (ptrace_request_to_str): Remove handling for
2212 request values that have been removed in LynxOS 5.x.
2213
1adfc54d
JB
22142010-09-13 Joel Brobecker <brobecker@adacore.com>
2215
2216 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2217 <ptrace.h>
2218
c2a66c29
NS
22192010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2220
2221 * configure.ac: Add --enable-inprocess-agent option.
2222 * configure: Rebuilt.
2223
32fcada3
YQ
22242010-09-06 Yao Qi <yao@codesourcery.com>
2225
2226 * linux-low.c (linux_kill): Remove unused variable.
2227 (linux_stabilize_threads): Likewise.
2228 * server.c (start_inferior): Likewise.
2229 (queue_stop_reply_callback): Likewise.
2230 * tracepoint.c (do_action_at_tracepoint): Likewise.
2231
0cccb683
YQ
22322010-09-06 Yao Qi <yao@codesourcery.com>
2233
2234 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2235 on return.
2236
423ec54c
JK
22372010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2238
2239 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2240
12ac6819
PA
22412010-09-06 Pedro Alves <pedro@codesourcery.com>
2242
2243 * Makefile.in (install-only): Replace $IPA_DEPFILES with
2244 "$(IPA_DEPFILES)".
2245
8ed54b31
JB
22462010-09-01 Joel Brobecker <brobecker@adacore.com>
2247
2248 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2249 gdbserver/lynx-ppc-low.c: New files.
2250 * Makefile.in (lynx_low_h): New variable.
2251 (lynx-low.o, lynx-ppc-low.o): New rules.
2252 * configure.ac: On LynxOS, link with -lnetinet.
2253 * configure.srv: Add handling of powerpc-*-lynxos* targets.
2254 * configure: regenerate.
2255
bb0116a4
JB
22562010-09-01 Joel Brobecker <brobecker@adacore.com>
2257
2258 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2259 * configure.ac: Add check for vasprintf and vsnprintf.
2260 * configure, config.in: Regenerate.
2261 * server.h (vasprintf, vsnprintf): Add conditional declarations.
2262
a778ab81 22632010-09-01 Joel Brobecker <brobecker@adacore.com>
2264
2265 * gdbreplay.c: Move include of alloca.h up, next to include of
2266 malloc.h.
2267 * server.h: Add include of malloc.h.
2268 * mem-break.c: Remove include of malloc.h.
2269 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2270
8b034a19 22712010-09-01 Joel Brobecker <brobecker@adacore.com>
2272
2273 * Makefile.in (memmem.o): Build with -Wno-error.
2274
22752010-09-01 Joel Brobecker <brobecker@adacore.com>
2276
2277 * utils.c (xsnprintf): Make non-static.
2278 * server.h: Add xsnprintf declaration.
2279 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2280 replace calls to snprintf by calls to xsnprintf throughout.
2281
22822010-09-01 Joel Brobecker <brobecker@adacore.com>
2283
2284 * configure.ac: Add configure check for alloca.
2285 * configure, config.in: Regenerate.
2286 * server.h: Include alloca.h if it exists.
2287 * gdbreplay.c: Include alloca.h if it exists.
2288
1a981360
PA
22892010-08-28 Pedro Alves <pedro@codesourcery.com>
2290
2291 * linux-low.c (__SIGRTMIN): Define if not already defined.
2292 (linux_create_inferior): Check for __ANDROID__ rather than
2293 __SIGRTMIN.
2294 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2295 are already deferred.
2296 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2297 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2298 stopped and already has a pending signal to report.
2299 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2300 a pending signal to report or is moving out of a jump pad.
2301 (linux_init_signals): Check for __ANDROID__ rather than
2302 __SIGRTMIN.
2303
b4d51a55
PA
23042010-08-28 Pedro Alves <pedro@codesourcery.com>
2305
2306 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2307 debug_threads check. Avoid a linear search when not doing debug
2308 output.
2309
ec48365d
PA
23102010-08-27 Pedro Alves <pedro@codesourcery.com>
2311
2312 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2313 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2314 (struct file_handler) <fd>: Change type to gdb_fildes_t.
2315 (process_event): Change local fd's type to gdb_fildes_t.
2316 (create_file_handler): Adjust prototype.
2317 (delete_file_handler): Adjust prototype.
2318 (handle_file_event): Adjust prototype. Use pfildes.
2319 (create_file_event): Adjsut prototype.
2320 * remote-utils.c (remote_desc, listen_desc): Change type to
2321 gdb_fildes_t.
2322 * server.h: New gdb_fildes_t typedef.
2323 [USE_WIN32API]: Include winsock2.h.
2324 (delete_file_handler, add_file_handler): Adjust prototypes.
2325 (pfildes): Declare.
2326 * utils.c (pfildes): New.
2327
854d88f0
PA
23282010-08-27 Pedro Alves <pedro@codesourcery.com>
2329
2330 * configure.ac (build_warnings): Add -Wno-char-subscripts.
2331 * configure: Regenerate.
2332
0146f85b
PA
23332010-08-27 Pedro Alves <pedro@codesourcery.com>
2334
2335 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2336 (linux_done_accessing_memory): ... this.
2337 (linux_target_ops): Adjust.
2338 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
2339 * nto-low.c (nto_target_ops): Adjust comment.
2340 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
2341 * spu-low.c (spu_target_ops): Adjust comment.
2342 * target.h (target_ops): Rename unprepare_to_access_memory field
2343 to done_accessing_memory.
2344 (unprepare_to_access_memory): Rename to ...
2345 (done_accessing_memory): ... this.
2346
90d74c30
PA
23472010-08-26 Pedro Alves <pedro@codesourcery.com>
2348
2349 * linux-low.c (linux_prepare_to_access_memory): New.
2350 (linux_unprepare_to_access_memory): New.
2351 (linux_target_ops): Install them.
2352 * server.c (read_memory): Rename to ...
2353 (gdb_read_memory): ... this. Use
2354 prepare_to_access_memory/prepare_to_access_memory.
2355 (write_memory): Rename to ...
2356 (gdb_write_memory): ... this. Use
2357 prepare_to_access_memory/prepare_to_access_memory.
2358 (handle_search_memory_1): Adjust.
2359 (process_serial_event): Adjust.
2360 * target.h (struct target_ops): New fields
2361 prepare_to_access_memory and unprepare_to_access_memory.
2362 (prepare_to_access_memory, unprepare_to_access_memory): New.
2363 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2364 prepare_to_access_memory/prepare_to_access_memory.
2365 * nto-low.c (nto_target_ops): Adjust.
2366 * spu-low.c (spu_target_ops): Adjust.
2367 * win32-low.c (win32_target_ops): Adjust.
2368
fd467969
PA
23692010-08-26 Pedro Alves <pedro@codesourcery.com>
2370
2371 * Makefile.in (WARN_CFLAGS): Get it from configure.
2372 (WERROR_CFLAGS): New.
2373 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2374 * configure.ac: Introduce --enable-werror, which adds -Werror to
2375 the compiler command line. Enabled by default. Disable with
2376 --disable-werror. Add -Wdeclaration-after-statement
2377 Wpointer-arith and -Wformat-nonliteral to warning flags.
2378 * configure: Regenerate.
2379
331e2f5f
PA
23802010-08-26 Pedro Alves <pedro@codesourcery.com>
2381
2382 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2383
e581f2b4
PA
23842010-08-26 Pedro Alves <pedro@codesourcery.com>
2385
2386 * gdbreplay.c (remote_error): New.
2387 (gdbchar): New.
2388 (expect): Use gdbchar. Check for error reading from GDB.
2389 Clarify sync error output.
2390 (play): Check for errors writing to GDB.
2391 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2392 * remote-utils.c (getpkt): Check for errors writing to the remote
2393 descriptor.
2394
3c11dd79
PA
23952010-08-25 Pedro Alves <pedro@codesourcery.com>
2396
2397 * linux-low.c (linux_wait_1): Move non-debugging code out of
2398 `debug_threads' control.
2399
d20a8ad9
PA
24002010-08-25 Pedro Alves <pedro@codesourcery.com>
2401
2402 * linux-low.c (linux_wait_1): Don't set last_status here.
2403 * server.c (push_event, queue_stop_reply_callback): Assert we're
2404 not pushing a TARGET_WAITKIND_IGNORE event.
2405 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2406 (myresume, handle_target_event): Set the thread's last_resume_kind
2407 and last_status from the target returned status.
2408
964e4306
PA
24092010-08-25 Pedro Alves <pedro@codesourcery.com>
2410
2411 PR threads/10729
2412
2413 * linux-x86-low.c (update_debug_registers_callback): New.
2414 (i386_dr_low_set_addr): Use it.
2415 (i386_dr_low_get_addr): New.
2416 (i386_dr_low_set_control): Use update_debug_registers_callback.
2417 (i386_dr_low_get_control): New.
2418 (i386_dr_low_get_status): Adjust.
2419 * linux-low.c (linux_stop_lwp): New.
2420 * linux-low.h (linux_stop_lwp): Declare.
2421
2422 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2423 argument instead of a i386_debug_reg_state.
2424 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2425 a i386_debug_reg_state.
2426 (i386_insert_aligned_watchpoint): Adjust.
2427 (i386_remove_aligned_watchpoint): Adjust.
2428 (i386_low_stopped_data_address): Read the debug registers from the
2429 inferior instead of from the mirrors.
2430 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2431 (i386_dr_low_get_addr): Declare.
2432 (i386_dr_low_get_control): Declare.
2433 (i386_dr_low_get_status): Change prototype.
2434
2435 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2436 (i386_dr_low_get_addr): New.
2437 (i386_dr_low_get_control): New.
2438 (i386_dr_low_get_status): Adjust prototype. Return
2439 dr_status_mirror.
2440 (i386_initial_stuff): Clear dr_status_mirror and
2441 dr_control_mirror.
2442 (i386_get_thread_context): Adjust.
2443 (i386_set_thread_context): Adjust.
2444 (i386_thread_added): Adjust.
2445
5f21a75b
PA
24462010-08-24 Pedro Alves <pedro@codesourcery.com>
2447
2448 * linux-low.h (linux_thread_area): Delete declaration.
2449
3e4c1235
TS
24502010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2451
2452 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2453 after its termination.
2454
1971b033
PA
24552010-08-09 Pedro Alves <pedro@codesourcery.com>
2456
2457 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2458 (gdb_wants_all_stopped): Delete.
2459 (linux_wait_1): Don't call them.
2460 * server.c (handle_v_cont): Tag all threads as want-stopped.
2461 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2462 stopped as "client-wants-stopped".
2463
310444ac
PA
24642010-07-31 Pedro Alves <pedro@codesourcery.com>
2465
2466 * Makefile.in (signals_h): New.
2467 (server_h): Depend on it.
2468 (server.o): Don't depend on $(signals_def).
2469 (signals.o): Depend on $(signals_def).
2470
a19cae16
JK
24712010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2472
2473 * Makefile.in (signals_def): New.
2474 (server_h): Append include/gdb/signals.h and signals_def.
2475 (server.o): Append signals_def.
2476
30d50328
JK
24772010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2478
2479 * server.c (handle_target_event): Use target_signal_to_host for
2480 resume_info.sig initialization.
2481 * target.h (struct thread_resume) <sig>: New comment.
2482
5c3216e2
OS
24832010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2484
c6f46ca0
OS
2485 * server.c (handle_query): strcpy() the returned string from paddress()
2486 instead of sprintf().
5c3216e2
OS
2487 * utils.c (paddress): Return phex_nz().
2488
6bd31874
JB
24892010-07-07 Joel Brobecker <brobecker@adacore.com>
2490
2491 * server.c (handle_v_cont): Call mourn_inferior if process
2492 just exited.
2493 (myresume): Likewise.
2494
0fb4aa4b
PA
24952010-07-01 Pedro Alves <pedro@codesourcery.com>
2496
2497 Static tracepoints, and integration with UST.
2498
2499 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2500 * mem-break.c (uninsert_all_breakpoints)
2501 (reinsert_all_breakpoints): New.
2502 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2503 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2504 (gdb_agent_ust_loaded, helper_thread_id)
2505 (gdb_agent_helper_thread_id): New macros.
2506 (struct ipa_sym_addresses): Add addr_ust_loaded,
2507 addr_helper_thread_id, addr_cmd_buf.
2508 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2509 (in_process_agent_loaded_ust): New.
2510 (write_e_ust_not_loaded): New.
2511 (maybe_write_ipa_ust_not_loaded): New.
2512 (struct collect_static_trace_data_action): New.
2513 (enum tracepoint_type) <static_tracepoint>: New.
2514 (struct tracepoint) <handle>: Mention static tracepoints.
2515 (struct static_tracepoint_ctx): New.
2516 (CMD_BUF_SIZE): New.
2517 (add_tracepoint_action): Handle static tracepoint actions.
2518 (unprobe_marker_at): New.
2519 (clear_installed_tracepoints): Handle static tracepoints.
2520 (cmd_qtdp): Handle static tracepoints.
2521 (probe_marker_at): New.
2522 (cmd_qtstart): Handle static tracepoints.
2523 (response_tracepoint): Handle static tracepoints.
2524 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2525 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2526 (get_context_regcache): Handle static tracepoints.
2527 (do_action_at_tracepoint): Handle static tracepoint actions.
2528 (traceframe_find_block_type): Handle static trace data blocks.
2529 (traceframe_read_sdata): New.
2530 (download_tracepoints): Download static tracepoint actions.
2531 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2532 (GDB_PROBE_NAME): New.
2533 (ust_ops): New.
2534 (GET_UST_SYM): New.
2535 (USTF): New.
2536 (dlsym_ust): New.
2537 (ust_marker_to_static_tracepoint): New.
2538 (gdb_probe): New.
2539 (collect_ust_data_at_tracepoint): New.
2540 (gdb_ust_probe): New.
2541 (UNIX_PATH_MAX, SOCK_DIR): New.
2542 (gdb_ust_connect_sync_socket): New.
2543 (resume_thread, stop_thread): New.
2544 (run_inferior_command): New.
2545 (init_named_socket): New.
2546 (gdb_ust_socket_init): New.
2547 (cstr_to_hexstr): New.
2548 (next_st): New.
2549 (first_marker, next_marker): New.
2550 (response_ust_marker): New.
2551 (cmd_qtfstm, cmd_qtsstm): New.
2552 (unprobe_marker_at, probe_marker_at): New.
2553 (cmd_qtstmat, gdb_ust_thread): New.
2554 (gdb_ust_init): New.
2555 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2556 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2557 (ST_REGENTRY): New.
2558 (x86_64_st_collect_regmap): New.
2559 (X86_64_NUM_ST_COLLECT_GREGS): New.
2560 (AMD64_RIP_REGNUM): New.
2561 (supply_static_tracepoint_registers): New.
2562 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2563 (ST_REGENTRY): New.
2564 (i386_st_collect_regmap): New.
2565 (i386_NUM_ST_COLLECT_GREGS): New.
2566 (supply_static_tracepoint_registers): New.
2567 * server.c (handle_query): Handle qXfer:statictrace:read.
2568 <qSupported>: Report support for StaticTracepoints, and
2569 qXfer:statictrace:read features.
2570 * server.h (traceframe_read_sdata)
2571 (supply_static_tracepoint_registers): Declare.
2572 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2573 (unpack_varlen_hex): Include in IPA build.
2574 * Makefile.in (ustlibs, ustinc): New.
2575 (IPA_OBJS): Add remote-utils-ipa.o.
2576 ($(IPA_LIB)): Link -ldl and -lpthread.
2577 (UST_CFLAGS): New.
2578 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2579 * config.in, configure: Regenerate.
2580
9e4344e5
PA
25812010-06-20 Ian Lance Taylor <iant@google.com>
2582 Pedro Alves <pedro@codesourcery.com>
2583
2584 * linux-x86-low.c (always_true): Delete.
2585 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2586 trying to fool the compiler with always_true.
2587
c6beb2cb
PA
25882010-06-20 Pedro Alves <pedro@codesourcery.com>
2589
2590 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2591 conditions in gdbserver.
2592
d2ed6730
UW
25932010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2594
2595 * spu-low.c (spu_read_memory): Wrap around local store limit.
2596 (spu_write_memory): Likewise.
2597
4e29fb54
PA
25982010-06-15 Pedro Alves <pedro@codesourcery.com>
2599
2600 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2601 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2602 LONGEST uses.
2603 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2604 uses.
2605 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2606 uses with LONGEST uses.
2607
6a271cae
PA
26082010-06-14 Stan Shebs <stan@codesourcery.com>
2609 Pedro Alves <pedro@codesourcery.com>
2610
2611 Bytecode compiler.
2612
2613 * linux-x86-low.c: Include limits.h.
2614 (add_insns): New.
2615 (always_true): New.
2616 (EMIT_ASM): New.
2617 (EMIT_ASM32): New.
2618 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2619 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2620 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2621 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2622 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2623 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2624 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2625 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2626 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2627 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2628 (amd64_emit_void_call_2): New.
2629 (amd64_emit_ops): New.
2630 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2631 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2632 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2633 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2634 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2635 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2636 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2637 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2638 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2639 (i386_emit_stack_adjust, i386_emit_int_call_1)
2640 (i386_emit_void_call_2): New.
2641 (i386_emit_ops): New.
2642 (x86_emit_ops): New.
2643 (the_low_target): Install x86_emit_ops.
2644 * server.h (struct emit_ops): New.
2645 (get_raw_reg_func_addr): Declare.
2646 (current_insn_ptr, emit_error): Declare.
2647 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2648 (set_trace_state_variable_value): New defines.
2649 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2650 addr_get_trace_state_variable_value and
2651 addr_set_trace_state_variable_value.
2652 (symbol_list): New fields for get_raw_reg,
2653 get_trace_state_variable_value and set_trace_state_variable_value.
2654 (condfn): New typedef.
2655 (struct tracepoint): New field `compiled_cond'.
2656 (do_action_at_tracepoint): Clear compiled_cond.
2657 (get_trace_state_variable_value, set_trace_state_variable_value):
2658 Export in the IPA.
2659 (condition_true_at_tracepoint): If there's a compiled condition,
2660 run that.
2661 (current_insn_ptr, emit_error): New globals.
2662 (struct bytecode_address): New.
2663 (get_raw_reg_func_addr): New.
2664 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2665 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2666 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2667 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2668 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2669 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2670 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2671 (compile_tracepoint_condition, compile_bytecodes): New.
2672 * target.h (emit_ops): Forward declare.
2673 (struct target_ops): New field emit_ops.
2674 (target_emit_ops): New.
2675 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2676 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2677 * linux-low.c (linux_emit_ops): New.
2678 (linux_target_ops): Install it.
2679 * linux-low.h (struct linux_target_ops): New field emit_ops.
2680
92b72907
UW
26812010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2682
2683 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2684 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2685
fa593d66
PA
26862010-06-01 Pedro Alves <pedro@codesourcery.com>
2687 Stan Shebs <stan@codesourcery.com>
2688
2689 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2690 (all): Depend on $(extra_libraries).
2691 (install-only): Install the IPA.
2692 (IPA_OBJS, IPA_LIB): New.
2693 (clean): Remove the IPA lib.
2694 (IPAGENT_CFLAGS): New.
2695 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2696 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2697 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2698 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2699 * configure.ac: Check for atomic builtins support in the compiler.
2700 (IPA_DEPFILES, extra_libraries): Define.
2701 * configure.srv (ipa_obj): Add description.
2702 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2703 (i[34567]86-*-linux*): Set ipa_obj.
2704 (x86_64-*-linux*): Set ipa_obj.
2705 * linux-low.c (stabilizing_threads): New.
2706 (supports_fast_tracepoints): New.
2707 (linux_detach): Stabilize threads before detaching.
2708 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2709 the lwp is either not stabilizing, or is moving out of a jump pad.
2710 (linux_fast_tracepoint_collecting): New.
2711 (maybe_move_out_of_jump_pad): New.
2712 (enqueue_one_deferred_signal): New.
2713 (dequeue_one_deferred_signal): New.
2714 (linux_wait_for_event_1): If moving out of a jump pad, defer
2715 pending signals to later.
2716 (linux_stabilize_threads): New.
2717 (linux_wait_1): Check if threads need moving out of jump pads, and
2718 do it if so.
2719 (stuck_in_jump_pad_callback): New.
2720 (move_out_of_jump_pad_callback): New.
2721 (lwp_running): New.
2722 (linux_resume_one_lwp): Handle moving out of jump pads.
2723 (linux_set_resume_request): Dequeue deferred signals.
2724 (need_step_over_p): Also step over fast tracepoint jumps.
2725 (start_step_over): Also uninsert fast tracepoint jumps.
2726 (finish_step_over): Also reinsert fast tracepoint jumps.
2727 (linux_install_fast_tracepoint_jump): New.
2728 (linux_target_ops): Install linux_stabilize_threads and
2729 linux_install_fast_tracepoint_jump_pad.
2730 * linux-low.h (linux_target_ops) <get_thread_area,
2731 install_fast_tracepoint_jump_pad>: New fields.
2732 (struct lwp_info) <collecting_fast_tracepoint,
2733 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2734 (linux_get_thread_area): Declare.
2735 * linux-x86-low.c (jump_insn): New.
2736 (x86_get_thread_area): New.
2737 (append_insns): New.
2738 (push_opcode): New.
2739 (amd64_install_fast_tracepoint_jump_pad): New.
2740 (i386_install_fast_tracepoint_jump_pad): New.
2741 (x86_install_fast_tracepoint_jump_pad): New.
2742 (the_low_target): Install x86_get_thread_area and
2743 x86_install_fast_tracepoint_jump_pad.
2744 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2745 (struct fast_tracepoint_jump): New.
2746 (fast_tracepoint_jump_insn): New.
2747 (fast_tracepoint_jump_shadow): New.
2748 (find_fast_tracepoint_jump_at): New.
2749 (fast_tracepoint_jump_here): New.
2750 (delete_fast_tracepoint_jump): New.
2751 (set_fast_tracepoint_jump): New.
2752 (uninsert_fast_tracepoint_jumps_at): New.
2753 (reinsert_fast_tracepoint_jumps_at): New.
2754 (set_breakpoint_at): Use write_inferior_memory.
2755 (uninsert_raw_breakpoint): Use write_inferior_memory.
2756 (check_mem_read): Mask out fast tracepoint jumps.
2757 (check_mem_write): Mask out fast tracepoint jumps.
2758 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2759 (set_fast_tracepoint_jump): Declare.
2760 (delete_fast_tracepoint_jump)
2761 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2762 (reinsert_fast_tracepoint_jumps_at): Declare.
2763 * regcache.c: Don't compile many functions when building the
2764 in-process agent library.
2765 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2766 the register buffer in the heap.
2767 (free_register_cache): If the register buffer isn't owned by the
2768 regcache, don't free it.
2769 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2770 pre-existing register caches.
2771 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2772 type.
2773 (convert_ascii_to_int): : Constify `from' parameter type.
2774 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2775 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2776 the needed buffer in-place.
2777 (relocate_instruction): New.
2778 * server.c (handle_query) <qSymbols>: If the target supports
2779 tracepoints, give it a chance of looking up symbols. Report
2780 support for fast tracepoints.
2781 (handle_status): Stabilize threads.
2782 (process_serial_event): Adjust.
2783 * server.h (struct fast_tracepoint_jump): Forward declare.
2784 (struct process_info) <fast_tracepoint_jumps>: New field.
2785 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2786 (decode_X_packet, decode_M_packet): Adjust.
2787 (relocate_instruction): Declare.
2788 (in_process_agent_loaded): Declare.
2789 (tracepoint_look_up_symbols): Declare.
2790 (struct fast_tpoint_collect_status): Declare.
2791 (fast_tracepoint_collecting): Declare.
2792 (force_unlock_trace_buffer): Declare.
2793 (handle_tracepoint_bkpts): Declare.
2794 (initialize_low_tracepoint)
2795 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2796 * target.h (struct target_ops) <stabilize_threads,
2797 install_fast_tracepoint_jump_pad>: New fields.
2798 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2799 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2800 [HAVE_STDINT_H]: Include stdint.h.
2801 (trace_debug_1): Rename to ...
2802 (trace_vdebug): ... this.
2803 (trace_debug): Rename to ...
2804 (trace_debug_1): ... this. Add `level' parameter.
2805 (trace_debug): New.
2806 (ATTR_USED, ATTR_NOINLINE): New.
2807 (IP_AGENT_EXPORT): New.
2808 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2809 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2810 (about_to_request_buffer_space, trace_buffer_is_full)
2811 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2812 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2813 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2814 (traceframe_write_count, traceframes_created)
2815 (trace_state_variables)
2816 New renaming defines.
2817 (struct ipa_sym_addresses): New.
2818 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2819 (symbol_list): New.
2820 (ipa_sym_addrs): New.
2821 (all_tracepoint_symbols_looked_up): New.
2822 (in_process_agent_loaded): New.
2823 (write_e_ipa_not_loaded): New.
2824 (maybe_write_ipa_not_loaded): New.
2825 (tracepoint_look_up_symbols): New.
2826 (debug_threads) [IN_PROCESS_AGENT]: New.
2827 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2828 (UNKNOWN_SIDE_EFFECTS): New.
2829 (stop_tracing): New.
2830 (flush_trace_buffer): New.
2831 (stop_tracing_bkpt): New.
2832 (flush_trace_buffer_bkpt): New.
2833 (read_inferior_integer): New.
2834 (read_inferior_uinteger): New.
2835 (read_inferior_data_pointer): New.
2836 (write_inferior_data_pointer): New.
2837 (write_inferior_integer): New.
2838 (write_inferior_uinteger): New.
2839 (struct collect_static_trace_data_action): Delete.
2840 (enum tracepoint_type): New.
2841 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
2842 <actions_str, step_actions, step_actions_str>: Only include in
2843 GDBserver.
fa593d66
PA
2844 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2845 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2846 (tracepoints): Use IP_AGENT_EXPORT.
2847 (last_tracepoint): Don't include in the IPA.
2848 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2849 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2850 (alloced_trace_state_variables): New.
2851 (trace_state_variables): Use IP_AGENT_EXPORT.
2852 (traceframe_t): Delete unused variable.
2853 (circular_trace_buffer): Don't include in the IPA.
2854 (trace_buffer_start): Delete.
2855 (struct trace_buffer_control): New.
2856 (trace_buffer_free): Delete.
2857 (struct ipa_trace_buffer_control): New.
2858 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2859 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2860 New.
2861 (trace_buffer_ctrl): New.
2862 (TRACE_BUFFER_CTRL_CURR): New.
2863 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2864 Reimplement as macros.
2865 (trace_buffer_wrap): Delete.
2866 (traceframe_write_count, traceframe_read_count)
2867 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2868 (struct tracepoint_hit_ctx) <type>: New field.
2869 (struct fast_tracepoint_ctx): New.
2870 (memory_barrier): New.
2871 (cmpxchg): New.
2872 (record_tracepoint_error): Update atomically in the IPA.
2873 (clear_inferior_trace_buffer): New.
2874 (about_to_request_buffer_space): New.
2875 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2876 updating the same buffer.
2877 (add_tracepoint): Default the tracepoint's type to trap
2878 tracepoint, and orig_size to -1.
2879 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2880 internal variables.
2881 (create_trace_state_variable): New parameter `gdb'. Handle it.
2882 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2883 (cmd_qtdp): Handle fast tracepoints.
2884 (cmd_qtdv): Adjust.
2885 (max_jump_pad_size): New.
2886 (gdb_jump_pad_head): New.
2887 (get_jump_space_head): New.
2888 (claim_jump_space): New.
2889 (sort_tracepoints): New.
2890 (MAX_JUMP_SIZE): New.
2891 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2892 IPA.
2893 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2894 support. Upload fast traceframes, and delete internal IPA
2895 breakpoints.
2896 (stop_tracing_handler): New.
2897 (flush_trace_buffer_handler): New.
2898 (cmd_qtstop): Upload fast tracepoints.
2899 (response_tracepoint): Handle fast tracepoints.
2900 (tracepoint_finished_step): Upload fast traceframes. Set the
2901 tracepoint hit context's tracepoint type.
2902 (handle_tracepoint_bkpts): New.
2903 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2904 type. Add comment about fast tracepoints.
2905 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2906 non-existing action_str field.
2907 (get_context_regcache): Handle fast tracepoints.
2908 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2909 to the regcache.
2910 (fast_tracepoint_from_jump_pad_address): New.
2911 (fast_tracepoint_from_ipa_tpoint_address): New.
2912 (collecting_t): New.
2913 (force_unlock_trace_buffer): New.
2914 (fast_tracepoint_collecting): New.
2915 (collecting): New.
2916 (gdb_collect): New.
2917 (write_inferior_data_ptr): New.
2918 (target_tp_heap): New.
2919 (target_malloc): New.
2920 (download_agent_expr): New.
2921 (UALIGN): New.
2922 (download_tracepoints): New.
2923 (download_trace_state_variables): New.
2924 (upload_fast_traceframes): New.
2925 (IPA_FIRST_TRACEFRAME): New.
2926 (IPA_NEXT_TRACEFRAME_1): New.
2927 (IPA_NEXT_TRACEFRAME): New.
2928 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2929 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2930 (gdb_jump_pad_buffer_end): New.
2931 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2932 (initialize_tracepoint): Adjust.
2933 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2934 buffer. Initialize the low module.
2935 * utils.c (PREFIX, TOOLNAME): New.
2936 (malloc_failure): Use PREFIX.
2937 (error): In the IPA, an error causes an exit.
2938 (fatal, warning): Use PREFIX.
2939 (internal_error): Use TOOLNAME.
2940 (NUMCELLS): Increase to 10.
2941 * configure, config.in: Regenerate.
2942
d149dd1d
PA
29432010-06-01 Pedro Alves <pedro@codesourcery.com>
2944
2945 * server.c (handle_query) <qSupported>: Do two passes over the
2946 qSupported string to avoid nesting strtok.
2947
f6528abd
JK
29482010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2949
2950 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2951 (CDEPS): New.
2952 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2953 -Wl,--dynamic-list.
2954 * configure: Regenerate.
2955 * proc-service.list: New.
2956
ca2a87a0
JK
29572010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2958
2959 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2960 New comment.
2961
363a6e9f
OS
29622010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2963
2964 * gdbreplay.c (remote_open): Check error return from socket() call by
2965 its equality to -1 not by it being negative.
2966 * remote-utils.c (remote_open): Likewise.
2967
d23b6cb1
PA
29682010-05-23 Pedro Alves <pedro@codesourcery.com>
2969
2970 * config.h: Regenerate.
2971
28d3cf85
MK
29722010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2973
2974 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2975 doesn't provide PTRACE_GET_THREAD_AREA.
2976
fea36a59
MK
29772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2978
2979 * linux-m68k-low.c: Include <asm/ptrace.h>
2980 (ps_get_thread_area): Implement.
2981
24b066ba
DE
29822010-05-03 Doug Evans <dje@google.com>
2983
2984 * event-loop.c (struct callback_event): New struct.
2985 (callback_list): New global.
2986 (append_callback_event, delete_callback_event): New functions.
2987 (process_callback): New function.
2988 (start_event_loop): Call it.
2989 * remote-utils.c (NOT_SCHEDULED): Define.
2990 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2991 moved out of readchar.
2992 (readchar): Rewrite. Call reschedule before returning.
2993 (reset_readchar): New function.
2994 (remote_close): Call it.
2995 (process_remaining, reschedule): New functions.
2996 * server.h (callback_handler_func): New typedef.
2997 (append_callback_event, delete_callback_event): Declare.
2998
9836d6ea
PA
29992010-05-03 Pedro Alves <pedro@codesourcery.com>
3000
3001 * proc-service.c (ps_pglobal_lookup): Use
3002 thread_db_look_up_one_symbol.
3003 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3004 parameter. Use it instead of all_symbols_looked_up.
3005 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3006 field.
3007 (all_symbols_looked_up): Don't declare.
3008 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3009 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3010 field.
3011 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3012 Set all_symbols_looked_up here.
3013 (thread_db_look_up_one_symbol): New.
3014 (thread_db_get_tls_address): Adjust.
3015 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3016 thread_db object on the heap, and tentatively set it in the
3017 process structure.
3018 (thread_db_init): Don't set all_symbols_looked_up here.
3019 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3020
7984d532
PA
30212010-05-03 Pedro Alves <pedro@codesourcery.com>
3022
3023 * linux-low.c (linux_kill, linux_detach): Adjust.
3024 (status_pending_p_callback): Remove redundant statement. Check
3025 for !TARGET_WAITIKIND_IGNORE, instead of
3026 TARGET_WAITKIND_STOPPED.
3027 (handle_tracepoints): Make sure LWP is locked. Adjust.
3028 (linux_wait_for_event_1): Adjust.
3029 (linux_cancel_breakpoints): New.
3030 (unsuspend_one_lwp): New.
3031 (unsuspend_all_lwps): New.
3032 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3033 (send_sigstop_callback): Change return type to int, add new
3034 `except' parameter and handle it.
3035 (suspend_and_send_sigstop_callback): New.
3036 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3037 pass them down. If SUSPEND, also increment the lwp's suspend
3038 count.
3039 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3040 (need_step_over_p): Don't consider suspended LWPs.
3041 (start_step_over): Adjust.
3042 (proceed_one_lwp): Change return type to int, add new `except'
3043 parameter and handle it.
3044 (unsuspend_and_proceed_one_lwp): New.
3045 (proceed_all_lwps): Use find_inferior instead of
3046 for_each_inferior.
3047 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3048 also decrement the suspend count of LWPs. Pass `except' down,
3049 instead of hacking its suspend count.
3050 (linux_pause_all): Add `freeze' parameter. Adjust.
3051 (linux_unpause_all): New.
3052 (linux_target_ops): Install linux_unpause_all.
3053 * server.c (handle_status): Adjust.
3054 * target.h (struct target_ops): New fields `unpause_all' and
3055 `cancel_breakpoints'. Add new parameter to `pause_all'.
3056 (pause_all): Add new `freeze' parameter.
3057 (unpause_all): New.
3058 (cancel_breakpoints): New.
3059 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3060 cancel breakpoints.
3061 (cmd_qtstart): Pause threads.
3062 (stop_tracing): Pause threads, and cancel breakpoints.
3063 * win32-low.c (win32_target_ops): Adjust.
3064
e471f25b
PA
30652010-05-03 Pedro Alves <pedro@codesourcery.com>
3066
3067 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3068 the inferior right away from here...
3069 (linux_wait_1): ... to here, and adjust to check the thread's
3070 last_resume_kind instead of the lwp's step or stop_expected flags.
3071
1915ef4f
PA
30722010-05-02 Pedro Alves <pedro@codesourcery.com>
3073
3074 * README: Use consistent `GDB' and `GDBserver' spellings.
3075
f9e39928
PA
30762010-05-02 Pedro Alves <pedro@codesourcery.com>
3077
3078 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3079 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3080 (linux_detach_one_lwp): Assume the lwp is stopped.
3081 (any_thread_of): Delete.
3082 (linux_detach): Stop all lwps here. Don't blindly delete all
3083 breakpoints.
3084 (delete_lwp_callback): New.
3085 (linux_mourn): Delete all lwps of the process that is gone.
3086 (linux_wait_1): Don't delete the last lwp of the process here.
3087 * mem-break.h (mark_breakpoints_out): Declare.
3088 * mem-break.c (mark_breakpoints_out): New.
3089 (free_all_breakpoints): Use it.
3090 * server.c (handle_target_event): If the process is gone, mark
3091 breakpoints out.
3092 * thread-db.c (struct thread_db) <create_bp>: New field.
3093 (thread_db_enable_reporting): Fix prototype. Store a thread event
3094 breakpoint reference in the thread_db struct.
3095 (thread_db_load_search): Clear the thread_db object.
3096 (try_thread_db_load_1): Ditto.
3097 (switch_to_process): New.
3098 (disable_thread_event_reporting): Use it.
3099 (remove_thread_event_breakpoints): New.
3100 (thread_db_detach, thread_db_mourn): Use it.
3101
1e7fc18c
PA
31022010-05-01 Pedro Alves <pedro@codesourcery.com>
3103
3104 * linux-low.c (linux_enable_event_reporting): New.
3105 (linux_wait_for_event_1, handle_extended_wait): Use it.
3106
02fc4de7
PA
31072010-04-30 Pedro Alves <pedro@codesourcery.com>
3108
3109 * linux-low.c (linux_kill_one_lwp, linux_kill)
3110 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3111 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3112 SIGSTOP even if the LWP is stopped.
3113 (send_sigstop_callback): New.
3114 (stop_all_lwps): Use send_sigstop_callback instead.
3115 (linux_resume_one_thread): Adjust.
3116 (proceed_one_lwp): Still proceed an LWP that the client has
3117 requested to stop, if we haven't reported it as stopped yet. Make
3118 sure that LWPs the client want stopped, have a pending SIGSTOP.
3119
bc3b5632
DE
31202010-04-26 Doug Evans <dje@google.com>
3121
ae1ada35
DE
3122 * server.c (handle_general_set): Make static.
3123
bc3b5632
DE
3124 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3125 Print received char after testing for error/eof instead of before.
3126 (input_interrupt): Tweak comment.
3127
65730243
DE
31282010-04-23 Doug Evans <dje@google.com>
3129
3130 * server.c (start_inferior): Print inferior argv if --debug.
3131
a8ae7dc0
AR
31322010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3133
3134 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3135 * nto-x86-low.c: Include server.h
3136
1c07cc19
PM
31372010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3138
3139 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3140 be consistent with other sources of this directory.
3141 (init_registers_amd64): Correct name of source file of this function
3142 in the comment.
3143
e0a61e09
PM
31442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3145
3146 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3147 64-bit executables.
3148
54709339
PM
31492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3150
3151 * win32-i386-low.c: Add 64-bit support.
3152 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3153 (init_registers_amd64): Declare.
3154 (mappings): Add 64-bit version of array.
3155 (init_windows_x86): New function.
3156 (the_low_target): Change init_arch field to init_windows_x86.
3157
e8f0053d
PM
31582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3159
3160 * win32-low.c: Adapt to support also 64-bit architecture.
3161 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3162 (get_image_name): Use SIZE_T type for local variable `done'.
3163 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3164 (toolhelp_get_dll_name): Idem.
3165 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3166 Use uintptr_t typecast to avoid warning.
3167 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3168 (handle_exception): Use phex_nz to avoid warning.
3169 (win32_wait): Remove unused local variable `process'.
3170
c481e77e
PM
31712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3172
3173 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3174 `amd64-avx.o'.
3175
12ea4b69
PM
31762010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3177
3178 * configure.ac: Use `ws2_32' library for srv_mingw.
3179 * configure: Regenerate.
3180 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3181 * remote-utils.c: Likewise.
3182
f6d1620c
L
31832010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3184
3185 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3186 if __x86_64__ is defined.
3187
8e642873
PM
31882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3189
3190 * configure: Regenerate.
3191
711e434b
PM
31922010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3193
3194 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3195 * target.h (target_ops): New get_tib_address field.
3196 * win32-low.h (win32_thread_info): Add thread_local_base field.
3197 * win32-low.c (child_add_thread): Add tlb argument.
3198 Set thread_local_base field to TLB.
3199 (get_child_debug_event): Adapt to child_add_thread change.
3200 (win32_get_tib_address): New function.
3201 (win32_target_ops): Set get_tib_address field to
3202 win32_get_tib_address.
3203 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3204
505106cd
PA
32052010-04-12 Pedro Alves <pedro@codesourcery.com>
3206
505106cd
PA
3207 * linux-low.c (linux_mourn): Also remove the process.
3208 * server.c (handle_target_event): Don't remove the process here.
3209 * nto-low.c (nto_mourn): New.
3210 (nto_target_ops): Install it.
3211 * spu-low.c (spu_mourn): New.
3212 (spu_target_ops): Install it.
3213 * win32-low.c (win32_mourn): New.
3214 (win32_target_ops): Install it.
3215
e8470a06
PA
32162010-04-12 Pedro Alves <pedro@codesourcery.com>
3217
3218 * server.h (buffer_xml_printf): Remove redundant `;'.
3219
45ba0d02
PA
32202010-04-12 Pedro Alves <pedro@codesourcery.com>
3221
3222 * regcache.c (set_register_cache): Invalidate regcaches before
3223 changing the register cache layout.
3224 (regcache_invalidate_one): Allow a NULL regcache.
3225 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3226 regcaches before changing the register cache layout or the target
3227 regsets.
3228
59e04013
L
32292010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3230
3231 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3232 variable warning on Linux/x86-64.
3233
8336d594
PA
32342010-04-11 Pedro Alves <pedro@codesourcery.com>
3235
3236 GDBserver disconnected tracing support.
3237
3238 * linux-low.c (linux_remove_process): Delete.
3239 (add_lwp): Don't set last_resume_kind here.
3240 (linux_kill): Use `mourn'.
3241 (linux_detach): Use `thread_db_detach', and `mourn'.
3242 (linux_mourn): New.
3243 (linux_attach_lwp_1): Adjust comment.
3244 (linux_attach): last_resume_kind moved the thread_info; adjust.
3245 (status_pending_p_callback): Adjust.
3246 (linux_wait_for_event_1): Adjust.
3247 (count_events_callback, select_singlestep_lwp_callback)
3248 (select_event_lwp_callback, cancel_breakpoints_callback)
3249 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3250 (proceed_one_lwp): Adjust.
3251 (linux_async): Add debug output.
3252 (linux_thread_stopped): New.
3253 (linux_pause_all): New.
3254 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3255 linux_pause_all.
3256 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3257 (thread_db_free): Delete declaration.
3258 (thread_db_detach, thread_db_mourn): Declare.
3259 * thread-db.c (thread_db_init): Use thread_db_mourn.
3260 (thread_db_free): Delete, split in two.
3261 (disable_thread_event_reporting): New.
3262 (thread_db_detach): New.
3263 (thread_db_mourn): New.
3264
3265 * server.h (struct thread_info) <last_resume_kind>: New field.
3266 <attached>: Add comment.
3267 <gdb_detached>: New field.
3268 (handler_func): Change return type to int.
3269 (handle_serial_event, handle_target_event): Ditto.
3270 (gdb_connected): Declare.
3271 (tracing): Delete.
3272 (disconnected_tracing): Declare.
3273 (stop_tracing): Declare.
3274
3275 * server.c (handle_query) <qSupported>: Report support for
3276 disconnected tracing.
3277 (queue_stop_reply_callback): Account for running threads.
3278 (gdb_wants_thread_stopped): New.
3279 (gdb_wants_all_threads_stopped): New.
3280 (gdb_reattached_process): New.
3281 (handle_status): Clear the `gdb_detached' flag of all processes.
3282 In all-stop, stop all threads.
3283 (main): Be sure to leave tfind mode. Handle disconnected tracing.
3284 (process_serial_event): If the remote connection breaks, or if an
3285 exit was forced with "monitor exit", force an event loop exit.
3286 Handle disconnected tracing on detach.
3287 (handle_serial_event): Adjust.
3288 (handle_target_event): If GDB isn't connected, forward events back
3289 to the inferior, unless the last process exited, in which case,
3290 exit gdbserver. Adjust interface.
3291
3292 * remote-utils.c (remote_open): Don't block in accept. Instead
3293 register an event loop source on the listen socket file
3294 descriptor. Refactor bits into ...
3295 (listen_desc): ... this new global.
3296 (gdb_connected): ... this new function.
3297 (enable_async_notification): ... this new function.
3298 (handle_accept_event): ... this new function.
3299 (remote_close): Clear remote_desc.
3300
3301 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3302
3303 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3304 New fields.
3305 (mourn_inferior): Define.
3306 (target_process_qsupported): Avoid the dangling else problem.
3307 (thread_stopped): Define.
3308 (pause_all): Define.
3309 (target_waitstatus_to_string): Declare.
3310 * target.c (target_waitstatus_to_string): New.
3311
3312 * tracepoint.c (tracing): Make extern.
3313 (disconnected_tracing): New.
3314 (stop_tracing): Make extern. Handle tracing stops due to GDB
3315 disconnecting.
3316 (cmd_qtdisconnected): New.
3317 (cmd_qtstatus): Report disconnected tracing status in trace reply.
3318 (handle_tracepoint_general_set): Handle QTDisconnected.
3319
3320 * event-loop.c (event_handler_func): Change return type to int.
3321 (process_event): Bail out if the event handler wants the event
3322 loop to stop.
3323 (handle_file_event): Ditto.
3324 (start_event_loop): Bail out if the event handler wants the event
3325 loop to stop.
3326
3327 * nto-low.c (nto_target_ops): Adjust.
3328 * spu-low.c (spu_wait): Don't remove the process here.
3329 (spu_target_ops): Adjust.
3330 * win32-low.c (win32_wait): Don't remove the process here.
3331 (win32_target_ops): Adjust.
3332
5d267c4c
PA
33332010-04-11 Pedro Alves <pedro@codesourcery.com>
3334
3335 * regcache.c (realloc_register_cache): Invalidate inferior's
3336 regcache before recreating it.
3337
623ccd72
PA
33382010-04-09 Pedro Alves <pedro@codesourcery.com>
3339
3340 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
3341
219f2f23
PA
33422010-04-09 Stan Shebs <stan@codesourcery.com>
3343 Pedro Alves <pedro@codesourcery.com>
3344
3345 * server.h (LONGEST): New.
3346 (struct thread_info) <while_stepping>: New field.
3347 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3348 Declare.
3349 (initialize_tracepoint, handle_tracepoint_general_set)
3350 (handle_tracepoint_query, tracepoint_finished_step)
3351 (tracepoint_was_hit, release_while_stepping_state_list):
3352 (current_traceframe): Declare.
3353 * server.c (handle_general_set): Handle tracepoint packets.
3354 (read_memory): New.
3355 (write_memory): New.
3356 (handle_search_memory_1): Use read_memory.
3357 (handle_query): Report support for conditional tracepoints, trace
3358 state variables, and tracepoint sources. Handle tracepoint
3359 queries.
3360 (main): Initialize the tracepoints module.
3361 (process_serial_event): Handle traceframe reads/writes.
3362
3363 * linux-low.c (handle_tracepoints): New.
3364 (linux_wait_1): Call it.
3365 (linux_resume_one_lwp): Handle while-stepping.
3366 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3367 (linux_target_ops): Install them.
3368 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3369 New field.
3370 * linux-x86-low.c (x86_supports_tracepoints): New.
3371 (the_low_target). Install it.
3372
3373 * mem-break.h (delete_breakpoint): Declare.
3374 * mem-break.c (delete_breakpoint): Make external.
3375
3376 * target.h (struct target_ops): Add `supports_tracepoints',
3377 `read_pc', and `write_pc' fields.
3378 (target_supports_tracepoints): Define.
3379 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3380 (phex_nz): New.
3381
3382 * regcache.h (struct regcache) <registers_owned>: New field.
3383 (init_register_cache, regcache_cpy): Declare.
3384 (regcache_read_pc, regcache_write_pc): Declare.
3385 (register_cache_size): Declare.
3386 (supply_regblock): Declare.
3387 * regcache.c (init_register_cache): New.
3388 (new_register_cache): Use it.
3389 (regcache_cpy): New.
3390 (register_cache_size): New.
3391 (supply_regblock): New.
3392 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 3393
219f2f23
PA
3394 * tracepoint.c: New.
3395
3396 * Makefile.in (OBS): Add tracepoint.o.
3397 (tracepoint.o): New rule.
3398
3a13a53b
L
33992010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3400
3401 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3402 (i386-mmx.o): New.
3403 (i386-mmx.c): Likewise.
3404 (i386-mmx-linux.o): Likewise.
3405 (i386-mmx-linux.c): Likewise.
3406
3407 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3408 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3409 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3410 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3411
3412 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3413 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3414 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3415
1570b33e
L
34162010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3417
3418 * Makefile.in (clean): Updated.
3419 (i386-avx.o): New.
3420 (i386-avx.c): Likewise.
3421 (i386-avx-linux.o): Likewise.
3422 (i386-avx-linux.c): Likewise.
3423 (amd64-avx.o): Likewise.
3424 (amd64-avx.c): Likewise.
3425 (amd64-avx-linux.o): Likewise.
3426 (amd64-avx-linux.c): Likewise.
3427
3428 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3429 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3430 (srv_amd64_regobj): Add amd64-avx.o.
3431 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3432 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3433 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3434 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3435 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3436 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3437 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3438
3439 * i387-fp.c: Include "i386-xstate.h".
3440 (i387_xsave): New.
3441 (i387_cache_to_xsave): Likewise.
3442 (i387_xsave_to_cache): Likewise.
3443 (x86_xcr0): Likewise.
3444
3445 * i387-fp.h (i387_cache_to_xsave): Likewise.
3446 (i387_xsave_to_cache): Likewise.
3447 (x86_xcr0): Likewise.
3448
3449 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3450 * linux-crisv32-low.c (target_regsets): Likewise.
3451 * linux-m68k-low.c (target_regsets): Likewise.
3452 * linux-mips-low.c (target_regsets): Likewise.
3453 * linux-ppc-low.c (target_regsets): Likewise.
3454 * linux-s390-low.c (target_regsets): Likewise.
3455 * linux-sh-low.c (target_regsets): Likewise.
3456 * linux-sparc-low.c (target_regsets): Likewise.
3457 * linux-xtensa-low.c (target_regsets): Likewise.
3458
3459 * linux-low.c: Include <sys/uio.h>.
3460 (regsets_fetch_inferior_registers): Support nt_type.
3461 (regsets_store_inferior_registers): Likewise.
3462 (linux_process_qsupported): New.
3463 (linux_target_ops): Add linux_process_qsupported.
3464
3465 * linux-low.h (regset_info): Add nt_type.
3466 (linux_target_ops): Add process_qsupported.
3467
3468 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3469 and <sys/uio.h>.
3470 (init_registers_i386_avx_linux): New.
3471 (init_registers_amd64_avx_linux): Likewise.
3472 (xmltarget_i386_linux_no_xml): Likewise.
3473 (xmltarget_amd64_linux_no_xml): Likewise.
3474 (PTRACE_GETREGSET): Likewise.
3475 (PTRACE_SETREGSET): Likewise.
3476 (x86_fill_xstateregset): Likewise.
3477 (x86_store_xstateregset): Likewise.
3478 (use_xml): Likewise.
3479 (x86_linux_update_xmltarget): Likewise.
3480 (x86_linux_process_qsupported): Likewise.
3481 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3482 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3483 init_registers_i386_linux here. Call
3484 x86_linux_update_xmltarget.
3485 (the_low_target): Add x86_linux_process_qsupported.
3486
3487 * server.c (handle_query): Call target_process_qsupported.
3488
3489 * target.h (target_ops): Add process_qsupported.
3490 (target_process_qsupported): New.
3491
fc7238bb
PA
34922010-04-03 Pedro Alves <pedro@codesourcery.com>
3493
3494 * inferiors.c (add_thread): Set last_status kind to
3495 TARGET_WAITKIND_IGNORE.
3496 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3497 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3498 (linux_wait_1): Move `thread' local definition to block that uses
3499 it. Don't NULL initialize `event_child'.
3500 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3501 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3502 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3503
bdabb078
PA
35042010-04-01 Pedro Alves <pedro@codesourcery.com>
3505
3506 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3507 an extended waitstatus, or by a watchpoint.
3508 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3509 thread was stepping or has been stopped by a watchpoint.
3510
d3bbe7a0
PA
35112010-04-01 Pedro Alves <pedro@codesourcery.com>
3512
3513 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3514 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3515 of another, then delete the previous, and validate all
3516 breakpoints.
3517 (validate_inserted_breakpoint): New.
3518 (delete_disabled_breakpoints): New.
3519 (validate_breakpoints): New.
3520 (check_mem_read): Validate breakpoints before trusting their
3521 shadow. Delete disabled breakpoints.
3522 (check_mem_write): Validate breakpoints before trusting they
3523 should be inserted. Delete disabled breakpoints.
3524 * mem-break.h (validate_breakpoints):
3525 * server.c (handle_query): Validate breakpoints when we see a
3526 qSymbol query.
3527
8b07ae33
PA
35282010-04-01 Pedro Alves <pedro@codesourcery.com>
3529
3530 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3531 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3532 if we could tell there's a GDB breakpoint at stop_pc.
3533 (need_step_over_p): Don't do a step over if we find a GDB
3534 breakpoint at the resume PC.
3535
3536 * mem-break.c (struct raw_breakpoint): New.
3537 (enum bkpt_type): New type `gdb_breakpoint'.
3538 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3539 fields. New field `raw'.
3540 (find_raw_breakpoint_at): New.
3541 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3542 breakpoint instead.
3543 (set_breakpoint_at): Adjust.
3544 (delete_raw_breakpoint): New.
3545 (release_breakpoint): New.
3546 (delete_breakpoint): Rename to...
3547 (delete_breakpoint_1): ... this. Add proc parameter. Use
3548 release_breakpoint. Return ENOENT.
3549 (delete_breakpoint): Reimplement.
3550 (find_breakpoint_at): Delete.
3551 (find_gdb_breakpoint_at): New.
3552 (delete_breakpoint_at): Delete.
3553 (set_gdb_breakpoint_at): New.
3554 (delete_gdb_breakpoint_at): New.
3555 (gdb_breakpoint_here): New.
3556 (set_reinsert_breakpoint): Use release_breakpoint.
3557 (uninsert_breakpoint): Rename to ...
3558 (uninsert_raw_breakpoint): ... this.
3559 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3560 (reinsert_raw_breakpoint): Change parameter type to
3561 raw_breakpoint.
3562 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3563 instead.
3564 (check_breakpoints): Adjust. Use release_breakpoint.
3565 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3566 (breakpoint_inserted_here): Ditto.
3567 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3568 Don't trust the breakpoint's shadow if it is not inserted.
3569 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3570 (delete_all_breakpoints): Adjust.
3571 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3572 use delete_breakpoint_1.
3573
3574 * mem-break.h (breakpoints_supported): Delete declaration.
3575 (set_gdb_breakpoint_at): Declare.
3576 (gdb_breakpoint_here): Declare.
3577 (delete_breakpoint_at): Delete.
3578 (delete_gdb_breakpoint_at): Declare.
3579
3580 * server.h (struct raw_breakpoint): Forward declare.
3581 (struct process_info): New field `raw_breakpoints'.
3582
3583 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3584 breakpoints.
3585
6bf5e0ba
PA
35862010-03-24 Pedro Alves <pedro@codesourcery.com>
3587
3588 * linux-low.c (status_pending_p_callback): Fix comment.
3589 (linux_wait_for_event_1): Move most of the internal breakpoint
3590 handling from here...
3591 (linux_wait_1): ... to here.
3592 (count_events_callback): New.
3593 (select_singlestep_lwp_callback): New.
3594 (select_event_lwp_callback): New.
3595 (cancel_breakpoints_callback): New.
3596 (select_event_lwp): New.
3597 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3598 priority to all LWPs that have had events that should be reported
3599 to the client. Cancel breakpoints when about to reporting the
3600 event to the client, not while stopping lwps. No longer cancel
3601 finished single-steps here.
3602 (cancel_finished_single_step): Delete.
3603 (cancel_finished_single_steps): Delete.
3604
414a389f
PA
36052010-03-24 Pedro Alves <pedro@codesourcery.com>
3606
3607 * mem-break.c (enum bkpt_type): New.
3608 (struct breakpoint): New field `type'.
3609 (set_breakpoint_at): Change return type to struct breakpoint
3610 pointer. Set type to `other_breakpoint' by default.
3611 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3612 in the breakpoint list.
3613 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3614 (reinsert_breakpoint): Rename to ...
3615 (reinsert_raw_breakpoint): ... this.
3616 (reinsert_breakpoints_at): Adjust.
3617 * mem-break.h (struct breakpoint): Declare.
3618 (set_breakpoint_at): Change return type to struct breakpoint
3619 pointer.
3620
2280c721
PA
36212010-03-24 Pedro Alves <pedro@codesourcery.com>
3622
3623 * server.c (handle_query): Assign, not compare.
3624
d50171e4
PA
36252010-03-24 Pedro Alves <pedro@codesourcery.com>
3626
3627 Teach linux gdbserver to step-over-breakpoints.
3628
3629 * linux-low.c (can_hardware_single_step): New.
3630 (supports_breakpoints): New.
3631 (handle_extended_wait): If stopping threads, read the stop pc of
3632 the new cloned LWP.
3633 (get_pc): New.
3634 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3635 low target doesn't support retrieving the PC.
3636 (add_lwp): Set last_resume_kind to resume_continue.
3637 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3638 (linux_attach): Don't clear stop_expected. Set the lwp's
3639 last_resume_kind to resume_stop.
3640 (linux_detach_one_lwp): Don't check for removed breakpoints.
3641 (check_removed_breakpoint): Delete.
3642 (status_pending_p): Rename to ...
3643 (status_pending_p_callback): ... this. Don't check for removed
3644 breakpoints. Don't consider threads that are stopped from GDB's
3645 perspective.
3646 (linux_wait_for_lwp): Always read the stop_pc here.
3647 (cancel_breakpoint): New.
3648 (step_over_bkpt): New global.
3649 (linux_wait_for_event_1): Implement stepping over breakpoints.
3650 (gdb_wants_lwp_stopped): New.
3651 (gdb_wants_all_stopped): New.
3652 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3653 single-step traps here. Store the thread's last reported target
3654 wait status.
3655 (send_sigstop): Don't clear stop_expected. Always set it,
3656 instead.
3657 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3658 (cancel_finished_single_step): New.
3659 (cancel_finished_single_steps): New.
3660 (wait_for_sigstop): Don't cancel finished single-step traps here.
3661 (linux_resume_one_lwp): Don't check for removed breakpoints.
3662 Don't set `step' on non-hardware step archs.
3663 (linux_set_resume_request): Ignore resume_stop requests if already
3664 stopping or stopped. Set the lwp's last_resume_kind.
3665 (resume_status_pending_p): Don't check for removed breakpoints.
3666 (need_step_over_p): New.
3667 (start_step_over): New.
3668 (finish_step_over): New.
3669 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3670 requests. Clear the thread's last reported target waitstatus.
3671 Don't use the `suspended' flag. Don't consider pending breakpoints.
3672 (linux_resume): Start a step-over if necessary.
3673 (proceed_one_lwp): New.
3674 (proceed_all_lwps): New.
3675 (unstop_all_lwps): New.
3676 * linux-low.h (struct lwp_info): Rewrite comment for the
3677 `suspended' flag. Add the `stop_pc' field. Delete the
3678 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3679 Add `'last_resume_kind' and `need_step_over' fields.
3680 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3681 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3682 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3683 (set_raw_breakpoint_at): New.
3684 (set_breakpoint_at): Rewrite to use it.
3685 (reinsert_breakpoint_handler): Delete.
3686 (set_reinsert_breakpoint): New.
3687 (reinsert_breakpoint_by_bp): Delete.
3688 (delete_reinsert_breakpoints): New.
3689 (uninsert_breakpoint): Rewrite.
3690 (uninsert_breakpoints_at): New.
3691 (reinsert_breakpoint): Rewrite.
3692 (reinsert_breakpoints_at): New.
3693 (check_breakpoints): Rewrite.
3694 (breakpoint_here): New.
3695 (breakpoint_inserted_here): New.
3696 (check_mem_read): Adjust.
3697 * mem-break.h (breakpoints_supported, breakpoint_here)
3698 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3699 (reinsert_breakpoint_by_bp): Delete declaration.
3700 (delete_reinsert_breakpoints): Declare.
3701 (reinsert_breakpoint): Delete declaration.
3702 (reinsert_breakpoints_at): Declare.
3703 (uninsert_breakpoint): Delete declaration.
3704 (uninsert_breakpoints_at): Declare.
3705 (check_breakpoints): Adjust prototype.
3706 * server.h: Adjust include order.
3707 (struct thread_info): Declare here. Add a `last_status' field.
3708
30ba68cb
MS
37092010-03-23 Michael Snyder <msnyder@vmware.com>
3710
3711 * server.c (crc32): New function.
3712 (handle_query): Add handling for 'qCRC:' request.
3713
b9a881c2
PA
37142010-03-23 Pedro Alves <pedro@codesourcery.com>
3715
3716 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3717 lwp had been stopped by a watchpoint.
3718
e92d13d5
PA
37192010-03-16 Pedro Alves <pedro@codesourcery.com>
3720
3721 * server.h (internal_error): Declare.
3722 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3723 * utils.c (internal_error): New function.
3724
64daa791
AS
37252010-03-15 Andreas Schwab <schwab@redhat.com>
3726
3727 * configure.srv: Fix typo setting srv_regobj.
3728
f52cd8cd
PA
37292010-03-15 Pedro Alves <pedro@codesourcery.com>
3730
3731 * linux-low.c (fetch_register): Avoid passing a non string literal
3732 format to `error'.
3733 (usr_store_inferior_registers): Ditto.
3734
93ae6fdc
PA
37352010-03-14 Pedro Alves <pedro@codesourcery.com>
3736
3737 * linux-low.c (linux_write_memory): Bail out early if peeking
3738 memory failed.
3739
c3adc08c
PA
37402010-03-14 Pedro Alves <pedro@codesourcery.com>
3741
3742 * linux-low.h (struct lwp_info): New fields
3743 `stopped_by_watchpoint' and `stopped_data_address'.
3744 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3745 here, and cache them in the lwp object.
3746 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3747 directly.
3748 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3749 field.
3750 (linux_stopped_by_watchpoint): Rewrite.
3751 (linux_stopped_data_address): Rewrite.
3752
bce522a2
PA
37532010-03-06 Simo Melenius <simo.melenius@iki.fi>
3754
3755 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3756 switching the current inferior, not before.
3757
90884b2b
L
37582010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3759
3760 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3761 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3762 i386-linux.c and amd64-linux.c.
3763 (reg-i386.o): Removed.
3764 (reg-i386.c): Likewise.
3765 (reg-i386-linux.o): Likewise.
3766 (reg-i386-linux.c): Likewise.
3767 (reg-x86-64.o): Likewise.
3768 (reg-x86-64.c): Likewise.
3769 (reg-x86-64-linux.o): Likewise.
3770 (reg-x86-64-linux.c): Likewise.
3771 (i386.o): New.
3772 (i386.c): Likewise.
3773 (i386-linux.o): Likewise.
3774 (i386-linux.c): Likewise.
3775 (amd64.o): Likewise.
3776 (amd64.c): Likewise.
3777 (amd64-linux.o): Likewise.
3778 (amd64-linux.c): Likewise.
3779
3780 * configure.srv (srv_i386_regobj): New.
3781 (srv_i386_linux_regobj): Likewise.
3782 (srv_amd64_regobj): Likewise.
3783 (srv_amd64_linux_regobj): Likewise.
3784 (srv_i386_32bit_xmlfiles): Likewise.
3785 (srv_i386_64bit_xmlfiles): Likewise.
3786 (srv_i386_xmlfiles): Likewise.
3787 (srv_amd64_xmlfiles): Likewise.
3788 (srv_i386_linux_xmlfiles): Likewise.
3789 (srv_amd64_linux_xmlfiles): Likewise.
3790 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3791 srv_xmlfiles to $srv_i386_xmlfiles.
3792 (i[34567]86-*-mingw32ce*): Likewise.
3793 (i[34567]86-*-mingw*): Likewise.
3794 (i[34567]86-*-nto*): Likewise.
3795 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3796 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3797 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3798 (x86_64-*-linux*): Likewise.
3799
3800 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3801 (init_registers_amd64_linux): New.
3802 (x86_arch_setup): Replace init_registers_x86_64_linux with
3803 init_registers_amd64_linux.
3804
193f13e6
MK
38052010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3806
3807 * configure.ac: Check for libdl. If it is not available link against
3808 static libthread_db.
3809 * configure: Regenerate.
3810
85d721b8
PA
38112010-02-22 Pedro Alves <pedro@codesourcery.com>
3812
3813 PR9605
3814
3815 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3816 handing a read watchpoint.
3817 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3818
6076632b
DE
38192010-02-12 Doug Evans <dje@google.com>
3820
3821 * linux-low.c (linux_supports_tracefork_flag): Document.
3822 (linux_look_up_symbols): Add comment.
3823
3327ccf7
L
38242010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3825
3826 * regcache.c (supply_register): Clear regcache if buf is NULL.
3827
0718675c 38282010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 3829 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
3830
3831 * inferiors.c (find_inferior): Add function documentation.
3832 (unloaded_dll): Handle the case where the unloaded dll has not
3833 been previously registered in the dll list.
3834
177321bd
DJ
38352010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3836
3837 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3838 (thumb2_breakpoint): New.
3839 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3840
2b009048
DJ
38412010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3842
3843 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3844 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3845 breakpoints.
3846
3be029c7
PA
38472010-01-21 Pedro Alves <pedro@codesourcery.com>
3848
3849 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3850
18f5de3b
JK
38512010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3852
3853 * linux-s390-low.c (s390_collect_ptrace_register)
3854 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3855
3743bb4f
DE
38562010-01-21 Doug Evans <dje@google.com>
3857
14ce3065
DE
3858 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3859 (PTRACE_ARG4_TYPE): New macro.
3860 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3861 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3862 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3863 (usr_store_inferior_registers): Ditto.
3864 (linux_read_memory, linux_write_memory): Ditto.
3865 (linux_test_for_tracefork): Ditto.
3866
3743bb4f
DE
3867 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3868 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3869
8b315be5
PA
38702010-01-21 Pedro Alves <pedro@codesourcery.com>
3871
3872 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3873 target.
3874
85492558
PA
38752010-01-21 Pedro Alves <pedro@codesourcery.com>
3876
3877 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3878 prototype to take a regcache. Adjust.
3879
442ea881
PA
38802010-01-20 Pedro Alves <pedro@codesourcery.com>
3881
3882 * regcache.h (struct thread_info): Forward declare.
3883 (struct regcache): New.
3884 (new_register_cache): Adjust prototype.
3885 (get_thread_regcache): Declare.
3886 (free_register_cache): Adjust prototype.
3887 (registers_to_string, registers_from_string): Ditto.
3888 (supply_register, supply_register_by_name, collect_register)
3889 (collect_register_as_string, collect_register_by_name): Ditto.
3890 * regcache.c (struct inferior_regcache_data): Delete.
3891 (get_regcache): Rename to ...
3892 (get_thread_regcache): ... this. Adjust. Switch inferior before
3893 fetching registers.
3894 (regcache_invalidate_one): Adjust.
3895 (regcache_invalidate): Fix prototype.
3896 (new_register_cache): Return the new register cache.
3897 (free_register_cache): Change prototype.
3898 (realloc_register_cache): Adjust.
3899 (registers_to_string): Change prototype to take a regcache. Adjust.
3900 (registers_from_string): Ditto.
3901 (register_data): Ditto.
3902 (supply_register): Ditto.
3903 (supply_register_by_name): Ditto.
3904 (collect_register): Ditto.
3905 (collect_register_as_string): Ditto.
3906 (collect_register_by_name): Ditto.
3907 * server.c (process_serial_event): Adjust.
3908 * linux-low.h (regset_fill_func, regset_store_func): Change
3909 prototype.
3910 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3911 Change prototype.
3912 * linux-low.c (get_stop_pc): Adjust.
3913 (check_removed_breakpoint): Adjust.
3914 (linux_wait_for_event): Adjust.
3915 (linux_resume_one_lwp): Adjust.
3916 (fetch_register): Add regcache parameter. Adjust.
3917 (usr_store_inferior_registers): Ditto.
3918 (regsets_fetch_inferior_registers): Ditto.
3919 (regsets_store_inferior_registers): Ditto.
3920 (linux_fetch_registers, linux_store_registers): Ditto.
3921 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3922 regcache. Adjust.
43aaf8b6
PA
3923 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
3924 Ditto.
442ea881
PA
3925 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3926 prototype to take a regcache.
3927 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3928 * remote-utils.c (convert_ascii_to_int, outreg)
3929 (prepare_resume_reply): Change prototype to take a regcache.
3930 Adjust.
3931 * target.h (struct target_ops) <fetch_registers, store_registers>:
3932 Change prototype to take a regcache.
3933 (fetch_inferior_registers, store_inferior_registers): Change
3934 prototype to take a regcache. Adjust.
3935 * proc-service.c (ps_lgetregs): Adjust.
3936 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3937 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3938 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3939 take a regcache. Adjust.
3940 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3941 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3942 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3943 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3944 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3945 (cris_cannot_fetch_register):
3946 (cris_breakpoint_at): Change prototype to take a regcache.
3947 Adjust.
3948 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3949 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3950 to take a regcache. Adjust.
3951 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3952 Adjust.
3953 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3954 take a regcache. Adjust.
3955 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3956 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3957 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3958 * linux-mips-low.c (mips_get_pc):
3959 (mips_set_pc): Change prototype to take a regcache. Adjust.
3960 (mips_reinsert_addr): Adjust.
3961 (mips_collect_register): Change prototype to take a regcache.
3962 Adjust.
3963 (mips_supply_register):
3964 (mips_collect_register_32bit, mips_supply_register_32bit)
3965 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3966 (mips_store_fpregset): Ditto.
43aaf8b6
PA
3967 * linux-ppc-low.c (ppc_supply_ptrace_register)
3968 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
3969 (parse_spufs_run): Adjust.
3970 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3971 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3972 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3973 take a regcache. Adjust.
3974 * linux-s390-low.c (s390_collect_ptrace_register)
3975 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3976 (s390_set_pc): Change prototype to take a regcache. Adjust.
3977 (s390_arch_setup): Adjust.
3978 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3979 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3980 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3981 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3982 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3983 regcache. Adjust.
3984 (sparc_breakpoint_at): Adjust.
3985 * linux-xtensa-low.c (xtensa_fill_gregset):
3986 (xtensa_store_gregset):
3987 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3988 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3989 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3990 prototype to take a regcache. Adjust.
3991 * win32-arm-low.c (arm_fetch_inferior_register)
3992 (arm_store_inferior_register): Change prototype to take a
3993 regcache. Adjust.
3994 * win32-i386-low.c (i386_fetch_inferior_register)
3995 (i386_store_inferior_register): Change prototype to take a
3996 regcache. Adjust.
3997 * win32-low.c (child_fetch_inferior_registers)
3998 (child_store_inferior_registers): Change prototype to take a
3999 regcache. Adjust.
4000 (win32_wait): Adjust.
4001 (win32_fetch_inferior_registers): Change prototype to take a
4002 regcache. Adjust.
4003 (win32_store_inferior_registers): Adjust.
4004 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4005 store_inferior_register>: Change prototype to take a regcache.
4006
60c3d7b0
DE
40072010-01-20 Doug Evans <dje@google.com>
4008
4009 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4010 #ifdef.
4011 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 4012 (W_STOPCODE): Provide definition if missing.
60c3d7b0 4013
dc146f7c
VP
40142010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4015
4016 * linux-low.c (linux_core_of_thread): New.
4017 (compare_ints, show_process, list_threads): New.
4018 (linux_qxfer_osdata): Report threads and cores.
4019 (linux_target_op): Register linux_core_of_thread.
4020 * remote-utils.c (prepare_resume_reply): Report the core.
4021 (buffer_xml_printf): Support %d specifier.
4022 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4023 New.
4024 (handle_query): Handle qXfer:threads. Announce availability
4025 thereof.
4026 * target.h (struct target_ops): New field core_of_thread.
4027
7803799a
UW
40282010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4029
4030 * Makefile.in (clean): Remove new generated files.
4031 (reg-s390.o, reg-s390.c): Remove rules.
4032 (reg-s390x.o, reg-s390x.c): Likewise.
4033 (s390-linux32.o, s390-linux32.c): Add rules.
4034 (s390-linux64.o, s390-linux64.c): Likewise.
4035 (s390x-linux64.o, s390x-linux64.c): Likewise.
4036 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4037 * linux-s390-low.c: Include <elf.h>.
4038 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4039 (init_registers_s390): Remove prototype.
4040 (init_registers_s390x): Likewise.
4041 (init_registers_s390_linux32): Add prototype.
4042 (init_registers_s390_linux64): Likewise.
4043 (init_registers_s390x_linux64): Likewise.
4044 (s390_num_regs_3264): New define.
4045 (s390_regmap_3264): New global variable.
4046 (s390_cannot_fetch_register): Remove obsolete check.
4047 (s390_cannot_store_register): Likewise.
4048 (s390_collect_ptrace_register): Handle upper/lower register halves.
4049 (s390_supply_ptrace_register): Likewise.
4050 (s390_fill_gregset): Update to register number changes.
4051 (s390_get_hwcap): New routine.
4052 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4053 Install appropriate regmap and register set.
4054
6e7ffa39
JB
40552010-01-01 Joel Brobecker <brobecker@adacore.com>
4056
4057 * server.c (gdbserver_version): Update copyright year to 2010.
4058 * gdbreplay.c (gdbreplay_version): Likewise.
4059
957f3f49
DE
40602009-12-28 Doug Evans <dje@google.com>
4061
4062 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4063 elf/external.h. Include <elf.h> instead but only if necessary.
4064
ca5c370d
PA
40652009-12-28 Pedro Alves <pedro@codesourcery.com>
4066
4067 * linux-low.c (linux_remove_process): Remove `detaching'
4068 parameter. Don't release/detach from thread_db here.
4069 (linux_kill): Release/detach from thread_db here, ...
4070 (linux_detach): ... and here, before actually detaching.
4071 (linux_wait_1): ... and here, when a process exits.
4072 * thread-db.c (any_thread_of): New.
4073 (thread_db_free): Switch the current inferior to a thread of the
4074 passed in process.
4075
4ee62156
DE
40762009-12-21 Doug Evans <dje@google.com>
4077
d90e6a88
DE
4078 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4079
c5f62d5f
DE
4080 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4081 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4082 warning ifndef __NR_tkill. Move setting of errno there too.
4083 Delete unnecessary resetting of errno after syscall.
4084 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4085
10e86dd7
DE
4086 * configure.ac: Check for dladdr.
4087 * config.in: Regenerate.
4088 * configure: Regenerate.
4089 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4090 (try_thread_db_load): Update.
4091
4ee62156
DE
4092 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4093
00f515da
DE
40942009-12-18 Doug Evans <dje@google.com>
4095
e9464885
DE
4096 * event-loop.c: Include unistd.h if it exists.
4097
07d4f67e
DE
4098 * linux-low.c (my_waitpid): Move definition away from being in
4099 between linux_tracefork_child/linux_test_for_tracefork.
4100
00f515da
DE
4101 * gdb_proc_service.h (psaddr_t): Fix type.
4102 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4103 signature to match glibc.
4104
1de1badb
DE
41052009-12-16 Doug Evans <dje@google.com>
4106
4107 * linux-low.c (linux_read_memory): Fix argument to read.
4108
aeeb81d1
PA
41092009-11-26 Pedro Alves <pedro@codesourcery.com>
4110
4111 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4112 events, don't leave current_inferior pointing at null.
4113
10357975
PA
41142009-11-26 Pedro Alves <pedro@codesourcery.com>
4115
4116 * win32-low.c (LOG): Delete.
4117 (OUTMSG): Output to stderr.
4118 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4119 on compile time LOG macro.
4120 (win32_wait): Fix debug output.
4121
cf6e3471
PA
41222009-11-26 Pedro Alves <pedro@codesourcery.com>
4123
4124 * win32-low.c (win32_add_one_solib): If the dll name is
4125 "ntdll.dll", prepend the system directory to the dll path.
4126
0c85e18e
MK
41272009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4128
4129 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4130
9ac544ce 41312009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 4132 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
4133
4134 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4135 * configure.ac: Check for __mcoldfire__ and set
4136 gdb_cv_m68k_is_coldfire.
4137 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4138 reg-cf.o and reg-m68k.o.
4139 * configure: Regenerated.
4140
fd7dd3e6
PA
41412009-11-16 Pedro Alves <pedro@codesourcery.com>
4142
4143 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4144 Pass it to thread_db_free.
4145 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4146 proper `detaching' argument to linux_remove_process.
4147 * linux-low.h (thread_db_free): Add `detaching' parameter.
4148 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4149 to thread_db_free.
4150 (thread_db_free): Add `detaching' parameter. Only
4151 call td_ta_clear_event if detaching from process.
4152
75aa492e
MK
41532009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4154
4155 * thread-db.c (thread_db_free): Fix typo.
4156
21e1bee4
PP
41572009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4158
4159 PR gdb/10838
4160 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4161
8838b45e
NS
41622009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4163
4164 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4165 with an i686 compiler.
4166 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4167 needed.
4168 * configure: Rebuilt.
4169
8a35fb51
SL
41702009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4171
4172 PR gdb/10783
4173
4174 * server.c (handle_search_memory_1): Correct read_addr initialization
4175 in loop for searching subsequent chunks.
4176
96f15937
PP
41772009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4178
4179 * configure.ac: New --with-libthread-db option.
4180 * thread-db.c: Allow direct dependence on libthread_db.
4181 (thread_db_free): Adjust.
4182 * config.in: Regenerate.
4183 * configure: Likewise.
889bf7c5 4184
5f7d1694
PP
41852009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4186
4187 PR gdb/10757
4188 * thread-db.c (attach_thread): New function.
4189 (maybe_attach_thread): Return success/failure.
4190 (find_new_threads_callback): Adjust.
889bf7c5
PA
4191 (thread_db_find_new_threads): Loop until no new threads.
4192
88e3b899
PA
41932009-10-13 Pedro Alves <pedro@codesourcery.com>
4194
4195 * proc-service.c (ps_lgetregs): Formatting.
4196
cdbfd419
PP
41972009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4198
4199 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4200 * configure.ac: Adjust.
4201 * linux-low.h (struct process_info_private): Move members to struct
4202 thread_db.
4203 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4204 * linux-low.c (linux_remove_process): Adjust.
4205 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4206 * server.c (handle_query): Move code ...
4207 (handle_monitor_command): ... here. New function.
4208 * target.h (struct target_ops): New member.
4209 * thread-db.c (struct thread_db): New.
4210 (libthread_db_search_path): New variable.
4211 (thread_db_create_event, thread_db_enable_reporting)
4212 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4213 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4214 (try_thread_db_load_1, dladdr_to_soname): New functions.
4215 (try_thread_db_load, thread_db_load_search): New functions.
4216 (thread_db_init): Search for libthread_db.
4217 (thread_db_free): New function.
4218 (thread_db_handle_monitor_command): Likewise.
4219 * config.in: Regenerate.
4220 * configure: Regenerate.
889bf7c5 4221
4168d2d6
UW
42222009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4223
4224 * spu-low.c (spu_kill): Wait for inferior to terminate.
4225 Call clear_inferiors.
4226 (spu_detach): Call clear_inferiors.
4227
81ecdfbb
RW
42282009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4229
4230 * aclocal.m4: Regenerate.
4231 * config.in: Likewise.
4232 * configure: Likewise.
4233
0b9ff2c0
UW
42342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4235
4236 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4237 (parse_spufs_run): New function.
4238 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4239 (ppc_breakpoint_at): Handle SPU breakpoints.
4240
efcbbd14
UW
42412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4242
4243 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4244 (SPUFS_MAGIC): Define.
4245 (spu_enumerate_spu_ids): New function.
4246 (linux_qxfer_spu): New function.
4247 (linux_target_ops): Install linux_qxfer_spu.
4248
f4d9bade
UW
42492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4250
4251 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4252 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
4253 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4254 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4255 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4256 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4257 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4258 (init_registers_powerpc_cell32l): Add prototype.
4259 (init_registers_powerpc_cell64l): Likewise.
4260 (ppc_arch_setup): Detect Cell/B.E. architecture.
4261
96e946ca
RW
42622009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4263
4264 * Makefile.in (datarootdir): New variable.
4265
58d6951d
DJ
42662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4267
4268 * linux-low.c (linux_write_memory): Update debugging output.
4269 * Makefile.in (clean): Add new descriptions.
4270 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4271 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4272 * configure.srv: Add new files for arm*-*-linux*.
4273 * linux-arm-low.c: Add new declarations.
4274 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4275 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4276 (HWCAP_VFPv3D16): New.
4277 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4278 instead of __IWMMXT__.
4279 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4280 (arm_arch_setup): New.
4281 (target_regsets): Remove #ifdef. Add VFP regset.
4282 (the_low_target): Use arm_arch_setup.
4283
12b42a12
DJ
42842009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4285
4286 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4287 the main thread again.
4288
ac8c974e
AR
42892009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4290
4291 Adding Neutrino gdbserver.
4292 * configure: Regenerated.
4293 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4294 * configure.srv (i[34567]86-*-nto*): New target.
4295 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4296 * remote-utils.c [__QNX__]: Include sys/iomgr.h
4297 (nto_comctrl) [__QNX__]: New function.
4298 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4299
4424e0c3 43002009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
4301
4302 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4303 srv_tgtobj.
4304
912cf4ba
PA
43052009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
4306 Pedro Alves <pedro@codesourcery.com>
4307
4308 * win32-i386-low.c (i386_get_thread_context): Handle systems that
4309 don't support CONTEXT_EXTENDED_REGISTERS.
4310 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4311 (the_low_target): Install them.
4312 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4313 failing with ERROR_PIPE_NOT_CONNECTED.
4314
aa5ca48f
DE
43152009-06-30 Doug Evans <dje@google.com>
4316 Pierre Muller <muller@ics.u-strasbg.fr>
4317
4318 Add h/w watchpoint support to x86-linux, win32-i386.
4319 * Makefile.in (SFILES): Add i386-low.c
4320 (i386_low_h): Define.
4321 (i386-low.o): Add dependencies.
4322 (linux-x86-low.o): Add i386-low.h dependency.
4323 (win32-i386-low.o): Ditto.
4324 * i386-low.c: New file.
4325 * i386-low.h: New file.
4326 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4327 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4328 * linux-low.c (linux_add_process): Initialize arch_private.
4329 (linux_remove_process): Free arch_private.
4330 (add_lwp): Initialize arch_private.
4331 (delete_lwp): Free arch_private.
4332 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4333 provided.
4334 * linux-low.h (process_info_private): New member arch_private.
4335 (lwp_info): New member arch_private.
4336 (linux_target_ops): New members new_process, new_thread,
4337 prepare_to_resume.
4338 (ptid_of): New macro.
4339 * linux-x86-low.c: Include stddef.h, i386-low.h.
4340 (arch_process_info): New struct.
4341 (arch_lwp_info): New struct.
4342 (x86_linux_dr_get, x86_linux_dr_set): New functions.
4343 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4344 (i386_dr_low_get_status): New function.
4345 (x86_insert_point, x86_remove_point): New functions.
4346 (x86_stopped_by_watchpoint): New function.
4347 (x86_stopped_data_address): New function.
4348 (x86_linux_new_process, x86_linux_new_thread): New functions.
4349 (x86_linux_prepare_to_resume): New function.
4350 (the_low_target): Add entries for insert_point, remove_point,
4351 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4352 prepare_to_resume.
4353 * server.c (debug_hw_points): New global.
4354 (monitor_show_help): Document set debug-hw-points.
4355 (handle_query): Process "set debug-hw-points".
4356 * server.h (debug_hw_points): Declare.
4357 (paddress): Declare.
4358 * utils.c (NUMCELLS, CELLSIZE): New macros.
4359 (get_sell, xsnprintf, paddress): New functions.
4360 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4361 remove_point, stopped_by_watchpoint, stopped_data_address.
4362 * win32-i386-low.c: Include i386-low.h.
4363 (debug_reg_state): Replaces dr.
4364 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4365 (i386_dr_low_get_status): New function.
4366 (i386_insert_point, i386_remove_point): New functions.
4367 (i386_stopped_by_watchpoint): New function.
4368 (i386_stopped_data_address): New function.
4369 (i386_initial_stuff): Update.
4370 (get_thread_context,set_thread_context,i386_thread_added): Update.
4371 (the_low_target): Add entries for insert_point,
4372 remove_point, stopped_by_watchpoint, stopped_data_address.
4373 * win32-low.c (win32_insert_watchpoint): New function.
4374 (win32_remove_watchpoint): New function.
4375 (win32_stopped_by_watchpoint): New function.
4376 (win32_stopped_data_address): New function.
4377 (win32_target_ops): Add entries for insert_watchpoint,
4378 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4379 * win32-low.h (win32_target_ops): New members insert_point,
4380 remove_point, stopped_by_watchpoint, stopped_data_address.
4381
d993e290
PA
43822009-06-25 Pedro Alves <pedro@codesourcery.com>
4383
4384 * server.c (process_serial_event): Re-return unsupported, not
4385 error, if the type isn't recognized. Re-allow supporting only
4386 insert or remove packets. Also call require_running for
4387 breakpoints. Add missing break statement to default case. Tidy.
4388 * target.h (struct target_ops): Rename insert_watchpoint to
4389 insert_point, and remove_watchpoint to remove_point.
4390
4391 * linux-low.h (struct linux_target_ops): Likewise.
4392 * linux-low.c (linux_insert_watchpoint): Rename to ...
4393 (linux_insert_point): ... this. Adjust.
4394 (linux_remove_watchpoint): Rename to ...
4395 (linux_remove_point): ... this. Adjust.
4396 (linux_target_ops): Adjust.
4397 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4398 (cris_insert_point): ... this.
4399 (cris_remove_watchpoint): Rename to ...
4400 (cris_remove_point): ... this.
4401 (the_low_target): Adjust.
4402
0f54c268
PM
44032009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4404
4405 * server.c (handle_v_kill): Pass signal_pid to
4406 kill_inferior if multi_process is zero.
4407
c6314022
AR
44082009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4409
4410 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4411 * target.h (target_ops): Comment for *_watchpoint to make it clear
4412 the functions can get types '0' and '1'.
4413
4463ce24
AR
44142009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4415
4416 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4417 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4418 * regcache.c (get_regcache): Likewise.
4419 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4420 * win32-low.c (child_fetch_inferior_registers): Remove check for
4421 regno 0.
4422
cf8fd78b
PA
44232009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4424 Pedro Alves <pedro@codesourcery.com>
4425
4426 * target.h (struct target_ops) <supports_multi_process>: New
4427 callback.
4428 (target_supports_multi_process): New.
4429 * server.c (handle_query): Even if GDB reports support, only
4430 enable multi-process if the target also supports it. Report
4431 multi-process support only if the target backend supports it.
4432 * linux-low.c (linux_supports_multi_process): New function.
4433 (linux_target_ops): Install it as target_supports_multi_process
4434 callback.
4435
47c0c975
DE
44362009-05-24 Doug Evans <dje@google.com>
4437
e09875d4
DE
4438 Global renaming of find_thread_pid to find_thread_ptid.
4439 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4440 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4441 All callers updated.
4442
e27d73f6
DE
4443 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4444 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4445 directly.
4446
47c0c975
DE
4447 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4448 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4449 (linux_resume_one_lwp): Ditto.
4450
2acc282a
DE
44512009-05-23 Doug Evans <dje@google.com>
4452
4453 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4454 from struct inferior_list_entry * to struct lwp_info *.
4455 All callers updated.
4456
9f1036c1
DE
44572009-05-13 Doug Evans <dje@google.com>
4458
4459 * linux-x86-low.c: Don't include assert.h.
4460 (x86_siginfo_fixup): Use fatal, not assert.
4461 (x86_arch_setup): Fix comment.
4462
d0722149
DE
44632009-05-12 Doug Evans <dje@google.com>
4464
4465 Biarch support for i386/amd64 gdbserver.
4466 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4467 Add linux-x86-low.c.
4468 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4469 (linux-x86-low.o): Add.
4470 * linux-x86-64-low.c: Delete.
4471 * linux-i386-low.c: Delete.
4472 * linux-x86-low.c: New file.
4473 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4474 linux-x86-low.o.
4475 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4476 linux-x86-low.o.
4477 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4478 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4479 (linux_child_pid_to_exec_file): New function.
4480 (elf_64_header_p, elf_64_file_p): New functions.
4481 (siginfo_fixup): New function.
4482 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4483 give target a chance to convert layout.
4484 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4485 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4486
fdeb2a12
DE
44872009-05-07 Doug Evans <dje@google.com>
4488
4489 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4490 (regsets_store_inferior_registers): Ditto.
4491
a6dbe5df
PA
44922009-05-06 Pedro Alves <pedro@codesourcery.com>
4493
4494 PR server/10048
4495
4496 * linux-low.c (must_set_ptrace_flags): Delete.
4497 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4498 of the global.
4499 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4500 `lwp->must_set_ptrace_flags' instead.
ba42693b 4501 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
4502 (linux_wait_1): ... not here.
4503
5091eb23
DE
45042009-04-30 Doug Evans <dje@google.com>
4505
9f767825
DE
4506 * inferiors.c (started_inferior_callback): New function.
4507 (attached_inferior_callback): New function.
4508 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4509 * server.c (print_started_pid, print_attached_pid): New functions.
4510 (detach_or_kill_for_exit): New function.
4511 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4512 * server.h (have_started_inferiors_p): Declare.
4513 (have_attached_inferiors_p): Declare.
4514
5091eb23
DE
4515 * inferiors.c (remove_process): Fix memory leak, free process.
4516 * linux-low.c (linux_remove_process): New function.
4517 (linux_kill): Call it instead of remove_process.
4518 (linux_detach, linux_wait_1): Ditto.
4519
155c8968
PA
45202009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4521
4522 * configure.srv: Add x86 Windows CE target.
4523
7fe519cb
UW
45242009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4525
4526 * inferiors.c (get_thread_process): Make global.
4527 * server.h (get_thread_process): Add prototype.
4528 * thread-db.c (find_one_thread): Use get_thread_process
4529 instead of current_process.
4530 (thread_db_get_tls_address): Do not crash if called when
4531 thread layer is not yet initialized.
4532
5472f405
UW
45332009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4534
4535 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4536 * spu-low.c (current_tid): Rename to ...
4537 (current_ptid): ... this.
4538 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4539 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4540 ptid_get_lwp (current_ptid) instead of current_tid.
4541 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4542 instead of current_tid. Use find_process_pid to verify pid
4543 argument is valid. Pass proper argument to remove_process.
4544 (spu_thread_alive): Compare current_ptid instead of current_tid.
4545 (spu_resume): Likewise.
4546
55ac2b99
PA
45472009-04-02 Pedro Alves <pedro@codesourcery.com>
4548
4549 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4550 variable.
4551
95954743
PA
45522009-04-01 Pedro Alves <pedro@codesourcery.com>
4553
4554 Implement the multiprocess extensions, and add linux multiprocess
4555 support.
4556
4557 * server.h (ULONGEST): Declare.
4558 (struct ptid, ptid_t): New.
4559 (minus_one_ptid, null_ptid): Declare.
4560 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4561 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4562 (struct inferior_list_entry): Change `id' type from unsigned from
4563 to ptid_t.
4564 (struct sym_cache, struct breakpoint, struct
4565 process_info_private): Forward declare.
4566 (struct process_info): Declare.
4567 (current_process): Declare.
4568 (all_processes): Declare.
4569 (initialize_inferiors): Declare.
4570 (add_thread): Adjust to use ptid_t.
4571 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4572 (add_process, remove_process, find_thread_pid): Declare.
4573 (find_inferior_id): Adjust to use ptid_t.
4574 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4575 (multi_process): Declare.
4576 (push_event): Adjust to use ptid_t.
4577 (read_ptid, write_ptid): Declare.
4578 (prepare_resume_reply): Adjust to use ptid_t.
4579 (clear_symbol_cache): Declare.
4580 * inferiors.c (all_processes): New.
4581 (null_ptid, minus_one_ptid): New.
4582 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4583 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4584 (add_thread): Change unsigned long to ptid. Remove gdb_id
4585 parameter. Adjust.
4586 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4587 (gdb_id_to_thread): Rename to ...
4588 (find_thread_pid): ... this. Change unsigned long to ptid.
4589 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4590 (loaded_dll, pull_pid_from_list): Adjust.
4591 (add_process, remove_process, find_process_pid)
4592 (get_thread_process, current_process, initialize_inferiors): New.
4593 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4594 (struct target_waitstatus) <related_pid>: Ditto.
4595 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4596 return type to int.
4597 (struct target_ops) <join>: Add `pid' argument.
4598 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4599 (struct target_ops) <wait>: Add `ptid' field. Change return type
4600 to ptid.
4601 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4602 (mywait): Add `ptid' argument. Change return type to ptid_t.
4603 (target_pid_to_str): Declare.
4604 * target.c (set_desired_inferior): Adjust to use ptids.
4605 (mywait): Add new `ptid' argument. Adjust.
4606 (target_pid_to_str): New.
4607 * mem-break.h (free_all_breakpoints): Declare.
4608 * mem-break.c (breakpoints): Delelete.
4609 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4610 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4611 to use per-process breakpoint list.
4612 (free_all_breakpoints): New.
4613 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4614 (symbol_cache, all_symbols_looked_up): Delete.
4615 (hexchars): New.
4616 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4617 read_ptid): New.
4618 (prepare_resume_reply): Change ptid argument's type from unsigned
4619 long to ptid_t. Adjust. Implement W;process and X;process.
4620 (free_sym_cache, clear_symbol_cache): New.
4621 (look_up_one_symbol): Adjust to per-process symbol cache. *
4622 * server.c (cont_thread, general_thread, step_thread): Change type
4623 to ptid_t.
4624 (attached): Delete.
4625 (multi_process): New.
4626 (last_ptid): Change type to ptid_t.
4627 (struct vstop_notif) <ptid>: Change type to ptid_t.
4628 (queue_stop_reply, push_event): Change `ptid' argument's type to
4629 ptid_t.
4630 (discard_queued_stop_replies): Add `pid' argument.
4631 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4632 changes. Don't reference the `attached' global.
4633 (attach_inferior): Adjust to mywait interface changes.
4634 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4635 features. Handle and report "multiprocess+". Handle
4636 "qAttached:PID".
4637 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4638 changes.
4639 (handle_v_kill): New.
4640 (handle_v_stopped): Adjust to use target_pid_to_str.
4641 (handle_v_requests): Allow multiple attaches and runs when
4642 multiprocess extensions are in effect. Handle "vKill".
4643 (myresume): Adjust to use ptids.
4644 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4645 (handle_status): Adjust to discard_queued_stop_replies interface
4646 change.
4647 (first_thread_of, kill_inferior_callback)
4648 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4649 (main): Call initialize_inferiors. Adjust to use ptids, killing
4650 and detaching from all inferiors. Handle multiprocess packet
4651 variants.
4652 * linux-low.h: Include gdb_proc_service.h.
4653 (struct process_info_private): New.
4654 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4655 <lwpid_of>: Use ptid_get_lwp.
4656 (get_lwp_thread): Adjust.
4657 (struct lwp_info): Add `dead' member.
4658 (find_lwp_pid): Declare.
4659 * linux-low.c (thread_db_active): Delete.
4660 (new_inferior): Adjust comment.
4661 (inferior_pid): Delete.
4662 (linux_add_process): New.
4663 (handle_extended_wait): Adjust.
4664 (add_lwp): Change unsigned long to ptid.
4665 (linux_create_inferior): Add process to processes table. Adjust
4666 to use ptids. Don't set new_inferior here.
4667 (linux_attach_lwp): Rename to ...
4668 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4669 it. Adjust to use ptids.
4670 (linux_attach_lwp): New.
4671 (linux_attach): Add process to processes table. Don't set
4672 new_inferior here.
4673 (struct counter): New.
4674 (second_thread_of_pid_p, last_thread_of_process_p): New.
4675 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4676 multiple processes.
4677 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4678 processes. Remove process from process table.
4679 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4680 to multiple processes.
4681 (any_thread_of): New.
4682 (linux_detach): Add `pid' argument, and handle it. Remove process
4683 from processes table.
4684 (linux_join): Add `pid' argument. Handle it.
4685 (linux_thread_alive): Change unsighed long argument to ptid_t.
4686 Consider dead lwps as not being alive.
4687 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4688 threads we're not interested in.
4689 (same_lwp, find_lwp_pid): New.
4690 (linux_wait_for_lwp): Change `pid' argument's type from int to
4691 ptid_t. Adjust.
4692 (linux_wait_for_event): Rename to ...
4693 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4694 from int to ptid_t. Adjust.
4695 (linux_wait_for_event): New.
4696 (linux_wait_1): Add `ptid' argument. Change return type to
4697 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4698 that exit from the process table.
4699 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4700 Adjust.
4701 (mark_lwp_dead): New.
4702 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4703 stopping all threads, mark its main lwp as dead.
4704 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4705 ptids.
4706 (fetch_register, usr_store_inferior_registers)
4707 (regsets_fetch_inferior_registers)
4708 (regsets_store_inferior_registers, linux_read_memory)
4709 (linux_write_memory): Inline `inferior_pid'.
4710 (linux_look_up_symbols): Adjust to use per-process
4711 `thread_db_active'.
4712 (linux_request_interrupt): Adjust to use ptids.
4713 (linux_read_auxv): Inline `inferior_pid'.
4714 (initialize_low): Don't reference thread_db_active.
4715 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4716 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4717 (ps_getpid): Return the pid of the current inferior.
4718 * thread-db.c (proc_handle, thread_agent): Delete.
4719 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4720 per-process data.
4721 (find_one_thread): Change argument type to ptid_t. Adjust to
4722 per-process data.
4723 (maybe_attach_thread): Adjust to per-process data and ptids.
4724 (thread_db_find_new_threads): Ditto.
4725 (thread_db_init): Ditto.
4726 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4727 processes table. Adjust to use ptids.
4728 (spu_kill, spu_detach): Adjust interface. Remove process from
4729 processes table.
4730 (spu_join, spu_thread_alive): Adjust interface.
4731 (spu_wait): Adjust interface. Remove process from processes
4732 table. Adjust to use ptids.
4733 * win32-low.c (current_inferior_tid): Delete.
4734 (current_inferior_ptid): New.
4735 (debug_event_ptid): New.
4736 (thread_rec): Take a ptid. Adjust.
4737 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4738 (child_delete_thread): Ditto.
4739 (do_initial_child_stuff): Add `attached' argument. Add process to
4740 processes table.
4741 (child_fetch_inferior_registers, child_store_inferior_registers):
4742 Adjust.
4743 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4744 (win32_attach): Pass 1 to do_initial_child_stuff.
4745 (win32_kill): Adjust interface. Remove process from processes
4746 table.
4747 (win32_detach): Ditto.
4748 (win32_join): Adjust interface.
4749 (win32_thread_alive): Take a ptid.
4750 (win32_resume): Adjust to use ptids.
4751 (get_child_debug_event): Ditto.
4752 (win32_wait): Adjust interface. Remove exiting process from
4753 processes table.
4754
bd99dc85
PA
47552009-04-01 Pedro Alves <pedro@codesourcery.com>
4756
4757 Non-stop mode support.
4758
4759 * server.h (non_stop): Declare.
4760 (gdb_client_data, handler_func): Declare.
4761 (delete_file_handler, add_file_handler, start_event_loop):
4762 Declare.
4763 (handle_serial_event, handle_target_event, push_event)
4764 (putpkt_notif): Declare.
4765 * target.h (enum resume_kind): New.
4766 (struct thread_resume): Replace `step' field by `kind' field.
4767 (TARGET_WNOHANG): Define.
4768 (struct target_ops) <wait>: Add `options' argument.
4769 <supports_non_stop, async, start_non_stop>: New fields.
4770 (target_supports_non_stop, target_async): New.
4771 (start_non_stop): Declare.
4772 (mywait): Add `options' argument.
4773 * target.c (mywait): Add `options' argument. Print child exit
4774 notifications here.
4775 (start_non_stop): New.
4776 * server.c (non_stop, own_buf, mem_buf): New globals.
4777 (struct vstop_notif): New.
4778 (notif_queue): New global.
4779 (queue_stop_reply, push_event, discard_queued_stop_replies)
4780 (send_next_stop_reply): New.
4781 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4782 interface changes.
4783 (attach_inferior): In non-stop mode, don't wait for the target
4784 here.
4785 (handle_general_set): Handle QNonStop.
4786 (handle_query): When handling qC, return the current general
4787 thread, instead of the first thread of the list.
4788 (handle_query): If the backend supports non-stop mode, include
4789 QNonStop+ in the qSupported query response.
4790 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4791 and non-stop mode.
4792 (handle_v_attach, handle_v_run): Handle non-stop mode.
4793 (handle_v_stopped): New.
4794 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4795 (myresume): Adjust to use resume_kind. Handle non-stop.
4796 (queue_stop_reply_callback): New.
4797 (handle_status): Handle non-stop mode.
4798 (main): Clear non_stop flag on reconnection. Use the event-loop.
4799 Refactor serial protocol handling from here ...
4800 (process_serial_event): ... to this new function. When GDB
4801 selects any thread, select one here. In non-stop mode, wait until
4802 GDB acks all pending events before exiting.
4803 (handle_serial_event, handle_target_event): New.
4804 * remote-utils.c (remote_open): Install remote_desc in the event
4805 loop.
4806 (remote_close): Remove remote_desc from the event loop.
4807 (putpkt_binary): Rename to...
4808 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4809 (putpkt_binary): New as wrapper around putpkt_binary_1.
4810 (putpkt_notif): New.
4811 (prepare_resume_reply): In non-stop mode, don't change the
4812 general_thread.
4813 * event-loop.c: New.
4814 * Makefile.in (OBJ): Add event-loop.o.
4815 (event-loop.o): New rule.
4816
4817 * linux-low.h (pid_of): Moved here.
4818 (lwpid_of): New.
4819 (get_lwp_thread): Use lwpid_of.
4820 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4821 * linux-low.c (pid_of): Delete.
4822 (inferior_pid): Use lwpid_of.
4823 (linux_event_pipe): New.
4824 (target_is_async_p): New.
4825 (delete_lwp): New.
4826 (handle_extended_wait): Use lwpid_of.
4827 (add_lwp): Don't set lwpid field.
4828 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4829 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4830 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4831 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4832 first. Adjust to linux_wait_for_event interface changes. Use
4833 lwpid_of.
4834 (linux_detach): Don't delete the main lwp here.
4835 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4836 (status_pending_p): Don't consider explicitly suspended lwps.
4837 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4838 pointer. Add OPTIONS argument. Change return type to int. Use
4839 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4840 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4841 pointer. Add status pointer argument. Return a pid instead of a
4842 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4843 changes. In non-stop mode, don't switch to a random thread.
4844 (linux_wait): Rename to...
4845 (linux_wait_1): ... this. Add target_options argument, and handle
4846 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4847 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4848 clean exit and signal exit code. Don't stop all threads in
4849 non-stop mode. In all-stop mode, only stop all threads when
4850 reporting a stop to GDB. Handle explicit thread stop requests.
4851 (async_file_flush, async_file_mark): New.
4852 (linux_wait): New.
4853 (send_sigstop): Use lwpid_of.
4854 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4855 interface changes. In non-stop mode, don't switch to a random
4856 thread.
4857 (linux_resume_one_lwp): Use lwpid_of.
4858 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4859 (linux_resume_one_thread): ... this. Handle resume_stop. In
4860 non-stop mode, don't look for pending flag in all threads.
4861 (resume_status_pending_p): Don't consider explicitly suspended
4862 threads.
4863 (my_waitpid): Reimplement. Emulate __WALL.
4864 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4865 Use lwpid_of.
4866 (sigchld_handler, linux_supports_non_stop, linux_async)
4867 (linux_start_non_stop): New.
4868 (linux_target_ops): Register linux_supports_non_stop, linux_async
4869 and linux_start_non_stop.
4870 (initialize_low): Install SIGCHLD handler.
4871 * thread-db.c (thread_db_create_event, find_one_thread)
4872 (thread_db_get_tls_address): Use lwpid_of.
4873 * win32-low.c (win32_detach): Adjust to use resume_kind.
4874 (win32_wait): Add `options' argument.
4875 * spu-low.c (spu_resume): Adjust to use resume_kind.
4876 (spu_wait): Add `options' argument.
4877
5b1c542e
PA
48782009-04-01 Pedro Alves <pedro@codesourcery.com>
4879
4880 Decouple target code from remote protocol.
4881
4882 * target.h (enum target_waitkind): New.
4883 (struct target_waitstatus): New.
4884 (struct target_ops) <wait>: Return an unsigned long. Take a
4885 target_waitstatus pointer instead of a char pointer.
4886 (mywait): Likewise.
4887 * target.c (mywait): Change prototype to return an unsigned long.
4888 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4889 * server.h (thread_from_wait, old_thread_from_wait): Delete
4890 declarations.
4891 (prepare_resume_reply): Change prototype to take a
4892 target_waitstatus.
4893 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4894 (last_status, last_ptid): New.
4895 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4896 pid instead of a signal.
4897 (attach_inferior): Remove "status" and "signal" parameters.
4898 Adjust.
4899 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4900 not as an address.
4901 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4902 (handle_v_requests, myresume): Remove "status" and "signal"
4903 parameters. Adjust.
4904 (handle_status): New.
4905 (main): Delete local `status'. Adjust.
4906 * remote-utils.c: Include target.h.
4907 (prepare_resume_reply): Change prototype to take a
4908 target_waitstatus. Adjust.
4909
4910 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4911 interface.
4912 * spu-low.c (spu_wait): Adjust.
4913 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4914 Delete.
4915 (win32_wait): Adjust.
4916
2bd7c093
PA
49172009-04-01 Pedro Alves <pedro@codesourcery.com>
4918
4919 * target.h (struct thread_resume): Delete leave_stopped member.
4920 (struct target_ops): Add a `n' argument to the `resume' callback.
4921 * server.c (start_inferior): Adjust.
4922 (handle_v_cont, myresume): Adjust.
4923 * linux-low.c (check_removed_breakpoint): Adjust to resume
4924 interface change, and to removed leave_stopped field.
4925 (resume_ptr): Delete.
4926 (struct thread_resume_array): New.
4927 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4928 resume interface change.
4929 (linux_continue_one_thread, linux_queue_one_thread)
4930 (resume_status_pending_p): Check if the resume field is NULL
4931 instead of checking the leave_stopped member.
4932 (linux_resume): Adjust to the target resume interface change.
4933 * spu-low.c (spu_resume): Adjust to the target resume interface
4934 change.
4935 * win32-low.c (win32_detach, win32_resume): Ditto.
4936
c35fafde
PA
49372009-04-01 Pedro Alves <pedro@codesourcery.com>
4938
4939 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4940 flag.
4941 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4942 pending.
4943 (linux_continue_one_thread): Only preserve the stepping flag if
4944 there's a pending breakpoint.
4945
0a59d50b
PA
49462009-03-31 Pedro Alves <pedro@codesourcery.com>
4947
4948 * server.c (main): After the inferior having exited, call
4949 remote_close before exiting gdbserver.
4950
f04c6d38
TJB
49512009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4952
4953 Fix size of FPSCR in Power 7 processors.
4954 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4955 (PPC_FEATURE_HAS_DFP): New #define.
4956 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4957 size of the FPSCR.
4958
78e5cee6
PA
49592009-03-23 Pedro Alves <pedro@codesourcery.com>
4960
4961 * server.c (handle_query) Whitespace and formatting.
4962
1b3f6016
PA
49632009-03-22 Pedro Alves <pedro@codesourcery.com>
4964
4965 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4966 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4967 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4968 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4969 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4970 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4971 Makefile.in, configure.ac: Fix whitespace throughout.
4972 * configure: Regenerate.
4973
a07b2135
PA
49742009-03-22 Pedro Alves <pedro@codesourcery.com>
4975
4976 * inferiors.c (find_inferior): Make it safe for the callback
4977 function to delete the currently iterated inferior.
4978
67cc2626
PA
49792009-03-22 Pedro Alves <pedro@codesourcery.com>
4980
4981 * Makefile.in (linuw_low_h): Move higher.
4982 (thread-db.o): Depend on $(linux_low_h).
4983
54a0b537
PA
49842009-03-17 Pedro Alves <pedro@codesourcery.com>
4985
4986 Rename "process" to "lwp" throughout.
4987
4988 * linux-low.c (all_processes): Rename to...
4989 (all_lwps): ... this.
4990 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4991 (add_process): Rename to ...
4992 (add_lwp): ... this. Adjust.
4993 (linux_create_inferior): Adjust.
4994 (linux_attach_lwp): Adjust.
4995 (linux_attach): Adjust.
4996 (linux_kill_one_process): Rename to ...
4997 (linux_kill_one_lwp): ... this. Adjust.
4998 (linux_kill): Adjust.
4999 (linux_detach_one_process): Rename to ...
5000 (linux_detach_one_lwp): ... this. Adjust.
5001 (linux_detach): Adjust.
5002 (check_removed_breakpoint): Adjust.
5003 (status_pending_p): Adjust.
5004 (linux_wait_for_process): Rename to ...
5005 (linux_wait_for_lwp): ... this. Adjust.
5006 (linux_wait_for_event): Adjust.
5007 (send_sigstop): Adjust.
5008 (wait_for_sigstop): Adjust.
5009 (stop_all_processes): Rename to ...
5010 (stop_all_lwps): ... this.
5011 (linux_resume_one_process): Rename to ...
5012 (linux_resume_one_lwp): ... this. Adjust.
5013 (linux_set_resume_request, linux_continue_one_thread)
5014 (linux_queue_one_thread, resume_status_pending_p)
5015 (usr_store_inferior_registers, regsets_store_inferior_registers)
5016 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5017 Adjust.
5018 * linux-low.h (get_process): Rename to ...
5019 (get_lwp): ... this. Adjust.
5020 (get_thread_process): Rename to ...
5021 (get_thread_lwp): ... this. Adjust.
5022 (get_process_thread): Rename to ...
5023 (get_lwp_thread): ... this. Adjust.
5024 (struct process_info): Rename to ...
5025 (struct lwp_info): ... this.
5026 (all_processes): Rename to ...
5027 (all_lwps): ... this.
5028 * proc-service.c (ps_lgetregs): Adjust.
5029 * thread-db.c (thread_db_create_event, find_one_thread)
5030 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5031
0b16c5cf
PA
50322009-03-14 Pedro Alves <pedro@codesourcery.com>
5033
5034 * server.c (handle_query): Handle "qAttached".
5035
32de4b9d
NS
50362009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5037
5038 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5039 GPLv3, update license URL.
5040
2aecd87f
DE
50412009-03-01 Doug Evans <dje@google.com>
5042
93efd302 5043 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
5044 (server_h): Add gdb_signals.h.
5045 (signals.o): Update.
5046 * server.h (target_signal_from_host,target_signal_to_host_p)
5047 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5048
86b1f9c5
PM
50492009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5050
5051 * remote-utils.c (getpkt): Also generate remote-debug
5052 information if noack_mode is set.
5053
4aa995e1
PA
50542009-02-06 Pedro Alves <pedro@codesourcery.com>
5055
5056 * server.c (handle_query): Report qXfer:siginfo:read and
5057 qXfer:siginfo:write as supported and handle them.
5058 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5059 * linux-low.c (linux_xfer_siginfo): New.
5060 (linux_target_ops): Set it.
5061
62709adf
PA
50622009-01-26 Pedro Alves <pedro@codesourcery.com>
5063
5064 * server.c (gdbserver_usage): Mention --remote-debug.
5065 (main): Accept '--remote-debug' switch.
5066
aef93bd7
DE
50672009-01-18 Doug Evans <dje@google.com>
5068
5069 * regcache.c (new_register_cache): No need to check result of xcalloc.
5070 * server.c (handle_search_memory): Back out calls to xmalloc,
5071 result is checked and error is returned to user upon failure.
5072 (handle_query): Ditto. Add more checks for result of malloc.
5073 (handle_v_cont): Check result of malloc, report error back to
5074 user upon failure.
5075 (handle_v_run): Ditto. Call freeargv.
5076 * server.h (freeargv): Declare.
5077 * utils.c (freeargv): New fn.
5078
54363045
DE
50792009-01-15 Doug Evans <dje@google.com>
5080
f626972c
DE
5081 * gdbreplay.c (perror_with_name): Make arg const char *.
5082 * server.h (target_signal_to_name): Make return type const char *.
0842e787 5083 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 5084 * utils.c (perror_with_name): Make arg const char *.
54363045 5085
18aae699
PA
50862009-01-14 Pedro Alves <pedro@codesourcery.com>
5087
5088 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5089 when handling a EXIT_PROCESS_DEBUG_EVENT.
5090
ff703abe
JB
50912009-01-06 Joel Brobecker <brobecker@adacore.com>
5092
5093 * gdbreplay.c (gdbreplay_version): Update copyright year.
5094 * server.c (gdbserver_version): Likewise.
5095
f21cc1a2 50962009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
5097
5098 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 5099 (handle_extended_wait): Improve comment.
0e21c1ec 5100
bca929d3
DE
51012008-12-13 Doug Evans <dje@google.com>
5102
5103 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5104 * server.h (ATTR_MALLOC): New macro.
5105 (xmalloc,xcalloc,xstrdup): Declare.
5106 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5107 * inferiors.c: Ditto.
5108 * linux-low.c: Ditto.
5109 * mem-break.c: Ditto.
5110 * regcache.c: Ditto.
5111 * remote-utils.c: Ditto.
5112 * server.c: Ditto.
5113 * target.c: Ditto.
5114 * win32-low.c: Ditto.
5115
97438e3f
DE
51162008-12-12 Doug Evans <dje@google.com>
5117
896c7fbb
DE
5118 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5119 in debugging printf.
5120
97438e3f
DE
5121 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5122
e3b886f8
DE
51232008-12-09 Doug Evans <dje@google.com>
5124
5125 * linux-low.h (struct process_info): Delete member tid, unused.
5126 * thread-db.c (find_one_thread): Update.
5127 (maybe_attach_thread): Update.
5128
07e059b5
VP
51292008-12-02 Pedro Alves <pedro@codesourcery.com>
5130
889bf7c5
PA
5131 * target.h (struct target_ops): Add qxfer_osdata member.
5132 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5133 and dirent.h.
5134 (linux_qxfer_osdata): New functions.
5135 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5136 callback.
5137 * server.c (handle_query): Handle "qXfer:osdata:read:".
5138 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5139 (buffer_xml_printf): New functions.
5140 * server.h (struct buffer): New.
5141 (buffer_grow_str, buffer_grow_str0): New macros.
5142 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5143 (buffer_xml_printf): Declare.
07e059b5 5144
4cab47ab
DE
51452008-11-24 Doug Evans <dje@google.com>
5146
5147 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5148
f142445f
DJ
51492008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5150
5151 * server.c (handle_v_run): Always use the supplied argument list.
5152
d0107bb6 51532008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 5154
d0107bb6
BW
5155 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5156 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 5157
2c4ad781
TJB
51582008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5159
5160 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5161 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5162 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5163 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5164 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5165 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5166 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5167 XML target descriptions.
5168 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5169 when inferior is running on an ISA 2.05 or later processor. Add
5170 special case to return offset for full 64-bit slot of FPSCR when
5171 in 32-bits.
5172
dfb64f85
DJ
51732008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5174
5175 * Makefile.in (SFILES, clean): Added sparc64 files.
5176 (reg-sparc64.o, reg-sparc64.c): New.
5177 * configure.srv (sparc*-*-linux*): New configuration.
5178 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5179 syscall arguments for SPARC.
5180 (regsets_store_inferior_registers): Likewise.
5181 * linux-sparc-low.c: New file.
5182
66b6e1dd
DE
51832008-10-21 Doug Evans <dje@google.com>
5184
5185 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5186 (READLINE_DIR,READLINE_DEP): Delete.
5187 (INTERNAL_CFLAGS): Update.
5188 (LINTFLAGS): Update.
5189
9b710a42
PA
51902008-10-10 Pedro Alves <pedro@codesourcery.com>
5191
5192 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5193 whole argv from the last run, not just argv[0].
5194
5822d809
PA
51952008-09-08 Pedro Alves <pedro@codesourcery.com>
5196
5197 * regcache.c (new_register_cache): Return NULL if the register
5198 cache size isn't known yet.
5199 (free_register_cache): Avoid dereferencing a NULL regcache.
5200
74aac56f
DJ
52012008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5202
5203 * configure.srv: Merge MIPS and MIPS64.
5204
400b20f5
MR
52052008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5206
5207 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5208
677c5bb1
LM
52092008-08-18 Luis Machado <luisgpm@br.ibm.com>
5210
5211 * Makefile.in: Add required vsx dependencies.
5212
5213 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5214 Declare init_registers_powerpc_vsx32l.
5215 Declare init_registers_powerpc_vsx64l.
5216 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5217 (ppc_arch_setup): Check for VSX in hwcap.
5218 (ppc_fill_vsxregset): New function.
5219 (ppc_store_vsxregset): New function.
5220 Add new VSX entry in regset_info target_regsets.
5221
5222 * configure.srv: Add new VSX dependencies.
5223
a6f3e723
SL
52242008-08-12 Pedro Alves <pedro@codesourcery.com>
5225
5226 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5227 (remote_open): Set or clear transport_is_reliable.
5228 (putpkt_binary): Don't expect acks in noack mode.
5229 (getpkt): Don't send ack/nac in noack mode.
5230 * server.c (handle_general_set): Handle QStartNoAckMode.
5231 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5232 qSupported.
5233 (main): Reset noack_mode on every connection.
5234 * server.h (noack_mode): Declare.
5235
a417dc56
RW
52362008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5237
5238 * Makefile.in (GDBREPLAY_OBS): New variable.
5239 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5240
3221518c
UW
52412008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
5242 Daniel Jacobowitz <dan@codesourcery.com>
5243
5244 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5245 (usr_store_inferior_registers): Likewise.
5246 (regsets_store_inferior_registers): Likewise.
5247
ec56be1b
PA
52482008-07-31 Rolf Jansen <rj@surtec.com>
5249 Pedro Alves <pedro@codesourcery.com>
5250
5251 * configure.ac: Check for memmem declaration.
5252 * server.c [HAVE_MALLOC_H]: Include malloc.h.
5253 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5254 (disable_packet_qfThreadInfo): Unconditionally compile.
5255 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5256 * configure, config.in: Regenerate.
5257
2fe5e3ff
DE
52582008-07-28 Doug Kwan <dougkwan@google.com>
5259
5260 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5261 (linux_write_memory): Remove declaration of errno.
5262
836acd6d
UW
52632008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
5264
5265 * linux-low.c (handle_extended_wait): Do not use "status"
5266 variable uninitialized.
5267
aeba519e
PA
52682008-07-07 Pedro Alves <pedro@codesourcery.com>
5269
5270 * server.c (handle_v_attach): Inhibit reporting dll changes.
5271
db42f210
PA
52722008-06-27 Pedro Alves <pedro@codesourcery.com>
5273
5274 * remote-utils.c (prepare_resume_reply): If requested, don't
5275 output "thread:TID" in the T stop reply.
5276
5277 * server.c (disable_packet_vCont, disable_packet_Tthread)
5278 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5279 (handle_query): If requested, disable support for qC, qfThreadInfo
5280 and qsThreadInfo.
5281 (handle_v_requests): If requested, disable support for vCont.
5282 (gdbserver_show_disableable): New.
5283 (main): Handle --disable-packet and --disable-packet=LIST.
5284
5285 * server.h (disable_packet_vCont, disable_packet_Tthread)
5286 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5287
8e4c5421
CD
52882008-06-20 Carlos O'Donell <carlos@codesourcery.com>
5289
5290 * server.c (gdbserver_usage): Mention --version.
5291
6e23a804
DJ
52922008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
5293
5294 * Makefile.in (gdbreplay.o): New rule.
5295
90aa6a40
JM
52962008-06-06 Joseph Myers <joseph@codesourcery.com>
5297
5298 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5299 message, not gdbserver.
5300
c16158bc 53012008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
5302 Nathan Sidwell <nathan@codesourcery.com>
5303 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
5304
5305 * acinclude.m4: Include ../../config/acx.m4.
5306 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5307 * configure, config.in: Regenerate.
5308 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5309 * server.c (gdbserver_version): Print PKGVERSION.
5310 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
5311 (main): Adjust gdbserver_usage calls.
5312 * gdbreplay.c (version, host_name): Add declarations.
5313 (gdbreplay_version, gdbreplay_usage): New.
5314 (main): Accept --version and --help options.
5315
aeb75bf5
DJ
53162008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
5317
5318 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5319 (arm_breakpoint_at): Handle Thumb.
5320 (the_low_target): Add comment.
5321
76b233dd
UW
53222008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
5323
5324 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5325
08388c79
DE
53262008-05-09 Doug Evans <dje@google.com>
5327
a3c83fae
DE
5328 * server.h (decode_search_memory_packet): Declare.
5329 * remote-utils.c (decode_search_memory_packet): New fn.
5330 * server.c (handle_search_memory_1): New fn.
08388c79
DE
5331 (handle_search_memory): New fn.
5332 (handle_query): Process qSearch:memory packets.
5333
bb9c3d36
UW
53342008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5335
5336 * regcache.c (registers_length): Remove.
5337 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
5338 full register packet.
5339 * regcache.h (registers_length): Remove prototype.
5340 * server.h (PBUFSIZ): Define to 16384.
5341
7284e1be
UW
53422008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
5343
5344 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
5345 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
5346 powerpc-64l.o, and powerpc-altivec64l.o.
5347 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5348 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5349 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5350 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5351 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5352 to srv_xmlfiles.
5353
5354 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5355 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5356 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5357 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5358 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5359 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5360 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5361 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5362 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5363 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5364 (clean): Update.
5365
5366 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5367 (init_registers_powerpc_32l): ... this new prototype.
5368 (init_registers_powerpc_32): Remove, replace by ...
5369 (init_registers_powerpc_altivec32l): ... this new prototype.
5370 (init_registers_powerpc_e500): Remove, replace by ...
5371 (init_registers_powerpc_e500l): ... this new prototype.
5372 (init_registers_ppc64): Remove, replace by ...
5373 (init_registers_powerpc_64l): ... this new prototype.
5374 (init_registers_powerpc_64): Remove, replace by ...
5375 (init_registers_powerpc_altivec64l): ... this new prototype.
5376 (ppc_num_regs): Set to 73.
5377 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5378 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5379 (ppc_cannot_store_register): Handle orig_r3 and trap.
5380 (ppc_arch_setup): Update init_registers_... calls.
5381 (ppc_fill_gregset): Handle orig_r3 and trap.
5382
5383 * inferiors.c (clear_inferiors): Reset current_inferior.
5384
fdc59709
PB
53852008-04-23 Paolo Bonzini <bonzini@gnu.org>
5386
889bf7c5
PA
5387 * acinclude.m4: Add override.m4.
5388 * configure: Regenerate.
fdc59709 5389
c9b2f845
UW
53902008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5391
5392 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5393 initial call to init_register_ppc64.
5394
550512b8
UW
53952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5396
43aaf8b6
PA
5397 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
5398 single powerpc*-*-linux* case.
550512b8
UW
5399 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5400
b6430ec3
UW
54012008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5402
5403 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 5404 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
5405 from reg_xmlfiles.
5406 * linux-ppc-low.c: Include <elf.h>.
5407 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5408 (ppc_hwcap): New global variable.
5409 (ppc_regmap): Remove __SPE__ #ifdef sections.
5410 (ppc_regmap_e500): New global variable.
5411 (ppc_cannot_store_register): Update __SPE__ special case.
5412 (ppc_get_hwcap): New function.
5413 (ppc_arch_setup): Use it to determine whether inferior supports
5414 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5415 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5416 Do not access registers if target does not support AltiVec.
5417 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5418 Do not access registers if target does not support SPE.
5419 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5420
52fa2412
UW
54212008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5422
5423 * linux-low.c (disabled_regsets, num_regsets): New.
5424 (use_regsets_p): Delete.
5425 (linux_wait_for_process): Clear disabled_regsets.
5426 (regsets_fetch_inferior_registers): Check and set it.
5427 (regsets_store_inferior_registers): Likewise.
5428 (linux_fetch_registers, linux_store_registers): Do not use
5429 use_regsets_p.
5430 (initialize_low): Allocate disabled_regsets.
5431
e28b3332
DJ
54322008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5433
5434 * Makefile.in (LIBOBJS): New.
5435 (OBS): Use LIBOBJS.
5436 (memmem.o): New rule.
5437 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5438 * configure: Regenerated.
5439
4536995d
UW
54402008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5441
5442 * server.c (handle_query): Never return "unsupported" for
5443 qXfer:features:read queries.
5444
221c031f
UW
54452008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5446
5447 * server.c (get_features_xml): Fix inverted condition.
5448 (handle_query): Always support qXfer:feature:read.
5449
ccd213ac
DJ
54502008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5451
5452 * server.c (wrapper_argv): New.
5453 (start_inferior): Handle wrapper_argv. If set, expect an extra
5454 trap.
5455 (gdbserver_usage): Document --wrapper.
5456 (main): Parse --wrapper.
5457
6fe305f7
UW
54582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5459
5460 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5461 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5462 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5463 (ppc_set_pc): Likewise.
5464 (ppc_arch_setup): New function.
5465 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5466 of collect_register.
889bf7c5 5467 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 5468
5b0a002e
UW
54692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5470
5471 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5472 instead of linux-ppc64-low.o.
5473 * linux-ppc64-low.c: Remove file.
5474 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5475 (linux-ppc64-low.o): Remove rule.
5476
5477 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5478 (init_registers_powerpc_64): Likewise.
5479 (ppc_regmap): Conditionally define depending on __powerpc64__.
5480 (ppc_cannot_store_register): Do not special-case "fpscr" when
5481 compiled on __powerpc64__.
5482 (ppc_collect_ptrace_register): New function.
5483 (ppc_supply_ptrace_register): New function.
5484 (ppc_breakpoint): Change type to "unsigned int".
5485 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5486 (the_low_target): Conditionally provide initializers for the
889bf7c5 5487 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
5488 collect_ptrace_register and supply_ptrace_register members.
5489
9b4b61c8
UW
54902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5491
5492 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5493 * server.c (gdbserver_xmltarget): Define.
5494 (get_features_xml): Use it to replace "target.xml" and arch_string.
5495
5496 * configure.srv: Remove srv_xmltarget. Add XML files that were
5497 mentioned there to srv_xmlfiles instead. Remove conditional tests
5498 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5499 srv_xmlfiles and srv_regobj to include all possible choices.
5500 * configure.ac (srv_xmltarget): Remove.
5501 (srv_xmlfiles): Do not add "target.xml".
5502 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5503 checks for supplementary target information.
5504 * configure: Regenerate.
5505 * Makefile.in (XML_TARGET): Remove.
5506 (target.xml): Remove rule.
5507 (clean): Do not clean up target.xml.
5508 (.PRECIOUS): Do not mention target.xml.
5509
5510 * target.h (struct target_ops): Remove arch_string member.
5511 * linux-low.c (linux_arch_string): Remove.
5512 (linux_target_ops): Remove arch_string initializer.
5513 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5514 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5515 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5516 * spu-low.c (spu_arch_string): Remove.
5517 (spu_target_ops): Remove arch_string initializer.
5518 * win32-low.c (win32_arch_string): Remove.
5519 (win32_target_ops): Remove arch_string initializer.
5520 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5521 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5522 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5523
ee1a7ae4
UW
55242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5525
5526 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5527 by collect_ptrace_register and supply_ptrace_register hooks.
5528 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5529 instead of checking for the_low_target.left_pad_xfer.
5530 (usr_store_inferior_registers): Use collect_ptrace_register callback
5531 instead of checking for the_low_target.left_pad_xfer.
5532
5533 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5534 (s390_supply_ptrace_register): Likewise.
5535 (s390_fill_gregset): Call s390_collect_ptrace_register.
5536 (the_low_target): Update.
5537
5538 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5539 (ppc_supply_ptrace_register): Likewise.
5540 (the_low_target): Update.
5541
5542 * linux-i386-low.c (the_low_target): Update.
5543 * linux-x86-64-low.c (the_low_target): Update.
5544
d61ddec4
UW
55452008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5546
5547 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5548 reg-s390.o and reg-s390x.o.
5549
5550 * linux-low.c (new_inferior): New global variable.
5551 (linux_create_inferior, linux_attach): Set it.
5552 (linux_wait_for_process): Call the_low_target.arch_setup after the
5553 target has stopped for the first time.
5554 (initialize_low): Do not call the_low_target.arch_setup.
5555
5556 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5557 (s390_set_pc): Likewise.
5558 (s390_arch_setup): New function.
5559 (the_low_target): Use s390_arch_setup as arch_setup routine.
5560
5561 * regcache.c (realloc_register_cache): New function.
5562 (set_register_cache): Call it for each existing regcache.
5563
d05b4ac3
UW
55642008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5565
5566 * server.h (init_registers): Remove prototype.
5567
5568 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5569 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5570 instead of init_registers ().
5571 * linux-arm-low.c (init_registers_arm): Add prototype.
5572 (init_registers_arm_with_iwmmxt): Likewise.
5573 (the_low_target): Add initializer for arch_setup field.
5574 * linux-cris-low.c (init_registers_cris): Add prototype.
5575 (the_low_target): Add initializer for arch_setup field.
5576 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5577 (the_low_target): Add initializer for arch_setup field.
5578 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5579 (the_low_target): Add initializer for arch_setup field.
5580 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5581 (the_low_target): Add initializer for arch_setup field.
5582 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5583 (the_low_target): Add initializer for arch_setup field.
5584 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5585 (the_low_target): Add initializer for arch_setup field.
5586 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5587 (init_registers_mips64_linux): Likewise.
5588 (the_low_target): Add initializer for arch_setup field.
5589 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5590 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5591 (the_low_target): Add initializer for arch_setup field.
5592 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5593 (init_registers_powerpc_64): Likewise.
5594 (the_low_target): Add initializer for arch_setup field.
5595 * linux-s390-low.c (init_registers_s390): Add prototype.
5596 (init_registers_s390x): Likewise.
5597 (the_low_target): Add initializer for arch_setup field.
5598 * linux-sh-low.c (init_registers_sh): Add prototype.
5599 (the_low_target): Add initializer for arch_setup field.
5600 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5601 (the_low_target): Add initializer for arch_setup field.
5602 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5603 (the_low_target): Add initializer for arch_setup field.
5604
5605 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5606 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5607 instead of init_registers ().
5608 * win32-arm-low.c (init_registers_arm): Add prototype.
5609 (the_low_target): Add initializer for arch_setup field.
5610 * win32-i386-low.c (init_registers_i386): Add prototype.
5611 (the_low_target): Add initializer for arch_setup field.
5612
5613 * spu-low.c (init_registers_spu): Add prototype.
5614 (initialize_low): Call initialie_registers_spu () instead of
5615 initialize_registers ().
5616
fd96d250
PA
56172008-02-19 Pedro Alves <pedro@codesourcery.com>
5618
5619 * server.c (handle_v_requests): When handling the vRun and vAttach
5620 packets, if already debugging a process, don't kill it. Return an
5621 error instead.
5622
d41b6bb4
DJ
56232008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5624
5625 * server.c (handle_query): Correct length check.
5626
5ac588cf
PA
56272008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5628
5629 * win32-low.c (do_initial_child_stuff): Add process handle
5630 parameter. Set current_process_handle and current_process_id from the
5631 parameters. Clear globals.
5632 (win32_create_inferior): Don't set current_process_handle and
5633 current_process_id here. Instead pass them on the call to
5634 do_initial_child_stuff.
5635 (win32_attach): Likewise.
5636 (win32_clear_inferiors): New.
5637 (win32_kill): Don't close the current process handle or the
5638 current thread handle here. Instead call win32_clear_inferiors.
5639 (win32_detach): Don't open a new handle to the process. Call
5640 win32_clear_inferiors.
5641 (win32_join): Don't rely on current_process_handle; open a new
5642 handle using the process id.
5643 (win32_wait): Call win32_clear_inferiors when the inferior process
5644 has exited.
5645
ecd7ecbc
DJ
56462008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5647
5648 * server.c (monitor_show_help): Add "exit".
5649
1525d545
MG
56502008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5651
ecd7ecbc 5652 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
5653 (clean): Add reg-xtensa.c.
5654 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
5655 * configure.srv (xtensa*-*-linux*) New target.
5656 * linux-xtensa-low.c: New.
5657 * xtensa-xtregs.c: New.
1525d545 5658
59a016f0
PA
56592008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5660
5661 * hostio.c: Don't include errno.h.
5662 (errno_to_fileio_errno): Move to hostio-errno.
5663 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5664 error number outputting to the target->hostio_last_error callback.
5665 (hostio_packet_error): Use FILEIO_EINVAL directly.
5666 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5667 calls to hostio_error.
5668 * hostio-errno.c: New.
5669 * server.h (hostio_last_error_from_errno): Declare.
5670 * target.h (target_ops): Add hostio_last_error member.
5671 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5672 as hostio_last_error handler.
889bf7c5 5673 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
5674 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5675 (wince_hostio_last_error): New functions.
5676 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5677 as hostio_last_error handler.
5678 (win32_target_ops) [!_WIN32_WCE]: Register
5679 hostio_last_error_from_errno as hostio_last_error handler.
5680 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5681 (hostio-errno.o): New rule.
5682 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5683 * configure.srv (srv_hostio_err_objs): New variable. Default to
5684 hostio-errno.o.
5685 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5686 * configure: Regenerate.
5687
2d717e4f
DJ
56882008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5689
5690 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5691 (linux_kill, linux_detach): Clean up the process list.
5692 * remote-utils.c (remote_open): Improve port number parsing.
5693 (putpkt_binary, input_interrupt): Only send interrupts if the target
5694 is running.
5695 * server.c (extended_protocol): Make static.
5696 (attached): Define earlier.
5697 (exit_requested, response_needed, program_argv): New variables.
5698 (target_running): New.
5699 (start_inferior): Clear attached here.
5700 (attach_inferior): Set attached here.
5701 (require_running): Define.
5702 (handle_query): Use require_running and target_running. Implement
5703 "monitor exit".
5704 (handle_v_attach, handle_v_run): New.
5705 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5706 (gdbserver_usage): Update.
5707 (main): Redo argument parsing. Handle --debug and --multi. Handle
5708 --attach along with other options or after the port. Save
5709 program_argv. Support no initial program. Resynchronize
5710 communication with GDB after an error. Handle "monitor exit".
5711 Use require_running and target_running. Always allow the extended
5712 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5713 restart in extended mode.
5714 * README: Refer to the GDB manual. Update --attach usage.
5715
7407e2de
AS
57162007-12-20 Andreas Schwab <schwab@suse.de>
5717
5718 * linux-low.c (STACK_SIZE): Define.
5719 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5720 (linux_test_for_tracefork): Likewise.
5721
b65d95c5
DJ
57222007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5723
5724 * linux-low.c (linux_wait_for_event): Update messages. Do not
5725 reinsert auto-delete breakpoints.
5726 * mem-break.c (struct breakpoint): Change return type of handler to
5727 int.
5728 (set_breakpoint_at): Update handler type.
5729 (reinsert_breakpoint_handler): Return 1 instead of calling
5730 delete_breakpoint.
5731 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5732 setting a new one.
5733 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5734 * mem-break.h (set_breakpoint_at): Update handler type.
5735 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5736 * win32-low.c (auto_delete_breakpoint): New.
5737 (get_child_debug_event): Use it.
5738
4e799345
DJ
57392007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5740
5741 * configure.ac: Check for pread and pwrite.
5742 * hostio.c (handle_pread): Fall back to lseek and read.
5743 (handle_pwrite): Fall back to lseek and write.
5744 * config.in, configure: Regenerated.
5745
27524b67
DJ
57462007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5747
5748 * server.c (myresume): Add own_buf argument.
5749 (main): Update calls.
5750
a20d5e98
DJ
57512007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5752
5753 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5754 * remote-utils.c (remote_open): Do not call disable_async_io.
5755 (block_async_io): Delete.
5756 (unblock_async_io): Make static.
5757 (initialize_async_io): New.
5758 * server.c (handle_v_cont): Handle async I/O here.
5759 (myresume): Likewise. Move other common resume tasks here...
5760 (main): ... from here. Call initialize_async_io. Disable async
5761 I/O before the main loop.
5762 * server.h (initialize_async_io): Declare.
5763 (block_async_io, unblock_async_io): Delete prototypes.
5764 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5765
b79d787e
DJ
57662007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5767
5768 * remote-utils.c (readchar): Allow binary data in received messages.
5769
d97903b2
PA
57702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5771
5772 * win32-low.c (attaching): New global.
5773 (win32_create_inferior): Clear the `attaching' global.
5774 (win32_attach): Set the `attaching' global.
5775 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5776 attaching. Only set a breakpoint at the entry point if not
5777 attaching.
5778
311de423
PA
57792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5780
5781 * server.c (main): Don't report dll events on the initial
5782 connection on attaches.
5783
6c2d16d2
PA
57842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5785
5786 * server.c (main): Relax numerical bases supported for the pid of
5787 the --attach command line argument.
5788
5ca906e6
PA
57892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5790
5791 * win32-low.c (win32_attach): Call OpenProcess before
5792 DebugActiveProcess, not after. Add last error output to error
5793 call.
5794
9c6c8194
PA
57952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5796
5797 * win32-low.c (win32_get_thread_context)
5798 (win32_set_thread_context): New functions.
5799 (thread_rec): Use win32_get_thread_context.
5800 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5801 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5802 field.
5803
4d5d1aaa
PA
58042007-12-03 Leo Zayas
5805 Pedro Alves <pedro_alves@portugalmail.pt>
5806
5807 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5808 global variables.
5809 (child_add_thread): Minor cleanup.
5810 (child_continue): Resume artificially suspended threads before
5811 calling ContinueDebugEvent.
5812 (suspend_one_thread): New.
5813 (fake_breakpoint_event): New.
5814 (get_child_debug_event): Change return type to int. Check here if
5815 gdb sent an interrupt request. If a soft interrupt was requested,
5816 fake a breakpoint event. Return 0 if there is no event to handle,
5817 and 1 otherwise.
5818 (win32_wait): Don't check here if gdb sent an interrupt request.
5819 Ensure there is a valid event to handle.
5820 (win32_request_interrupt): Add soft interruption method as last
5821 resort.
5822
c436e841
PA
58232007-12-03 Leo Zayas
5824 Pedro Alves <pedro_alves@portugalmail.pt>
5825
5826 * win32-low.h (win32_thread_info): Add descriptions to the
5827 structure members. Replace `suspend_count' counter by a
5828 `suspended' flag.
5829 * win32-low.c (thread_rec): Update condition of when to get the
5830 context from the inferior. Rely on ContextFlags being set if it
5831 has already been retrieved. Only suspend the inferior thread if
5832 we haven't already. Warn if that fails.
5833 (continue_one_thread): s/suspend_count/suspended/. Only call
5834 ResumeThread once. Warn if that fails.
5835
e7b5fa67
PA
58362007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5837
5838 * win32-low.c (win32_wait): Don't read from the inferior when it
5839 has already exited.
5840
a385171d
PA
58412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5842
5843 * Makefile.in (win32_low_h): New variable.
5844 (win32-low.o): Add dependency on $(win32_low_h).
5845 (win32-arm-low.o, win32-i386-low.o): New rules.
5846
f80c84b3
DJ
58472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5848
5849 * hostio.c: Correct copyright year.
5850
a6b151f1
DJ
58512007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5852
5853 * Makefile.in (OBS): Add hostio.o.
5854 (hostio.o): New rule.
5855 * server.h (handle_vFile): Declare.
5856 * hostio.c: New file.
5857 * server.c (handle_v_requests): Take packet_len and new_packet_len
5858 for binary packets. Call handle_vFile.
5859 (main): Update call to handle_v_requests.
5860
f9387fc3
DJ
58612007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5862
5863 * linux-low.c: Include <sched.h>.
5864
51c2684e
DJ
58652007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5866
5867 * linux-low.c (linux_tracefork_grandchild): New.
5868 (linux_tracefork_child): Use clone.
5869 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5870
75f83163
JB
58712007-10-31 Joel Brobecker <brobecker@adacore.com>
5872
5873 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5874
da5898ce
DJ
58752007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5876
5877 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5878
24a09b5f
DJ
58792007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5880
5881 * inferiors.c (change_inferior_id): Delete.
5882 (add_pid_to_list, pull_pid_from_list): New.
5883 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5884 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5885 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5886 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5887 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5888 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5889 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5890 (using_threads): Always set to 1.
5891 (handle_extended_wait): New.
5892 (add_process): Do not set TID.
5893 (linux_create_inferior): Set must_set_ptrace_flags.
5894 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5895 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5896 (linux_thread_alive): Rename TID argument to LWPID.
5897 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5898 (linux_wait_for_event): Do not use TID or check using_threads. Update
5899 call to dead_thread_notify. Call handle_extended_wait.
5900 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5901 (send_sigstop): Delete sigstop_sent.
5902 (wait_for_sigstop): Avoid TID.
5903 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5904 (linux_test_for_tracefork): New.
5905 (linux_lookup_signals): Use thread_db_active and
5906 linux_supports_tracefork_flag.
5907 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5908 * linux-low.h (get_process_thread): Avoid TID.
5909 (struct process_ifo): Move thread_known and tid to the end. Remove
5910 sigstop_sent.
5911 (linux_attach_lwp, thread_db_init): Update prototypes.
5912 * server.h (change_inferior_id): Delete prototype.
5913 (add_pid_to_list, pull_pid_from_list): New prototypes.
5914 * thread-db.c (thread_db_use_events): New.
5915 (find_first_thread): Rename to...
5916 (find_one_thread): ...this. Update callers and messages. Do not
5917 call fatal. Check thread_db_use_events. Do not call
5918 change_inferior_id or new_thread_notify.
5919 (maybe_attach_thread): Update. Do not call new_thread_notify.
5920 (thread_db_init): Set thread_db_use_events. Check use_events.
5921 * utils.c (fatal, warning): Correct message prefix.
5922
30ed0a8f
DJ
59232007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5924
5925 * Makefile.in (clean): Remove new files.
5926 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5927 (powerpc-64.o, powerpc-64.c): New rules.
5928 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5929 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5930 with SPE.
5931 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5932 SPE targets.
5933 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5934 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5935 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5936 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5937 (target_regsets): Add AltiVec and SPE register sets.
5938 * configure.ac: Check for AltiVec and SPE.
5939 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5940 (ppc_fill_vrregset, ppc_store_vrregset): New.
5941 (target_regsets): Add AltiVec register set.
5942 * configure: Regenerated.
5943
fd462a61
DJ
59442007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5945
5946 * linux-low.c (O_LARGEFILE): Define.
5947 (linux_read_memory): Use /proc/PID/mem.
5948 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5949 * configure, config.in: Regenerated.
5950
69f223ed
DJ
59512007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5952
5953 * linux-low.c (linux_wait_for_event): Do not pass signals while
5954 single-stepping.
5955
aec18585
PA
59562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5957
5958 * win32-low.c (create_process): New.
5959 (win32_create_inferior): Use create_process instead of
5960 CreateProcess. If create_process failed retry appending an ".exe"
5961 suffix. Store the GetLastError result immediatelly after
5962 create_process calls and use it on the call to error.
5963
34d86ddd
PA
59642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5965
5966 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5967
5a0e3bd0
JB
59682007-08-23 Joel Brobecker <brobecker@adacore.com>
5969
5970 * configure.ac: Switch license to GPLv3.
5971
f88c79e6
MS
59722007-08-01 Michael Snyder <msnyder@access-company.com>
5973
5974 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5975
6b3d9b83
PA
59762007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5977
5978 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5979 typedef.
5980 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5981 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5982 CloseToolhelp32Snapshot.
5983 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5984 CloseToolhelp32Snapshot.
5985
c588c53c
MS
59862007-07-27 Michael Snyder <michael.snyder@access-company.com>
5987
5988 * server.c (main): Check for inferior exit before main loop.
5989
aa0403d9
PA
59902007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5991
5992 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5993 instead of on tmp_desc.
5994
255e7678
DJ
59952007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5996 Daniel Jacobowitz <dan@codesourcery.com>
5997
5998 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5999 (add_thread): Minor cleanups.
6000 (clear_inferiors): Move lower in the file. Clear the DLL
6001 list.
6002 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6003 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6004 (xml_escape_text): New.
6005 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6006 for qSupported.
6007 (handle_v_cont): Report errors.
6008 (gdbserver_version): Update.
6009 (main): Correct size of own_buf. Do not report initial DLL events.
6010 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6011 (unloaded_dll, xml_escape_text): New.
6012 * win32-low.c (enum target_waitkind): Update comments.
6013 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6014 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6015 (win32_EnumProcessModules, win32_GetModuleInformation)
6016 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6017 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6018 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6019 (win32_Module32First, win32_Module32Next, load_toolhelp)
6020 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6021 (get_child_debug_event): Handle DLL events.
6022 (win32_wait): Likewise.
6023
0d37add9
DJ
60242007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6025
6026 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6027 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6028
45e2715e
PA
60292007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6030
6031 * win32-low.c (handle_output_debug_string): Ignore event if not
6032 waiting.
6033
c5674cf1
PA
60342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6035
6036 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6037
2bbe3cc1
DJ
60382007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6039
6040 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6041
ae13219e
DJ
60422007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6043
6044 * inferiors.c (change_inferior_id): Add comment.
6045 * linux-low.c (check_removed_breakpoint): Add an early
6046 prototype. Improve debug output.
6047 (linux_attach): Doc update.
6048 (linux_detach_one_process, linux_detach): Clean up before releasing
6049 each process.
6050 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6051 * linux-low.h (struct process_info): Doc improvement.
6052 * mem-break.c (delete_all_breakpoints): New.
6053 * mem-break.h (delete_all_breakpoints): New prototype.
6054 * thread-db.c (find_first_thread): New.
6055 (thread_db_create_event): Call it instead of
6056 thread_db_find_new_threads. Clean up unused variables.
6057 (maybe_attach_thread): Remove first thread handling.
6058 (thread_db_find_new_threads): Use find_first_thread.
6059 (thread_db_get_tls_address): Likewise.
6060
4105de34
DJ
60612007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6062
6063 * thread-db.c (thread_db_find_new_threads): Add prototype.
6064 (thread_db_create_event): Check for the main thread before adding
6065 a new thread.
6066 (maybe_attach_thread): Only enable event reporting if TID == 0.
6067 (thread_db_get_tls_address): Check for new threads.
6068
2b876972
DJ
60692007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6070
6071 * linux-low.c (linux_create_inferior): Try execv before execvp.
6072 * spu-low.c (spu_create_inferior): Likewise.
6073
7a245884
DJ
60742007-06-13 Mike Frysinger <vapier@gentoo.org>
6075
6076 * linux-low.c (linux_create_inferior): Change execv to execvp.
6077 * spu-low.c (spu_create_inferior): Likewies.
6078
117ce543
DJ
60792007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6080
6081 * Makefile.in (clean): Clean new files instead of deleted ones.
6082 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6083 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6084 rules.
6085 * configure.srv: Specify XML files and new regformats for MIPS and
6086 MIPS64 GNU/Linux.
6087 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6088 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6089 an entry for the restart register.
6090 (mips_cannot_fetch_register, mips_cannot_store_register)
6091 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6092 register names to match the XML descriptions.
6093 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6094 restart register instead of $0.
6095
0e7f50da
UW
60962007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6097 Markus Deuling <deuling@de.ibm.com>
6098
6099 * remote-utils.c (decode_xfer_write): New function.
6100 * server.h (decode_xfer_write): Add prototype.
6101 * server.c (handle_query): Add PACKET_LEN argument. Support
6102 qXfer:spu:read and qXfer:spu:write packets.
6103 (main): Pass packet_len to handle_query.
6104 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6105 * target.h (target_ops): Add qxfer_spu.
6106
374c1d38
UW
61072007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6108
6109 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6110 accessing non-seekable spufs files.
6111
bb63802a
UW
61122007-05-16 Markus Deuling <deuling@de.ibm.com>
6113
889bf7c5 6114 * server.c (handle_query): Add reply for qC packet.
bb63802a 6115
7390519e
PA
61162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6117 Leo Zayas <lerele@champenstudios@com>
6118
6119 * server.h (check_remote_input_interrupt_request): New function.
6120 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6121 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6122 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6123 (check_remote_input_interrupt_request): New function.
6124 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 6125 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
6126 winapi_GenerateConsoleCtrlEvent): New typedefs.
6127 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6128 to 250 ms.
6129 (win32_wait): Check for remote interrupt request
6130 with check_remote_input_interrupt_request.
6131 (win32_request_interrupt): New function.
6132 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6133
34b34921
PA
61342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6135
6136 * win32-low.c (debug_registers_changed,
6137 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6138 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6139 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6140 (thread_rec): Get context using the low target.
6141 (child_add_thread): Call thread_added on the low target,
6142 which does the same thing.
6143 (regptr): Delete.
6144 (do_initial_child_stuff): Remove debug registers references.
6145 Set context using the low target. Resume threads after
6146 setting the contexts.
6147 (child_continue): Remove dead variable. Remove debug
6148 registers references.
6149 (child_fetch_inferior_registers): Go through the low target.
6150 (do_child_store_inferior_registers): Remove.
6151 (child_store_inferior_registers): Go through the low target.
6152 (win32_resume): Remove debug registers references.
6153 Set context using the low target.
6154 (handle_exception): Change return type to void. Don't record
6155 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6156 first chance exception.
889bf7c5 6157 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
6158 goto loop. Always return after waiting for debug event.
6159 (win32_wait): Convert to switch statement. Handle spurious
6160 events.
6161
6162 * win32-i386-low.c (debug_registers_changed,
6163 debug_registers_used): New.
6164 (initial_stuff): Rename to ...
6165 (i386_initial_stuff): ... this. Clear debug registers
6166 state variables.
6167 (store_debug_registers): Delete.
6168 (i386_get_thread_context): New.
6169 (load_debug_registers): Delete.
6170 (i386_set_thread_context): New.
6171 (i386_thread_added): New.
6172 (single_step): Rename to ...
6173 (i386_single_step): ... this.
6174 (do_fetch_inferior_registers): Rename to ...
6175 (i386_fetch_inferior_register): ... this.
6176 (i386_store_inferior_register): New.
6177 (the_low_target): Adapt to new interface.
6178
6179 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6180 (arm_get_thread_context): New.
6181 (arm_set_thread_context): New.
6182 (regptr): New.
6183 (do_fetch_inferior_registers): Rename to ...
6184 (arm_fetch_inferior_register): ... this.
6185 (arm_store_inferior_register): New.
6186 (arm_wince_breakpoint): Reimplement as unsigned long.
6187 (arm_wince_breakpoint_len): Define.
6188 (the_low_target): Adapt to new interface.
6189
6190 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6191 load_debug_registers. Add get_thread_context, set_thread_context,
6192 thread_added and store_inferior_register. Rename
6193 fetch_inferior_registers to fetch_inferior_register.
6194 (regptr): Remove declaration.
6195
dd6953e1
PA
61962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6197
6198 * linux-low.c (linux_detach): Change return type to int. Return 0.
6199 * spu-low.c (spu_detach): Likewise.
6200
444d6139
PA
62012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6202
6203 * target.h (target_ops): Change return type of detach to int.
6204 Add join.
6205 (join_inferior): New.
6206 * server.c (main): Don't skip detach support on mingw32.
6207 If the inferior doesn't support detaching return error.
6208 Call join_inferior instead of using waitpid.
6209 * linux-low.c (linux_join): New.
6210 (linux_target_op): Add linux_join.
6211 * spu-low.c (spu_join): New.
6212 (spu_target_ops): Add spu_join.
6213 * win32-low.c (win32_detach): Adapt to new interface.
6214 Reopen current_process_handle before detaching. Issue a child
6215 resume before detaching.
6216 (win32_join): New.
6217 (win32_target_op): Add win32_join.
6218
1d5315fe
PA
62192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6220
6221 * win32-low.c (win32-attach): Fix return value.
6222 * target.h (target_ops): Describe ATTACH return values.
6223
bf914831
PA
62242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6225
6226 * win32-low.c (GETPROCADDRESS): Define.
6227 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6228 (winapi_DebugSetProcessKillOnExit): Likewise.
6229 (win32_create_inferior): Force usage of ansi CreateProcessA.
6230 (win32_attach): Use GETPROCADDRESS.
6231 (win32_detach): Likewise.
6232
f72f3e60
PA
62332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6234
6235 * win32-low.c (win32_wait): Don't use WSTOPSIG.
6236
ed50f18f
PA
62372007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
6238
6239 * win32-low.c: Commit leftover changes from 2007-03-29.
6240
0c2ead7e
DJ
62412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6242
6243 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6244 fields short instead of int. Add explicit padding.
6245 (i387_cache_to_fsave): Remove unnecessary casts.
6246 (i387_fsave_to_cache): Doc fix.
6247 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6248
73725ff3
DJ
62492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6250
6251 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6252 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6253
d99f33d8
PA
62542007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6255
6256 * configure.srv (arm*-*-mingw32ce*): Move near the other
6257 arm targets.
6258
68070c10
PA
62592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6260
2482afc6 6261 * configure.ac: Add errno checking.
68070c10
PA
6262 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6263 sys/file.h and malloc.h.
6264 (AC_CHECK_DECLS): Add perror.
6265 (srv_mingwce): Handle.
2482afc6 6266 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
6267 win32-i386-low.o to srv_tgtobj.
6268 (i[34567]86-*-mingw*): Likewise.
6269 (arm*-*-mingw32ce*): Add case.
6270 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6271 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6272 [__MINGW32CE__] (strerror): New function.
6273 [__MINGW32CE__] (errno): Define to GetLastError.
6274 [__MINGW32CE__] (COUNTOF): New macro.
6275 (remote_open): Remove extra close call.
6276 * mem-break.c (delete_breakpoint_at): New function.
6277 * mem-break.h (delete_breakpoint_at): Declare.
6278 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6279 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6280 [USE_WIN32API] (read, write): Add char* casts.
6281 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6282 * server.h: Include wincecompat.h on Windows CE.
6283 [HAVE_ERRNO_H]: Check.
6284 (perror): Declare if not declared.
6285 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6286 (perror_with_name): Remove errno declaration.
6287 * wincecompat.h: New.
6288 * wincecompat.c: New.
6289 * win32-low.h: New.
6290 * win32-arm-low.c: New.
6291 * win32-i386-low.c: New.
6292 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6293 (OUTMSG2): Make it safe.
6294 (_T): New macro.
6295 (COUNTOF): New macro.
6296 (NUM_REGS): Get it from the low target.
6297 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6298 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6299 (thread_rec): Let low target handle debug registers.
6300 (child_add_thread): Likewise.
6301 (child_init_thread_list): Likewise.
6302 (continue_one_thread): Likewise.
6303 (regptr): New.
6304 (do_child_fetch_inferior_registers): Move to ...
6305 * win32-i386-low.c: ... here, and rename to ...
6306 (do_fetch_inferior_registers): ... this.
889bf7c5 6307 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
6308 Go through the low target.
6309 (do_child_store_inferior_registers): Use regptr.
6310 (strwinerror): New function.
6311 (win32_create_inferior): Handle Windows CE.
6312 Use strwinerror instead of strerror on Windows error
6313 codes. Add program to the error output.
6314 Don't close the main thread handle on Windows CE.
6315 (win32_attach): Use coredll.dll on Windows CE.
6316 (win32_kill): Close current process and current
6317 thread handles.
6318 (win32_detach): Use coredll.dll on Windows CE.
6319 (win32_resume): Let low target handle debug registers, and
6320 step request.
6321 (handle_exception): Add/Remove initial breakpoint. Avoid
6322 non-existant WSTOPSIG on Windows CE.
6323 (win32_read_inferior_memory): Cast to remove warning.
6324 (win32_arch_string): Go through the low target.
6325 (initialize_low): Call set_breakpoint_data with the low
6326 target's breakpoint.
6327 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6328 FOP_REGNUM, mappings): Move to ...
6329 * win32-i386-low.c: ... here.
6330 * win32-low.c (win32_thread_info): Move to ...
6331 * win32-low.h: ... here.
6332 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6333 win32-arm-low.c and wincecompat.c.
6334 (all:): Add $EXEEXT.
6335 (install-only:): Likewise.
6336 (gdbserver:): Likewise.
6337 (gdbreplay:): Likewise.
6338 * config.in: Regenerate.
6339 * configure: Regenerate.
6340
41093d81
PA
63412007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6342
6343 * win32-low.c: Rename typedef thread_info to
6344 win32_thread_info throughout.
6345
544afa54
PA
63462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6347
6348 * win32-i386-low.c: Rename to ...
6349 * win32-low.c: ... this.
6350 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6351 * Makefile.in: Likewise.
6352
bce7165d
PA
63532007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6354
6355 * remote-utils.c (monitor_output): Constify msg parameter.
6356 * server.h (monitor_output): Likewise.
6357 * win32-i386-low.c (handle_output_debug_string): New.
6358 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6359 handle_output_debug_string.
6360 (get_child_debug_event): Likewise.
6361
506c7aa0
DJ
63622007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6363
6364 * server.c (main): Correct strtoul check.
6365
42c81e2a
DJ
63662007-03-27 Jon Ringle <jon@ringle.org>
6367
6368 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6369
9453113a
DJ
63702007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6371
6372 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6373
64a69107
DJ
63742007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6375
6376 * terminal.h: Check HAVE_SGTTY_H.
6377
63782007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
6379
6380 * remote-utils.c (remote_open): Print out the assigned port number.
6381
c74d0ad8
DJ
63822007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6383
6384 * remote-utils.c (monitor_output): New function.
6385 * server.c (debug_threads): Define here.
6386 (monitor_show_help): New function.
6387 (handle_query): Handle qRcmd.
6388 (main): Do not handle 'd' packet.
6389 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6390 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6391 of debug_threads.
6392
de7c3b4a
PA
63932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6394
6395 * Makefile.in (EXEEXT): New.
6396 (clean): Use $(EXEEXT).
6397
ef57601b
PA
63982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6399
6400 * target.h (target_ops): Rename send_signal to request_interrupt,
6401 and remove enum target_signal parameter.
6402 * linux-low.c (linux_request_interrupt): Rename from
6403 linux_send_signal, and always send SIGINT.
6404 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6405 and always send SIGINT.
6406 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6407 of send_signal.
6408 (input_interrupt): Likewise.
6409
820f2bda
PA
64102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6411
6412 * server.c (get_features_xml): Check if target implemented
6413 arch_string.
6414 * win32-i386-low.c (win32_arch_string): New.
6415 (win32_target_ops): Add win32_arch_string as arch_string member.
6416
ab39bf24
UW
64172007-02-22 Markus Deuling <deuling@de.ibm.com>
6418
6419 * spu-low.c (spu_arch_string): New.
6420 (spu_target_ops): Add spu_arch_string.
6421
61ff6e04
DJ
64222007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6423
6424 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6425 * configure.ac: Do not check for terminal.h.
6426 * configure, config.in: Regenerated.
6427
fb1e4ffc
DJ
64282007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6429
6430 * Makefile.in (OBS): Add $(XML_BUILTIN).
6431 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6432 (clean): Update.
6433 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6434 (arm-with-iwmmxt.c): New.
6435 * config.in, configure: Regenerate.
6436 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6437 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6438 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6439 (arm*-*-linux*): Add iWMMXt and regset support.
6440 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6441 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6442 (arm_store_wmmxregset, target_regsets): New.
6443 * server.c (get_features_xml): Take annex argument. Check builtin
6444 XML documents.
6445 (handle_query): Handle multiple annexes.
6446
0f48aa01
DJ
64472007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6448
6449 * remote-utils.c [USE_WIN32API] (read, write): Define.
6450 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6451 write.
6452
23181151
DJ
64532007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6454
6455 * linux-i386-low.c (the_low_target): Set arch_string.
6456 * linux-x86-64-low.c (the_low_target): Likewise.
6457 * linux-low.c (linux_arch_string): New.
6458 (linux_target_ops): Add it.
6459 * linux-low.h (struct linux_target_ops): Add arch_string.
6460 * server.c (write_qxfer_response): Use const void * for DATA.
6461 (get_features_xml): New.
6462 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6463 * target.h (struct target_ops): Add arch_string method.
6464
9d606399
DJ
64652007-01-03 Denis Pilat <denis.pilat@st.com>
6466 Daniel Jacobowitz <dan@codesourcery.com>
6467
6468 * linux-low.c (linux_kill): Handle being called with no threads.
6469 * win32-i386-low.c (win32_kill): Likewise.
6470 (get_child_debug_event): Clear current_process_handle.
6471
64722006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
6473 Daniel Jacobowitz <dan@codesourcery.com>
6474
6475 * remote-utils.c (remote_open): Check the type of specified
6476 serial port devices before opening them.
6477 * server.c (main): Kill the inferior if an error occurs during
6478 the first remote_open.
6479
a5e13d24
DJ
64802006-12-05 Markus Deuling <deuling@de.ibm.com>
6481
6482 * README: Update supported targets.
6483
186947f7
DJ
64842006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6485
6486 * Makefile.in (clean): Remove reg-mips64.c.
6487 (reg-mips64.c, reg-mips64.o): New rules.
6488 * configure.srv: Handle mips64. Include regset support for mips.
6489 * linux-mips-low.c (union mips_register): New.
6490 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6491 (mips_breakpoint, mips_breakpoint_at): Use int.
6492 (mips_collect_register, mips_supply_register)
6493 (mips_collect_register_32bit, mips_supply_register_32bit)
6494 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6495 (mips_store_fpregset, target_regsets): New.
6496 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6497
a13e2c95
UW
64982006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6499
6500 * configure.srv: Add target "spu*-*-*".
6501 * Makefile.in (clean): Remove reg-spu.c.
6502 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6503 * spu-low.c: New file.
6504
cb7283db
DJ
65052006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6506
6507 * configure.ac: Correct td_thr_tls_get_addr test.
6508 * configure: Regenerated.
6509
89be2091
DJ
65102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6511
6512 * linux-low.c (linux_wait_for_event): Reformat. Use the
6513 pass_signals array.
6514 * remote-utils.c (decode_address_to_semicolon): New.
6515 * server.c (pass_signals, handle_general_set): New.
6516 (handle_query): Mention QPassSignals for qSupported.
6517 (main): Call handle_general_set.
6518 * server.h (pass_signals, decode_address_to_semicolon): New.
6519
000ef4f0
DJ
65202006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6521
6522 * server.c (handle_query): Correct error handling for read_auxv.
6523
b7149293
UW
65242005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6525
6526 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6527 and srv_linux_thread_db to yes.
6528 * linux-s390-low.c (s390_fill_gregset): New function.
6529 (target_regsets): Define data structure.
6530
dae5f5cf
DJ
65312006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6532
6533 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6534 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6535 * config.in, configure: Regenerated.
6536 * inferiors.c (gdb_id_to_thread): New function.
6537 (gdb_id_to_thread_id): Use it.
6538 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6539 * linux-low.h (struct process_info): Add th member.
6540 (thread_db_get_tls_address): New prototype.
6541 * remote-utils.c (decode_address): Make non-static.
6542 * server.c (handle_query): Handle qGetTLSAddr.
6543 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6544 * target.h (struct target_ops): Add get_tls_address.
6545 * thread-db.c (maybe_attach_thread): Save the thread handle.
6546 (thread_db_get_tls_address): New.
6547
32ca6d61
DJ
65482006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6549
6550 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6551 (linux_resume_one_process): Take a siginfo_t *. Update all
6552 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6553 (struct pending_signals): Add a siginfo_t.
6554 (linux_wait_for_process): Always set last_status.
6555 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6556 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6557 * linux-low.h (struct process_info): Add last_status.
6558
5ffff7c1
DJ
65592006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6560
6561 * remote-utils.c (try_rle): New function.
6562 (putpkt_binary): Use it.
6563
8695c747
DJ
65642006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6565
6566 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6567 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6568 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6569 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6570 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6571 point registers.
6572
290fadea
RS
65732006-08-08 Richard Sandiford <richard@codesourcery.com>
6574
6575 * server.c (terminal_fd): New variable.
6576 (old_foreground_pgrp): Likewise.
6577 (restore_old_foreground_pgrp): New function.
6578 (start_inferior): Record the terminal file descriptor in terminal_fd
6579 and its original foreground group in old_foreground_pgrp. Register
6580 restore_old_foreground_pgrp with atexit().
6581
9f2e1e63
DJ
65822006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6583
6584 * server.c (handle_query): Correct qPart to qXfer.
6585
b80864fb
DJ
65862006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6587
6588 * configure.ac: Check for more headers which are missing on
6589 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6590 * configure.srv: Add Cygwin and mingw32.
6591 * remote-utils.c: Don't include headers unconditionally which
6592 are missing on mingw32. Include <winsock.h> for mingw32.
6593 (remote_open): Adjust for mingw32 support. Flush
6594 standard error after writing to it.
6595 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6596 (unblock_async_io, enable_async_io, disable_async_io)
6597 (readchar, getpkt): Update for Winsock support.
6598 (prepare_resume_reply): Expect a protocol signal number.
6599 * server.c: Disable <sys/wait.h> on mingw32.
6600 (start_inferior): Adjust for mingw32 support. Flush
6601 standard error after writing to it.
6602 (attach_inferior): Likewise. Use protocol signal
6603 numbers.
6604 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6605 and names.
6606 * win32-i386-low.c: New file.
6607 * Makefile.in (XM_CLIBS): Set.
6608 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6609 (win32-i386-low.o): New dependency rule.
6610 * linux-low.c (linux_wait): Use target signal numbers.
6611 * target.h (struct target_ops): Doc fix.
6612 * server.h (target_signal_to_name): New prototype.
6613 * gdbreplay.c: Don't include headers unconditionally which
6614 are missing on mingw32. Include <winsock.h> for mingw32.
6615 (remote_close, remote_open): Adjust for Winsock support.
6616 * configure, config.in: Regenerated.
6617
0876f84a
DJ
66182006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6619
6620 * server.c (decode_xfer_read, write_qxfer_response): New.
6621 (handle_query): Take a packet length argument. Handle
6622 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6623 the qSupported response.
6624 (main): Update call to handle_query.
6625
01f9e8fa
DJ
66262006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6627
6628 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6629 (putpkt_binary): Renamed from putpkt and adjusted for binary
6630 data.
6631 (putpkt): New wrapper for putpkt_binary.
6632 (readchar): Don't mask off the high bit.
6633 (decode_X_packet): New function.
6634 * server.c (main): Call putpkt_binary if a handler sets the packet
6635 length. Save the length of the incoming packet. Handle 'X'.
6636 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6637
be2a5f71
DJ
66382006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6639
6640 * server.c (handle_query): Handle qSupported.
6641
ea025f5f
DJ
66422006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6643
6644 * remote-utils.c (all_symbols_looked_up): New variable.
6645 (look_up_one_symbol): Check it.
6646 * server.h (look_up_one_symbol): New declaration.
6647 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6648
9308fc88
DJ
66492006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6650
6651 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 6652 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
6653 (PTRACE_GET_THREAD_AREA): Define.
6654 (ps_get_thread_area): New function.
6655
52fb6437
NS
66562006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6657
6658 * configure.srv (m68k*-*-uclinux*): New target.
6659 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6660 (linux_resume_one_process): Remove extraneous cast.
6661 (linux_read_offsets): New.
6662 (linux_target_op): Add linux_read_offsets on mmuless systems.
6663 * server.c (handle_query): Add qOffsets logic.
6664 * target.h (struct target_ops): Add read_offsets.
6665
21b0f40c
DJ
66662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6667
6668 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6669 (PTRACE_GET_THREAD_AREA): Define.
6670 (ps_get_thread_area): New function.
6671 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6672 (linux-x86-64-low.o): Update.
6673
0050a760
DJ
66742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6675
6676 * configure.ac: Remove checks for prfpregset_t.
6677 * gdb_proc_service.h: New file.
6678 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6679 new "gdb_proc_service.h".
6680 * proc-service.c: Likewise.
6681 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6682 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6683 * Makefile.in (gdb_proc_service_h): Updated.
6684 * configure, config.in: Regenerated.
6685
b92a518e
DJ
66862006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6687
6688 * remote-utils.c (prepare_resume_reply): Move declaration
6689 of gdb_id_from_wait to the top of the block.
6690
545587ee
DJ
66912006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6692
6693 * linux-low.c (regsets_store_inferior_registers): Read the regset
6694 from the target before filling it.
6695
9db87ebd
DJ
66962006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6697
6698 * server.c (attach_inferior): Return SIGTRAP for a successful
6699 attach.
6700
dd24457d
DJ
67012006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6702
6703 * Makefile.in (OBS): Add version.o.
6704 (STAGESTUFF): Delete.
6705 (version.o): Add dependencies.
6706 (version.c): Replace rule.
6707 (clean): Remove version.c.
6708 * server.c (gdbserver_version): New.
6709 (gdbserver_usage): Use printf.
6710 (main): Handle --version and --help.
6711 * server.h (version, host_name): Add declarations.
6712
6f0f660e
EZ
67132005-12-23 Eli Zaretskii <eliz@gnu.org>
6714
889bf7c5
PA
6715 * linux-arm-low.c:
6716 * linux-arm-low.c:
6717 * inferiors.c:
6718 * i387-fp.h:
6719 * i387-fp.c:
6720 * gdbreplay.c:
6721 * regcache.c:
6722 * proc-service.c:
6723 * mem-break.h:
6724 * mem-break.c:
6725 * linux-x86-64-low.c:
6726 * linux-sh-low.c:
6727 * linux-s390-low.c:
6728 * linux-ppc64-low.c:
6729 * linux-ppc-low.c:
6730 * linux-mips-low.c:
6731 * linux-m68k-low.c:
6732 * linux-m32r-low.c:
6733 * linux-low.h:
6734 * linux-low.c:
6735 * linux-ia64-low.c:
6736 * linux-i386-low.c:
6737 * linux-crisv32-low.c:
6738 * thread-db.c:
6739 * terminal.h:
6740 * target.h:
6741 * target.c:
6742 * server.h:
6743 * server.c:
6744 * remote-utils.c:
6745 * regcache.h:
6746 * utils.c:
6747 * Makefile.in:
6748 * configure.ac:
6f0f660e
EZ
6749 * gdbserver.1: Add (C) after Copyright. Update the FSF
6750 address.
6751
9d1fb177
DJ
67522005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6753
6754 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6755 (arm_breakpoint_at): Recognize both breakpoints.
6756 (the_low_target): Use the correct breakpoint instruction.
6757
011a70c2
DJ
67582005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6759
6760 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6761 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6762 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6763 (the_low_target): Update.
6764
7fb85e41
AS
67652005-10-25 Andreas Schwab <schwab@suse.de>
6766
6767 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6768
6769 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6770 (ia64_num_regs): Reduce to 462.
6771
3db0444b
DJ
67722005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6773
6774 * acinclude.m4: Correct quoting.
6775 * aclocal.m4: Regenerated.
6776
6777 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6778 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6779 (thread_db_init): Call thread_db_err_str.
6780 * configure.ac: Check for TD_VERSION.
6781 * config.in, configure: Regenerated.
6782
bee0189a
DJ
67832005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6784
6785 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6786
e9d25b98
DJ
67872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6788
6789 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6790 is not available. Define HAVE_PTRACE_GETREGS if it is.
6791 * config.in, configure: Regenerated.
6792 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6793 * linux-i386-low.c, linux-m68k-low.c: Update to use
6794 HAVE_PTRACE_GETREGS.
6795 * linux-low.c (regsets_fetch_inferior_registers)
6796 (regsets_store_inferior_registers): Only return 0 if we processed
6797 GENERAL_REGS.
6798 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6799 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6800
a06660f7
DJ
68012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6802
6803 * inferiors.c (struct thread_info): Add gdb_id.
6804 (add_thread): Add gdb_id argument.
6805 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6806 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6807 calls to add_thread.
6808 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6809 * server.c (handle_query): Use thread_to_gdb_id.
6810 (handle_v_cont, main): Use gdb_id_to_thread_id.
6811 * server.h (add_thread): Update prototype.
6812 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6813 prototypes.
6814
5a1f5858
DJ
68152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6816
6817 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6818 left-padded registers.
6819 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6820 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6821
e122f1f5
SE
68222005-07-01 Steve Ellcey <sje@cup.hp.com>
6823
6824 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6825 * configure: Regenerate.
6826 * config.in: Regenerate.
6827 * server.h (NEED_DECLARATION_STRERROR):
6828 Replace with !HAVE_DECL_STRERROR.
6829
d592fa2f
DJ
68302005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6831
6832 * linux-low.c (linux_wait, linux_send_signal): Don't test
6833 an unsigned long variable for > 0 if it could be MAX_ULONG.
6834 * server.c (myresume): Likewise.
6835 * target.c (set_desired_inferior): Likewise.
6836
ccbd4912
MK
68372005-06-13 Mark Kettenis <kettenis@gnu.org>
6838
6839 * configure.ac: Simplify and improve check for socklen_t.
6840 * configure, config.in: Regenerate.
6841
f450004a
DJ
68422005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6843
6844 * acconfig.h: Remove.
6845 * configure.ac: Add a test for socklen_t. Use three-argument
6846 AC_DEFINE throughout.
6847 * config.in: Regenerated using autoheader 2.59.
6848 * configure: Regenerated.
6849
6850 * gdbreplay.c (socklen_t): Provide a default.
6851 (remote_open): Use socklen_t.
6852 * remote-utils.c (socklen_t): Provide a default.
6853 (remote_open): Use socklen_t.
6854 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6855 unsigned char.
6856
6857 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6858 char for buffers.
6859 * linux-low.c (linux_read_memory, linux_write_memory)
6860 (linux_read_auxv): Likewise.
6861 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6862 (check_mem_write): Likewise.
6863 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6864 Likewise.
6865 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6866 (registers_from_string, register_data): Likewise.
6867 * server.c (handle_query, main): Likewise.
6868 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6869 (decode_M_packet): Likewise.
6870 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6871 * target.h (struct target_ops): Update read_memory, write_memory,
6872 and read_auxv.
6873 (read_inferior_memory, write_inferior_memory): Update.
6874 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6875 to unsigned char *.
6876 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6877 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6878 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6879 linux-s390-low.c, linux-sh-low.c: Update for changes in
6880 read_inferior_memory and the_low_target->breakpoint.
6881
eee84df1
DJ
68822005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6883
6884 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6885 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6886 * configure.srv: Add powerpc64-*-linux*.
6887 * linux-ppc64-low.c: New file.
6888
45b134e5
OF
68892005-05-23 Orjan Friberg <orjanf@axis.com>
6890
6891 * linux-cris-low.c: New file with support for CRIS.
6892 * linux-crisv32-low.c: Ditto for CRISv32.
6893 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6894 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 6895 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
6896 reg-crisv32.o, and reg-crisv32.c to make rules.
6897 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6898 recognized targets.
6899
48d93c75
UW
69002005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6901
6902 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6903 of sizeof (PTRACE_XFER_TYPE).
6904 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6905
e013ee27
OF
69062005-05-12 Orjan Friberg <orjanf@axis.com>
6907
889bf7c5 6908 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
6909 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6910 pointers for hardware watchpoint support.
6911 * linux-low.h (struct linux_target_ops): Ditto.
6912 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6913 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6914 to linux_target_ops.
6915 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6916 reply packet.
6917 * server.c (main): Recognize 'Z' and 'z' packets.
6918
b0ded00b
UW
69192005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6920
6921 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6922 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6923 (the_low_target): Add new members.
6924
8643e2ad
DJ
69252005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6926
6927 * proc-service.c (ps_lgetregs): Search all_processes instead of
6928 all_threads.
6929
fc620387
DJ
69302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6931
6932 * server.c (start_inferior): Change return type to int.
6933 (attach_inferior): Change sigptr to int *.
6934 (handle_v_cont, handle_v_requests): Change signal to int *.
6935 (main): Change signal to int.
6936
69372005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
6938
6939 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6940 * configure.srv: Add m32r*-*-linux*.
6941 * linux-m32r-low.c: New file.
6942
e0e76420
DJ
69432005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6944
6945 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6946
a1928bad
DJ
69472005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6948
6949 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6950 Take unsigned long arguments for PIDs.
6951 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6952 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6953 (wait_for_sigstop, linux_resume_one_process)
6954 (regsets_fetch_inferior_registers, linux_send_signal)
6955 (linux_read_auxv): Likewise. Update the types of variables holding
6956 PIDs. Update format string specifiers.
6957 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6958 * remote-utils.c (prepare_resume_reply): Likewise.
6959 * server.c (cont_thread, general_thread, step_thread)
6960 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6961 unsigned long.
6962 (handle_query): Update format specifiers.
6963 (handle_v_cont, main): Use strtoul for thread IDs.
6964 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6965 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6966 (general_thread, step_thread, thread_from_wait)
6967 (old_thread_from_wait): Update.
6968 * target.h (struct thread_resume): Use unsigned long for THREAD.
6969 (struct target_ops): Use unsigned long for arguments to attach and
6970 thread_alive.
6971
dcdb98d2
DJ
69722005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6973
6974 * acinclude.m4: Include bfd/bfd.m4 directly.
6975 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6976 <agriffis@toolchain.org>.
6977 * aclocal.m4, configure: Regenerated.
6978
bec39cab
AC
69792005-01-07 Andrew Cagney <cagney@gnu.org>
6980
6981 * configure.ac: Rename configure.in, require autoconf 2.59.
6982 * configure: Re-generate.
6983
434c4c77
DJ
69842004-12-08 Daniel Jacobowitz <dan@debian.org>
6985
6986 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6987 LIBS when finished.
6988 * aclocal.m4: Regenerated.
6989 * configure: Regenerated.
6990
db1d3e1b
AS
69912004-11-21 Andreas Schwab <schwab@suse.de>
6992
6993 * linux-m68k-low.c (m68k_num_gregs): Define.
6994 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6995 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6996 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6997 (m68k_breakpoint_at): New. Add to the_low_target.
6998
6999 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7000 srv_linux_thread_db to yes.
7001
43360365
JB
70022004-10-20 Joel Brobecker <brobecker@gnat.com>
7003
7004 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7005 (ARCH_SET_FS): Likewise.
7006 (ARCH_GET_FS): Likewise.
7007 (ARCH_GET_GS): Likewise.
7008
fd500816
DJ
70092004-10-16 Daniel Jacobowitz <dan@debian.org>
7010
7011 * linux-i386-low.c (ps_get_thread_area): New.
7012 * linux-x86-64-low.c (ps_get_thread_area): New.
7013 * linux-low.c: Include <sys/syscall.h>.
7014 (linux_kill_one_process): Don't kill the first thread here.
7015 (linux_kill): Kill the first thread here.
7016 (kill_lwp): New function.
7017 (send_sigstop, linux_send_signal): Use it.
7018 * proc-service.c: Clean up #ifdefs.
7019 (fpregset_info): Delete.
7020 (ps_lgetregs): Update and enable implementation.
7021 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7022 implementations.
7023 * remote-utils.c (struct sym_cache, symbol_cache): New.
7024 (input_interrupt): Print a clearer message.
7025 (async_io_enabled): New variable.
7026 (enable_async_io, disable_async_io): Use it. Update comments.
7027 (look_up_one_symbol): Use the symbol cache.
7028 * thread-db.c (thread_db_look_up_symbols): New function.
7029 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7030
f6de3c42
DJ
70312004-10-16 Daniel Jacobowitz <dan@debian.org>
7032
7033 * configure.in: Test for -rdynamic.
7034 * configure: Regenerated.
7035 * Makefile (INTERNAL_LDFLAGS): New.
7036 (gdbserver, gdbreplay): Use it.
7037
2c0fc042
AC
70382004-09-02 Andrew Cagney <cagney@gnu.org>
7039
7040 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7041
075b3282
DJ
70422004-03-23 Daniel Jacobowitz <drow@mvista.com>
7043
7044 * linux-low.c (linux_wait): Clear all_processes list also.
7045
fa6a77dc
DJ
70462004-03-12 Daniel Jacobowitz <drow@mvista.com>
7047
7048 * linux-low.c: Include <errno.h>. Remove extern declaration of
7049 errno.
7050
6d782a97
DJ
70512004-03-12 Daniel Jacobowitz <drow@mvista.com>
7052
7053 * gdbreplay.c, server.h, utils.c: Update copyright years.
7054
3a7fb99b
DJ
70552004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7056
7057 * server.c (main): Print child status or termination signal from
7058 variable 'signal', not 'sig'.
7059
c3e735a6
DJ
70602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7061
7062 * linux-low.c (linux_read_memory): Change return type to
7063 int. Check for and return error from ptrace().
7064 * target.c (read_inferior_memory): Change return type to int. Pass
7065 back return status from the_target->read_memory().
7066 * target.h (struct target_ops): Adapt *read_memory() prototype.
7067 Update comment.
7068 (read_inferior_memory): Adapt prototype.
7069 * server.c (main): Return an error packet if
7070 read_inferior_memory() returns an error.
7071
a59d1c82
DJ
70722004-03-04 Daniel Jacobowitz <drow@mvista.com>
7073
7074 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7075 Unify with other clean targets.
7076
dc3f8883
DJ
70772004-02-29 Daniel Jacobowitz <drow@mvista.com>
7078
7079 * server.c (handle_v_cont): Call set_desired_inferior.
7080
89a208da
DJ
70812004-02-29 Daniel Jacobowitz <drow@mvista.com>
7082
7083 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7084
62ea82f5
DJ
70852004-02-29 Daniel Jacobowitz <drow@mvista.com>
7086
7087 * linux-low.c (linux_wait): Unblock async I/O.
7088 (linux_resume): Block and enable async I/O.
7089 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7090 * server.h (block_async_io, unblock_async_io): Add prototypes.
7091
6910d122
DJ
70922004-02-29 Daniel Jacobowitz <drow@mvista.com>
7093
7094 * remote-utils.c (remote_open): Print a status notice after
7095 opening a TCP port.
7096 * server.c (attach_inferior): Print a status notice after
7097 attaching.
7098
70992004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
7100
7101 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7102
c89dc5d4
DJ
71032004-02-26 Daniel Jacobowitz <drow@mvista.com>
7104
7105 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7106 error packet.
7107 * server.c, target.h: Update copyright years.
7108
4b8dad4a
RM
71092004-02-25 Roland McGrath <roland@redhat.com>
7110
7111 * target.h (struct target_ops): New member `read_auxv'.
7112 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7113 * linux-low.c (linux_read_auxv): New function.
7114 (linux_target_ops): Initialize `read_auxv' member to that.
7115
d7446758
JB
71162004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7117
7118 Committed by Jim Blandy <jimb@redhat.com>.
7119
7120 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 7121 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
7122 instead of GPR_SIZE to distiguish s390 and s390x targets.
7123
5544ad89
DJ
71242004-01-31 Daniel Jacobowitz <drow@mvista.com>
7125
7126 * linux-low.c: Update copyright year.
7127 (check_removed_breakpoint): Clear pending_is_breakpoint.
7128 (linux_set_resume_request, linux_queue_one_thread)
7129 (resume_status_pending_p): New functions.
7130 (linux_continue_one_thread): Use process->resume.
7131 (linux_resume): Only resume threads if there are no pending events.
7132 * linux-low.h (struct process_info): Add resume request
7133 pointer.
7134
2a68b70e
DJ
71352004-01-30 Daniel Jacobowitz <drow@mvista.com>
7136
7137 * regcache.c (new_register_cache): Clear the allocated register
7138 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7139
64386c31
DJ
71402003-10-13 Daniel Jacobowitz <drow@mvista.com>
7141
7142 * linux-low.c (linux_resume): Take a struct thread_resume *
7143 argument.
7144 (linux_wait): Update call.
7145 (resume_ptr): New static variable.
7146 (linux_continue_one_thread): Renamed from
7147 linux_continue_one_process. Use resume_ptr.
7148 (linux_resume): Use linux_continue_one_thread.
7149 * server.c (handle_v_cont, handle_v_requests): New functions.
7150 (myresume): New function.
7151 (main): Handle 'v' case.
7152 * target.h (struct thread_resume): New type.
7153 (struct target_ops): Change argument of "resume" to struct
7154 thread_resume *.
7155 (myresume): Delete macro.
7156
c938e9b0
L
71572003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7158
7159 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7160 (uninstall): Support DESTDIR.
7161
7f313d07
BC
7162Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7163
7164 * configure.srv: Add xscale*linux copy of arm*linux entry.
7165
3b2fc2ea
DJ
71662003-07-24 Daniel Jacobowitz <drow@mvista.com>
7167
7168 * linux-arm-low.c (arm_reinsert_addr): New function.
7169 (the_low_target): Add arm_reinsert_addr.
7170
1c0a559e
MK
71712003-07-08 Mark Kettenis <kettenis@gnu.org>
7172
7173 * mem-break.c: Remove whitespace at end of file.
7174
43d5792c
DJ
71752003-06-28 Daniel Jacobowitz <drow@mvista.com>
7176
7177 * configure.in: Check whether we need to prototype strerror.
7178 * server.h: Optionally prototype strerror.
7179 * gdbreplay.c (perror_with_name): Use strerror.
7180 * linux-low.c (linux_attach_lwp): Use strerror.
7181 * utils.c (perror_with_name): Use strerror.
7182 * config.in, configure: Regenerated.
7183
c8a86edf
DJ
71842003-06-28 Daniel Jacobowitz <drow@mvista.com>
7185
7186 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7187 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7188
73d37363
DJ
71892003-06-20 Daniel Jacobowitz <drow@mvista.com>
7190
7191 * Makefile.in (SFILES): Update.
7192 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7193 low-sun3.c: Remove files.
7194
6ad8ae5c
DJ
71952003-06-17 Daniel Jacobowitz <drow@mvista.com>
7196
7197 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7198 (linux_detach_one_process, linux_detach): New functions.
7199 (linux_target_ops): Add linux_detach.
7200 * server.c (main): Handle 'D' packet.
7201 * target.h (struct target_ops): Add "detach" member.
7202 (detach_inferior): Define.
7203
1581182a
MK
72042003-06-13 Mark Kettenis <kettenis@gnu.org>
7205
7206 From Kelley Cook <kelleycook@wideopenwest.com>:
7207 * configure.srv: Accept i[34567]86 variants.
7208
e5379b03
DJ
72092003-06-05 Daniel Jacobowitz <drow@mvista.com>
7210
7211 * linux-low.c (linux_wait_for_event): Correct comment typos.
7212 (linux_resume_one_process): Call check_removed_breakpoint.
7213 (linux_send_signal): New function.
7214 (linux_target_ops): Add linux_send_signal.
7215 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7216 of kill.
7217 * target.h (struct target_ops): Add send_signal.
7218
2ff29de4
JB
72192003-05-29 Jim Blandy <jimb@redhat.com>
7220
7221 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7222 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7223 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7224 away part of the register's value.
7225
254787d4
DJ
72262003-03-26 Daniel Jacobowitz <drow@mvista.com>
7227
7228 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7229 (linux_wait_for_event, linux_init_signals): Likewise.
7230
94e10508
DJ
72312003-03-17 Daniel Jacobowitz <drow@mvista.com>
7232
7233 * configure.in: Check for stdlib.h.
7234 * configure: Regenerated.
7235 * config.in: Regenerated.
7236
4c0711e0
DJ
72372003-01-04 Andreas Schwab <schwab@suse.de>
7238
7239 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7240
ef66e766
AC
72412003-01-02 Andrew Cagney <ac131313@redhat.com>
7242
7243 * Makefile.in: Remove obsolete code.
7244
a1358604
DJ
72452002-11-20 Daniel Jacobowitz <drow@mvista.com>
7246
7247 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7248 defined(PT_FPR0_HI).
7249
23ce3b1c
DJ
72502002-11-17 Stuart Hughes <seh@zee2.com>
7251
7252 * linux-arm-low.c (arm_num_regs): Increase.
7253 (arm_regmap): Include status register.
7254
72552002-11-17 Daniel Jacobowitz <drow@mvista.com>
7256
7257 * linux-low.c (register_addr): Remove incorrect -1 check.
7258
a9fa9f7d
DJ
72592002-08-29 Daniel Jacobowitz <drow@mvista.com>
7260
7261 * linux-low.c (linux_create_inferior): Call setpgid. Return
7262 the new PID.
7263 (unstopped_p, linux_signal_pid): Remove.
7264 (linux_target_ops): Remove linux_signal_pid.
7265 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7266 global instead of target method.
7267 * target.h (struct target_ops): Remove signal_pid. Update comment
7268 for create_inferior.
7269 * server.c (signal_pid): New variable.
7270 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 7271 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
7272 (attach_inferior): Set signal_pid.
7273
17574093
DJ
72742002-08-23 Daniel Jacobowitz <drow@mvista.com>
7275
7276 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7277
72782002-08-20 Jim Blandy <jimb@redhat.com>
7279
7280 * Makefile.in (LDFLAGS): Allow the configure script to establish a
7281 default for this.
7282
72832002-08-01 Andrew Cagney <cagney@redhat.com>
7284
7285 * Makefile.in: Make chill references obsolete.
7286
72872002-07-24 Kevin Buettner <kevinb@redhat.com>
7288
7289 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7290 * configure: Regenerate.
7291 * config.in: Regenerate.
7292
72932002-07-09 David O'Brien <obrien@FreeBSD.org>
7294
7295 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7296 (perror_with_name, remote_close, remote_open, expect, play): Static.
7297
72982002-07-04 Michal Ludvig <mludvig@suse.cz>
7299
4b8dad4a 7300 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
7301 byte offsets instead of an array of indexes.
7302 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7303
73042002-06-13 Daniel Jacobowitz <drow@mvista.com>
7305
7306 * regcache.c: Add comment.
7307
73082002-06-11 Daniel Jacobowitz <drow@mvista.com>
7309
7310 * thread-db.c: New file.
7311 * proc-service.c: New file.
7312 * acinclude.m4: New file.
7313 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7314 proc-service.o, and thread-db.o.
7315 (linux-low.o): Add USE_THREAD_DB.
7316 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7317 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7318 * aclocal.m4: Regenerated.
7319 * config.in: Regenerated.
7320 * configure: Regenerated.
7321 * configure.in: Check for proc_service.h, sys/procfs.h,
7322 thread_db.h, and linux/elf.h headrs.
7323 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7324 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
7325 Check for -lthread_db and thread support.
7326 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7327 PowerPC, and SuperH.
7328 * i387-fp.c: Constify arguments.
7329 * i387-fp.h: Likewise.
7330 * inferiors.c: (struct thread_info): Renamed from
7331 `struct inferior_info'. Remove PID member. Use generic inferior
7332 list header. All uses updated.
7333 (inferiors, signal_pid): Removed.
7334 (all_threads): New variable.
7335 (get_thread): Define.
7336 (add_inferior_to_list): New function.
7337 (for_each_inferior): New function.
7338 (change_inferior_id): New function.
7339 (add_inferior): Removed.
7340 (remove_inferior): New function.
7341 (add_thread): New function.
7342 (free_one_thread): New function.
7343 (remove_thread): New function.
7344 (clear_inferiors): Use for_each_inferior and free_one_thread.
7345 (find_inferior): New function.
7346 (find_inferior_id): New function.
7347 (inferior_target_data): Update argument type.
7348 (set_inferior_target_data): Likewise.
7349 (inferior_regcache_data): Likewise.
7350 (set_inferior_regcache_data): Likewise.
7351 * linux-low.c (linux_bp_reinsert): Remove.
7352 (all_processes, stopping_threads, using_thrads)
7353 (struct pending_signals, debug_threads, pid_of): New.
7354 (inferior_pid): Replace with macro.
7355 (struct inferior_linux_data): Remove.
7356 (get_stop_pc, add_process): New functions.
7357 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7358 Use add_process and add_thread.
7359 (linux_attach_lwp): New function, based on old linux_attach. Use
7360 add_process and add_thread. Set stop_expected for new threads.
7361 (linux_attach): New function.
7362 (linux_kill_one_process): New function.
7363 (linux_kill): Kill all LWPs.
7364 (linux_thread_alive): Use find_inferior_id.
7365 (check_removed_breakpoints, status_pending_p): New functions.
7366 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7367 Update. Use WNOHANG. Wait for cloned processes also. Update process
7368 struct for the found process.
7369 (linux_wait_for_event): New function.
7370 (linux_wait): Use it. Support LWPs.
7371 (send_sigstop, wait_for_sigstop, stop_all_processes)
7372 (linux_resume_one_process, linux_continue_one_process): New functions.
7373 (linux_resume): Support LWPs.
7374 (REGISTER_RAW_SIZE): Remove.
7375 (fetch_register): Use register_size instead. Call supply_register.
7376 (usr_store_inferior_registers): Likewise. Call collect_register.
7377 Fix recursive case.
7378 (regsets_fetch_inferior_registers): Improve error message.
7379 (regsets_store_inferior_registers): Add debugging.
7380 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7381 (unstopped_p, linux_signal_pid): New functions.
7382 (linux_target_ops): Add linux_signal_pid.
7383 (linux_init_signals): New function.
7384 (initialize_low): Call it. Initialize using_threads.
7385 * regcache.c (inferior_regcache_data): Add valid
7386 flag.
7387 (get_regcache): Fetch registers lazily. Add fetch argument
7388 and update all callers.
7389 (regcache_invalidate_one, regcache_invalidate): New
7390 functions.
7391 (new_register_cache): Renamed from create_register_cache.
7392 Return the new regcache.
7393 (free_register_cache): Change argument to a void *.
7394 (registers_to_string, registers_from_string): Call get_regcache
7395 with fetch flag set.
7396 (register_data): Make static. Pass fetch flag to get_regcache.
7397 (supply_register): Call get_regcache with fetch flag clear.
7398 (collect_register): Call get_regcache with fetch flag set.
7399 (collect_register_as_string): New function.
7400 * regcache.h: Update.
7401 * remote-utils.c (putpkt): Flush after debug output and use
7402 stderr.
7403 Handle input interrupts while waiting for an ACK.
7404 (input_interrupt): Use signal_pid method.
7405 (getpkt): Flush after debug output and use stderr.
7406 (outreg): Use collect_register_as_string.
7407 (new_thread_notify, dead_thread_notify): New functions.
7408 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7409 and general_thread.
7410 (look_up_one_symbol): Flush after debug output.
7411 * server.c (step_thread, server_waiting): New variables.
7412 (start_inferior): Don't use signal_pid. Update call to mywait.
7413 (attach_inferior): Update call to mywait.
7414 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7415 (main): Don't fetch/store registers explicitly. Use
7416 set_desired_inferior. Support proposed ``Hs'' packet. Update
7417 calls to mywait.
7418 * server.h: Update.
7419 (struct inferior_list, struct_inferior_list_entry): New.
7420 * target.c (set_desired_inferior): New.
7421 (write_inferior_memory): Constify.
7422 (mywait): New function.
7423 * target.h: Update.
7424 (struct target_ops): New signal_pid method.
7425 (mywait): Removed macro, added prototype.
7426
7427 * linux-low.h (regset_func): Removed.
7428 (regset_fill_func, regset_store_func): New.
7429 (enum regset_type): New.
7430 (struct regset_info): Add type field. Use new operation types.
7431 (struct linux_target_ops): stop_pc renamed to get_pc.
7432 Add decr_pc_after_break and breakpoint_at.
7433 (get_process, get_thread_proess, get_process_thread)
7434 (strut process_info, all_processes, linux_attach_lwp)
7435 (thread_db_init): New.
7436
7437 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7438 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7439 (the_low_target): Add new members.
7440 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7441 (i386_store_fpxregset): Constify.
7442 (target_regsets): Add new kind identifier.
7443 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7444 (i386_set_pc): Add debugging.
7445 (i386_breakpoint_at): New function.
7446 (the_low_target): Add new members.
7447 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7448 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7449 (mips_breakpoint_at): New.
7450 (the_low_target): Add new members.
7451 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7452 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7453 (the_low_target): Add new members.
7454 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7455 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7456 (the_low_target): Add new members.
7457 * linux-x86-64-low.c (target_regsets): Add new kind
7458 identifier.
7459
74602002-05-15 Daniel Jacobowitz <drow@mvista.com>
7461
7462 From Martin Pool <mbp@samba.org>:
7463 * server.c (gdbserver_usage): New function.
7464 (main): Call it.
7465
74662002-05-14 Daniel Jacobowitz <drow@mvista.com>
7467
7468 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7469 stop_at -> stop_pc.
7470
74712002-05-04 Andrew Cagney <ac131313@redhat.com>
7472
7473 * Makefile.in: Remove obsolete code.
7474
74752002-04-24 Michal Ludvig <mludvig@suse.cz>
7476
7477 * linux-low.c (regsets_fetch_inferior_registers),
7478 (regsets_store_inferior_registers): Removed cast to int from
7479 ptrace() calls.
7480 * regcache.h: Added declaration of struct inferior_info.
7481
74822002-04-20 Daniel Jacobowitz <drow@mvista.com>
7483
7484 * inferiors.c (struct inferior_info): Add regcache_data.
7485 (add_inferior): Call create_register_cache.
7486 (clear_inferiors): Call free_register_cache.
7487 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7488 * regcache.c (struct inferior_regcache_data): New.
7489 (registers): Remove.
7490 (get_regcache): New function.
7491 (create_register_cache, free_register_cache): New functions.
7492 (set_register_cache): Don't initialize the register cache here.
7493 (registers_to_string, registers_from_string, register_data): Call
7494 get_regcache.
7495 * regcache.h: Add prototypes.
7496 * server.h: Likewise.
7497
74982002-04-20 Daniel Jacobowitz <drow@mvista.com>
7499
7500 * mem-break.c: New file.
7501 * mem-break.h: New file.
7502 * Makefile.in: Add mem-break.o rule; update server.h
7503 dependencies.
7504 * inferiors.c (struct inferior_info): Add target_data
7505 member.
7506 (clear_inferiors): Free target_data member if set.
7507 (inferior_target_data, set_inferior_target_data): New functions.
7508 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7509 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7510 * linux-low.c (linux_bp_reinsert): New variable.
7511 (struct inferior_linux_data): New.
7512 (linux_create_inferior): Use set_inferior_target_data.
7513 (linux_attach): Likewise. Call add_inferior.
7514 (linux_wait_for_one_inferior): New function.
7515 (linux_wait): Call it.
7516 (linux_write_memory): Add const.
7517 (initialize_low): Call set_breakpoint_data.
7518 * linux-low.h (struct linux_target_ops): Add breakpoint
7519 handling members.
7520 * server.c (attach_inferior): Remove extra add_inferior
7521 call.
7522 * server.h: Include mem-break.h. Update inferior.c
7523 prototypes.
7524 * target.c (read_inferior_memory)
7525 (write_inferior_memory): New functions.
7526 * target.h (read_inferior_memory)
7527 (write_inferior_memory): Change macros to prototypes.
7528 (struct target_ops): Update comments. Add const to write_memory
7529 definition.
7530
75312002-04-11 Daniel Jacobowitz <drow@mvista.com>
7532
7533 * linux-low.c (usr_store_inferior_registers): Support
7534 registers which are allowed to fail to store.
7535 * linux-low.h (linux_target_ops): Likewise.
7536 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7537 (ppc_cannot_store_register): FPSCR may not be storable.
7538
75392002-04-09 Daniel Jacobowitz <drow@mvista.com>
7540
7541 * server.h: Include <string.h> if HAVE_STRING_H.
7542 * ChangeLog: Correct paths in last ChangeLog entry.
7543
75442002-04-09 Daniel Jacobowitz <drow@mvista.com>
7545
7546 * linux-low.h: Remove obsolete prototypes.
7547 (struct linux_target_ops): New.
7548 (extern the_low_target): New.
7549 * linux-low.c (num_regs, regmap): Remove declarations.
7550 (register_addr): Use the_low_target explicitly.
7551 (fetch_register): Likewise.
7552 (usr_fetch_inferior_registers): Likewise.
7553 (usr_store_inferior_registers): Likewise.
7554 * linux-arm-low.c (num_regs): Remove.
7555 (arm_num_regs): Define.
7556 (arm_regmap): Renamed from regmap, made static.
7557 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7558 made static.
7559 (arm_cannot_store_register): Renamed from cannot_store_register,
7560 made static.
7561 (the_low_target): New.
7562 * linux-i386-low.c (num_regs): Remove.
7563 (i386_num_regs): Define.
7564 (i386_regmap): Renamed from regmap, made static.
7565 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7566 made static.
7567 (i386_cannot_store_register): Renamed from cannot_store_register,
7568 made static.
7569 (the_low_target): New.
7570 * linux-ia64-low.c (num_regs): Remove.
7571 (ia64_num_regs): Define.
7572 (ia64_regmap): Renamed from regmap, made static.
7573 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7574 made static.
7575 (ia64_cannot_store_register): Renamed from cannot_store_register,
7576 made static.
7577 (the_low_target): New.
7578 * linux-m68k-low.c (num_regs): Remove.
7579 (m68k_num_regs): Define.
7580 (m68k_regmap): Renamed from regmap, made static.
7581 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7582 made static.
7583 (m68k_cannot_store_register): Renamed from cannot_store_register,
7584 made static.
7585 (the_low_target): New.
7586 * linux-mips-low.c (num_regs): Remove.
7587 (mips_num_regs): Define.
7588 (mips_regmap): Renamed from regmap, made static.
7589 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7590 made static.
7591 (mips_cannot_store_register): Renamed from cannot_store_register,
7592 made static.
7593 (the_low_target): New.
7594 * linux-ppc-low.c (num_regs): Remove.
7595 (ppc_num_regs): Define.
7596 (ppc_regmap): Renamed from regmap, made static.
7597 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7598 made static.
7599 (ppc_cannot_store_register): Renamed from cannot_store_register,
7600 made static.
7601 (the_low_target): New.
7602 * linux-s390-low.c (num_regs): Remove.
7603 (s390_num_regs): Define.
7604 (s390_regmap): Renamed from regmap, made static.
7605 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7606 made static.
7607 (s390_cannot_store_register): Renamed from cannot_store_register,
7608 made static.
7609 (the_low_target): New.
7610 * linux-sh-low.c (num_regs): Remove.
7611 (sh_num_regs): Define.
7612 (sh_regmap): Renamed from regmap, made static.
7613 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7614 made static.
7615 (sh_cannot_store_register): Renamed from cannot_store_register,
7616 made static.
7617 (the_low_target): New.
7618 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7619 (the_low_target): New.
7620
76212002-04-09 Daniel Jacobowitz <drow@mvista.com>
7622
7623 * Makefile.in: Add stamp-h target.
7624 * configure.in: Create stamp-h.
7625 * configure: Regenerated.
7626
76272002-04-09 Daniel Jacobowitz <drow@mvista.com>
7628
7629 * inferiors.c: New file.
7630 * target.c: New file.
7631 * target.h: New file.
7632 * Makefile.in: Add target.o and inferiors.o. Update
7633 dependencies.
7634 * linux-low.c (inferior_pid): New static variable,
7635 moved from server.c.
7636 (linux_create_inferior): Renamed from create_inferior.
7637 Call add_inferior. Return 0 on success instead of a PID.
7638 (linux_attach): Renamed from myattach.
7639 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7640 (linux_thread_alive): Renamed from mythread_alive.
7641 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7642 child dies.
7643 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7644 (regsets_store_inferior_registers): Correct error message.
7645 Add missing ``return 0''.
7646 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7647 (linux_store_registers): Renamed from store_inferior_registers.
7648 (linux_read_memory): Renamed from read_inferior_memory.
7649 (linux_write_memory): Renamed from write_inferior_memory.
7650 (linux_target_ops): New structure.
7651 (initialize_low): Call set_target_ops ().
7652 * remote-utils.c (unhexify): New function.
7653 (hexify): New function.
7654 (input_interrupt): Send signals to ``signal_pid''.
7655 * server.c (inferior_pid): Remove.
7656 (start_inferior): Update create_inferior call.
7657 (attach_inferior): Call add_inferior.
7658 (handle_query): New function.
7659 (main): Call handle_query for `q' packets.
7660 * server.h: Include "target.h". Remove obsolete prototypes.
7661 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7662
76632002-04-09 Daniel Jacobowitz <drow@mvista.com>
7664
7665 * Makefile.in: Add WARN_CFLAGS. Update configury
7666 dependencies.
7667 * configure.in: Check for <string.h>
7668 * configure: Regenerate.
7669 * config.in: Regenerate.
7670 * gdbreplay.c: Include needed system headers.
7671 (remote_open): Remove strchr prototype.
7672 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7673 * regcache.c (supply_register): Change buf argument to const void *.
7674 (supply_register_by_name): Likewise.
7675 (collect_register): Change buf argument to void *.
7676 (collect_register_by_name): Likewise.
7677 * regcache.h: Add missing prototypes.
7678 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7679 * server.c (handle_query): New function.
7680 (attached): New static variable, moved out of main.
7681 (main): Quiet longjmp clobber warnings.
7682 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7683 * utils.c (error): Remove NORETURN.
7684 (fatal): Likewise.