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