1 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3 * linux-low.c: Include <sched.h>.
5 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7 * linux-low.c (linux_tracefork_grandchild): New.
8 (linux_tracefork_child): Use clone.
9 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
21 * inferiors.c (change_inferior_id): Delete.
22 (add_pid_to_list, pull_pid_from_list): New.
23 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
24 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
25 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
26 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
27 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
28 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
29 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
30 (using_threads): Always set to 1.
31 (handle_extended_wait): New.
32 (add_process): Do not set TID.
33 (linux_create_inferior): Set must_set_ptrace_flags.
34 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
35 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
36 (linux_thread_alive): Rename TID argument to LWPID.
37 (linux_wait_for_process): Handle unknown processes. Do not use TID.
38 (linux_wait_for_event): Do not use TID or check using_threads. Update
39 call to dead_thread_notify. Call handle_extended_wait.
40 (linux_create_inferior): Use PTRACE_SETOPTIONS.
41 (send_sigstop): Delete sigstop_sent.
42 (wait_for_sigstop): Avoid TID.
43 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
44 (linux_test_for_tracefork): New.
45 (linux_lookup_signals): Use thread_db_active and
46 linux_supports_tracefork_flag.
47 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
48 * linux-low.h (get_process_thread): Avoid TID.
49 (struct process_ifo): Move thread_known and tid to the end. Remove
51 (linux_attach_lwp, thread_db_init): Update prototypes.
52 * server.h (change_inferior_id): Delete prototype.
53 (add_pid_to_list, pull_pid_from_list): New prototypes.
54 * thread-db.c (thread_db_use_events): New.
55 (find_first_thread): Rename to...
56 (find_one_thread): ...this. Update callers and messages. Do not
57 call fatal. Check thread_db_use_events. Do not call
58 change_inferior_id or new_thread_notify.
59 (maybe_attach_thread): Update. Do not call new_thread_notify.
60 (thread_db_init): Set thread_db_use_events. Check use_events.
61 * utils.c (fatal, warning): Correct message prefix.
63 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
65 * Makefile.in (clean): Remove new files.
66 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
67 (powerpc-64.o, powerpc-64.c): New rules.
68 * configure.srv: Use alternate register sets for powerpc64-*-linux*
69 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
71 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
73 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
74 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
75 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
76 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
77 (target_regsets): Add AltiVec and SPE register sets.
78 * configure.ac: Check for AltiVec and SPE.
79 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
80 (ppc_fill_vrregset, ppc_store_vrregset): New.
81 (target_regsets): Add AltiVec register set.
82 * configure: Regenerated.
84 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
86 * linux-low.c (O_LARGEFILE): Define.
87 (linux_read_memory): Use /proc/PID/mem.
88 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
89 * configure, config.in: Regenerated.
91 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
93 * linux-low.c (linux_wait_for_event): Do not pass signals while
96 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
98 * win32-low.c (create_process): New.
99 (win32_create_inferior): Use create_process instead of
100 CreateProcess. If create_process failed retry appending an ".exe"
101 suffix. Store the GetLastError result immediatelly after
102 create_process calls and use it on the call to error.
104 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
106 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
108 2007-08-23 Joel Brobecker <brobecker@adacore.com>
110 * configure.ac: Switch license to GPLv3.
112 2007-08-01 Michael Snyder <msnyder@access-company.com>
114 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
116 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
118 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
120 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
121 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
122 CloseToolhelp32Snapshot.
123 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
124 CloseToolhelp32Snapshot.
126 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
128 * server.c (main): Check for inferior exit before main loop.
130 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
132 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
133 instead of on tmp_desc.
135 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
136 Daniel Jacobowitz <dan@codesourcery.com>
138 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
139 (add_thread): Minor cleanups.
140 (clear_inferiors): Move lower in the file. Clear the DLL
142 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
143 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
144 (xml_escape_text): New.
145 * server.c (handle_query): Handle qXfer:libraries:read. Report it
147 (handle_v_cont): Report errors.
148 (gdbserver_version): Update.
149 (main): Correct size of own_buf. Do not report initial DLL events.
150 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
151 (unloaded_dll, xml_escape_text): New.
152 * win32-low.c (enum target_waitkind): Update comments.
153 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
154 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
155 (win32_EnumProcessModules, win32_GetModuleInformation)
156 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
157 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
158 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
159 (win32_Module32First, win32_Module32Next, load_toolhelp)
160 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
161 (get_child_debug_event): Handle DLL events.
162 (win32_wait): Likewise.
164 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
166 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
167 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
169 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
171 * win32-low.c (handle_output_debug_string): Ignore event if not
174 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
176 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
178 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
180 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
182 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
184 * inferiors.c (change_inferior_id): Add comment.
185 * linux-low.c (check_removed_breakpoint): Add an early
186 prototype. Improve debug output.
187 (linux_attach): Doc update.
188 (linux_detach_one_process, linux_detach): Clean up before releasing
190 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
191 * linux-low.h (struct process_info): Doc improvement.
192 * mem-break.c (delete_all_breakpoints): New.
193 * mem-break.h (delete_all_breakpoints): New prototype.
194 * thread-db.c (find_first_thread): New.
195 (thread_db_create_event): Call it instead of
196 thread_db_find_new_threads. Clean up unused variables.
197 (maybe_attach_thread): Remove first thread handling.
198 (thread_db_find_new_threads): Use find_first_thread.
199 (thread_db_get_tls_address): Likewise.
201 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
203 * thread-db.c (thread_db_find_new_threads): Add prototype.
204 (thread_db_create_event): Check for the main thread before adding
206 (maybe_attach_thread): Only enable event reporting if TID == 0.
207 (thread_db_get_tls_address): Check for new threads.
209 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
211 * linux-low.c (linux_create_inferior): Try execv before execvp.
212 * spu-low.c (spu_create_inferior): Likewise.
214 2007-06-13 Mike Frysinger <vapier@gentoo.org>
216 * linux-low.c (linux_create_inferior): Change execv to execvp.
217 * spu-low.c (spu_create_inferior): Likewies.
219 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
221 * Makefile.in (clean): Clean new files instead of deleted ones.
222 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
223 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
225 * configure.srv: Specify XML files and new regformats for MIPS and
227 * linux-mips-low.c (mips_num_regs): Set to only used registers.
228 (mips_regmap): Do not fetch $0. Remove unused registers. Add
229 an entry for the restart register.
230 (mips_cannot_fetch_register, mips_cannot_store_register)
231 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
232 register names to match the XML descriptions.
233 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
234 restart register instead of $0.
236 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
237 Markus Deuling <deuling@de.ibm.com>
239 * remote-utils.c (decode_xfer_write): New function.
240 * server.h (decode_xfer_write): Add prototype.
241 * server.c (handle_query): Add PACKET_LEN argument. Support
242 qXfer:spu:read and qXfer:spu:write packets.
243 (main): Pass packet_len to handle_query.
244 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
245 * target.h (target_ops): Add qxfer_spu.
247 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
249 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
250 accessing non-seekable spufs files.
252 2007-05-16 Markus Deuling <deuling@de.ibm.com>
254 * server.c (handle_query): Add reply for qC packet.
256 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
257 Leo Zayas <lerele@champenstudios@com>
259 * server.h (check_remote_input_interrupt_request): New function.
260 * remote_utils.c (INVALID_DESCRIPTOR): New define.
261 (remote_desc): Initialize with INVALID_DESCRIPTOR.
262 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
263 (check_remote_input_interrupt_request): New function.
264 * server.h (check_remote_input_interrupt_request): Declare.
265 * win32-low.c (winapi_DebugBreakProcess,
266 winapi_GenerateConsoleCtrlEvent): New typedefs.
267 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
269 (win32_wait): Check for remote interrupt request
270 with check_remote_input_interrupt_request.
271 (win32_request_interrupt): New function.
272 (win32_target_op): Set request_interrupt to win32_request_interrupt.
274 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
276 * win32-low.c (debug_registers_changed,
277 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
278 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
279 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
280 (thread_rec): Get context using the low target.
281 (child_add_thread): Call thread_added on the low target,
282 which does the same thing.
284 (do_initial_child_stuff): Remove debug registers references.
285 Set context using the low target. Resume threads after
286 setting the contexts.
287 (child_continue): Remove dead variable. Remove debug
288 registers references.
289 (child_fetch_inferior_registers): Go through the low target.
290 (do_child_store_inferior_registers): Remove.
291 (child_store_inferior_registers): Go through the low target.
292 (win32_resume): Remove debug registers references.
293 Set context using the low target.
294 (handle_exception): Change return type to void. Don't record
295 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
296 first chance exception.
297 (get_child_debug_event): Change return type to void. Remove
298 goto loop. Always return after waiting for debug event.
299 (win32_wait): Convert to switch statement. Handle spurious
302 * win32-i386-low.c (debug_registers_changed,
303 debug_registers_used): New.
304 (initial_stuff): Rename to ...
305 (i386_initial_stuff): ... this. Clear debug registers
307 (store_debug_registers): Delete.
308 (i386_get_thread_context): New.
309 (load_debug_registers): Delete.
310 (i386_set_thread_context): New.
311 (i386_thread_added): New.
312 (single_step): Rename to ...
313 (i386_single_step): ... this.
314 (do_fetch_inferior_registers): Rename to ...
315 (i386_fetch_inferior_register): ... this.
316 (i386_store_inferior_register): New.
317 (the_low_target): Adapt to new interface.
319 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
320 (arm_get_thread_context): New.
321 (arm_set_thread_context): New.
323 (do_fetch_inferior_registers): Rename to ...
324 (arm_fetch_inferior_register): ... this.
325 (arm_store_inferior_register): New.
326 (arm_wince_breakpoint): Reimplement as unsigned long.
327 (arm_wince_breakpoint_len): Define.
328 (the_low_target): Adapt to new interface.
330 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
331 load_debug_registers. Add get_thread_context, set_thread_context,
332 thread_added and store_inferior_register. Rename
333 fetch_inferior_registers to fetch_inferior_register.
334 (regptr): Remove declaration.
336 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
338 * linux-low.c (linux_detach): Change return type to int. Return 0.
339 * spu-low.c (spu_detach): Likewise.
341 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
343 * target.h (target_ops): Change return type of detach to int.
345 (join_inferior): New.
346 * server.c (main): Don't skip detach support on mingw32.
347 If the inferior doesn't support detaching return error.
348 Call join_inferior instead of using waitpid.
349 * linux-low.c (linux_join): New.
350 (linux_target_op): Add linux_join.
351 * spu-low.c (spu_join): New.
352 (spu_target_ops): Add spu_join.
353 * win32-low.c (win32_detach): Adapt to new interface.
354 Reopen current_process_handle before detaching. Issue a child
355 resume before detaching.
357 (win32_target_op): Add win32_join.
359 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
361 * win32-low.c (win32-attach): Fix return value.
362 * target.h (target_ops): Describe ATTACH return values.
364 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
366 * win32-low.c (GETPROCADDRESS): Define.
367 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
368 (winapi_DebugSetProcessKillOnExit): Likewise.
369 (win32_create_inferior): Force usage of ansi CreateProcessA.
370 (win32_attach): Use GETPROCADDRESS.
371 (win32_detach): Likewise.
373 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
375 * win32-low.c (win32_wait): Don't use WSTOPSIG.
377 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
379 * win32-low.c: Commit leftover changes from 2007-03-29.
381 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
383 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
384 fields short instead of int. Add explicit padding.
385 (i387_cache_to_fsave): Remove unnecessary casts.
386 (i387_fsave_to_cache): Doc fix.
387 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
389 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
391 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
392 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
394 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
396 * configure.srv (arm*-*-mingw32ce*): Move near the other
399 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
401 * configure.ac: Add errno checking.
402 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
403 sys/file.h and malloc.h.
404 (AC_CHECK_DECLS): Add perror.
405 (srv_mingwce): Handle.
406 * configure.srv (i[34567]86-*-cygwin*): Add
407 win32-i386-low.o to srv_tgtobj.
408 (i[34567]86-*-mingw*): Likewise.
409 (arm*-*-mingw32ce*): Add case.
410 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
411 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
412 [__MINGW32CE__] (strerror): New function.
413 [__MINGW32CE__] (errno): Define to GetLastError.
414 [__MINGW32CE__] (COUNTOF): New macro.
415 (remote_open): Remove extra close call.
416 * mem-break.c (delete_breakpoint_at): New function.
417 * mem-break.h (delete_breakpoint_at): Declare.
418 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
419 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
420 [USE_WIN32API] (read, write): Add char* casts.
421 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
422 * server.h: Include wincecompat.h on Windows CE.
423 [HAVE_ERRNO_H]: Check.
424 (perror): Declare if not declared.
425 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
426 (perror_with_name): Remove errno declaration.
427 * wincecompat.h: New.
428 * wincecompat.c: New.
430 * win32-arm-low.c: New.
431 * win32-i386-low.c: New.
432 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
433 (OUTMSG2): Make it safe.
435 (COUNTOF): New macro.
436 (NUM_REGS): Get it from the low target.
437 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
438 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
439 (thread_rec): Let low target handle debug registers.
440 (child_add_thread): Likewise.
441 (child_init_thread_list): Likewise.
442 (continue_one_thread): Likewise.
444 (do_child_fetch_inferior_registers): Move to ...
445 * win32-i386-low.c: ... here, and rename to ...
446 (do_fetch_inferior_registers): ... this.
447 * win32-low.c (child_fetch_inferior_registers):
448 Go through the low target.
449 (do_child_store_inferior_registers): Use regptr.
450 (strwinerror): New function.
451 (win32_create_inferior): Handle Windows CE.
452 Use strwinerror instead of strerror on Windows error
453 codes. Add program to the error output.
454 Don't close the main thread handle on Windows CE.
455 (win32_attach): Use coredll.dll on Windows CE.
456 (win32_kill): Close current process and current
458 (win32_detach): Use coredll.dll on Windows CE.
459 (win32_resume): Let low target handle debug registers, and
461 (handle_exception): Add/Remove initial breakpoint. Avoid
462 non-existant WSTOPSIG on Windows CE.
463 (win32_read_inferior_memory): Cast to remove warning.
464 (win32_arch_string): Go through the low target.
465 (initialize_low): Call set_breakpoint_data with the low
467 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
468 FOP_REGNUM, mappings): Move to ...
469 * win32-i386-low.c: ... here.
470 * win32-low.c (win32_thread_info): Move to ...
471 * win32-low.h: ... here.
472 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
473 win32-arm-low.c and wincecompat.c.
475 (install-only:): Likewise.
476 (gdbserver:): Likewise.
477 (gdbreplay:): Likewise.
478 * config.in: Regenerate.
479 * configure: Regenerate.
481 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
483 * win32-low.c: Rename typedef thread_info to
484 win32_thread_info throughout.
486 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
488 * win32-i386-low.c: Rename to ...
489 * win32-low.c: ... this.
490 * configure.srv: Replace win32-i386-low.o with win32-low.o.
491 * Makefile.in: Likewise.
493 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
495 * remote-utils.c (monitor_output): Constify msg parameter.
496 * server.h (monitor_output): Likewise.
497 * win32-i386-low.c (handle_output_debug_string): New.
498 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
499 handle_output_debug_string.
500 (get_child_debug_event): Likewise.
502 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
504 * server.c (main): Correct strtoul check.
506 2007-03-27 Jon Ringle <jon@ringle.org>
508 * linux-low.c: Check __ARCH_HAS_MMU__ also.
510 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
512 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
514 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
516 * terminal.h: Check HAVE_SGTTY_H.
518 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
520 * remote-utils.c (remote_open): Print out the assigned port number.
522 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
524 * remote-utils.c (monitor_output): New function.
525 * server.c (debug_threads): Define here.
526 (monitor_show_help): New function.
527 (handle_query): Handle qRcmd.
528 (main): Do not handle 'd' packet.
529 * server.h (debug_threads, remote_debug, monitor_output): Declare.
530 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
533 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
535 * Makefile.in (EXEEXT): New.
536 (clean): Use $(EXEEXT).
538 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
540 * target.h (target_ops): Rename send_signal to request_interrupt,
541 and remove enum target_signal parameter.
542 * linux-low.c (linux_request_interrupt): Rename from
543 linux_send_signal, and always send SIGINT.
544 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
545 and always send SIGINT.
546 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
548 (input_interrupt): Likewise.
550 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
552 * server.c (get_features_xml): Check if target implemented
554 * win32-i386-low.c (win32_arch_string): New.
555 (win32_target_ops): Add win32_arch_string as arch_string member.
557 2007-02-22 Markus Deuling <deuling@de.ibm.com>
559 * spu-low.c (spu_arch_string): New.
560 (spu_target_ops): Add spu_arch_string.
562 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
564 * remote-utils.c: Remove HAVE_TERMINAL_H check.
565 * configure.ac: Do not check for terminal.h.
566 * configure, config.in: Regenerated.
568 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
570 * Makefile.in (OBS): Add $(XML_BUILTIN).
571 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
573 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
574 (arm-with-iwmmxt.c): New.
575 * config.in, configure: Regenerate.
576 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
577 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
578 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
579 (arm*-*-linux*): Add iWMMXt and regset support.
580 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
581 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
582 (arm_store_wmmxregset, target_regsets): New.
583 * server.c (get_features_xml): Take annex argument. Check builtin
585 (handle_query): Handle multiple annexes.
587 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
589 * remote-utils.c [USE_WIN32API] (read, write): Define.
590 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
593 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
595 * linux-i386-low.c (the_low_target): Set arch_string.
596 * linux-x86-64-low.c (the_low_target): Likewise.
597 * linux-low.c (linux_arch_string): New.
598 (linux_target_ops): Add it.
599 * linux-low.h (struct linux_target_ops): Add arch_string.
600 * server.c (write_qxfer_response): Use const void * for DATA.
601 (get_features_xml): New.
602 (handle_query): Handle qXfer:features:read. Report it for qSupported.
603 * target.h (struct target_ops): Add arch_string method.
605 2007-01-03 Denis Pilat <denis.pilat@st.com>
606 Daniel Jacobowitz <dan@codesourcery.com>
608 * linux-low.c (linux_kill): Handle being called with no threads.
609 * win32-i386-low.c (win32_kill): Likewise.
610 (get_child_debug_event): Clear current_process_handle.
612 2006-12-30 Denis PILAT <denis.pilat@st.com>
613 Daniel Jacobowitz <dan@codesourcery.com>
615 * remote-utils.c (remote_open): Check the type of specified
616 serial port devices before opening them.
617 * server.c (main): Kill the inferior if an error occurs during
618 the first remote_open.
620 2006-12-05 Markus Deuling <deuling@de.ibm.com>
622 * README: Update supported targets.
624 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
626 * Makefile.in (clean): Remove reg-mips64.c.
627 (reg-mips64.c, reg-mips64.o): New rules.
628 * configure.srv: Handle mips64. Include regset support for mips.
629 * linux-mips-low.c (union mips_register): New.
630 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
631 (mips_breakpoint, mips_breakpoint_at): Use int.
632 (mips_collect_register, mips_supply_register)
633 (mips_collect_register_32bit, mips_supply_register_32bit)
634 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
635 (mips_store_fpregset, target_regsets): New.
636 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
638 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
640 * configure.srv: Add target "spu*-*-*".
641 * Makefile.in (clean): Remove reg-spu.c.
642 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
643 * spu-low.c: New file.
645 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
647 * configure.ac: Correct td_thr_tls_get_addr test.
648 * configure: Regenerated.
650 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
652 * linux-low.c (linux_wait_for_event): Reformat. Use the
654 * remote-utils.c (decode_address_to_semicolon): New.
655 * server.c (pass_signals, handle_general_set): New.
656 (handle_query): Mention QPassSignals for qSupported.
657 (main): Call handle_general_set.
658 * server.h (pass_signals, decode_address_to_semicolon): New.
660 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
662 * server.c (handle_query): Correct error handling for read_auxv.
664 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
666 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
667 and srv_linux_thread_db to yes.
668 * linux-s390-low.c (s390_fill_gregset): New function.
669 (target_regsets): Define data structure.
671 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
673 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
674 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
675 * config.in, configure: Regenerated.
676 * inferiors.c (gdb_id_to_thread): New function.
677 (gdb_id_to_thread_id): Use it.
678 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
679 * linux-low.h (struct process_info): Add th member.
680 (thread_db_get_tls_address): New prototype.
681 * remote-utils.c (decode_address): Make non-static.
682 * server.c (handle_query): Handle qGetTLSAddr.
683 * server.h (gdb_id_to_thread, decode_address): New prototypes.
684 * target.h (struct target_ops): Add get_tls_address.
685 * thread-db.c (maybe_attach_thread): Save the thread handle.
686 (thread_db_get_tls_address): New.
688 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
690 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
691 (linux_resume_one_process): Take a siginfo_t *. Update all
692 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
693 (struct pending_signals): Add a siginfo_t.
694 (linux_wait_for_process): Always set last_status.
695 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
696 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
697 * linux-low.h (struct process_info): Add last_status.
699 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
701 * remote-utils.c (try_rle): New function.
702 (putpkt_binary): Use it.
704 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
706 * Makefile.in (clean): Clean reg-x86-64-linux.c.
707 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
708 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
709 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
710 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
713 2006-08-08 Richard Sandiford <richard@codesourcery.com>
715 * server.c (terminal_fd): New variable.
716 (old_foreground_pgrp): Likewise.
717 (restore_old_foreground_pgrp): New function.
718 (start_inferior): Record the terminal file descriptor in terminal_fd
719 and its original foreground group in old_foreground_pgrp. Register
720 restore_old_foreground_pgrp with atexit().
722 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
724 * server.c (handle_query): Correct qPart to qXfer.
726 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
728 * configure.ac: Check for more headers which are missing on
729 Windows. Automatically supply -lwsock32 and USE_WIN32API.
730 * configure.srv: Add Cygwin and mingw32.
731 * remote-utils.c: Don't include headers unconditionally which
732 are missing on mingw32. Include <winsock.h> for mingw32.
733 (remote_open): Adjust for mingw32 support. Flush
734 standard error after writing to it.
735 (remote_close, putpkt_binary, input_interrupt, block_async_io)
736 (unblock_async_io, enable_async_io, disable_async_io)
737 (readchar, getpkt): Update for Winsock support.
738 (prepare_resume_reply): Expect a protocol signal number.
739 * server.c: Disable <sys/wait.h> on mingw32.
740 (start_inferior): Adjust for mingw32 support. Flush
741 standard error after writing to it.
742 (attach_inferior): Likewise. Use protocol signal
744 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
746 * win32-i386-low.c: New file.
747 * Makefile.in (XM_CLIBS): Set.
748 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
749 (win32-i386-low.o): New dependency rule.
750 * linux-low.c (linux_wait): Use target signal numbers.
751 * target.h (struct target_ops): Doc fix.
752 * server.h (target_signal_to_name): New prototype.
753 * gdbreplay.c: Don't include headers unconditionally which
754 are missing on mingw32. Include <winsock.h> for mingw32.
755 (remote_close, remote_open): Adjust for Winsock support.
756 * configure, config.in: Regenerated.
758 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
760 * server.c (decode_xfer_read, write_qxfer_response): New.
761 (handle_query): Take a packet length argument. Handle
762 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
763 the qSupported response.
764 (main): Update call to handle_query.
766 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
768 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
769 (putpkt_binary): Renamed from putpkt and adjusted for binary
771 (putpkt): New wrapper for putpkt_binary.
772 (readchar): Don't mask off the high bit.
773 (decode_X_packet): New function.
774 * server.c (main): Call putpkt_binary if a handler sets the packet
775 length. Save the length of the incoming packet. Handle 'X'.
776 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
778 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
780 * server.c (handle_query): Handle qSupported.
782 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
784 * remote-utils.c (all_symbols_looked_up): New variable.
785 (look_up_one_symbol): Check it.
786 * server.h (look_up_one_symbol): New declaration.
787 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
789 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
791 * Makefile.in (linux-arm-low.o): Update dependencies.
792 * linux-arm-low.c: Include "gdb_proc_service.h".
793 (PTRACE_GET_THREAD_AREA): Define.
794 (ps_get_thread_area): New function.
796 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
798 * configure.srv (m68k*-*-uclinux*): New target.
799 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
800 (linux_resume_one_process): Remove extraneous cast.
801 (linux_read_offsets): New.
802 (linux_target_op): Add linux_read_offsets on mmuless systems.
803 * server.c (handle_query): Add qOffsets logic.
804 * target.h (struct target_ops): Add read_offsets.
806 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
808 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
809 (PTRACE_GET_THREAD_AREA): Define.
810 (ps_get_thread_area): New function.
811 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
812 (linux-x86-64-low.o): Update.
814 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
816 * configure.ac: Remove checks for prfpregset_t.
817 * gdb_proc_service.h: New file.
818 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
819 new "gdb_proc_service.h".
820 * proc-service.c: Likewise.
821 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
822 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
823 * Makefile.in (gdb_proc_service_h): Updated.
824 * configure, config.in: Regenerated.
826 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
828 * remote-utils.c (prepare_resume_reply): Move declaration
829 of gdb_id_from_wait to the top of the block.
831 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
833 * linux-low.c (regsets_store_inferior_registers): Read the regset
834 from the target before filling it.
836 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
838 * server.c (attach_inferior): Return SIGTRAP for a successful
841 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
843 * Makefile.in (OBS): Add version.o.
844 (STAGESTUFF): Delete.
845 (version.o): Add dependencies.
846 (version.c): Replace rule.
847 (clean): Remove version.c.
848 * server.c (gdbserver_version): New.
849 (gdbserver_usage): Use printf.
850 (main): Handle --version and --help.
851 * server.h (version, host_name): Add declarations.
853 2005-12-23 Eli Zaretskii <eliz@gnu.org>
865 * linux-x86-64-low.c:
877 * linux-crisv32-low.c:
889 * gdbserver.1: Add (C) after Copyright. Update the FSF
892 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
894 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
895 (arm_breakpoint_at): Recognize both breakpoints.
896 (the_low_target): Use the correct breakpoint instruction.
898 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
900 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
901 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
902 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
903 (the_low_target): Update.
905 2005-10-25 Andreas Schwab <schwab@suse.de>
907 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
909 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
910 (ia64_num_regs): Reduce to 462.
912 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
914 * acinclude.m4: Correct quoting.
915 * aclocal.m4: Regenerated.
917 Suggested by SZOKOVACS Robert <szo@ies.hu>:
918 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
919 (thread_db_init): Call thread_db_err_str.
920 * configure.ac: Check for TD_VERSION.
921 * config.in, configure: Regenerated.
923 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
925 * server.h (error, fatal, warning): Add ATTR_FORMAT.
927 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
929 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
930 is not available. Define HAVE_PTRACE_GETREGS if it is.
931 * config.in, configure: Regenerated.
932 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
933 * linux-i386-low.c, linux-m68k-low.c: Update to use
935 * linux-low.c (regsets_fetch_inferior_registers)
936 (regsets_store_inferior_registers): Only return 0 if we processed
938 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
939 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
941 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
943 * inferiors.c (struct thread_info): Add gdb_id.
944 (add_thread): Add gdb_id argument.
945 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
946 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
948 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
949 * server.c (handle_query): Use thread_to_gdb_id.
950 (handle_v_cont, main): Use gdb_id_to_thread_id.
951 * server.h (add_thread): Update prototype.
952 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
955 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
957 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
958 left-padded registers.
959 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
960 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
962 2005-07-01 Steve Ellcey <sje@cup.hp.com>
964 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
965 * configure: Regenerate.
966 * config.in: Regenerate.
967 * server.h (NEED_DECLARATION_STRERROR):
968 Replace with !HAVE_DECL_STRERROR.
970 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
972 * linux-low.c (linux_wait, linux_send_signal): Don't test
973 an unsigned long variable for > 0 if it could be MAX_ULONG.
974 * server.c (myresume): Likewise.
975 * target.c (set_desired_inferior): Likewise.
977 2005-06-13 Mark Kettenis <kettenis@gnu.org>
979 * configure.ac: Simplify and improve check for socklen_t.
980 * configure, config.in: Regenerate.
982 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
984 * acconfig.h: Remove.
985 * configure.ac: Add a test for socklen_t. Use three-argument
986 AC_DEFINE throughout.
987 * config.in: Regenerated using autoheader 2.59.
988 * configure: Regenerated.
990 * gdbreplay.c (socklen_t): Provide a default.
991 (remote_open): Use socklen_t.
992 * remote-utils.c (socklen_t): Provide a default.
993 (remote_open): Use socklen_t.
994 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
997 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
999 * linux-low.c (linux_read_memory, linux_write_memory)
1000 (linux_read_auxv): Likewise.
1001 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1002 (check_mem_write): Likewise.
1003 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1005 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1006 (registers_from_string, register_data): Likewise.
1007 * server.c (handle_query, main): Likewise.
1008 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1009 (decode_M_packet): Likewise.
1010 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1011 * target.h (struct target_ops): Update read_memory, write_memory,
1013 (read_inferior_memory, write_inferior_memory): Update.
1014 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1016 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1017 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1018 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1019 linux-s390-low.c, linux-sh-low.c: Update for changes in
1020 read_inferior_memory and the_low_target->breakpoint.
1022 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1024 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1025 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1026 * configure.srv: Add powerpc64-*-linux*.
1027 * linux-ppc64-low.c: New file.
1029 2005-05-23 Orjan Friberg <orjanf@axis.com>
1031 * linux-cris-low.c: New file with support for CRIS.
1032 * linux-crisv32-low.c: Ditto for CRISv32.
1033 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1034 (clean): Add reg-cris.c and reg-crisv32.c.
1035 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1036 reg-crisv32.o, and reg-crisv32.c to make rules.
1037 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1040 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1042 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1043 of sizeof (PTRACE_XFER_TYPE).
1044 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1046 2005-05-12 Orjan Friberg <orjanf@axis.com>
1048 * target.h (struct target_ops): Add insert_watchpoint,
1049 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1050 pointers for hardware watchpoint support.
1051 * linux-low.h (struct linux_target_ops): Ditto.
1052 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1053 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1054 to linux_target_ops.
1055 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1057 * server.c (main): Recognize 'Z' and 'z' packets.
1059 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1061 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1062 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1063 (the_low_target): Add new members.
1065 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1067 * proc-service.c (ps_lgetregs): Search all_processes instead of
1070 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1072 * server.c (start_inferior): Change return type to int.
1073 (attach_inferior): Change sigptr to int *.
1074 (handle_v_cont, handle_v_requests): Change signal to int *.
1075 (main): Change signal to int.
1077 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1079 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1080 * configure.srv: Add m32r*-*-linux*.
1081 * linux-m32r-low.c: New file.
1083 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1085 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1087 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1089 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1090 Take unsigned long arguments for PIDs.
1091 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1092 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1093 (wait_for_sigstop, linux_resume_one_process)
1094 (regsets_fetch_inferior_registers, linux_send_signal)
1095 (linux_read_auxv): Likewise. Update the types of variables holding
1096 PIDs. Update format string specifiers.
1097 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1098 * remote-utils.c (prepare_resume_reply): Likewise.
1099 * server.c (cont_thread, general_thread, step_thread)
1100 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1102 (handle_query): Update format specifiers.
1103 (handle_v_cont, main): Use strtoul for thread IDs.
1104 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1105 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1106 (general_thread, step_thread, thread_from_wait)
1107 (old_thread_from_wait): Update.
1108 * target.h (struct thread_resume): Use unsigned long for THREAD.
1109 (struct target_ops): Use unsigned long for arguments to attach and
1112 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1114 * acinclude.m4: Include bfd/bfd.m4 directly.
1115 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1116 <agriffis@toolchain.org>.
1117 * aclocal.m4, configure: Regenerated.
1119 2005-01-07 Andrew Cagney <cagney@gnu.org>
1121 * configure.ac: Rename configure.in, require autoconf 2.59.
1122 * configure: Re-generate.
1124 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1126 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1128 * aclocal.m4: Regenerated.
1129 * configure: Regenerated.
1131 2004-11-21 Andreas Schwab <schwab@suse.de>
1133 * linux-m68k-low.c (m68k_num_gregs): Define.
1134 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1135 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1136 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1137 (m68k_breakpoint_at): New. Add to the_low_target.
1139 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1140 srv_linux_thread_db to yes.
1142 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1144 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1145 (ARCH_SET_FS): Likewise.
1146 (ARCH_GET_FS): Likewise.
1147 (ARCH_GET_GS): Likewise.
1149 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1151 * linux-i386-low.c (ps_get_thread_area): New.
1152 * linux-x86-64-low.c (ps_get_thread_area): New.
1153 * linux-low.c: Include <sys/syscall.h>.
1154 (linux_kill_one_process): Don't kill the first thread here.
1155 (linux_kill): Kill the first thread here.
1156 (kill_lwp): New function.
1157 (send_sigstop, linux_send_signal): Use it.
1158 * proc-service.c: Clean up #ifdefs.
1159 (fpregset_info): Delete.
1160 (ps_lgetregs): Update and enable implementation.
1161 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1163 * remote-utils.c (struct sym_cache, symbol_cache): New.
1164 (input_interrupt): Print a clearer message.
1165 (async_io_enabled): New variable.
1166 (enable_async_io, disable_async_io): Use it. Update comments.
1167 (look_up_one_symbol): Use the symbol cache.
1168 * thread-db.c (thread_db_look_up_symbols): New function.
1169 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1171 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1173 * configure.in: Test for -rdynamic.
1174 * configure: Regenerated.
1175 * Makefile (INTERNAL_LDFLAGS): New.
1176 (gdbserver, gdbreplay): Use it.
1178 2004-09-02 Andrew Cagney <cagney@gnu.org>
1180 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1182 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1184 * linux-low.c (linux_wait): Clear all_processes list also.
1186 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1188 * linux-low.c: Include <errno.h>. Remove extern declaration of
1191 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1193 * gdbreplay.c, server.h, utils.c: Update copyright years.
1195 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1197 * server.c (main): Print child status or termination signal from
1198 variable 'signal', not 'sig'.
1200 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1202 * linux-low.c (linux_read_memory): Change return type to
1203 int. Check for and return error from ptrace().
1204 * target.c (read_inferior_memory): Change return type to int. Pass
1205 back return status from the_target->read_memory().
1206 * target.h (struct target_ops): Adapt *read_memory() prototype.
1208 (read_inferior_memory): Adapt prototype.
1209 * server.c (main): Return an error packet if
1210 read_inferior_memory() returns an error.
1212 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1214 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1215 Unify with other clean targets.
1217 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1219 * server.c (handle_v_cont): Call set_desired_inferior.
1221 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1223 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1225 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1227 * linux-low.c (linux_wait): Unblock async I/O.
1228 (linux_resume): Block and enable async I/O.
1229 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1230 * server.h (block_async_io, unblock_async_io): Add prototypes.
1232 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1234 * remote-utils.c (remote_open): Print a status notice after
1236 * server.c (attach_inferior): Print a status notice after
1239 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1241 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1243 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1245 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1247 * server.c, target.h: Update copyright years.
1249 2004-02-25 Roland McGrath <roland@redhat.com>
1251 * target.h (struct target_ops): New member `read_auxv'.
1252 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1253 * linux-low.c (linux_read_auxv): New function.
1254 (linux_target_ops): Initialize `read_auxv' member to that.
1256 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1258 Committed by Jim Blandy <jimb@redhat.com>.
1260 * linux-s390-low.c (s390_num_regs): Update.
1261 (s390_regmap): Remove control registers. Use __s390x__ predefine
1262 instead of GPR_SIZE to distiguish s390 and s390x targets.
1264 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1266 * linux-low.c: Update copyright year.
1267 (check_removed_breakpoint): Clear pending_is_breakpoint.
1268 (linux_set_resume_request, linux_queue_one_thread)
1269 (resume_status_pending_p): New functions.
1270 (linux_continue_one_thread): Use process->resume.
1271 (linux_resume): Only resume threads if there are no pending events.
1272 * linux-low.h (struct process_info): Add resume request
1275 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1277 * regcache.c (new_register_cache): Clear the allocated register
1278 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1280 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1282 * linux-low.c (linux_resume): Take a struct thread_resume *
1284 (linux_wait): Update call.
1285 (resume_ptr): New static variable.
1286 (linux_continue_one_thread): Renamed from
1287 linux_continue_one_process. Use resume_ptr.
1288 (linux_resume): Use linux_continue_one_thread.
1289 * server.c (handle_v_cont, handle_v_requests): New functions.
1290 (myresume): New function.
1291 (main): Handle 'v' case.
1292 * target.h (struct thread_resume): New type.
1293 (struct target_ops): Change argument of "resume" to struct
1295 (myresume): Delete macro.
1297 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1299 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1300 (uninstall): Support DESTDIR.
1302 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1304 * configure.srv: Add xscale*linux copy of arm*linux entry.
1306 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1308 * linux-arm-low.c (arm_reinsert_addr): New function.
1309 (the_low_target): Add arm_reinsert_addr.
1311 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1313 * mem-break.c: Remove whitespace at end of file.
1315 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1317 * configure.in: Check whether we need to prototype strerror.
1318 * server.h: Optionally prototype strerror.
1319 * gdbreplay.c (perror_with_name): Use strerror.
1320 * linux-low.c (linux_attach_lwp): Use strerror.
1321 * utils.c (perror_with_name): Use strerror.
1322 * config.in, configure: Regenerated.
1324 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1326 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1327 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1329 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1331 * Makefile.in (SFILES): Update.
1332 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1333 low-sun3.c: Remove files.
1335 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1337 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1338 (linux_detach_one_process, linux_detach): New functions.
1339 (linux_target_ops): Add linux_detach.
1340 * server.c (main): Handle 'D' packet.
1341 * target.h (struct target_ops): Add "detach" member.
1342 (detach_inferior): Define.
1344 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1346 From Kelley Cook <kelleycook@wideopenwest.com>:
1347 * configure.srv: Accept i[34567]86 variants.
1349 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1351 * linux-low.c (linux_wait_for_event): Correct comment typos.
1352 (linux_resume_one_process): Call check_removed_breakpoint.
1353 (linux_send_signal): New function.
1354 (linux_target_ops): Add linux_send_signal.
1355 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1357 * target.h (struct target_ops): Add send_signal.
1359 2003-05-29 Jim Blandy <jimb@redhat.com>
1361 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1362 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1363 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1364 away part of the register's value.
1366 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1368 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1369 (linux_wait_for_event, linux_init_signals): Likewise.
1371 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1373 * configure.in: Check for stdlib.h.
1374 * configure: Regenerated.
1375 * config.in: Regenerated.
1377 2003-01-04 Andreas Schwab <schwab@suse.de>
1379 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1381 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1383 * Makefile.in: Remove obsolete code.
1385 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1387 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1388 defined(PT_FPR0_HI).
1390 2002-11-17 Stuart Hughes <seh@zee2.com>
1392 * linux-arm-low.c (arm_num_regs): Increase.
1393 (arm_regmap): Include status register.
1395 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1397 * linux-low.c (register_addr): Remove incorrect -1 check.
1399 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1401 * linux-low.c (linux_create_inferior): Call setpgid. Return
1403 (unstopped_p, linux_signal_pid): Remove.
1404 (linux_target_ops): Remove linux_signal_pid.
1405 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1406 global instead of target method.
1407 * target.h (struct target_ops): Remove signal_pid. Update comment
1408 for create_inferior.
1409 * server.c (signal_pid): New variable.
1410 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1411 gdbserver. Set the child to be the foreground process group.
1412 (attach_inferior): Set signal_pid.
1414 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1416 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1418 2002-08-20 Jim Blandy <jimb@redhat.com>
1420 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1423 2002-08-01 Andrew Cagney <cagney@redhat.com>
1425 * Makefile.in: Make chill references obsolete.
1427 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1429 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1430 * configure: Regenerate.
1431 * config.in: Regenerate.
1433 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1435 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1436 (perror_with_name, remote_close, remote_open, expect, play): Static.
1438 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1440 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1441 byte offsets instead of an array of indexes.
1442 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1444 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1446 * regcache.c: Add comment.
1448 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1450 * thread-db.c: New file.
1451 * proc-service.c: New file.
1452 * acinclude.m4: New file.
1453 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1454 proc-service.o, and thread-db.o.
1455 (linux-low.o): Add USE_THREAD_DB.
1456 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1457 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1458 * aclocal.m4: Regenerated.
1459 * config.in: Regenerated.
1460 * configure: Regenerated.
1461 * configure.in: Check for proc_service.h, sys/procfs.h,
1462 thread_db.h, and linux/elf.h headrs.
1463 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1464 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1465 Check for -lthread_db and thread support.
1466 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1467 PowerPC, and SuperH.
1468 * i387-fp.c: Constify arguments.
1469 * i387-fp.h: Likewise.
1470 * inferiors.c: (struct thread_info): Renamed from
1471 `struct inferior_info'. Remove PID member. Use generic inferior
1472 list header. All uses updated.
1473 (inferiors, signal_pid): Removed.
1474 (all_threads): New variable.
1475 (get_thread): Define.
1476 (add_inferior_to_list): New function.
1477 (for_each_inferior): New function.
1478 (change_inferior_id): New function.
1479 (add_inferior): Removed.
1480 (remove_inferior): New function.
1481 (add_thread): New function.
1482 (free_one_thread): New function.
1483 (remove_thread): New function.
1484 (clear_inferiors): Use for_each_inferior and free_one_thread.
1485 (find_inferior): New function.
1486 (find_inferior_id): New function.
1487 (inferior_target_data): Update argument type.
1488 (set_inferior_target_data): Likewise.
1489 (inferior_regcache_data): Likewise.
1490 (set_inferior_regcache_data): Likewise.
1491 * linux-low.c (linux_bp_reinsert): Remove.
1492 (all_processes, stopping_threads, using_thrads)
1493 (struct pending_signals, debug_threads, pid_of): New.
1494 (inferior_pid): Replace with macro.
1495 (struct inferior_linux_data): Remove.
1496 (get_stop_pc, add_process): New functions.
1497 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1498 Use add_process and add_thread.
1499 (linux_attach_lwp): New function, based on old linux_attach. Use
1500 add_process and add_thread. Set stop_expected for new threads.
1501 (linux_attach): New function.
1502 (linux_kill_one_process): New function.
1503 (linux_kill): Kill all LWPs.
1504 (linux_thread_alive): Use find_inferior_id.
1505 (check_removed_breakpoints, status_pending_p): New functions.
1506 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1507 Update. Use WNOHANG. Wait for cloned processes also. Update process
1508 struct for the found process.
1509 (linux_wait_for_event): New function.
1510 (linux_wait): Use it. Support LWPs.
1511 (send_sigstop, wait_for_sigstop, stop_all_processes)
1512 (linux_resume_one_process, linux_continue_one_process): New functions.
1513 (linux_resume): Support LWPs.
1514 (REGISTER_RAW_SIZE): Remove.
1515 (fetch_register): Use register_size instead. Call supply_register.
1516 (usr_store_inferior_registers): Likewise. Call collect_register.
1518 (regsets_fetch_inferior_registers): Improve error message.
1519 (regsets_store_inferior_registers): Add debugging.
1520 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1521 (unstopped_p, linux_signal_pid): New functions.
1522 (linux_target_ops): Add linux_signal_pid.
1523 (linux_init_signals): New function.
1524 (initialize_low): Call it. Initialize using_threads.
1525 * regcache.c (inferior_regcache_data): Add valid
1527 (get_regcache): Fetch registers lazily. Add fetch argument
1528 and update all callers.
1529 (regcache_invalidate_one, regcache_invalidate): New
1531 (new_register_cache): Renamed from create_register_cache.
1532 Return the new regcache.
1533 (free_register_cache): Change argument to a void *.
1534 (registers_to_string, registers_from_string): Call get_regcache
1535 with fetch flag set.
1536 (register_data): Make static. Pass fetch flag to get_regcache.
1537 (supply_register): Call get_regcache with fetch flag clear.
1538 (collect_register): Call get_regcache with fetch flag set.
1539 (collect_register_as_string): New function.
1540 * regcache.h: Update.
1541 * remote-utils.c (putpkt): Flush after debug output and use
1543 Handle input interrupts while waiting for an ACK.
1544 (input_interrupt): Use signal_pid method.
1545 (getpkt): Flush after debug output and use stderr.
1546 (outreg): Use collect_register_as_string.
1547 (new_thread_notify, dead_thread_notify): New functions.
1548 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1550 (look_up_one_symbol): Flush after debug output.
1551 * server.c (step_thread, server_waiting): New variables.
1552 (start_inferior): Don't use signal_pid. Update call to mywait.
1553 (attach_inferior): Update call to mywait.
1554 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1555 (main): Don't fetch/store registers explicitly. Use
1556 set_desired_inferior. Support proposed ``Hs'' packet. Update
1559 (struct inferior_list, struct_inferior_list_entry): New.
1560 * target.c (set_desired_inferior): New.
1561 (write_inferior_memory): Constify.
1562 (mywait): New function.
1564 (struct target_ops): New signal_pid method.
1565 (mywait): Removed macro, added prototype.
1567 * linux-low.h (regset_func): Removed.
1568 (regset_fill_func, regset_store_func): New.
1569 (enum regset_type): New.
1570 (struct regset_info): Add type field. Use new operation types.
1571 (struct linux_target_ops): stop_pc renamed to get_pc.
1572 Add decr_pc_after_break and breakpoint_at.
1573 (get_process, get_thread_proess, get_process_thread)
1574 (strut process_info, all_processes, linux_attach_lwp)
1575 (thread_db_init): New.
1577 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1578 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1579 (the_low_target): Add new members.
1580 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1581 (i386_store_fpxregset): Constify.
1582 (target_regsets): Add new kind identifier.
1583 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1584 (i386_set_pc): Add debugging.
1585 (i386_breakpoint_at): New function.
1586 (the_low_target): Add new members.
1587 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1588 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1589 (mips_breakpoint_at): New.
1590 (the_low_target): Add new members.
1591 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1592 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1593 (the_low_target): Add new members.
1594 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1595 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1596 (the_low_target): Add new members.
1597 * linux-x86-64-low.c (target_regsets): Add new kind
1600 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1602 From Martin Pool <mbp@samba.org>:
1603 * server.c (gdbserver_usage): New function.
1606 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1608 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1611 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1613 * Makefile.in: Remove obsolete code.
1615 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1617 * linux-low.c (regsets_fetch_inferior_registers),
1618 (regsets_store_inferior_registers): Removed cast to int from
1620 * regcache.h: Added declaration of struct inferior_info.
1622 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1624 * inferiors.c (struct inferior_info): Add regcache_data.
1625 (add_inferior): Call create_register_cache.
1626 (clear_inferiors): Call free_register_cache.
1627 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1628 * regcache.c (struct inferior_regcache_data): New.
1629 (registers): Remove.
1630 (get_regcache): New function.
1631 (create_register_cache, free_register_cache): New functions.
1632 (set_register_cache): Don't initialize the register cache here.
1633 (registers_to_string, registers_from_string, register_data): Call
1635 * regcache.h: Add prototypes.
1636 * server.h: Likewise.
1638 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1640 * mem-break.c: New file.
1641 * mem-break.h: New file.
1642 * Makefile.in: Add mem-break.o rule; update server.h
1644 * inferiors.c (struct inferior_info): Add target_data
1646 (clear_inferiors): Free target_data member if set.
1647 (inferior_target_data, set_inferior_target_data): New functions.
1648 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1649 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1650 * linux-low.c (linux_bp_reinsert): New variable.
1651 (struct inferior_linux_data): New.
1652 (linux_create_inferior): Use set_inferior_target_data.
1653 (linux_attach): Likewise. Call add_inferior.
1654 (linux_wait_for_one_inferior): New function.
1655 (linux_wait): Call it.
1656 (linux_write_memory): Add const.
1657 (initialize_low): Call set_breakpoint_data.
1658 * linux-low.h (struct linux_target_ops): Add breakpoint
1660 * server.c (attach_inferior): Remove extra add_inferior
1662 * server.h: Include mem-break.h. Update inferior.c
1664 * target.c (read_inferior_memory)
1665 (write_inferior_memory): New functions.
1666 * target.h (read_inferior_memory)
1667 (write_inferior_memory): Change macros to prototypes.
1668 (struct target_ops): Update comments. Add const to write_memory
1671 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1673 * linux-low.c (usr_store_inferior_registers): Support
1674 registers which are allowed to fail to store.
1675 * linux-low.h (linux_target_ops): Likewise.
1676 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1677 (ppc_cannot_store_register): FPSCR may not be storable.
1679 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1681 * server.h: Include <string.h> if HAVE_STRING_H.
1682 * ChangeLog: Correct paths in last ChangeLog entry.
1684 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1686 * linux-low.h: Remove obsolete prototypes.
1687 (struct linux_target_ops): New.
1688 (extern the_low_target): New.
1689 * linux-low.c (num_regs, regmap): Remove declarations.
1690 (register_addr): Use the_low_target explicitly.
1691 (fetch_register): Likewise.
1692 (usr_fetch_inferior_registers): Likewise.
1693 (usr_store_inferior_registers): Likewise.
1694 * linux-arm-low.c (num_regs): Remove.
1695 (arm_num_regs): Define.
1696 (arm_regmap): Renamed from regmap, made static.
1697 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1699 (arm_cannot_store_register): Renamed from cannot_store_register,
1701 (the_low_target): New.
1702 * linux-i386-low.c (num_regs): Remove.
1703 (i386_num_regs): Define.
1704 (i386_regmap): Renamed from regmap, made static.
1705 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1707 (i386_cannot_store_register): Renamed from cannot_store_register,
1709 (the_low_target): New.
1710 * linux-ia64-low.c (num_regs): Remove.
1711 (ia64_num_regs): Define.
1712 (ia64_regmap): Renamed from regmap, made static.
1713 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1715 (ia64_cannot_store_register): Renamed from cannot_store_register,
1717 (the_low_target): New.
1718 * linux-m68k-low.c (num_regs): Remove.
1719 (m68k_num_regs): Define.
1720 (m68k_regmap): Renamed from regmap, made static.
1721 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1723 (m68k_cannot_store_register): Renamed from cannot_store_register,
1725 (the_low_target): New.
1726 * linux-mips-low.c (num_regs): Remove.
1727 (mips_num_regs): Define.
1728 (mips_regmap): Renamed from regmap, made static.
1729 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1731 (mips_cannot_store_register): Renamed from cannot_store_register,
1733 (the_low_target): New.
1734 * linux-ppc-low.c (num_regs): Remove.
1735 (ppc_num_regs): Define.
1736 (ppc_regmap): Renamed from regmap, made static.
1737 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1739 (ppc_cannot_store_register): Renamed from cannot_store_register,
1741 (the_low_target): New.
1742 * linux-s390-low.c (num_regs): Remove.
1743 (s390_num_regs): Define.
1744 (s390_regmap): Renamed from regmap, made static.
1745 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1747 (s390_cannot_store_register): Renamed from cannot_store_register,
1749 (the_low_target): New.
1750 * linux-sh-low.c (num_regs): Remove.
1751 (sh_num_regs): Define.
1752 (sh_regmap): Renamed from regmap, made static.
1753 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1755 (sh_cannot_store_register): Renamed from cannot_store_register,
1757 (the_low_target): New.
1758 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1759 (the_low_target): New.
1761 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1763 * Makefile.in: Add stamp-h target.
1764 * configure.in: Create stamp-h.
1765 * configure: Regenerated.
1767 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1769 * inferiors.c: New file.
1770 * target.c: New file.
1771 * target.h: New file.
1772 * Makefile.in: Add target.o and inferiors.o. Update
1774 * linux-low.c (inferior_pid): New static variable,
1775 moved from server.c.
1776 (linux_create_inferior): Renamed from create_inferior.
1777 Call add_inferior. Return 0 on success instead of a PID.
1778 (linux_attach): Renamed from myattach.
1779 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1780 (linux_thread_alive): Renamed from mythread_alive.
1781 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1783 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1784 (regsets_store_inferior_registers): Correct error message.
1785 Add missing ``return 0''.
1786 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1787 (linux_store_registers): Renamed from store_inferior_registers.
1788 (linux_read_memory): Renamed from read_inferior_memory.
1789 (linux_write_memory): Renamed from write_inferior_memory.
1790 (linux_target_ops): New structure.
1791 (initialize_low): Call set_target_ops ().
1792 * remote-utils.c (unhexify): New function.
1793 (hexify): New function.
1794 (input_interrupt): Send signals to ``signal_pid''.
1795 * server.c (inferior_pid): Remove.
1796 (start_inferior): Update create_inferior call.
1797 (attach_inferior): Call add_inferior.
1798 (handle_query): New function.
1799 (main): Call handle_query for `q' packets.
1800 * server.h: Include "target.h". Remove obsolete prototypes.
1801 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1803 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1805 * Makefile.in: Add WARN_CFLAGS. Update configury
1807 * configure.in: Check for <string.h>
1808 * configure: Regenerate.
1809 * config.in: Regenerate.
1810 * gdbreplay.c: Include needed system headers.
1811 (remote_open): Remove strchr prototype.
1812 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1813 * regcache.c (supply_register): Change buf argument to const void *.
1814 (supply_register_by_name): Likewise.
1815 (collect_register): Change buf argument to void *.
1816 (collect_register_by_name): Likewise.
1817 * regcache.h: Add missing prototypes.
1818 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1819 * server.c (handle_query): New function.
1820 (attached): New static variable, moved out of main.
1821 (main): Quiet longjmp clobber warnings.
1822 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1823 * utils.c (error): Remove NORETURN.