1 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4 accessing non-seekable spufs files.
6 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8 * server.c (handle_query): Add reply for qC packet.
10 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11 Leo Zayas <lerele@champenstudios@com>
13 * server.h (check_remote_input_interrupt_request): New function.
14 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17 (check_remote_input_interrupt_request): New function.
18 * server.h (check_remote_input_interrupt_request): Declare.
19 * win32-low.c (winapi_DebugBreakProcess,
20 winapi_GenerateConsoleCtrlEvent): New typedefs.
21 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
23 (win32_wait): Check for remote interrupt request
24 with check_remote_input_interrupt_request.
25 (win32_request_interrupt): New function.
26 (win32_target_op): Set request_interrupt to win32_request_interrupt.
28 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
30 * win32-low.c (debug_registers_changed,
31 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
32 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
33 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
34 (thread_rec): Get context using the low target.
35 (child_add_thread): Call thread_added on the low target,
36 which does the same thing.
38 (do_initial_child_stuff): Remove debug registers references.
39 Set context using the low target. Resume threads after
41 (child_continue): Remove dead variable. Remove debug
43 (child_fetch_inferior_registers): Go through the low target.
44 (do_child_store_inferior_registers): Remove.
45 (child_store_inferior_registers): Go through the low target.
46 (win32_resume): Remove debug registers references.
47 Set context using the low target.
48 (handle_exception): Change return type to void. Don't record
49 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
50 first chance exception.
51 (get_child_debug_event): Change return type to void. Remove
52 goto loop. Always return after waiting for debug event.
53 (win32_wait): Convert to switch statement. Handle spurious
56 * win32-i386-low.c (debug_registers_changed,
57 debug_registers_used): New.
58 (initial_stuff): Rename to ...
59 (i386_initial_stuff): ... this. Clear debug registers
61 (store_debug_registers): Delete.
62 (i386_get_thread_context): New.
63 (load_debug_registers): Delete.
64 (i386_set_thread_context): New.
65 (i386_thread_added): New.
66 (single_step): Rename to ...
67 (i386_single_step): ... this.
68 (do_fetch_inferior_registers): Rename to ...
69 (i386_fetch_inferior_register): ... this.
70 (i386_store_inferior_register): New.
71 (the_low_target): Adapt to new interface.
73 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
74 (arm_get_thread_context): New.
75 (arm_set_thread_context): New.
77 (do_fetch_inferior_registers): Rename to ...
78 (arm_fetch_inferior_register): ... this.
79 (arm_store_inferior_register): New.
80 (arm_wince_breakpoint): Reimplement as unsigned long.
81 (arm_wince_breakpoint_len): Define.
82 (the_low_target): Adapt to new interface.
84 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
85 load_debug_registers. Add get_thread_context, set_thread_context,
86 thread_added and store_inferior_register. Rename
87 fetch_inferior_registers to fetch_inferior_register.
88 (regptr): Remove declaration.
90 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
92 * linux-low.c (linux_detach): Change return type to int. Return 0.
93 * spu-low.c (spu_detach): Likewise.
95 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
97 * target.h (target_ops): Change return type of detach to int.
100 * server.c (main): Don't skip detach support on mingw32.
101 If the inferior doesn't support detaching return error.
102 Call join_inferior instead of using waitpid.
103 * linux-low.c (linux_join): New.
104 (linux_target_op): Add linux_join.
105 * spu-low.c (spu_join): New.
106 (spu_target_ops): Add spu_join.
107 * win32-low.c (win32_detach): Adapt to new interface.
108 Reopen current_process_handle before detaching. Issue a child
109 resume before detaching.
111 (win32_target_op): Add win32_join.
113 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
115 * win32-low.c (win32-attach): Fix return value.
116 * target.h (target_ops): Describe ATTACH return values.
118 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
120 * win32-low.c (GETPROCADDRESS): Define.
121 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
122 (winapi_DebugSetProcessKillOnExit): Likewise.
123 (win32_create_inferior): Force usage of ansi CreateProcessA.
124 (win32_attach): Use GETPROCADDRESS.
125 (win32_detach): Likewise.
127 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
129 * win32-low.c (win32_wait): Don't use WSTOPSIG.
131 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
133 * win32-low.c: Commit leftover changes from 2007-03-29.
135 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
137 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
138 fields short instead of int. Add explicit padding.
139 (i387_cache_to_fsave): Remove unnecessary casts.
140 (i387_fsave_to_cache): Doc fix.
141 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
143 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
145 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
146 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
148 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
150 * configure.srv (arm*-*-mingw32ce*): Move near the other
153 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
155 * configure.ac: Add errno checking.
156 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
157 sys/file.h and malloc.h.
158 (AC_CHECK_DECLS): Add perror.
159 (srv_mingwce): Handle.
160 * configure.srv (i[34567]86-*-cygwin*): Add
161 win32-i386-low.o to srv_tgtobj.
162 (i[34567]86-*-mingw*): Likewise.
163 (arm*-*-mingw32ce*): Add case.
164 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
165 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
166 [__MINGW32CE__] (strerror): New function.
167 [__MINGW32CE__] (errno): Define to GetLastError.
168 [__MINGW32CE__] (COUNTOF): New macro.
169 (remote_open): Remove extra close call.
170 * mem-break.c (delete_breakpoint_at): New function.
171 * mem-break.h (delete_breakpoint_at): Declare.
172 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
173 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
174 [USE_WIN32API] (read, write): Add char* casts.
175 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
176 * server.h: Include wincecompat.h on Windows CE.
177 [HAVE_ERRNO_H]: Check.
178 (perror): Declare if not declared.
179 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
180 (perror_with_name): Remove errno declaration.
181 * wincecompat.h: New.
182 * wincecompat.c: New.
184 * win32-arm-low.c: New.
185 * win32-i386-low.c: New.
186 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
187 (OUTMSG2): Make it safe.
189 (COUNTOF): New macro.
190 (NUM_REGS): Get it from the low target.
191 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
192 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
193 (thread_rec): Let low target handle debug registers.
194 (child_add_thread): Likewise.
195 (child_init_thread_list): Likewise.
196 (continue_one_thread): Likewise.
198 (do_child_fetch_inferior_registers): Move to ...
199 * win32-i386-low.c: ... here, and rename to ...
200 (do_fetch_inferior_registers): ... this.
201 * win32-low.c (child_fetch_inferior_registers):
202 Go through the low target.
203 (do_child_store_inferior_registers): Use regptr.
204 (strwinerror): New function.
205 (win32_create_inferior): Handle Windows CE.
206 Use strwinerror instead of strerror on Windows error
207 codes. Add program to the error output.
208 Don't close the main thread handle on Windows CE.
209 (win32_attach): Use coredll.dll on Windows CE.
210 (win32_kill): Close current process and current
212 (win32_detach): Use coredll.dll on Windows CE.
213 (win32_resume): Let low target handle debug registers, and
215 (handle_exception): Add/Remove initial breakpoint. Avoid
216 non-existant WSTOPSIG on Windows CE.
217 (win32_read_inferior_memory): Cast to remove warning.
218 (win32_arch_string): Go through the low target.
219 (initialize_low): Call set_breakpoint_data with the low
221 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
222 FOP_REGNUM, mappings): Move to ...
223 * win32-i386-low.c: ... here.
224 * win32-low.c (win32_thread_info): Move to ...
225 * win32-low.h: ... here.
226 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
227 win32-arm-low.c and wincecompat.c.
229 (install-only:): Likewise.
230 (gdbserver:): Likewise.
231 (gdbreplay:): Likewise.
232 * config.in: Regenerate.
233 * configure: Regenerate.
235 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
237 * win32-low.c: Rename typedef thread_info to
238 win32_thread_info throughout.
240 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
242 * win32-i386-low.c: Rename to ...
243 * win32-low.c: ... this.
244 * configure.srv: Replace win32-i386-low.o with win32-low.o.
245 * Makefile.in: Likewise.
247 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
249 * remote-utils.c (monitor_output): Constify msg parameter.
250 * server.h (monitor_output): Likewise.
251 * win32-i386-low.c (handle_output_debug_string): New.
252 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
253 handle_output_debug_string.
254 (get_child_debug_event): Likewise.
256 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
258 * server.c (main): Correct strtoul check.
260 2007-03-27 Jon Ringle <jon@ringle.org>
262 * linux-low.c: Check __ARCH_HAS_MMU__ also.
264 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
266 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
268 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
270 * terminal.h: Check HAVE_SGTTY_H.
272 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
274 * remote-utils.c (remote_open): Print out the assigned port number.
276 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
278 * remote-utils.c (monitor_output): New function.
279 * server.c (debug_threads): Define here.
280 (monitor_show_help): New function.
281 (handle_query): Handle qRcmd.
282 (main): Do not handle 'd' packet.
283 * server.h (debug_threads, remote_debug, monitor_output): Declare.
284 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
287 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
289 * Makefile.in (EXEEXT): New.
290 (clean): Use $(EXEEXT).
292 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
294 * target.h (target_ops): Rename send_signal to request_interrupt,
295 and remove enum target_signal parameter.
296 * linux-low.c (linux_request_interrupt): Rename from
297 linux_send_signal, and always send SIGINT.
298 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
299 and always send SIGINT.
300 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
302 (input_interrupt): Likewise.
304 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
306 * server.c (get_features_xml): Check if target implemented
308 * win32-i386-low.c (win32_arch_string): New.
309 (win32_target_ops): Add win32_arch_string as arch_string member.
311 2007-02-22 Markus Deuling <deuling@de.ibm.com>
313 * spu-low.c (spu_arch_string): New.
314 (spu_target_ops): Add spu_arch_string.
316 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
318 * remote-utils.c: Remove HAVE_TERMINAL_H check.
319 * configure.ac: Do not check for terminal.h.
320 * configure, config.in: Regenerated.
322 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
324 * Makefile.in (OBS): Add $(XML_BUILTIN).
325 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
327 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
328 (arm-with-iwmmxt.c): New.
329 * config.in, configure: Regenerate.
330 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
331 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
332 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
333 (arm*-*-linux*): Add iWMMXt and regset support.
334 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
335 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
336 (arm_store_wmmxregset, target_regsets): New.
337 * server.c (get_features_xml): Take annex argument. Check builtin
339 (handle_query): Handle multiple annexes.
341 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
343 * remote-utils.c [USE_WIN32API] (read, write): Define.
344 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
347 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
349 * linux-i386-low.c (the_low_target): Set arch_string.
350 * linux-x86-64-low.c (the_low_target): Likewise.
351 * linux-low.c (linux_arch_string): New.
352 (linux_target_ops): Add it.
353 * linux-low.h (struct linux_target_ops): Add arch_string.
354 * server.c (write_qxfer_response): Use const void * for DATA.
355 (get_features_xml): New.
356 (handle_query): Handle qXfer:features:read. Report it for qSupported.
357 * target.h (struct target_ops): Add arch_string method.
359 2007-01-03 Denis Pilat <denis.pilat@st.com>
360 Daniel Jacobowitz <dan@codesourcery.com>
362 * linux-low.c (linux_kill): Handle being called with no threads.
363 * win32-i386-low.c (win32_kill): Likewise.
364 (get_child_debug_event): Clear current_process_handle.
366 2006-12-30 Denis PILAT <denis.pilat@st.com>
367 Daniel Jacobowitz <dan@codesourcery.com>
369 * remote-utils.c (remote_open): Check the type of specified
370 serial port devices before opening them.
371 * server.c (main): Kill the inferior if an error occurs during
372 the first remote_open.
374 2006-12-05 Markus Deuling <deuling@de.ibm.com>
376 * README: Update supported targets.
378 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
380 * Makefile.in (clean): Remove reg-mips64.c.
381 (reg-mips64.c, reg-mips64.o): New rules.
382 * configure.srv: Handle mips64. Include regset support for mips.
383 * linux-mips-low.c (union mips_register): New.
384 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
385 (mips_breakpoint, mips_breakpoint_at): Use int.
386 (mips_collect_register, mips_supply_register)
387 (mips_collect_register_32bit, mips_supply_register_32bit)
388 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
389 (mips_store_fpregset, target_regsets): New.
390 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
392 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
394 * configure.srv: Add target "spu*-*-*".
395 * Makefile.in (clean): Remove reg-spu.c.
396 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
397 * spu-low.c: New file.
399 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
401 * configure.ac: Correct td_thr_tls_get_addr test.
402 * configure: Regenerated.
404 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
406 * linux-low.c (linux_wait_for_event): Reformat. Use the
408 * remote-utils.c (decode_address_to_semicolon): New.
409 * server.c (pass_signals, handle_general_set): New.
410 (handle_query): Mention QPassSignals for qSupported.
411 (main): Call handle_general_set.
412 * server.h (pass_signals, decode_address_to_semicolon): New.
414 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
416 * server.c (handle_query): Correct error handling for read_auxv.
418 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
420 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
421 and srv_linux_thread_db to yes.
422 * linux-s390-low.c (s390_fill_gregset): New function.
423 (target_regsets): Define data structure.
425 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
427 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
428 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
429 * config.in, configure: Regenerated.
430 * inferiors.c (gdb_id_to_thread): New function.
431 (gdb_id_to_thread_id): Use it.
432 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
433 * linux-low.h (struct process_info): Add th member.
434 (thread_db_get_tls_address): New prototype.
435 * remote-utils.c (decode_address): Make non-static.
436 * server.c (handle_query): Handle qGetTLSAddr.
437 * server.h (gdb_id_to_thread, decode_address): New prototypes.
438 * target.h (struct target_ops): Add get_tls_address.
439 * thread-db.c (maybe_attach_thread): Save the thread handle.
440 (thread_db_get_tls_address): New.
442 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
444 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
445 (linux_resume_one_process): Take a siginfo_t *. Update all
446 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
447 (struct pending_signals): Add a siginfo_t.
448 (linux_wait_for_process): Always set last_status.
449 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
450 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
451 * linux-low.h (struct process_info): Add last_status.
453 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
455 * remote-utils.c (try_rle): New function.
456 (putpkt_binary): Use it.
458 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
460 * Makefile.in (clean): Clean reg-x86-64-linux.c.
461 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
462 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
463 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
464 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
467 2006-08-08 Richard Sandiford <richard@codesourcery.com>
469 * server.c (terminal_fd): New variable.
470 (old_foreground_pgrp): Likewise.
471 (restore_old_foreground_pgrp): New function.
472 (start_inferior): Record the terminal file descriptor in terminal_fd
473 and its original foreground group in old_foreground_pgrp. Register
474 restore_old_foreground_pgrp with atexit().
476 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
478 * server.c (handle_query): Correct qPart to qXfer.
480 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
482 * configure.ac: Check for more headers which are missing on
483 Windows. Automatically supply -lwsock32 and USE_WIN32API.
484 * configure.srv: Add Cygwin and mingw32.
485 * remote-utils.c: Don't include headers unconditionally which
486 are missing on mingw32. Include <winsock.h> for mingw32.
487 (remote_open): Adjust for mingw32 support. Flush
488 standard error after writing to it.
489 (remote_close, putpkt_binary, input_interrupt, block_async_io)
490 (unblock_async_io, enable_async_io, disable_async_io)
491 (readchar, getpkt): Update for Winsock support.
492 (prepare_resume_reply): Expect a protocol signal number.
493 * server.c: Disable <sys/wait.h> on mingw32.
494 (start_inferior): Adjust for mingw32 support. Flush
495 standard error after writing to it.
496 (attach_inferior): Likewise. Use protocol signal
498 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
500 * win32-i386-low.c: New file.
501 * Makefile.in (XM_CLIBS): Set.
502 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
503 (win32-i386-low.o): New dependency rule.
504 * linux-low.c (linux_wait): Use target signal numbers.
505 * target.h (struct target_ops): Doc fix.
506 * server.h (target_signal_to_name): New prototype.
507 * gdbreplay.c: Don't include headers unconditionally which
508 are missing on mingw32. Include <winsock.h> for mingw32.
509 (remote_close, remote_open): Adjust for Winsock support.
510 * configure, config.in: Regenerated.
512 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
514 * server.c (decode_xfer_read, write_qxfer_response): New.
515 (handle_query): Take a packet length argument. Handle
516 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
517 the qSupported response.
518 (main): Update call to handle_query.
520 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
522 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
523 (putpkt_binary): Renamed from putpkt and adjusted for binary
525 (putpkt): New wrapper for putpkt_binary.
526 (readchar): Don't mask off the high bit.
527 (decode_X_packet): New function.
528 * server.c (main): Call putpkt_binary if a handler sets the packet
529 length. Save the length of the incoming packet. Handle 'X'.
530 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
532 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
534 * server.c (handle_query): Handle qSupported.
536 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
538 * remote-utils.c (all_symbols_looked_up): New variable.
539 (look_up_one_symbol): Check it.
540 * server.h (look_up_one_symbol): New declaration.
541 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
543 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
545 * Makefile.in (linux-arm-low.o): Update dependencies.
546 * linux-arm-low.c: Include "gdb_proc_service.h".
547 (PTRACE_GET_THREAD_AREA): Define.
548 (ps_get_thread_area): New function.
550 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
552 * configure.srv (m68k*-*-uclinux*): New target.
553 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
554 (linux_resume_one_process): Remove extraneous cast.
555 (linux_read_offsets): New.
556 (linux_target_op): Add linux_read_offsets on mmuless systems.
557 * server.c (handle_query): Add qOffsets logic.
558 * target.h (struct target_ops): Add read_offsets.
560 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
562 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
563 (PTRACE_GET_THREAD_AREA): Define.
564 (ps_get_thread_area): New function.
565 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
566 (linux-x86-64-low.o): Update.
568 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
570 * configure.ac: Remove checks for prfpregset_t.
571 * gdb_proc_service.h: New file.
572 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
573 new "gdb_proc_service.h".
574 * proc-service.c: Likewise.
575 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
576 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
577 * Makefile.in (gdb_proc_service_h): Updated.
578 * configure, config.in: Regenerated.
580 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
582 * remote-utils.c (prepare_resume_reply): Move declaration
583 of gdb_id_from_wait to the top of the block.
585 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
587 * linux-low.c (regsets_store_inferior_registers): Read the regset
588 from the target before filling it.
590 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
592 * server.c (attach_inferior): Return SIGTRAP for a successful
595 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
597 * Makefile.in (OBS): Add version.o.
598 (STAGESTUFF): Delete.
599 (version.o): Add dependencies.
600 (version.c): Replace rule.
601 (clean): Remove version.c.
602 * server.c (gdbserver_version): New.
603 (gdbserver_usage): Use printf.
604 (main): Handle --version and --help.
605 * server.h (version, host_name): Add declarations.
607 2005-12-23 Eli Zaretskii <eliz@gnu.org>
619 * linux-x86-64-low.c:
631 * linux-crisv32-low.c:
643 * gdbserver.1: Add (C) after Copyright. Update the FSF
646 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
648 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
649 (arm_breakpoint_at): Recognize both breakpoints.
650 (the_low_target): Use the correct breakpoint instruction.
652 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
654 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
655 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
656 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
657 (the_low_target): Update.
659 2005-10-25 Andreas Schwab <schwab@suse.de>
661 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
663 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
664 (ia64_num_regs): Reduce to 462.
666 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
668 * acinclude.m4: Correct quoting.
669 * aclocal.m4: Regenerated.
671 Suggested by SZOKOVACS Robert <szo@ies.hu>:
672 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
673 (thread_db_init): Call thread_db_err_str.
674 * configure.ac: Check for TD_VERSION.
675 * config.in, configure: Regenerated.
677 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
679 * server.h (error, fatal, warning): Add ATTR_FORMAT.
681 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
683 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
684 is not available. Define HAVE_PTRACE_GETREGS if it is.
685 * config.in, configure: Regenerated.
686 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
687 * linux-i386-low.c, linux-m68k-low.c: Update to use
689 * linux-low.c (regsets_fetch_inferior_registers)
690 (regsets_store_inferior_registers): Only return 0 if we processed
692 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
693 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
695 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
697 * inferiors.c (struct thread_info): Add gdb_id.
698 (add_thread): Add gdb_id argument.
699 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
700 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
702 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
703 * server.c (handle_query): Use thread_to_gdb_id.
704 (handle_v_cont, main): Use gdb_id_to_thread_id.
705 * server.h (add_thread): Update prototype.
706 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
709 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
711 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
712 left-padded registers.
713 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
714 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
716 2005-07-01 Steve Ellcey <sje@cup.hp.com>
718 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
719 * configure: Regenerate.
720 * config.in: Regenerate.
721 * server.h (NEED_DECLARATION_STRERROR):
722 Replace with !HAVE_DECL_STRERROR.
724 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
726 * linux-low.c (linux_wait, linux_send_signal): Don't test
727 an unsigned long variable for > 0 if it could be MAX_ULONG.
728 * server.c (myresume): Likewise.
729 * target.c (set_desired_inferior): Likewise.
731 2005-06-13 Mark Kettenis <kettenis@gnu.org>
733 * configure.ac: Simplify and improve check for socklen_t.
734 * configure, config.in: Regenerate.
736 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
738 * acconfig.h: Remove.
739 * configure.ac: Add a test for socklen_t. Use three-argument
740 AC_DEFINE throughout.
741 * config.in: Regenerated using autoheader 2.59.
742 * configure: Regenerated.
744 * gdbreplay.c (socklen_t): Provide a default.
745 (remote_open): Use socklen_t.
746 * remote-utils.c (socklen_t): Provide a default.
747 (remote_open): Use socklen_t.
748 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
751 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
753 * linux-low.c (linux_read_memory, linux_write_memory)
754 (linux_read_auxv): Likewise.
755 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
756 (check_mem_write): Likewise.
757 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
759 * regcache.c (struct inferior_rgcache_data, registers_to_string)
760 (registers_from_string, register_data): Likewise.
761 * server.c (handle_query, main): Likewise.
762 * server.h (convert_ascii_to_int, convert_int_to_ascii)
763 (decode_M_packet): Likewise.
764 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
765 * target.h (struct target_ops): Update read_memory, write_memory,
767 (read_inferior_memory, write_inferior_memory): Update.
768 * linux-low.h (struct linux_target_ops): Change type of breakpoint
770 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
771 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
772 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
773 linux-s390-low.c, linux-sh-low.c: Update for changes in
774 read_inferior_memory and the_low_target->breakpoint.
776 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
778 * Makefile.in (SFILES): Add linux-ppc64-low.c.
779 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
780 * configure.srv: Add powerpc64-*-linux*.
781 * linux-ppc64-low.c: New file.
783 2005-05-23 Orjan Friberg <orjanf@axis.com>
785 * linux-cris-low.c: New file with support for CRIS.
786 * linux-crisv32-low.c: Ditto for CRISv32.
787 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
788 (clean): Add reg-cris.c and reg-crisv32.c.
789 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
790 reg-crisv32.o, and reg-crisv32.c to make rules.
791 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
794 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
796 * linux-low.c (fetch_register): Ensure buffer size is a multiple
797 of sizeof (PTRACE_XFER_TYPE).
798 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
800 2005-05-12 Orjan Friberg <orjanf@axis.com>
802 * target.h (struct target_ops): Add insert_watchpoint,
803 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
804 pointers for hardware watchpoint support.
805 * linux-low.h (struct linux_target_ops): Ditto.
806 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
807 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
809 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
811 * server.c (main): Recognize 'Z' and 'z' packets.
813 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
815 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
816 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
817 (the_low_target): Add new members.
819 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
821 * proc-service.c (ps_lgetregs): Search all_processes instead of
824 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
826 * server.c (start_inferior): Change return type to int.
827 (attach_inferior): Change sigptr to int *.
828 (handle_v_cont, handle_v_requests): Change signal to int *.
829 (main): Change signal to int.
831 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
833 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
834 * configure.srv: Add m32r*-*-linux*.
835 * linux-m32r-low.c: New file.
837 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
839 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
841 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
843 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
844 Take unsigned long arguments for PIDs.
845 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
846 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
847 (wait_for_sigstop, linux_resume_one_process)
848 (regsets_fetch_inferior_registers, linux_send_signal)
849 (linux_read_auxv): Likewise. Update the types of variables holding
850 PIDs. Update format string specifiers.
851 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
852 * remote-utils.c (prepare_resume_reply): Likewise.
853 * server.c (cont_thread, general_thread, step_thread)
854 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
856 (handle_query): Update format specifiers.
857 (handle_v_cont, main): Use strtoul for thread IDs.
858 * server.h (struct inferior_list_entry): Use unsigned long for ID.
859 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
860 (general_thread, step_thread, thread_from_wait)
861 (old_thread_from_wait): Update.
862 * target.h (struct thread_resume): Use unsigned long for THREAD.
863 (struct target_ops): Use unsigned long for arguments to attach and
866 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
868 * acinclude.m4: Include bfd/bfd.m4 directly.
869 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
870 <agriffis@toolchain.org>.
871 * aclocal.m4, configure: Regenerated.
873 2005-01-07 Andrew Cagney <cagney@gnu.org>
875 * configure.ac: Rename configure.in, require autoconf 2.59.
876 * configure: Re-generate.
878 2004-12-08 Daniel Jacobowitz <dan@debian.org>
880 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
882 * aclocal.m4: Regenerated.
883 * configure: Regenerated.
885 2004-11-21 Andreas Schwab <schwab@suse.de>
887 * linux-m68k-low.c (m68k_num_gregs): Define.
888 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
889 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
890 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
891 (m68k_breakpoint_at): New. Add to the_low_target.
893 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
894 srv_linux_thread_db to yes.
896 2004-10-20 Joel Brobecker <brobecker@gnat.com>
898 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
899 (ARCH_SET_FS): Likewise.
900 (ARCH_GET_FS): Likewise.
901 (ARCH_GET_GS): Likewise.
903 2004-10-16 Daniel Jacobowitz <dan@debian.org>
905 * linux-i386-low.c (ps_get_thread_area): New.
906 * linux-x86-64-low.c (ps_get_thread_area): New.
907 * linux-low.c: Include <sys/syscall.h>.
908 (linux_kill_one_process): Don't kill the first thread here.
909 (linux_kill): Kill the first thread here.
910 (kill_lwp): New function.
911 (send_sigstop, linux_send_signal): Use it.
912 * proc-service.c: Clean up #ifdefs.
913 (fpregset_info): Delete.
914 (ps_lgetregs): Update and enable implementation.
915 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
917 * remote-utils.c (struct sym_cache, symbol_cache): New.
918 (input_interrupt): Print a clearer message.
919 (async_io_enabled): New variable.
920 (enable_async_io, disable_async_io): Use it. Update comments.
921 (look_up_one_symbol): Use the symbol cache.
922 * thread-db.c (thread_db_look_up_symbols): New function.
923 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
925 2004-10-16 Daniel Jacobowitz <dan@debian.org>
927 * configure.in: Test for -rdynamic.
928 * configure: Regenerated.
929 * Makefile (INTERNAL_LDFLAGS): New.
930 (gdbserver, gdbreplay): Use it.
932 2004-09-02 Andrew Cagney <cagney@gnu.org>
934 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
936 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
938 * linux-low.c (linux_wait): Clear all_processes list also.
940 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
942 * linux-low.c: Include <errno.h>. Remove extern declaration of
945 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
947 * gdbreplay.c, server.h, utils.c: Update copyright years.
949 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
951 * server.c (main): Print child status or termination signal from
952 variable 'signal', not 'sig'.
954 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
956 * linux-low.c (linux_read_memory): Change return type to
957 int. Check for and return error from ptrace().
958 * target.c (read_inferior_memory): Change return type to int. Pass
959 back return status from the_target->read_memory().
960 * target.h (struct target_ops): Adapt *read_memory() prototype.
962 (read_inferior_memory): Adapt prototype.
963 * server.c (main): Return an error packet if
964 read_inferior_memory() returns an error.
966 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
968 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
969 Unify with other clean targets.
971 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
973 * server.c (handle_v_cont): Call set_desired_inferior.
975 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
977 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
979 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
981 * linux-low.c (linux_wait): Unblock async I/O.
982 (linux_resume): Block and enable async I/O.
983 * remote-utils.c (block_async_io, unblock_async_io): New functions.
984 * server.h (block_async_io, unblock_async_io): Add prototypes.
986 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
988 * remote-utils.c (remote_open): Print a status notice after
990 * server.c (attach_inferior): Print a status notice after
993 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
995 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
997 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
999 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1001 * server.c, target.h: Update copyright years.
1003 2004-02-25 Roland McGrath <roland@redhat.com>
1005 * target.h (struct target_ops): New member `read_auxv'.
1006 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1007 * linux-low.c (linux_read_auxv): New function.
1008 (linux_target_ops): Initialize `read_auxv' member to that.
1010 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1012 Committed by Jim Blandy <jimb@redhat.com>.
1014 * linux-s390-low.c (s390_num_regs): Update.
1015 (s390_regmap): Remove control registers. Use __s390x__ predefine
1016 instead of GPR_SIZE to distiguish s390 and s390x targets.
1018 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1020 * linux-low.c: Update copyright year.
1021 (check_removed_breakpoint): Clear pending_is_breakpoint.
1022 (linux_set_resume_request, linux_queue_one_thread)
1023 (resume_status_pending_p): New functions.
1024 (linux_continue_one_thread): Use process->resume.
1025 (linux_resume): Only resume threads if there are no pending events.
1026 * linux-low.h (struct process_info): Add resume request
1029 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1031 * regcache.c (new_register_cache): Clear the allocated register
1032 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1034 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1036 * linux-low.c (linux_resume): Take a struct thread_resume *
1038 (linux_wait): Update call.
1039 (resume_ptr): New static variable.
1040 (linux_continue_one_thread): Renamed from
1041 linux_continue_one_process. Use resume_ptr.
1042 (linux_resume): Use linux_continue_one_thread.
1043 * server.c (handle_v_cont, handle_v_requests): New functions.
1044 (myresume): New function.
1045 (main): Handle 'v' case.
1046 * target.h (struct thread_resume): New type.
1047 (struct target_ops): Change argument of "resume" to struct
1049 (myresume): Delete macro.
1051 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1053 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1054 (uninstall): Support DESTDIR.
1056 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1058 * configure.srv: Add xscale*linux copy of arm*linux entry.
1060 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1062 * linux-arm-low.c (arm_reinsert_addr): New function.
1063 (the_low_target): Add arm_reinsert_addr.
1065 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1067 * mem-break.c: Remove whitespace at end of file.
1069 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1071 * configure.in: Check whether we need to prototype strerror.
1072 * server.h: Optionally prototype strerror.
1073 * gdbreplay.c (perror_with_name): Use strerror.
1074 * linux-low.c (linux_attach_lwp): Use strerror.
1075 * utils.c (perror_with_name): Use strerror.
1076 * config.in, configure: Regenerated.
1078 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1080 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1081 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1083 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1085 * Makefile.in (SFILES): Update.
1086 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1087 low-sun3.c: Remove files.
1089 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1091 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1092 (linux_detach_one_process, linux_detach): New functions.
1093 (linux_target_ops): Add linux_detach.
1094 * server.c (main): Handle 'D' packet.
1095 * target.h (struct target_ops): Add "detach" member.
1096 (detach_inferior): Define.
1098 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1100 From Kelley Cook <kelleycook@wideopenwest.com>:
1101 * configure.srv: Accept i[34567]86 variants.
1103 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1105 * linux-low.c (linux_wait_for_event): Correct comment typos.
1106 (linux_resume_one_process): Call check_removed_breakpoint.
1107 (linux_send_signal): New function.
1108 (linux_target_ops): Add linux_send_signal.
1109 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1111 * target.h (struct target_ops): Add send_signal.
1113 2003-05-29 Jim Blandy <jimb@redhat.com>
1115 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1116 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1117 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1118 away part of the register's value.
1120 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1122 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1123 (linux_wait_for_event, linux_init_signals): Likewise.
1125 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1127 * configure.in: Check for stdlib.h.
1128 * configure: Regenerated.
1129 * config.in: Regenerated.
1131 2003-01-04 Andreas Schwab <schwab@suse.de>
1133 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1135 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1137 * Makefile.in: Remove obsolete code.
1139 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1141 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1142 defined(PT_FPR0_HI).
1144 2002-11-17 Stuart Hughes <seh@zee2.com>
1146 * linux-arm-low.c (arm_num_regs): Increase.
1147 (arm_regmap): Include status register.
1149 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1151 * linux-low.c (register_addr): Remove incorrect -1 check.
1153 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1155 * linux-low.c (linux_create_inferior): Call setpgid. Return
1157 (unstopped_p, linux_signal_pid): Remove.
1158 (linux_target_ops): Remove linux_signal_pid.
1159 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1160 global instead of target method.
1161 * target.h (struct target_ops): Remove signal_pid. Update comment
1162 for create_inferior.
1163 * server.c (signal_pid): New variable.
1164 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1165 gdbserver. Set the child to be the foreground process group.
1166 (attach_inferior): Set signal_pid.
1168 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1170 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1172 2002-08-20 Jim Blandy <jimb@redhat.com>
1174 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1177 2002-08-01 Andrew Cagney <cagney@redhat.com>
1179 * Makefile.in: Make chill references obsolete.
1181 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1183 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1184 * configure: Regenerate.
1185 * config.in: Regenerate.
1187 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1189 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1190 (perror_with_name, remote_close, remote_open, expect, play): Static.
1192 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1194 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1195 byte offsets instead of an array of indexes.
1196 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1198 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1200 * regcache.c: Add comment.
1202 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1204 * thread-db.c: New file.
1205 * proc-service.c: New file.
1206 * acinclude.m4: New file.
1207 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1208 proc-service.o, and thread-db.o.
1209 (linux-low.o): Add USE_THREAD_DB.
1210 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1211 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1212 * aclocal.m4: Regenerated.
1213 * config.in: Regenerated.
1214 * configure: Regenerated.
1215 * configure.in: Check for proc_service.h, sys/procfs.h,
1216 thread_db.h, and linux/elf.h headrs.
1217 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1218 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1219 Check for -lthread_db and thread support.
1220 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1221 PowerPC, and SuperH.
1222 * i387-fp.c: Constify arguments.
1223 * i387-fp.h: Likewise.
1224 * inferiors.c: (struct thread_info): Renamed from
1225 `struct inferior_info'. Remove PID member. Use generic inferior
1226 list header. All uses updated.
1227 (inferiors, signal_pid): Removed.
1228 (all_threads): New variable.
1229 (get_thread): Define.
1230 (add_inferior_to_list): New function.
1231 (for_each_inferior): New function.
1232 (change_inferior_id): New function.
1233 (add_inferior): Removed.
1234 (remove_inferior): New function.
1235 (add_thread): New function.
1236 (free_one_thread): New function.
1237 (remove_thread): New function.
1238 (clear_inferiors): Use for_each_inferior and free_one_thread.
1239 (find_inferior): New function.
1240 (find_inferior_id): New function.
1241 (inferior_target_data): Update argument type.
1242 (set_inferior_target_data): Likewise.
1243 (inferior_regcache_data): Likewise.
1244 (set_inferior_regcache_data): Likewise.
1245 * linux-low.c (linux_bp_reinsert): Remove.
1246 (all_processes, stopping_threads, using_thrads)
1247 (struct pending_signals, debug_threads, pid_of): New.
1248 (inferior_pid): Replace with macro.
1249 (struct inferior_linux_data): Remove.
1250 (get_stop_pc, add_process): New functions.
1251 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1252 Use add_process and add_thread.
1253 (linux_attach_lwp): New function, based on old linux_attach. Use
1254 add_process and add_thread. Set stop_expected for new threads.
1255 (linux_attach): New function.
1256 (linux_kill_one_process): New function.
1257 (linux_kill): Kill all LWPs.
1258 (linux_thread_alive): Use find_inferior_id.
1259 (check_removed_breakpoints, status_pending_p): New functions.
1260 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1261 Update. Use WNOHANG. Wait for cloned processes also. Update process
1262 struct for the found process.
1263 (linux_wait_for_event): New function.
1264 (linux_wait): Use it. Support LWPs.
1265 (send_sigstop, wait_for_sigstop, stop_all_processes)
1266 (linux_resume_one_process, linux_continue_one_process): New functions.
1267 (linux_resume): Support LWPs.
1268 (REGISTER_RAW_SIZE): Remove.
1269 (fetch_register): Use register_size instead. Call supply_register.
1270 (usr_store_inferior_registers): Likewise. Call collect_register.
1272 (regsets_fetch_inferior_registers): Improve error message.
1273 (regsets_store_inferior_registers): Add debugging.
1274 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1275 (unstopped_p, linux_signal_pid): New functions.
1276 (linux_target_ops): Add linux_signal_pid.
1277 (linux_init_signals): New function.
1278 (initialize_low): Call it. Initialize using_threads.
1279 * regcache.c (inferior_regcache_data): Add valid
1281 (get_regcache): Fetch registers lazily. Add fetch argument
1282 and update all callers.
1283 (regcache_invalidate_one, regcache_invalidate): New
1285 (new_register_cache): Renamed from create_register_cache.
1286 Return the new regcache.
1287 (free_register_cache): Change argument to a void *.
1288 (registers_to_string, registers_from_string): Call get_regcache
1289 with fetch flag set.
1290 (register_data): Make static. Pass fetch flag to get_regcache.
1291 (supply_register): Call get_regcache with fetch flag clear.
1292 (collect_register): Call get_regcache with fetch flag set.
1293 (collect_register_as_string): New function.
1294 * regcache.h: Update.
1295 * remote-utils.c (putpkt): Flush after debug output and use
1297 Handle input interrupts while waiting for an ACK.
1298 (input_interrupt): Use signal_pid method.
1299 (getpkt): Flush after debug output and use stderr.
1300 (outreg): Use collect_register_as_string.
1301 (new_thread_notify, dead_thread_notify): New functions.
1302 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1304 (look_up_one_symbol): Flush after debug output.
1305 * server.c (step_thread, server_waiting): New variables.
1306 (start_inferior): Don't use signal_pid. Update call to mywait.
1307 (attach_inferior): Update call to mywait.
1308 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1309 (main): Don't fetch/store registers explicitly. Use
1310 set_desired_inferior. Support proposed ``Hs'' packet. Update
1313 (struct inferior_list, struct_inferior_list_entry): New.
1314 * target.c (set_desired_inferior): New.
1315 (write_inferior_memory): Constify.
1316 (mywait): New function.
1318 (struct target_ops): New signal_pid method.
1319 (mywait): Removed macro, added prototype.
1321 * linux-low.h (regset_func): Removed.
1322 (regset_fill_func, regset_store_func): New.
1323 (enum regset_type): New.
1324 (struct regset_info): Add type field. Use new operation types.
1325 (struct linux_target_ops): stop_pc renamed to get_pc.
1326 Add decr_pc_after_break and breakpoint_at.
1327 (get_process, get_thread_proess, get_process_thread)
1328 (strut process_info, all_processes, linux_attach_lwp)
1329 (thread_db_init): New.
1331 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1332 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1333 (the_low_target): Add new members.
1334 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1335 (i386_store_fpxregset): Constify.
1336 (target_regsets): Add new kind identifier.
1337 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1338 (i386_set_pc): Add debugging.
1339 (i386_breakpoint_at): New function.
1340 (the_low_target): Add new members.
1341 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1342 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1343 (mips_breakpoint_at): New.
1344 (the_low_target): Add new members.
1345 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1346 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1347 (the_low_target): Add new members.
1348 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1349 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1350 (the_low_target): Add new members.
1351 * linux-x86-64-low.c (target_regsets): Add new kind
1354 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1356 From Martin Pool <mbp@samba.org>:
1357 * server.c (gdbserver_usage): New function.
1360 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1362 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1365 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1367 * Makefile.in: Remove obsolete code.
1369 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1371 * linux-low.c (regsets_fetch_inferior_registers),
1372 (regsets_store_inferior_registers): Removed cast to int from
1374 * regcache.h: Added declaration of struct inferior_info.
1376 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1378 * inferiors.c (struct inferior_info): Add regcache_data.
1379 (add_inferior): Call create_register_cache.
1380 (clear_inferiors): Call free_register_cache.
1381 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1382 * regcache.c (struct inferior_regcache_data): New.
1383 (registers): Remove.
1384 (get_regcache): New function.
1385 (create_register_cache, free_register_cache): New functions.
1386 (set_register_cache): Don't initialize the register cache here.
1387 (registers_to_string, registers_from_string, register_data): Call
1389 * regcache.h: Add prototypes.
1390 * server.h: Likewise.
1392 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1394 * mem-break.c: New file.
1395 * mem-break.h: New file.
1396 * Makefile.in: Add mem-break.o rule; update server.h
1398 * inferiors.c (struct inferior_info): Add target_data
1400 (clear_inferiors): Free target_data member if set.
1401 (inferior_target_data, set_inferior_target_data): New functions.
1402 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1403 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1404 * linux-low.c (linux_bp_reinsert): New variable.
1405 (struct inferior_linux_data): New.
1406 (linux_create_inferior): Use set_inferior_target_data.
1407 (linux_attach): Likewise. Call add_inferior.
1408 (linux_wait_for_one_inferior): New function.
1409 (linux_wait): Call it.
1410 (linux_write_memory): Add const.
1411 (initialize_low): Call set_breakpoint_data.
1412 * linux-low.h (struct linux_target_ops): Add breakpoint
1414 * server.c (attach_inferior): Remove extra add_inferior
1416 * server.h: Include mem-break.h. Update inferior.c
1418 * target.c (read_inferior_memory)
1419 (write_inferior_memory): New functions.
1420 * target.h (read_inferior_memory)
1421 (write_inferior_memory): Change macros to prototypes.
1422 (struct target_ops): Update comments. Add const to write_memory
1425 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1427 * linux-low.c (usr_store_inferior_registers): Support
1428 registers which are allowed to fail to store.
1429 * linux-low.h (linux_target_ops): Likewise.
1430 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1431 (ppc_cannot_store_register): FPSCR may not be storable.
1433 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1435 * server.h: Include <string.h> if HAVE_STRING_H.
1436 * ChangeLog: Correct paths in last ChangeLog entry.
1438 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1440 * linux-low.h: Remove obsolete prototypes.
1441 (struct linux_target_ops): New.
1442 (extern the_low_target): New.
1443 * linux-low.c (num_regs, regmap): Remove declarations.
1444 (register_addr): Use the_low_target explicitly.
1445 (fetch_register): Likewise.
1446 (usr_fetch_inferior_registers): Likewise.
1447 (usr_store_inferior_registers): Likewise.
1448 * linux-arm-low.c (num_regs): Remove.
1449 (arm_num_regs): Define.
1450 (arm_regmap): Renamed from regmap, made static.
1451 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1453 (arm_cannot_store_register): Renamed from cannot_store_register,
1455 (the_low_target): New.
1456 * linux-i386-low.c (num_regs): Remove.
1457 (i386_num_regs): Define.
1458 (i386_regmap): Renamed from regmap, made static.
1459 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1461 (i386_cannot_store_register): Renamed from cannot_store_register,
1463 (the_low_target): New.
1464 * linux-ia64-low.c (num_regs): Remove.
1465 (ia64_num_regs): Define.
1466 (ia64_regmap): Renamed from regmap, made static.
1467 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1469 (ia64_cannot_store_register): Renamed from cannot_store_register,
1471 (the_low_target): New.
1472 * linux-m68k-low.c (num_regs): Remove.
1473 (m68k_num_regs): Define.
1474 (m68k_regmap): Renamed from regmap, made static.
1475 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1477 (m68k_cannot_store_register): Renamed from cannot_store_register,
1479 (the_low_target): New.
1480 * linux-mips-low.c (num_regs): Remove.
1481 (mips_num_regs): Define.
1482 (mips_regmap): Renamed from regmap, made static.
1483 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1485 (mips_cannot_store_register): Renamed from cannot_store_register,
1487 (the_low_target): New.
1488 * linux-ppc-low.c (num_regs): Remove.
1489 (ppc_num_regs): Define.
1490 (ppc_regmap): Renamed from regmap, made static.
1491 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1493 (ppc_cannot_store_register): Renamed from cannot_store_register,
1495 (the_low_target): New.
1496 * linux-s390-low.c (num_regs): Remove.
1497 (s390_num_regs): Define.
1498 (s390_regmap): Renamed from regmap, made static.
1499 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1501 (s390_cannot_store_register): Renamed from cannot_store_register,
1503 (the_low_target): New.
1504 * linux-sh-low.c (num_regs): Remove.
1505 (sh_num_regs): Define.
1506 (sh_regmap): Renamed from regmap, made static.
1507 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1509 (sh_cannot_store_register): Renamed from cannot_store_register,
1511 (the_low_target): New.
1512 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1513 (the_low_target): New.
1515 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1517 * Makefile.in: Add stamp-h target.
1518 * configure.in: Create stamp-h.
1519 * configure: Regenerated.
1521 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1523 * inferiors.c: New file.
1524 * target.c: New file.
1525 * target.h: New file.
1526 * Makefile.in: Add target.o and inferiors.o. Update
1528 * linux-low.c (inferior_pid): New static variable,
1529 moved from server.c.
1530 (linux_create_inferior): Renamed from create_inferior.
1531 Call add_inferior. Return 0 on success instead of a PID.
1532 (linux_attach): Renamed from myattach.
1533 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1534 (linux_thread_alive): Renamed from mythread_alive.
1535 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1537 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1538 (regsets_store_inferior_registers): Correct error message.
1539 Add missing ``return 0''.
1540 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1541 (linux_store_registers): Renamed from store_inferior_registers.
1542 (linux_read_memory): Renamed from read_inferior_memory.
1543 (linux_write_memory): Renamed from write_inferior_memory.
1544 (linux_target_ops): New structure.
1545 (initialize_low): Call set_target_ops ().
1546 * remote-utils.c (unhexify): New function.
1547 (hexify): New function.
1548 (input_interrupt): Send signals to ``signal_pid''.
1549 * server.c (inferior_pid): Remove.
1550 (start_inferior): Update create_inferior call.
1551 (attach_inferior): Call add_inferior.
1552 (handle_query): New function.
1553 (main): Call handle_query for `q' packets.
1554 * server.h: Include "target.h". Remove obsolete prototypes.
1555 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1557 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1559 * Makefile.in: Add WARN_CFLAGS. Update configury
1561 * configure.in: Check for <string.h>
1562 * configure: Regenerate.
1563 * config.in: Regenerate.
1564 * gdbreplay.c: Include needed system headers.
1565 (remote_open): Remove strchr prototype.
1566 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1567 * regcache.c (supply_register): Change buf argument to const void *.
1568 (supply_register_by_name): Likewise.
1569 (collect_register): Change buf argument to void *.
1570 (collect_register_by_name): Likewise.
1571 * regcache.h: Add missing prototypes.
1572 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1573 * server.c (handle_query): New function.
1574 (attached): New static variable, moved out of main.
1575 (main): Quiet longjmp clobber warnings.
1576 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1577 * utils.c (error): Remove NORETURN.