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