1 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3 * target.h (target_ops): Change return type of detach to int.
6 * server.c (main): Don't skip detach support on mingw32.
7 If the inferior doesn't support detaching return error.
8 Call join_inferior instead of using waitpid.
9 * linux-low.c (linux_join): New.
10 (linux_target_op): Add linux_join.
11 * spu-low.c (spu_join): New.
12 (spu_target_ops): Add spu_join.
13 * win32-low.c (win32_detach): Adapt to new interface.
14 Reopen current_process_handle before detaching. Issue a child
15 resume before detaching.
17 (win32_target_op): Add win32_join.
19 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21 * win32-low.c (win32-attach): Fix return value.
22 * target.h (target_ops): Describe ATTACH return values.
24 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
26 * win32-low.c (GETPROCADDRESS): Define.
27 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
28 (winapi_DebugSetProcessKillOnExit): Likewise.
29 (win32_create_inferior): Force usage of ansi CreateProcessA.
30 (win32_attach): Use GETPROCADDRESS.
31 (win32_detach): Likewise.
33 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
35 * win32-low.c (win32_wait): Don't use WSTOPSIG.
37 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
39 * win32-low.c: Commit leftover changes from 2007-03-29.
41 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
43 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
44 fields short instead of int. Add explicit padding.
45 (i387_cache_to_fsave): Remove unnecessary casts.
46 (i387_fsave_to_cache): Doc fix.
47 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
49 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
51 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
52 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
54 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
56 * configure.srv (arm*-*-mingw32ce*): Move near the other
59 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
61 * configure.ac: Add errno checking.
62 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
63 sys/file.h and malloc.h.
64 (AC_CHECK_DECLS): Add perror.
65 (srv_mingwce): Handle.
66 * configure.srv (i[34567]86-*-cygwin*): Add
67 win32-i386-low.o to srv_tgtobj.
68 (i[34567]86-*-mingw*): Likewise.
69 (arm*-*-mingw32ce*): Add case.
70 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
71 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
72 [__MINGW32CE__] (strerror): New function.
73 [__MINGW32CE__] (errno): Define to GetLastError.
74 [__MINGW32CE__] (COUNTOF): New macro.
75 (remote_open): Remove extra close call.
76 * mem-break.c (delete_breakpoint_at): New function.
77 * mem-break.h (delete_breakpoint_at): Declare.
78 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
79 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
80 [USE_WIN32API] (read, write): Add char* casts.
81 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
82 * server.h: Include wincecompat.h on Windows CE.
83 [HAVE_ERRNO_H]: Check.
84 (perror): Declare if not declared.
85 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
86 (perror_with_name): Remove errno declaration.
90 * win32-arm-low.c: New.
91 * win32-i386-low.c: New.
92 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
93 (OUTMSG2): Make it safe.
96 (NUM_REGS): Get it from the low target.
97 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
98 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
99 (thread_rec): Let low target handle debug registers.
100 (child_add_thread): Likewise.
101 (child_init_thread_list): Likewise.
102 (continue_one_thread): Likewise.
104 (do_child_fetch_inferior_registers): Move to ...
105 * win32-i386-low.c: ... here, and rename to ...
106 (do_fetch_inferior_registers): ... this.
107 * win32-low.c (child_fetch_inferior_registers):
108 Go through the low target.
109 (do_child_store_inferior_registers): Use regptr.
110 (strwinerror): New function.
111 (win32_create_inferior): Handle Windows CE.
112 Use strwinerror instead of strerror on Windows error
113 codes. Add program to the error output.
114 Don't close the main thread handle on Windows CE.
115 (win32_attach): Use coredll.dll on Windows CE.
116 (win32_kill): Close current process and current
118 (win32_detach): Use coredll.dll on Windows CE.
119 (win32_resume): Let low target handle debug registers, and
121 (handle_exception): Add/Remove initial breakpoint. Avoid
122 non-existant WSTOPSIG on Windows CE.
123 (win32_read_inferior_memory): Cast to remove warning.
124 (win32_arch_string): Go through the low target.
125 (initialize_low): Call set_breakpoint_data with the low
127 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
128 FOP_REGNUM, mappings): Move to ...
129 * win32-i386-low.c: ... here.
130 * win32-low.c (win32_thread_info): Move to ...
131 * win32-low.h: ... here.
132 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
133 win32-arm-low.c and wincecompat.c.
135 (install-only:): Likewise.
136 (gdbserver:): Likewise.
137 (gdbreplay:): Likewise.
138 * config.in: Regenerate.
139 * configure: Regenerate.
141 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
143 * win32-low.c: Rename typedef thread_info to
144 win32_thread_info throughout.
146 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
148 * win32-i386-low.c: Rename to ...
149 * win32-low.c: ... this.
150 * configure.srv: Replace win32-i386-low.o with win32-low.o.
151 * Makefile.in: Likewise.
153 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
155 * remote-utils.c (monitor_output): Constify msg parameter.
156 * server.h (monitor_output): Likewise.
157 * win32-i386-low.c (handle_output_debug_string): New.
158 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
159 handle_output_debug_string.
160 (get_child_debug_event): Likewise.
162 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
164 * server.c (main): Correct strtoul check.
166 2007-03-27 Jon Ringle <jon@ringle.org>
168 * linux-low.c: Check __ARCH_HAS_MMU__ also.
170 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
172 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
174 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
176 * terminal.h: Check HAVE_SGTTY_H.
178 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
180 * remote-utils.c (remote_open): Print out the assigned port number.
182 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
184 * remote-utils.c (monitor_output): New function.
185 * server.c (debug_threads): Define here.
186 (monitor_show_help): New function.
187 (handle_query): Handle qRcmd.
188 (main): Do not handle 'd' packet.
189 * server.h (debug_threads, remote_debug, monitor_output): Declare.
190 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
193 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
195 * Makefile.in (EXEEXT): New.
196 (clean): Use $(EXEEXT).
198 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
200 * target.h (target_ops): Rename send_signal to request_interrupt,
201 and remove enum target_signal parameter.
202 * linux-low.c (linux_request_interrupt): Rename from
203 linux_send_signal, and always send SIGINT.
204 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
205 and always send SIGINT.
206 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
208 (input_interrupt): Likewise.
210 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
212 * server.c (get_features_xml): Check if target implemented
214 * win32-i386-low.c (win32_arch_string): New.
215 (win32_target_ops): Add win32_arch_string as arch_string member.
217 2007-02-22 Markus Deuling <deuling@de.ibm.com>
219 * spu-low.c (spu_arch_string): New.
220 (spu_target_ops): Add spu_arch_string.
222 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
224 * remote-utils.c: Remove HAVE_TERMINAL_H check.
225 * configure.ac: Do not check for terminal.h.
226 * configure, config.in: Regenerated.
228 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
230 * Makefile.in (OBS): Add $(XML_BUILTIN).
231 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
233 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
234 (arm-with-iwmmxt.c): New.
235 * config.in, configure: Regenerate.
236 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
237 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
238 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
239 (arm*-*-linux*): Add iWMMXt and regset support.
240 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
241 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
242 (arm_store_wmmxregset, target_regsets): New.
243 * server.c (get_features_xml): Take annex argument. Check builtin
245 (handle_query): Handle multiple annexes.
247 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
249 * remote-utils.c [USE_WIN32API] (read, write): Define.
250 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
253 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
255 * linux-i386-low.c (the_low_target): Set arch_string.
256 * linux-x86-64-low.c (the_low_target): Likewise.
257 * linux-low.c (linux_arch_string): New.
258 (linux_target_ops): Add it.
259 * linux-low.h (struct linux_target_ops): Add arch_string.
260 * server.c (write_qxfer_response): Use const void * for DATA.
261 (get_features_xml): New.
262 (handle_query): Handle qXfer:features:read. Report it for qSupported.
263 * target.h (struct target_ops): Add arch_string method.
265 2007-01-03 Denis Pilat <denis.pilat@st.com>
266 Daniel Jacobowitz <dan@codesourcery.com>
268 * linux-low.c (linux_kill): Handle being called with no threads.
269 * win32-i386-low.c (win32_kill): Likewise.
270 (get_child_debug_event): Clear current_process_handle.
272 2006-12-30 Denis PILAT <denis.pilat@st.com>
273 Daniel Jacobowitz <dan@codesourcery.com>
275 * remote-utils.c (remote_open): Check the type of specified
276 serial port devices before opening them.
277 * server.c (main): Kill the inferior if an error occurs during
278 the first remote_open.
280 2006-12-05 Markus Deuling <deuling@de.ibm.com>
282 * README: Update supported targets.
284 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
286 * Makefile.in (clean): Remove reg-mips64.c.
287 (reg-mips64.c, reg-mips64.o): New rules.
288 * configure.srv: Handle mips64. Include regset support for mips.
289 * linux-mips-low.c (union mips_register): New.
290 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
291 (mips_breakpoint, mips_breakpoint_at): Use int.
292 (mips_collect_register, mips_supply_register)
293 (mips_collect_register_32bit, mips_supply_register_32bit)
294 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
295 (mips_store_fpregset, target_regsets): New.
296 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
298 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
300 * configure.srv: Add target "spu*-*-*".
301 * Makefile.in (clean): Remove reg-spu.c.
302 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
303 * spu-low.c: New file.
305 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
307 * configure.ac: Correct td_thr_tls_get_addr test.
308 * configure: Regenerated.
310 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
312 * linux-low.c (linux_wait_for_event): Reformat. Use the
314 * remote-utils.c (decode_address_to_semicolon): New.
315 * server.c (pass_signals, handle_general_set): New.
316 (handle_query): Mention QPassSignals for qSupported.
317 (main): Call handle_general_set.
318 * server.h (pass_signals, decode_address_to_semicolon): New.
320 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
322 * server.c (handle_query): Correct error handling for read_auxv.
324 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
326 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
327 and srv_linux_thread_db to yes.
328 * linux-s390-low.c (s390_fill_gregset): New function.
329 (target_regsets): Define data structure.
331 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
333 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
334 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
335 * config.in, configure: Regenerated.
336 * inferiors.c (gdb_id_to_thread): New function.
337 (gdb_id_to_thread_id): Use it.
338 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
339 * linux-low.h (struct process_info): Add th member.
340 (thread_db_get_tls_address): New prototype.
341 * remote-utils.c (decode_address): Make non-static.
342 * server.c (handle_query): Handle qGetTLSAddr.
343 * server.h (gdb_id_to_thread, decode_address): New prototypes.
344 * target.h (struct target_ops): Add get_tls_address.
345 * thread-db.c (maybe_attach_thread): Save the thread handle.
346 (thread_db_get_tls_address): New.
348 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
350 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
351 (linux_resume_one_process): Take a siginfo_t *. Update all
352 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
353 (struct pending_signals): Add a siginfo_t.
354 (linux_wait_for_process): Always set last_status.
355 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
356 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
357 * linux-low.h (struct process_info): Add last_status.
359 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
361 * remote-utils.c (try_rle): New function.
362 (putpkt_binary): Use it.
364 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
366 * Makefile.in (clean): Clean reg-x86-64-linux.c.
367 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
368 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
369 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
370 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
373 2006-08-08 Richard Sandiford <richard@codesourcery.com>
375 * server.c (terminal_fd): New variable.
376 (old_foreground_pgrp): Likewise.
377 (restore_old_foreground_pgrp): New function.
378 (start_inferior): Record the terminal file descriptor in terminal_fd
379 and its original foreground group in old_foreground_pgrp. Register
380 restore_old_foreground_pgrp with atexit().
382 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
384 * server.c (handle_query): Correct qPart to qXfer.
386 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
388 * configure.ac: Check for more headers which are missing on
389 Windows. Automatically supply -lwsock32 and USE_WIN32API.
390 * configure.srv: Add Cygwin and mingw32.
391 * remote-utils.c: Don't include headers unconditionally which
392 are missing on mingw32. Include <winsock.h> for mingw32.
393 (remote_open): Adjust for mingw32 support. Flush
394 standard error after writing to it.
395 (remote_close, putpkt_binary, input_interrupt, block_async_io)
396 (unblock_async_io, enable_async_io, disable_async_io)
397 (readchar, getpkt): Update for Winsock support.
398 (prepare_resume_reply): Expect a protocol signal number.
399 * server.c: Disable <sys/wait.h> on mingw32.
400 (start_inferior): Adjust for mingw32 support. Flush
401 standard error after writing to it.
402 (attach_inferior): Likewise. Use protocol signal
404 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
406 * win32-i386-low.c: New file.
407 * Makefile.in (XM_CLIBS): Set.
408 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
409 (win32-i386-low.o): New dependency rule.
410 * linux-low.c (linux_wait): Use target signal numbers.
411 * target.h (struct target_ops): Doc fix.
412 * server.h (target_signal_to_name): New prototype.
413 * gdbreplay.c: Don't include headers unconditionally which
414 are missing on mingw32. Include <winsock.h> for mingw32.
415 (remote_close, remote_open): Adjust for Winsock support.
416 * configure, config.in: Regenerated.
418 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
420 * server.c (decode_xfer_read, write_qxfer_response): New.
421 (handle_query): Take a packet length argument. Handle
422 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
423 the qSupported response.
424 (main): Update call to handle_query.
426 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
428 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
429 (putpkt_binary): Renamed from putpkt and adjusted for binary
431 (putpkt): New wrapper for putpkt_binary.
432 (readchar): Don't mask off the high bit.
433 (decode_X_packet): New function.
434 * server.c (main): Call putpkt_binary if a handler sets the packet
435 length. Save the length of the incoming packet. Handle 'X'.
436 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
438 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
440 * server.c (handle_query): Handle qSupported.
442 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
444 * remote-utils.c (all_symbols_looked_up): New variable.
445 (look_up_one_symbol): Check it.
446 * server.h (look_up_one_symbol): New declaration.
447 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
449 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
451 * Makefile.in (linux-arm-low.o): Update dependencies.
452 * linux-arm-low.c: Include "gdb_proc_service.h".
453 (PTRACE_GET_THREAD_AREA): Define.
454 (ps_get_thread_area): New function.
456 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
458 * configure.srv (m68k*-*-uclinux*): New target.
459 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
460 (linux_resume_one_process): Remove extraneous cast.
461 (linux_read_offsets): New.
462 (linux_target_op): Add linux_read_offsets on mmuless systems.
463 * server.c (handle_query): Add qOffsets logic.
464 * target.h (struct target_ops): Add read_offsets.
466 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
468 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
469 (PTRACE_GET_THREAD_AREA): Define.
470 (ps_get_thread_area): New function.
471 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
472 (linux-x86-64-low.o): Update.
474 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
476 * configure.ac: Remove checks for prfpregset_t.
477 * gdb_proc_service.h: New file.
478 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
479 new "gdb_proc_service.h".
480 * proc-service.c: Likewise.
481 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
482 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
483 * Makefile.in (gdb_proc_service_h): Updated.
484 * configure, config.in: Regenerated.
486 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
488 * remote-utils.c (prepare_resume_reply): Move declaration
489 of gdb_id_from_wait to the top of the block.
491 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
493 * linux-low.c (regsets_store_inferior_registers): Read the regset
494 from the target before filling it.
496 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
498 * server.c (attach_inferior): Return SIGTRAP for a successful
501 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
503 * Makefile.in (OBS): Add version.o.
504 (STAGESTUFF): Delete.
505 (version.o): Add dependencies.
506 (version.c): Replace rule.
507 (clean): Remove version.c.
508 * server.c (gdbserver_version): New.
509 (gdbserver_usage): Use printf.
510 (main): Handle --version and --help.
511 * server.h (version, host_name): Add declarations.
513 2005-12-23 Eli Zaretskii <eliz@gnu.org>
525 * linux-x86-64-low.c:
537 * linux-crisv32-low.c:
549 * gdbserver.1: Add (C) after Copyright. Update the FSF
552 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
554 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
555 (arm_breakpoint_at): Recognize both breakpoints.
556 (the_low_target): Use the correct breakpoint instruction.
558 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
560 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
561 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
562 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
563 (the_low_target): Update.
565 2005-10-25 Andreas Schwab <schwab@suse.de>
567 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
569 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
570 (ia64_num_regs): Reduce to 462.
572 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
574 * acinclude.m4: Correct quoting.
575 * aclocal.m4: Regenerated.
577 Suggested by SZOKOVACS Robert <szo@ies.hu>:
578 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
579 (thread_db_init): Call thread_db_err_str.
580 * configure.ac: Check for TD_VERSION.
581 * config.in, configure: Regenerated.
583 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
585 * server.h (error, fatal, warning): Add ATTR_FORMAT.
587 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
589 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
590 is not available. Define HAVE_PTRACE_GETREGS if it is.
591 * config.in, configure: Regenerated.
592 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
593 * linux-i386-low.c, linux-m68k-low.c: Update to use
595 * linux-low.c (regsets_fetch_inferior_registers)
596 (regsets_store_inferior_registers): Only return 0 if we processed
598 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
599 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
601 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
603 * inferiors.c (struct thread_info): Add gdb_id.
604 (add_thread): Add gdb_id argument.
605 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
606 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
608 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
609 * server.c (handle_query): Use thread_to_gdb_id.
610 (handle_v_cont, main): Use gdb_id_to_thread_id.
611 * server.h (add_thread): Update prototype.
612 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
615 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
617 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
618 left-padded registers.
619 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
620 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
622 2005-07-01 Steve Ellcey <sje@cup.hp.com>
624 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
625 * configure: Regenerate.
626 * config.in: Regenerate.
627 * server.h (NEED_DECLARATION_STRERROR):
628 Replace with !HAVE_DECL_STRERROR.
630 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
632 * linux-low.c (linux_wait, linux_send_signal): Don't test
633 an unsigned long variable for > 0 if it could be MAX_ULONG.
634 * server.c (myresume): Likewise.
635 * target.c (set_desired_inferior): Likewise.
637 2005-06-13 Mark Kettenis <kettenis@gnu.org>
639 * configure.ac: Simplify and improve check for socklen_t.
640 * configure, config.in: Regenerate.
642 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
644 * acconfig.h: Remove.
645 * configure.ac: Add a test for socklen_t. Use three-argument
646 AC_DEFINE throughout.
647 * config.in: Regenerated using autoheader 2.59.
648 * configure: Regenerated.
650 * gdbreplay.c (socklen_t): Provide a default.
651 (remote_open): Use socklen_t.
652 * remote-utils.c (socklen_t): Provide a default.
653 (remote_open): Use socklen_t.
654 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
657 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
659 * linux-low.c (linux_read_memory, linux_write_memory)
660 (linux_read_auxv): Likewise.
661 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
662 (check_mem_write): Likewise.
663 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
665 * regcache.c (struct inferior_rgcache_data, registers_to_string)
666 (registers_from_string, register_data): Likewise.
667 * server.c (handle_query, main): Likewise.
668 * server.h (convert_ascii_to_int, convert_int_to_ascii)
669 (decode_M_packet): Likewise.
670 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
671 * target.h (struct target_ops): Update read_memory, write_memory,
673 (read_inferior_memory, write_inferior_memory): Update.
674 * linux-low.h (struct linux_target_ops): Change type of breakpoint
676 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
677 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
678 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
679 linux-s390-low.c, linux-sh-low.c: Update for changes in
680 read_inferior_memory and the_low_target->breakpoint.
682 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
684 * Makefile.in (SFILES): Add linux-ppc64-low.c.
685 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
686 * configure.srv: Add powerpc64-*-linux*.
687 * linux-ppc64-low.c: New file.
689 2005-05-23 Orjan Friberg <orjanf@axis.com>
691 * linux-cris-low.c: New file with support for CRIS.
692 * linux-crisv32-low.c: Ditto for CRISv32.
693 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
694 (clean): Add reg-cris.c and reg-crisv32.c.
695 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
696 reg-crisv32.o, and reg-crisv32.c to make rules.
697 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
700 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
702 * linux-low.c (fetch_register): Ensure buffer size is a multiple
703 of sizeof (PTRACE_XFER_TYPE).
704 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
706 2005-05-12 Orjan Friberg <orjanf@axis.com>
708 * target.h (struct target_ops): Add insert_watchpoint,
709 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
710 pointers for hardware watchpoint support.
711 * linux-low.h (struct linux_target_ops): Ditto.
712 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
713 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
715 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
717 * server.c (main): Recognize 'Z' and 'z' packets.
719 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
721 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
722 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
723 (the_low_target): Add new members.
725 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
727 * proc-service.c (ps_lgetregs): Search all_processes instead of
730 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
732 * server.c (start_inferior): Change return type to int.
733 (attach_inferior): Change sigptr to int *.
734 (handle_v_cont, handle_v_requests): Change signal to int *.
735 (main): Change signal to int.
737 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
739 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
740 * configure.srv: Add m32r*-*-linux*.
741 * linux-m32r-low.c: New file.
743 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
745 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
747 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
749 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
750 Take unsigned long arguments for PIDs.
751 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
752 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
753 (wait_for_sigstop, linux_resume_one_process)
754 (regsets_fetch_inferior_registers, linux_send_signal)
755 (linux_read_auxv): Likewise. Update the types of variables holding
756 PIDs. Update format string specifiers.
757 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
758 * remote-utils.c (prepare_resume_reply): Likewise.
759 * server.c (cont_thread, general_thread, step_thread)
760 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
762 (handle_query): Update format specifiers.
763 (handle_v_cont, main): Use strtoul for thread IDs.
764 * server.h (struct inferior_list_entry): Use unsigned long for ID.
765 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
766 (general_thread, step_thread, thread_from_wait)
767 (old_thread_from_wait): Update.
768 * target.h (struct thread_resume): Use unsigned long for THREAD.
769 (struct target_ops): Use unsigned long for arguments to attach and
772 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
774 * acinclude.m4: Include bfd/bfd.m4 directly.
775 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
776 <agriffis@toolchain.org>.
777 * aclocal.m4, configure: Regenerated.
779 2005-01-07 Andrew Cagney <cagney@gnu.org>
781 * configure.ac: Rename configure.in, require autoconf 2.59.
782 * configure: Re-generate.
784 2004-12-08 Daniel Jacobowitz <dan@debian.org>
786 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
788 * aclocal.m4: Regenerated.
789 * configure: Regenerated.
791 2004-11-21 Andreas Schwab <schwab@suse.de>
793 * linux-m68k-low.c (m68k_num_gregs): Define.
794 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
795 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
796 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
797 (m68k_breakpoint_at): New. Add to the_low_target.
799 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
800 srv_linux_thread_db to yes.
802 2004-10-20 Joel Brobecker <brobecker@gnat.com>
804 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
805 (ARCH_SET_FS): Likewise.
806 (ARCH_GET_FS): Likewise.
807 (ARCH_GET_GS): Likewise.
809 2004-10-16 Daniel Jacobowitz <dan@debian.org>
811 * linux-i386-low.c (ps_get_thread_area): New.
812 * linux-x86-64-low.c (ps_get_thread_area): New.
813 * linux-low.c: Include <sys/syscall.h>.
814 (linux_kill_one_process): Don't kill the first thread here.
815 (linux_kill): Kill the first thread here.
816 (kill_lwp): New function.
817 (send_sigstop, linux_send_signal): Use it.
818 * proc-service.c: Clean up #ifdefs.
819 (fpregset_info): Delete.
820 (ps_lgetregs): Update and enable implementation.
821 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
823 * remote-utils.c (struct sym_cache, symbol_cache): New.
824 (input_interrupt): Print a clearer message.
825 (async_io_enabled): New variable.
826 (enable_async_io, disable_async_io): Use it. Update comments.
827 (look_up_one_symbol): Use the symbol cache.
828 * thread-db.c (thread_db_look_up_symbols): New function.
829 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
831 2004-10-16 Daniel Jacobowitz <dan@debian.org>
833 * configure.in: Test for -rdynamic.
834 * configure: Regenerated.
835 * Makefile (INTERNAL_LDFLAGS): New.
836 (gdbserver, gdbreplay): Use it.
838 2004-09-02 Andrew Cagney <cagney@gnu.org>
840 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
842 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
844 * linux-low.c (linux_wait): Clear all_processes list also.
846 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
848 * linux-low.c: Include <errno.h>. Remove extern declaration of
851 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
853 * gdbreplay.c, server.h, utils.c: Update copyright years.
855 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
857 * server.c (main): Print child status or termination signal from
858 variable 'signal', not 'sig'.
860 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
862 * linux-low.c (linux_read_memory): Change return type to
863 int. Check for and return error from ptrace().
864 * target.c (read_inferior_memory): Change return type to int. Pass
865 back return status from the_target->read_memory().
866 * target.h (struct target_ops): Adapt *read_memory() prototype.
868 (read_inferior_memory): Adapt prototype.
869 * server.c (main): Return an error packet if
870 read_inferior_memory() returns an error.
872 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
874 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
875 Unify with other clean targets.
877 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
879 * server.c (handle_v_cont): Call set_desired_inferior.
881 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
883 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
885 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
887 * linux-low.c (linux_wait): Unblock async I/O.
888 (linux_resume): Block and enable async I/O.
889 * remote-utils.c (block_async_io, unblock_async_io): New functions.
890 * server.h (block_async_io, unblock_async_io): Add prototypes.
892 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
894 * remote-utils.c (remote_open): Print a status notice after
896 * server.c (attach_inferior): Print a status notice after
899 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
901 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
903 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
905 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
907 * server.c, target.h: Update copyright years.
909 2004-02-25 Roland McGrath <roland@redhat.com>
911 * target.h (struct target_ops): New member `read_auxv'.
912 * server.c (handle_query): Handle qPart:auxv:read: query using that.
913 * linux-low.c (linux_read_auxv): New function.
914 (linux_target_ops): Initialize `read_auxv' member to that.
916 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
918 Committed by Jim Blandy <jimb@redhat.com>.
920 * linux-s390-low.c (s390_num_regs): Update.
921 (s390_regmap): Remove control registers. Use __s390x__ predefine
922 instead of GPR_SIZE to distiguish s390 and s390x targets.
924 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
926 * linux-low.c: Update copyright year.
927 (check_removed_breakpoint): Clear pending_is_breakpoint.
928 (linux_set_resume_request, linux_queue_one_thread)
929 (resume_status_pending_p): New functions.
930 (linux_continue_one_thread): Use process->resume.
931 (linux_resume): Only resume threads if there are no pending events.
932 * linux-low.h (struct process_info): Add resume request
935 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
937 * regcache.c (new_register_cache): Clear the allocated register
938 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
940 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
942 * linux-low.c (linux_resume): Take a struct thread_resume *
944 (linux_wait): Update call.
945 (resume_ptr): New static variable.
946 (linux_continue_one_thread): Renamed from
947 linux_continue_one_process. Use resume_ptr.
948 (linux_resume): Use linux_continue_one_thread.
949 * server.c (handle_v_cont, handle_v_requests): New functions.
950 (myresume): New function.
951 (main): Handle 'v' case.
952 * target.h (struct thread_resume): New type.
953 (struct target_ops): Change argument of "resume" to struct
955 (myresume): Delete macro.
957 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
959 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
960 (uninstall): Support DESTDIR.
962 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
964 * configure.srv: Add xscale*linux copy of arm*linux entry.
966 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
968 * linux-arm-low.c (arm_reinsert_addr): New function.
969 (the_low_target): Add arm_reinsert_addr.
971 2003-07-08 Mark Kettenis <kettenis@gnu.org>
973 * mem-break.c: Remove whitespace at end of file.
975 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
977 * configure.in: Check whether we need to prototype strerror.
978 * server.h: Optionally prototype strerror.
979 * gdbreplay.c (perror_with_name): Use strerror.
980 * linux-low.c (linux_attach_lwp): Use strerror.
981 * utils.c (perror_with_name): Use strerror.
982 * config.in, configure: Regenerated.
984 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
986 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
987 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
989 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
991 * Makefile.in (SFILES): Update.
992 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
993 low-sun3.c: Remove files.
995 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
997 * linux-low.c: Move comment to linux_thread_alive where it belonged.
998 (linux_detach_one_process, linux_detach): New functions.
999 (linux_target_ops): Add linux_detach.
1000 * server.c (main): Handle 'D' packet.
1001 * target.h (struct target_ops): Add "detach" member.
1002 (detach_inferior): Define.
1004 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1006 From Kelley Cook <kelleycook@wideopenwest.com>:
1007 * configure.srv: Accept i[34567]86 variants.
1009 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1011 * linux-low.c (linux_wait_for_event): Correct comment typos.
1012 (linux_resume_one_process): Call check_removed_breakpoint.
1013 (linux_send_signal): New function.
1014 (linux_target_ops): Add linux_send_signal.
1015 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1017 * target.h (struct target_ops): Add send_signal.
1019 2003-05-29 Jim Blandy <jimb@redhat.com>
1021 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1022 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1023 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1024 away part of the register's value.
1026 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1028 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1029 (linux_wait_for_event, linux_init_signals): Likewise.
1031 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1033 * configure.in: Check for stdlib.h.
1034 * configure: Regenerated.
1035 * config.in: Regenerated.
1037 2003-01-04 Andreas Schwab <schwab@suse.de>
1039 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1041 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1043 * Makefile.in: Remove obsolete code.
1045 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1047 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1048 defined(PT_FPR0_HI).
1050 2002-11-17 Stuart Hughes <seh@zee2.com>
1052 * linux-arm-low.c (arm_num_regs): Increase.
1053 (arm_regmap): Include status register.
1055 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1057 * linux-low.c (register_addr): Remove incorrect -1 check.
1059 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1061 * linux-low.c (linux_create_inferior): Call setpgid. Return
1063 (unstopped_p, linux_signal_pid): Remove.
1064 (linux_target_ops): Remove linux_signal_pid.
1065 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1066 global instead of target method.
1067 * target.h (struct target_ops): Remove signal_pid. Update comment
1068 for create_inferior.
1069 * server.c (signal_pid): New variable.
1070 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1071 gdbserver. Set the child to be the foreground process group.
1072 (attach_inferior): Set signal_pid.
1074 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1076 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1078 2002-08-20 Jim Blandy <jimb@redhat.com>
1080 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1083 2002-08-01 Andrew Cagney <cagney@redhat.com>
1085 * Makefile.in: Make chill references obsolete.
1087 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1089 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1090 * configure: Regenerate.
1091 * config.in: Regenerate.
1093 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1095 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1096 (perror_with_name, remote_close, remote_open, expect, play): Static.
1098 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1100 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1101 byte offsets instead of an array of indexes.
1102 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1104 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1106 * regcache.c: Add comment.
1108 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1110 * thread-db.c: New file.
1111 * proc-service.c: New file.
1112 * acinclude.m4: New file.
1113 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1114 proc-service.o, and thread-db.o.
1115 (linux-low.o): Add USE_THREAD_DB.
1116 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1117 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1118 * aclocal.m4: Regenerated.
1119 * config.in: Regenerated.
1120 * configure: Regenerated.
1121 * configure.in: Check for proc_service.h, sys/procfs.h,
1122 thread_db.h, and linux/elf.h headrs.
1123 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1124 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1125 Check for -lthread_db and thread support.
1126 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1127 PowerPC, and SuperH.
1128 * i387-fp.c: Constify arguments.
1129 * i387-fp.h: Likewise.
1130 * inferiors.c: (struct thread_info): Renamed from
1131 `struct inferior_info'. Remove PID member. Use generic inferior
1132 list header. All uses updated.
1133 (inferiors, signal_pid): Removed.
1134 (all_threads): New variable.
1135 (get_thread): Define.
1136 (add_inferior_to_list): New function.
1137 (for_each_inferior): New function.
1138 (change_inferior_id): New function.
1139 (add_inferior): Removed.
1140 (remove_inferior): New function.
1141 (add_thread): New function.
1142 (free_one_thread): New function.
1143 (remove_thread): New function.
1144 (clear_inferiors): Use for_each_inferior and free_one_thread.
1145 (find_inferior): New function.
1146 (find_inferior_id): New function.
1147 (inferior_target_data): Update argument type.
1148 (set_inferior_target_data): Likewise.
1149 (inferior_regcache_data): Likewise.
1150 (set_inferior_regcache_data): Likewise.
1151 * linux-low.c (linux_bp_reinsert): Remove.
1152 (all_processes, stopping_threads, using_thrads)
1153 (struct pending_signals, debug_threads, pid_of): New.
1154 (inferior_pid): Replace with macro.
1155 (struct inferior_linux_data): Remove.
1156 (get_stop_pc, add_process): New functions.
1157 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1158 Use add_process and add_thread.
1159 (linux_attach_lwp): New function, based on old linux_attach. Use
1160 add_process and add_thread. Set stop_expected for new threads.
1161 (linux_attach): New function.
1162 (linux_kill_one_process): New function.
1163 (linux_kill): Kill all LWPs.
1164 (linux_thread_alive): Use find_inferior_id.
1165 (check_removed_breakpoints, status_pending_p): New functions.
1166 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1167 Update. Use WNOHANG. Wait for cloned processes also. Update process
1168 struct for the found process.
1169 (linux_wait_for_event): New function.
1170 (linux_wait): Use it. Support LWPs.
1171 (send_sigstop, wait_for_sigstop, stop_all_processes)
1172 (linux_resume_one_process, linux_continue_one_process): New functions.
1173 (linux_resume): Support LWPs.
1174 (REGISTER_RAW_SIZE): Remove.
1175 (fetch_register): Use register_size instead. Call supply_register.
1176 (usr_store_inferior_registers): Likewise. Call collect_register.
1178 (regsets_fetch_inferior_registers): Improve error message.
1179 (regsets_store_inferior_registers): Add debugging.
1180 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1181 (unstopped_p, linux_signal_pid): New functions.
1182 (linux_target_ops): Add linux_signal_pid.
1183 (linux_init_signals): New function.
1184 (initialize_low): Call it. Initialize using_threads.
1185 * regcache.c (inferior_regcache_data): Add valid
1187 (get_regcache): Fetch registers lazily. Add fetch argument
1188 and update all callers.
1189 (regcache_invalidate_one, regcache_invalidate): New
1191 (new_register_cache): Renamed from create_register_cache.
1192 Return the new regcache.
1193 (free_register_cache): Change argument to a void *.
1194 (registers_to_string, registers_from_string): Call get_regcache
1195 with fetch flag set.
1196 (register_data): Make static. Pass fetch flag to get_regcache.
1197 (supply_register): Call get_regcache with fetch flag clear.
1198 (collect_register): Call get_regcache with fetch flag set.
1199 (collect_register_as_string): New function.
1200 * regcache.h: Update.
1201 * remote-utils.c (putpkt): Flush after debug output and use
1203 Handle input interrupts while waiting for an ACK.
1204 (input_interrupt): Use signal_pid method.
1205 (getpkt): Flush after debug output and use stderr.
1206 (outreg): Use collect_register_as_string.
1207 (new_thread_notify, dead_thread_notify): New functions.
1208 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1210 (look_up_one_symbol): Flush after debug output.
1211 * server.c (step_thread, server_waiting): New variables.
1212 (start_inferior): Don't use signal_pid. Update call to mywait.
1213 (attach_inferior): Update call to mywait.
1214 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1215 (main): Don't fetch/store registers explicitly. Use
1216 set_desired_inferior. Support proposed ``Hs'' packet. Update
1219 (struct inferior_list, struct_inferior_list_entry): New.
1220 * target.c (set_desired_inferior): New.
1221 (write_inferior_memory): Constify.
1222 (mywait): New function.
1224 (struct target_ops): New signal_pid method.
1225 (mywait): Removed macro, added prototype.
1227 * linux-low.h (regset_func): Removed.
1228 (regset_fill_func, regset_store_func): New.
1229 (enum regset_type): New.
1230 (struct regset_info): Add type field. Use new operation types.
1231 (struct linux_target_ops): stop_pc renamed to get_pc.
1232 Add decr_pc_after_break and breakpoint_at.
1233 (get_process, get_thread_proess, get_process_thread)
1234 (strut process_info, all_processes, linux_attach_lwp)
1235 (thread_db_init): New.
1237 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1238 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1239 (the_low_target): Add new members.
1240 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1241 (i386_store_fpxregset): Constify.
1242 (target_regsets): Add new kind identifier.
1243 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1244 (i386_set_pc): Add debugging.
1245 (i386_breakpoint_at): New function.
1246 (the_low_target): Add new members.
1247 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1248 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1249 (mips_breakpoint_at): New.
1250 (the_low_target): Add new members.
1251 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1252 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1253 (the_low_target): Add new members.
1254 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1255 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1256 (the_low_target): Add new members.
1257 * linux-x86-64-low.c (target_regsets): Add new kind
1260 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1262 From Martin Pool <mbp@samba.org>:
1263 * server.c (gdbserver_usage): New function.
1266 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1268 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1271 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1273 * Makefile.in: Remove obsolete code.
1275 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1277 * linux-low.c (regsets_fetch_inferior_registers),
1278 (regsets_store_inferior_registers): Removed cast to int from
1280 * regcache.h: Added declaration of struct inferior_info.
1282 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1284 * inferiors.c (struct inferior_info): Add regcache_data.
1285 (add_inferior): Call create_register_cache.
1286 (clear_inferiors): Call free_register_cache.
1287 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1288 * regcache.c (struct inferior_regcache_data): New.
1289 (registers): Remove.
1290 (get_regcache): New function.
1291 (create_register_cache, free_register_cache): New functions.
1292 (set_register_cache): Don't initialize the register cache here.
1293 (registers_to_string, registers_from_string, register_data): Call
1295 * regcache.h: Add prototypes.
1296 * server.h: Likewise.
1298 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1300 * mem-break.c: New file.
1301 * mem-break.h: New file.
1302 * Makefile.in: Add mem-break.o rule; update server.h
1304 * inferiors.c (struct inferior_info): Add target_data
1306 (clear_inferiors): Free target_data member if set.
1307 (inferior_target_data, set_inferior_target_data): New functions.
1308 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1309 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1310 * linux-low.c (linux_bp_reinsert): New variable.
1311 (struct inferior_linux_data): New.
1312 (linux_create_inferior): Use set_inferior_target_data.
1313 (linux_attach): Likewise. Call add_inferior.
1314 (linux_wait_for_one_inferior): New function.
1315 (linux_wait): Call it.
1316 (linux_write_memory): Add const.
1317 (initialize_low): Call set_breakpoint_data.
1318 * linux-low.h (struct linux_target_ops): Add breakpoint
1320 * server.c (attach_inferior): Remove extra add_inferior
1322 * server.h: Include mem-break.h. Update inferior.c
1324 * target.c (read_inferior_memory)
1325 (write_inferior_memory): New functions.
1326 * target.h (read_inferior_memory)
1327 (write_inferior_memory): Change macros to prototypes.
1328 (struct target_ops): Update comments. Add const to write_memory
1331 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1333 * linux-low.c (usr_store_inferior_registers): Support
1334 registers which are allowed to fail to store.
1335 * linux-low.h (linux_target_ops): Likewise.
1336 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1337 (ppc_cannot_store_register): FPSCR may not be storable.
1339 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1341 * server.h: Include <string.h> if HAVE_STRING_H.
1342 * ChangeLog: Correct paths in last ChangeLog entry.
1344 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1346 * linux-low.h: Remove obsolete prototypes.
1347 (struct linux_target_ops): New.
1348 (extern the_low_target): New.
1349 * linux-low.c (num_regs, regmap): Remove declarations.
1350 (register_addr): Use the_low_target explicitly.
1351 (fetch_register): Likewise.
1352 (usr_fetch_inferior_registers): Likewise.
1353 (usr_store_inferior_registers): Likewise.
1354 * linux-arm-low.c (num_regs): Remove.
1355 (arm_num_regs): Define.
1356 (arm_regmap): Renamed from regmap, made static.
1357 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1359 (arm_cannot_store_register): Renamed from cannot_store_register,
1361 (the_low_target): New.
1362 * linux-i386-low.c (num_regs): Remove.
1363 (i386_num_regs): Define.
1364 (i386_regmap): Renamed from regmap, made static.
1365 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1367 (i386_cannot_store_register): Renamed from cannot_store_register,
1369 (the_low_target): New.
1370 * linux-ia64-low.c (num_regs): Remove.
1371 (ia64_num_regs): Define.
1372 (ia64_regmap): Renamed from regmap, made static.
1373 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1375 (ia64_cannot_store_register): Renamed from cannot_store_register,
1377 (the_low_target): New.
1378 * linux-m68k-low.c (num_regs): Remove.
1379 (m68k_num_regs): Define.
1380 (m68k_regmap): Renamed from regmap, made static.
1381 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1383 (m68k_cannot_store_register): Renamed from cannot_store_register,
1385 (the_low_target): New.
1386 * linux-mips-low.c (num_regs): Remove.
1387 (mips_num_regs): Define.
1388 (mips_regmap): Renamed from regmap, made static.
1389 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1391 (mips_cannot_store_register): Renamed from cannot_store_register,
1393 (the_low_target): New.
1394 * linux-ppc-low.c (num_regs): Remove.
1395 (ppc_num_regs): Define.
1396 (ppc_regmap): Renamed from regmap, made static.
1397 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1399 (ppc_cannot_store_register): Renamed from cannot_store_register,
1401 (the_low_target): New.
1402 * linux-s390-low.c (num_regs): Remove.
1403 (s390_num_regs): Define.
1404 (s390_regmap): Renamed from regmap, made static.
1405 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1407 (s390_cannot_store_register): Renamed from cannot_store_register,
1409 (the_low_target): New.
1410 * linux-sh-low.c (num_regs): Remove.
1411 (sh_num_regs): Define.
1412 (sh_regmap): Renamed from regmap, made static.
1413 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1415 (sh_cannot_store_register): Renamed from cannot_store_register,
1417 (the_low_target): New.
1418 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1419 (the_low_target): New.
1421 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1423 * Makefile.in: Add stamp-h target.
1424 * configure.in: Create stamp-h.
1425 * configure: Regenerated.
1427 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1429 * inferiors.c: New file.
1430 * target.c: New file.
1431 * target.h: New file.
1432 * Makefile.in: Add target.o and inferiors.o. Update
1434 * linux-low.c (inferior_pid): New static variable,
1435 moved from server.c.
1436 (linux_create_inferior): Renamed from create_inferior.
1437 Call add_inferior. Return 0 on success instead of a PID.
1438 (linux_attach): Renamed from myattach.
1439 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1440 (linux_thread_alive): Renamed from mythread_alive.
1441 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1443 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1444 (regsets_store_inferior_registers): Correct error message.
1445 Add missing ``return 0''.
1446 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1447 (linux_store_registers): Renamed from store_inferior_registers.
1448 (linux_read_memory): Renamed from read_inferior_memory.
1449 (linux_write_memory): Renamed from write_inferior_memory.
1450 (linux_target_ops): New structure.
1451 (initialize_low): Call set_target_ops ().
1452 * remote-utils.c (unhexify): New function.
1453 (hexify): New function.
1454 (input_interrupt): Send signals to ``signal_pid''.
1455 * server.c (inferior_pid): Remove.
1456 (start_inferior): Update create_inferior call.
1457 (attach_inferior): Call add_inferior.
1458 (handle_query): New function.
1459 (main): Call handle_query for `q' packets.
1460 * server.h: Include "target.h". Remove obsolete prototypes.
1461 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1463 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1465 * Makefile.in: Add WARN_CFLAGS. Update configury
1467 * configure.in: Check for <string.h>
1468 * configure: Regenerate.
1469 * config.in: Regenerate.
1470 * gdbreplay.c: Include needed system headers.
1471 (remote_open): Remove strchr prototype.
1472 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1473 * regcache.c (supply_register): Change buf argument to const void *.
1474 (supply_register_by_name): Likewise.
1475 (collect_register): Change buf argument to void *.
1476 (collect_register_by_name): Likewise.
1477 * regcache.h: Add missing prototypes.
1478 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1479 * server.c (handle_query): New function.
1480 (attached): New static variable, moved out of main.
1481 (main): Quiet longjmp clobber warnings.
1482 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1483 * utils.c (error): Remove NORETURN.