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