1 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5 * server.h (non_stop): Declare.
6 (gdb_client_data, handler_func): Declare.
7 (delete_file_handler, add_file_handler, start_event_loop):
9 (handle_serial_event, handle_target_event, push_event)
10 (putpkt_notif): Declare.
11 * target.h (enum resume_kind): New.
12 (struct thread_resume): Replace `step' field by `kind' field.
13 (TARGET_WNOHANG): Define.
14 (struct target_ops) <wait>: Add `options' argument.
15 <supports_non_stop, async, start_non_stop>: New fields.
16 (target_supports_non_stop, target_async): New.
17 (start_non_stop): Declare.
18 (mywait): Add `options' argument.
19 * target.c (mywait): Add `options' argument. Print child exit
21 (start_non_stop): New.
22 * server.c (non_stop, own_buf, mem_buf): New globals.
23 (struct vstop_notif): New.
24 (notif_queue): New global.
25 (queue_stop_reply, push_event, discard_queued_stop_replies)
26 (send_next_stop_reply): New.
27 (start_inferior): Adjust to use resume_kind. Adjust to mywait
29 (attach_inferior): In non-stop mode, don't wait for the target
31 (handle_general_set): Handle QNonStop.
32 (handle_query): When handling qC, return the current general
33 thread, instead of the first thread of the list.
34 (handle_query): If the backend supports non-stop mode, include
35 QNonStop+ in the qSupported query response.
36 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
38 (handle_v_attach, handle_v_run): Handle non-stop mode.
39 (handle_v_stopped): New.
40 (handle_v_requests): Report support for vCont;t. Handle vStopped.
41 (myresume): Adjust to use resume_kind. Handle non-stop.
42 (queue_stop_reply_callback): New.
43 (handle_status): Handle non-stop mode.
44 (main): Clear non_stop flag on reconnection. Use the event-loop.
45 Refactor serial protocol handling from here ...
46 (process_serial_event): ... to this new function. When GDB
47 selects any thread, select one here. In non-stop mode, wait until
48 GDB acks all pending events before exiting.
49 (handle_serial_event, handle_target_event): New.
50 * remote-utils.c (remote_open): Install remote_desc in the event
52 (remote_close): Remove remote_desc from the event loop.
53 (putpkt_binary): Rename to...
54 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
55 (putpkt_binary): New as wrapper around putpkt_binary_1.
57 (prepare_resume_reply): In non-stop mode, don't change the
60 * Makefile.in (OBJ): Add event-loop.o.
61 (event-loop.o): New rule.
63 * linux-low.h (pid_of): Moved here.
65 (get_lwp_thread): Use lwpid_of.
66 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
67 * linux-low.c (pid_of): Delete.
68 (inferior_pid): Use lwpid_of.
69 (linux_event_pipe): New.
70 (target_is_async_p): New.
72 (handle_extended_wait): Use lwpid_of.
73 (add_lwp): Don't set lwpid field.
74 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
75 (linux_kill_one_lwp): If killing a running lwp, stop it first.
76 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
77 (linux_detach_one_lwp): If detaching from a running lwp, stop it
78 first. Adjust to linux_wait_for_event interface changes. Use
80 (linux_detach): Don't delete the main lwp here.
81 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
82 (status_pending_p): Don't consider explicitly suspended lwps.
83 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
84 pointer. Add OPTIONS argument. Change return type to int. Use
85 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
86 (linux_wait_for_event): Take an integer pid instead of a lwp_info
87 pointer. Add status pointer argument. Return a pid instead of a
88 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
89 changes. In non-stop mode, don't switch to a random thread.
90 (linux_wait): Rename to...
91 (linux_wait_1): ... this. Add target_options argument, and handle
92 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
93 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
94 clean exit and signal exit code. Don't stop all threads in
95 non-stop mode. In all-stop mode, only stop all threads when
96 reporting a stop to GDB. Handle explicit thread stop requests.
97 (async_file_flush, async_file_mark): New.
99 (send_sigstop): Use lwpid_of.
100 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
101 interface changes. In non-stop mode, don't switch to a random
103 (linux_resume_one_lwp): Use lwpid_of.
104 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
105 (linux_resume_one_thread): ... this. Handle resume_stop. In
106 non-stop mode, don't look for pending flag in all threads.
107 (resume_status_pending_p): Don't consider explicitly suspended
109 (my_waitpid): Reimplement. Emulate __WALL.
110 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
112 (sigchld_handler, linux_supports_non_stop, linux_async)
113 (linux_start_non_stop): New.
114 (linux_target_ops): Register linux_supports_non_stop, linux_async
115 and linux_start_non_stop.
116 (initialize_low): Install SIGCHLD handler.
117 * thread-db.c (thread_db_create_event, find_one_thread)
118 (thread_db_get_tls_address): Use lwpid_of.
119 * win32-low.c (win32_detach): Adjust to use resume_kind.
120 (win32_wait): Add `options' argument.
121 * spu-low.c (spu_resume): Adjust to use resume_kind.
122 (spu_wait): Add `options' argument.
124 2009-04-01 Pedro Alves <pedro@codesourcery.com>
126 Decouple target code from remote protocol.
128 * target.h (enum target_waitkind): New.
129 (struct target_waitstatus): New.
130 (struct target_ops) <wait>: Return an unsigned long. Take a
131 target_waitstatus pointer instead of a char pointer.
133 * target.c (mywait): Change prototype to return an unsigned long.
134 Take a target_waitstatus pointer instead of a char pointer. Adjust.
135 * server.h (thread_from_wait, old_thread_from_wait): Delete
137 (prepare_resume_reply): Change prototype to take a
139 * server.c (thread_from_wait, old_thread_from_wait): Delete.
140 (last_status, last_ptid): New.
141 (start_inferior): Remove "statusptr" argument. Adjust. Return a
142 pid instead of a signal.
143 (attach_inferior): Remove "status" and "signal" parameters.
145 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
147 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
148 (handle_v_requests, myresume): Remove "status" and "signal"
150 (handle_status): New.
151 (main): Delete local `status'. Adjust.
152 * remote-utils.c: Include target.h.
153 (prepare_resume_reply): Change prototype to take a
154 target_waitstatus. Adjust.
156 * linux-low.c (linux_wait): Adjust to new target_ops->wait
158 * spu-low.c (spu_wait): Adjust.
159 * win32-low.c (enum target_waitkind, struct target_waitstatus):
161 (win32_wait): Adjust.
163 2009-04-01 Pedro Alves <pedro@codesourcery.com>
165 * target.h (struct thread_resume): Delete leave_stopped member.
166 (struct target_ops): Add a `n' argument to the `resume' callback.
167 * server.c (start_inferior): Adjust.
168 (handle_v_cont, myresume): Adjust.
169 * linux-low.c (check_removed_breakpoint): Adjust to resume
170 interface change, and to removed leave_stopped field.
171 (resume_ptr): Delete.
172 (struct thread_resume_array): New.
173 (linux_set_resume_request): Add new `arg' parameter. Adjust to
174 resume interface change.
175 (linux_continue_one_thread, linux_queue_one_thread)
176 (resume_status_pending_p): Check if the resume field is NULL
177 instead of checking the leave_stopped member.
178 (linux_resume): Adjust to the target resume interface change.
179 * spu-low.c (spu_resume): Adjust to the target resume interface
181 * win32-low.c (win32_detach, win32_resume): Ditto.
183 2009-04-01 Pedro Alves <pedro@codesourcery.com>
185 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
187 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
189 (linux_continue_one_thread): Only preserve the stepping flag if
190 there's a pending breakpoint.
192 2009-03-31 Pedro Alves <pedro@codesourcery.com>
194 * server.c (main): After the inferior having exited, call
195 remote_close before exiting gdbserver.
197 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
199 Fix size of FPSCR in Power 7 processors.
200 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
201 (PPC_FEATURE_HAS_DFP): New #define.
202 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
205 2009-03-23 Pedro Alves <pedro@codesourcery.com>
207 * server.c (handle_query) Whitespace and formatting.
209 2009-03-22 Pedro Alves <pedro@codesourcery.com>
211 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
212 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
213 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
214 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
215 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
216 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
217 Makefile.in, configure.ac: Fix whitespace throughout.
218 * configure: Regenerate.
220 2009-03-22 Pedro Alves <pedro@codesourcery.com>
222 * inferiors.c (find_inferior): Make it safe for the callback
223 function to delete the currently iterated inferior.
225 2009-03-22 Pedro Alves <pedro@codesourcery.com>
227 * Makefile.in (linuw_low_h): Move higher.
228 (thread-db.o): Depend on $(linux_low_h).
230 2009-03-17 Pedro Alves <pedro@codesourcery.com>
232 Rename "process" to "lwp" throughout.
234 * linux-low.c (all_processes): Rename to...
235 (all_lwps): ... this.
236 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
237 (add_process): Rename to ...
238 (add_lwp): ... this. Adjust.
239 (linux_create_inferior): Adjust.
240 (linux_attach_lwp): Adjust.
241 (linux_attach): Adjust.
242 (linux_kill_one_process): Rename to ...
243 (linux_kill_one_lwp): ... this. Adjust.
244 (linux_kill): Adjust.
245 (linux_detach_one_process): Rename to ...
246 (linux_detach_one_lwp): ... this. Adjust.
247 (linux_detach): Adjust.
248 (check_removed_breakpoint): Adjust.
249 (status_pending_p): Adjust.
250 (linux_wait_for_process): Rename to ...
251 (linux_wait_for_lwp): ... this. Adjust.
252 (linux_wait_for_event): Adjust.
253 (send_sigstop): Adjust.
254 (wait_for_sigstop): Adjust.
255 (stop_all_processes): Rename to ...
256 (stop_all_lwps): ... this.
257 (linux_resume_one_process): Rename to ...
258 (linux_resume_one_lwp): ... this. Adjust.
259 (linux_set_resume_request, linux_continue_one_thread)
260 (linux_queue_one_thread, resume_status_pending_p)
261 (usr_store_inferior_registers, regsets_store_inferior_registers)
262 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
264 * linux-low.h (get_process): Rename to ...
265 (get_lwp): ... this. Adjust.
266 (get_thread_process): Rename to ...
267 (get_thread_lwp): ... this. Adjust.
268 (get_process_thread): Rename to ...
269 (get_lwp_thread): ... this. Adjust.
270 (struct process_info): Rename to ...
271 (struct lwp_info): ... this.
272 (all_processes): Rename to ...
273 (all_lwps): ... this.
274 * proc-service.c (ps_lgetregs): Adjust.
275 * thread-db.c (thread_db_create_event, find_one_thread)
276 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
278 2009-03-14 Pedro Alves <pedro@codesourcery.com>
280 * server.c (handle_query): Handle "qAttached".
282 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
284 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
285 GPLv3, update license URL.
287 2009-03-01 Doug Evans <dje@google.com>
289 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
290 (server_h): Add gdb_signals.h.
292 * server.h (target_signal_from_host,target_signal_to_host_p)
293 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
295 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
297 * remote-utils.c (getpkt): Also generate remote-debug
298 information if noack_mode is set.
300 2009-02-06 Pedro Alves <pedro@codesourcery.com>
302 * server.c (handle_query): Report qXfer:siginfo:read and
303 qXfer:siginfo:write as supported and handle them.
304 * target.h (struct target_ops) <qxfer_siginfo>: New field.
305 * linux-low.c (linux_xfer_siginfo): New.
306 (linux_target_ops): Set it.
308 2009-01-26 Pedro Alves <pedro@codesourcery.com>
310 * server.c (gdbserver_usage): Mention --remote-debug.
311 (main): Accept '--remote-debug' switch.
313 2009-01-18 Doug Evans <dje@google.com>
315 * regcache.c (new_register_cache): No need to check result of xcalloc.
316 * server.c (handle_search_memory): Back out calls to xmalloc,
317 result is checked and error is returned to user upon failure.
318 (handle_query): Ditto. Add more checks for result of malloc.
319 (handle_v_cont): Check result of malloc, report error back to
321 (handle_v_run): Ditto. Call freeargv.
322 * server.h (freeargv): Declare.
323 * utils.c (freeargv): New fn.
325 2009-01-15 Doug Evans <dje@google.com>
327 * gdbreplay.c (perror_with_name): Make arg const char *.
328 * server.h (target_signal_to_name): Make return type const char *.
329 * thread-db.c (thread_db_err_str): Make return type const char *.
330 * utils.c (perror_with_name): Make arg const char *.
332 2009-01-14 Pedro Alves <pedro@codesourcery.com>
334 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
335 when handling a EXIT_PROCESS_DEBUG_EVENT.
337 2009-01-06 Joel Brobecker <brobecker@adacore.com>
339 * gdbreplay.c (gdbreplay_version): Update copyright year.
340 * server.c (gdbserver_version): Likewise.
342 2009-01-05 Doug Evans <dje@google.com>
344 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
345 (handle_extended_wait): Improve comment.
347 2008-12-13 Doug Evans <dje@google.com>
349 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
350 * server.h (ATTR_MALLOC): New macro.
351 (xmalloc,xcalloc,xstrdup): Declare.
352 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
353 * inferiors.c: Ditto.
354 * linux-low.c: Ditto.
355 * mem-break.c: Ditto.
357 * remote-utils.c: Ditto.
360 * win32-low.c: Ditto.
362 2008-12-12 Doug Evans <dje@google.com>
364 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
367 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
369 2008-12-09 Doug Evans <dje@google.com>
371 * linux-low.h (struct process_info): Delete member tid, unused.
372 * thread-db.c (find_one_thread): Update.
373 (maybe_attach_thread): Update.
375 2008-12-02 Pedro Alves <pedro@codesourcery.com>
377 * target.h (struct target_ops): Add qxfer_osdata member.
378 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
380 (linux_qxfer_osdata): New functions.
381 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
383 * server.c (handle_query): Handle "qXfer:osdata:read:".
384 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
385 (buffer_xml_printf): New functions.
386 * server.h (struct buffer): New.
387 (buffer_grow_str, buffer_grow_str0): New macros.
388 (buffer_grow, buffer_free, buffer_init, buffer_finish)
389 (buffer_xml_printf): Declare.
391 2008-11-24 Doug Evans <dje@google.com>
393 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
395 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
397 * server.c (handle_v_run): Always use the supplied argument list.
399 2008-11-19 Bob Wilson <bob.wilson@acm.org>
401 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
402 (xtensa_regmap_table): Add entry for scompare1.
404 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
406 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
407 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
408 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
409 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
410 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
411 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
412 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
413 XML target descriptions.
414 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
415 when inferior is running on an ISA 2.05 or later processor. Add
416 special case to return offset for full 64-bit slot of FPSCR when
419 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
421 * Makefile.in (SFILES, clean): Added sparc64 files.
422 (reg-sparc64.o, reg-sparc64.c): New.
423 * configure.srv (sparc*-*-linux*): New configuration.
424 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
425 syscall arguments for SPARC.
426 (regsets_store_inferior_registers): Likewise.
427 * linux-sparc-low.c: New file.
429 2008-10-21 Doug Evans <dje@google.com>
431 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
432 (READLINE_DIR,READLINE_DEP): Delete.
433 (INTERNAL_CFLAGS): Update.
436 2008-10-10 Pedro Alves <pedro@codesourcery.com>
438 * server.c (handle_v_run): If GDB didn't specify an argv, use the
439 whole argv from the last run, not just argv[0].
441 2008-09-08 Pedro Alves <pedro@codesourcery.com>
443 * regcache.c (new_register_cache): Return NULL if the register
444 cache size isn't known yet.
445 (free_register_cache): Avoid dereferencing a NULL regcache.
447 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
449 * configure.srv: Merge MIPS and MIPS64.
451 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
453 * Makefile.in (uninstall): Apply $(EXEEXT) too.
455 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
457 * Makefile.in: Add required vsx dependencies.
459 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
460 Declare init_registers_powerpc_vsx32l.
461 Declare init_registers_powerpc_vsx64l.
462 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
463 (ppc_arch_setup): Check for VSX in hwcap.
464 (ppc_fill_vsxregset): New function.
465 (ppc_store_vsxregset): New function.
466 Add new VSX entry in regset_info target_regsets.
468 * configure.srv: Add new VSX dependencies.
470 2008-08-12 Pedro Alves <pedro@codesourcery.com>
472 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
473 (remote_open): Set or clear transport_is_reliable.
474 (putpkt_binary): Don't expect acks in noack mode.
475 (getpkt): Don't send ack/nac in noack mode.
476 * server.c (handle_general_set): Handle QStartNoAckMode.
477 (handle_query): If connected by tcp pass QStartNoAckMode+ in
479 (main): Reset noack_mode on every connection.
480 * server.h (noack_mode): Declare.
482 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
484 * Makefile.in (GDBREPLAY_OBS): New variable.
485 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
487 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
488 Daniel Jacobowitz <dan@codesourcery.com>
490 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
491 (usr_store_inferior_registers): Likewise.
492 (regsets_store_inferior_registers): Likewise.
494 2008-07-31 Rolf Jansen <rj@surtec.com>
495 Pedro Alves <pedro@codesourcery.com>
497 * configure.ac: Check for memmem declaration.
498 * server.c [HAVE_MALLOC_H]: Include malloc.h.
499 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
500 (disable_packet_qfThreadInfo): Unconditionally compile.
501 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
502 * configure, config.in: Regenerate.
504 2008-07-28 Doug Kwan <dougkwan@google.com>
506 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
507 (linux_write_memory): Remove declaration of errno.
509 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
511 * linux-low.c (handle_extended_wait): Do not use "status"
512 variable uninitialized.
514 2008-07-07 Pedro Alves <pedro@codesourcery.com>
516 * server.c (handle_v_attach): Inhibit reporting dll changes.
518 2008-06-27 Pedro Alves <pedro@codesourcery.com>
520 * remote-utils.c (prepare_resume_reply): If requested, don't
521 output "thread:TID" in the T stop reply.
523 * server.c (disable_packet_vCont, disable_packet_Tthread)
524 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
525 (handle_query): If requested, disable support for qC, qfThreadInfo
527 (handle_v_requests): If requested, disable support for vCont.
528 (gdbserver_show_disableable): New.
529 (main): Handle --disable-packet and --disable-packet=LIST.
531 * server.h (disable_packet_vCont, disable_packet_Tthread)
532 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
534 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
536 * server.c (gdbserver_usage): Mention --version.
538 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
540 * Makefile.in (gdbreplay.o): New rule.
542 2008-06-06 Joseph Myers <joseph@codesourcery.com>
544 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
545 message, not gdbserver.
547 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
548 Nathan Sidwell <nathan@codesourcery.com>
549 Joseph Myers <joseph@codesourcery.com>
551 * acinclude.m4: Include ../../config/acx.m4.
552 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
553 * configure, config.in: Regenerate.
554 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
555 * server.c (gdbserver_version): Print PKGVERSION.
556 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
557 (main): Adjust gdbserver_usage calls.
558 * gdbreplay.c (version, host_name): Add declarations.
559 (gdbreplay_version, gdbreplay_usage): New.
560 (main): Accept --version and --help options.
562 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
564 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
565 (arm_breakpoint_at): Handle Thumb.
566 (the_low_target): Add comment.
568 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
570 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
572 2008-05-09 Doug Evans <dje@google.com>
574 * server.h (decode_search_memory_packet): Declare.
575 * remote-utils.c (decode_search_memory_packet): New fn.
576 * server.c (handle_search_memory_1): New fn.
577 (handle_search_memory): New fn.
578 (handle_query): Process qSearch:memory packets.
580 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
582 * regcache.c (registers_length): Remove.
583 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
584 full register packet.
585 * regcache.h (registers_length): Remove prototype.
586 * server.h (PBUFSIZ): Define to 16384.
588 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
590 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
591 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
592 powerpc-64l.o, and powerpc-altivec64l.o.
593 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
594 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
595 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
596 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
597 rs6000/power-linux.xml, and rs6000/power64-linux.xml
600 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
601 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
602 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
603 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
604 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
605 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
606 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
607 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
608 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
609 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
612 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
613 (init_registers_powerpc_32l): ... this new prototype.
614 (init_registers_powerpc_32): Remove, replace by ...
615 (init_registers_powerpc_altivec32l): ... this new prototype.
616 (init_registers_powerpc_e500): Remove, replace by ...
617 (init_registers_powerpc_e500l): ... this new prototype.
618 (init_registers_ppc64): Remove, replace by ...
619 (init_registers_powerpc_64l): ... this new prototype.
620 (init_registers_powerpc_64): Remove, replace by ...
621 (init_registers_powerpc_altivec64l): ... this new prototype.
622 (ppc_num_regs): Set to 73.
623 (PT_ORIG_R3, PT_TRAP): Define if necessary.
624 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
625 (ppc_cannot_store_register): Handle orig_r3 and trap.
626 (ppc_arch_setup): Update init_registers_... calls.
627 (ppc_fill_gregset): Handle orig_r3 and trap.
629 * inferiors.c (clear_inferiors): Reset current_inferior.
631 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
633 * acinclude.m4: Add override.m4.
634 * configure: Regenerate.
636 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
638 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
639 initial call to init_register_ppc64.
641 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
643 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
644 powerpc*-*-linux* case.
645 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
647 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
649 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
650 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
652 * linux-ppc-low.c: Include <elf.h>.
653 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
654 (ppc_hwcap): New global variable.
655 (ppc_regmap): Remove __SPE__ #ifdef sections.
656 (ppc_regmap_e500): New global variable.
657 (ppc_cannot_store_register): Update __SPE__ special case.
658 (ppc_get_hwcap): New function.
659 (ppc_arch_setup): Use it to determine whether inferior supports
660 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
661 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
662 Do not access registers if target does not support AltiVec.
663 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
664 Do not access registers if target does not support SPE.
665 (target_regsets): Unconditionally include AltiVec and SPE regsets.
667 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
669 * linux-low.c (disabled_regsets, num_regsets): New.
670 (use_regsets_p): Delete.
671 (linux_wait_for_process): Clear disabled_regsets.
672 (regsets_fetch_inferior_registers): Check and set it.
673 (regsets_store_inferior_registers): Likewise.
674 (linux_fetch_registers, linux_store_registers): Do not use
676 (initialize_low): Allocate disabled_regsets.
678 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
680 * Makefile.in (LIBOBJS): New.
682 (memmem.o): New rule.
683 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
684 * configure: Regenerated.
686 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
688 * server.c (handle_query): Never return "unsupported" for
689 qXfer:features:read queries.
691 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
693 * server.c (get_features_xml): Fix inverted condition.
694 (handle_query): Always support qXfer:feature:read.
696 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
698 * server.c (wrapper_argv): New.
699 (start_inferior): Handle wrapper_argv. If set, expect an extra
701 (gdbserver_usage): Document --wrapper.
702 (main): Parse --wrapper.
704 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
706 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
707 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
708 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
709 (ppc_set_pc): Likewise.
710 (ppc_arch_setup): New function.
711 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
713 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
715 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
717 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
718 instead of linux-ppc64-low.o.
719 * linux-ppc64-low.c: Remove file.
720 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
721 (linux-ppc64-low.o): Remove rule.
723 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
724 (init_registers_powerpc_64): Likewise.
725 (ppc_regmap): Conditionally define depending on __powerpc64__.
726 (ppc_cannot_store_register): Do not special-case "fpscr" when
727 compiled on __powerpc64__.
728 (ppc_collect_ptrace_register): New function.
729 (ppc_supply_ptrace_register): New function.
730 (ppc_breakpoint): Change type to "unsigned int".
731 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
732 (the_low_target): Conditionally provide initializers for the
733 arch_setup member depending on __powerpc64__. Install
734 collect_ptrace_register and supply_ptrace_register members.
736 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
738 * regcache.h (gdbserver_xmltarget): Add extern declaration.
739 * server.c (gdbserver_xmltarget): Define.
740 (get_features_xml): Use it to replace "target.xml" and arch_string.
742 * configure.srv: Remove srv_xmltarget. Add XML files that were
743 mentioned there to srv_xmlfiles instead. Remove conditional tests
744 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
745 srv_xmlfiles and srv_regobj to include all possible choices.
746 * configure.ac (srv_xmltarget): Remove.
747 (srv_xmlfiles): Do not add "target.xml".
748 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
749 checks for supplementary target information.
750 * configure: Regenerate.
751 * Makefile.in (XML_TARGET): Remove.
752 (target.xml): Remove rule.
753 (clean): Do not clean up target.xml.
754 (.PRECIOUS): Do not mention target.xml.
756 * target.h (struct target_ops): Remove arch_string member.
757 * linux-low.c (linux_arch_string): Remove.
758 (linux_target_ops): Remove arch_string initializer.
759 * linux-low.h (struct linux_target_ops): Remove arch_string member.
760 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
761 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
762 * spu-low.c (spu_arch_string): Remove.
763 (spu_target_ops): Remove arch_string initializer.
764 * win32-low.c (win32_arch_string): Remove.
765 (win32_target_ops): Remove arch_string initializer.
766 * win32-low.h (struct win32_target_ops): Remove arch_string member.
767 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
768 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
770 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
772 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
773 by collect_ptrace_register and supply_ptrace_register hooks.
774 * linux-low.c (fetch_register): Use supply_ptrace_register callback
775 instead of checking for the_low_target.left_pad_xfer.
776 (usr_store_inferior_registers): Use collect_ptrace_register callback
777 instead of checking for the_low_target.left_pad_xfer.
779 * linux-s390-low.c (s390_collect_ptrace_register): New function.
780 (s390_supply_ptrace_register): Likewise.
781 (s390_fill_gregset): Call s390_collect_ptrace_register.
782 (the_low_target): Update.
784 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
785 (ppc_supply_ptrace_register): Likewise.
786 (the_low_target): Update.
788 * linux-i386-low.c (the_low_target): Update.
789 * linux-x86-64-low.c (the_low_target): Update.
791 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
793 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
794 reg-s390.o and reg-s390x.o.
796 * linux-low.c (new_inferior): New global variable.
797 (linux_create_inferior, linux_attach): Set it.
798 (linux_wait_for_process): Call the_low_target.arch_setup after the
799 target has stopped for the first time.
800 (initialize_low): Do not call the_low_target.arch_setup.
802 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
803 (s390_set_pc): Likewise.
804 (s390_arch_setup): New function.
805 (the_low_target): Use s390_arch_setup as arch_setup routine.
807 * regcache.c (realloc_register_cache): New function.
808 (set_register_cache): Call it for each existing regcache.
810 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
812 * server.h (init_registers): Remove prototype.
814 * linux-low.h (struct linux_target_ops): Add arch_setup field.
815 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
816 instead of init_registers ().
817 * linux-arm-low.c (init_registers_arm): Add prototype.
818 (init_registers_arm_with_iwmmxt): Likewise.
819 (the_low_target): Add initializer for arch_setup field.
820 * linux-cris-low.c (init_registers_cris): Add prototype.
821 (the_low_target): Add initializer for arch_setup field.
822 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
823 (the_low_target): Add initializer for arch_setup field.
824 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
825 (the_low_target): Add initializer for arch_setup field.
826 * linux-ia64-low.c (init_registers_ia64): Add prototype.
827 (the_low_target): Add initializer for arch_setup field.
828 * linux-m32r-low.c (init_registers_m32r): Add prototype.
829 (the_low_target): Add initializer for arch_setup field.
830 * linux-m68k-low.c (init_registers_m68k): Add prototype.
831 (the_low_target): Add initializer for arch_setup field.
832 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
833 (init_registers_mips64_linux): Likewise.
834 (the_low_target): Add initializer for arch_setup field.
835 * linux-ppc-low.c (init_registers_ppc): Add prototype.
836 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
837 (the_low_target): Add initializer for arch_setup field.
838 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
839 (init_registers_powerpc_64): Likewise.
840 (the_low_target): Add initializer for arch_setup field.
841 * linux-s390-low.c (init_registers_s390): Add prototype.
842 (init_registers_s390x): Likewise.
843 (the_low_target): Add initializer for arch_setup field.
844 * linux-sh-low.c (init_registers_sh): Add prototype.
845 (the_low_target): Add initializer for arch_setup field.
846 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
847 (the_low_target): Add initializer for arch_setup field.
848 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
849 (the_low_target): Add initializer for arch_setup field.
851 * win32-low.h (struct win32_target_ops): Add arch_setup field.
852 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
853 instead of init_registers ().
854 * win32-arm-low.c (init_registers_arm): Add prototype.
855 (the_low_target): Add initializer for arch_setup field.
856 * win32-i386-low.c (init_registers_i386): Add prototype.
857 (the_low_target): Add initializer for arch_setup field.
859 * spu-low.c (init_registers_spu): Add prototype.
860 (initialize_low): Call initialie_registers_spu () instead of
861 initialize_registers ().
863 2008-02-19 Pedro Alves <pedro@codesourcery.com>
865 * server.c (handle_v_requests): When handling the vRun and vAttach
866 packets, if already debugging a process, don't kill it. Return an
869 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
871 * server.c (handle_query): Correct length check.
873 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
875 * win32-low.c (do_initial_child_stuff): Add process handle
876 parameter. Set current_process_handle and current_process_id from the
877 parameters. Clear globals.
878 (win32_create_inferior): Don't set current_process_handle and
879 current_process_id here. Instead pass them on the call to
880 do_initial_child_stuff.
881 (win32_attach): Likewise.
882 (win32_clear_inferiors): New.
883 (win32_kill): Don't close the current process handle or the
884 current thread handle here. Instead call win32_clear_inferiors.
885 (win32_detach): Don't open a new handle to the process. Call
886 win32_clear_inferiors.
887 (win32_join): Don't rely on current_process_handle; open a new
888 handle using the process id.
889 (win32_wait): Call win32_clear_inferiors when the inferior process
892 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
894 * server.c (monitor_show_help): Add "exit".
896 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
898 * Makefile.in (SFILES): Add linux-xtensa-low.c.
899 (clean): Add reg-xtensa.c.
900 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
901 * configure.srv (xtensa*-*-linux*) New target.
902 * linux-xtensa-low.c: New.
903 * xtensa-xtregs.c: New.
905 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
907 * hostio.c: Don't include errno.h.
908 (errno_to_fileio_errno): Move to hostio-errno.
909 * hostio.c: (hostio_error): Remove the error parameter. Defer the
910 error number outputting to the target->hostio_last_error callback.
911 (hostio_packet_error): Use FILEIO_EINVAL directly.
912 (handle_open, handle_pread, hostio_error, handle_unlink): Update
913 calls to hostio_error.
914 * hostio-errno.c: New.
915 * server.h (hostio_last_error_from_errno): Declare.
916 * target.h (target_ops): Add hostio_last_error member.
917 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
918 as hostio_last_error handler.
919 * spu-low.c (spu_target_ops): Likewise.
920 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
921 (wince_hostio_last_error): New functions.
922 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
923 as hostio_last_error handler.
924 (win32_target_ops) [!_WIN32_WCE]: Register
925 hostio_last_error_from_errno as hostio_last_error handler.
926 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
927 (hostio-errno.o): New rule.
928 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
929 * configure.srv (srv_hostio_err_objs): New variable. Default to
931 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
932 * configure: Regenerate.
934 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
936 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
937 (linux_kill, linux_detach): Clean up the process list.
938 * remote-utils.c (remote_open): Improve port number parsing.
939 (putpkt_binary, input_interrupt): Only send interrupts if the target
941 * server.c (extended_protocol): Make static.
942 (attached): Define earlier.
943 (exit_requested, response_needed, program_argv): New variables.
944 (target_running): New.
945 (start_inferior): Clear attached here.
946 (attach_inferior): Set attached here.
947 (require_running): Define.
948 (handle_query): Use require_running and target_running. Implement
950 (handle_v_attach, handle_v_run): New.
951 (handle_v_requests): Use require_running. Handle vAttach and vRun.
952 (gdbserver_usage): Update.
953 (main): Redo argument parsing. Handle --debug and --multi. Handle
954 --attach along with other options or after the port. Save
955 program_argv. Support no initial program. Resynchronize
956 communication with GDB after an error. Handle "monitor exit".
957 Use require_running and target_running. Always allow the extended
958 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
959 restart in extended mode.
960 * README: Refer to the GDB manual. Update --attach usage.
962 2007-12-20 Andreas Schwab <schwab@suse.de>
964 * linux-low.c (STACK_SIZE): Define.
965 (linux_tracefork_child): Use it. Use __clone2 on ia64.
966 (linux_test_for_tracefork): Likewise.
968 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
970 * linux-low.c (linux_wait_for_event): Update messages. Do not
971 reinsert auto-delete breakpoints.
972 * mem-break.c (struct breakpoint): Change return type of handler to
974 (set_breakpoint_at): Update handler type.
975 (reinsert_breakpoint_handler): Return 1 instead of calling
977 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
979 (check_breakpoints): Delete auto-delete breakpoints and return 2.
980 * mem-break.h (set_breakpoint_at): Update handler type.
981 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
982 * win32-low.c (auto_delete_breakpoint): New.
983 (get_child_debug_event): Use it.
985 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
987 * configure.ac: Check for pread and pwrite.
988 * hostio.c (handle_pread): Fall back to lseek and read.
989 (handle_pwrite): Fall back to lseek and write.
990 * config.in, configure: Regenerated.
992 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
994 * server.c (myresume): Add own_buf argument.
995 (main): Update calls.
997 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
999 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1000 * remote-utils.c (remote_open): Do not call disable_async_io.
1001 (block_async_io): Delete.
1002 (unblock_async_io): Make static.
1003 (initialize_async_io): New.
1004 * server.c (handle_v_cont): Handle async I/O here.
1005 (myresume): Likewise. Move other common resume tasks here...
1006 (main): ... from here. Call initialize_async_io. Disable async
1007 I/O before the main loop.
1008 * server.h (initialize_async_io): Declare.
1009 (block_async_io, unblock_async_io): Delete prototypes.
1010 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1012 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1014 * remote-utils.c (readchar): Allow binary data in received messages.
1016 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1018 * win32-low.c (attaching): New global.
1019 (win32_create_inferior): Clear the `attaching' global.
1020 (win32_attach): Set the `attaching' global.
1021 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1022 attaching. Only set a breakpoint at the entry point if not
1025 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1027 * server.c (main): Don't report dll events on the initial
1028 connection on attaches.
1030 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1032 * server.c (main): Relax numerical bases supported for the pid of
1033 the --attach command line argument.
1035 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1037 * win32-low.c (win32_attach): Call OpenProcess before
1038 DebugActiveProcess, not after. Add last error output to error
1041 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1043 * win32-low.c (win32_get_thread_context)
1044 (win32_set_thread_context): New functions.
1045 (thread_rec): Use win32_get_thread_context.
1046 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1047 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1050 2007-12-03 Leo Zayas
1051 Pedro Alves <pedro_alves@portugalmail.pt>
1053 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1055 (child_add_thread): Minor cleanup.
1056 (child_continue): Resume artificially suspended threads before
1057 calling ContinueDebugEvent.
1058 (suspend_one_thread): New.
1059 (fake_breakpoint_event): New.
1060 (get_child_debug_event): Change return type to int. Check here if
1061 gdb sent an interrupt request. If a soft interrupt was requested,
1062 fake a breakpoint event. Return 0 if there is no event to handle,
1064 (win32_wait): Don't check here if gdb sent an interrupt request.
1065 Ensure there is a valid event to handle.
1066 (win32_request_interrupt): Add soft interruption method as last
1069 2007-12-03 Leo Zayas
1070 Pedro Alves <pedro_alves@portugalmail.pt>
1072 * win32-low.h (win32_thread_info): Add descriptions to the
1073 structure members. Replace `suspend_count' counter by a
1075 * win32-low.c (thread_rec): Update condition of when to get the
1076 context from the inferior. Rely on ContextFlags being set if it
1077 has already been retrieved. Only suspend the inferior thread if
1078 we haven't already. Warn if that fails.
1079 (continue_one_thread): s/suspend_count/suspended/. Only call
1080 ResumeThread once. Warn if that fails.
1082 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1084 * win32-low.c (win32_wait): Don't read from the inferior when it
1087 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1089 * Makefile.in (win32_low_h): New variable.
1090 (win32-low.o): Add dependency on $(win32_low_h).
1091 (win32-arm-low.o, win32-i386-low.o): New rules.
1093 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1095 * hostio.c: Correct copyright year.
1097 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1099 * Makefile.in (OBS): Add hostio.o.
1100 (hostio.o): New rule.
1101 * server.h (handle_vFile): Declare.
1102 * hostio.c: New file.
1103 * server.c (handle_v_requests): Take packet_len and new_packet_len
1104 for binary packets. Call handle_vFile.
1105 (main): Update call to handle_v_requests.
1107 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1109 * linux-low.c: Include <sched.h>.
1111 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1113 * linux-low.c (linux_tracefork_grandchild): New.
1114 (linux_tracefork_child): Use clone.
1115 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1117 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1119 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1121 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1123 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1125 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1127 * inferiors.c (change_inferior_id): Delete.
1128 (add_pid_to_list, pull_pid_from_list): New.
1129 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1130 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1131 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1132 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1133 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1134 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1135 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1136 (using_threads): Always set to 1.
1137 (handle_extended_wait): New.
1138 (add_process): Do not set TID.
1139 (linux_create_inferior): Set must_set_ptrace_flags.
1140 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1141 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1142 (linux_thread_alive): Rename TID argument to LWPID.
1143 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1144 (linux_wait_for_event): Do not use TID or check using_threads. Update
1145 call to dead_thread_notify. Call handle_extended_wait.
1146 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1147 (send_sigstop): Delete sigstop_sent.
1148 (wait_for_sigstop): Avoid TID.
1149 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1150 (linux_test_for_tracefork): New.
1151 (linux_lookup_signals): Use thread_db_active and
1152 linux_supports_tracefork_flag.
1153 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1154 * linux-low.h (get_process_thread): Avoid TID.
1155 (struct process_ifo): Move thread_known and tid to the end. Remove
1157 (linux_attach_lwp, thread_db_init): Update prototypes.
1158 * server.h (change_inferior_id): Delete prototype.
1159 (add_pid_to_list, pull_pid_from_list): New prototypes.
1160 * thread-db.c (thread_db_use_events): New.
1161 (find_first_thread): Rename to...
1162 (find_one_thread): ...this. Update callers and messages. Do not
1163 call fatal. Check thread_db_use_events. Do not call
1164 change_inferior_id or new_thread_notify.
1165 (maybe_attach_thread): Update. Do not call new_thread_notify.
1166 (thread_db_init): Set thread_db_use_events. Check use_events.
1167 * utils.c (fatal, warning): Correct message prefix.
1169 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1171 * Makefile.in (clean): Remove new files.
1172 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1173 (powerpc-64.o, powerpc-64.c): New rules.
1174 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1175 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1177 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1179 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1180 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1181 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1182 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1183 (target_regsets): Add AltiVec and SPE register sets.
1184 * configure.ac: Check for AltiVec and SPE.
1185 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1186 (ppc_fill_vrregset, ppc_store_vrregset): New.
1187 (target_regsets): Add AltiVec register set.
1188 * configure: Regenerated.
1190 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1192 * linux-low.c (O_LARGEFILE): Define.
1193 (linux_read_memory): Use /proc/PID/mem.
1194 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1195 * configure, config.in: Regenerated.
1197 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1199 * linux-low.c (linux_wait_for_event): Do not pass signals while
1202 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1204 * win32-low.c (create_process): New.
1205 (win32_create_inferior): Use create_process instead of
1206 CreateProcess. If create_process failed retry appending an ".exe"
1207 suffix. Store the GetLastError result immediatelly after
1208 create_process calls and use it on the call to error.
1210 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1212 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1214 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1216 * configure.ac: Switch license to GPLv3.
1218 2007-08-01 Michael Snyder <msnyder@access-company.com>
1220 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1222 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1224 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1226 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1227 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1228 CloseToolhelp32Snapshot.
1229 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1230 CloseToolhelp32Snapshot.
1232 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1234 * server.c (main): Check for inferior exit before main loop.
1236 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1238 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1239 instead of on tmp_desc.
1241 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1242 Daniel Jacobowitz <dan@codesourcery.com>
1244 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1245 (add_thread): Minor cleanups.
1246 (clear_inferiors): Move lower in the file. Clear the DLL
1248 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1249 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1250 (xml_escape_text): New.
1251 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1253 (handle_v_cont): Report errors.
1254 (gdbserver_version): Update.
1255 (main): Correct size of own_buf. Do not report initial DLL events.
1256 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1257 (unloaded_dll, xml_escape_text): New.
1258 * win32-low.c (enum target_waitkind): Update comments.
1259 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1260 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1261 (win32_EnumProcessModules, win32_GetModuleInformation)
1262 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1263 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1264 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1265 (win32_Module32First, win32_Module32Next, load_toolhelp)
1266 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1267 (get_child_debug_event): Handle DLL events.
1268 (win32_wait): Likewise.
1270 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1272 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1273 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1275 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1277 * win32-low.c (handle_output_debug_string): Ignore event if not
1280 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1282 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1284 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1286 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1288 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1290 * inferiors.c (change_inferior_id): Add comment.
1291 * linux-low.c (check_removed_breakpoint): Add an early
1292 prototype. Improve debug output.
1293 (linux_attach): Doc update.
1294 (linux_detach_one_process, linux_detach): Clean up before releasing
1296 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1297 * linux-low.h (struct process_info): Doc improvement.
1298 * mem-break.c (delete_all_breakpoints): New.
1299 * mem-break.h (delete_all_breakpoints): New prototype.
1300 * thread-db.c (find_first_thread): New.
1301 (thread_db_create_event): Call it instead of
1302 thread_db_find_new_threads. Clean up unused variables.
1303 (maybe_attach_thread): Remove first thread handling.
1304 (thread_db_find_new_threads): Use find_first_thread.
1305 (thread_db_get_tls_address): Likewise.
1307 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1309 * thread-db.c (thread_db_find_new_threads): Add prototype.
1310 (thread_db_create_event): Check for the main thread before adding
1312 (maybe_attach_thread): Only enable event reporting if TID == 0.
1313 (thread_db_get_tls_address): Check for new threads.
1315 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1317 * linux-low.c (linux_create_inferior): Try execv before execvp.
1318 * spu-low.c (spu_create_inferior): Likewise.
1320 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1322 * linux-low.c (linux_create_inferior): Change execv to execvp.
1323 * spu-low.c (spu_create_inferior): Likewies.
1325 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1327 * Makefile.in (clean): Clean new files instead of deleted ones.
1328 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1329 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1331 * configure.srv: Specify XML files and new regformats for MIPS and
1333 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1334 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1335 an entry for the restart register.
1336 (mips_cannot_fetch_register, mips_cannot_store_register)
1337 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1338 register names to match the XML descriptions.
1339 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1340 restart register instead of $0.
1342 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1343 Markus Deuling <deuling@de.ibm.com>
1345 * remote-utils.c (decode_xfer_write): New function.
1346 * server.h (decode_xfer_write): Add prototype.
1347 * server.c (handle_query): Add PACKET_LEN argument. Support
1348 qXfer:spu:read and qXfer:spu:write packets.
1349 (main): Pass packet_len to handle_query.
1350 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1351 * target.h (target_ops): Add qxfer_spu.
1353 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1355 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1356 accessing non-seekable spufs files.
1358 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1360 * server.c (handle_query): Add reply for qC packet.
1362 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1363 Leo Zayas <lerele@champenstudios@com>
1365 * server.h (check_remote_input_interrupt_request): New function.
1366 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1367 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1368 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1369 (check_remote_input_interrupt_request): New function.
1370 * server.h (check_remote_input_interrupt_request): Declare.
1371 * win32-low.c (winapi_DebugBreakProcess,
1372 winapi_GenerateConsoleCtrlEvent): New typedefs.
1373 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1375 (win32_wait): Check for remote interrupt request
1376 with check_remote_input_interrupt_request.
1377 (win32_request_interrupt): New function.
1378 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1380 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1382 * win32-low.c (debug_registers_changed,
1383 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1384 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1385 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1386 (thread_rec): Get context using the low target.
1387 (child_add_thread): Call thread_added on the low target,
1388 which does the same thing.
1390 (do_initial_child_stuff): Remove debug registers references.
1391 Set context using the low target. Resume threads after
1392 setting the contexts.
1393 (child_continue): Remove dead variable. Remove debug
1394 registers references.
1395 (child_fetch_inferior_registers): Go through the low target.
1396 (do_child_store_inferior_registers): Remove.
1397 (child_store_inferior_registers): Go through the low target.
1398 (win32_resume): Remove debug registers references.
1399 Set context using the low target.
1400 (handle_exception): Change return type to void. Don't record
1401 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1402 first chance exception.
1403 (get_child_debug_event): Change return type to void. Remove
1404 goto loop. Always return after waiting for debug event.
1405 (win32_wait): Convert to switch statement. Handle spurious
1408 * win32-i386-low.c (debug_registers_changed,
1409 debug_registers_used): New.
1410 (initial_stuff): Rename to ...
1411 (i386_initial_stuff): ... this. Clear debug registers
1413 (store_debug_registers): Delete.
1414 (i386_get_thread_context): New.
1415 (load_debug_registers): Delete.
1416 (i386_set_thread_context): New.
1417 (i386_thread_added): New.
1418 (single_step): Rename to ...
1419 (i386_single_step): ... this.
1420 (do_fetch_inferior_registers): Rename to ...
1421 (i386_fetch_inferior_register): ... this.
1422 (i386_store_inferior_register): New.
1423 (the_low_target): Adapt to new interface.
1425 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1426 (arm_get_thread_context): New.
1427 (arm_set_thread_context): New.
1429 (do_fetch_inferior_registers): Rename to ...
1430 (arm_fetch_inferior_register): ... this.
1431 (arm_store_inferior_register): New.
1432 (arm_wince_breakpoint): Reimplement as unsigned long.
1433 (arm_wince_breakpoint_len): Define.
1434 (the_low_target): Adapt to new interface.
1436 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1437 load_debug_registers. Add get_thread_context, set_thread_context,
1438 thread_added and store_inferior_register. Rename
1439 fetch_inferior_registers to fetch_inferior_register.
1440 (regptr): Remove declaration.
1442 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1444 * linux-low.c (linux_detach): Change return type to int. Return 0.
1445 * spu-low.c (spu_detach): Likewise.
1447 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1449 * target.h (target_ops): Change return type of detach to int.
1451 (join_inferior): New.
1452 * server.c (main): Don't skip detach support on mingw32.
1453 If the inferior doesn't support detaching return error.
1454 Call join_inferior instead of using waitpid.
1455 * linux-low.c (linux_join): New.
1456 (linux_target_op): Add linux_join.
1457 * spu-low.c (spu_join): New.
1458 (spu_target_ops): Add spu_join.
1459 * win32-low.c (win32_detach): Adapt to new interface.
1460 Reopen current_process_handle before detaching. Issue a child
1461 resume before detaching.
1463 (win32_target_op): Add win32_join.
1465 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1467 * win32-low.c (win32-attach): Fix return value.
1468 * target.h (target_ops): Describe ATTACH return values.
1470 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1472 * win32-low.c (GETPROCADDRESS): Define.
1473 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1474 (winapi_DebugSetProcessKillOnExit): Likewise.
1475 (win32_create_inferior): Force usage of ansi CreateProcessA.
1476 (win32_attach): Use GETPROCADDRESS.
1477 (win32_detach): Likewise.
1479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1481 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1483 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1485 * win32-low.c: Commit leftover changes from 2007-03-29.
1487 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1489 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1490 fields short instead of int. Add explicit padding.
1491 (i387_cache_to_fsave): Remove unnecessary casts.
1492 (i387_fsave_to_cache): Doc fix.
1493 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1495 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1497 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1498 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1500 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1502 * configure.srv (arm*-*-mingw32ce*): Move near the other
1505 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1507 * configure.ac: Add errno checking.
1508 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1509 sys/file.h and malloc.h.
1510 (AC_CHECK_DECLS): Add perror.
1511 (srv_mingwce): Handle.
1512 * configure.srv (i[34567]86-*-cygwin*): Add
1513 win32-i386-low.o to srv_tgtobj.
1514 (i[34567]86-*-mingw*): Likewise.
1515 (arm*-*-mingw32ce*): Add case.
1516 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1517 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1518 [__MINGW32CE__] (strerror): New function.
1519 [__MINGW32CE__] (errno): Define to GetLastError.
1520 [__MINGW32CE__] (COUNTOF): New macro.
1521 (remote_open): Remove extra close call.
1522 * mem-break.c (delete_breakpoint_at): New function.
1523 * mem-break.h (delete_breakpoint_at): Declare.
1524 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1525 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1526 [USE_WIN32API] (read, write): Add char* casts.
1527 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1528 * server.h: Include wincecompat.h on Windows CE.
1529 [HAVE_ERRNO_H]: Check.
1530 (perror): Declare if not declared.
1531 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1532 (perror_with_name): Remove errno declaration.
1533 * wincecompat.h: New.
1534 * wincecompat.c: New.
1536 * win32-arm-low.c: New.
1537 * win32-i386-low.c: New.
1538 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1539 (OUTMSG2): Make it safe.
1541 (COUNTOF): New macro.
1542 (NUM_REGS): Get it from the low target.
1543 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1544 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1545 (thread_rec): Let low target handle debug registers.
1546 (child_add_thread): Likewise.
1547 (child_init_thread_list): Likewise.
1548 (continue_one_thread): Likewise.
1550 (do_child_fetch_inferior_registers): Move to ...
1551 * win32-i386-low.c: ... here, and rename to ...
1552 (do_fetch_inferior_registers): ... this.
1553 * win32-low.c (child_fetch_inferior_registers):
1554 Go through the low target.
1555 (do_child_store_inferior_registers): Use regptr.
1556 (strwinerror): New function.
1557 (win32_create_inferior): Handle Windows CE.
1558 Use strwinerror instead of strerror on Windows error
1559 codes. Add program to the error output.
1560 Don't close the main thread handle on Windows CE.
1561 (win32_attach): Use coredll.dll on Windows CE.
1562 (win32_kill): Close current process and current
1564 (win32_detach): Use coredll.dll on Windows CE.
1565 (win32_resume): Let low target handle debug registers, and
1567 (handle_exception): Add/Remove initial breakpoint. Avoid
1568 non-existant WSTOPSIG on Windows CE.
1569 (win32_read_inferior_memory): Cast to remove warning.
1570 (win32_arch_string): Go through the low target.
1571 (initialize_low): Call set_breakpoint_data with the low
1572 target's breakpoint.
1573 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1574 FOP_REGNUM, mappings): Move to ...
1575 * win32-i386-low.c: ... here.
1576 * win32-low.c (win32_thread_info): Move to ...
1577 * win32-low.h: ... here.
1578 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1579 win32-arm-low.c and wincecompat.c.
1580 (all:): Add $EXEEXT.
1581 (install-only:): Likewise.
1582 (gdbserver:): Likewise.
1583 (gdbreplay:): Likewise.
1584 * config.in: Regenerate.
1585 * configure: Regenerate.
1587 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1589 * win32-low.c: Rename typedef thread_info to
1590 win32_thread_info throughout.
1592 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1594 * win32-i386-low.c: Rename to ...
1595 * win32-low.c: ... this.
1596 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1597 * Makefile.in: Likewise.
1599 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1601 * remote-utils.c (monitor_output): Constify msg parameter.
1602 * server.h (monitor_output): Likewise.
1603 * win32-i386-low.c (handle_output_debug_string): New.
1604 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1605 handle_output_debug_string.
1606 (get_child_debug_event): Likewise.
1608 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1610 * server.c (main): Correct strtoul check.
1612 2007-03-27 Jon Ringle <jon@ringle.org>
1614 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1616 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1618 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1620 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1622 * terminal.h: Check HAVE_SGTTY_H.
1624 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1626 * remote-utils.c (remote_open): Print out the assigned port number.
1628 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1630 * remote-utils.c (monitor_output): New function.
1631 * server.c (debug_threads): Define here.
1632 (monitor_show_help): New function.
1633 (handle_query): Handle qRcmd.
1634 (main): Do not handle 'd' packet.
1635 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1636 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1639 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1641 * Makefile.in (EXEEXT): New.
1642 (clean): Use $(EXEEXT).
1644 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1646 * target.h (target_ops): Rename send_signal to request_interrupt,
1647 and remove enum target_signal parameter.
1648 * linux-low.c (linux_request_interrupt): Rename from
1649 linux_send_signal, and always send SIGINT.
1650 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1651 and always send SIGINT.
1652 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1654 (input_interrupt): Likewise.
1656 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1658 * server.c (get_features_xml): Check if target implemented
1660 * win32-i386-low.c (win32_arch_string): New.
1661 (win32_target_ops): Add win32_arch_string as arch_string member.
1663 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1665 * spu-low.c (spu_arch_string): New.
1666 (spu_target_ops): Add spu_arch_string.
1668 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1670 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1671 * configure.ac: Do not check for terminal.h.
1672 * configure, config.in: Regenerated.
1674 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1676 * Makefile.in (OBS): Add $(XML_BUILTIN).
1677 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1679 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1680 (arm-with-iwmmxt.c): New.
1681 * config.in, configure: Regenerate.
1682 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1683 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1684 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1685 (arm*-*-linux*): Add iWMMXt and regset support.
1686 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1687 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1688 (arm_store_wmmxregset, target_regsets): New.
1689 * server.c (get_features_xml): Take annex argument. Check builtin
1691 (handle_query): Handle multiple annexes.
1693 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1695 * remote-utils.c [USE_WIN32API] (read, write): Define.
1696 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1699 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1701 * linux-i386-low.c (the_low_target): Set arch_string.
1702 * linux-x86-64-low.c (the_low_target): Likewise.
1703 * linux-low.c (linux_arch_string): New.
1704 (linux_target_ops): Add it.
1705 * linux-low.h (struct linux_target_ops): Add arch_string.
1706 * server.c (write_qxfer_response): Use const void * for DATA.
1707 (get_features_xml): New.
1708 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1709 * target.h (struct target_ops): Add arch_string method.
1711 2007-01-03 Denis Pilat <denis.pilat@st.com>
1712 Daniel Jacobowitz <dan@codesourcery.com>
1714 * linux-low.c (linux_kill): Handle being called with no threads.
1715 * win32-i386-low.c (win32_kill): Likewise.
1716 (get_child_debug_event): Clear current_process_handle.
1718 2006-12-30 Denis PILAT <denis.pilat@st.com>
1719 Daniel Jacobowitz <dan@codesourcery.com>
1721 * remote-utils.c (remote_open): Check the type of specified
1722 serial port devices before opening them.
1723 * server.c (main): Kill the inferior if an error occurs during
1724 the first remote_open.
1726 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1728 * README: Update supported targets.
1730 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1732 * Makefile.in (clean): Remove reg-mips64.c.
1733 (reg-mips64.c, reg-mips64.o): New rules.
1734 * configure.srv: Handle mips64. Include regset support for mips.
1735 * linux-mips-low.c (union mips_register): New.
1736 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1737 (mips_breakpoint, mips_breakpoint_at): Use int.
1738 (mips_collect_register, mips_supply_register)
1739 (mips_collect_register_32bit, mips_supply_register_32bit)
1740 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1741 (mips_store_fpregset, target_regsets): New.
1742 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1744 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1746 * configure.srv: Add target "spu*-*-*".
1747 * Makefile.in (clean): Remove reg-spu.c.
1748 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1749 * spu-low.c: New file.
1751 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1753 * configure.ac: Correct td_thr_tls_get_addr test.
1754 * configure: Regenerated.
1756 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1758 * linux-low.c (linux_wait_for_event): Reformat. Use the
1760 * remote-utils.c (decode_address_to_semicolon): New.
1761 * server.c (pass_signals, handle_general_set): New.
1762 (handle_query): Mention QPassSignals for qSupported.
1763 (main): Call handle_general_set.
1764 * server.h (pass_signals, decode_address_to_semicolon): New.
1766 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1768 * server.c (handle_query): Correct error handling for read_auxv.
1770 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1772 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1773 and srv_linux_thread_db to yes.
1774 * linux-s390-low.c (s390_fill_gregset): New function.
1775 (target_regsets): Define data structure.
1777 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1779 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1780 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1781 * config.in, configure: Regenerated.
1782 * inferiors.c (gdb_id_to_thread): New function.
1783 (gdb_id_to_thread_id): Use it.
1784 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1785 * linux-low.h (struct process_info): Add th member.
1786 (thread_db_get_tls_address): New prototype.
1787 * remote-utils.c (decode_address): Make non-static.
1788 * server.c (handle_query): Handle qGetTLSAddr.
1789 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1790 * target.h (struct target_ops): Add get_tls_address.
1791 * thread-db.c (maybe_attach_thread): Save the thread handle.
1792 (thread_db_get_tls_address): New.
1794 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1796 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1797 (linux_resume_one_process): Take a siginfo_t *. Update all
1798 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1799 (struct pending_signals): Add a siginfo_t.
1800 (linux_wait_for_process): Always set last_status.
1801 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1802 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1803 * linux-low.h (struct process_info): Add last_status.
1805 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1807 * remote-utils.c (try_rle): New function.
1808 (putpkt_binary): Use it.
1810 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1812 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1813 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1814 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1815 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1816 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1819 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1821 * server.c (terminal_fd): New variable.
1822 (old_foreground_pgrp): Likewise.
1823 (restore_old_foreground_pgrp): New function.
1824 (start_inferior): Record the terminal file descriptor in terminal_fd
1825 and its original foreground group in old_foreground_pgrp. Register
1826 restore_old_foreground_pgrp with atexit().
1828 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1830 * server.c (handle_query): Correct qPart to qXfer.
1832 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1834 * configure.ac: Check for more headers which are missing on
1835 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1836 * configure.srv: Add Cygwin and mingw32.
1837 * remote-utils.c: Don't include headers unconditionally which
1838 are missing on mingw32. Include <winsock.h> for mingw32.
1839 (remote_open): Adjust for mingw32 support. Flush
1840 standard error after writing to it.
1841 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1842 (unblock_async_io, enable_async_io, disable_async_io)
1843 (readchar, getpkt): Update for Winsock support.
1844 (prepare_resume_reply): Expect a protocol signal number.
1845 * server.c: Disable <sys/wait.h> on mingw32.
1846 (start_inferior): Adjust for mingw32 support. Flush
1847 standard error after writing to it.
1848 (attach_inferior): Likewise. Use protocol signal
1850 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1852 * win32-i386-low.c: New file.
1853 * Makefile.in (XM_CLIBS): Set.
1854 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1855 (win32-i386-low.o): New dependency rule.
1856 * linux-low.c (linux_wait): Use target signal numbers.
1857 * target.h (struct target_ops): Doc fix.
1858 * server.h (target_signal_to_name): New prototype.
1859 * gdbreplay.c: Don't include headers unconditionally which
1860 are missing on mingw32. Include <winsock.h> for mingw32.
1861 (remote_close, remote_open): Adjust for Winsock support.
1862 * configure, config.in: Regenerated.
1864 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1866 * server.c (decode_xfer_read, write_qxfer_response): New.
1867 (handle_query): Take a packet length argument. Handle
1868 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1869 the qSupported response.
1870 (main): Update call to handle_query.
1872 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1874 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1875 (putpkt_binary): Renamed from putpkt and adjusted for binary
1877 (putpkt): New wrapper for putpkt_binary.
1878 (readchar): Don't mask off the high bit.
1879 (decode_X_packet): New function.
1880 * server.c (main): Call putpkt_binary if a handler sets the packet
1881 length. Save the length of the incoming packet. Handle 'X'.
1882 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1884 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1886 * server.c (handle_query): Handle qSupported.
1888 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1890 * remote-utils.c (all_symbols_looked_up): New variable.
1891 (look_up_one_symbol): Check it.
1892 * server.h (look_up_one_symbol): New declaration.
1893 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1895 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1897 * Makefile.in (linux-arm-low.o): Update dependencies.
1898 * linux-arm-low.c: Include "gdb_proc_service.h".
1899 (PTRACE_GET_THREAD_AREA): Define.
1900 (ps_get_thread_area): New function.
1902 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1904 * configure.srv (m68k*-*-uclinux*): New target.
1905 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1906 (linux_resume_one_process): Remove extraneous cast.
1907 (linux_read_offsets): New.
1908 (linux_target_op): Add linux_read_offsets on mmuless systems.
1909 * server.c (handle_query): Add qOffsets logic.
1910 * target.h (struct target_ops): Add read_offsets.
1912 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1914 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1915 (PTRACE_GET_THREAD_AREA): Define.
1916 (ps_get_thread_area): New function.
1917 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1918 (linux-x86-64-low.o): Update.
1920 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1922 * configure.ac: Remove checks for prfpregset_t.
1923 * gdb_proc_service.h: New file.
1924 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1925 new "gdb_proc_service.h".
1926 * proc-service.c: Likewise.
1927 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1928 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1929 * Makefile.in (gdb_proc_service_h): Updated.
1930 * configure, config.in: Regenerated.
1932 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1934 * remote-utils.c (prepare_resume_reply): Move declaration
1935 of gdb_id_from_wait to the top of the block.
1937 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1939 * linux-low.c (regsets_store_inferior_registers): Read the regset
1940 from the target before filling it.
1942 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1944 * server.c (attach_inferior): Return SIGTRAP for a successful
1947 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1949 * Makefile.in (OBS): Add version.o.
1950 (STAGESTUFF): Delete.
1951 (version.o): Add dependencies.
1952 (version.c): Replace rule.
1953 (clean): Remove version.c.
1954 * server.c (gdbserver_version): New.
1955 (gdbserver_usage): Use printf.
1956 (main): Handle --version and --help.
1957 * server.h (version, host_name): Add declarations.
1959 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1971 * linux-x86-64-low.c:
1974 * linux-ppc64-low.c:
1983 * linux-crisv32-low.c:
1995 * gdbserver.1: Add (C) after Copyright. Update the FSF
1998 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2000 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2001 (arm_breakpoint_at): Recognize both breakpoints.
2002 (the_low_target): Use the correct breakpoint instruction.
2004 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2006 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2007 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2008 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2009 (the_low_target): Update.
2011 2005-10-25 Andreas Schwab <schwab@suse.de>
2013 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2015 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2016 (ia64_num_regs): Reduce to 462.
2018 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2020 * acinclude.m4: Correct quoting.
2021 * aclocal.m4: Regenerated.
2023 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2024 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2025 (thread_db_init): Call thread_db_err_str.
2026 * configure.ac: Check for TD_VERSION.
2027 * config.in, configure: Regenerated.
2029 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2031 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2033 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2035 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2036 is not available. Define HAVE_PTRACE_GETREGS if it is.
2037 * config.in, configure: Regenerated.
2038 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2039 * linux-i386-low.c, linux-m68k-low.c: Update to use
2040 HAVE_PTRACE_GETREGS.
2041 * linux-low.c (regsets_fetch_inferior_registers)
2042 (regsets_store_inferior_registers): Only return 0 if we processed
2044 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2045 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2047 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2049 * inferiors.c (struct thread_info): Add gdb_id.
2050 (add_thread): Add gdb_id argument.
2051 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2052 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2053 calls to add_thread.
2054 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2055 * server.c (handle_query): Use thread_to_gdb_id.
2056 (handle_v_cont, main): Use gdb_id_to_thread_id.
2057 * server.h (add_thread): Update prototype.
2058 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2061 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2063 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2064 left-padded registers.
2065 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2066 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2068 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2070 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2071 * configure: Regenerate.
2072 * config.in: Regenerate.
2073 * server.h (NEED_DECLARATION_STRERROR):
2074 Replace with !HAVE_DECL_STRERROR.
2076 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2078 * linux-low.c (linux_wait, linux_send_signal): Don't test
2079 an unsigned long variable for > 0 if it could be MAX_ULONG.
2080 * server.c (myresume): Likewise.
2081 * target.c (set_desired_inferior): Likewise.
2083 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2085 * configure.ac: Simplify and improve check for socklen_t.
2086 * configure, config.in: Regenerate.
2088 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2090 * acconfig.h: Remove.
2091 * configure.ac: Add a test for socklen_t. Use three-argument
2092 AC_DEFINE throughout.
2093 * config.in: Regenerated using autoheader 2.59.
2094 * configure: Regenerated.
2096 * gdbreplay.c (socklen_t): Provide a default.
2097 (remote_open): Use socklen_t.
2098 * remote-utils.c (socklen_t): Provide a default.
2099 (remote_open): Use socklen_t.
2100 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2103 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2105 * linux-low.c (linux_read_memory, linux_write_memory)
2106 (linux_read_auxv): Likewise.
2107 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2108 (check_mem_write): Likewise.
2109 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2111 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2112 (registers_from_string, register_data): Likewise.
2113 * server.c (handle_query, main): Likewise.
2114 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2115 (decode_M_packet): Likewise.
2116 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2117 * target.h (struct target_ops): Update read_memory, write_memory,
2119 (read_inferior_memory, write_inferior_memory): Update.
2120 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2122 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2123 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2124 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2125 linux-s390-low.c, linux-sh-low.c: Update for changes in
2126 read_inferior_memory and the_low_target->breakpoint.
2128 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2130 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2131 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2132 * configure.srv: Add powerpc64-*-linux*.
2133 * linux-ppc64-low.c: New file.
2135 2005-05-23 Orjan Friberg <orjanf@axis.com>
2137 * linux-cris-low.c: New file with support for CRIS.
2138 * linux-crisv32-low.c: Ditto for CRISv32.
2139 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2140 (clean): Add reg-cris.c and reg-crisv32.c.
2141 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2142 reg-crisv32.o, and reg-crisv32.c to make rules.
2143 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2146 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2148 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2149 of sizeof (PTRACE_XFER_TYPE).
2150 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2152 2005-05-12 Orjan Friberg <orjanf@axis.com>
2154 * target.h (struct target_ops): Add insert_watchpoint,
2155 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2156 pointers for hardware watchpoint support.
2157 * linux-low.h (struct linux_target_ops): Ditto.
2158 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2159 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2160 to linux_target_ops.
2161 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2163 * server.c (main): Recognize 'Z' and 'z' packets.
2165 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2167 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2168 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2169 (the_low_target): Add new members.
2171 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2173 * proc-service.c (ps_lgetregs): Search all_processes instead of
2176 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2178 * server.c (start_inferior): Change return type to int.
2179 (attach_inferior): Change sigptr to int *.
2180 (handle_v_cont, handle_v_requests): Change signal to int *.
2181 (main): Change signal to int.
2183 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2185 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2186 * configure.srv: Add m32r*-*-linux*.
2187 * linux-m32r-low.c: New file.
2189 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2191 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2193 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2195 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2196 Take unsigned long arguments for PIDs.
2197 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2198 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2199 (wait_for_sigstop, linux_resume_one_process)
2200 (regsets_fetch_inferior_registers, linux_send_signal)
2201 (linux_read_auxv): Likewise. Update the types of variables holding
2202 PIDs. Update format string specifiers.
2203 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2204 * remote-utils.c (prepare_resume_reply): Likewise.
2205 * server.c (cont_thread, general_thread, step_thread)
2206 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2208 (handle_query): Update format specifiers.
2209 (handle_v_cont, main): Use strtoul for thread IDs.
2210 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2211 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2212 (general_thread, step_thread, thread_from_wait)
2213 (old_thread_from_wait): Update.
2214 * target.h (struct thread_resume): Use unsigned long for THREAD.
2215 (struct target_ops): Use unsigned long for arguments to attach and
2218 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2220 * acinclude.m4: Include bfd/bfd.m4 directly.
2221 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2222 <agriffis@toolchain.org>.
2223 * aclocal.m4, configure: Regenerated.
2225 2005-01-07 Andrew Cagney <cagney@gnu.org>
2227 * configure.ac: Rename configure.in, require autoconf 2.59.
2228 * configure: Re-generate.
2230 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2232 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2234 * aclocal.m4: Regenerated.
2235 * configure: Regenerated.
2237 2004-11-21 Andreas Schwab <schwab@suse.de>
2239 * linux-m68k-low.c (m68k_num_gregs): Define.
2240 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2241 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2242 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2243 (m68k_breakpoint_at): New. Add to the_low_target.
2245 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2246 srv_linux_thread_db to yes.
2248 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2250 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2251 (ARCH_SET_FS): Likewise.
2252 (ARCH_GET_FS): Likewise.
2253 (ARCH_GET_GS): Likewise.
2255 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2257 * linux-i386-low.c (ps_get_thread_area): New.
2258 * linux-x86-64-low.c (ps_get_thread_area): New.
2259 * linux-low.c: Include <sys/syscall.h>.
2260 (linux_kill_one_process): Don't kill the first thread here.
2261 (linux_kill): Kill the first thread here.
2262 (kill_lwp): New function.
2263 (send_sigstop, linux_send_signal): Use it.
2264 * proc-service.c: Clean up #ifdefs.
2265 (fpregset_info): Delete.
2266 (ps_lgetregs): Update and enable implementation.
2267 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2269 * remote-utils.c (struct sym_cache, symbol_cache): New.
2270 (input_interrupt): Print a clearer message.
2271 (async_io_enabled): New variable.
2272 (enable_async_io, disable_async_io): Use it. Update comments.
2273 (look_up_one_symbol): Use the symbol cache.
2274 * thread-db.c (thread_db_look_up_symbols): New function.
2275 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2277 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2279 * configure.in: Test for -rdynamic.
2280 * configure: Regenerated.
2281 * Makefile (INTERNAL_LDFLAGS): New.
2282 (gdbserver, gdbreplay): Use it.
2284 2004-09-02 Andrew Cagney <cagney@gnu.org>
2286 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2288 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
2290 * linux-low.c (linux_wait): Clear all_processes list also.
2292 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2294 * linux-low.c: Include <errno.h>. Remove extern declaration of
2297 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2299 * gdbreplay.c, server.h, utils.c: Update copyright years.
2301 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2303 * server.c (main): Print child status or termination signal from
2304 variable 'signal', not 'sig'.
2306 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2308 * linux-low.c (linux_read_memory): Change return type to
2309 int. Check for and return error from ptrace().
2310 * target.c (read_inferior_memory): Change return type to int. Pass
2311 back return status from the_target->read_memory().
2312 * target.h (struct target_ops): Adapt *read_memory() prototype.
2314 (read_inferior_memory): Adapt prototype.
2315 * server.c (main): Return an error packet if
2316 read_inferior_memory() returns an error.
2318 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2320 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2321 Unify with other clean targets.
2323 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2325 * server.c (handle_v_cont): Call set_desired_inferior.
2327 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2329 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2331 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2333 * linux-low.c (linux_wait): Unblock async I/O.
2334 (linux_resume): Block and enable async I/O.
2335 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2336 * server.h (block_async_io, unblock_async_io): Add prototypes.
2338 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2340 * remote-utils.c (remote_open): Print a status notice after
2342 * server.c (attach_inferior): Print a status notice after
2345 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2347 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2349 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2351 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2353 * server.c, target.h: Update copyright years.
2355 2004-02-25 Roland McGrath <roland@redhat.com>
2357 * target.h (struct target_ops): New member `read_auxv'.
2358 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2359 * linux-low.c (linux_read_auxv): New function.
2360 (linux_target_ops): Initialize `read_auxv' member to that.
2362 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2364 Committed by Jim Blandy <jimb@redhat.com>.
2366 * linux-s390-low.c (s390_num_regs): Update.
2367 (s390_regmap): Remove control registers. Use __s390x__ predefine
2368 instead of GPR_SIZE to distiguish s390 and s390x targets.
2370 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2372 * linux-low.c: Update copyright year.
2373 (check_removed_breakpoint): Clear pending_is_breakpoint.
2374 (linux_set_resume_request, linux_queue_one_thread)
2375 (resume_status_pending_p): New functions.
2376 (linux_continue_one_thread): Use process->resume.
2377 (linux_resume): Only resume threads if there are no pending events.
2378 * linux-low.h (struct process_info): Add resume request
2381 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2383 * regcache.c (new_register_cache): Clear the allocated register
2384 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2386 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2388 * linux-low.c (linux_resume): Take a struct thread_resume *
2390 (linux_wait): Update call.
2391 (resume_ptr): New static variable.
2392 (linux_continue_one_thread): Renamed from
2393 linux_continue_one_process. Use resume_ptr.
2394 (linux_resume): Use linux_continue_one_thread.
2395 * server.c (handle_v_cont, handle_v_requests): New functions.
2396 (myresume): New function.
2397 (main): Handle 'v' case.
2398 * target.h (struct thread_resume): New type.
2399 (struct target_ops): Change argument of "resume" to struct
2401 (myresume): Delete macro.
2403 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2405 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2406 (uninstall): Support DESTDIR.
2408 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2410 * configure.srv: Add xscale*linux copy of arm*linux entry.
2412 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2414 * linux-arm-low.c (arm_reinsert_addr): New function.
2415 (the_low_target): Add arm_reinsert_addr.
2417 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2419 * mem-break.c: Remove whitespace at end of file.
2421 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2423 * configure.in: Check whether we need to prototype strerror.
2424 * server.h: Optionally prototype strerror.
2425 * gdbreplay.c (perror_with_name): Use strerror.
2426 * linux-low.c (linux_attach_lwp): Use strerror.
2427 * utils.c (perror_with_name): Use strerror.
2428 * config.in, configure: Regenerated.
2430 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2432 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2433 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2435 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2437 * Makefile.in (SFILES): Update.
2438 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2439 low-sun3.c: Remove files.
2441 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2443 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2444 (linux_detach_one_process, linux_detach): New functions.
2445 (linux_target_ops): Add linux_detach.
2446 * server.c (main): Handle 'D' packet.
2447 * target.h (struct target_ops): Add "detach" member.
2448 (detach_inferior): Define.
2450 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2452 From Kelley Cook <kelleycook@wideopenwest.com>:
2453 * configure.srv: Accept i[34567]86 variants.
2455 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2457 * linux-low.c (linux_wait_for_event): Correct comment typos.
2458 (linux_resume_one_process): Call check_removed_breakpoint.
2459 (linux_send_signal): New function.
2460 (linux_target_ops): Add linux_send_signal.
2461 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2463 * target.h (struct target_ops): Add send_signal.
2465 2003-05-29 Jim Blandy <jimb@redhat.com>
2467 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2468 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2469 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2470 away part of the register's value.
2472 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2474 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2475 (linux_wait_for_event, linux_init_signals): Likewise.
2477 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2479 * configure.in: Check for stdlib.h.
2480 * configure: Regenerated.
2481 * config.in: Regenerated.
2483 2003-01-04 Andreas Schwab <schwab@suse.de>
2485 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2487 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2489 * Makefile.in: Remove obsolete code.
2491 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2493 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2494 defined(PT_FPR0_HI).
2496 2002-11-17 Stuart Hughes <seh@zee2.com>
2498 * linux-arm-low.c (arm_num_regs): Increase.
2499 (arm_regmap): Include status register.
2501 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2503 * linux-low.c (register_addr): Remove incorrect -1 check.
2505 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2507 * linux-low.c (linux_create_inferior): Call setpgid. Return
2509 (unstopped_p, linux_signal_pid): Remove.
2510 (linux_target_ops): Remove linux_signal_pid.
2511 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2512 global instead of target method.
2513 * target.h (struct target_ops): Remove signal_pid. Update comment
2514 for create_inferior.
2515 * server.c (signal_pid): New variable.
2516 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2517 gdbserver. Set the child to be the foreground process group.
2518 (attach_inferior): Set signal_pid.
2520 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2522 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2524 2002-08-20 Jim Blandy <jimb@redhat.com>
2526 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2529 2002-08-01 Andrew Cagney <cagney@redhat.com>
2531 * Makefile.in: Make chill references obsolete.
2533 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2535 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2536 * configure: Regenerate.
2537 * config.in: Regenerate.
2539 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2541 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2542 (perror_with_name, remote_close, remote_open, expect, play): Static.
2544 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2546 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2547 byte offsets instead of an array of indexes.
2548 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2550 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2552 * regcache.c: Add comment.
2554 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2556 * thread-db.c: New file.
2557 * proc-service.c: New file.
2558 * acinclude.m4: New file.
2559 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2560 proc-service.o, and thread-db.o.
2561 (linux-low.o): Add USE_THREAD_DB.
2562 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2563 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2564 * aclocal.m4: Regenerated.
2565 * config.in: Regenerated.
2566 * configure: Regenerated.
2567 * configure.in: Check for proc_service.h, sys/procfs.h,
2568 thread_db.h, and linux/elf.h headrs.
2569 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2570 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2571 Check for -lthread_db and thread support.
2572 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2573 PowerPC, and SuperH.
2574 * i387-fp.c: Constify arguments.
2575 * i387-fp.h: Likewise.
2576 * inferiors.c: (struct thread_info): Renamed from
2577 `struct inferior_info'. Remove PID member. Use generic inferior
2578 list header. All uses updated.
2579 (inferiors, signal_pid): Removed.
2580 (all_threads): New variable.
2581 (get_thread): Define.
2582 (add_inferior_to_list): New function.
2583 (for_each_inferior): New function.
2584 (change_inferior_id): New function.
2585 (add_inferior): Removed.
2586 (remove_inferior): New function.
2587 (add_thread): New function.
2588 (free_one_thread): New function.
2589 (remove_thread): New function.
2590 (clear_inferiors): Use for_each_inferior and free_one_thread.
2591 (find_inferior): New function.
2592 (find_inferior_id): New function.
2593 (inferior_target_data): Update argument type.
2594 (set_inferior_target_data): Likewise.
2595 (inferior_regcache_data): Likewise.
2596 (set_inferior_regcache_data): Likewise.
2597 * linux-low.c (linux_bp_reinsert): Remove.
2598 (all_processes, stopping_threads, using_thrads)
2599 (struct pending_signals, debug_threads, pid_of): New.
2600 (inferior_pid): Replace with macro.
2601 (struct inferior_linux_data): Remove.
2602 (get_stop_pc, add_process): New functions.
2603 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2604 Use add_process and add_thread.
2605 (linux_attach_lwp): New function, based on old linux_attach. Use
2606 add_process and add_thread. Set stop_expected for new threads.
2607 (linux_attach): New function.
2608 (linux_kill_one_process): New function.
2609 (linux_kill): Kill all LWPs.
2610 (linux_thread_alive): Use find_inferior_id.
2611 (check_removed_breakpoints, status_pending_p): New functions.
2612 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2613 Update. Use WNOHANG. Wait for cloned processes also. Update process
2614 struct for the found process.
2615 (linux_wait_for_event): New function.
2616 (linux_wait): Use it. Support LWPs.
2617 (send_sigstop, wait_for_sigstop, stop_all_processes)
2618 (linux_resume_one_process, linux_continue_one_process): New functions.
2619 (linux_resume): Support LWPs.
2620 (REGISTER_RAW_SIZE): Remove.
2621 (fetch_register): Use register_size instead. Call supply_register.
2622 (usr_store_inferior_registers): Likewise. Call collect_register.
2624 (regsets_fetch_inferior_registers): Improve error message.
2625 (regsets_store_inferior_registers): Add debugging.
2626 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2627 (unstopped_p, linux_signal_pid): New functions.
2628 (linux_target_ops): Add linux_signal_pid.
2629 (linux_init_signals): New function.
2630 (initialize_low): Call it. Initialize using_threads.
2631 * regcache.c (inferior_regcache_data): Add valid
2633 (get_regcache): Fetch registers lazily. Add fetch argument
2634 and update all callers.
2635 (regcache_invalidate_one, regcache_invalidate): New
2637 (new_register_cache): Renamed from create_register_cache.
2638 Return the new regcache.
2639 (free_register_cache): Change argument to a void *.
2640 (registers_to_string, registers_from_string): Call get_regcache
2641 with fetch flag set.
2642 (register_data): Make static. Pass fetch flag to get_regcache.
2643 (supply_register): Call get_regcache with fetch flag clear.
2644 (collect_register): Call get_regcache with fetch flag set.
2645 (collect_register_as_string): New function.
2646 * regcache.h: Update.
2647 * remote-utils.c (putpkt): Flush after debug output and use
2649 Handle input interrupts while waiting for an ACK.
2650 (input_interrupt): Use signal_pid method.
2651 (getpkt): Flush after debug output and use stderr.
2652 (outreg): Use collect_register_as_string.
2653 (new_thread_notify, dead_thread_notify): New functions.
2654 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2656 (look_up_one_symbol): Flush after debug output.
2657 * server.c (step_thread, server_waiting): New variables.
2658 (start_inferior): Don't use signal_pid. Update call to mywait.
2659 (attach_inferior): Update call to mywait.
2660 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2661 (main): Don't fetch/store registers explicitly. Use
2662 set_desired_inferior. Support proposed ``Hs'' packet. Update
2665 (struct inferior_list, struct_inferior_list_entry): New.
2666 * target.c (set_desired_inferior): New.
2667 (write_inferior_memory): Constify.
2668 (mywait): New function.
2670 (struct target_ops): New signal_pid method.
2671 (mywait): Removed macro, added prototype.
2673 * linux-low.h (regset_func): Removed.
2674 (regset_fill_func, regset_store_func): New.
2675 (enum regset_type): New.
2676 (struct regset_info): Add type field. Use new operation types.
2677 (struct linux_target_ops): stop_pc renamed to get_pc.
2678 Add decr_pc_after_break and breakpoint_at.
2679 (get_process, get_thread_proess, get_process_thread)
2680 (strut process_info, all_processes, linux_attach_lwp)
2681 (thread_db_init): New.
2683 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2684 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2685 (the_low_target): Add new members.
2686 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2687 (i386_store_fpxregset): Constify.
2688 (target_regsets): Add new kind identifier.
2689 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2690 (i386_set_pc): Add debugging.
2691 (i386_breakpoint_at): New function.
2692 (the_low_target): Add new members.
2693 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2694 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2695 (mips_breakpoint_at): New.
2696 (the_low_target): Add new members.
2697 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2698 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2699 (the_low_target): Add new members.
2700 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2701 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2702 (the_low_target): Add new members.
2703 * linux-x86-64-low.c (target_regsets): Add new kind
2706 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2708 From Martin Pool <mbp@samba.org>:
2709 * server.c (gdbserver_usage): New function.
2712 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2714 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2717 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2719 * Makefile.in: Remove obsolete code.
2721 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2723 * linux-low.c (regsets_fetch_inferior_registers),
2724 (regsets_store_inferior_registers): Removed cast to int from
2726 * regcache.h: Added declaration of struct inferior_info.
2728 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2730 * inferiors.c (struct inferior_info): Add regcache_data.
2731 (add_inferior): Call create_register_cache.
2732 (clear_inferiors): Call free_register_cache.
2733 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2734 * regcache.c (struct inferior_regcache_data): New.
2735 (registers): Remove.
2736 (get_regcache): New function.
2737 (create_register_cache, free_register_cache): New functions.
2738 (set_register_cache): Don't initialize the register cache here.
2739 (registers_to_string, registers_from_string, register_data): Call
2741 * regcache.h: Add prototypes.
2742 * server.h: Likewise.
2744 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2746 * mem-break.c: New file.
2747 * mem-break.h: New file.
2748 * Makefile.in: Add mem-break.o rule; update server.h
2750 * inferiors.c (struct inferior_info): Add target_data
2752 (clear_inferiors): Free target_data member if set.
2753 (inferior_target_data, set_inferior_target_data): New functions.
2754 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2755 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2756 * linux-low.c (linux_bp_reinsert): New variable.
2757 (struct inferior_linux_data): New.
2758 (linux_create_inferior): Use set_inferior_target_data.
2759 (linux_attach): Likewise. Call add_inferior.
2760 (linux_wait_for_one_inferior): New function.
2761 (linux_wait): Call it.
2762 (linux_write_memory): Add const.
2763 (initialize_low): Call set_breakpoint_data.
2764 * linux-low.h (struct linux_target_ops): Add breakpoint
2766 * server.c (attach_inferior): Remove extra add_inferior
2768 * server.h: Include mem-break.h. Update inferior.c
2770 * target.c (read_inferior_memory)
2771 (write_inferior_memory): New functions.
2772 * target.h (read_inferior_memory)
2773 (write_inferior_memory): Change macros to prototypes.
2774 (struct target_ops): Update comments. Add const to write_memory
2777 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2779 * linux-low.c (usr_store_inferior_registers): Support
2780 registers which are allowed to fail to store.
2781 * linux-low.h (linux_target_ops): Likewise.
2782 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2783 (ppc_cannot_store_register): FPSCR may not be storable.
2785 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2787 * server.h: Include <string.h> if HAVE_STRING_H.
2788 * ChangeLog: Correct paths in last ChangeLog entry.
2790 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2792 * linux-low.h: Remove obsolete prototypes.
2793 (struct linux_target_ops): New.
2794 (extern the_low_target): New.
2795 * linux-low.c (num_regs, regmap): Remove declarations.
2796 (register_addr): Use the_low_target explicitly.
2797 (fetch_register): Likewise.
2798 (usr_fetch_inferior_registers): Likewise.
2799 (usr_store_inferior_registers): Likewise.
2800 * linux-arm-low.c (num_regs): Remove.
2801 (arm_num_regs): Define.
2802 (arm_regmap): Renamed from regmap, made static.
2803 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2805 (arm_cannot_store_register): Renamed from cannot_store_register,
2807 (the_low_target): New.
2808 * linux-i386-low.c (num_regs): Remove.
2809 (i386_num_regs): Define.
2810 (i386_regmap): Renamed from regmap, made static.
2811 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2813 (i386_cannot_store_register): Renamed from cannot_store_register,
2815 (the_low_target): New.
2816 * linux-ia64-low.c (num_regs): Remove.
2817 (ia64_num_regs): Define.
2818 (ia64_regmap): Renamed from regmap, made static.
2819 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2821 (ia64_cannot_store_register): Renamed from cannot_store_register,
2823 (the_low_target): New.
2824 * linux-m68k-low.c (num_regs): Remove.
2825 (m68k_num_regs): Define.
2826 (m68k_regmap): Renamed from regmap, made static.
2827 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2829 (m68k_cannot_store_register): Renamed from cannot_store_register,
2831 (the_low_target): New.
2832 * linux-mips-low.c (num_regs): Remove.
2833 (mips_num_regs): Define.
2834 (mips_regmap): Renamed from regmap, made static.
2835 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2837 (mips_cannot_store_register): Renamed from cannot_store_register,
2839 (the_low_target): New.
2840 * linux-ppc-low.c (num_regs): Remove.
2841 (ppc_num_regs): Define.
2842 (ppc_regmap): Renamed from regmap, made static.
2843 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2845 (ppc_cannot_store_register): Renamed from cannot_store_register,
2847 (the_low_target): New.
2848 * linux-s390-low.c (num_regs): Remove.
2849 (s390_num_regs): Define.
2850 (s390_regmap): Renamed from regmap, made static.
2851 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2853 (s390_cannot_store_register): Renamed from cannot_store_register,
2855 (the_low_target): New.
2856 * linux-sh-low.c (num_regs): Remove.
2857 (sh_num_regs): Define.
2858 (sh_regmap): Renamed from regmap, made static.
2859 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2861 (sh_cannot_store_register): Renamed from cannot_store_register,
2863 (the_low_target): New.
2864 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2865 (the_low_target): New.
2867 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2869 * Makefile.in: Add stamp-h target.
2870 * configure.in: Create stamp-h.
2871 * configure: Regenerated.
2873 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2875 * inferiors.c: New file.
2876 * target.c: New file.
2877 * target.h: New file.
2878 * Makefile.in: Add target.o and inferiors.o. Update
2880 * linux-low.c (inferior_pid): New static variable,
2881 moved from server.c.
2882 (linux_create_inferior): Renamed from create_inferior.
2883 Call add_inferior. Return 0 on success instead of a PID.
2884 (linux_attach): Renamed from myattach.
2885 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2886 (linux_thread_alive): Renamed from mythread_alive.
2887 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2889 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2890 (regsets_store_inferior_registers): Correct error message.
2891 Add missing ``return 0''.
2892 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2893 (linux_store_registers): Renamed from store_inferior_registers.
2894 (linux_read_memory): Renamed from read_inferior_memory.
2895 (linux_write_memory): Renamed from write_inferior_memory.
2896 (linux_target_ops): New structure.
2897 (initialize_low): Call set_target_ops ().
2898 * remote-utils.c (unhexify): New function.
2899 (hexify): New function.
2900 (input_interrupt): Send signals to ``signal_pid''.
2901 * server.c (inferior_pid): Remove.
2902 (start_inferior): Update create_inferior call.
2903 (attach_inferior): Call add_inferior.
2904 (handle_query): New function.
2905 (main): Call handle_query for `q' packets.
2906 * server.h: Include "target.h". Remove obsolete prototypes.
2907 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2909 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2911 * Makefile.in: Add WARN_CFLAGS. Update configury
2913 * configure.in: Check for <string.h>
2914 * configure: Regenerate.
2915 * config.in: Regenerate.
2916 * gdbreplay.c: Include needed system headers.
2917 (remote_open): Remove strchr prototype.
2918 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2919 * regcache.c (supply_register): Change buf argument to const void *.
2920 (supply_register_by_name): Likewise.
2921 (collect_register): Change buf argument to void *.
2922 (collect_register_by_name): Likewise.
2923 * regcache.h: Add missing prototypes.
2924 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2925 * server.c (handle_query): New function.
2926 (attached): New static variable, moved out of main.
2927 (main): Quiet longjmp clobber warnings.
2928 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2929 * utils.c (error): Remove NORETURN.