1 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7 * win32-low.c: Commit leftover changes from 2007-03-29.
9 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12 fields short instead of int. Add explicit padding.
13 (i387_cache_to_fsave): Remove unnecessary casts.
14 (i387_fsave_to_cache): Doc fix.
15 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
22 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
24 * configure.srv (arm*-*-mingw32ce*): Move near the other
27 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
29 * configure.ac: Add errno checking.
30 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
31 sys/file.h and malloc.h.
32 (AC_CHECK_DECLS): Add perror.
33 (srv_mingwce): Handle.
34 * configure.srv (i[34567]86-*-cygwin*): Add
35 win32-i386-low.o to srv_tgtobj.
36 (i[34567]86-*-mingw*): Likewise.
37 (arm*-*-mingw32ce*): Add case.
38 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
39 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
40 [__MINGW32CE__] (strerror): New function.
41 [__MINGW32CE__] (errno): Define to GetLastError.
42 [__MINGW32CE__] (COUNTOF): New macro.
43 (remote_open): Remove extra close call.
44 * mem-break.c (delete_breakpoint_at): New function.
45 * mem-break.h (delete_breakpoint_at): Declare.
46 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
47 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
48 [USE_WIN32API] (read, write): Add char* casts.
49 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
50 * server.h: Include wincecompat.h on Windows CE.
51 [HAVE_ERRNO_H]: Check.
52 (perror): Declare if not declared.
53 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
54 (perror_with_name): Remove errno declaration.
58 * win32-arm-low.c: New.
59 * win32-i386-low.c: New.
60 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
61 (OUTMSG2): Make it safe.
64 (NUM_REGS): Get it from the low target.
65 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
66 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
67 (thread_rec): Let low target handle debug registers.
68 (child_add_thread): Likewise.
69 (child_init_thread_list): Likewise.
70 (continue_one_thread): Likewise.
72 (do_child_fetch_inferior_registers): Move to ...
73 * win32-i386-low.c: ... here, and rename to ...
74 (do_fetch_inferior_registers): ... this.
75 * win32-low.c (child_fetch_inferior_registers):
76 Go through the low target.
77 (do_child_store_inferior_registers): Use regptr.
78 (strwinerror): New function.
79 (win32_create_inferior): Handle Windows CE.
80 Use strwinerror instead of strerror on Windows error
81 codes. Add program to the error output.
82 Don't close the main thread handle on Windows CE.
83 (win32_attach): Use coredll.dll on Windows CE.
84 (win32_kill): Close current process and current
86 (win32_detach): Use coredll.dll on Windows CE.
87 (win32_resume): Let low target handle debug registers, and
89 (handle_exception): Add/Remove initial breakpoint. Avoid
90 non-existant WSTOPSIG on Windows CE.
91 (win32_read_inferior_memory): Cast to remove warning.
92 (win32_arch_string): Go through the low target.
93 (initialize_low): Call set_breakpoint_data with the low
95 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
96 FOP_REGNUM, mappings): Move to ...
97 * win32-i386-low.c: ... here.
98 * win32-low.c (win32_thread_info): Move to ...
99 * win32-low.h: ... here.
100 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
101 win32-arm-low.c and wincecompat.c.
103 (install-only:): Likewise.
104 (gdbserver:): Likewise.
105 (gdbreplay:): Likewise.
106 * config.in: Regenerate.
107 * configure: Regenerate.
109 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
111 * win32-low.c: Rename typedef thread_info to
112 win32_thread_info throughout.
114 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
116 * win32-i386-low.c: Rename to ...
117 * win32-low.c: ... this.
118 * configure.srv: Replace win32-i386-low.o with win32-low.o.
119 * Makefile.in: Likewise.
121 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
123 * remote-utils.c (monitor_output): Constify msg parameter.
124 * server.h (monitor_output): Likewise.
125 * win32-i386-low.c (handle_output_debug_string): New.
126 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
127 handle_output_debug_string.
128 (get_child_debug_event): Likewise.
130 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
132 * server.c (main): Correct strtoul check.
134 2007-03-27 Jon Ringle <jon@ringle.org>
136 * linux-low.c: Check __ARCH_HAS_MMU__ also.
138 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
140 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
142 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
144 * terminal.h: Check HAVE_SGTTY_H.
146 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
148 * remote-utils.c (remote_open): Print out the assigned port number.
150 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
152 * remote-utils.c (monitor_output): New function.
153 * server.c (debug_threads): Define here.
154 (monitor_show_help): New function.
155 (handle_query): Handle qRcmd.
156 (main): Do not handle 'd' packet.
157 * server.h (debug_threads, remote_debug, monitor_output): Declare.
158 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
161 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
163 * Makefile.in (EXEEXT): New.
164 (clean): Use $(EXEEXT).
166 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
168 * target.h (target_ops): Rename send_signal to request_interrupt,
169 and remove enum target_signal parameter.
170 * linux-low.c (linux_request_interrupt): Rename from
171 linux_send_signal, and always send SIGINT.
172 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
173 and always send SIGINT.
174 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
176 (input_interrupt): Likewise.
178 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
180 * server.c (get_features_xml): Check if target implemented
182 * win32-i386-low.c (win32_arch_string): New.
183 (win32_target_ops): Add win32_arch_string as arch_string member.
185 2007-02-22 Markus Deuling <deuling@de.ibm.com>
187 * spu-low.c (spu_arch_string): New.
188 (spu_target_ops): Add spu_arch_string.
190 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
192 * remote-utils.c: Remove HAVE_TERMINAL_H check.
193 * configure.ac: Do not check for terminal.h.
194 * configure, config.in: Regenerated.
196 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
198 * Makefile.in (OBS): Add $(XML_BUILTIN).
199 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
201 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
202 (arm-with-iwmmxt.c): New.
203 * config.in, configure: Regenerate.
204 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
205 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
206 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
207 (arm*-*-linux*): Add iWMMXt and regset support.
208 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
209 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
210 (arm_store_wmmxregset, target_regsets): New.
211 * server.c (get_features_xml): Take annex argument. Check builtin
213 (handle_query): Handle multiple annexes.
215 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
217 * remote-utils.c [USE_WIN32API] (read, write): Define.
218 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
221 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
223 * linux-i386-low.c (the_low_target): Set arch_string.
224 * linux-x86-64-low.c (the_low_target): Likewise.
225 * linux-low.c (linux_arch_string): New.
226 (linux_target_ops): Add it.
227 * linux-low.h (struct linux_target_ops): Add arch_string.
228 * server.c (write_qxfer_response): Use const void * for DATA.
229 (get_features_xml): New.
230 (handle_query): Handle qXfer:features:read. Report it for qSupported.
231 * target.h (struct target_ops): Add arch_string method.
233 2007-01-03 Denis Pilat <denis.pilat@st.com>
234 Daniel Jacobowitz <dan@codesourcery.com>
236 * linux-low.c (linux_kill): Handle being called with no threads.
237 * win32-i386-low.c (win32_kill): Likewise.
238 (get_child_debug_event): Clear current_process_handle.
240 2006-12-30 Denis PILAT <denis.pilat@st.com>
241 Daniel Jacobowitz <dan@codesourcery.com>
243 * remote-utils.c (remote_open): Check the type of specified
244 serial port devices before opening them.
245 * server.c (main): Kill the inferior if an error occurs during
246 the first remote_open.
248 2006-12-05 Markus Deuling <deuling@de.ibm.com>
250 * README: Update supported targets.
252 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
254 * Makefile.in (clean): Remove reg-mips64.c.
255 (reg-mips64.c, reg-mips64.o): New rules.
256 * configure.srv: Handle mips64. Include regset support for mips.
257 * linux-mips-low.c (union mips_register): New.
258 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
259 (mips_breakpoint, mips_breakpoint_at): Use int.
260 (mips_collect_register, mips_supply_register)
261 (mips_collect_register_32bit, mips_supply_register_32bit)
262 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
263 (mips_store_fpregset, target_regsets): New.
264 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
266 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
268 * configure.srv: Add target "spu*-*-*".
269 * Makefile.in (clean): Remove reg-spu.c.
270 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
271 * spu-low.c: New file.
273 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
275 * configure.ac: Correct td_thr_tls_get_addr test.
276 * configure: Regenerated.
278 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
280 * linux-low.c (linux_wait_for_event): Reformat. Use the
282 * remote-utils.c (decode_address_to_semicolon): New.
283 * server.c (pass_signals, handle_general_set): New.
284 (handle_query): Mention QPassSignals for qSupported.
285 (main): Call handle_general_set.
286 * server.h (pass_signals, decode_address_to_semicolon): New.
288 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
290 * server.c (handle_query): Correct error handling for read_auxv.
292 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
294 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
295 and srv_linux_thread_db to yes.
296 * linux-s390-low.c (s390_fill_gregset): New function.
297 (target_regsets): Define data structure.
299 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
301 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
302 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
303 * config.in, configure: Regenerated.
304 * inferiors.c (gdb_id_to_thread): New function.
305 (gdb_id_to_thread_id): Use it.
306 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
307 * linux-low.h (struct process_info): Add th member.
308 (thread_db_get_tls_address): New prototype.
309 * remote-utils.c (decode_address): Make non-static.
310 * server.c (handle_query): Handle qGetTLSAddr.
311 * server.h (gdb_id_to_thread, decode_address): New prototypes.
312 * target.h (struct target_ops): Add get_tls_address.
313 * thread-db.c (maybe_attach_thread): Save the thread handle.
314 (thread_db_get_tls_address): New.
316 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
318 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
319 (linux_resume_one_process): Take a siginfo_t *. Update all
320 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
321 (struct pending_signals): Add a siginfo_t.
322 (linux_wait_for_process): Always set last_status.
323 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
324 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
325 * linux-low.h (struct process_info): Add last_status.
327 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
329 * remote-utils.c (try_rle): New function.
330 (putpkt_binary): Use it.
332 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
334 * Makefile.in (clean): Clean reg-x86-64-linux.c.
335 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
336 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
337 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
338 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
341 2006-08-08 Richard Sandiford <richard@codesourcery.com>
343 * server.c (terminal_fd): New variable.
344 (old_foreground_pgrp): Likewise.
345 (restore_old_foreground_pgrp): New function.
346 (start_inferior): Record the terminal file descriptor in terminal_fd
347 and its original foreground group in old_foreground_pgrp. Register
348 restore_old_foreground_pgrp with atexit().
350 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
352 * server.c (handle_query): Correct qPart to qXfer.
354 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
356 * configure.ac: Check for more headers which are missing on
357 Windows. Automatically supply -lwsock32 and USE_WIN32API.
358 * configure.srv: Add Cygwin and mingw32.
359 * remote-utils.c: Don't include headers unconditionally which
360 are missing on mingw32. Include <winsock.h> for mingw32.
361 (remote_open): Adjust for mingw32 support. Flush
362 standard error after writing to it.
363 (remote_close, putpkt_binary, input_interrupt, block_async_io)
364 (unblock_async_io, enable_async_io, disable_async_io)
365 (readchar, getpkt): Update for Winsock support.
366 (prepare_resume_reply): Expect a protocol signal number.
367 * server.c: Disable <sys/wait.h> on mingw32.
368 (start_inferior): Adjust for mingw32 support. Flush
369 standard error after writing to it.
370 (attach_inferior): Likewise. Use protocol signal
372 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
374 * win32-i386-low.c: New file.
375 * Makefile.in (XM_CLIBS): Set.
376 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
377 (win32-i386-low.o): New dependency rule.
378 * linux-low.c (linux_wait): Use target signal numbers.
379 * target.h (struct target_ops): Doc fix.
380 * server.h (target_signal_to_name): New prototype.
381 * gdbreplay.c: Don't include headers unconditionally which
382 are missing on mingw32. Include <winsock.h> for mingw32.
383 (remote_close, remote_open): Adjust for Winsock support.
384 * configure, config.in: Regenerated.
386 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
388 * server.c (decode_xfer_read, write_qxfer_response): New.
389 (handle_query): Take a packet length argument. Handle
390 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
391 the qSupported response.
392 (main): Update call to handle_query.
394 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
396 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
397 (putpkt_binary): Renamed from putpkt and adjusted for binary
399 (putpkt): New wrapper for putpkt_binary.
400 (readchar): Don't mask off the high bit.
401 (decode_X_packet): New function.
402 * server.c (main): Call putpkt_binary if a handler sets the packet
403 length. Save the length of the incoming packet. Handle 'X'.
404 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
406 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
408 * server.c (handle_query): Handle qSupported.
410 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
412 * remote-utils.c (all_symbols_looked_up): New variable.
413 (look_up_one_symbol): Check it.
414 * server.h (look_up_one_symbol): New declaration.
415 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
417 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
419 * Makefile.in (linux-arm-low.o): Update dependencies.
420 * linux-arm-low.c: Include "gdb_proc_service.h".
421 (PTRACE_GET_THREAD_AREA): Define.
422 (ps_get_thread_area): New function.
424 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
426 * configure.srv (m68k*-*-uclinux*): New target.
427 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
428 (linux_resume_one_process): Remove extraneous cast.
429 (linux_read_offsets): New.
430 (linux_target_op): Add linux_read_offsets on mmuless systems.
431 * server.c (handle_query): Add qOffsets logic.
432 * target.h (struct target_ops): Add read_offsets.
434 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
436 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
437 (PTRACE_GET_THREAD_AREA): Define.
438 (ps_get_thread_area): New function.
439 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
440 (linux-x86-64-low.o): Update.
442 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
444 * configure.ac: Remove checks for prfpregset_t.
445 * gdb_proc_service.h: New file.
446 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
447 new "gdb_proc_service.h".
448 * proc-service.c: Likewise.
449 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
450 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
451 * Makefile.in (gdb_proc_service_h): Updated.
452 * configure, config.in: Regenerated.
454 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
456 * remote-utils.c (prepare_resume_reply): Move declaration
457 of gdb_id_from_wait to the top of the block.
459 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
461 * linux-low.c (regsets_store_inferior_registers): Read the regset
462 from the target before filling it.
464 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
466 * server.c (attach_inferior): Return SIGTRAP for a successful
469 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
471 * Makefile.in (OBS): Add version.o.
472 (STAGESTUFF): Delete.
473 (version.o): Add dependencies.
474 (version.c): Replace rule.
475 (clean): Remove version.c.
476 * server.c (gdbserver_version): New.
477 (gdbserver_usage): Use printf.
478 (main): Handle --version and --help.
479 * server.h (version, host_name): Add declarations.
481 2005-12-23 Eli Zaretskii <eliz@gnu.org>
493 * linux-x86-64-low.c:
505 * linux-crisv32-low.c:
517 * gdbserver.1: Add (C) after Copyright. Update the FSF
520 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
522 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
523 (arm_breakpoint_at): Recognize both breakpoints.
524 (the_low_target): Use the correct breakpoint instruction.
526 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
528 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
529 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
530 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
531 (the_low_target): Update.
533 2005-10-25 Andreas Schwab <schwab@suse.de>
535 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
537 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
538 (ia64_num_regs): Reduce to 462.
540 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
542 * acinclude.m4: Correct quoting.
543 * aclocal.m4: Regenerated.
545 Suggested by SZOKOVACS Robert <szo@ies.hu>:
546 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
547 (thread_db_init): Call thread_db_err_str.
548 * configure.ac: Check for TD_VERSION.
549 * config.in, configure: Regenerated.
551 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
553 * server.h (error, fatal, warning): Add ATTR_FORMAT.
555 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
557 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
558 is not available. Define HAVE_PTRACE_GETREGS if it is.
559 * config.in, configure: Regenerated.
560 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
561 * linux-i386-low.c, linux-m68k-low.c: Update to use
563 * linux-low.c (regsets_fetch_inferior_registers)
564 (regsets_store_inferior_registers): Only return 0 if we processed
566 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
567 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
569 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
571 * inferiors.c (struct thread_info): Add gdb_id.
572 (add_thread): Add gdb_id argument.
573 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
574 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
576 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
577 * server.c (handle_query): Use thread_to_gdb_id.
578 (handle_v_cont, main): Use gdb_id_to_thread_id.
579 * server.h (add_thread): Update prototype.
580 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
583 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
585 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
586 left-padded registers.
587 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
588 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
590 2005-07-01 Steve Ellcey <sje@cup.hp.com>
592 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
593 * configure: Regenerate.
594 * config.in: Regenerate.
595 * server.h (NEED_DECLARATION_STRERROR):
596 Replace with !HAVE_DECL_STRERROR.
598 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
600 * linux-low.c (linux_wait, linux_send_signal): Don't test
601 an unsigned long variable for > 0 if it could be MAX_ULONG.
602 * server.c (myresume): Likewise.
603 * target.c (set_desired_inferior): Likewise.
605 2005-06-13 Mark Kettenis <kettenis@gnu.org>
607 * configure.ac: Simplify and improve check for socklen_t.
608 * configure, config.in: Regenerate.
610 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
612 * acconfig.h: Remove.
613 * configure.ac: Add a test for socklen_t. Use three-argument
614 AC_DEFINE throughout.
615 * config.in: Regenerated using autoheader 2.59.
616 * configure: Regenerated.
618 * gdbreplay.c (socklen_t): Provide a default.
619 (remote_open): Use socklen_t.
620 * remote-utils.c (socklen_t): Provide a default.
621 (remote_open): Use socklen_t.
622 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
625 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
627 * linux-low.c (linux_read_memory, linux_write_memory)
628 (linux_read_auxv): Likewise.
629 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
630 (check_mem_write): Likewise.
631 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
633 * regcache.c (struct inferior_rgcache_data, registers_to_string)
634 (registers_from_string, register_data): Likewise.
635 * server.c (handle_query, main): Likewise.
636 * server.h (convert_ascii_to_int, convert_int_to_ascii)
637 (decode_M_packet): Likewise.
638 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
639 * target.h (struct target_ops): Update read_memory, write_memory,
641 (read_inferior_memory, write_inferior_memory): Update.
642 * linux-low.h (struct linux_target_ops): Change type of breakpoint
644 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
645 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
646 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
647 linux-s390-low.c, linux-sh-low.c: Update for changes in
648 read_inferior_memory and the_low_target->breakpoint.
650 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
652 * Makefile.in (SFILES): Add linux-ppc64-low.c.
653 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
654 * configure.srv: Add powerpc64-*-linux*.
655 * linux-ppc64-low.c: New file.
657 2005-05-23 Orjan Friberg <orjanf@axis.com>
659 * linux-cris-low.c: New file with support for CRIS.
660 * linux-crisv32-low.c: Ditto for CRISv32.
661 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
662 (clean): Add reg-cris.c and reg-crisv32.c.
663 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
664 reg-crisv32.o, and reg-crisv32.c to make rules.
665 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
668 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
670 * linux-low.c (fetch_register): Ensure buffer size is a multiple
671 of sizeof (PTRACE_XFER_TYPE).
672 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
674 2005-05-12 Orjan Friberg <orjanf@axis.com>
676 * target.h (struct target_ops): Add insert_watchpoint,
677 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
678 pointers for hardware watchpoint support.
679 * linux-low.h (struct linux_target_ops): Ditto.
680 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
681 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
683 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
685 * server.c (main): Recognize 'Z' and 'z' packets.
687 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
689 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
690 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
691 (the_low_target): Add new members.
693 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
695 * proc-service.c (ps_lgetregs): Search all_processes instead of
698 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
700 * server.c (start_inferior): Change return type to int.
701 (attach_inferior): Change sigptr to int *.
702 (handle_v_cont, handle_v_requests): Change signal to int *.
703 (main): Change signal to int.
705 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
707 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
708 * configure.srv: Add m32r*-*-linux*.
709 * linux-m32r-low.c: New file.
711 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
713 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
715 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
717 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
718 Take unsigned long arguments for PIDs.
719 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
720 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
721 (wait_for_sigstop, linux_resume_one_process)
722 (regsets_fetch_inferior_registers, linux_send_signal)
723 (linux_read_auxv): Likewise. Update the types of variables holding
724 PIDs. Update format string specifiers.
725 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
726 * remote-utils.c (prepare_resume_reply): Likewise.
727 * server.c (cont_thread, general_thread, step_thread)
728 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
730 (handle_query): Update format specifiers.
731 (handle_v_cont, main): Use strtoul for thread IDs.
732 * server.h (struct inferior_list_entry): Use unsigned long for ID.
733 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
734 (general_thread, step_thread, thread_from_wait)
735 (old_thread_from_wait): Update.
736 * target.h (struct thread_resume): Use unsigned long for THREAD.
737 (struct target_ops): Use unsigned long for arguments to attach and
740 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
742 * acinclude.m4: Include bfd/bfd.m4 directly.
743 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
744 <agriffis@toolchain.org>.
745 * aclocal.m4, configure: Regenerated.
747 2005-01-07 Andrew Cagney <cagney@gnu.org>
749 * configure.ac: Rename configure.in, require autoconf 2.59.
750 * configure: Re-generate.
752 2004-12-08 Daniel Jacobowitz <dan@debian.org>
754 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
756 * aclocal.m4: Regenerated.
757 * configure: Regenerated.
759 2004-11-21 Andreas Schwab <schwab@suse.de>
761 * linux-m68k-low.c (m68k_num_gregs): Define.
762 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
763 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
764 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
765 (m68k_breakpoint_at): New. Add to the_low_target.
767 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
768 srv_linux_thread_db to yes.
770 2004-10-20 Joel Brobecker <brobecker@gnat.com>
772 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
773 (ARCH_SET_FS): Likewise.
774 (ARCH_GET_FS): Likewise.
775 (ARCH_GET_GS): Likewise.
777 2004-10-16 Daniel Jacobowitz <dan@debian.org>
779 * linux-i386-low.c (ps_get_thread_area): New.
780 * linux-x86-64-low.c (ps_get_thread_area): New.
781 * linux-low.c: Include <sys/syscall.h>.
782 (linux_kill_one_process): Don't kill the first thread here.
783 (linux_kill): Kill the first thread here.
784 (kill_lwp): New function.
785 (send_sigstop, linux_send_signal): Use it.
786 * proc-service.c: Clean up #ifdefs.
787 (fpregset_info): Delete.
788 (ps_lgetregs): Update and enable implementation.
789 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
791 * remote-utils.c (struct sym_cache, symbol_cache): New.
792 (input_interrupt): Print a clearer message.
793 (async_io_enabled): New variable.
794 (enable_async_io, disable_async_io): Use it. Update comments.
795 (look_up_one_symbol): Use the symbol cache.
796 * thread-db.c (thread_db_look_up_symbols): New function.
797 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
799 2004-10-16 Daniel Jacobowitz <dan@debian.org>
801 * configure.in: Test for -rdynamic.
802 * configure: Regenerated.
803 * Makefile (INTERNAL_LDFLAGS): New.
804 (gdbserver, gdbreplay): Use it.
806 2004-09-02 Andrew Cagney <cagney@gnu.org>
808 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
810 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
812 * linux-low.c (linux_wait): Clear all_processes list also.
814 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
816 * linux-low.c: Include <errno.h>. Remove extern declaration of
819 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
821 * gdbreplay.c, server.h, utils.c: Update copyright years.
823 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
825 * server.c (main): Print child status or termination signal from
826 variable 'signal', not 'sig'.
828 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
830 * linux-low.c (linux_read_memory): Change return type to
831 int. Check for and return error from ptrace().
832 * target.c (read_inferior_memory): Change return type to int. Pass
833 back return status from the_target->read_memory().
834 * target.h (struct target_ops): Adapt *read_memory() prototype.
836 (read_inferior_memory): Adapt prototype.
837 * server.c (main): Return an error packet if
838 read_inferior_memory() returns an error.
840 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
842 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
843 Unify with other clean targets.
845 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
847 * server.c (handle_v_cont): Call set_desired_inferior.
849 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
851 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
853 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
855 * linux-low.c (linux_wait): Unblock async I/O.
856 (linux_resume): Block and enable async I/O.
857 * remote-utils.c (block_async_io, unblock_async_io): New functions.
858 * server.h (block_async_io, unblock_async_io): Add prototypes.
860 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
862 * remote-utils.c (remote_open): Print a status notice after
864 * server.c (attach_inferior): Print a status notice after
867 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
869 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
871 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
873 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
875 * server.c, target.h: Update copyright years.
877 2004-02-25 Roland McGrath <roland@redhat.com>
879 * target.h (struct target_ops): New member `read_auxv'.
880 * server.c (handle_query): Handle qPart:auxv:read: query using that.
881 * linux-low.c (linux_read_auxv): New function.
882 (linux_target_ops): Initialize `read_auxv' member to that.
884 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
886 Committed by Jim Blandy <jimb@redhat.com>.
888 * linux-s390-low.c (s390_num_regs): Update.
889 (s390_regmap): Remove control registers. Use __s390x__ predefine
890 instead of GPR_SIZE to distiguish s390 and s390x targets.
892 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
894 * linux-low.c: Update copyright year.
895 (check_removed_breakpoint): Clear pending_is_breakpoint.
896 (linux_set_resume_request, linux_queue_one_thread)
897 (resume_status_pending_p): New functions.
898 (linux_continue_one_thread): Use process->resume.
899 (linux_resume): Only resume threads if there are no pending events.
900 * linux-low.h (struct process_info): Add resume request
903 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
905 * regcache.c (new_register_cache): Clear the allocated register
906 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
908 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
910 * linux-low.c (linux_resume): Take a struct thread_resume *
912 (linux_wait): Update call.
913 (resume_ptr): New static variable.
914 (linux_continue_one_thread): Renamed from
915 linux_continue_one_process. Use resume_ptr.
916 (linux_resume): Use linux_continue_one_thread.
917 * server.c (handle_v_cont, handle_v_requests): New functions.
918 (myresume): New function.
919 (main): Handle 'v' case.
920 * target.h (struct thread_resume): New type.
921 (struct target_ops): Change argument of "resume" to struct
923 (myresume): Delete macro.
925 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
927 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
928 (uninstall): Support DESTDIR.
930 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
932 * configure.srv: Add xscale*linux copy of arm*linux entry.
934 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
936 * linux-arm-low.c (arm_reinsert_addr): New function.
937 (the_low_target): Add arm_reinsert_addr.
939 2003-07-08 Mark Kettenis <kettenis@gnu.org>
941 * mem-break.c: Remove whitespace at end of file.
943 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
945 * configure.in: Check whether we need to prototype strerror.
946 * server.h: Optionally prototype strerror.
947 * gdbreplay.c (perror_with_name): Use strerror.
948 * linux-low.c (linux_attach_lwp): Use strerror.
949 * utils.c (perror_with_name): Use strerror.
950 * config.in, configure: Regenerated.
952 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
954 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
955 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
957 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
959 * Makefile.in (SFILES): Update.
960 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
961 low-sun3.c: Remove files.
963 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
965 * linux-low.c: Move comment to linux_thread_alive where it belonged.
966 (linux_detach_one_process, linux_detach): New functions.
967 (linux_target_ops): Add linux_detach.
968 * server.c (main): Handle 'D' packet.
969 * target.h (struct target_ops): Add "detach" member.
970 (detach_inferior): Define.
972 2003-06-13 Mark Kettenis <kettenis@gnu.org>
974 From Kelley Cook <kelleycook@wideopenwest.com>:
975 * configure.srv: Accept i[34567]86 variants.
977 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
979 * linux-low.c (linux_wait_for_event): Correct comment typos.
980 (linux_resume_one_process): Call check_removed_breakpoint.
981 (linux_send_signal): New function.
982 (linux_target_ops): Add linux_send_signal.
983 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
985 * target.h (struct target_ops): Add send_signal.
987 2003-05-29 Jim Blandy <jimb@redhat.com>
989 * linux-low.c (usr_store_inferior_registers): Transfer buf in
990 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
991 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
992 away part of the register's value.
994 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
996 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
997 (linux_wait_for_event, linux_init_signals): Likewise.
999 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1001 * configure.in: Check for stdlib.h.
1002 * configure: Regenerated.
1003 * config.in: Regenerated.
1005 2003-01-04 Andreas Schwab <schwab@suse.de>
1007 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1009 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1011 * Makefile.in: Remove obsolete code.
1013 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1015 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1016 defined(PT_FPR0_HI).
1018 2002-11-17 Stuart Hughes <seh@zee2.com>
1020 * linux-arm-low.c (arm_num_regs): Increase.
1021 (arm_regmap): Include status register.
1023 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1025 * linux-low.c (register_addr): Remove incorrect -1 check.
1027 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1029 * linux-low.c (linux_create_inferior): Call setpgid. Return
1031 (unstopped_p, linux_signal_pid): Remove.
1032 (linux_target_ops): Remove linux_signal_pid.
1033 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1034 global instead of target method.
1035 * target.h (struct target_ops): Remove signal_pid. Update comment
1036 for create_inferior.
1037 * server.c (signal_pid): New variable.
1038 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1039 gdbserver. Set the child to be the foreground process group.
1040 (attach_inferior): Set signal_pid.
1042 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1044 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1046 2002-08-20 Jim Blandy <jimb@redhat.com>
1048 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1051 2002-08-01 Andrew Cagney <cagney@redhat.com>
1053 * Makefile.in: Make chill references obsolete.
1055 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1057 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1058 * configure: Regenerate.
1059 * config.in: Regenerate.
1061 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1063 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1064 (perror_with_name, remote_close, remote_open, expect, play): Static.
1066 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1068 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1069 byte offsets instead of an array of indexes.
1070 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1072 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1074 * regcache.c: Add comment.
1076 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1078 * thread-db.c: New file.
1079 * proc-service.c: New file.
1080 * acinclude.m4: New file.
1081 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1082 proc-service.o, and thread-db.o.
1083 (linux-low.o): Add USE_THREAD_DB.
1084 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1085 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1086 * aclocal.m4: Regenerated.
1087 * config.in: Regenerated.
1088 * configure: Regenerated.
1089 * configure.in: Check for proc_service.h, sys/procfs.h,
1090 thread_db.h, and linux/elf.h headrs.
1091 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1092 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1093 Check for -lthread_db and thread support.
1094 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1095 PowerPC, and SuperH.
1096 * i387-fp.c: Constify arguments.
1097 * i387-fp.h: Likewise.
1098 * inferiors.c: (struct thread_info): Renamed from
1099 `struct inferior_info'. Remove PID member. Use generic inferior
1100 list header. All uses updated.
1101 (inferiors, signal_pid): Removed.
1102 (all_threads): New variable.
1103 (get_thread): Define.
1104 (add_inferior_to_list): New function.
1105 (for_each_inferior): New function.
1106 (change_inferior_id): New function.
1107 (add_inferior): Removed.
1108 (remove_inferior): New function.
1109 (add_thread): New function.
1110 (free_one_thread): New function.
1111 (remove_thread): New function.
1112 (clear_inferiors): Use for_each_inferior and free_one_thread.
1113 (find_inferior): New function.
1114 (find_inferior_id): New function.
1115 (inferior_target_data): Update argument type.
1116 (set_inferior_target_data): Likewise.
1117 (inferior_regcache_data): Likewise.
1118 (set_inferior_regcache_data): Likewise.
1119 * linux-low.c (linux_bp_reinsert): Remove.
1120 (all_processes, stopping_threads, using_thrads)
1121 (struct pending_signals, debug_threads, pid_of): New.
1122 (inferior_pid): Replace with macro.
1123 (struct inferior_linux_data): Remove.
1124 (get_stop_pc, add_process): New functions.
1125 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1126 Use add_process and add_thread.
1127 (linux_attach_lwp): New function, based on old linux_attach. Use
1128 add_process and add_thread. Set stop_expected for new threads.
1129 (linux_attach): New function.
1130 (linux_kill_one_process): New function.
1131 (linux_kill): Kill all LWPs.
1132 (linux_thread_alive): Use find_inferior_id.
1133 (check_removed_breakpoints, status_pending_p): New functions.
1134 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1135 Update. Use WNOHANG. Wait for cloned processes also. Update process
1136 struct for the found process.
1137 (linux_wait_for_event): New function.
1138 (linux_wait): Use it. Support LWPs.
1139 (send_sigstop, wait_for_sigstop, stop_all_processes)
1140 (linux_resume_one_process, linux_continue_one_process): New functions.
1141 (linux_resume): Support LWPs.
1142 (REGISTER_RAW_SIZE): Remove.
1143 (fetch_register): Use register_size instead. Call supply_register.
1144 (usr_store_inferior_registers): Likewise. Call collect_register.
1146 (regsets_fetch_inferior_registers): Improve error message.
1147 (regsets_store_inferior_registers): Add debugging.
1148 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1149 (unstopped_p, linux_signal_pid): New functions.
1150 (linux_target_ops): Add linux_signal_pid.
1151 (linux_init_signals): New function.
1152 (initialize_low): Call it. Initialize using_threads.
1153 * regcache.c (inferior_regcache_data): Add valid
1155 (get_regcache): Fetch registers lazily. Add fetch argument
1156 and update all callers.
1157 (regcache_invalidate_one, regcache_invalidate): New
1159 (new_register_cache): Renamed from create_register_cache.
1160 Return the new regcache.
1161 (free_register_cache): Change argument to a void *.
1162 (registers_to_string, registers_from_string): Call get_regcache
1163 with fetch flag set.
1164 (register_data): Make static. Pass fetch flag to get_regcache.
1165 (supply_register): Call get_regcache with fetch flag clear.
1166 (collect_register): Call get_regcache with fetch flag set.
1167 (collect_register_as_string): New function.
1168 * regcache.h: Update.
1169 * remote-utils.c (putpkt): Flush after debug output and use
1171 Handle input interrupts while waiting for an ACK.
1172 (input_interrupt): Use signal_pid method.
1173 (getpkt): Flush after debug output and use stderr.
1174 (outreg): Use collect_register_as_string.
1175 (new_thread_notify, dead_thread_notify): New functions.
1176 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1178 (look_up_one_symbol): Flush after debug output.
1179 * server.c (step_thread, server_waiting): New variables.
1180 (start_inferior): Don't use signal_pid. Update call to mywait.
1181 (attach_inferior): Update call to mywait.
1182 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1183 (main): Don't fetch/store registers explicitly. Use
1184 set_desired_inferior. Support proposed ``Hs'' packet. Update
1187 (struct inferior_list, struct_inferior_list_entry): New.
1188 * target.c (set_desired_inferior): New.
1189 (write_inferior_memory): Constify.
1190 (mywait): New function.
1192 (struct target_ops): New signal_pid method.
1193 (mywait): Removed macro, added prototype.
1195 * linux-low.h (regset_func): Removed.
1196 (regset_fill_func, regset_store_func): New.
1197 (enum regset_type): New.
1198 (struct regset_info): Add type field. Use new operation types.
1199 (struct linux_target_ops): stop_pc renamed to get_pc.
1200 Add decr_pc_after_break and breakpoint_at.
1201 (get_process, get_thread_proess, get_process_thread)
1202 (strut process_info, all_processes, linux_attach_lwp)
1203 (thread_db_init): New.
1205 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1206 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1207 (the_low_target): Add new members.
1208 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1209 (i386_store_fpxregset): Constify.
1210 (target_regsets): Add new kind identifier.
1211 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1212 (i386_set_pc): Add debugging.
1213 (i386_breakpoint_at): New function.
1214 (the_low_target): Add new members.
1215 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1216 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1217 (mips_breakpoint_at): New.
1218 (the_low_target): Add new members.
1219 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1220 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1221 (the_low_target): Add new members.
1222 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1223 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1224 (the_low_target): Add new members.
1225 * linux-x86-64-low.c (target_regsets): Add new kind
1228 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1230 From Martin Pool <mbp@samba.org>:
1231 * server.c (gdbserver_usage): New function.
1234 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1236 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1239 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1241 * Makefile.in: Remove obsolete code.
1243 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1245 * linux-low.c (regsets_fetch_inferior_registers),
1246 (regsets_store_inferior_registers): Removed cast to int from
1248 * regcache.h: Added declaration of struct inferior_info.
1250 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1252 * inferiors.c (struct inferior_info): Add regcache_data.
1253 (add_inferior): Call create_register_cache.
1254 (clear_inferiors): Call free_register_cache.
1255 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1256 * regcache.c (struct inferior_regcache_data): New.
1257 (registers): Remove.
1258 (get_regcache): New function.
1259 (create_register_cache, free_register_cache): New functions.
1260 (set_register_cache): Don't initialize the register cache here.
1261 (registers_to_string, registers_from_string, register_data): Call
1263 * regcache.h: Add prototypes.
1264 * server.h: Likewise.
1266 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1268 * mem-break.c: New file.
1269 * mem-break.h: New file.
1270 * Makefile.in: Add mem-break.o rule; update server.h
1272 * inferiors.c (struct inferior_info): Add target_data
1274 (clear_inferiors): Free target_data member if set.
1275 (inferior_target_data, set_inferior_target_data): New functions.
1276 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1277 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1278 * linux-low.c (linux_bp_reinsert): New variable.
1279 (struct inferior_linux_data): New.
1280 (linux_create_inferior): Use set_inferior_target_data.
1281 (linux_attach): Likewise. Call add_inferior.
1282 (linux_wait_for_one_inferior): New function.
1283 (linux_wait): Call it.
1284 (linux_write_memory): Add const.
1285 (initialize_low): Call set_breakpoint_data.
1286 * linux-low.h (struct linux_target_ops): Add breakpoint
1288 * server.c (attach_inferior): Remove extra add_inferior
1290 * server.h: Include mem-break.h. Update inferior.c
1292 * target.c (read_inferior_memory)
1293 (write_inferior_memory): New functions.
1294 * target.h (read_inferior_memory)
1295 (write_inferior_memory): Change macros to prototypes.
1296 (struct target_ops): Update comments. Add const to write_memory
1299 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1301 * linux-low.c (usr_store_inferior_registers): Support
1302 registers which are allowed to fail to store.
1303 * linux-low.h (linux_target_ops): Likewise.
1304 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1305 (ppc_cannot_store_register): FPSCR may not be storable.
1307 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1309 * server.h: Include <string.h> if HAVE_STRING_H.
1310 * ChangeLog: Correct paths in last ChangeLog entry.
1312 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1314 * linux-low.h: Remove obsolete prototypes.
1315 (struct linux_target_ops): New.
1316 (extern the_low_target): New.
1317 * linux-low.c (num_regs, regmap): Remove declarations.
1318 (register_addr): Use the_low_target explicitly.
1319 (fetch_register): Likewise.
1320 (usr_fetch_inferior_registers): Likewise.
1321 (usr_store_inferior_registers): Likewise.
1322 * linux-arm-low.c (num_regs): Remove.
1323 (arm_num_regs): Define.
1324 (arm_regmap): Renamed from regmap, made static.
1325 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1327 (arm_cannot_store_register): Renamed from cannot_store_register,
1329 (the_low_target): New.
1330 * linux-i386-low.c (num_regs): Remove.
1331 (i386_num_regs): Define.
1332 (i386_regmap): Renamed from regmap, made static.
1333 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1335 (i386_cannot_store_register): Renamed from cannot_store_register,
1337 (the_low_target): New.
1338 * linux-ia64-low.c (num_regs): Remove.
1339 (ia64_num_regs): Define.
1340 (ia64_regmap): Renamed from regmap, made static.
1341 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1343 (ia64_cannot_store_register): Renamed from cannot_store_register,
1345 (the_low_target): New.
1346 * linux-m68k-low.c (num_regs): Remove.
1347 (m68k_num_regs): Define.
1348 (m68k_regmap): Renamed from regmap, made static.
1349 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1351 (m68k_cannot_store_register): Renamed from cannot_store_register,
1353 (the_low_target): New.
1354 * linux-mips-low.c (num_regs): Remove.
1355 (mips_num_regs): Define.
1356 (mips_regmap): Renamed from regmap, made static.
1357 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1359 (mips_cannot_store_register): Renamed from cannot_store_register,
1361 (the_low_target): New.
1362 * linux-ppc-low.c (num_regs): Remove.
1363 (ppc_num_regs): Define.
1364 (ppc_regmap): Renamed from regmap, made static.
1365 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1367 (ppc_cannot_store_register): Renamed from cannot_store_register,
1369 (the_low_target): New.
1370 * linux-s390-low.c (num_regs): Remove.
1371 (s390_num_regs): Define.
1372 (s390_regmap): Renamed from regmap, made static.
1373 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1375 (s390_cannot_store_register): Renamed from cannot_store_register,
1377 (the_low_target): New.
1378 * linux-sh-low.c (num_regs): Remove.
1379 (sh_num_regs): Define.
1380 (sh_regmap): Renamed from regmap, made static.
1381 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1383 (sh_cannot_store_register): Renamed from cannot_store_register,
1385 (the_low_target): New.
1386 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1387 (the_low_target): New.
1389 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1391 * Makefile.in: Add stamp-h target.
1392 * configure.in: Create stamp-h.
1393 * configure: Regenerated.
1395 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1397 * inferiors.c: New file.
1398 * target.c: New file.
1399 * target.h: New file.
1400 * Makefile.in: Add target.o and inferiors.o. Update
1402 * linux-low.c (inferior_pid): New static variable,
1403 moved from server.c.
1404 (linux_create_inferior): Renamed from create_inferior.
1405 Call add_inferior. Return 0 on success instead of a PID.
1406 (linux_attach): Renamed from myattach.
1407 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1408 (linux_thread_alive): Renamed from mythread_alive.
1409 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1411 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1412 (regsets_store_inferior_registers): Correct error message.
1413 Add missing ``return 0''.
1414 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1415 (linux_store_registers): Renamed from store_inferior_registers.
1416 (linux_read_memory): Renamed from read_inferior_memory.
1417 (linux_write_memory): Renamed from write_inferior_memory.
1418 (linux_target_ops): New structure.
1419 (initialize_low): Call set_target_ops ().
1420 * remote-utils.c (unhexify): New function.
1421 (hexify): New function.
1422 (input_interrupt): Send signals to ``signal_pid''.
1423 * server.c (inferior_pid): Remove.
1424 (start_inferior): Update create_inferior call.
1425 (attach_inferior): Call add_inferior.
1426 (handle_query): New function.
1427 (main): Call handle_query for `q' packets.
1428 * server.h: Include "target.h". Remove obsolete prototypes.
1429 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1431 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1433 * Makefile.in: Add WARN_CFLAGS. Update configury
1435 * configure.in: Check for <string.h>
1436 * configure: Regenerate.
1437 * config.in: Regenerate.
1438 * gdbreplay.c: Include needed system headers.
1439 (remote_open): Remove strchr prototype.
1440 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1441 * regcache.c (supply_register): Change buf argument to const void *.
1442 (supply_register_by_name): Likewise.
1443 (collect_register): Change buf argument to void *.
1444 (collect_register_by_name): Likewise.
1445 * regcache.h: Add missing prototypes.
1446 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1447 * server.c (handle_query): New function.
1448 (attached): New static variable, moved out of main.
1449 (main): Quiet longjmp clobber warnings.
1450 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1451 * utils.c (error): Remove NORETURN.