1 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3 * Makefile.in (OBS): Add version.o.
5 (version.o): Add dependencies.
6 (version.c): Replace rule.
7 (clean): Remove version.c.
8 * server.c (gdbserver_version): New.
9 (gdbserver_usage): Use printf.
10 (main): Handle --version and --help.
11 * server.h (version, host_name): Add declarations.
13 2005-12-23 Eli Zaretskii <eliz@gnu.org>
37 * linux-crisv32-low.c:
49 * gdbserver.1: Add (C) after Copyright. Update the FSF
52 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
54 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
55 (arm_breakpoint_at): Recognize both breakpoints.
56 (the_low_target): Use the correct breakpoint instruction.
58 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
60 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
61 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
62 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
63 (the_low_target): Update.
65 2005-10-25 Andreas Schwab <schwab@suse.de>
67 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
69 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
70 (ia64_num_regs): Reduce to 462.
72 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
74 * acinclude.m4: Correct quoting.
75 * aclocal.m4: Regenerated.
77 Suggested by SZOKOVACS Robert <szo@ies.hu>:
78 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
79 (thread_db_init): Call thread_db_err_str.
80 * configure.ac: Check for TD_VERSION.
81 * config.in, configure: Regenerated.
83 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
85 * server.h (error, fatal, warning): Add ATTR_FORMAT.
87 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
89 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
90 is not available. Define HAVE_PTRACE_GETREGS if it is.
91 * config.in, configure: Regenerated.
92 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
93 * linux-i386-low.c, linux-m68k-low.c: Update to use
95 * linux-low.c (regsets_fetch_inferior_registers)
96 (regsets_store_inferior_registers): Only return 0 if we processed
98 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
99 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
101 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
103 * inferiors.c (struct thread_info): Add gdb_id.
104 (add_thread): Add gdb_id argument.
105 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
106 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
108 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
109 * server.c (handle_query): Use thread_to_gdb_id.
110 (handle_v_cont, main): Use gdb_id_to_thread_id.
111 * server.h (add_thread): Update prototype.
112 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
115 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
117 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
118 left-padded registers.
119 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
120 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
122 2005-07-01 Steve Ellcey <sje@cup.hp.com>
124 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
125 * configure: Regenerate.
126 * config.in: Regenerate.
127 * server.h (NEED_DECLARATION_STRERROR):
128 Replace with !HAVE_DECL_STRERROR.
130 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
132 * linux-low.c (linux_wait, linux_send_signal): Don't test
133 an unsigned long variable for > 0 if it could be MAX_ULONG.
134 * server.c (myresume): Likewise.
135 * target.c (set_desired_inferior): Likewise.
137 2005-06-13 Mark Kettenis <kettenis@gnu.org>
139 * configure.ac: Simplify and improve check for socklen_t.
140 * configure, config.in: Regenerate.
142 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
144 * acconfig.h: Remove.
145 * configure.ac: Add a test for socklen_t. Use three-argument
146 AC_DEFINE throughout.
147 * config.in: Regenerated using autoheader 2.59.
148 * configure: Regenerated.
150 * gdbreplay.c (socklen_t): Provide a default.
151 (remote_open): Use socklen_t.
152 * remote-utils.c (socklen_t): Provide a default.
153 (remote_open): Use socklen_t.
154 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
157 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
159 * linux-low.c (linux_read_memory, linux_write_memory)
160 (linux_read_auxv): Likewise.
161 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
162 (check_mem_write): Likewise.
163 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
165 * regcache.c (struct inferior_rgcache_data, registers_to_string)
166 (registers_from_string, register_data): Likewise.
167 * server.c (handle_query, main): Likewise.
168 * server.h (convert_ascii_to_int, convert_int_to_ascii)
169 (decode_M_packet): Likewise.
170 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
171 * target.h (struct target_ops): Update read_memory, write_memory,
173 (read_inferior_memory, write_inferior_memory): Update.
174 * linux-low.h (struct linux_target_ops): Change type of breakpoint
176 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
177 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
178 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
179 linux-s390-low.c, linux-sh-low.c: Update for changes in
180 read_inferior_memory and the_low_target->breakpoint.
182 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
184 * Makefile.in (SFILES): Add linux-ppc64-low.c.
185 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
186 * configure.srv: Add powerpc64-*-linux*.
187 * linux-ppc64-low.c: New file.
189 2005-05-23 Orjan Friberg <orjanf@axis.com>
191 * linux-cris-low.c: New file with support for CRIS.
192 * linux-crisv32-low.c: Ditto for CRISv32.
193 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
194 (clean): Add reg-cris.c and reg-crisv32.c.
195 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
196 reg-crisv32.o, and reg-crisv32.c to make rules.
197 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
200 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
202 * linux-low.c (fetch_register): Ensure buffer size is a multiple
203 of sizeof (PTRACE_XFER_TYPE).
204 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
206 2005-05-12 Orjan Friberg <orjanf@axis.com>
208 * target.h (struct target_ops): Add insert_watchpoint,
209 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
210 pointers for hardware watchpoint support.
211 * linux-low.h (struct linux_target_ops): Ditto.
212 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
213 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
215 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
217 * server.c (main): Recognize 'Z' and 'z' packets.
219 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
221 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
222 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
223 (the_low_target): Add new members.
225 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
227 * proc-service.c (ps_lgetregs): Search all_processes instead of
230 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
232 * server.c (start_inferior): Change return type to int.
233 (attach_inferior): Change sigptr to int *.
234 (handle_v_cont, handle_v_requests): Change signal to int *.
235 (main): Change signal to int.
237 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
239 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
240 * configure.srv: Add m32r*-*-linux*.
241 * linux-m32r-low.c: New file.
243 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
245 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
247 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
249 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
250 Take unsigned long arguments for PIDs.
251 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
252 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
253 (wait_for_sigstop, linux_resume_one_process)
254 (regsets_fetch_inferior_registers, linux_send_signal)
255 (linux_read_auxv): Likewise. Update the types of variables holding
256 PIDs. Update format string specifiers.
257 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
258 * remote-utils.c (prepare_resume_reply): Likewise.
259 * server.c (cont_thread, general_thread, step_thread)
260 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
262 (handle_query): Update format specifiers.
263 (handle_v_cont, main): Use strtoul for thread IDs.
264 * server.h (struct inferior_list_entry): Use unsigned long for ID.
265 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
266 (general_thread, step_thread, thread_from_wait)
267 (old_thread_from_wait): Update.
268 * target.h (struct thread_resume): Use unsigned long for THREAD.
269 (struct target_ops): Use unsigned long for arguments to attach and
272 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
274 * acinclude.m4: Include bfd/bfd.m4 directly.
275 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
276 <agriffis@toolchain.org>.
277 * aclocal.m4, configure: Regenerated.
279 2005-01-07 Andrew Cagney <cagney@gnu.org>
281 * configure.ac: Rename configure.in, require autoconf 2.59.
282 * configure: Re-generate.
284 2004-12-08 Daniel Jacobowitz <dan@debian.org>
286 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
288 * aclocal.m4: Regenerated.
289 * configure: Regenerated.
291 2004-11-21 Andreas Schwab <schwab@suse.de>
293 * linux-m68k-low.c (m68k_num_gregs): Define.
294 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
295 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
296 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
297 (m68k_breakpoint_at): New. Add to the_low_target.
299 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
300 srv_linux_thread_db to yes.
302 2004-10-20 Joel Brobecker <brobecker@gnat.com>
304 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
305 (ARCH_SET_FS): Likewise.
306 (ARCH_GET_FS): Likewise.
307 (ARCH_GET_GS): Likewise.
309 2004-10-16 Daniel Jacobowitz <dan@debian.org>
311 * linux-i386-low.c (ps_get_thread_area): New.
312 * linux-x86-64-low.c (ps_get_thread_area): New.
313 * linux-low.c: Include <sys/syscall.h>.
314 (linux_kill_one_process): Don't kill the first thread here.
315 (linux_kill): Kill the first thread here.
316 (kill_lwp): New function.
317 (send_sigstop, linux_send_signal): Use it.
318 * proc-service.c: Clean up #ifdefs.
319 (fpregset_info): Delete.
320 (ps_lgetregs): Update and enable implementation.
321 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
323 * remote-utils.c (struct sym_cache, symbol_cache): New.
324 (input_interrupt): Print a clearer message.
325 (async_io_enabled): New variable.
326 (enable_async_io, disable_async_io): Use it. Update comments.
327 (look_up_one_symbol): Use the symbol cache.
328 * thread-db.c (thread_db_look_up_symbols): New function.
329 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
331 2004-10-16 Daniel Jacobowitz <dan@debian.org>
333 * configure.in: Test for -rdynamic.
334 * configure: Regenerated.
335 * Makefile (INTERNAL_LDFLAGS): New.
336 (gdbserver, gdbreplay): Use it.
338 2004-09-02 Andrew Cagney <cagney@gnu.org>
340 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
342 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
344 * linux-low.c (linux_wait): Clear all_processes list also.
346 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
348 * linux-low.c: Include <errno.h>. Remove extern declaration of
351 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
353 * gdbreplay.c, server.h, utils.c: Update copyright years.
355 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
357 * server.c (main): Print child status or termination signal from
358 variable 'signal', not 'sig'.
360 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
362 * linux-low.c (linux_read_memory): Change return type to
363 int. Check for and return error from ptrace().
364 * target.c (read_inferior_memory): Change return type to int. Pass
365 back return status from the_target->read_memory().
366 * target.h (struct target_ops): Adapt *read_memory() prototype.
368 (read_inferior_memory): Adapt prototype.
369 * server.c (main): Return an error packet if
370 read_inferior_memory() returns an error.
372 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
374 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
375 Unify with other clean targets.
377 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
379 * server.c (handle_v_cont): Call set_desired_inferior.
381 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
383 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
385 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
387 * linux-low.c (linux_wait): Unblock async I/O.
388 (linux_resume): Block and enable async I/O.
389 * remote-utils.c (block_async_io, unblock_async_io): New functions.
390 * server.h (block_async_io, unblock_async_io): Add prototypes.
392 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
394 * remote-utils.c (remote_open): Print a status notice after
396 * server.c (attach_inferior): Print a status notice after
399 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
401 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
403 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
405 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
407 * server.c, target.h: Update copyright years.
409 2004-02-25 Roland McGrath <roland@redhat.com>
411 * target.h (struct target_ops): New member `read_auxv'.
412 * server.c (handle_query): Handle qPart:auxv:read: query using that.
413 * linux-low.c (linux_read_auxv): New function.
414 (linux_target_ops): Initialize `read_auxv' member to that.
416 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
418 Committed by Jim Blandy <jimb@redhat.com>.
420 * linux-s390-low.c (s390_num_regs): Update.
421 (s390_regmap): Remove control registers. Use __s390x__ predefine
422 instead of GPR_SIZE to distiguish s390 and s390x targets.
424 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
426 * linux-low.c: Update copyright year.
427 (check_removed_breakpoint): Clear pending_is_breakpoint.
428 (linux_set_resume_request, linux_queue_one_thread)
429 (resume_status_pending_p): New functions.
430 (linux_continue_one_thread): Use process->resume.
431 (linux_resume): Only resume threads if there are no pending events.
432 * linux-low.h (struct process_info): Add resume request
435 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
437 * regcache.c (new_register_cache): Clear the allocated register
438 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
440 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
442 * linux-low.c (linux_resume): Take a struct thread_resume *
444 (linux_wait): Update call.
445 (resume_ptr): New static variable.
446 (linux_continue_one_thread): Renamed from
447 linux_continue_one_process. Use resume_ptr.
448 (linux_resume): Use linux_continue_one_thread.
449 * server.c (handle_v_cont, handle_v_requests): New functions.
450 (myresume): New function.
451 (main): Handle 'v' case.
452 * target.h (struct thread_resume): New type.
453 (struct target_ops): Change argument of "resume" to struct
455 (myresume): Delete macro.
457 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
459 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
460 (uninstall): Support DESTDIR.
462 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
464 * configure.srv: Add xscale*linux copy of arm*linux entry.
466 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
468 * linux-arm-low.c (arm_reinsert_addr): New function.
469 (the_low_target): Add arm_reinsert_addr.
471 2003-07-08 Mark Kettenis <kettenis@gnu.org>
473 * mem-break.c: Remove whitespace at end of file.
475 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
477 * configure.in: Check whether we need to prototype strerror.
478 * server.h: Optionally prototype strerror.
479 * gdbreplay.c (perror_with_name): Use strerror.
480 * linux-low.c (linux_attach_lwp): Use strerror.
481 * utils.c (perror_with_name): Use strerror.
482 * config.in, configure: Regenerated.
484 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
486 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
487 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
489 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
491 * Makefile.in (SFILES): Update.
492 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
493 low-sun3.c: Remove files.
495 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
497 * linux-low.c: Move comment to linux_thread_alive where it belonged.
498 (linux_detach_one_process, linux_detach): New functions.
499 (linux_target_ops): Add linux_detach.
500 * server.c (main): Handle 'D' packet.
501 * target.h (struct target_ops): Add "detach" member.
502 (detach_inferior): Define.
504 2003-06-13 Mark Kettenis <kettenis@gnu.org>
506 From Kelley Cook <kelleycook@wideopenwest.com>:
507 * configure.srv: Accept i[34567]86 variants.
509 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
511 * linux-low.c (linux_wait_for_event): Correct comment typos.
512 (linux_resume_one_process): Call check_removed_breakpoint.
513 (linux_send_signal): New function.
514 (linux_target_ops): Add linux_send_signal.
515 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
517 * target.h (struct target_ops): Add send_signal.
519 2003-05-29 Jim Blandy <jimb@redhat.com>
521 * linux-low.c (usr_store_inferior_registers): Transfer buf in
522 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
523 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
524 away part of the register's value.
526 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
528 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
529 (linux_wait_for_event, linux_init_signals): Likewise.
531 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
533 * configure.in: Check for stdlib.h.
534 * configure: Regenerated.
535 * config.in: Regenerated.
537 2003-01-04 Andreas Schwab <schwab@suse.de>
539 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
541 2003-01-02 Andrew Cagney <ac131313@redhat.com>
543 * Makefile.in: Remove obsolete code.
545 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
547 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
550 2002-11-17 Stuart Hughes <seh@zee2.com>
552 * linux-arm-low.c (arm_num_regs): Increase.
553 (arm_regmap): Include status register.
555 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
557 * linux-low.c (register_addr): Remove incorrect -1 check.
559 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
561 * linux-low.c (linux_create_inferior): Call setpgid. Return
563 (unstopped_p, linux_signal_pid): Remove.
564 (linux_target_ops): Remove linux_signal_pid.
565 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
566 global instead of target method.
567 * target.h (struct target_ops): Remove signal_pid. Update comment
569 * server.c (signal_pid): New variable.
570 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
571 gdbserver. Set the child to be the foreground process group.
572 (attach_inferior): Set signal_pid.
574 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
576 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
578 2002-08-20 Jim Blandy <jimb@redhat.com>
580 * Makefile.in (LDFLAGS): Allow the configure script to establish a
583 2002-08-01 Andrew Cagney <cagney@redhat.com>
585 * Makefile.in: Make chill references obsolete.
587 2002-07-24 Kevin Buettner <kevinb@redhat.com>
589 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
590 * configure: Regenerate.
591 * config.in: Regenerate.
593 2002-07-09 David O'Brien <obrien@FreeBSD.org>
595 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
596 (perror_with_name, remote_close, remote_open, expect, play): Static.
598 2002-07-04 Michal Ludvig <mludvig@suse.cz>
600 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
601 byte offsets instead of an array of indexes.
602 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
604 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
606 * regcache.c: Add comment.
608 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
610 * thread-db.c: New file.
611 * proc-service.c: New file.
612 * acinclude.m4: New file.
613 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
614 proc-service.o, and thread-db.o.
615 (linux-low.o): Add USE_THREAD_DB.
616 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
617 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
618 * aclocal.m4: Regenerated.
619 * config.in: Regenerated.
620 * configure: Regenerated.
621 * configure.in: Check for proc_service.h, sys/procfs.h,
622 thread_db.h, and linux/elf.h headrs.
623 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
624 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
625 Check for -lthread_db and thread support.
626 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
628 * i387-fp.c: Constify arguments.
629 * i387-fp.h: Likewise.
630 * inferiors.c: (struct thread_info): Renamed from
631 `struct inferior_info'. Remove PID member. Use generic inferior
632 list header. All uses updated.
633 (inferiors, signal_pid): Removed.
634 (all_threads): New variable.
635 (get_thread): Define.
636 (add_inferior_to_list): New function.
637 (for_each_inferior): New function.
638 (change_inferior_id): New function.
639 (add_inferior): Removed.
640 (remove_inferior): New function.
641 (add_thread): New function.
642 (free_one_thread): New function.
643 (remove_thread): New function.
644 (clear_inferiors): Use for_each_inferior and free_one_thread.
645 (find_inferior): New function.
646 (find_inferior_id): New function.
647 (inferior_target_data): Update argument type.
648 (set_inferior_target_data): Likewise.
649 (inferior_regcache_data): Likewise.
650 (set_inferior_regcache_data): Likewise.
651 * linux-low.c (linux_bp_reinsert): Remove.
652 (all_processes, stopping_threads, using_thrads)
653 (struct pending_signals, debug_threads, pid_of): New.
654 (inferior_pid): Replace with macro.
655 (struct inferior_linux_data): Remove.
656 (get_stop_pc, add_process): New functions.
657 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
658 Use add_process and add_thread.
659 (linux_attach_lwp): New function, based on old linux_attach. Use
660 add_process and add_thread. Set stop_expected for new threads.
661 (linux_attach): New function.
662 (linux_kill_one_process): New function.
663 (linux_kill): Kill all LWPs.
664 (linux_thread_alive): Use find_inferior_id.
665 (check_removed_breakpoints, status_pending_p): New functions.
666 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
667 Update. Use WNOHANG. Wait for cloned processes also. Update process
668 struct for the found process.
669 (linux_wait_for_event): New function.
670 (linux_wait): Use it. Support LWPs.
671 (send_sigstop, wait_for_sigstop, stop_all_processes)
672 (linux_resume_one_process, linux_continue_one_process): New functions.
673 (linux_resume): Support LWPs.
674 (REGISTER_RAW_SIZE): Remove.
675 (fetch_register): Use register_size instead. Call supply_register.
676 (usr_store_inferior_registers): Likewise. Call collect_register.
678 (regsets_fetch_inferior_registers): Improve error message.
679 (regsets_store_inferior_registers): Add debugging.
680 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
681 (unstopped_p, linux_signal_pid): New functions.
682 (linux_target_ops): Add linux_signal_pid.
683 (linux_init_signals): New function.
684 (initialize_low): Call it. Initialize using_threads.
685 * regcache.c (inferior_regcache_data): Add valid
687 (get_regcache): Fetch registers lazily. Add fetch argument
688 and update all callers.
689 (regcache_invalidate_one, regcache_invalidate): New
691 (new_register_cache): Renamed from create_register_cache.
692 Return the new regcache.
693 (free_register_cache): Change argument to a void *.
694 (registers_to_string, registers_from_string): Call get_regcache
696 (register_data): Make static. Pass fetch flag to get_regcache.
697 (supply_register): Call get_regcache with fetch flag clear.
698 (collect_register): Call get_regcache with fetch flag set.
699 (collect_register_as_string): New function.
700 * regcache.h: Update.
701 * remote-utils.c (putpkt): Flush after debug output and use
703 Handle input interrupts while waiting for an ACK.
704 (input_interrupt): Use signal_pid method.
705 (getpkt): Flush after debug output and use stderr.
706 (outreg): Use collect_register_as_string.
707 (new_thread_notify, dead_thread_notify): New functions.
708 (prepare_resume_reply): Check using_threads. Set thread_from_wait
710 (look_up_one_symbol): Flush after debug output.
711 * server.c (step_thread, server_waiting): New variables.
712 (start_inferior): Don't use signal_pid. Update call to mywait.
713 (attach_inferior): Update call to mywait.
714 (handle_query): Handle qfThreadInfo and qsThreadInfo.
715 (main): Don't fetch/store registers explicitly. Use
716 set_desired_inferior. Support proposed ``Hs'' packet. Update
719 (struct inferior_list, struct_inferior_list_entry): New.
720 * target.c (set_desired_inferior): New.
721 (write_inferior_memory): Constify.
722 (mywait): New function.
724 (struct target_ops): New signal_pid method.
725 (mywait): Removed macro, added prototype.
727 * linux-low.h (regset_func): Removed.
728 (regset_fill_func, regset_store_func): New.
729 (enum regset_type): New.
730 (struct regset_info): Add type field. Use new operation types.
731 (struct linux_target_ops): stop_pc renamed to get_pc.
732 Add decr_pc_after_break and breakpoint_at.
733 (get_process, get_thread_proess, get_process_thread)
734 (strut process_info, all_processes, linux_attach_lwp)
735 (thread_db_init): New.
737 * linux-arm-low.c (arm_get_pc, arm_set_pc,
738 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
739 (the_low_target): Add new members.
740 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
741 (i386_store_fpxregset): Constify.
742 (target_regsets): Add new kind identifier.
743 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
744 (i386_set_pc): Add debugging.
745 (i386_breakpoint_at): New function.
746 (the_low_target): Add new members.
747 * linux-mips-low.c (mips_get_pc, mips_set_pc)
748 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
749 (mips_breakpoint_at): New.
750 (the_low_target): Add new members.
751 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
752 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
753 (the_low_target): Add new members.
754 * linux-sh-low.c (sh_get_pc, sh_set_pc)
755 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
756 (the_low_target): Add new members.
757 * linux-x86-64-low.c (target_regsets): Add new kind
760 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
762 From Martin Pool <mbp@samba.org>:
763 * server.c (gdbserver_usage): New function.
766 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
768 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
771 2002-05-04 Andrew Cagney <ac131313@redhat.com>
773 * Makefile.in: Remove obsolete code.
775 2002-04-24 Michal Ludvig <mludvig@suse.cz>
777 * linux-low.c (regsets_fetch_inferior_registers),
778 (regsets_store_inferior_registers): Removed cast to int from
780 * regcache.h: Added declaration of struct inferior_info.
782 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
784 * inferiors.c (struct inferior_info): Add regcache_data.
785 (add_inferior): Call create_register_cache.
786 (clear_inferiors): Call free_register_cache.
787 (inferior_regcache_data, set_inferior_regcache_data): New functions.
788 * regcache.c (struct inferior_regcache_data): New.
790 (get_regcache): New function.
791 (create_register_cache, free_register_cache): New functions.
792 (set_register_cache): Don't initialize the register cache here.
793 (registers_to_string, registers_from_string, register_data): Call
795 * regcache.h: Add prototypes.
796 * server.h: Likewise.
798 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
800 * mem-break.c: New file.
801 * mem-break.h: New file.
802 * Makefile.in: Add mem-break.o rule; update server.h
804 * inferiors.c (struct inferior_info): Add target_data
806 (clear_inferiors): Free target_data member if set.
807 (inferior_target_data, set_inferior_target_data): New functions.
808 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
809 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
810 * linux-low.c (linux_bp_reinsert): New variable.
811 (struct inferior_linux_data): New.
812 (linux_create_inferior): Use set_inferior_target_data.
813 (linux_attach): Likewise. Call add_inferior.
814 (linux_wait_for_one_inferior): New function.
815 (linux_wait): Call it.
816 (linux_write_memory): Add const.
817 (initialize_low): Call set_breakpoint_data.
818 * linux-low.h (struct linux_target_ops): Add breakpoint
820 * server.c (attach_inferior): Remove extra add_inferior
822 * server.h: Include mem-break.h. Update inferior.c
824 * target.c (read_inferior_memory)
825 (write_inferior_memory): New functions.
826 * target.h (read_inferior_memory)
827 (write_inferior_memory): Change macros to prototypes.
828 (struct target_ops): Update comments. Add const to write_memory
831 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
833 * linux-low.c (usr_store_inferior_registers): Support
834 registers which are allowed to fail to store.
835 * linux-low.h (linux_target_ops): Likewise.
836 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
837 (ppc_cannot_store_register): FPSCR may not be storable.
839 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
841 * server.h: Include <string.h> if HAVE_STRING_H.
842 * ChangeLog: Correct paths in last ChangeLog entry.
844 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
846 * linux-low.h: Remove obsolete prototypes.
847 (struct linux_target_ops): New.
848 (extern the_low_target): New.
849 * linux-low.c (num_regs, regmap): Remove declarations.
850 (register_addr): Use the_low_target explicitly.
851 (fetch_register): Likewise.
852 (usr_fetch_inferior_registers): Likewise.
853 (usr_store_inferior_registers): Likewise.
854 * linux-arm-low.c (num_regs): Remove.
855 (arm_num_regs): Define.
856 (arm_regmap): Renamed from regmap, made static.
857 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
859 (arm_cannot_store_register): Renamed from cannot_store_register,
861 (the_low_target): New.
862 * linux-i386-low.c (num_regs): Remove.
863 (i386_num_regs): Define.
864 (i386_regmap): Renamed from regmap, made static.
865 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
867 (i386_cannot_store_register): Renamed from cannot_store_register,
869 (the_low_target): New.
870 * linux-ia64-low.c (num_regs): Remove.
871 (ia64_num_regs): Define.
872 (ia64_regmap): Renamed from regmap, made static.
873 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
875 (ia64_cannot_store_register): Renamed from cannot_store_register,
877 (the_low_target): New.
878 * linux-m68k-low.c (num_regs): Remove.
879 (m68k_num_regs): Define.
880 (m68k_regmap): Renamed from regmap, made static.
881 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
883 (m68k_cannot_store_register): Renamed from cannot_store_register,
885 (the_low_target): New.
886 * linux-mips-low.c (num_regs): Remove.
887 (mips_num_regs): Define.
888 (mips_regmap): Renamed from regmap, made static.
889 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
891 (mips_cannot_store_register): Renamed from cannot_store_register,
893 (the_low_target): New.
894 * linux-ppc-low.c (num_regs): Remove.
895 (ppc_num_regs): Define.
896 (ppc_regmap): Renamed from regmap, made static.
897 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
899 (ppc_cannot_store_register): Renamed from cannot_store_register,
901 (the_low_target): New.
902 * linux-s390-low.c (num_regs): Remove.
903 (s390_num_regs): Define.
904 (s390_regmap): Renamed from regmap, made static.
905 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
907 (s390_cannot_store_register): Renamed from cannot_store_register,
909 (the_low_target): New.
910 * linux-sh-low.c (num_regs): Remove.
911 (sh_num_regs): Define.
912 (sh_regmap): Renamed from regmap, made static.
913 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
915 (sh_cannot_store_register): Renamed from cannot_store_register,
917 (the_low_target): New.
918 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
919 (the_low_target): New.
921 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
923 * Makefile.in: Add stamp-h target.
924 * configure.in: Create stamp-h.
925 * configure: Regenerated.
927 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
929 * inferiors.c: New file.
930 * target.c: New file.
931 * target.h: New file.
932 * Makefile.in: Add target.o and inferiors.o. Update
934 * linux-low.c (inferior_pid): New static variable,
936 (linux_create_inferior): Renamed from create_inferior.
937 Call add_inferior. Return 0 on success instead of a PID.
938 (linux_attach): Renamed from myattach.
939 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
940 (linux_thread_alive): Renamed from mythread_alive.
941 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
943 (linux_resume): Renamed from myresume. Add missing ``return 0''.
944 (regsets_store_inferior_registers): Correct error message.
945 Add missing ``return 0''.
946 (linux_fetch_registers): Renamed from fetch_inferior_registers.
947 (linux_store_registers): Renamed from store_inferior_registers.
948 (linux_read_memory): Renamed from read_inferior_memory.
949 (linux_write_memory): Renamed from write_inferior_memory.
950 (linux_target_ops): New structure.
951 (initialize_low): Call set_target_ops ().
952 * remote-utils.c (unhexify): New function.
953 (hexify): New function.
954 (input_interrupt): Send signals to ``signal_pid''.
955 * server.c (inferior_pid): Remove.
956 (start_inferior): Update create_inferior call.
957 (attach_inferior): Call add_inferior.
958 (handle_query): New function.
959 (main): Call handle_query for `q' packets.
960 * server.h: Include "target.h". Remove obsolete prototypes.
961 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
963 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
965 * Makefile.in: Add WARN_CFLAGS. Update configury
967 * configure.in: Check for <string.h>
968 * configure: Regenerate.
969 * config.in: Regenerate.
970 * gdbreplay.c: Include needed system headers.
971 (remote_open): Remove strchr prototype.
972 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
973 * regcache.c (supply_register): Change buf argument to const void *.
974 (supply_register_by_name): Likewise.
975 (collect_register): Change buf argument to void *.
976 (collect_register_by_name): Likewise.
977 * regcache.h: Add missing prototypes.
978 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
979 * server.c (handle_query): New function.
980 (attached): New static variable, moved out of main.
981 (main): Quiet longjmp clobber warnings.
982 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
983 * utils.c (error): Remove NORETURN.