1 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3 * win32-low.c (debug_registers_changed,
4 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7 (thread_rec): Get context using the low target.
8 (child_add_thread): Call thread_added on the low target,
9 which does the same thing.
11 (do_initial_child_stuff): Remove debug registers references.
12 Set context using the low target. Resume threads after
14 (child_continue): Remove dead variable. Remove debug
16 (child_fetch_inferior_registers): Go through the low target.
17 (do_child_store_inferior_registers): Remove.
18 (child_store_inferior_registers): Go through the low target.
19 (win32_resume): Remove debug registers references.
20 Set context using the low target.
21 (handle_exception): Change return type to void. Don't record
22 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
23 first chance exception.
24 (get_child_debug_event): Change return type to void. Remove
25 goto loop. Always return after waiting for debug event.
26 (win32_wait): Convert to switch statement. Handle spurious
29 * win32-i386-low.c (debug_registers_changed,
30 debug_registers_used): New.
31 (initial_stuff): Rename to ...
32 (i386_initial_stuff): ... this. Clear debug registers
34 (store_debug_registers): Delete.
35 (i386_get_thread_context): New.
36 (load_debug_registers): Delete.
37 (i386_set_thread_context): New.
38 (i386_thread_added): New.
39 (single_step): Rename to ...
40 (i386_single_step): ... this.
41 (do_fetch_inferior_registers): Rename to ...
42 (i386_fetch_inferior_register): ... this.
43 (i386_store_inferior_register): New.
44 (the_low_target): Adapt to new interface.
46 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
47 (arm_get_thread_context): New.
48 (arm_set_thread_context): New.
50 (do_fetch_inferior_registers): Rename to ...
51 (arm_fetch_inferior_register): ... this.
52 (arm_store_inferior_register): New.
53 (arm_wince_breakpoint): Reimplement as unsigned long.
54 (arm_wince_breakpoint_len): Define.
55 (the_low_target): Adapt to new interface.
57 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
58 load_debug_registers. Add get_thread_context, set_thread_context,
59 thread_added and store_inferior_register. Rename
60 fetch_inferior_registers to fetch_inferior_register.
61 (regptr): Remove declaration.
63 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
65 * linux-low.c (linux_detach): Change return type to int. Return 0.
66 * spu-low.c (spu_detach): Likewise.
68 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
70 * target.h (target_ops): Change return type of detach to int.
73 * server.c (main): Don't skip detach support on mingw32.
74 If the inferior doesn't support detaching return error.
75 Call join_inferior instead of using waitpid.
76 * linux-low.c (linux_join): New.
77 (linux_target_op): Add linux_join.
78 * spu-low.c (spu_join): New.
79 (spu_target_ops): Add spu_join.
80 * win32-low.c (win32_detach): Adapt to new interface.
81 Reopen current_process_handle before detaching. Issue a child
82 resume before detaching.
84 (win32_target_op): Add win32_join.
86 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
88 * win32-low.c (win32-attach): Fix return value.
89 * target.h (target_ops): Describe ATTACH return values.
91 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
93 * win32-low.c (GETPROCADDRESS): Define.
94 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
95 (winapi_DebugSetProcessKillOnExit): Likewise.
96 (win32_create_inferior): Force usage of ansi CreateProcessA.
97 (win32_attach): Use GETPROCADDRESS.
98 (win32_detach): Likewise.
100 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
102 * win32-low.c (win32_wait): Don't use WSTOPSIG.
104 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
106 * win32-low.c: Commit leftover changes from 2007-03-29.
108 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
110 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
111 fields short instead of int. Add explicit padding.
112 (i387_cache_to_fsave): Remove unnecessary casts.
113 (i387_fsave_to_cache): Doc fix.
114 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
116 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
118 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
119 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
121 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
123 * configure.srv (arm*-*-mingw32ce*): Move near the other
126 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
128 * configure.ac: Add errno checking.
129 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
130 sys/file.h and malloc.h.
131 (AC_CHECK_DECLS): Add perror.
132 (srv_mingwce): Handle.
133 * configure.srv (i[34567]86-*-cygwin*): Add
134 win32-i386-low.o to srv_tgtobj.
135 (i[34567]86-*-mingw*): Likewise.
136 (arm*-*-mingw32ce*): Add case.
137 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
138 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
139 [__MINGW32CE__] (strerror): New function.
140 [__MINGW32CE__] (errno): Define to GetLastError.
141 [__MINGW32CE__] (COUNTOF): New macro.
142 (remote_open): Remove extra close call.
143 * mem-break.c (delete_breakpoint_at): New function.
144 * mem-break.h (delete_breakpoint_at): Declare.
145 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
146 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
147 [USE_WIN32API] (read, write): Add char* casts.
148 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
149 * server.h: Include wincecompat.h on Windows CE.
150 [HAVE_ERRNO_H]: Check.
151 (perror): Declare if not declared.
152 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
153 (perror_with_name): Remove errno declaration.
154 * wincecompat.h: New.
155 * wincecompat.c: New.
157 * win32-arm-low.c: New.
158 * win32-i386-low.c: New.
159 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
160 (OUTMSG2): Make it safe.
162 (COUNTOF): New macro.
163 (NUM_REGS): Get it from the low target.
164 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
165 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
166 (thread_rec): Let low target handle debug registers.
167 (child_add_thread): Likewise.
168 (child_init_thread_list): Likewise.
169 (continue_one_thread): Likewise.
171 (do_child_fetch_inferior_registers): Move to ...
172 * win32-i386-low.c: ... here, and rename to ...
173 (do_fetch_inferior_registers): ... this.
174 * win32-low.c (child_fetch_inferior_registers):
175 Go through the low target.
176 (do_child_store_inferior_registers): Use regptr.
177 (strwinerror): New function.
178 (win32_create_inferior): Handle Windows CE.
179 Use strwinerror instead of strerror on Windows error
180 codes. Add program to the error output.
181 Don't close the main thread handle on Windows CE.
182 (win32_attach): Use coredll.dll on Windows CE.
183 (win32_kill): Close current process and current
185 (win32_detach): Use coredll.dll on Windows CE.
186 (win32_resume): Let low target handle debug registers, and
188 (handle_exception): Add/Remove initial breakpoint. Avoid
189 non-existant WSTOPSIG on Windows CE.
190 (win32_read_inferior_memory): Cast to remove warning.
191 (win32_arch_string): Go through the low target.
192 (initialize_low): Call set_breakpoint_data with the low
194 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
195 FOP_REGNUM, mappings): Move to ...
196 * win32-i386-low.c: ... here.
197 * win32-low.c (win32_thread_info): Move to ...
198 * win32-low.h: ... here.
199 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
200 win32-arm-low.c and wincecompat.c.
202 (install-only:): Likewise.
203 (gdbserver:): Likewise.
204 (gdbreplay:): Likewise.
205 * config.in: Regenerate.
206 * configure: Regenerate.
208 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
210 * win32-low.c: Rename typedef thread_info to
211 win32_thread_info throughout.
213 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
215 * win32-i386-low.c: Rename to ...
216 * win32-low.c: ... this.
217 * configure.srv: Replace win32-i386-low.o with win32-low.o.
218 * Makefile.in: Likewise.
220 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
222 * remote-utils.c (monitor_output): Constify msg parameter.
223 * server.h (monitor_output): Likewise.
224 * win32-i386-low.c (handle_output_debug_string): New.
225 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
226 handle_output_debug_string.
227 (get_child_debug_event): Likewise.
229 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
231 * server.c (main): Correct strtoul check.
233 2007-03-27 Jon Ringle <jon@ringle.org>
235 * linux-low.c: Check __ARCH_HAS_MMU__ also.
237 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
239 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
241 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
243 * terminal.h: Check HAVE_SGTTY_H.
245 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
247 * remote-utils.c (remote_open): Print out the assigned port number.
249 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
251 * remote-utils.c (monitor_output): New function.
252 * server.c (debug_threads): Define here.
253 (monitor_show_help): New function.
254 (handle_query): Handle qRcmd.
255 (main): Do not handle 'd' packet.
256 * server.h (debug_threads, remote_debug, monitor_output): Declare.
257 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
260 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
262 * Makefile.in (EXEEXT): New.
263 (clean): Use $(EXEEXT).
265 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
267 * target.h (target_ops): Rename send_signal to request_interrupt,
268 and remove enum target_signal parameter.
269 * linux-low.c (linux_request_interrupt): Rename from
270 linux_send_signal, and always send SIGINT.
271 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
272 and always send SIGINT.
273 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
275 (input_interrupt): Likewise.
277 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
279 * server.c (get_features_xml): Check if target implemented
281 * win32-i386-low.c (win32_arch_string): New.
282 (win32_target_ops): Add win32_arch_string as arch_string member.
284 2007-02-22 Markus Deuling <deuling@de.ibm.com>
286 * spu-low.c (spu_arch_string): New.
287 (spu_target_ops): Add spu_arch_string.
289 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
291 * remote-utils.c: Remove HAVE_TERMINAL_H check.
292 * configure.ac: Do not check for terminal.h.
293 * configure, config.in: Regenerated.
295 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
297 * Makefile.in (OBS): Add $(XML_BUILTIN).
298 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
300 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
301 (arm-with-iwmmxt.c): New.
302 * config.in, configure: Regenerate.
303 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
304 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
305 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
306 (arm*-*-linux*): Add iWMMXt and regset support.
307 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
308 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
309 (arm_store_wmmxregset, target_regsets): New.
310 * server.c (get_features_xml): Take annex argument. Check builtin
312 (handle_query): Handle multiple annexes.
314 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
316 * remote-utils.c [USE_WIN32API] (read, write): Define.
317 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
320 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
322 * linux-i386-low.c (the_low_target): Set arch_string.
323 * linux-x86-64-low.c (the_low_target): Likewise.
324 * linux-low.c (linux_arch_string): New.
325 (linux_target_ops): Add it.
326 * linux-low.h (struct linux_target_ops): Add arch_string.
327 * server.c (write_qxfer_response): Use const void * for DATA.
328 (get_features_xml): New.
329 (handle_query): Handle qXfer:features:read. Report it for qSupported.
330 * target.h (struct target_ops): Add arch_string method.
332 2007-01-03 Denis Pilat <denis.pilat@st.com>
333 Daniel Jacobowitz <dan@codesourcery.com>
335 * linux-low.c (linux_kill): Handle being called with no threads.
336 * win32-i386-low.c (win32_kill): Likewise.
337 (get_child_debug_event): Clear current_process_handle.
339 2006-12-30 Denis PILAT <denis.pilat@st.com>
340 Daniel Jacobowitz <dan@codesourcery.com>
342 * remote-utils.c (remote_open): Check the type of specified
343 serial port devices before opening them.
344 * server.c (main): Kill the inferior if an error occurs during
345 the first remote_open.
347 2006-12-05 Markus Deuling <deuling@de.ibm.com>
349 * README: Update supported targets.
351 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
353 * Makefile.in (clean): Remove reg-mips64.c.
354 (reg-mips64.c, reg-mips64.o): New rules.
355 * configure.srv: Handle mips64. Include regset support for mips.
356 * linux-mips-low.c (union mips_register): New.
357 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
358 (mips_breakpoint, mips_breakpoint_at): Use int.
359 (mips_collect_register, mips_supply_register)
360 (mips_collect_register_32bit, mips_supply_register_32bit)
361 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
362 (mips_store_fpregset, target_regsets): New.
363 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
365 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
367 * configure.srv: Add target "spu*-*-*".
368 * Makefile.in (clean): Remove reg-spu.c.
369 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
370 * spu-low.c: New file.
372 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
374 * configure.ac: Correct td_thr_tls_get_addr test.
375 * configure: Regenerated.
377 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
379 * linux-low.c (linux_wait_for_event): Reformat. Use the
381 * remote-utils.c (decode_address_to_semicolon): New.
382 * server.c (pass_signals, handle_general_set): New.
383 (handle_query): Mention QPassSignals for qSupported.
384 (main): Call handle_general_set.
385 * server.h (pass_signals, decode_address_to_semicolon): New.
387 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
389 * server.c (handle_query): Correct error handling for read_auxv.
391 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
393 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
394 and srv_linux_thread_db to yes.
395 * linux-s390-low.c (s390_fill_gregset): New function.
396 (target_regsets): Define data structure.
398 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
400 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
401 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
402 * config.in, configure: Regenerated.
403 * inferiors.c (gdb_id_to_thread): New function.
404 (gdb_id_to_thread_id): Use it.
405 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
406 * linux-low.h (struct process_info): Add th member.
407 (thread_db_get_tls_address): New prototype.
408 * remote-utils.c (decode_address): Make non-static.
409 * server.c (handle_query): Handle qGetTLSAddr.
410 * server.h (gdb_id_to_thread, decode_address): New prototypes.
411 * target.h (struct target_ops): Add get_tls_address.
412 * thread-db.c (maybe_attach_thread): Save the thread handle.
413 (thread_db_get_tls_address): New.
415 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
417 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
418 (linux_resume_one_process): Take a siginfo_t *. Update all
419 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
420 (struct pending_signals): Add a siginfo_t.
421 (linux_wait_for_process): Always set last_status.
422 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
423 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
424 * linux-low.h (struct process_info): Add last_status.
426 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
428 * remote-utils.c (try_rle): New function.
429 (putpkt_binary): Use it.
431 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
433 * Makefile.in (clean): Clean reg-x86-64-linux.c.
434 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
435 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
436 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
437 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
440 2006-08-08 Richard Sandiford <richard@codesourcery.com>
442 * server.c (terminal_fd): New variable.
443 (old_foreground_pgrp): Likewise.
444 (restore_old_foreground_pgrp): New function.
445 (start_inferior): Record the terminal file descriptor in terminal_fd
446 and its original foreground group in old_foreground_pgrp. Register
447 restore_old_foreground_pgrp with atexit().
449 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
451 * server.c (handle_query): Correct qPart to qXfer.
453 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
455 * configure.ac: Check for more headers which are missing on
456 Windows. Automatically supply -lwsock32 and USE_WIN32API.
457 * configure.srv: Add Cygwin and mingw32.
458 * remote-utils.c: Don't include headers unconditionally which
459 are missing on mingw32. Include <winsock.h> for mingw32.
460 (remote_open): Adjust for mingw32 support. Flush
461 standard error after writing to it.
462 (remote_close, putpkt_binary, input_interrupt, block_async_io)
463 (unblock_async_io, enable_async_io, disable_async_io)
464 (readchar, getpkt): Update for Winsock support.
465 (prepare_resume_reply): Expect a protocol signal number.
466 * server.c: Disable <sys/wait.h> on mingw32.
467 (start_inferior): Adjust for mingw32 support. Flush
468 standard error after writing to it.
469 (attach_inferior): Likewise. Use protocol signal
471 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
473 * win32-i386-low.c: New file.
474 * Makefile.in (XM_CLIBS): Set.
475 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
476 (win32-i386-low.o): New dependency rule.
477 * linux-low.c (linux_wait): Use target signal numbers.
478 * target.h (struct target_ops): Doc fix.
479 * server.h (target_signal_to_name): New prototype.
480 * gdbreplay.c: Don't include headers unconditionally which
481 are missing on mingw32. Include <winsock.h> for mingw32.
482 (remote_close, remote_open): Adjust for Winsock support.
483 * configure, config.in: Regenerated.
485 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
487 * server.c (decode_xfer_read, write_qxfer_response): New.
488 (handle_query): Take a packet length argument. Handle
489 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
490 the qSupported response.
491 (main): Update call to handle_query.
493 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
495 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
496 (putpkt_binary): Renamed from putpkt and adjusted for binary
498 (putpkt): New wrapper for putpkt_binary.
499 (readchar): Don't mask off the high bit.
500 (decode_X_packet): New function.
501 * server.c (main): Call putpkt_binary if a handler sets the packet
502 length. Save the length of the incoming packet. Handle 'X'.
503 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
505 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
507 * server.c (handle_query): Handle qSupported.
509 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
511 * remote-utils.c (all_symbols_looked_up): New variable.
512 (look_up_one_symbol): Check it.
513 * server.h (look_up_one_symbol): New declaration.
514 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
516 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
518 * Makefile.in (linux-arm-low.o): Update dependencies.
519 * linux-arm-low.c: Include "gdb_proc_service.h".
520 (PTRACE_GET_THREAD_AREA): Define.
521 (ps_get_thread_area): New function.
523 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
525 * configure.srv (m68k*-*-uclinux*): New target.
526 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
527 (linux_resume_one_process): Remove extraneous cast.
528 (linux_read_offsets): New.
529 (linux_target_op): Add linux_read_offsets on mmuless systems.
530 * server.c (handle_query): Add qOffsets logic.
531 * target.h (struct target_ops): Add read_offsets.
533 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
535 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
536 (PTRACE_GET_THREAD_AREA): Define.
537 (ps_get_thread_area): New function.
538 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
539 (linux-x86-64-low.o): Update.
541 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
543 * configure.ac: Remove checks for prfpregset_t.
544 * gdb_proc_service.h: New file.
545 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
546 new "gdb_proc_service.h".
547 * proc-service.c: Likewise.
548 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
549 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
550 * Makefile.in (gdb_proc_service_h): Updated.
551 * configure, config.in: Regenerated.
553 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
555 * remote-utils.c (prepare_resume_reply): Move declaration
556 of gdb_id_from_wait to the top of the block.
558 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
560 * linux-low.c (regsets_store_inferior_registers): Read the regset
561 from the target before filling it.
563 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
565 * server.c (attach_inferior): Return SIGTRAP for a successful
568 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
570 * Makefile.in (OBS): Add version.o.
571 (STAGESTUFF): Delete.
572 (version.o): Add dependencies.
573 (version.c): Replace rule.
574 (clean): Remove version.c.
575 * server.c (gdbserver_version): New.
576 (gdbserver_usage): Use printf.
577 (main): Handle --version and --help.
578 * server.h (version, host_name): Add declarations.
580 2005-12-23 Eli Zaretskii <eliz@gnu.org>
592 * linux-x86-64-low.c:
604 * linux-crisv32-low.c:
616 * gdbserver.1: Add (C) after Copyright. Update the FSF
619 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
621 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
622 (arm_breakpoint_at): Recognize both breakpoints.
623 (the_low_target): Use the correct breakpoint instruction.
625 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
627 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
628 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
629 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
630 (the_low_target): Update.
632 2005-10-25 Andreas Schwab <schwab@suse.de>
634 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
636 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
637 (ia64_num_regs): Reduce to 462.
639 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
641 * acinclude.m4: Correct quoting.
642 * aclocal.m4: Regenerated.
644 Suggested by SZOKOVACS Robert <szo@ies.hu>:
645 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
646 (thread_db_init): Call thread_db_err_str.
647 * configure.ac: Check for TD_VERSION.
648 * config.in, configure: Regenerated.
650 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
652 * server.h (error, fatal, warning): Add ATTR_FORMAT.
654 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
656 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
657 is not available. Define HAVE_PTRACE_GETREGS if it is.
658 * config.in, configure: Regenerated.
659 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
660 * linux-i386-low.c, linux-m68k-low.c: Update to use
662 * linux-low.c (regsets_fetch_inferior_registers)
663 (regsets_store_inferior_registers): Only return 0 if we processed
665 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
666 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
668 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
670 * inferiors.c (struct thread_info): Add gdb_id.
671 (add_thread): Add gdb_id argument.
672 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
673 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
675 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
676 * server.c (handle_query): Use thread_to_gdb_id.
677 (handle_v_cont, main): Use gdb_id_to_thread_id.
678 * server.h (add_thread): Update prototype.
679 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
682 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
684 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
685 left-padded registers.
686 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
687 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
689 2005-07-01 Steve Ellcey <sje@cup.hp.com>
691 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
692 * configure: Regenerate.
693 * config.in: Regenerate.
694 * server.h (NEED_DECLARATION_STRERROR):
695 Replace with !HAVE_DECL_STRERROR.
697 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
699 * linux-low.c (linux_wait, linux_send_signal): Don't test
700 an unsigned long variable for > 0 if it could be MAX_ULONG.
701 * server.c (myresume): Likewise.
702 * target.c (set_desired_inferior): Likewise.
704 2005-06-13 Mark Kettenis <kettenis@gnu.org>
706 * configure.ac: Simplify and improve check for socklen_t.
707 * configure, config.in: Regenerate.
709 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
711 * acconfig.h: Remove.
712 * configure.ac: Add a test for socklen_t. Use three-argument
713 AC_DEFINE throughout.
714 * config.in: Regenerated using autoheader 2.59.
715 * configure: Regenerated.
717 * gdbreplay.c (socklen_t): Provide a default.
718 (remote_open): Use socklen_t.
719 * remote-utils.c (socklen_t): Provide a default.
720 (remote_open): Use socklen_t.
721 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
724 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
726 * linux-low.c (linux_read_memory, linux_write_memory)
727 (linux_read_auxv): Likewise.
728 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
729 (check_mem_write): Likewise.
730 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
732 * regcache.c (struct inferior_rgcache_data, registers_to_string)
733 (registers_from_string, register_data): Likewise.
734 * server.c (handle_query, main): Likewise.
735 * server.h (convert_ascii_to_int, convert_int_to_ascii)
736 (decode_M_packet): Likewise.
737 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
738 * target.h (struct target_ops): Update read_memory, write_memory,
740 (read_inferior_memory, write_inferior_memory): Update.
741 * linux-low.h (struct linux_target_ops): Change type of breakpoint
743 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
744 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
745 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
746 linux-s390-low.c, linux-sh-low.c: Update for changes in
747 read_inferior_memory and the_low_target->breakpoint.
749 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
751 * Makefile.in (SFILES): Add linux-ppc64-low.c.
752 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
753 * configure.srv: Add powerpc64-*-linux*.
754 * linux-ppc64-low.c: New file.
756 2005-05-23 Orjan Friberg <orjanf@axis.com>
758 * linux-cris-low.c: New file with support for CRIS.
759 * linux-crisv32-low.c: Ditto for CRISv32.
760 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
761 (clean): Add reg-cris.c and reg-crisv32.c.
762 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
763 reg-crisv32.o, and reg-crisv32.c to make rules.
764 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
767 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
769 * linux-low.c (fetch_register): Ensure buffer size is a multiple
770 of sizeof (PTRACE_XFER_TYPE).
771 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
773 2005-05-12 Orjan Friberg <orjanf@axis.com>
775 * target.h (struct target_ops): Add insert_watchpoint,
776 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
777 pointers for hardware watchpoint support.
778 * linux-low.h (struct linux_target_ops): Ditto.
779 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
780 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
782 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
784 * server.c (main): Recognize 'Z' and 'z' packets.
786 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
788 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
789 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
790 (the_low_target): Add new members.
792 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
794 * proc-service.c (ps_lgetregs): Search all_processes instead of
797 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
799 * server.c (start_inferior): Change return type to int.
800 (attach_inferior): Change sigptr to int *.
801 (handle_v_cont, handle_v_requests): Change signal to int *.
802 (main): Change signal to int.
804 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
806 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
807 * configure.srv: Add m32r*-*-linux*.
808 * linux-m32r-low.c: New file.
810 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
812 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
814 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
816 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
817 Take unsigned long arguments for PIDs.
818 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
819 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
820 (wait_for_sigstop, linux_resume_one_process)
821 (regsets_fetch_inferior_registers, linux_send_signal)
822 (linux_read_auxv): Likewise. Update the types of variables holding
823 PIDs. Update format string specifiers.
824 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
825 * remote-utils.c (prepare_resume_reply): Likewise.
826 * server.c (cont_thread, general_thread, step_thread)
827 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
829 (handle_query): Update format specifiers.
830 (handle_v_cont, main): Use strtoul for thread IDs.
831 * server.h (struct inferior_list_entry): Use unsigned long for ID.
832 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
833 (general_thread, step_thread, thread_from_wait)
834 (old_thread_from_wait): Update.
835 * target.h (struct thread_resume): Use unsigned long for THREAD.
836 (struct target_ops): Use unsigned long for arguments to attach and
839 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
841 * acinclude.m4: Include bfd/bfd.m4 directly.
842 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
843 <agriffis@toolchain.org>.
844 * aclocal.m4, configure: Regenerated.
846 2005-01-07 Andrew Cagney <cagney@gnu.org>
848 * configure.ac: Rename configure.in, require autoconf 2.59.
849 * configure: Re-generate.
851 2004-12-08 Daniel Jacobowitz <dan@debian.org>
853 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
855 * aclocal.m4: Regenerated.
856 * configure: Regenerated.
858 2004-11-21 Andreas Schwab <schwab@suse.de>
860 * linux-m68k-low.c (m68k_num_gregs): Define.
861 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
862 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
863 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
864 (m68k_breakpoint_at): New. Add to the_low_target.
866 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
867 srv_linux_thread_db to yes.
869 2004-10-20 Joel Brobecker <brobecker@gnat.com>
871 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
872 (ARCH_SET_FS): Likewise.
873 (ARCH_GET_FS): Likewise.
874 (ARCH_GET_GS): Likewise.
876 2004-10-16 Daniel Jacobowitz <dan@debian.org>
878 * linux-i386-low.c (ps_get_thread_area): New.
879 * linux-x86-64-low.c (ps_get_thread_area): New.
880 * linux-low.c: Include <sys/syscall.h>.
881 (linux_kill_one_process): Don't kill the first thread here.
882 (linux_kill): Kill the first thread here.
883 (kill_lwp): New function.
884 (send_sigstop, linux_send_signal): Use it.
885 * proc-service.c: Clean up #ifdefs.
886 (fpregset_info): Delete.
887 (ps_lgetregs): Update and enable implementation.
888 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
890 * remote-utils.c (struct sym_cache, symbol_cache): New.
891 (input_interrupt): Print a clearer message.
892 (async_io_enabled): New variable.
893 (enable_async_io, disable_async_io): Use it. Update comments.
894 (look_up_one_symbol): Use the symbol cache.
895 * thread-db.c (thread_db_look_up_symbols): New function.
896 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
898 2004-10-16 Daniel Jacobowitz <dan@debian.org>
900 * configure.in: Test for -rdynamic.
901 * configure: Regenerated.
902 * Makefile (INTERNAL_LDFLAGS): New.
903 (gdbserver, gdbreplay): Use it.
905 2004-09-02 Andrew Cagney <cagney@gnu.org>
907 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
909 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
911 * linux-low.c (linux_wait): Clear all_processes list also.
913 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
915 * linux-low.c: Include <errno.h>. Remove extern declaration of
918 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
920 * gdbreplay.c, server.h, utils.c: Update copyright years.
922 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
924 * server.c (main): Print child status or termination signal from
925 variable 'signal', not 'sig'.
927 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
929 * linux-low.c (linux_read_memory): Change return type to
930 int. Check for and return error from ptrace().
931 * target.c (read_inferior_memory): Change return type to int. Pass
932 back return status from the_target->read_memory().
933 * target.h (struct target_ops): Adapt *read_memory() prototype.
935 (read_inferior_memory): Adapt prototype.
936 * server.c (main): Return an error packet if
937 read_inferior_memory() returns an error.
939 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
941 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
942 Unify with other clean targets.
944 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
946 * server.c (handle_v_cont): Call set_desired_inferior.
948 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
950 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
952 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
954 * linux-low.c (linux_wait): Unblock async I/O.
955 (linux_resume): Block and enable async I/O.
956 * remote-utils.c (block_async_io, unblock_async_io): New functions.
957 * server.h (block_async_io, unblock_async_io): Add prototypes.
959 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
961 * remote-utils.c (remote_open): Print a status notice after
963 * server.c (attach_inferior): Print a status notice after
966 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
968 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
970 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
972 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
974 * server.c, target.h: Update copyright years.
976 2004-02-25 Roland McGrath <roland@redhat.com>
978 * target.h (struct target_ops): New member `read_auxv'.
979 * server.c (handle_query): Handle qPart:auxv:read: query using that.
980 * linux-low.c (linux_read_auxv): New function.
981 (linux_target_ops): Initialize `read_auxv' member to that.
983 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
985 Committed by Jim Blandy <jimb@redhat.com>.
987 * linux-s390-low.c (s390_num_regs): Update.
988 (s390_regmap): Remove control registers. Use __s390x__ predefine
989 instead of GPR_SIZE to distiguish s390 and s390x targets.
991 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
993 * linux-low.c: Update copyright year.
994 (check_removed_breakpoint): Clear pending_is_breakpoint.
995 (linux_set_resume_request, linux_queue_one_thread)
996 (resume_status_pending_p): New functions.
997 (linux_continue_one_thread): Use process->resume.
998 (linux_resume): Only resume threads if there are no pending events.
999 * linux-low.h (struct process_info): Add resume request
1002 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1004 * regcache.c (new_register_cache): Clear the allocated register
1005 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1007 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1009 * linux-low.c (linux_resume): Take a struct thread_resume *
1011 (linux_wait): Update call.
1012 (resume_ptr): New static variable.
1013 (linux_continue_one_thread): Renamed from
1014 linux_continue_one_process. Use resume_ptr.
1015 (linux_resume): Use linux_continue_one_thread.
1016 * server.c (handle_v_cont, handle_v_requests): New functions.
1017 (myresume): New function.
1018 (main): Handle 'v' case.
1019 * target.h (struct thread_resume): New type.
1020 (struct target_ops): Change argument of "resume" to struct
1022 (myresume): Delete macro.
1024 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1026 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1027 (uninstall): Support DESTDIR.
1029 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1031 * configure.srv: Add xscale*linux copy of arm*linux entry.
1033 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1035 * linux-arm-low.c (arm_reinsert_addr): New function.
1036 (the_low_target): Add arm_reinsert_addr.
1038 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1040 * mem-break.c: Remove whitespace at end of file.
1042 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1044 * configure.in: Check whether we need to prototype strerror.
1045 * server.h: Optionally prototype strerror.
1046 * gdbreplay.c (perror_with_name): Use strerror.
1047 * linux-low.c (linux_attach_lwp): Use strerror.
1048 * utils.c (perror_with_name): Use strerror.
1049 * config.in, configure: Regenerated.
1051 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1053 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1054 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1056 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1058 * Makefile.in (SFILES): Update.
1059 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1060 low-sun3.c: Remove files.
1062 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1064 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1065 (linux_detach_one_process, linux_detach): New functions.
1066 (linux_target_ops): Add linux_detach.
1067 * server.c (main): Handle 'D' packet.
1068 * target.h (struct target_ops): Add "detach" member.
1069 (detach_inferior): Define.
1071 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1073 From Kelley Cook <kelleycook@wideopenwest.com>:
1074 * configure.srv: Accept i[34567]86 variants.
1076 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1078 * linux-low.c (linux_wait_for_event): Correct comment typos.
1079 (linux_resume_one_process): Call check_removed_breakpoint.
1080 (linux_send_signal): New function.
1081 (linux_target_ops): Add linux_send_signal.
1082 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1084 * target.h (struct target_ops): Add send_signal.
1086 2003-05-29 Jim Blandy <jimb@redhat.com>
1088 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1089 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1090 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1091 away part of the register's value.
1093 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1095 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1096 (linux_wait_for_event, linux_init_signals): Likewise.
1098 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1100 * configure.in: Check for stdlib.h.
1101 * configure: Regenerated.
1102 * config.in: Regenerated.
1104 2003-01-04 Andreas Schwab <schwab@suse.de>
1106 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1108 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1110 * Makefile.in: Remove obsolete code.
1112 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1114 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1115 defined(PT_FPR0_HI).
1117 2002-11-17 Stuart Hughes <seh@zee2.com>
1119 * linux-arm-low.c (arm_num_regs): Increase.
1120 (arm_regmap): Include status register.
1122 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1124 * linux-low.c (register_addr): Remove incorrect -1 check.
1126 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1128 * linux-low.c (linux_create_inferior): Call setpgid. Return
1130 (unstopped_p, linux_signal_pid): Remove.
1131 (linux_target_ops): Remove linux_signal_pid.
1132 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1133 global instead of target method.
1134 * target.h (struct target_ops): Remove signal_pid. Update comment
1135 for create_inferior.
1136 * server.c (signal_pid): New variable.
1137 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1138 gdbserver. Set the child to be the foreground process group.
1139 (attach_inferior): Set signal_pid.
1141 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1143 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1145 2002-08-20 Jim Blandy <jimb@redhat.com>
1147 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1150 2002-08-01 Andrew Cagney <cagney@redhat.com>
1152 * Makefile.in: Make chill references obsolete.
1154 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1156 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1157 * configure: Regenerate.
1158 * config.in: Regenerate.
1160 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1162 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1163 (perror_with_name, remote_close, remote_open, expect, play): Static.
1165 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1167 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1168 byte offsets instead of an array of indexes.
1169 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1171 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1173 * regcache.c: Add comment.
1175 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1177 * thread-db.c: New file.
1178 * proc-service.c: New file.
1179 * acinclude.m4: New file.
1180 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1181 proc-service.o, and thread-db.o.
1182 (linux-low.o): Add USE_THREAD_DB.
1183 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1184 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1185 * aclocal.m4: Regenerated.
1186 * config.in: Regenerated.
1187 * configure: Regenerated.
1188 * configure.in: Check for proc_service.h, sys/procfs.h,
1189 thread_db.h, and linux/elf.h headrs.
1190 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1191 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1192 Check for -lthread_db and thread support.
1193 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1194 PowerPC, and SuperH.
1195 * i387-fp.c: Constify arguments.
1196 * i387-fp.h: Likewise.
1197 * inferiors.c: (struct thread_info): Renamed from
1198 `struct inferior_info'. Remove PID member. Use generic inferior
1199 list header. All uses updated.
1200 (inferiors, signal_pid): Removed.
1201 (all_threads): New variable.
1202 (get_thread): Define.
1203 (add_inferior_to_list): New function.
1204 (for_each_inferior): New function.
1205 (change_inferior_id): New function.
1206 (add_inferior): Removed.
1207 (remove_inferior): New function.
1208 (add_thread): New function.
1209 (free_one_thread): New function.
1210 (remove_thread): New function.
1211 (clear_inferiors): Use for_each_inferior and free_one_thread.
1212 (find_inferior): New function.
1213 (find_inferior_id): New function.
1214 (inferior_target_data): Update argument type.
1215 (set_inferior_target_data): Likewise.
1216 (inferior_regcache_data): Likewise.
1217 (set_inferior_regcache_data): Likewise.
1218 * linux-low.c (linux_bp_reinsert): Remove.
1219 (all_processes, stopping_threads, using_thrads)
1220 (struct pending_signals, debug_threads, pid_of): New.
1221 (inferior_pid): Replace with macro.
1222 (struct inferior_linux_data): Remove.
1223 (get_stop_pc, add_process): New functions.
1224 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1225 Use add_process and add_thread.
1226 (linux_attach_lwp): New function, based on old linux_attach. Use
1227 add_process and add_thread. Set stop_expected for new threads.
1228 (linux_attach): New function.
1229 (linux_kill_one_process): New function.
1230 (linux_kill): Kill all LWPs.
1231 (linux_thread_alive): Use find_inferior_id.
1232 (check_removed_breakpoints, status_pending_p): New functions.
1233 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1234 Update. Use WNOHANG. Wait for cloned processes also. Update process
1235 struct for the found process.
1236 (linux_wait_for_event): New function.
1237 (linux_wait): Use it. Support LWPs.
1238 (send_sigstop, wait_for_sigstop, stop_all_processes)
1239 (linux_resume_one_process, linux_continue_one_process): New functions.
1240 (linux_resume): Support LWPs.
1241 (REGISTER_RAW_SIZE): Remove.
1242 (fetch_register): Use register_size instead. Call supply_register.
1243 (usr_store_inferior_registers): Likewise. Call collect_register.
1245 (regsets_fetch_inferior_registers): Improve error message.
1246 (regsets_store_inferior_registers): Add debugging.
1247 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1248 (unstopped_p, linux_signal_pid): New functions.
1249 (linux_target_ops): Add linux_signal_pid.
1250 (linux_init_signals): New function.
1251 (initialize_low): Call it. Initialize using_threads.
1252 * regcache.c (inferior_regcache_data): Add valid
1254 (get_regcache): Fetch registers lazily. Add fetch argument
1255 and update all callers.
1256 (regcache_invalidate_one, regcache_invalidate): New
1258 (new_register_cache): Renamed from create_register_cache.
1259 Return the new regcache.
1260 (free_register_cache): Change argument to a void *.
1261 (registers_to_string, registers_from_string): Call get_regcache
1262 with fetch flag set.
1263 (register_data): Make static. Pass fetch flag to get_regcache.
1264 (supply_register): Call get_regcache with fetch flag clear.
1265 (collect_register): Call get_regcache with fetch flag set.
1266 (collect_register_as_string): New function.
1267 * regcache.h: Update.
1268 * remote-utils.c (putpkt): Flush after debug output and use
1270 Handle input interrupts while waiting for an ACK.
1271 (input_interrupt): Use signal_pid method.
1272 (getpkt): Flush after debug output and use stderr.
1273 (outreg): Use collect_register_as_string.
1274 (new_thread_notify, dead_thread_notify): New functions.
1275 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1277 (look_up_one_symbol): Flush after debug output.
1278 * server.c (step_thread, server_waiting): New variables.
1279 (start_inferior): Don't use signal_pid. Update call to mywait.
1280 (attach_inferior): Update call to mywait.
1281 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1282 (main): Don't fetch/store registers explicitly. Use
1283 set_desired_inferior. Support proposed ``Hs'' packet. Update
1286 (struct inferior_list, struct_inferior_list_entry): New.
1287 * target.c (set_desired_inferior): New.
1288 (write_inferior_memory): Constify.
1289 (mywait): New function.
1291 (struct target_ops): New signal_pid method.
1292 (mywait): Removed macro, added prototype.
1294 * linux-low.h (regset_func): Removed.
1295 (regset_fill_func, regset_store_func): New.
1296 (enum regset_type): New.
1297 (struct regset_info): Add type field. Use new operation types.
1298 (struct linux_target_ops): stop_pc renamed to get_pc.
1299 Add decr_pc_after_break and breakpoint_at.
1300 (get_process, get_thread_proess, get_process_thread)
1301 (strut process_info, all_processes, linux_attach_lwp)
1302 (thread_db_init): New.
1304 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1305 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1306 (the_low_target): Add new members.
1307 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1308 (i386_store_fpxregset): Constify.
1309 (target_regsets): Add new kind identifier.
1310 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1311 (i386_set_pc): Add debugging.
1312 (i386_breakpoint_at): New function.
1313 (the_low_target): Add new members.
1314 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1315 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1316 (mips_breakpoint_at): New.
1317 (the_low_target): Add new members.
1318 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1319 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1320 (the_low_target): Add new members.
1321 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1322 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1323 (the_low_target): Add new members.
1324 * linux-x86-64-low.c (target_regsets): Add new kind
1327 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1329 From Martin Pool <mbp@samba.org>:
1330 * server.c (gdbserver_usage): New function.
1333 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1335 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1338 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1340 * Makefile.in: Remove obsolete code.
1342 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1344 * linux-low.c (regsets_fetch_inferior_registers),
1345 (regsets_store_inferior_registers): Removed cast to int from
1347 * regcache.h: Added declaration of struct inferior_info.
1349 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1351 * inferiors.c (struct inferior_info): Add regcache_data.
1352 (add_inferior): Call create_register_cache.
1353 (clear_inferiors): Call free_register_cache.
1354 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1355 * regcache.c (struct inferior_regcache_data): New.
1356 (registers): Remove.
1357 (get_regcache): New function.
1358 (create_register_cache, free_register_cache): New functions.
1359 (set_register_cache): Don't initialize the register cache here.
1360 (registers_to_string, registers_from_string, register_data): Call
1362 * regcache.h: Add prototypes.
1363 * server.h: Likewise.
1365 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1367 * mem-break.c: New file.
1368 * mem-break.h: New file.
1369 * Makefile.in: Add mem-break.o rule; update server.h
1371 * inferiors.c (struct inferior_info): Add target_data
1373 (clear_inferiors): Free target_data member if set.
1374 (inferior_target_data, set_inferior_target_data): New functions.
1375 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1376 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1377 * linux-low.c (linux_bp_reinsert): New variable.
1378 (struct inferior_linux_data): New.
1379 (linux_create_inferior): Use set_inferior_target_data.
1380 (linux_attach): Likewise. Call add_inferior.
1381 (linux_wait_for_one_inferior): New function.
1382 (linux_wait): Call it.
1383 (linux_write_memory): Add const.
1384 (initialize_low): Call set_breakpoint_data.
1385 * linux-low.h (struct linux_target_ops): Add breakpoint
1387 * server.c (attach_inferior): Remove extra add_inferior
1389 * server.h: Include mem-break.h. Update inferior.c
1391 * target.c (read_inferior_memory)
1392 (write_inferior_memory): New functions.
1393 * target.h (read_inferior_memory)
1394 (write_inferior_memory): Change macros to prototypes.
1395 (struct target_ops): Update comments. Add const to write_memory
1398 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1400 * linux-low.c (usr_store_inferior_registers): Support
1401 registers which are allowed to fail to store.
1402 * linux-low.h (linux_target_ops): Likewise.
1403 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1404 (ppc_cannot_store_register): FPSCR may not be storable.
1406 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1408 * server.h: Include <string.h> if HAVE_STRING_H.
1409 * ChangeLog: Correct paths in last ChangeLog entry.
1411 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1413 * linux-low.h: Remove obsolete prototypes.
1414 (struct linux_target_ops): New.
1415 (extern the_low_target): New.
1416 * linux-low.c (num_regs, regmap): Remove declarations.
1417 (register_addr): Use the_low_target explicitly.
1418 (fetch_register): Likewise.
1419 (usr_fetch_inferior_registers): Likewise.
1420 (usr_store_inferior_registers): Likewise.
1421 * linux-arm-low.c (num_regs): Remove.
1422 (arm_num_regs): Define.
1423 (arm_regmap): Renamed from regmap, made static.
1424 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1426 (arm_cannot_store_register): Renamed from cannot_store_register,
1428 (the_low_target): New.
1429 * linux-i386-low.c (num_regs): Remove.
1430 (i386_num_regs): Define.
1431 (i386_regmap): Renamed from regmap, made static.
1432 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1434 (i386_cannot_store_register): Renamed from cannot_store_register,
1436 (the_low_target): New.
1437 * linux-ia64-low.c (num_regs): Remove.
1438 (ia64_num_regs): Define.
1439 (ia64_regmap): Renamed from regmap, made static.
1440 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1442 (ia64_cannot_store_register): Renamed from cannot_store_register,
1444 (the_low_target): New.
1445 * linux-m68k-low.c (num_regs): Remove.
1446 (m68k_num_regs): Define.
1447 (m68k_regmap): Renamed from regmap, made static.
1448 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1450 (m68k_cannot_store_register): Renamed from cannot_store_register,
1452 (the_low_target): New.
1453 * linux-mips-low.c (num_regs): Remove.
1454 (mips_num_regs): Define.
1455 (mips_regmap): Renamed from regmap, made static.
1456 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1458 (mips_cannot_store_register): Renamed from cannot_store_register,
1460 (the_low_target): New.
1461 * linux-ppc-low.c (num_regs): Remove.
1462 (ppc_num_regs): Define.
1463 (ppc_regmap): Renamed from regmap, made static.
1464 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1466 (ppc_cannot_store_register): Renamed from cannot_store_register,
1468 (the_low_target): New.
1469 * linux-s390-low.c (num_regs): Remove.
1470 (s390_num_regs): Define.
1471 (s390_regmap): Renamed from regmap, made static.
1472 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1474 (s390_cannot_store_register): Renamed from cannot_store_register,
1476 (the_low_target): New.
1477 * linux-sh-low.c (num_regs): Remove.
1478 (sh_num_regs): Define.
1479 (sh_regmap): Renamed from regmap, made static.
1480 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1482 (sh_cannot_store_register): Renamed from cannot_store_register,
1484 (the_low_target): New.
1485 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1486 (the_low_target): New.
1488 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1490 * Makefile.in: Add stamp-h target.
1491 * configure.in: Create stamp-h.
1492 * configure: Regenerated.
1494 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1496 * inferiors.c: New file.
1497 * target.c: New file.
1498 * target.h: New file.
1499 * Makefile.in: Add target.o and inferiors.o. Update
1501 * linux-low.c (inferior_pid): New static variable,
1502 moved from server.c.
1503 (linux_create_inferior): Renamed from create_inferior.
1504 Call add_inferior. Return 0 on success instead of a PID.
1505 (linux_attach): Renamed from myattach.
1506 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1507 (linux_thread_alive): Renamed from mythread_alive.
1508 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1510 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1511 (regsets_store_inferior_registers): Correct error message.
1512 Add missing ``return 0''.
1513 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1514 (linux_store_registers): Renamed from store_inferior_registers.
1515 (linux_read_memory): Renamed from read_inferior_memory.
1516 (linux_write_memory): Renamed from write_inferior_memory.
1517 (linux_target_ops): New structure.
1518 (initialize_low): Call set_target_ops ().
1519 * remote-utils.c (unhexify): New function.
1520 (hexify): New function.
1521 (input_interrupt): Send signals to ``signal_pid''.
1522 * server.c (inferior_pid): Remove.
1523 (start_inferior): Update create_inferior call.
1524 (attach_inferior): Call add_inferior.
1525 (handle_query): New function.
1526 (main): Call handle_query for `q' packets.
1527 * server.h: Include "target.h". Remove obsolete prototypes.
1528 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1530 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1532 * Makefile.in: Add WARN_CFLAGS. Update configury
1534 * configure.in: Check for <string.h>
1535 * configure: Regenerate.
1536 * config.in: Regenerate.
1537 * gdbreplay.c: Include needed system headers.
1538 (remote_open): Remove strchr prototype.
1539 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1540 * regcache.c (supply_register): Change buf argument to const void *.
1541 (supply_register_by_name): Likewise.
1542 (collect_register): Change buf argument to void *.
1543 (collect_register_by_name): Likewise.
1544 * regcache.h: Add missing prototypes.
1545 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1546 * server.c (handle_query): New function.
1547 (attached): New static variable, moved out of main.
1548 (main): Quiet longjmp clobber warnings.
1549 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1550 * utils.c (error): Remove NORETURN.