1 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3 * configure.ac: Add errno checking.
4 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5 sys/file.h and malloc.h.
6 (AC_CHECK_DECLS): Add perror.
8 * configure.srv (i[34567]86-*-cygwin*): Add
9 win32-i386-low.o to srv_tgtobj.
10 (i[34567]86-*-mingw*): Likewise.
11 (arm*-*-mingw32ce*): Add case.
12 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14 [__MINGW32CE__] (strerror): New function.
15 [__MINGW32CE__] (errno): Define to GetLastError.
16 [__MINGW32CE__] (COUNTOF): New macro.
17 (remote_open): Remove extra close call.
18 * mem-break.c (delete_breakpoint_at): New function.
19 * mem-break.h (delete_breakpoint_at): Declare.
20 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
22 [USE_WIN32API] (read, write): Add char* casts.
23 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
24 * server.h: Include wincecompat.h on Windows CE.
25 [HAVE_ERRNO_H]: Check.
26 (perror): Declare if not declared.
27 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
28 (perror_with_name): Remove errno declaration.
32 * win32-arm-low.c: New.
33 * win32-i386-low.c: New.
34 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
35 (OUTMSG2): Make it safe.
38 (NUM_REGS): Get it from the low target.
39 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
40 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
41 (thread_rec): Let low target handle debug registers.
42 (child_add_thread): Likewise.
43 (child_init_thread_list): Likewise.
44 (continue_one_thread): Likewise.
46 (do_child_fetch_inferior_registers): Move to ...
47 * win32-i386-low.c: ... here, and rename to ...
48 (do_fetch_inferior_registers): ... this.
49 * win32-low.c (child_fetch_inferior_registers):
50 Go through the low target.
51 (do_child_store_inferior_registers): Use regptr.
52 (strwinerror): New function.
53 (win32_create_inferior): Handle Windows CE.
54 Use strwinerror instead of strerror on Windows error
55 codes. Add program to the error output.
56 Don't close the main thread handle on Windows CE.
57 (win32_attach): Use coredll.dll on Windows CE.
58 (win32_kill): Close current process and current
60 (win32_detach): Use coredll.dll on Windows CE.
61 (win32_resume): Let low target handle debug registers, and
63 (handle_exception): Add/Remove initial breakpoint. Avoid
64 non-existant WSTOPSIG on Windows CE.
65 (win32_read_inferior_memory): Cast to remove warning.
66 (win32_arch_string): Go through the low target.
67 (initialize_low): Call set_breakpoint_data with the low
69 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
70 FOP_REGNUM, mappings): Move to ...
71 * win32-i386-low.c: ... here.
72 * win32-low.c (win32_thread_info): Move to ...
73 * win32-low.h: ... here.
74 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
75 win32-arm-low.c and wincecompat.c.
77 (install-only:): Likewise.
78 (gdbserver:): Likewise.
79 (gdbreplay:): Likewise.
80 * config.in: Regenerate.
81 * configure: Regenerate.
83 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
85 * win32-low.c: Rename typedef thread_info to
86 win32_thread_info throughout.
88 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
90 * win32-i386-low.c: Rename to ...
91 * win32-low.c: ... this.
92 * configure.srv: Replace win32-i386-low.o with win32-low.o.
93 * Makefile.in: Likewise.
95 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
97 * remote-utils.c (monitor_output): Constify msg parameter.
98 * server.h (monitor_output): Likewise.
99 * win32-i386-low.c (handle_output_debug_string): New.
100 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
101 handle_output_debug_string.
102 (get_child_debug_event): Likewise.
104 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
106 * server.c (main): Correct strtoul check.
108 2007-03-27 Jon Ringle <jon@ringle.org>
110 * linux-low.c: Check __ARCH_HAS_MMU__ also.
112 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
114 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
116 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
118 * terminal.h: Check HAVE_SGTTY_H.
120 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
122 * remote-utils.c (remote_open): Print out the assigned port number.
124 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
126 * remote-utils.c (monitor_output): New function.
127 * server.c (debug_threads): Define here.
128 (monitor_show_help): New function.
129 (handle_query): Handle qRcmd.
130 (main): Do not handle 'd' packet.
131 * server.h (debug_threads, remote_debug, monitor_output): Declare.
132 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
135 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
137 * Makefile.in (EXEEXT): New.
138 (clean): Use $(EXEEXT).
140 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
142 * target.h (target_ops): Rename send_signal to request_interrupt,
143 and remove enum target_signal parameter.
144 * linux-low.c (linux_request_interrupt): Rename from
145 linux_send_signal, and always send SIGINT.
146 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
147 and always send SIGINT.
148 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
150 (input_interrupt): Likewise.
152 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
154 * server.c (get_features_xml): Check if target implemented
156 * win32-i386-low.c (win32_arch_string): New.
157 (win32_target_ops): Add win32_arch_string as arch_string member.
159 2007-02-22 Markus Deuling <deuling@de.ibm.com>
161 * spu-low.c (spu_arch_string): New.
162 (spu_target_ops): Add spu_arch_string.
164 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
166 * remote-utils.c: Remove HAVE_TERMINAL_H check.
167 * configure.ac: Do not check for terminal.h.
168 * configure, config.in: Regenerated.
170 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
172 * Makefile.in (OBS): Add $(XML_BUILTIN).
173 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
175 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
176 (arm-with-iwmmxt.c): New.
177 * config.in, configure: Regenerate.
178 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
179 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
180 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
181 (arm*-*-linux*): Add iWMMXt and regset support.
182 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
183 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
184 (arm_store_wmmxregset, target_regsets): New.
185 * server.c (get_features_xml): Take annex argument. Check builtin
187 (handle_query): Handle multiple annexes.
189 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
191 * remote-utils.c [USE_WIN32API] (read, write): Define.
192 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
195 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
197 * linux-i386-low.c (the_low_target): Set arch_string.
198 * linux-x86-64-low.c (the_low_target): Likewise.
199 * linux-low.c (linux_arch_string): New.
200 (linux_target_ops): Add it.
201 * linux-low.h (struct linux_target_ops): Add arch_string.
202 * server.c (write_qxfer_response): Use const void * for DATA.
203 (get_features_xml): New.
204 (handle_query): Handle qXfer:features:read. Report it for qSupported.
205 * target.h (struct target_ops): Add arch_string method.
207 2007-01-03 Denis Pilat <denis.pilat@st.com>
208 Daniel Jacobowitz <dan@codesourcery.com>
210 * linux-low.c (linux_kill): Handle being called with no threads.
211 * win32-i386-low.c (win32_kill): Likewise.
212 (get_child_debug_event): Clear current_process_handle.
214 2006-12-30 Denis PILAT <denis.pilat@st.com>
215 Daniel Jacobowitz <dan@codesourcery.com>
217 * remote-utils.c (remote_open): Check the type of specified
218 serial port devices before opening them.
219 * server.c (main): Kill the inferior if an error occurs during
220 the first remote_open.
222 2006-12-05 Markus Deuling <deuling@de.ibm.com>
224 * README: Update supported targets.
226 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
228 * Makefile.in (clean): Remove reg-mips64.c.
229 (reg-mips64.c, reg-mips64.o): New rules.
230 * configure.srv: Handle mips64. Include regset support for mips.
231 * linux-mips-low.c (union mips_register): New.
232 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
233 (mips_breakpoint, mips_breakpoint_at): Use int.
234 (mips_collect_register, mips_supply_register)
235 (mips_collect_register_32bit, mips_supply_register_32bit)
236 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
237 (mips_store_fpregset, target_regsets): New.
238 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
240 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
242 * configure.srv: Add target "spu*-*-*".
243 * Makefile.in (clean): Remove reg-spu.c.
244 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
245 * spu-low.c: New file.
247 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
249 * configure.ac: Correct td_thr_tls_get_addr test.
250 * configure: Regenerated.
252 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
254 * linux-low.c (linux_wait_for_event): Reformat. Use the
256 * remote-utils.c (decode_address_to_semicolon): New.
257 * server.c (pass_signals, handle_general_set): New.
258 (handle_query): Mention QPassSignals for qSupported.
259 (main): Call handle_general_set.
260 * server.h (pass_signals, decode_address_to_semicolon): New.
262 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
264 * server.c (handle_query): Correct error handling for read_auxv.
266 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
268 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
269 and srv_linux_thread_db to yes.
270 * linux-s390-low.c (s390_fill_gregset): New function.
271 (target_regsets): Define data structure.
273 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
275 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
276 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
277 * config.in, configure: Regenerated.
278 * inferiors.c (gdb_id_to_thread): New function.
279 (gdb_id_to_thread_id): Use it.
280 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
281 * linux-low.h (struct process_info): Add th member.
282 (thread_db_get_tls_address): New prototype.
283 * remote-utils.c (decode_address): Make non-static.
284 * server.c (handle_query): Handle qGetTLSAddr.
285 * server.h (gdb_id_to_thread, decode_address): New prototypes.
286 * target.h (struct target_ops): Add get_tls_address.
287 * thread-db.c (maybe_attach_thread): Save the thread handle.
288 (thread_db_get_tls_address): New.
290 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
292 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
293 (linux_resume_one_process): Take a siginfo_t *. Update all
294 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
295 (struct pending_signals): Add a siginfo_t.
296 (linux_wait_for_process): Always set last_status.
297 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
298 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
299 * linux-low.h (struct process_info): Add last_status.
301 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
303 * remote-utils.c (try_rle): New function.
304 (putpkt_binary): Use it.
306 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
308 * Makefile.in (clean): Clean reg-x86-64-linux.c.
309 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
310 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
311 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
312 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
315 2006-08-08 Richard Sandiford <richard@codesourcery.com>
317 * server.c (terminal_fd): New variable.
318 (old_foreground_pgrp): Likewise.
319 (restore_old_foreground_pgrp): New function.
320 (start_inferior): Record the terminal file descriptor in terminal_fd
321 and its original foreground group in old_foreground_pgrp. Register
322 restore_old_foreground_pgrp with atexit().
324 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
326 * server.c (handle_query): Correct qPart to qXfer.
328 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
330 * configure.ac: Check for more headers which are missing on
331 Windows. Automatically supply -lwsock32 and USE_WIN32API.
332 * configure.srv: Add Cygwin and mingw32.
333 * remote-utils.c: Don't include headers unconditionally which
334 are missing on mingw32. Include <winsock.h> for mingw32.
335 (remote_open): Adjust for mingw32 support. Flush
336 standard error after writing to it.
337 (remote_close, putpkt_binary, input_interrupt, block_async_io)
338 (unblock_async_io, enable_async_io, disable_async_io)
339 (readchar, getpkt): Update for Winsock support.
340 (prepare_resume_reply): Expect a protocol signal number.
341 * server.c: Disable <sys/wait.h> on mingw32.
342 (start_inferior): Adjust for mingw32 support. Flush
343 standard error after writing to it.
344 (attach_inferior): Likewise. Use protocol signal
346 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
348 * win32-i386-low.c: New file.
349 * Makefile.in (XM_CLIBS): Set.
350 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
351 (win32-i386-low.o): New dependency rule.
352 * linux-low.c (linux_wait): Use target signal numbers.
353 * target.h (struct target_ops): Doc fix.
354 * server.h (target_signal_to_name): New prototype.
355 * gdbreplay.c: Don't include headers unconditionally which
356 are missing on mingw32. Include <winsock.h> for mingw32.
357 (remote_close, remote_open): Adjust for Winsock support.
358 * configure, config.in: Regenerated.
360 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
362 * server.c (decode_xfer_read, write_qxfer_response): New.
363 (handle_query): Take a packet length argument. Handle
364 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
365 the qSupported response.
366 (main): Update call to handle_query.
368 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
370 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
371 (putpkt_binary): Renamed from putpkt and adjusted for binary
373 (putpkt): New wrapper for putpkt_binary.
374 (readchar): Don't mask off the high bit.
375 (decode_X_packet): New function.
376 * server.c (main): Call putpkt_binary if a handler sets the packet
377 length. Save the length of the incoming packet. Handle 'X'.
378 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
380 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
382 * server.c (handle_query): Handle qSupported.
384 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
386 * remote-utils.c (all_symbols_looked_up): New variable.
387 (look_up_one_symbol): Check it.
388 * server.h (look_up_one_symbol): New declaration.
389 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
391 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
393 * Makefile.in (linux-arm-low.o): Update dependencies.
394 * linux-arm-low.c: Include "gdb_proc_service.h".
395 (PTRACE_GET_THREAD_AREA): Define.
396 (ps_get_thread_area): New function.
398 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
400 * configure.srv (m68k*-*-uclinux*): New target.
401 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
402 (linux_resume_one_process): Remove extraneous cast.
403 (linux_read_offsets): New.
404 (linux_target_op): Add linux_read_offsets on mmuless systems.
405 * server.c (handle_query): Add qOffsets logic.
406 * target.h (struct target_ops): Add read_offsets.
408 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
410 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
411 (PTRACE_GET_THREAD_AREA): Define.
412 (ps_get_thread_area): New function.
413 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
414 (linux-x86-64-low.o): Update.
416 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
418 * configure.ac: Remove checks for prfpregset_t.
419 * gdb_proc_service.h: New file.
420 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
421 new "gdb_proc_service.h".
422 * proc-service.c: Likewise.
423 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
424 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
425 * Makefile.in (gdb_proc_service_h): Updated.
426 * configure, config.in: Regenerated.
428 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
430 * remote-utils.c (prepare_resume_reply): Move declaration
431 of gdb_id_from_wait to the top of the block.
433 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
435 * linux-low.c (regsets_store_inferior_registers): Read the regset
436 from the target before filling it.
438 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
440 * server.c (attach_inferior): Return SIGTRAP for a successful
443 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
445 * Makefile.in (OBS): Add version.o.
446 (STAGESTUFF): Delete.
447 (version.o): Add dependencies.
448 (version.c): Replace rule.
449 (clean): Remove version.c.
450 * server.c (gdbserver_version): New.
451 (gdbserver_usage): Use printf.
452 (main): Handle --version and --help.
453 * server.h (version, host_name): Add declarations.
455 2005-12-23 Eli Zaretskii <eliz@gnu.org>
467 * linux-x86-64-low.c:
479 * linux-crisv32-low.c:
491 * gdbserver.1: Add (C) after Copyright. Update the FSF
494 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
496 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
497 (arm_breakpoint_at): Recognize both breakpoints.
498 (the_low_target): Use the correct breakpoint instruction.
500 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
502 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
503 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
504 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
505 (the_low_target): Update.
507 2005-10-25 Andreas Schwab <schwab@suse.de>
509 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
511 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
512 (ia64_num_regs): Reduce to 462.
514 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
516 * acinclude.m4: Correct quoting.
517 * aclocal.m4: Regenerated.
519 Suggested by SZOKOVACS Robert <szo@ies.hu>:
520 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
521 (thread_db_init): Call thread_db_err_str.
522 * configure.ac: Check for TD_VERSION.
523 * config.in, configure: Regenerated.
525 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
527 * server.h (error, fatal, warning): Add ATTR_FORMAT.
529 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
531 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
532 is not available. Define HAVE_PTRACE_GETREGS if it is.
533 * config.in, configure: Regenerated.
534 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
535 * linux-i386-low.c, linux-m68k-low.c: Update to use
537 * linux-low.c (regsets_fetch_inferior_registers)
538 (regsets_store_inferior_registers): Only return 0 if we processed
540 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
541 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
543 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
545 * inferiors.c (struct thread_info): Add gdb_id.
546 (add_thread): Add gdb_id argument.
547 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
548 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
550 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
551 * server.c (handle_query): Use thread_to_gdb_id.
552 (handle_v_cont, main): Use gdb_id_to_thread_id.
553 * server.h (add_thread): Update prototype.
554 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
557 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
559 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
560 left-padded registers.
561 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
562 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
564 2005-07-01 Steve Ellcey <sje@cup.hp.com>
566 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
567 * configure: Regenerate.
568 * config.in: Regenerate.
569 * server.h (NEED_DECLARATION_STRERROR):
570 Replace with !HAVE_DECL_STRERROR.
572 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
574 * linux-low.c (linux_wait, linux_send_signal): Don't test
575 an unsigned long variable for > 0 if it could be MAX_ULONG.
576 * server.c (myresume): Likewise.
577 * target.c (set_desired_inferior): Likewise.
579 2005-06-13 Mark Kettenis <kettenis@gnu.org>
581 * configure.ac: Simplify and improve check for socklen_t.
582 * configure, config.in: Regenerate.
584 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
586 * acconfig.h: Remove.
587 * configure.ac: Add a test for socklen_t. Use three-argument
588 AC_DEFINE throughout.
589 * config.in: Regenerated using autoheader 2.59.
590 * configure: Regenerated.
592 * gdbreplay.c (socklen_t): Provide a default.
593 (remote_open): Use socklen_t.
594 * remote-utils.c (socklen_t): Provide a default.
595 (remote_open): Use socklen_t.
596 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
599 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
601 * linux-low.c (linux_read_memory, linux_write_memory)
602 (linux_read_auxv): Likewise.
603 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
604 (check_mem_write): Likewise.
605 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
607 * regcache.c (struct inferior_rgcache_data, registers_to_string)
608 (registers_from_string, register_data): Likewise.
609 * server.c (handle_query, main): Likewise.
610 * server.h (convert_ascii_to_int, convert_int_to_ascii)
611 (decode_M_packet): Likewise.
612 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
613 * target.h (struct target_ops): Update read_memory, write_memory,
615 (read_inferior_memory, write_inferior_memory): Update.
616 * linux-low.h (struct linux_target_ops): Change type of breakpoint
618 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
619 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
620 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
621 linux-s390-low.c, linux-sh-low.c: Update for changes in
622 read_inferior_memory and the_low_target->breakpoint.
624 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
626 * Makefile.in (SFILES): Add linux-ppc64-low.c.
627 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
628 * configure.srv: Add powerpc64-*-linux*.
629 * linux-ppc64-low.c: New file.
631 2005-05-23 Orjan Friberg <orjanf@axis.com>
633 * linux-cris-low.c: New file with support for CRIS.
634 * linux-crisv32-low.c: Ditto for CRISv32.
635 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
636 (clean): Add reg-cris.c and reg-crisv32.c.
637 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
638 reg-crisv32.o, and reg-crisv32.c to make rules.
639 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
642 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
644 * linux-low.c (fetch_register): Ensure buffer size is a multiple
645 of sizeof (PTRACE_XFER_TYPE).
646 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
648 2005-05-12 Orjan Friberg <orjanf@axis.com>
650 * target.h (struct target_ops): Add insert_watchpoint,
651 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
652 pointers for hardware watchpoint support.
653 * linux-low.h (struct linux_target_ops): Ditto.
654 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
655 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
657 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
659 * server.c (main): Recognize 'Z' and 'z' packets.
661 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
663 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
664 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
665 (the_low_target): Add new members.
667 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
669 * proc-service.c (ps_lgetregs): Search all_processes instead of
672 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
674 * server.c (start_inferior): Change return type to int.
675 (attach_inferior): Change sigptr to int *.
676 (handle_v_cont, handle_v_requests): Change signal to int *.
677 (main): Change signal to int.
679 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
681 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
682 * configure.srv: Add m32r*-*-linux*.
683 * linux-m32r-low.c: New file.
685 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
687 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
689 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
691 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
692 Take unsigned long arguments for PIDs.
693 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
694 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
695 (wait_for_sigstop, linux_resume_one_process)
696 (regsets_fetch_inferior_registers, linux_send_signal)
697 (linux_read_auxv): Likewise. Update the types of variables holding
698 PIDs. Update format string specifiers.
699 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
700 * remote-utils.c (prepare_resume_reply): Likewise.
701 * server.c (cont_thread, general_thread, step_thread)
702 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
704 (handle_query): Update format specifiers.
705 (handle_v_cont, main): Use strtoul for thread IDs.
706 * server.h (struct inferior_list_entry): Use unsigned long for ID.
707 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
708 (general_thread, step_thread, thread_from_wait)
709 (old_thread_from_wait): Update.
710 * target.h (struct thread_resume): Use unsigned long for THREAD.
711 (struct target_ops): Use unsigned long for arguments to attach and
714 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
716 * acinclude.m4: Include bfd/bfd.m4 directly.
717 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
718 <agriffis@toolchain.org>.
719 * aclocal.m4, configure: Regenerated.
721 2005-01-07 Andrew Cagney <cagney@gnu.org>
723 * configure.ac: Rename configure.in, require autoconf 2.59.
724 * configure: Re-generate.
726 2004-12-08 Daniel Jacobowitz <dan@debian.org>
728 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
730 * aclocal.m4: Regenerated.
731 * configure: Regenerated.
733 2004-11-21 Andreas Schwab <schwab@suse.de>
735 * linux-m68k-low.c (m68k_num_gregs): Define.
736 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
737 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
738 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
739 (m68k_breakpoint_at): New. Add to the_low_target.
741 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
742 srv_linux_thread_db to yes.
744 2004-10-20 Joel Brobecker <brobecker@gnat.com>
746 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
747 (ARCH_SET_FS): Likewise.
748 (ARCH_GET_FS): Likewise.
749 (ARCH_GET_GS): Likewise.
751 2004-10-16 Daniel Jacobowitz <dan@debian.org>
753 * linux-i386-low.c (ps_get_thread_area): New.
754 * linux-x86-64-low.c (ps_get_thread_area): New.
755 * linux-low.c: Include <sys/syscall.h>.
756 (linux_kill_one_process): Don't kill the first thread here.
757 (linux_kill): Kill the first thread here.
758 (kill_lwp): New function.
759 (send_sigstop, linux_send_signal): Use it.
760 * proc-service.c: Clean up #ifdefs.
761 (fpregset_info): Delete.
762 (ps_lgetregs): Update and enable implementation.
763 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
765 * remote-utils.c (struct sym_cache, symbol_cache): New.
766 (input_interrupt): Print a clearer message.
767 (async_io_enabled): New variable.
768 (enable_async_io, disable_async_io): Use it. Update comments.
769 (look_up_one_symbol): Use the symbol cache.
770 * thread-db.c (thread_db_look_up_symbols): New function.
771 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
773 2004-10-16 Daniel Jacobowitz <dan@debian.org>
775 * configure.in: Test for -rdynamic.
776 * configure: Regenerated.
777 * Makefile (INTERNAL_LDFLAGS): New.
778 (gdbserver, gdbreplay): Use it.
780 2004-09-02 Andrew Cagney <cagney@gnu.org>
782 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
784 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
786 * linux-low.c (linux_wait): Clear all_processes list also.
788 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
790 * linux-low.c: Include <errno.h>. Remove extern declaration of
793 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
795 * gdbreplay.c, server.h, utils.c: Update copyright years.
797 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
799 * server.c (main): Print child status or termination signal from
800 variable 'signal', not 'sig'.
802 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
804 * linux-low.c (linux_read_memory): Change return type to
805 int. Check for and return error from ptrace().
806 * target.c (read_inferior_memory): Change return type to int. Pass
807 back return status from the_target->read_memory().
808 * target.h (struct target_ops): Adapt *read_memory() prototype.
810 (read_inferior_memory): Adapt prototype.
811 * server.c (main): Return an error packet if
812 read_inferior_memory() returns an error.
814 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
816 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
817 Unify with other clean targets.
819 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
821 * server.c (handle_v_cont): Call set_desired_inferior.
823 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
825 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
827 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
829 * linux-low.c (linux_wait): Unblock async I/O.
830 (linux_resume): Block and enable async I/O.
831 * remote-utils.c (block_async_io, unblock_async_io): New functions.
832 * server.h (block_async_io, unblock_async_io): Add prototypes.
834 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
836 * remote-utils.c (remote_open): Print a status notice after
838 * server.c (attach_inferior): Print a status notice after
841 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
843 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
845 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
847 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
849 * server.c, target.h: Update copyright years.
851 2004-02-25 Roland McGrath <roland@redhat.com>
853 * target.h (struct target_ops): New member `read_auxv'.
854 * server.c (handle_query): Handle qPart:auxv:read: query using that.
855 * linux-low.c (linux_read_auxv): New function.
856 (linux_target_ops): Initialize `read_auxv' member to that.
858 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
860 Committed by Jim Blandy <jimb@redhat.com>.
862 * linux-s390-low.c (s390_num_regs): Update.
863 (s390_regmap): Remove control registers. Use __s390x__ predefine
864 instead of GPR_SIZE to distiguish s390 and s390x targets.
866 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
868 * linux-low.c: Update copyright year.
869 (check_removed_breakpoint): Clear pending_is_breakpoint.
870 (linux_set_resume_request, linux_queue_one_thread)
871 (resume_status_pending_p): New functions.
872 (linux_continue_one_thread): Use process->resume.
873 (linux_resume): Only resume threads if there are no pending events.
874 * linux-low.h (struct process_info): Add resume request
877 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
879 * regcache.c (new_register_cache): Clear the allocated register
880 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
882 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
884 * linux-low.c (linux_resume): Take a struct thread_resume *
886 (linux_wait): Update call.
887 (resume_ptr): New static variable.
888 (linux_continue_one_thread): Renamed from
889 linux_continue_one_process. Use resume_ptr.
890 (linux_resume): Use linux_continue_one_thread.
891 * server.c (handle_v_cont, handle_v_requests): New functions.
892 (myresume): New function.
893 (main): Handle 'v' case.
894 * target.h (struct thread_resume): New type.
895 (struct target_ops): Change argument of "resume" to struct
897 (myresume): Delete macro.
899 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
901 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
902 (uninstall): Support DESTDIR.
904 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
906 * configure.srv: Add xscale*linux copy of arm*linux entry.
908 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
910 * linux-arm-low.c (arm_reinsert_addr): New function.
911 (the_low_target): Add arm_reinsert_addr.
913 2003-07-08 Mark Kettenis <kettenis@gnu.org>
915 * mem-break.c: Remove whitespace at end of file.
917 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
919 * configure.in: Check whether we need to prototype strerror.
920 * server.h: Optionally prototype strerror.
921 * gdbreplay.c (perror_with_name): Use strerror.
922 * linux-low.c (linux_attach_lwp): Use strerror.
923 * utils.c (perror_with_name): Use strerror.
924 * config.in, configure: Regenerated.
926 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
928 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
929 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
931 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
933 * Makefile.in (SFILES): Update.
934 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
935 low-sun3.c: Remove files.
937 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
939 * linux-low.c: Move comment to linux_thread_alive where it belonged.
940 (linux_detach_one_process, linux_detach): New functions.
941 (linux_target_ops): Add linux_detach.
942 * server.c (main): Handle 'D' packet.
943 * target.h (struct target_ops): Add "detach" member.
944 (detach_inferior): Define.
946 2003-06-13 Mark Kettenis <kettenis@gnu.org>
948 From Kelley Cook <kelleycook@wideopenwest.com>:
949 * configure.srv: Accept i[34567]86 variants.
951 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
953 * linux-low.c (linux_wait_for_event): Correct comment typos.
954 (linux_resume_one_process): Call check_removed_breakpoint.
955 (linux_send_signal): New function.
956 (linux_target_ops): Add linux_send_signal.
957 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
959 * target.h (struct target_ops): Add send_signal.
961 2003-05-29 Jim Blandy <jimb@redhat.com>
963 * linux-low.c (usr_store_inferior_registers): Transfer buf in
964 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
965 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
966 away part of the register's value.
968 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
970 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
971 (linux_wait_for_event, linux_init_signals): Likewise.
973 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
975 * configure.in: Check for stdlib.h.
976 * configure: Regenerated.
977 * config.in: Regenerated.
979 2003-01-04 Andreas Schwab <schwab@suse.de>
981 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
983 2003-01-02 Andrew Cagney <ac131313@redhat.com>
985 * Makefile.in: Remove obsolete code.
987 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
989 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
992 2002-11-17 Stuart Hughes <seh@zee2.com>
994 * linux-arm-low.c (arm_num_regs): Increase.
995 (arm_regmap): Include status register.
997 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
999 * linux-low.c (register_addr): Remove incorrect -1 check.
1001 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1003 * linux-low.c (linux_create_inferior): Call setpgid. Return
1005 (unstopped_p, linux_signal_pid): Remove.
1006 (linux_target_ops): Remove linux_signal_pid.
1007 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1008 global instead of target method.
1009 * target.h (struct target_ops): Remove signal_pid. Update comment
1010 for create_inferior.
1011 * server.c (signal_pid): New variable.
1012 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1013 gdbserver. Set the child to be the foreground process group.
1014 (attach_inferior): Set signal_pid.
1016 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1018 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1020 2002-08-20 Jim Blandy <jimb@redhat.com>
1022 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1025 2002-08-01 Andrew Cagney <cagney@redhat.com>
1027 * Makefile.in: Make chill references obsolete.
1029 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1031 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1032 * configure: Regenerate.
1033 * config.in: Regenerate.
1035 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1037 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1038 (perror_with_name, remote_close, remote_open, expect, play): Static.
1040 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1042 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1043 byte offsets instead of an array of indexes.
1044 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1046 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1048 * regcache.c: Add comment.
1050 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1052 * thread-db.c: New file.
1053 * proc-service.c: New file.
1054 * acinclude.m4: New file.
1055 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1056 proc-service.o, and thread-db.o.
1057 (linux-low.o): Add USE_THREAD_DB.
1058 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1059 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1060 * aclocal.m4: Regenerated.
1061 * config.in: Regenerated.
1062 * configure: Regenerated.
1063 * configure.in: Check for proc_service.h, sys/procfs.h,
1064 thread_db.h, and linux/elf.h headrs.
1065 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1066 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1067 Check for -lthread_db and thread support.
1068 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1069 PowerPC, and SuperH.
1070 * i387-fp.c: Constify arguments.
1071 * i387-fp.h: Likewise.
1072 * inferiors.c: (struct thread_info): Renamed from
1073 `struct inferior_info'. Remove PID member. Use generic inferior
1074 list header. All uses updated.
1075 (inferiors, signal_pid): Removed.
1076 (all_threads): New variable.
1077 (get_thread): Define.
1078 (add_inferior_to_list): New function.
1079 (for_each_inferior): New function.
1080 (change_inferior_id): New function.
1081 (add_inferior): Removed.
1082 (remove_inferior): New function.
1083 (add_thread): New function.
1084 (free_one_thread): New function.
1085 (remove_thread): New function.
1086 (clear_inferiors): Use for_each_inferior and free_one_thread.
1087 (find_inferior): New function.
1088 (find_inferior_id): New function.
1089 (inferior_target_data): Update argument type.
1090 (set_inferior_target_data): Likewise.
1091 (inferior_regcache_data): Likewise.
1092 (set_inferior_regcache_data): Likewise.
1093 * linux-low.c (linux_bp_reinsert): Remove.
1094 (all_processes, stopping_threads, using_thrads)
1095 (struct pending_signals, debug_threads, pid_of): New.
1096 (inferior_pid): Replace with macro.
1097 (struct inferior_linux_data): Remove.
1098 (get_stop_pc, add_process): New functions.
1099 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1100 Use add_process and add_thread.
1101 (linux_attach_lwp): New function, based on old linux_attach. Use
1102 add_process and add_thread. Set stop_expected for new threads.
1103 (linux_attach): New function.
1104 (linux_kill_one_process): New function.
1105 (linux_kill): Kill all LWPs.
1106 (linux_thread_alive): Use find_inferior_id.
1107 (check_removed_breakpoints, status_pending_p): New functions.
1108 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1109 Update. Use WNOHANG. Wait for cloned processes also. Update process
1110 struct for the found process.
1111 (linux_wait_for_event): New function.
1112 (linux_wait): Use it. Support LWPs.
1113 (send_sigstop, wait_for_sigstop, stop_all_processes)
1114 (linux_resume_one_process, linux_continue_one_process): New functions.
1115 (linux_resume): Support LWPs.
1116 (REGISTER_RAW_SIZE): Remove.
1117 (fetch_register): Use register_size instead. Call supply_register.
1118 (usr_store_inferior_registers): Likewise. Call collect_register.
1120 (regsets_fetch_inferior_registers): Improve error message.
1121 (regsets_store_inferior_registers): Add debugging.
1122 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1123 (unstopped_p, linux_signal_pid): New functions.
1124 (linux_target_ops): Add linux_signal_pid.
1125 (linux_init_signals): New function.
1126 (initialize_low): Call it. Initialize using_threads.
1127 * regcache.c (inferior_regcache_data): Add valid
1129 (get_regcache): Fetch registers lazily. Add fetch argument
1130 and update all callers.
1131 (regcache_invalidate_one, regcache_invalidate): New
1133 (new_register_cache): Renamed from create_register_cache.
1134 Return the new regcache.
1135 (free_register_cache): Change argument to a void *.
1136 (registers_to_string, registers_from_string): Call get_regcache
1137 with fetch flag set.
1138 (register_data): Make static. Pass fetch flag to get_regcache.
1139 (supply_register): Call get_regcache with fetch flag clear.
1140 (collect_register): Call get_regcache with fetch flag set.
1141 (collect_register_as_string): New function.
1142 * regcache.h: Update.
1143 * remote-utils.c (putpkt): Flush after debug output and use
1145 Handle input interrupts while waiting for an ACK.
1146 (input_interrupt): Use signal_pid method.
1147 (getpkt): Flush after debug output and use stderr.
1148 (outreg): Use collect_register_as_string.
1149 (new_thread_notify, dead_thread_notify): New functions.
1150 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1152 (look_up_one_symbol): Flush after debug output.
1153 * server.c (step_thread, server_waiting): New variables.
1154 (start_inferior): Don't use signal_pid. Update call to mywait.
1155 (attach_inferior): Update call to mywait.
1156 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1157 (main): Don't fetch/store registers explicitly. Use
1158 set_desired_inferior. Support proposed ``Hs'' packet. Update
1161 (struct inferior_list, struct_inferior_list_entry): New.
1162 * target.c (set_desired_inferior): New.
1163 (write_inferior_memory): Constify.
1164 (mywait): New function.
1166 (struct target_ops): New signal_pid method.
1167 (mywait): Removed macro, added prototype.
1169 * linux-low.h (regset_func): Removed.
1170 (regset_fill_func, regset_store_func): New.
1171 (enum regset_type): New.
1172 (struct regset_info): Add type field. Use new operation types.
1173 (struct linux_target_ops): stop_pc renamed to get_pc.
1174 Add decr_pc_after_break and breakpoint_at.
1175 (get_process, get_thread_proess, get_process_thread)
1176 (strut process_info, all_processes, linux_attach_lwp)
1177 (thread_db_init): New.
1179 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1180 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1181 (the_low_target): Add new members.
1182 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1183 (i386_store_fpxregset): Constify.
1184 (target_regsets): Add new kind identifier.
1185 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1186 (i386_set_pc): Add debugging.
1187 (i386_breakpoint_at): New function.
1188 (the_low_target): Add new members.
1189 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1190 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1191 (mips_breakpoint_at): New.
1192 (the_low_target): Add new members.
1193 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1194 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1195 (the_low_target): Add new members.
1196 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1197 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1198 (the_low_target): Add new members.
1199 * linux-x86-64-low.c (target_regsets): Add new kind
1202 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1204 From Martin Pool <mbp@samba.org>:
1205 * server.c (gdbserver_usage): New function.
1208 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1210 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1213 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1215 * Makefile.in: Remove obsolete code.
1217 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1219 * linux-low.c (regsets_fetch_inferior_registers),
1220 (regsets_store_inferior_registers): Removed cast to int from
1222 * regcache.h: Added declaration of struct inferior_info.
1224 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1226 * inferiors.c (struct inferior_info): Add regcache_data.
1227 (add_inferior): Call create_register_cache.
1228 (clear_inferiors): Call free_register_cache.
1229 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1230 * regcache.c (struct inferior_regcache_data): New.
1231 (registers): Remove.
1232 (get_regcache): New function.
1233 (create_register_cache, free_register_cache): New functions.
1234 (set_register_cache): Don't initialize the register cache here.
1235 (registers_to_string, registers_from_string, register_data): Call
1237 * regcache.h: Add prototypes.
1238 * server.h: Likewise.
1240 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1242 * mem-break.c: New file.
1243 * mem-break.h: New file.
1244 * Makefile.in: Add mem-break.o rule; update server.h
1246 * inferiors.c (struct inferior_info): Add target_data
1248 (clear_inferiors): Free target_data member if set.
1249 (inferior_target_data, set_inferior_target_data): New functions.
1250 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1251 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1252 * linux-low.c (linux_bp_reinsert): New variable.
1253 (struct inferior_linux_data): New.
1254 (linux_create_inferior): Use set_inferior_target_data.
1255 (linux_attach): Likewise. Call add_inferior.
1256 (linux_wait_for_one_inferior): New function.
1257 (linux_wait): Call it.
1258 (linux_write_memory): Add const.
1259 (initialize_low): Call set_breakpoint_data.
1260 * linux-low.h (struct linux_target_ops): Add breakpoint
1262 * server.c (attach_inferior): Remove extra add_inferior
1264 * server.h: Include mem-break.h. Update inferior.c
1266 * target.c (read_inferior_memory)
1267 (write_inferior_memory): New functions.
1268 * target.h (read_inferior_memory)
1269 (write_inferior_memory): Change macros to prototypes.
1270 (struct target_ops): Update comments. Add const to write_memory
1273 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1275 * linux-low.c (usr_store_inferior_registers): Support
1276 registers which are allowed to fail to store.
1277 * linux-low.h (linux_target_ops): Likewise.
1278 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1279 (ppc_cannot_store_register): FPSCR may not be storable.
1281 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1283 * server.h: Include <string.h> if HAVE_STRING_H.
1284 * ChangeLog: Correct paths in last ChangeLog entry.
1286 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1288 * linux-low.h: Remove obsolete prototypes.
1289 (struct linux_target_ops): New.
1290 (extern the_low_target): New.
1291 * linux-low.c (num_regs, regmap): Remove declarations.
1292 (register_addr): Use the_low_target explicitly.
1293 (fetch_register): Likewise.
1294 (usr_fetch_inferior_registers): Likewise.
1295 (usr_store_inferior_registers): Likewise.
1296 * linux-arm-low.c (num_regs): Remove.
1297 (arm_num_regs): Define.
1298 (arm_regmap): Renamed from regmap, made static.
1299 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1301 (arm_cannot_store_register): Renamed from cannot_store_register,
1303 (the_low_target): New.
1304 * linux-i386-low.c (num_regs): Remove.
1305 (i386_num_regs): Define.
1306 (i386_regmap): Renamed from regmap, made static.
1307 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1309 (i386_cannot_store_register): Renamed from cannot_store_register,
1311 (the_low_target): New.
1312 * linux-ia64-low.c (num_regs): Remove.
1313 (ia64_num_regs): Define.
1314 (ia64_regmap): Renamed from regmap, made static.
1315 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1317 (ia64_cannot_store_register): Renamed from cannot_store_register,
1319 (the_low_target): New.
1320 * linux-m68k-low.c (num_regs): Remove.
1321 (m68k_num_regs): Define.
1322 (m68k_regmap): Renamed from regmap, made static.
1323 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1325 (m68k_cannot_store_register): Renamed from cannot_store_register,
1327 (the_low_target): New.
1328 * linux-mips-low.c (num_regs): Remove.
1329 (mips_num_regs): Define.
1330 (mips_regmap): Renamed from regmap, made static.
1331 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1333 (mips_cannot_store_register): Renamed from cannot_store_register,
1335 (the_low_target): New.
1336 * linux-ppc-low.c (num_regs): Remove.
1337 (ppc_num_regs): Define.
1338 (ppc_regmap): Renamed from regmap, made static.
1339 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1341 (ppc_cannot_store_register): Renamed from cannot_store_register,
1343 (the_low_target): New.
1344 * linux-s390-low.c (num_regs): Remove.
1345 (s390_num_regs): Define.
1346 (s390_regmap): Renamed from regmap, made static.
1347 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1349 (s390_cannot_store_register): Renamed from cannot_store_register,
1351 (the_low_target): New.
1352 * linux-sh-low.c (num_regs): Remove.
1353 (sh_num_regs): Define.
1354 (sh_regmap): Renamed from regmap, made static.
1355 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1357 (sh_cannot_store_register): Renamed from cannot_store_register,
1359 (the_low_target): New.
1360 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1361 (the_low_target): New.
1363 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1365 * Makefile.in: Add stamp-h target.
1366 * configure.in: Create stamp-h.
1367 * configure: Regenerated.
1369 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1371 * inferiors.c: New file.
1372 * target.c: New file.
1373 * target.h: New file.
1374 * Makefile.in: Add target.o and inferiors.o. Update
1376 * linux-low.c (inferior_pid): New static variable,
1377 moved from server.c.
1378 (linux_create_inferior): Renamed from create_inferior.
1379 Call add_inferior. Return 0 on success instead of a PID.
1380 (linux_attach): Renamed from myattach.
1381 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1382 (linux_thread_alive): Renamed from mythread_alive.
1383 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1385 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1386 (regsets_store_inferior_registers): Correct error message.
1387 Add missing ``return 0''.
1388 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1389 (linux_store_registers): Renamed from store_inferior_registers.
1390 (linux_read_memory): Renamed from read_inferior_memory.
1391 (linux_write_memory): Renamed from write_inferior_memory.
1392 (linux_target_ops): New structure.
1393 (initialize_low): Call set_target_ops ().
1394 * remote-utils.c (unhexify): New function.
1395 (hexify): New function.
1396 (input_interrupt): Send signals to ``signal_pid''.
1397 * server.c (inferior_pid): Remove.
1398 (start_inferior): Update create_inferior call.
1399 (attach_inferior): Call add_inferior.
1400 (handle_query): New function.
1401 (main): Call handle_query for `q' packets.
1402 * server.h: Include "target.h". Remove obsolete prototypes.
1403 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1405 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1407 * Makefile.in: Add WARN_CFLAGS. Update configury
1409 * configure.in: Check for <string.h>
1410 * configure: Regenerate.
1411 * config.in: Regenerate.
1412 * gdbreplay.c: Include needed system headers.
1413 (remote_open): Remove strchr prototype.
1414 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1415 * regcache.c (supply_register): Change buf argument to const void *.
1416 (supply_register_by_name): Likewise.
1417 (collect_register): Change buf argument to void *.
1418 (collect_register_by_name): Likewise.
1419 * regcache.h: Add missing prototypes.
1420 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1421 * server.c (handle_query): New function.
1422 (attached): New static variable, moved out of main.
1423 (main): Quiet longjmp clobber warnings.
1424 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1425 * utils.c (error): Remove NORETURN.