1 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3 * inferiors.c (change_inferior_id): Delete.
4 (add_pid_to_list, pull_pid_from_list): New.
5 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12 (using_threads): Always set to 1.
13 (handle_extended_wait): New.
14 (add_process): Do not set TID.
15 (linux_create_inferior): Set must_set_ptrace_flags.
16 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
18 (linux_thread_alive): Rename TID argument to LWPID.
19 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20 (linux_wait_for_event): Do not use TID or check using_threads. Update
21 call to dead_thread_notify. Call handle_extended_wait.
22 (linux_create_inferior): Use PTRACE_SETOPTIONS.
23 (send_sigstop): Delete sigstop_sent.
24 (wait_for_sigstop): Avoid TID.
25 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
26 (linux_test_for_tracefork): New.
27 (linux_lookup_signals): Use thread_db_active and
28 linux_supports_tracefork_flag.
29 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
30 * linux-low.h (get_process_thread): Avoid TID.
31 (struct process_ifo): Move thread_known and tid to the end. Remove
33 (linux_attach_lwp, thread_db_init): Update prototypes.
34 * server.h (change_inferior_id): Delete prototype.
35 (add_pid_to_list, pull_pid_from_list): New prototypes.
36 * thread-db.c (thread_db_use_events): New.
37 (find_first_thread): Rename to...
38 (find_one_thread): ...this. Update callers and messages. Do not
39 call fatal. Check thread_db_use_events. Do not call
40 change_inferior_id or new_thread_notify.
41 (maybe_attach_thread): Update. Do not call new_thread_notify.
42 (thread_db_init): Set thread_db_use_events. Check use_events.
43 * utils.c (fatal, warning): Correct message prefix.
45 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
47 * Makefile.in (clean): Remove new files.
48 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
49 (powerpc-64.o, powerpc-64.c): New rules.
50 * configure.srv: Use alternate register sets for powerpc64-*-linux*
51 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
53 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
55 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
56 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
57 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
58 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
59 (target_regsets): Add AltiVec and SPE register sets.
60 * configure.ac: Check for AltiVec and SPE.
61 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
62 (ppc_fill_vrregset, ppc_store_vrregset): New.
63 (target_regsets): Add AltiVec register set.
64 * configure: Regenerated.
66 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
68 * linux-low.c (O_LARGEFILE): Define.
69 (linux_read_memory): Use /proc/PID/mem.
70 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
71 * configure, config.in: Regenerated.
73 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
75 * linux-low.c (linux_wait_for_event): Do not pass signals while
78 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
80 * win32-low.c (create_process): New.
81 (win32_create_inferior): Use create_process instead of
82 CreateProcess. If create_process failed retry appending an ".exe"
83 suffix. Store the GetLastError result immediatelly after
84 create_process calls and use it on the call to error.
86 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
88 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
90 2007-08-23 Joel Brobecker <brobecker@adacore.com>
92 * configure.ac: Switch license to GPLv3.
94 2007-08-01 Michael Snyder <msnyder@access-company.com>
96 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
98 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
100 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
102 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
103 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
104 CloseToolhelp32Snapshot.
105 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
106 CloseToolhelp32Snapshot.
108 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
110 * server.c (main): Check for inferior exit before main loop.
112 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
114 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
115 instead of on tmp_desc.
117 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
118 Daniel Jacobowitz <dan@codesourcery.com>
120 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
121 (add_thread): Minor cleanups.
122 (clear_inferiors): Move lower in the file. Clear the DLL
124 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
125 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
126 (xml_escape_text): New.
127 * server.c (handle_query): Handle qXfer:libraries:read. Report it
129 (handle_v_cont): Report errors.
130 (gdbserver_version): Update.
131 (main): Correct size of own_buf. Do not report initial DLL events.
132 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
133 (unloaded_dll, xml_escape_text): New.
134 * win32-low.c (enum target_waitkind): Update comments.
135 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
136 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
137 (win32_EnumProcessModules, win32_GetModuleInformation)
138 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
139 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
140 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
141 (win32_Module32First, win32_Module32Next, load_toolhelp)
142 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
143 (get_child_debug_event): Handle DLL events.
144 (win32_wait): Likewise.
146 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
148 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
149 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
151 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
153 * win32-low.c (handle_output_debug_string): Ignore event if not
156 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
158 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
160 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
162 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
164 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
166 * inferiors.c (change_inferior_id): Add comment.
167 * linux-low.c (check_removed_breakpoint): Add an early
168 prototype. Improve debug output.
169 (linux_attach): Doc update.
170 (linux_detach_one_process, linux_detach): Clean up before releasing
172 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
173 * linux-low.h (struct process_info): Doc improvement.
174 * mem-break.c (delete_all_breakpoints): New.
175 * mem-break.h (delete_all_breakpoints): New prototype.
176 * thread-db.c (find_first_thread): New.
177 (thread_db_create_event): Call it instead of
178 thread_db_find_new_threads. Clean up unused variables.
179 (maybe_attach_thread): Remove first thread handling.
180 (thread_db_find_new_threads): Use find_first_thread.
181 (thread_db_get_tls_address): Likewise.
183 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
185 * thread-db.c (thread_db_find_new_threads): Add prototype.
186 (thread_db_create_event): Check for the main thread before adding
188 (maybe_attach_thread): Only enable event reporting if TID == 0.
189 (thread_db_get_tls_address): Check for new threads.
191 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
193 * linux-low.c (linux_create_inferior): Try execv before execvp.
194 * spu-low.c (spu_create_inferior): Likewise.
196 2007-06-13 Mike Frysinger <vapier@gentoo.org>
198 * linux-low.c (linux_create_inferior): Change execv to execvp.
199 * spu-low.c (spu_create_inferior): Likewies.
201 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
203 * Makefile.in (clean): Clean new files instead of deleted ones.
204 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
205 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
207 * configure.srv: Specify XML files and new regformats for MIPS and
209 * linux-mips-low.c (mips_num_regs): Set to only used registers.
210 (mips_regmap): Do not fetch $0. Remove unused registers. Add
211 an entry for the restart register.
212 (mips_cannot_fetch_register, mips_cannot_store_register)
213 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
214 register names to match the XML descriptions.
215 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
216 restart register instead of $0.
218 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
219 Markus Deuling <deuling@de.ibm.com>
221 * remote-utils.c (decode_xfer_write): New function.
222 * server.h (decode_xfer_write): Add prototype.
223 * server.c (handle_query): Add PACKET_LEN argument. Support
224 qXfer:spu:read and qXfer:spu:write packets.
225 (main): Pass packet_len to handle_query.
226 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
227 * target.h (target_ops): Add qxfer_spu.
229 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
231 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
232 accessing non-seekable spufs files.
234 2007-05-16 Markus Deuling <deuling@de.ibm.com>
236 * server.c (handle_query): Add reply for qC packet.
238 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
239 Leo Zayas <lerele@champenstudios@com>
241 * server.h (check_remote_input_interrupt_request): New function.
242 * remote_utils.c (INVALID_DESCRIPTOR): New define.
243 (remote_desc): Initialize with INVALID_DESCRIPTOR.
244 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
245 (check_remote_input_interrupt_request): New function.
246 * server.h (check_remote_input_interrupt_request): Declare.
247 * win32-low.c (winapi_DebugBreakProcess,
248 winapi_GenerateConsoleCtrlEvent): New typedefs.
249 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
251 (win32_wait): Check for remote interrupt request
252 with check_remote_input_interrupt_request.
253 (win32_request_interrupt): New function.
254 (win32_target_op): Set request_interrupt to win32_request_interrupt.
256 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
258 * win32-low.c (debug_registers_changed,
259 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
260 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
261 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
262 (thread_rec): Get context using the low target.
263 (child_add_thread): Call thread_added on the low target,
264 which does the same thing.
266 (do_initial_child_stuff): Remove debug registers references.
267 Set context using the low target. Resume threads after
268 setting the contexts.
269 (child_continue): Remove dead variable. Remove debug
270 registers references.
271 (child_fetch_inferior_registers): Go through the low target.
272 (do_child_store_inferior_registers): Remove.
273 (child_store_inferior_registers): Go through the low target.
274 (win32_resume): Remove debug registers references.
275 Set context using the low target.
276 (handle_exception): Change return type to void. Don't record
277 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
278 first chance exception.
279 (get_child_debug_event): Change return type to void. Remove
280 goto loop. Always return after waiting for debug event.
281 (win32_wait): Convert to switch statement. Handle spurious
284 * win32-i386-low.c (debug_registers_changed,
285 debug_registers_used): New.
286 (initial_stuff): Rename to ...
287 (i386_initial_stuff): ... this. Clear debug registers
289 (store_debug_registers): Delete.
290 (i386_get_thread_context): New.
291 (load_debug_registers): Delete.
292 (i386_set_thread_context): New.
293 (i386_thread_added): New.
294 (single_step): Rename to ...
295 (i386_single_step): ... this.
296 (do_fetch_inferior_registers): Rename to ...
297 (i386_fetch_inferior_register): ... this.
298 (i386_store_inferior_register): New.
299 (the_low_target): Adapt to new interface.
301 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
302 (arm_get_thread_context): New.
303 (arm_set_thread_context): New.
305 (do_fetch_inferior_registers): Rename to ...
306 (arm_fetch_inferior_register): ... this.
307 (arm_store_inferior_register): New.
308 (arm_wince_breakpoint): Reimplement as unsigned long.
309 (arm_wince_breakpoint_len): Define.
310 (the_low_target): Adapt to new interface.
312 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
313 load_debug_registers. Add get_thread_context, set_thread_context,
314 thread_added and store_inferior_register. Rename
315 fetch_inferior_registers to fetch_inferior_register.
316 (regptr): Remove declaration.
318 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
320 * linux-low.c (linux_detach): Change return type to int. Return 0.
321 * spu-low.c (spu_detach): Likewise.
323 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
325 * target.h (target_ops): Change return type of detach to int.
327 (join_inferior): New.
328 * server.c (main): Don't skip detach support on mingw32.
329 If the inferior doesn't support detaching return error.
330 Call join_inferior instead of using waitpid.
331 * linux-low.c (linux_join): New.
332 (linux_target_op): Add linux_join.
333 * spu-low.c (spu_join): New.
334 (spu_target_ops): Add spu_join.
335 * win32-low.c (win32_detach): Adapt to new interface.
336 Reopen current_process_handle before detaching. Issue a child
337 resume before detaching.
339 (win32_target_op): Add win32_join.
341 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
343 * win32-low.c (win32-attach): Fix return value.
344 * target.h (target_ops): Describe ATTACH return values.
346 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
348 * win32-low.c (GETPROCADDRESS): Define.
349 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
350 (winapi_DebugSetProcessKillOnExit): Likewise.
351 (win32_create_inferior): Force usage of ansi CreateProcessA.
352 (win32_attach): Use GETPROCADDRESS.
353 (win32_detach): Likewise.
355 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
357 * win32-low.c (win32_wait): Don't use WSTOPSIG.
359 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
361 * win32-low.c: Commit leftover changes from 2007-03-29.
363 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
365 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
366 fields short instead of int. Add explicit padding.
367 (i387_cache_to_fsave): Remove unnecessary casts.
368 (i387_fsave_to_cache): Doc fix.
369 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
371 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
373 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
374 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
376 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
378 * configure.srv (arm*-*-mingw32ce*): Move near the other
381 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
383 * configure.ac: Add errno checking.
384 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
385 sys/file.h and malloc.h.
386 (AC_CHECK_DECLS): Add perror.
387 (srv_mingwce): Handle.
388 * configure.srv (i[34567]86-*-cygwin*): Add
389 win32-i386-low.o to srv_tgtobj.
390 (i[34567]86-*-mingw*): Likewise.
391 (arm*-*-mingw32ce*): Add case.
392 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
393 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
394 [__MINGW32CE__] (strerror): New function.
395 [__MINGW32CE__] (errno): Define to GetLastError.
396 [__MINGW32CE__] (COUNTOF): New macro.
397 (remote_open): Remove extra close call.
398 * mem-break.c (delete_breakpoint_at): New function.
399 * mem-break.h (delete_breakpoint_at): Declare.
400 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
401 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
402 [USE_WIN32API] (read, write): Add char* casts.
403 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
404 * server.h: Include wincecompat.h on Windows CE.
405 [HAVE_ERRNO_H]: Check.
406 (perror): Declare if not declared.
407 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
408 (perror_with_name): Remove errno declaration.
409 * wincecompat.h: New.
410 * wincecompat.c: New.
412 * win32-arm-low.c: New.
413 * win32-i386-low.c: New.
414 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
415 (OUTMSG2): Make it safe.
417 (COUNTOF): New macro.
418 (NUM_REGS): Get it from the low target.
419 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
420 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
421 (thread_rec): Let low target handle debug registers.
422 (child_add_thread): Likewise.
423 (child_init_thread_list): Likewise.
424 (continue_one_thread): Likewise.
426 (do_child_fetch_inferior_registers): Move to ...
427 * win32-i386-low.c: ... here, and rename to ...
428 (do_fetch_inferior_registers): ... this.
429 * win32-low.c (child_fetch_inferior_registers):
430 Go through the low target.
431 (do_child_store_inferior_registers): Use regptr.
432 (strwinerror): New function.
433 (win32_create_inferior): Handle Windows CE.
434 Use strwinerror instead of strerror on Windows error
435 codes. Add program to the error output.
436 Don't close the main thread handle on Windows CE.
437 (win32_attach): Use coredll.dll on Windows CE.
438 (win32_kill): Close current process and current
440 (win32_detach): Use coredll.dll on Windows CE.
441 (win32_resume): Let low target handle debug registers, and
443 (handle_exception): Add/Remove initial breakpoint. Avoid
444 non-existant WSTOPSIG on Windows CE.
445 (win32_read_inferior_memory): Cast to remove warning.
446 (win32_arch_string): Go through the low target.
447 (initialize_low): Call set_breakpoint_data with the low
449 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
450 FOP_REGNUM, mappings): Move to ...
451 * win32-i386-low.c: ... here.
452 * win32-low.c (win32_thread_info): Move to ...
453 * win32-low.h: ... here.
454 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
455 win32-arm-low.c and wincecompat.c.
457 (install-only:): Likewise.
458 (gdbserver:): Likewise.
459 (gdbreplay:): Likewise.
460 * config.in: Regenerate.
461 * configure: Regenerate.
463 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
465 * win32-low.c: Rename typedef thread_info to
466 win32_thread_info throughout.
468 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
470 * win32-i386-low.c: Rename to ...
471 * win32-low.c: ... this.
472 * configure.srv: Replace win32-i386-low.o with win32-low.o.
473 * Makefile.in: Likewise.
475 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
477 * remote-utils.c (monitor_output): Constify msg parameter.
478 * server.h (monitor_output): Likewise.
479 * win32-i386-low.c (handle_output_debug_string): New.
480 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
481 handle_output_debug_string.
482 (get_child_debug_event): Likewise.
484 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
486 * server.c (main): Correct strtoul check.
488 2007-03-27 Jon Ringle <jon@ringle.org>
490 * linux-low.c: Check __ARCH_HAS_MMU__ also.
492 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
494 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
496 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
498 * terminal.h: Check HAVE_SGTTY_H.
500 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
502 * remote-utils.c (remote_open): Print out the assigned port number.
504 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
506 * remote-utils.c (monitor_output): New function.
507 * server.c (debug_threads): Define here.
508 (monitor_show_help): New function.
509 (handle_query): Handle qRcmd.
510 (main): Do not handle 'd' packet.
511 * server.h (debug_threads, remote_debug, monitor_output): Declare.
512 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
515 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
517 * Makefile.in (EXEEXT): New.
518 (clean): Use $(EXEEXT).
520 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
522 * target.h (target_ops): Rename send_signal to request_interrupt,
523 and remove enum target_signal parameter.
524 * linux-low.c (linux_request_interrupt): Rename from
525 linux_send_signal, and always send SIGINT.
526 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
527 and always send SIGINT.
528 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
530 (input_interrupt): Likewise.
532 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
534 * server.c (get_features_xml): Check if target implemented
536 * win32-i386-low.c (win32_arch_string): New.
537 (win32_target_ops): Add win32_arch_string as arch_string member.
539 2007-02-22 Markus Deuling <deuling@de.ibm.com>
541 * spu-low.c (spu_arch_string): New.
542 (spu_target_ops): Add spu_arch_string.
544 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
546 * remote-utils.c: Remove HAVE_TERMINAL_H check.
547 * configure.ac: Do not check for terminal.h.
548 * configure, config.in: Regenerated.
550 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
552 * Makefile.in (OBS): Add $(XML_BUILTIN).
553 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
555 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
556 (arm-with-iwmmxt.c): New.
557 * config.in, configure: Regenerate.
558 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
559 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
560 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
561 (arm*-*-linux*): Add iWMMXt and regset support.
562 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
563 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
564 (arm_store_wmmxregset, target_regsets): New.
565 * server.c (get_features_xml): Take annex argument. Check builtin
567 (handle_query): Handle multiple annexes.
569 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
571 * remote-utils.c [USE_WIN32API] (read, write): Define.
572 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
575 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
577 * linux-i386-low.c (the_low_target): Set arch_string.
578 * linux-x86-64-low.c (the_low_target): Likewise.
579 * linux-low.c (linux_arch_string): New.
580 (linux_target_ops): Add it.
581 * linux-low.h (struct linux_target_ops): Add arch_string.
582 * server.c (write_qxfer_response): Use const void * for DATA.
583 (get_features_xml): New.
584 (handle_query): Handle qXfer:features:read. Report it for qSupported.
585 * target.h (struct target_ops): Add arch_string method.
587 2007-01-03 Denis Pilat <denis.pilat@st.com>
588 Daniel Jacobowitz <dan@codesourcery.com>
590 * linux-low.c (linux_kill): Handle being called with no threads.
591 * win32-i386-low.c (win32_kill): Likewise.
592 (get_child_debug_event): Clear current_process_handle.
594 2006-12-30 Denis PILAT <denis.pilat@st.com>
595 Daniel Jacobowitz <dan@codesourcery.com>
597 * remote-utils.c (remote_open): Check the type of specified
598 serial port devices before opening them.
599 * server.c (main): Kill the inferior if an error occurs during
600 the first remote_open.
602 2006-12-05 Markus Deuling <deuling@de.ibm.com>
604 * README: Update supported targets.
606 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
608 * Makefile.in (clean): Remove reg-mips64.c.
609 (reg-mips64.c, reg-mips64.o): New rules.
610 * configure.srv: Handle mips64. Include regset support for mips.
611 * linux-mips-low.c (union mips_register): New.
612 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
613 (mips_breakpoint, mips_breakpoint_at): Use int.
614 (mips_collect_register, mips_supply_register)
615 (mips_collect_register_32bit, mips_supply_register_32bit)
616 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
617 (mips_store_fpregset, target_regsets): New.
618 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
620 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
622 * configure.srv: Add target "spu*-*-*".
623 * Makefile.in (clean): Remove reg-spu.c.
624 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
625 * spu-low.c: New file.
627 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
629 * configure.ac: Correct td_thr_tls_get_addr test.
630 * configure: Regenerated.
632 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
634 * linux-low.c (linux_wait_for_event): Reformat. Use the
636 * remote-utils.c (decode_address_to_semicolon): New.
637 * server.c (pass_signals, handle_general_set): New.
638 (handle_query): Mention QPassSignals for qSupported.
639 (main): Call handle_general_set.
640 * server.h (pass_signals, decode_address_to_semicolon): New.
642 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
644 * server.c (handle_query): Correct error handling for read_auxv.
646 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
648 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
649 and srv_linux_thread_db to yes.
650 * linux-s390-low.c (s390_fill_gregset): New function.
651 (target_regsets): Define data structure.
653 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
655 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
656 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
657 * config.in, configure: Regenerated.
658 * inferiors.c (gdb_id_to_thread): New function.
659 (gdb_id_to_thread_id): Use it.
660 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
661 * linux-low.h (struct process_info): Add th member.
662 (thread_db_get_tls_address): New prototype.
663 * remote-utils.c (decode_address): Make non-static.
664 * server.c (handle_query): Handle qGetTLSAddr.
665 * server.h (gdb_id_to_thread, decode_address): New prototypes.
666 * target.h (struct target_ops): Add get_tls_address.
667 * thread-db.c (maybe_attach_thread): Save the thread handle.
668 (thread_db_get_tls_address): New.
670 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
672 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
673 (linux_resume_one_process): Take a siginfo_t *. Update all
674 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
675 (struct pending_signals): Add a siginfo_t.
676 (linux_wait_for_process): Always set last_status.
677 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
678 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
679 * linux-low.h (struct process_info): Add last_status.
681 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
683 * remote-utils.c (try_rle): New function.
684 (putpkt_binary): Use it.
686 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
688 * Makefile.in (clean): Clean reg-x86-64-linux.c.
689 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
690 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
691 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
692 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
695 2006-08-08 Richard Sandiford <richard@codesourcery.com>
697 * server.c (terminal_fd): New variable.
698 (old_foreground_pgrp): Likewise.
699 (restore_old_foreground_pgrp): New function.
700 (start_inferior): Record the terminal file descriptor in terminal_fd
701 and its original foreground group in old_foreground_pgrp. Register
702 restore_old_foreground_pgrp with atexit().
704 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
706 * server.c (handle_query): Correct qPart to qXfer.
708 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
710 * configure.ac: Check for more headers which are missing on
711 Windows. Automatically supply -lwsock32 and USE_WIN32API.
712 * configure.srv: Add Cygwin and mingw32.
713 * remote-utils.c: Don't include headers unconditionally which
714 are missing on mingw32. Include <winsock.h> for mingw32.
715 (remote_open): Adjust for mingw32 support. Flush
716 standard error after writing to it.
717 (remote_close, putpkt_binary, input_interrupt, block_async_io)
718 (unblock_async_io, enable_async_io, disable_async_io)
719 (readchar, getpkt): Update for Winsock support.
720 (prepare_resume_reply): Expect a protocol signal number.
721 * server.c: Disable <sys/wait.h> on mingw32.
722 (start_inferior): Adjust for mingw32 support. Flush
723 standard error after writing to it.
724 (attach_inferior): Likewise. Use protocol signal
726 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
728 * win32-i386-low.c: New file.
729 * Makefile.in (XM_CLIBS): Set.
730 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
731 (win32-i386-low.o): New dependency rule.
732 * linux-low.c (linux_wait): Use target signal numbers.
733 * target.h (struct target_ops): Doc fix.
734 * server.h (target_signal_to_name): New prototype.
735 * gdbreplay.c: Don't include headers unconditionally which
736 are missing on mingw32. Include <winsock.h> for mingw32.
737 (remote_close, remote_open): Adjust for Winsock support.
738 * configure, config.in: Regenerated.
740 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
742 * server.c (decode_xfer_read, write_qxfer_response): New.
743 (handle_query): Take a packet length argument. Handle
744 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
745 the qSupported response.
746 (main): Update call to handle_query.
748 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
750 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
751 (putpkt_binary): Renamed from putpkt and adjusted for binary
753 (putpkt): New wrapper for putpkt_binary.
754 (readchar): Don't mask off the high bit.
755 (decode_X_packet): New function.
756 * server.c (main): Call putpkt_binary if a handler sets the packet
757 length. Save the length of the incoming packet. Handle 'X'.
758 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
760 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
762 * server.c (handle_query): Handle qSupported.
764 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
766 * remote-utils.c (all_symbols_looked_up): New variable.
767 (look_up_one_symbol): Check it.
768 * server.h (look_up_one_symbol): New declaration.
769 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
771 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
773 * Makefile.in (linux-arm-low.o): Update dependencies.
774 * linux-arm-low.c: Include "gdb_proc_service.h".
775 (PTRACE_GET_THREAD_AREA): Define.
776 (ps_get_thread_area): New function.
778 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
780 * configure.srv (m68k*-*-uclinux*): New target.
781 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
782 (linux_resume_one_process): Remove extraneous cast.
783 (linux_read_offsets): New.
784 (linux_target_op): Add linux_read_offsets on mmuless systems.
785 * server.c (handle_query): Add qOffsets logic.
786 * target.h (struct target_ops): Add read_offsets.
788 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
790 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
791 (PTRACE_GET_THREAD_AREA): Define.
792 (ps_get_thread_area): New function.
793 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
794 (linux-x86-64-low.o): Update.
796 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
798 * configure.ac: Remove checks for prfpregset_t.
799 * gdb_proc_service.h: New file.
800 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
801 new "gdb_proc_service.h".
802 * proc-service.c: Likewise.
803 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
804 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
805 * Makefile.in (gdb_proc_service_h): Updated.
806 * configure, config.in: Regenerated.
808 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
810 * remote-utils.c (prepare_resume_reply): Move declaration
811 of gdb_id_from_wait to the top of the block.
813 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
815 * linux-low.c (regsets_store_inferior_registers): Read the regset
816 from the target before filling it.
818 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
820 * server.c (attach_inferior): Return SIGTRAP for a successful
823 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
825 * Makefile.in (OBS): Add version.o.
826 (STAGESTUFF): Delete.
827 (version.o): Add dependencies.
828 (version.c): Replace rule.
829 (clean): Remove version.c.
830 * server.c (gdbserver_version): New.
831 (gdbserver_usage): Use printf.
832 (main): Handle --version and --help.
833 * server.h (version, host_name): Add declarations.
835 2005-12-23 Eli Zaretskii <eliz@gnu.org>
847 * linux-x86-64-low.c:
859 * linux-crisv32-low.c:
871 * gdbserver.1: Add (C) after Copyright. Update the FSF
874 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
876 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
877 (arm_breakpoint_at): Recognize both breakpoints.
878 (the_low_target): Use the correct breakpoint instruction.
880 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
882 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
883 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
884 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
885 (the_low_target): Update.
887 2005-10-25 Andreas Schwab <schwab@suse.de>
889 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
891 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
892 (ia64_num_regs): Reduce to 462.
894 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
896 * acinclude.m4: Correct quoting.
897 * aclocal.m4: Regenerated.
899 Suggested by SZOKOVACS Robert <szo@ies.hu>:
900 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
901 (thread_db_init): Call thread_db_err_str.
902 * configure.ac: Check for TD_VERSION.
903 * config.in, configure: Regenerated.
905 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
907 * server.h (error, fatal, warning): Add ATTR_FORMAT.
909 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
911 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
912 is not available. Define HAVE_PTRACE_GETREGS if it is.
913 * config.in, configure: Regenerated.
914 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
915 * linux-i386-low.c, linux-m68k-low.c: Update to use
917 * linux-low.c (regsets_fetch_inferior_registers)
918 (regsets_store_inferior_registers): Only return 0 if we processed
920 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
921 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
923 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
925 * inferiors.c (struct thread_info): Add gdb_id.
926 (add_thread): Add gdb_id argument.
927 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
928 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
930 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
931 * server.c (handle_query): Use thread_to_gdb_id.
932 (handle_v_cont, main): Use gdb_id_to_thread_id.
933 * server.h (add_thread): Update prototype.
934 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
937 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
939 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
940 left-padded registers.
941 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
942 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
944 2005-07-01 Steve Ellcey <sje@cup.hp.com>
946 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
947 * configure: Regenerate.
948 * config.in: Regenerate.
949 * server.h (NEED_DECLARATION_STRERROR):
950 Replace with !HAVE_DECL_STRERROR.
952 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
954 * linux-low.c (linux_wait, linux_send_signal): Don't test
955 an unsigned long variable for > 0 if it could be MAX_ULONG.
956 * server.c (myresume): Likewise.
957 * target.c (set_desired_inferior): Likewise.
959 2005-06-13 Mark Kettenis <kettenis@gnu.org>
961 * configure.ac: Simplify and improve check for socklen_t.
962 * configure, config.in: Regenerate.
964 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
966 * acconfig.h: Remove.
967 * configure.ac: Add a test for socklen_t. Use three-argument
968 AC_DEFINE throughout.
969 * config.in: Regenerated using autoheader 2.59.
970 * configure: Regenerated.
972 * gdbreplay.c (socklen_t): Provide a default.
973 (remote_open): Use socklen_t.
974 * remote-utils.c (socklen_t): Provide a default.
975 (remote_open): Use socklen_t.
976 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
979 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
981 * linux-low.c (linux_read_memory, linux_write_memory)
982 (linux_read_auxv): Likewise.
983 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
984 (check_mem_write): Likewise.
985 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
987 * regcache.c (struct inferior_rgcache_data, registers_to_string)
988 (registers_from_string, register_data): Likewise.
989 * server.c (handle_query, main): Likewise.
990 * server.h (convert_ascii_to_int, convert_int_to_ascii)
991 (decode_M_packet): Likewise.
992 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
993 * target.h (struct target_ops): Update read_memory, write_memory,
995 (read_inferior_memory, write_inferior_memory): Update.
996 * linux-low.h (struct linux_target_ops): Change type of breakpoint
998 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
999 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1000 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1001 linux-s390-low.c, linux-sh-low.c: Update for changes in
1002 read_inferior_memory and the_low_target->breakpoint.
1004 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1006 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1007 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1008 * configure.srv: Add powerpc64-*-linux*.
1009 * linux-ppc64-low.c: New file.
1011 2005-05-23 Orjan Friberg <orjanf@axis.com>
1013 * linux-cris-low.c: New file with support for CRIS.
1014 * linux-crisv32-low.c: Ditto for CRISv32.
1015 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1016 (clean): Add reg-cris.c and reg-crisv32.c.
1017 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1018 reg-crisv32.o, and reg-crisv32.c to make rules.
1019 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1022 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1024 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1025 of sizeof (PTRACE_XFER_TYPE).
1026 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1028 2005-05-12 Orjan Friberg <orjanf@axis.com>
1030 * target.h (struct target_ops): Add insert_watchpoint,
1031 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1032 pointers for hardware watchpoint support.
1033 * linux-low.h (struct linux_target_ops): Ditto.
1034 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1035 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1036 to linux_target_ops.
1037 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1039 * server.c (main): Recognize 'Z' and 'z' packets.
1041 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1043 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1044 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1045 (the_low_target): Add new members.
1047 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1049 * proc-service.c (ps_lgetregs): Search all_processes instead of
1052 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1054 * server.c (start_inferior): Change return type to int.
1055 (attach_inferior): Change sigptr to int *.
1056 (handle_v_cont, handle_v_requests): Change signal to int *.
1057 (main): Change signal to int.
1059 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1061 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1062 * configure.srv: Add m32r*-*-linux*.
1063 * linux-m32r-low.c: New file.
1065 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1067 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1069 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1071 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1072 Take unsigned long arguments for PIDs.
1073 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1074 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1075 (wait_for_sigstop, linux_resume_one_process)
1076 (regsets_fetch_inferior_registers, linux_send_signal)
1077 (linux_read_auxv): Likewise. Update the types of variables holding
1078 PIDs. Update format string specifiers.
1079 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1080 * remote-utils.c (prepare_resume_reply): Likewise.
1081 * server.c (cont_thread, general_thread, step_thread)
1082 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1084 (handle_query): Update format specifiers.
1085 (handle_v_cont, main): Use strtoul for thread IDs.
1086 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1087 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1088 (general_thread, step_thread, thread_from_wait)
1089 (old_thread_from_wait): Update.
1090 * target.h (struct thread_resume): Use unsigned long for THREAD.
1091 (struct target_ops): Use unsigned long for arguments to attach and
1094 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1096 * acinclude.m4: Include bfd/bfd.m4 directly.
1097 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1098 <agriffis@toolchain.org>.
1099 * aclocal.m4, configure: Regenerated.
1101 2005-01-07 Andrew Cagney <cagney@gnu.org>
1103 * configure.ac: Rename configure.in, require autoconf 2.59.
1104 * configure: Re-generate.
1106 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1108 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1110 * aclocal.m4: Regenerated.
1111 * configure: Regenerated.
1113 2004-11-21 Andreas Schwab <schwab@suse.de>
1115 * linux-m68k-low.c (m68k_num_gregs): Define.
1116 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1117 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1118 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1119 (m68k_breakpoint_at): New. Add to the_low_target.
1121 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1122 srv_linux_thread_db to yes.
1124 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1126 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1127 (ARCH_SET_FS): Likewise.
1128 (ARCH_GET_FS): Likewise.
1129 (ARCH_GET_GS): Likewise.
1131 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1133 * linux-i386-low.c (ps_get_thread_area): New.
1134 * linux-x86-64-low.c (ps_get_thread_area): New.
1135 * linux-low.c: Include <sys/syscall.h>.
1136 (linux_kill_one_process): Don't kill the first thread here.
1137 (linux_kill): Kill the first thread here.
1138 (kill_lwp): New function.
1139 (send_sigstop, linux_send_signal): Use it.
1140 * proc-service.c: Clean up #ifdefs.
1141 (fpregset_info): Delete.
1142 (ps_lgetregs): Update and enable implementation.
1143 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1145 * remote-utils.c (struct sym_cache, symbol_cache): New.
1146 (input_interrupt): Print a clearer message.
1147 (async_io_enabled): New variable.
1148 (enable_async_io, disable_async_io): Use it. Update comments.
1149 (look_up_one_symbol): Use the symbol cache.
1150 * thread-db.c (thread_db_look_up_symbols): New function.
1151 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1153 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1155 * configure.in: Test for -rdynamic.
1156 * configure: Regenerated.
1157 * Makefile (INTERNAL_LDFLAGS): New.
1158 (gdbserver, gdbreplay): Use it.
1160 2004-09-02 Andrew Cagney <cagney@gnu.org>
1162 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1164 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1166 * linux-low.c (linux_wait): Clear all_processes list also.
1168 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1170 * linux-low.c: Include <errno.h>. Remove extern declaration of
1173 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1175 * gdbreplay.c, server.h, utils.c: Update copyright years.
1177 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1179 * server.c (main): Print child status or termination signal from
1180 variable 'signal', not 'sig'.
1182 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1184 * linux-low.c (linux_read_memory): Change return type to
1185 int. Check for and return error from ptrace().
1186 * target.c (read_inferior_memory): Change return type to int. Pass
1187 back return status from the_target->read_memory().
1188 * target.h (struct target_ops): Adapt *read_memory() prototype.
1190 (read_inferior_memory): Adapt prototype.
1191 * server.c (main): Return an error packet if
1192 read_inferior_memory() returns an error.
1194 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1196 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1197 Unify with other clean targets.
1199 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1201 * server.c (handle_v_cont): Call set_desired_inferior.
1203 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1205 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1207 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1209 * linux-low.c (linux_wait): Unblock async I/O.
1210 (linux_resume): Block and enable async I/O.
1211 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1212 * server.h (block_async_io, unblock_async_io): Add prototypes.
1214 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1216 * remote-utils.c (remote_open): Print a status notice after
1218 * server.c (attach_inferior): Print a status notice after
1221 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1223 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1225 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1227 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1229 * server.c, target.h: Update copyright years.
1231 2004-02-25 Roland McGrath <roland@redhat.com>
1233 * target.h (struct target_ops): New member `read_auxv'.
1234 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1235 * linux-low.c (linux_read_auxv): New function.
1236 (linux_target_ops): Initialize `read_auxv' member to that.
1238 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1240 Committed by Jim Blandy <jimb@redhat.com>.
1242 * linux-s390-low.c (s390_num_regs): Update.
1243 (s390_regmap): Remove control registers. Use __s390x__ predefine
1244 instead of GPR_SIZE to distiguish s390 and s390x targets.
1246 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1248 * linux-low.c: Update copyright year.
1249 (check_removed_breakpoint): Clear pending_is_breakpoint.
1250 (linux_set_resume_request, linux_queue_one_thread)
1251 (resume_status_pending_p): New functions.
1252 (linux_continue_one_thread): Use process->resume.
1253 (linux_resume): Only resume threads if there are no pending events.
1254 * linux-low.h (struct process_info): Add resume request
1257 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1259 * regcache.c (new_register_cache): Clear the allocated register
1260 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1262 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1264 * linux-low.c (linux_resume): Take a struct thread_resume *
1266 (linux_wait): Update call.
1267 (resume_ptr): New static variable.
1268 (linux_continue_one_thread): Renamed from
1269 linux_continue_one_process. Use resume_ptr.
1270 (linux_resume): Use linux_continue_one_thread.
1271 * server.c (handle_v_cont, handle_v_requests): New functions.
1272 (myresume): New function.
1273 (main): Handle 'v' case.
1274 * target.h (struct thread_resume): New type.
1275 (struct target_ops): Change argument of "resume" to struct
1277 (myresume): Delete macro.
1279 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1281 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1282 (uninstall): Support DESTDIR.
1284 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1286 * configure.srv: Add xscale*linux copy of arm*linux entry.
1288 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1290 * linux-arm-low.c (arm_reinsert_addr): New function.
1291 (the_low_target): Add arm_reinsert_addr.
1293 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1295 * mem-break.c: Remove whitespace at end of file.
1297 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1299 * configure.in: Check whether we need to prototype strerror.
1300 * server.h: Optionally prototype strerror.
1301 * gdbreplay.c (perror_with_name): Use strerror.
1302 * linux-low.c (linux_attach_lwp): Use strerror.
1303 * utils.c (perror_with_name): Use strerror.
1304 * config.in, configure: Regenerated.
1306 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1308 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1309 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1311 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1313 * Makefile.in (SFILES): Update.
1314 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1315 low-sun3.c: Remove files.
1317 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1319 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1320 (linux_detach_one_process, linux_detach): New functions.
1321 (linux_target_ops): Add linux_detach.
1322 * server.c (main): Handle 'D' packet.
1323 * target.h (struct target_ops): Add "detach" member.
1324 (detach_inferior): Define.
1326 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1328 From Kelley Cook <kelleycook@wideopenwest.com>:
1329 * configure.srv: Accept i[34567]86 variants.
1331 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1333 * linux-low.c (linux_wait_for_event): Correct comment typos.
1334 (linux_resume_one_process): Call check_removed_breakpoint.
1335 (linux_send_signal): New function.
1336 (linux_target_ops): Add linux_send_signal.
1337 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1339 * target.h (struct target_ops): Add send_signal.
1341 2003-05-29 Jim Blandy <jimb@redhat.com>
1343 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1344 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1345 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1346 away part of the register's value.
1348 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1350 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1351 (linux_wait_for_event, linux_init_signals): Likewise.
1353 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1355 * configure.in: Check for stdlib.h.
1356 * configure: Regenerated.
1357 * config.in: Regenerated.
1359 2003-01-04 Andreas Schwab <schwab@suse.de>
1361 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1363 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1365 * Makefile.in: Remove obsolete code.
1367 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1369 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1370 defined(PT_FPR0_HI).
1372 2002-11-17 Stuart Hughes <seh@zee2.com>
1374 * linux-arm-low.c (arm_num_regs): Increase.
1375 (arm_regmap): Include status register.
1377 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1379 * linux-low.c (register_addr): Remove incorrect -1 check.
1381 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1383 * linux-low.c (linux_create_inferior): Call setpgid. Return
1385 (unstopped_p, linux_signal_pid): Remove.
1386 (linux_target_ops): Remove linux_signal_pid.
1387 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1388 global instead of target method.
1389 * target.h (struct target_ops): Remove signal_pid. Update comment
1390 for create_inferior.
1391 * server.c (signal_pid): New variable.
1392 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1393 gdbserver. Set the child to be the foreground process group.
1394 (attach_inferior): Set signal_pid.
1396 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1398 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1400 2002-08-20 Jim Blandy <jimb@redhat.com>
1402 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1405 2002-08-01 Andrew Cagney <cagney@redhat.com>
1407 * Makefile.in: Make chill references obsolete.
1409 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1411 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1412 * configure: Regenerate.
1413 * config.in: Regenerate.
1415 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1417 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1418 (perror_with_name, remote_close, remote_open, expect, play): Static.
1420 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1422 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1423 byte offsets instead of an array of indexes.
1424 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1426 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1428 * regcache.c: Add comment.
1430 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1432 * thread-db.c: New file.
1433 * proc-service.c: New file.
1434 * acinclude.m4: New file.
1435 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1436 proc-service.o, and thread-db.o.
1437 (linux-low.o): Add USE_THREAD_DB.
1438 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1439 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1440 * aclocal.m4: Regenerated.
1441 * config.in: Regenerated.
1442 * configure: Regenerated.
1443 * configure.in: Check for proc_service.h, sys/procfs.h,
1444 thread_db.h, and linux/elf.h headrs.
1445 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1446 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1447 Check for -lthread_db and thread support.
1448 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1449 PowerPC, and SuperH.
1450 * i387-fp.c: Constify arguments.
1451 * i387-fp.h: Likewise.
1452 * inferiors.c: (struct thread_info): Renamed from
1453 `struct inferior_info'. Remove PID member. Use generic inferior
1454 list header. All uses updated.
1455 (inferiors, signal_pid): Removed.
1456 (all_threads): New variable.
1457 (get_thread): Define.
1458 (add_inferior_to_list): New function.
1459 (for_each_inferior): New function.
1460 (change_inferior_id): New function.
1461 (add_inferior): Removed.
1462 (remove_inferior): New function.
1463 (add_thread): New function.
1464 (free_one_thread): New function.
1465 (remove_thread): New function.
1466 (clear_inferiors): Use for_each_inferior and free_one_thread.
1467 (find_inferior): New function.
1468 (find_inferior_id): New function.
1469 (inferior_target_data): Update argument type.
1470 (set_inferior_target_data): Likewise.
1471 (inferior_regcache_data): Likewise.
1472 (set_inferior_regcache_data): Likewise.
1473 * linux-low.c (linux_bp_reinsert): Remove.
1474 (all_processes, stopping_threads, using_thrads)
1475 (struct pending_signals, debug_threads, pid_of): New.
1476 (inferior_pid): Replace with macro.
1477 (struct inferior_linux_data): Remove.
1478 (get_stop_pc, add_process): New functions.
1479 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1480 Use add_process and add_thread.
1481 (linux_attach_lwp): New function, based on old linux_attach. Use
1482 add_process and add_thread. Set stop_expected for new threads.
1483 (linux_attach): New function.
1484 (linux_kill_one_process): New function.
1485 (linux_kill): Kill all LWPs.
1486 (linux_thread_alive): Use find_inferior_id.
1487 (check_removed_breakpoints, status_pending_p): New functions.
1488 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1489 Update. Use WNOHANG. Wait for cloned processes also. Update process
1490 struct for the found process.
1491 (linux_wait_for_event): New function.
1492 (linux_wait): Use it. Support LWPs.
1493 (send_sigstop, wait_for_sigstop, stop_all_processes)
1494 (linux_resume_one_process, linux_continue_one_process): New functions.
1495 (linux_resume): Support LWPs.
1496 (REGISTER_RAW_SIZE): Remove.
1497 (fetch_register): Use register_size instead. Call supply_register.
1498 (usr_store_inferior_registers): Likewise. Call collect_register.
1500 (regsets_fetch_inferior_registers): Improve error message.
1501 (regsets_store_inferior_registers): Add debugging.
1502 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1503 (unstopped_p, linux_signal_pid): New functions.
1504 (linux_target_ops): Add linux_signal_pid.
1505 (linux_init_signals): New function.
1506 (initialize_low): Call it. Initialize using_threads.
1507 * regcache.c (inferior_regcache_data): Add valid
1509 (get_regcache): Fetch registers lazily. Add fetch argument
1510 and update all callers.
1511 (regcache_invalidate_one, regcache_invalidate): New
1513 (new_register_cache): Renamed from create_register_cache.
1514 Return the new regcache.
1515 (free_register_cache): Change argument to a void *.
1516 (registers_to_string, registers_from_string): Call get_regcache
1517 with fetch flag set.
1518 (register_data): Make static. Pass fetch flag to get_regcache.
1519 (supply_register): Call get_regcache with fetch flag clear.
1520 (collect_register): Call get_regcache with fetch flag set.
1521 (collect_register_as_string): New function.
1522 * regcache.h: Update.
1523 * remote-utils.c (putpkt): Flush after debug output and use
1525 Handle input interrupts while waiting for an ACK.
1526 (input_interrupt): Use signal_pid method.
1527 (getpkt): Flush after debug output and use stderr.
1528 (outreg): Use collect_register_as_string.
1529 (new_thread_notify, dead_thread_notify): New functions.
1530 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1532 (look_up_one_symbol): Flush after debug output.
1533 * server.c (step_thread, server_waiting): New variables.
1534 (start_inferior): Don't use signal_pid. Update call to mywait.
1535 (attach_inferior): Update call to mywait.
1536 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1537 (main): Don't fetch/store registers explicitly. Use
1538 set_desired_inferior. Support proposed ``Hs'' packet. Update
1541 (struct inferior_list, struct_inferior_list_entry): New.
1542 * target.c (set_desired_inferior): New.
1543 (write_inferior_memory): Constify.
1544 (mywait): New function.
1546 (struct target_ops): New signal_pid method.
1547 (mywait): Removed macro, added prototype.
1549 * linux-low.h (regset_func): Removed.
1550 (regset_fill_func, regset_store_func): New.
1551 (enum regset_type): New.
1552 (struct regset_info): Add type field. Use new operation types.
1553 (struct linux_target_ops): stop_pc renamed to get_pc.
1554 Add decr_pc_after_break and breakpoint_at.
1555 (get_process, get_thread_proess, get_process_thread)
1556 (strut process_info, all_processes, linux_attach_lwp)
1557 (thread_db_init): New.
1559 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1560 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1561 (the_low_target): Add new members.
1562 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1563 (i386_store_fpxregset): Constify.
1564 (target_regsets): Add new kind identifier.
1565 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1566 (i386_set_pc): Add debugging.
1567 (i386_breakpoint_at): New function.
1568 (the_low_target): Add new members.
1569 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1570 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1571 (mips_breakpoint_at): New.
1572 (the_low_target): Add new members.
1573 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1574 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1575 (the_low_target): Add new members.
1576 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1577 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1578 (the_low_target): Add new members.
1579 * linux-x86-64-low.c (target_regsets): Add new kind
1582 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1584 From Martin Pool <mbp@samba.org>:
1585 * server.c (gdbserver_usage): New function.
1588 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1590 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1593 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1595 * Makefile.in: Remove obsolete code.
1597 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1599 * linux-low.c (regsets_fetch_inferior_registers),
1600 (regsets_store_inferior_registers): Removed cast to int from
1602 * regcache.h: Added declaration of struct inferior_info.
1604 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1606 * inferiors.c (struct inferior_info): Add regcache_data.
1607 (add_inferior): Call create_register_cache.
1608 (clear_inferiors): Call free_register_cache.
1609 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1610 * regcache.c (struct inferior_regcache_data): New.
1611 (registers): Remove.
1612 (get_regcache): New function.
1613 (create_register_cache, free_register_cache): New functions.
1614 (set_register_cache): Don't initialize the register cache here.
1615 (registers_to_string, registers_from_string, register_data): Call
1617 * regcache.h: Add prototypes.
1618 * server.h: Likewise.
1620 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1622 * mem-break.c: New file.
1623 * mem-break.h: New file.
1624 * Makefile.in: Add mem-break.o rule; update server.h
1626 * inferiors.c (struct inferior_info): Add target_data
1628 (clear_inferiors): Free target_data member if set.
1629 (inferior_target_data, set_inferior_target_data): New functions.
1630 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1631 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1632 * linux-low.c (linux_bp_reinsert): New variable.
1633 (struct inferior_linux_data): New.
1634 (linux_create_inferior): Use set_inferior_target_data.
1635 (linux_attach): Likewise. Call add_inferior.
1636 (linux_wait_for_one_inferior): New function.
1637 (linux_wait): Call it.
1638 (linux_write_memory): Add const.
1639 (initialize_low): Call set_breakpoint_data.
1640 * linux-low.h (struct linux_target_ops): Add breakpoint
1642 * server.c (attach_inferior): Remove extra add_inferior
1644 * server.h: Include mem-break.h. Update inferior.c
1646 * target.c (read_inferior_memory)
1647 (write_inferior_memory): New functions.
1648 * target.h (read_inferior_memory)
1649 (write_inferior_memory): Change macros to prototypes.
1650 (struct target_ops): Update comments. Add const to write_memory
1653 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1655 * linux-low.c (usr_store_inferior_registers): Support
1656 registers which are allowed to fail to store.
1657 * linux-low.h (linux_target_ops): Likewise.
1658 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1659 (ppc_cannot_store_register): FPSCR may not be storable.
1661 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1663 * server.h: Include <string.h> if HAVE_STRING_H.
1664 * ChangeLog: Correct paths in last ChangeLog entry.
1666 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1668 * linux-low.h: Remove obsolete prototypes.
1669 (struct linux_target_ops): New.
1670 (extern the_low_target): New.
1671 * linux-low.c (num_regs, regmap): Remove declarations.
1672 (register_addr): Use the_low_target explicitly.
1673 (fetch_register): Likewise.
1674 (usr_fetch_inferior_registers): Likewise.
1675 (usr_store_inferior_registers): Likewise.
1676 * linux-arm-low.c (num_regs): Remove.
1677 (arm_num_regs): Define.
1678 (arm_regmap): Renamed from regmap, made static.
1679 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1681 (arm_cannot_store_register): Renamed from cannot_store_register,
1683 (the_low_target): New.
1684 * linux-i386-low.c (num_regs): Remove.
1685 (i386_num_regs): Define.
1686 (i386_regmap): Renamed from regmap, made static.
1687 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1689 (i386_cannot_store_register): Renamed from cannot_store_register,
1691 (the_low_target): New.
1692 * linux-ia64-low.c (num_regs): Remove.
1693 (ia64_num_regs): Define.
1694 (ia64_regmap): Renamed from regmap, made static.
1695 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1697 (ia64_cannot_store_register): Renamed from cannot_store_register,
1699 (the_low_target): New.
1700 * linux-m68k-low.c (num_regs): Remove.
1701 (m68k_num_regs): Define.
1702 (m68k_regmap): Renamed from regmap, made static.
1703 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1705 (m68k_cannot_store_register): Renamed from cannot_store_register,
1707 (the_low_target): New.
1708 * linux-mips-low.c (num_regs): Remove.
1709 (mips_num_regs): Define.
1710 (mips_regmap): Renamed from regmap, made static.
1711 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1713 (mips_cannot_store_register): Renamed from cannot_store_register,
1715 (the_low_target): New.
1716 * linux-ppc-low.c (num_regs): Remove.
1717 (ppc_num_regs): Define.
1718 (ppc_regmap): Renamed from regmap, made static.
1719 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1721 (ppc_cannot_store_register): Renamed from cannot_store_register,
1723 (the_low_target): New.
1724 * linux-s390-low.c (num_regs): Remove.
1725 (s390_num_regs): Define.
1726 (s390_regmap): Renamed from regmap, made static.
1727 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1729 (s390_cannot_store_register): Renamed from cannot_store_register,
1731 (the_low_target): New.
1732 * linux-sh-low.c (num_regs): Remove.
1733 (sh_num_regs): Define.
1734 (sh_regmap): Renamed from regmap, made static.
1735 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1737 (sh_cannot_store_register): Renamed from cannot_store_register,
1739 (the_low_target): New.
1740 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1741 (the_low_target): New.
1743 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1745 * Makefile.in: Add stamp-h target.
1746 * configure.in: Create stamp-h.
1747 * configure: Regenerated.
1749 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1751 * inferiors.c: New file.
1752 * target.c: New file.
1753 * target.h: New file.
1754 * Makefile.in: Add target.o and inferiors.o. Update
1756 * linux-low.c (inferior_pid): New static variable,
1757 moved from server.c.
1758 (linux_create_inferior): Renamed from create_inferior.
1759 Call add_inferior. Return 0 on success instead of a PID.
1760 (linux_attach): Renamed from myattach.
1761 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1762 (linux_thread_alive): Renamed from mythread_alive.
1763 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1765 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1766 (regsets_store_inferior_registers): Correct error message.
1767 Add missing ``return 0''.
1768 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1769 (linux_store_registers): Renamed from store_inferior_registers.
1770 (linux_read_memory): Renamed from read_inferior_memory.
1771 (linux_write_memory): Renamed from write_inferior_memory.
1772 (linux_target_ops): New structure.
1773 (initialize_low): Call set_target_ops ().
1774 * remote-utils.c (unhexify): New function.
1775 (hexify): New function.
1776 (input_interrupt): Send signals to ``signal_pid''.
1777 * server.c (inferior_pid): Remove.
1778 (start_inferior): Update create_inferior call.
1779 (attach_inferior): Call add_inferior.
1780 (handle_query): New function.
1781 (main): Call handle_query for `q' packets.
1782 * server.h: Include "target.h". Remove obsolete prototypes.
1783 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1785 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1787 * Makefile.in: Add WARN_CFLAGS. Update configury
1789 * configure.in: Check for <string.h>
1790 * configure: Regenerate.
1791 * config.in: Regenerate.
1792 * gdbreplay.c: Include needed system headers.
1793 (remote_open): Remove strchr prototype.
1794 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1795 * regcache.c (supply_register): Change buf argument to const void *.
1796 (supply_register_by_name): Likewise.
1797 (collect_register): Change buf argument to void *.
1798 (collect_register_by_name): Likewise.
1799 * regcache.h: Add missing prototypes.
1800 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1801 * server.c (handle_query): New function.
1802 (attached): New static variable, moved out of main.
1803 (main): Quiet longjmp clobber warnings.
1804 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1805 * utils.c (error): Remove NORETURN.