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