1 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3 * Makefile.in (OBS): Add hostio.o.
5 * server.h (handle_vFile): Declare.
7 * server.c (handle_v_requests): Take packet_len and new_packet_len
8 for binary packets. Call handle_vFile.
9 (main): Update call to handle_v_requests.
11 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13 * linux-low.c: Include <sched.h>.
15 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17 * linux-low.c (linux_tracefork_grandchild): New.
18 (linux_tracefork_child): Use clone.
19 (linux_test_for_tracefork): Use clone; allocate and free a stack.
21 2007-10-31 Joel Brobecker <brobecker@adacore.com>
23 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
25 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
27 * linux-low.c (handle_extended_wait): Handle unexpected signals.
29 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
31 * inferiors.c (change_inferior_id): Delete.
32 (add_pid_to_list, pull_pid_from_list): New.
33 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
34 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
35 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
36 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
37 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
38 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
39 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
40 (using_threads): Always set to 1.
41 (handle_extended_wait): New.
42 (add_process): Do not set TID.
43 (linux_create_inferior): Set must_set_ptrace_flags.
44 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
45 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
46 (linux_thread_alive): Rename TID argument to LWPID.
47 (linux_wait_for_process): Handle unknown processes. Do not use TID.
48 (linux_wait_for_event): Do not use TID or check using_threads. Update
49 call to dead_thread_notify. Call handle_extended_wait.
50 (linux_create_inferior): Use PTRACE_SETOPTIONS.
51 (send_sigstop): Delete sigstop_sent.
52 (wait_for_sigstop): Avoid TID.
53 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
54 (linux_test_for_tracefork): New.
55 (linux_lookup_signals): Use thread_db_active and
56 linux_supports_tracefork_flag.
57 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
58 * linux-low.h (get_process_thread): Avoid TID.
59 (struct process_ifo): Move thread_known and tid to the end. Remove
61 (linux_attach_lwp, thread_db_init): Update prototypes.
62 * server.h (change_inferior_id): Delete prototype.
63 (add_pid_to_list, pull_pid_from_list): New prototypes.
64 * thread-db.c (thread_db_use_events): New.
65 (find_first_thread): Rename to...
66 (find_one_thread): ...this. Update callers and messages. Do not
67 call fatal. Check thread_db_use_events. Do not call
68 change_inferior_id or new_thread_notify.
69 (maybe_attach_thread): Update. Do not call new_thread_notify.
70 (thread_db_init): Set thread_db_use_events. Check use_events.
71 * utils.c (fatal, warning): Correct message prefix.
73 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
75 * Makefile.in (clean): Remove new files.
76 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
77 (powerpc-64.o, powerpc-64.c): New rules.
78 * configure.srv: Use alternate register sets for powerpc64-*-linux*
79 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
81 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
83 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
84 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
85 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
86 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
87 (target_regsets): Add AltiVec and SPE register sets.
88 * configure.ac: Check for AltiVec and SPE.
89 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
90 (ppc_fill_vrregset, ppc_store_vrregset): New.
91 (target_regsets): Add AltiVec register set.
92 * configure: Regenerated.
94 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
96 * linux-low.c (O_LARGEFILE): Define.
97 (linux_read_memory): Use /proc/PID/mem.
98 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
99 * configure, config.in: Regenerated.
101 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
103 * linux-low.c (linux_wait_for_event): Do not pass signals while
106 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
108 * win32-low.c (create_process): New.
109 (win32_create_inferior): Use create_process instead of
110 CreateProcess. If create_process failed retry appending an ".exe"
111 suffix. Store the GetLastError result immediatelly after
112 create_process calls and use it on the call to error.
114 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
116 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
118 2007-08-23 Joel Brobecker <brobecker@adacore.com>
120 * configure.ac: Switch license to GPLv3.
122 2007-08-01 Michael Snyder <msnyder@access-company.com>
124 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
126 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
128 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
130 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
131 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
132 CloseToolhelp32Snapshot.
133 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
134 CloseToolhelp32Snapshot.
136 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
138 * server.c (main): Check for inferior exit before main loop.
140 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
142 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
143 instead of on tmp_desc.
145 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
146 Daniel Jacobowitz <dan@codesourcery.com>
148 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
149 (add_thread): Minor cleanups.
150 (clear_inferiors): Move lower in the file. Clear the DLL
152 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
153 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
154 (xml_escape_text): New.
155 * server.c (handle_query): Handle qXfer:libraries:read. Report it
157 (handle_v_cont): Report errors.
158 (gdbserver_version): Update.
159 (main): Correct size of own_buf. Do not report initial DLL events.
160 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
161 (unloaded_dll, xml_escape_text): New.
162 * win32-low.c (enum target_waitkind): Update comments.
163 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
164 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
165 (win32_EnumProcessModules, win32_GetModuleInformation)
166 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
167 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
168 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
169 (win32_Module32First, win32_Module32Next, load_toolhelp)
170 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
171 (get_child_debug_event): Handle DLL events.
172 (win32_wait): Likewise.
174 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
176 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
177 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
179 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
181 * win32-low.c (handle_output_debug_string): Ignore event if not
184 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
186 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
188 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
190 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
192 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
194 * inferiors.c (change_inferior_id): Add comment.
195 * linux-low.c (check_removed_breakpoint): Add an early
196 prototype. Improve debug output.
197 (linux_attach): Doc update.
198 (linux_detach_one_process, linux_detach): Clean up before releasing
200 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
201 * linux-low.h (struct process_info): Doc improvement.
202 * mem-break.c (delete_all_breakpoints): New.
203 * mem-break.h (delete_all_breakpoints): New prototype.
204 * thread-db.c (find_first_thread): New.
205 (thread_db_create_event): Call it instead of
206 thread_db_find_new_threads. Clean up unused variables.
207 (maybe_attach_thread): Remove first thread handling.
208 (thread_db_find_new_threads): Use find_first_thread.
209 (thread_db_get_tls_address): Likewise.
211 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
213 * thread-db.c (thread_db_find_new_threads): Add prototype.
214 (thread_db_create_event): Check for the main thread before adding
216 (maybe_attach_thread): Only enable event reporting if TID == 0.
217 (thread_db_get_tls_address): Check for new threads.
219 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
221 * linux-low.c (linux_create_inferior): Try execv before execvp.
222 * spu-low.c (spu_create_inferior): Likewise.
224 2007-06-13 Mike Frysinger <vapier@gentoo.org>
226 * linux-low.c (linux_create_inferior): Change execv to execvp.
227 * spu-low.c (spu_create_inferior): Likewies.
229 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
231 * Makefile.in (clean): Clean new files instead of deleted ones.
232 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
233 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
235 * configure.srv: Specify XML files and new regformats for MIPS and
237 * linux-mips-low.c (mips_num_regs): Set to only used registers.
238 (mips_regmap): Do not fetch $0. Remove unused registers. Add
239 an entry for the restart register.
240 (mips_cannot_fetch_register, mips_cannot_store_register)
241 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
242 register names to match the XML descriptions.
243 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
244 restart register instead of $0.
246 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
247 Markus Deuling <deuling@de.ibm.com>
249 * remote-utils.c (decode_xfer_write): New function.
250 * server.h (decode_xfer_write): Add prototype.
251 * server.c (handle_query): Add PACKET_LEN argument. Support
252 qXfer:spu:read and qXfer:spu:write packets.
253 (main): Pass packet_len to handle_query.
254 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
255 * target.h (target_ops): Add qxfer_spu.
257 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
259 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
260 accessing non-seekable spufs files.
262 2007-05-16 Markus Deuling <deuling@de.ibm.com>
264 * server.c (handle_query): Add reply for qC packet.
266 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
267 Leo Zayas <lerele@champenstudios@com>
269 * server.h (check_remote_input_interrupt_request): New function.
270 * remote_utils.c (INVALID_DESCRIPTOR): New define.
271 (remote_desc): Initialize with INVALID_DESCRIPTOR.
272 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
273 (check_remote_input_interrupt_request): New function.
274 * server.h (check_remote_input_interrupt_request): Declare.
275 * win32-low.c (winapi_DebugBreakProcess,
276 winapi_GenerateConsoleCtrlEvent): New typedefs.
277 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
279 (win32_wait): Check for remote interrupt request
280 with check_remote_input_interrupt_request.
281 (win32_request_interrupt): New function.
282 (win32_target_op): Set request_interrupt to win32_request_interrupt.
284 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
286 * win32-low.c (debug_registers_changed,
287 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
288 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
289 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
290 (thread_rec): Get context using the low target.
291 (child_add_thread): Call thread_added on the low target,
292 which does the same thing.
294 (do_initial_child_stuff): Remove debug registers references.
295 Set context using the low target. Resume threads after
296 setting the contexts.
297 (child_continue): Remove dead variable. Remove debug
298 registers references.
299 (child_fetch_inferior_registers): Go through the low target.
300 (do_child_store_inferior_registers): Remove.
301 (child_store_inferior_registers): Go through the low target.
302 (win32_resume): Remove debug registers references.
303 Set context using the low target.
304 (handle_exception): Change return type to void. Don't record
305 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
306 first chance exception.
307 (get_child_debug_event): Change return type to void. Remove
308 goto loop. Always return after waiting for debug event.
309 (win32_wait): Convert to switch statement. Handle spurious
312 * win32-i386-low.c (debug_registers_changed,
313 debug_registers_used): New.
314 (initial_stuff): Rename to ...
315 (i386_initial_stuff): ... this. Clear debug registers
317 (store_debug_registers): Delete.
318 (i386_get_thread_context): New.
319 (load_debug_registers): Delete.
320 (i386_set_thread_context): New.
321 (i386_thread_added): New.
322 (single_step): Rename to ...
323 (i386_single_step): ... this.
324 (do_fetch_inferior_registers): Rename to ...
325 (i386_fetch_inferior_register): ... this.
326 (i386_store_inferior_register): New.
327 (the_low_target): Adapt to new interface.
329 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
330 (arm_get_thread_context): New.
331 (arm_set_thread_context): New.
333 (do_fetch_inferior_registers): Rename to ...
334 (arm_fetch_inferior_register): ... this.
335 (arm_store_inferior_register): New.
336 (arm_wince_breakpoint): Reimplement as unsigned long.
337 (arm_wince_breakpoint_len): Define.
338 (the_low_target): Adapt to new interface.
340 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
341 load_debug_registers. Add get_thread_context, set_thread_context,
342 thread_added and store_inferior_register. Rename
343 fetch_inferior_registers to fetch_inferior_register.
344 (regptr): Remove declaration.
346 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
348 * linux-low.c (linux_detach): Change return type to int. Return 0.
349 * spu-low.c (spu_detach): Likewise.
351 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
353 * target.h (target_ops): Change return type of detach to int.
355 (join_inferior): New.
356 * server.c (main): Don't skip detach support on mingw32.
357 If the inferior doesn't support detaching return error.
358 Call join_inferior instead of using waitpid.
359 * linux-low.c (linux_join): New.
360 (linux_target_op): Add linux_join.
361 * spu-low.c (spu_join): New.
362 (spu_target_ops): Add spu_join.
363 * win32-low.c (win32_detach): Adapt to new interface.
364 Reopen current_process_handle before detaching. Issue a child
365 resume before detaching.
367 (win32_target_op): Add win32_join.
369 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
371 * win32-low.c (win32-attach): Fix return value.
372 * target.h (target_ops): Describe ATTACH return values.
374 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
376 * win32-low.c (GETPROCADDRESS): Define.
377 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
378 (winapi_DebugSetProcessKillOnExit): Likewise.
379 (win32_create_inferior): Force usage of ansi CreateProcessA.
380 (win32_attach): Use GETPROCADDRESS.
381 (win32_detach): Likewise.
383 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
385 * win32-low.c (win32_wait): Don't use WSTOPSIG.
387 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
389 * win32-low.c: Commit leftover changes from 2007-03-29.
391 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
393 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
394 fields short instead of int. Add explicit padding.
395 (i387_cache_to_fsave): Remove unnecessary casts.
396 (i387_fsave_to_cache): Doc fix.
397 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
399 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
401 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
402 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
404 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
406 * configure.srv (arm*-*-mingw32ce*): Move near the other
409 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
411 * configure.ac: Add errno checking.
412 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
413 sys/file.h and malloc.h.
414 (AC_CHECK_DECLS): Add perror.
415 (srv_mingwce): Handle.
416 * configure.srv (i[34567]86-*-cygwin*): Add
417 win32-i386-low.o to srv_tgtobj.
418 (i[34567]86-*-mingw*): Likewise.
419 (arm*-*-mingw32ce*): Add case.
420 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
421 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
422 [__MINGW32CE__] (strerror): New function.
423 [__MINGW32CE__] (errno): Define to GetLastError.
424 [__MINGW32CE__] (COUNTOF): New macro.
425 (remote_open): Remove extra close call.
426 * mem-break.c (delete_breakpoint_at): New function.
427 * mem-break.h (delete_breakpoint_at): Declare.
428 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
429 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
430 [USE_WIN32API] (read, write): Add char* casts.
431 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
432 * server.h: Include wincecompat.h on Windows CE.
433 [HAVE_ERRNO_H]: Check.
434 (perror): Declare if not declared.
435 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
436 (perror_with_name): Remove errno declaration.
437 * wincecompat.h: New.
438 * wincecompat.c: New.
440 * win32-arm-low.c: New.
441 * win32-i386-low.c: New.
442 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
443 (OUTMSG2): Make it safe.
445 (COUNTOF): New macro.
446 (NUM_REGS): Get it from the low target.
447 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
448 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
449 (thread_rec): Let low target handle debug registers.
450 (child_add_thread): Likewise.
451 (child_init_thread_list): Likewise.
452 (continue_one_thread): Likewise.
454 (do_child_fetch_inferior_registers): Move to ...
455 * win32-i386-low.c: ... here, and rename to ...
456 (do_fetch_inferior_registers): ... this.
457 * win32-low.c (child_fetch_inferior_registers):
458 Go through the low target.
459 (do_child_store_inferior_registers): Use regptr.
460 (strwinerror): New function.
461 (win32_create_inferior): Handle Windows CE.
462 Use strwinerror instead of strerror on Windows error
463 codes. Add program to the error output.
464 Don't close the main thread handle on Windows CE.
465 (win32_attach): Use coredll.dll on Windows CE.
466 (win32_kill): Close current process and current
468 (win32_detach): Use coredll.dll on Windows CE.
469 (win32_resume): Let low target handle debug registers, and
471 (handle_exception): Add/Remove initial breakpoint. Avoid
472 non-existant WSTOPSIG on Windows CE.
473 (win32_read_inferior_memory): Cast to remove warning.
474 (win32_arch_string): Go through the low target.
475 (initialize_low): Call set_breakpoint_data with the low
477 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
478 FOP_REGNUM, mappings): Move to ...
479 * win32-i386-low.c: ... here.
480 * win32-low.c (win32_thread_info): Move to ...
481 * win32-low.h: ... here.
482 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
483 win32-arm-low.c and wincecompat.c.
485 (install-only:): Likewise.
486 (gdbserver:): Likewise.
487 (gdbreplay:): Likewise.
488 * config.in: Regenerate.
489 * configure: Regenerate.
491 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
493 * win32-low.c: Rename typedef thread_info to
494 win32_thread_info throughout.
496 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
498 * win32-i386-low.c: Rename to ...
499 * win32-low.c: ... this.
500 * configure.srv: Replace win32-i386-low.o with win32-low.o.
501 * Makefile.in: Likewise.
503 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
505 * remote-utils.c (monitor_output): Constify msg parameter.
506 * server.h (monitor_output): Likewise.
507 * win32-i386-low.c (handle_output_debug_string): New.
508 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
509 handle_output_debug_string.
510 (get_child_debug_event): Likewise.
512 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
514 * server.c (main): Correct strtoul check.
516 2007-03-27 Jon Ringle <jon@ringle.org>
518 * linux-low.c: Check __ARCH_HAS_MMU__ also.
520 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
522 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
524 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
526 * terminal.h: Check HAVE_SGTTY_H.
528 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
530 * remote-utils.c (remote_open): Print out the assigned port number.
532 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
534 * remote-utils.c (monitor_output): New function.
535 * server.c (debug_threads): Define here.
536 (monitor_show_help): New function.
537 (handle_query): Handle qRcmd.
538 (main): Do not handle 'd' packet.
539 * server.h (debug_threads, remote_debug, monitor_output): Declare.
540 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
543 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
545 * Makefile.in (EXEEXT): New.
546 (clean): Use $(EXEEXT).
548 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
550 * target.h (target_ops): Rename send_signal to request_interrupt,
551 and remove enum target_signal parameter.
552 * linux-low.c (linux_request_interrupt): Rename from
553 linux_send_signal, and always send SIGINT.
554 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
555 and always send SIGINT.
556 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
558 (input_interrupt): Likewise.
560 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
562 * server.c (get_features_xml): Check if target implemented
564 * win32-i386-low.c (win32_arch_string): New.
565 (win32_target_ops): Add win32_arch_string as arch_string member.
567 2007-02-22 Markus Deuling <deuling@de.ibm.com>
569 * spu-low.c (spu_arch_string): New.
570 (spu_target_ops): Add spu_arch_string.
572 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
574 * remote-utils.c: Remove HAVE_TERMINAL_H check.
575 * configure.ac: Do not check for terminal.h.
576 * configure, config.in: Regenerated.
578 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
580 * Makefile.in (OBS): Add $(XML_BUILTIN).
581 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
583 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
584 (arm-with-iwmmxt.c): New.
585 * config.in, configure: Regenerate.
586 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
587 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
588 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
589 (arm*-*-linux*): Add iWMMXt and regset support.
590 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
591 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
592 (arm_store_wmmxregset, target_regsets): New.
593 * server.c (get_features_xml): Take annex argument. Check builtin
595 (handle_query): Handle multiple annexes.
597 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
599 * remote-utils.c [USE_WIN32API] (read, write): Define.
600 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
603 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
605 * linux-i386-low.c (the_low_target): Set arch_string.
606 * linux-x86-64-low.c (the_low_target): Likewise.
607 * linux-low.c (linux_arch_string): New.
608 (linux_target_ops): Add it.
609 * linux-low.h (struct linux_target_ops): Add arch_string.
610 * server.c (write_qxfer_response): Use const void * for DATA.
611 (get_features_xml): New.
612 (handle_query): Handle qXfer:features:read. Report it for qSupported.
613 * target.h (struct target_ops): Add arch_string method.
615 2007-01-03 Denis Pilat <denis.pilat@st.com>
616 Daniel Jacobowitz <dan@codesourcery.com>
618 * linux-low.c (linux_kill): Handle being called with no threads.
619 * win32-i386-low.c (win32_kill): Likewise.
620 (get_child_debug_event): Clear current_process_handle.
622 2006-12-30 Denis PILAT <denis.pilat@st.com>
623 Daniel Jacobowitz <dan@codesourcery.com>
625 * remote-utils.c (remote_open): Check the type of specified
626 serial port devices before opening them.
627 * server.c (main): Kill the inferior if an error occurs during
628 the first remote_open.
630 2006-12-05 Markus Deuling <deuling@de.ibm.com>
632 * README: Update supported targets.
634 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
636 * Makefile.in (clean): Remove reg-mips64.c.
637 (reg-mips64.c, reg-mips64.o): New rules.
638 * configure.srv: Handle mips64. Include regset support for mips.
639 * linux-mips-low.c (union mips_register): New.
640 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
641 (mips_breakpoint, mips_breakpoint_at): Use int.
642 (mips_collect_register, mips_supply_register)
643 (mips_collect_register_32bit, mips_supply_register_32bit)
644 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
645 (mips_store_fpregset, target_regsets): New.
646 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
648 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
650 * configure.srv: Add target "spu*-*-*".
651 * Makefile.in (clean): Remove reg-spu.c.
652 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
653 * spu-low.c: New file.
655 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
657 * configure.ac: Correct td_thr_tls_get_addr test.
658 * configure: Regenerated.
660 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
662 * linux-low.c (linux_wait_for_event): Reformat. Use the
664 * remote-utils.c (decode_address_to_semicolon): New.
665 * server.c (pass_signals, handle_general_set): New.
666 (handle_query): Mention QPassSignals for qSupported.
667 (main): Call handle_general_set.
668 * server.h (pass_signals, decode_address_to_semicolon): New.
670 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
672 * server.c (handle_query): Correct error handling for read_auxv.
674 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
676 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
677 and srv_linux_thread_db to yes.
678 * linux-s390-low.c (s390_fill_gregset): New function.
679 (target_regsets): Define data structure.
681 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
683 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
684 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
685 * config.in, configure: Regenerated.
686 * inferiors.c (gdb_id_to_thread): New function.
687 (gdb_id_to_thread_id): Use it.
688 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
689 * linux-low.h (struct process_info): Add th member.
690 (thread_db_get_tls_address): New prototype.
691 * remote-utils.c (decode_address): Make non-static.
692 * server.c (handle_query): Handle qGetTLSAddr.
693 * server.h (gdb_id_to_thread, decode_address): New prototypes.
694 * target.h (struct target_ops): Add get_tls_address.
695 * thread-db.c (maybe_attach_thread): Save the thread handle.
696 (thread_db_get_tls_address): New.
698 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
700 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
701 (linux_resume_one_process): Take a siginfo_t *. Update all
702 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
703 (struct pending_signals): Add a siginfo_t.
704 (linux_wait_for_process): Always set last_status.
705 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
706 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
707 * linux-low.h (struct process_info): Add last_status.
709 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
711 * remote-utils.c (try_rle): New function.
712 (putpkt_binary): Use it.
714 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
716 * Makefile.in (clean): Clean reg-x86-64-linux.c.
717 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
718 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
719 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
720 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
723 2006-08-08 Richard Sandiford <richard@codesourcery.com>
725 * server.c (terminal_fd): New variable.
726 (old_foreground_pgrp): Likewise.
727 (restore_old_foreground_pgrp): New function.
728 (start_inferior): Record the terminal file descriptor in terminal_fd
729 and its original foreground group in old_foreground_pgrp. Register
730 restore_old_foreground_pgrp with atexit().
732 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
734 * server.c (handle_query): Correct qPart to qXfer.
736 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
738 * configure.ac: Check for more headers which are missing on
739 Windows. Automatically supply -lwsock32 and USE_WIN32API.
740 * configure.srv: Add Cygwin and mingw32.
741 * remote-utils.c: Don't include headers unconditionally which
742 are missing on mingw32. Include <winsock.h> for mingw32.
743 (remote_open): Adjust for mingw32 support. Flush
744 standard error after writing to it.
745 (remote_close, putpkt_binary, input_interrupt, block_async_io)
746 (unblock_async_io, enable_async_io, disable_async_io)
747 (readchar, getpkt): Update for Winsock support.
748 (prepare_resume_reply): Expect a protocol signal number.
749 * server.c: Disable <sys/wait.h> on mingw32.
750 (start_inferior): Adjust for mingw32 support. Flush
751 standard error after writing to it.
752 (attach_inferior): Likewise. Use protocol signal
754 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
756 * win32-i386-low.c: New file.
757 * Makefile.in (XM_CLIBS): Set.
758 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
759 (win32-i386-low.o): New dependency rule.
760 * linux-low.c (linux_wait): Use target signal numbers.
761 * target.h (struct target_ops): Doc fix.
762 * server.h (target_signal_to_name): New prototype.
763 * gdbreplay.c: Don't include headers unconditionally which
764 are missing on mingw32. Include <winsock.h> for mingw32.
765 (remote_close, remote_open): Adjust for Winsock support.
766 * configure, config.in: Regenerated.
768 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
770 * server.c (decode_xfer_read, write_qxfer_response): New.
771 (handle_query): Take a packet length argument. Handle
772 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
773 the qSupported response.
774 (main): Update call to handle_query.
776 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
778 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
779 (putpkt_binary): Renamed from putpkt and adjusted for binary
781 (putpkt): New wrapper for putpkt_binary.
782 (readchar): Don't mask off the high bit.
783 (decode_X_packet): New function.
784 * server.c (main): Call putpkt_binary if a handler sets the packet
785 length. Save the length of the incoming packet. Handle 'X'.
786 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
788 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
790 * server.c (handle_query): Handle qSupported.
792 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
794 * remote-utils.c (all_symbols_looked_up): New variable.
795 (look_up_one_symbol): Check it.
796 * server.h (look_up_one_symbol): New declaration.
797 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
799 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
801 * Makefile.in (linux-arm-low.o): Update dependencies.
802 * linux-arm-low.c: Include "gdb_proc_service.h".
803 (PTRACE_GET_THREAD_AREA): Define.
804 (ps_get_thread_area): New function.
806 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
808 * configure.srv (m68k*-*-uclinux*): New target.
809 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
810 (linux_resume_one_process): Remove extraneous cast.
811 (linux_read_offsets): New.
812 (linux_target_op): Add linux_read_offsets on mmuless systems.
813 * server.c (handle_query): Add qOffsets logic.
814 * target.h (struct target_ops): Add read_offsets.
816 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
818 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
819 (PTRACE_GET_THREAD_AREA): Define.
820 (ps_get_thread_area): New function.
821 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
822 (linux-x86-64-low.o): Update.
824 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
826 * configure.ac: Remove checks for prfpregset_t.
827 * gdb_proc_service.h: New file.
828 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
829 new "gdb_proc_service.h".
830 * proc-service.c: Likewise.
831 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
832 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
833 * Makefile.in (gdb_proc_service_h): Updated.
834 * configure, config.in: Regenerated.
836 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
838 * remote-utils.c (prepare_resume_reply): Move declaration
839 of gdb_id_from_wait to the top of the block.
841 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
843 * linux-low.c (regsets_store_inferior_registers): Read the regset
844 from the target before filling it.
846 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
848 * server.c (attach_inferior): Return SIGTRAP for a successful
851 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
853 * Makefile.in (OBS): Add version.o.
854 (STAGESTUFF): Delete.
855 (version.o): Add dependencies.
856 (version.c): Replace rule.
857 (clean): Remove version.c.
858 * server.c (gdbserver_version): New.
859 (gdbserver_usage): Use printf.
860 (main): Handle --version and --help.
861 * server.h (version, host_name): Add declarations.
863 2005-12-23 Eli Zaretskii <eliz@gnu.org>
875 * linux-x86-64-low.c:
887 * linux-crisv32-low.c:
899 * gdbserver.1: Add (C) after Copyright. Update the FSF
902 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
904 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
905 (arm_breakpoint_at): Recognize both breakpoints.
906 (the_low_target): Use the correct breakpoint instruction.
908 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
910 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
911 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
912 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
913 (the_low_target): Update.
915 2005-10-25 Andreas Schwab <schwab@suse.de>
917 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
919 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
920 (ia64_num_regs): Reduce to 462.
922 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
924 * acinclude.m4: Correct quoting.
925 * aclocal.m4: Regenerated.
927 Suggested by SZOKOVACS Robert <szo@ies.hu>:
928 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
929 (thread_db_init): Call thread_db_err_str.
930 * configure.ac: Check for TD_VERSION.
931 * config.in, configure: Regenerated.
933 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
935 * server.h (error, fatal, warning): Add ATTR_FORMAT.
937 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
939 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
940 is not available. Define HAVE_PTRACE_GETREGS if it is.
941 * config.in, configure: Regenerated.
942 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
943 * linux-i386-low.c, linux-m68k-low.c: Update to use
945 * linux-low.c (regsets_fetch_inferior_registers)
946 (regsets_store_inferior_registers): Only return 0 if we processed
948 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
949 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
951 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
953 * inferiors.c (struct thread_info): Add gdb_id.
954 (add_thread): Add gdb_id argument.
955 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
956 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
958 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
959 * server.c (handle_query): Use thread_to_gdb_id.
960 (handle_v_cont, main): Use gdb_id_to_thread_id.
961 * server.h (add_thread): Update prototype.
962 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
965 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
967 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
968 left-padded registers.
969 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
970 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
972 2005-07-01 Steve Ellcey <sje@cup.hp.com>
974 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
975 * configure: Regenerate.
976 * config.in: Regenerate.
977 * server.h (NEED_DECLARATION_STRERROR):
978 Replace with !HAVE_DECL_STRERROR.
980 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
982 * linux-low.c (linux_wait, linux_send_signal): Don't test
983 an unsigned long variable for > 0 if it could be MAX_ULONG.
984 * server.c (myresume): Likewise.
985 * target.c (set_desired_inferior): Likewise.
987 2005-06-13 Mark Kettenis <kettenis@gnu.org>
989 * configure.ac: Simplify and improve check for socklen_t.
990 * configure, config.in: Regenerate.
992 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
994 * acconfig.h: Remove.
995 * configure.ac: Add a test for socklen_t. Use three-argument
996 AC_DEFINE throughout.
997 * config.in: Regenerated using autoheader 2.59.
998 * configure: Regenerated.
1000 * gdbreplay.c (socklen_t): Provide a default.
1001 (remote_open): Use socklen_t.
1002 * remote-utils.c (socklen_t): Provide a default.
1003 (remote_open): Use socklen_t.
1004 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1007 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1009 * linux-low.c (linux_read_memory, linux_write_memory)
1010 (linux_read_auxv): Likewise.
1011 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1012 (check_mem_write): Likewise.
1013 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1015 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1016 (registers_from_string, register_data): Likewise.
1017 * server.c (handle_query, main): Likewise.
1018 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1019 (decode_M_packet): Likewise.
1020 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1021 * target.h (struct target_ops): Update read_memory, write_memory,
1023 (read_inferior_memory, write_inferior_memory): Update.
1024 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1026 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1027 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1028 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1029 linux-s390-low.c, linux-sh-low.c: Update for changes in
1030 read_inferior_memory and the_low_target->breakpoint.
1032 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1034 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1035 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1036 * configure.srv: Add powerpc64-*-linux*.
1037 * linux-ppc64-low.c: New file.
1039 2005-05-23 Orjan Friberg <orjanf@axis.com>
1041 * linux-cris-low.c: New file with support for CRIS.
1042 * linux-crisv32-low.c: Ditto for CRISv32.
1043 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1044 (clean): Add reg-cris.c and reg-crisv32.c.
1045 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1046 reg-crisv32.o, and reg-crisv32.c to make rules.
1047 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1050 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1052 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1053 of sizeof (PTRACE_XFER_TYPE).
1054 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1056 2005-05-12 Orjan Friberg <orjanf@axis.com>
1058 * target.h (struct target_ops): Add insert_watchpoint,
1059 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1060 pointers for hardware watchpoint support.
1061 * linux-low.h (struct linux_target_ops): Ditto.
1062 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1063 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1064 to linux_target_ops.
1065 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1067 * server.c (main): Recognize 'Z' and 'z' packets.
1069 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1071 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1072 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1073 (the_low_target): Add new members.
1075 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1077 * proc-service.c (ps_lgetregs): Search all_processes instead of
1080 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1082 * server.c (start_inferior): Change return type to int.
1083 (attach_inferior): Change sigptr to int *.
1084 (handle_v_cont, handle_v_requests): Change signal to int *.
1085 (main): Change signal to int.
1087 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1089 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1090 * configure.srv: Add m32r*-*-linux*.
1091 * linux-m32r-low.c: New file.
1093 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1095 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1097 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1099 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1100 Take unsigned long arguments for PIDs.
1101 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1102 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1103 (wait_for_sigstop, linux_resume_one_process)
1104 (regsets_fetch_inferior_registers, linux_send_signal)
1105 (linux_read_auxv): Likewise. Update the types of variables holding
1106 PIDs. Update format string specifiers.
1107 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1108 * remote-utils.c (prepare_resume_reply): Likewise.
1109 * server.c (cont_thread, general_thread, step_thread)
1110 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1112 (handle_query): Update format specifiers.
1113 (handle_v_cont, main): Use strtoul for thread IDs.
1114 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1115 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1116 (general_thread, step_thread, thread_from_wait)
1117 (old_thread_from_wait): Update.
1118 * target.h (struct thread_resume): Use unsigned long for THREAD.
1119 (struct target_ops): Use unsigned long for arguments to attach and
1122 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1124 * acinclude.m4: Include bfd/bfd.m4 directly.
1125 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1126 <agriffis@toolchain.org>.
1127 * aclocal.m4, configure: Regenerated.
1129 2005-01-07 Andrew Cagney <cagney@gnu.org>
1131 * configure.ac: Rename configure.in, require autoconf 2.59.
1132 * configure: Re-generate.
1134 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1136 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1138 * aclocal.m4: Regenerated.
1139 * configure: Regenerated.
1141 2004-11-21 Andreas Schwab <schwab@suse.de>
1143 * linux-m68k-low.c (m68k_num_gregs): Define.
1144 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1145 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1146 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1147 (m68k_breakpoint_at): New. Add to the_low_target.
1149 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1150 srv_linux_thread_db to yes.
1152 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1154 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1155 (ARCH_SET_FS): Likewise.
1156 (ARCH_GET_FS): Likewise.
1157 (ARCH_GET_GS): Likewise.
1159 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1161 * linux-i386-low.c (ps_get_thread_area): New.
1162 * linux-x86-64-low.c (ps_get_thread_area): New.
1163 * linux-low.c: Include <sys/syscall.h>.
1164 (linux_kill_one_process): Don't kill the first thread here.
1165 (linux_kill): Kill the first thread here.
1166 (kill_lwp): New function.
1167 (send_sigstop, linux_send_signal): Use it.
1168 * proc-service.c: Clean up #ifdefs.
1169 (fpregset_info): Delete.
1170 (ps_lgetregs): Update and enable implementation.
1171 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1173 * remote-utils.c (struct sym_cache, symbol_cache): New.
1174 (input_interrupt): Print a clearer message.
1175 (async_io_enabled): New variable.
1176 (enable_async_io, disable_async_io): Use it. Update comments.
1177 (look_up_one_symbol): Use the symbol cache.
1178 * thread-db.c (thread_db_look_up_symbols): New function.
1179 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1181 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1183 * configure.in: Test for -rdynamic.
1184 * configure: Regenerated.
1185 * Makefile (INTERNAL_LDFLAGS): New.
1186 (gdbserver, gdbreplay): Use it.
1188 2004-09-02 Andrew Cagney <cagney@gnu.org>
1190 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1192 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1194 * linux-low.c (linux_wait): Clear all_processes list also.
1196 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1198 * linux-low.c: Include <errno.h>. Remove extern declaration of
1201 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1203 * gdbreplay.c, server.h, utils.c: Update copyright years.
1205 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1207 * server.c (main): Print child status or termination signal from
1208 variable 'signal', not 'sig'.
1210 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1212 * linux-low.c (linux_read_memory): Change return type to
1213 int. Check for and return error from ptrace().
1214 * target.c (read_inferior_memory): Change return type to int. Pass
1215 back return status from the_target->read_memory().
1216 * target.h (struct target_ops): Adapt *read_memory() prototype.
1218 (read_inferior_memory): Adapt prototype.
1219 * server.c (main): Return an error packet if
1220 read_inferior_memory() returns an error.
1222 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1224 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1225 Unify with other clean targets.
1227 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1229 * server.c (handle_v_cont): Call set_desired_inferior.
1231 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1233 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1235 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1237 * linux-low.c (linux_wait): Unblock async I/O.
1238 (linux_resume): Block and enable async I/O.
1239 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1240 * server.h (block_async_io, unblock_async_io): Add prototypes.
1242 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1244 * remote-utils.c (remote_open): Print a status notice after
1246 * server.c (attach_inferior): Print a status notice after
1249 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1251 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1253 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1255 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1257 * server.c, target.h: Update copyright years.
1259 2004-02-25 Roland McGrath <roland@redhat.com>
1261 * target.h (struct target_ops): New member `read_auxv'.
1262 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1263 * linux-low.c (linux_read_auxv): New function.
1264 (linux_target_ops): Initialize `read_auxv' member to that.
1266 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1268 Committed by Jim Blandy <jimb@redhat.com>.
1270 * linux-s390-low.c (s390_num_regs): Update.
1271 (s390_regmap): Remove control registers. Use __s390x__ predefine
1272 instead of GPR_SIZE to distiguish s390 and s390x targets.
1274 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1276 * linux-low.c: Update copyright year.
1277 (check_removed_breakpoint): Clear pending_is_breakpoint.
1278 (linux_set_resume_request, linux_queue_one_thread)
1279 (resume_status_pending_p): New functions.
1280 (linux_continue_one_thread): Use process->resume.
1281 (linux_resume): Only resume threads if there are no pending events.
1282 * linux-low.h (struct process_info): Add resume request
1285 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1287 * regcache.c (new_register_cache): Clear the allocated register
1288 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1290 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1292 * linux-low.c (linux_resume): Take a struct thread_resume *
1294 (linux_wait): Update call.
1295 (resume_ptr): New static variable.
1296 (linux_continue_one_thread): Renamed from
1297 linux_continue_one_process. Use resume_ptr.
1298 (linux_resume): Use linux_continue_one_thread.
1299 * server.c (handle_v_cont, handle_v_requests): New functions.
1300 (myresume): New function.
1301 (main): Handle 'v' case.
1302 * target.h (struct thread_resume): New type.
1303 (struct target_ops): Change argument of "resume" to struct
1305 (myresume): Delete macro.
1307 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1309 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1310 (uninstall): Support DESTDIR.
1312 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1314 * configure.srv: Add xscale*linux copy of arm*linux entry.
1316 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1318 * linux-arm-low.c (arm_reinsert_addr): New function.
1319 (the_low_target): Add arm_reinsert_addr.
1321 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1323 * mem-break.c: Remove whitespace at end of file.
1325 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1327 * configure.in: Check whether we need to prototype strerror.
1328 * server.h: Optionally prototype strerror.
1329 * gdbreplay.c (perror_with_name): Use strerror.
1330 * linux-low.c (linux_attach_lwp): Use strerror.
1331 * utils.c (perror_with_name): Use strerror.
1332 * config.in, configure: Regenerated.
1334 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1336 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1337 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1339 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1341 * Makefile.in (SFILES): Update.
1342 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1343 low-sun3.c: Remove files.
1345 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1347 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1348 (linux_detach_one_process, linux_detach): New functions.
1349 (linux_target_ops): Add linux_detach.
1350 * server.c (main): Handle 'D' packet.
1351 * target.h (struct target_ops): Add "detach" member.
1352 (detach_inferior): Define.
1354 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1356 From Kelley Cook <kelleycook@wideopenwest.com>:
1357 * configure.srv: Accept i[34567]86 variants.
1359 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1361 * linux-low.c (linux_wait_for_event): Correct comment typos.
1362 (linux_resume_one_process): Call check_removed_breakpoint.
1363 (linux_send_signal): New function.
1364 (linux_target_ops): Add linux_send_signal.
1365 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1367 * target.h (struct target_ops): Add send_signal.
1369 2003-05-29 Jim Blandy <jimb@redhat.com>
1371 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1372 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1373 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1374 away part of the register's value.
1376 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1378 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1379 (linux_wait_for_event, linux_init_signals): Likewise.
1381 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1383 * configure.in: Check for stdlib.h.
1384 * configure: Regenerated.
1385 * config.in: Regenerated.
1387 2003-01-04 Andreas Schwab <schwab@suse.de>
1389 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1391 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1393 * Makefile.in: Remove obsolete code.
1395 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1397 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1398 defined(PT_FPR0_HI).
1400 2002-11-17 Stuart Hughes <seh@zee2.com>
1402 * linux-arm-low.c (arm_num_regs): Increase.
1403 (arm_regmap): Include status register.
1405 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1407 * linux-low.c (register_addr): Remove incorrect -1 check.
1409 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1411 * linux-low.c (linux_create_inferior): Call setpgid. Return
1413 (unstopped_p, linux_signal_pid): Remove.
1414 (linux_target_ops): Remove linux_signal_pid.
1415 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1416 global instead of target method.
1417 * target.h (struct target_ops): Remove signal_pid. Update comment
1418 for create_inferior.
1419 * server.c (signal_pid): New variable.
1420 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1421 gdbserver. Set the child to be the foreground process group.
1422 (attach_inferior): Set signal_pid.
1424 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1426 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1428 2002-08-20 Jim Blandy <jimb@redhat.com>
1430 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1433 2002-08-01 Andrew Cagney <cagney@redhat.com>
1435 * Makefile.in: Make chill references obsolete.
1437 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1439 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1440 * configure: Regenerate.
1441 * config.in: Regenerate.
1443 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1445 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1446 (perror_with_name, remote_close, remote_open, expect, play): Static.
1448 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1450 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1451 byte offsets instead of an array of indexes.
1452 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1454 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1456 * regcache.c: Add comment.
1458 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1460 * thread-db.c: New file.
1461 * proc-service.c: New file.
1462 * acinclude.m4: New file.
1463 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1464 proc-service.o, and thread-db.o.
1465 (linux-low.o): Add USE_THREAD_DB.
1466 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1467 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1468 * aclocal.m4: Regenerated.
1469 * config.in: Regenerated.
1470 * configure: Regenerated.
1471 * configure.in: Check for proc_service.h, sys/procfs.h,
1472 thread_db.h, and linux/elf.h headrs.
1473 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1474 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1475 Check for -lthread_db and thread support.
1476 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1477 PowerPC, and SuperH.
1478 * i387-fp.c: Constify arguments.
1479 * i387-fp.h: Likewise.
1480 * inferiors.c: (struct thread_info): Renamed from
1481 `struct inferior_info'. Remove PID member. Use generic inferior
1482 list header. All uses updated.
1483 (inferiors, signal_pid): Removed.
1484 (all_threads): New variable.
1485 (get_thread): Define.
1486 (add_inferior_to_list): New function.
1487 (for_each_inferior): New function.
1488 (change_inferior_id): New function.
1489 (add_inferior): Removed.
1490 (remove_inferior): New function.
1491 (add_thread): New function.
1492 (free_one_thread): New function.
1493 (remove_thread): New function.
1494 (clear_inferiors): Use for_each_inferior and free_one_thread.
1495 (find_inferior): New function.
1496 (find_inferior_id): New function.
1497 (inferior_target_data): Update argument type.
1498 (set_inferior_target_data): Likewise.
1499 (inferior_regcache_data): Likewise.
1500 (set_inferior_regcache_data): Likewise.
1501 * linux-low.c (linux_bp_reinsert): Remove.
1502 (all_processes, stopping_threads, using_thrads)
1503 (struct pending_signals, debug_threads, pid_of): New.
1504 (inferior_pid): Replace with macro.
1505 (struct inferior_linux_data): Remove.
1506 (get_stop_pc, add_process): New functions.
1507 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1508 Use add_process and add_thread.
1509 (linux_attach_lwp): New function, based on old linux_attach. Use
1510 add_process and add_thread. Set stop_expected for new threads.
1511 (linux_attach): New function.
1512 (linux_kill_one_process): New function.
1513 (linux_kill): Kill all LWPs.
1514 (linux_thread_alive): Use find_inferior_id.
1515 (check_removed_breakpoints, status_pending_p): New functions.
1516 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1517 Update. Use WNOHANG. Wait for cloned processes also. Update process
1518 struct for the found process.
1519 (linux_wait_for_event): New function.
1520 (linux_wait): Use it. Support LWPs.
1521 (send_sigstop, wait_for_sigstop, stop_all_processes)
1522 (linux_resume_one_process, linux_continue_one_process): New functions.
1523 (linux_resume): Support LWPs.
1524 (REGISTER_RAW_SIZE): Remove.
1525 (fetch_register): Use register_size instead. Call supply_register.
1526 (usr_store_inferior_registers): Likewise. Call collect_register.
1528 (regsets_fetch_inferior_registers): Improve error message.
1529 (regsets_store_inferior_registers): Add debugging.
1530 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1531 (unstopped_p, linux_signal_pid): New functions.
1532 (linux_target_ops): Add linux_signal_pid.
1533 (linux_init_signals): New function.
1534 (initialize_low): Call it. Initialize using_threads.
1535 * regcache.c (inferior_regcache_data): Add valid
1537 (get_regcache): Fetch registers lazily. Add fetch argument
1538 and update all callers.
1539 (regcache_invalidate_one, regcache_invalidate): New
1541 (new_register_cache): Renamed from create_register_cache.
1542 Return the new regcache.
1543 (free_register_cache): Change argument to a void *.
1544 (registers_to_string, registers_from_string): Call get_regcache
1545 with fetch flag set.
1546 (register_data): Make static. Pass fetch flag to get_regcache.
1547 (supply_register): Call get_regcache with fetch flag clear.
1548 (collect_register): Call get_regcache with fetch flag set.
1549 (collect_register_as_string): New function.
1550 * regcache.h: Update.
1551 * remote-utils.c (putpkt): Flush after debug output and use
1553 Handle input interrupts while waiting for an ACK.
1554 (input_interrupt): Use signal_pid method.
1555 (getpkt): Flush after debug output and use stderr.
1556 (outreg): Use collect_register_as_string.
1557 (new_thread_notify, dead_thread_notify): New functions.
1558 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1560 (look_up_one_symbol): Flush after debug output.
1561 * server.c (step_thread, server_waiting): New variables.
1562 (start_inferior): Don't use signal_pid. Update call to mywait.
1563 (attach_inferior): Update call to mywait.
1564 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1565 (main): Don't fetch/store registers explicitly. Use
1566 set_desired_inferior. Support proposed ``Hs'' packet. Update
1569 (struct inferior_list, struct_inferior_list_entry): New.
1570 * target.c (set_desired_inferior): New.
1571 (write_inferior_memory): Constify.
1572 (mywait): New function.
1574 (struct target_ops): New signal_pid method.
1575 (mywait): Removed macro, added prototype.
1577 * linux-low.h (regset_func): Removed.
1578 (regset_fill_func, regset_store_func): New.
1579 (enum regset_type): New.
1580 (struct regset_info): Add type field. Use new operation types.
1581 (struct linux_target_ops): stop_pc renamed to get_pc.
1582 Add decr_pc_after_break and breakpoint_at.
1583 (get_process, get_thread_proess, get_process_thread)
1584 (strut process_info, all_processes, linux_attach_lwp)
1585 (thread_db_init): New.
1587 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1588 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1589 (the_low_target): Add new members.
1590 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1591 (i386_store_fpxregset): Constify.
1592 (target_regsets): Add new kind identifier.
1593 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1594 (i386_set_pc): Add debugging.
1595 (i386_breakpoint_at): New function.
1596 (the_low_target): Add new members.
1597 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1598 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1599 (mips_breakpoint_at): New.
1600 (the_low_target): Add new members.
1601 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1602 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1603 (the_low_target): Add new members.
1604 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1605 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1606 (the_low_target): Add new members.
1607 * linux-x86-64-low.c (target_regsets): Add new kind
1610 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1612 From Martin Pool <mbp@samba.org>:
1613 * server.c (gdbserver_usage): New function.
1616 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1618 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1621 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1623 * Makefile.in: Remove obsolete code.
1625 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1627 * linux-low.c (regsets_fetch_inferior_registers),
1628 (regsets_store_inferior_registers): Removed cast to int from
1630 * regcache.h: Added declaration of struct inferior_info.
1632 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1634 * inferiors.c (struct inferior_info): Add regcache_data.
1635 (add_inferior): Call create_register_cache.
1636 (clear_inferiors): Call free_register_cache.
1637 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1638 * regcache.c (struct inferior_regcache_data): New.
1639 (registers): Remove.
1640 (get_regcache): New function.
1641 (create_register_cache, free_register_cache): New functions.
1642 (set_register_cache): Don't initialize the register cache here.
1643 (registers_to_string, registers_from_string, register_data): Call
1645 * regcache.h: Add prototypes.
1646 * server.h: Likewise.
1648 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1650 * mem-break.c: New file.
1651 * mem-break.h: New file.
1652 * Makefile.in: Add mem-break.o rule; update server.h
1654 * inferiors.c (struct inferior_info): Add target_data
1656 (clear_inferiors): Free target_data member if set.
1657 (inferior_target_data, set_inferior_target_data): New functions.
1658 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1659 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1660 * linux-low.c (linux_bp_reinsert): New variable.
1661 (struct inferior_linux_data): New.
1662 (linux_create_inferior): Use set_inferior_target_data.
1663 (linux_attach): Likewise. Call add_inferior.
1664 (linux_wait_for_one_inferior): New function.
1665 (linux_wait): Call it.
1666 (linux_write_memory): Add const.
1667 (initialize_low): Call set_breakpoint_data.
1668 * linux-low.h (struct linux_target_ops): Add breakpoint
1670 * server.c (attach_inferior): Remove extra add_inferior
1672 * server.h: Include mem-break.h. Update inferior.c
1674 * target.c (read_inferior_memory)
1675 (write_inferior_memory): New functions.
1676 * target.h (read_inferior_memory)
1677 (write_inferior_memory): Change macros to prototypes.
1678 (struct target_ops): Update comments. Add const to write_memory
1681 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1683 * linux-low.c (usr_store_inferior_registers): Support
1684 registers which are allowed to fail to store.
1685 * linux-low.h (linux_target_ops): Likewise.
1686 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1687 (ppc_cannot_store_register): FPSCR may not be storable.
1689 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1691 * server.h: Include <string.h> if HAVE_STRING_H.
1692 * ChangeLog: Correct paths in last ChangeLog entry.
1694 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1696 * linux-low.h: Remove obsolete prototypes.
1697 (struct linux_target_ops): New.
1698 (extern the_low_target): New.
1699 * linux-low.c (num_regs, regmap): Remove declarations.
1700 (register_addr): Use the_low_target explicitly.
1701 (fetch_register): Likewise.
1702 (usr_fetch_inferior_registers): Likewise.
1703 (usr_store_inferior_registers): Likewise.
1704 * linux-arm-low.c (num_regs): Remove.
1705 (arm_num_regs): Define.
1706 (arm_regmap): Renamed from regmap, made static.
1707 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1709 (arm_cannot_store_register): Renamed from cannot_store_register,
1711 (the_low_target): New.
1712 * linux-i386-low.c (num_regs): Remove.
1713 (i386_num_regs): Define.
1714 (i386_regmap): Renamed from regmap, made static.
1715 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1717 (i386_cannot_store_register): Renamed from cannot_store_register,
1719 (the_low_target): New.
1720 * linux-ia64-low.c (num_regs): Remove.
1721 (ia64_num_regs): Define.
1722 (ia64_regmap): Renamed from regmap, made static.
1723 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1725 (ia64_cannot_store_register): Renamed from cannot_store_register,
1727 (the_low_target): New.
1728 * linux-m68k-low.c (num_regs): Remove.
1729 (m68k_num_regs): Define.
1730 (m68k_regmap): Renamed from regmap, made static.
1731 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1733 (m68k_cannot_store_register): Renamed from cannot_store_register,
1735 (the_low_target): New.
1736 * linux-mips-low.c (num_regs): Remove.
1737 (mips_num_regs): Define.
1738 (mips_regmap): Renamed from regmap, made static.
1739 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1741 (mips_cannot_store_register): Renamed from cannot_store_register,
1743 (the_low_target): New.
1744 * linux-ppc-low.c (num_regs): Remove.
1745 (ppc_num_regs): Define.
1746 (ppc_regmap): Renamed from regmap, made static.
1747 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1749 (ppc_cannot_store_register): Renamed from cannot_store_register,
1751 (the_low_target): New.
1752 * linux-s390-low.c (num_regs): Remove.
1753 (s390_num_regs): Define.
1754 (s390_regmap): Renamed from regmap, made static.
1755 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1757 (s390_cannot_store_register): Renamed from cannot_store_register,
1759 (the_low_target): New.
1760 * linux-sh-low.c (num_regs): Remove.
1761 (sh_num_regs): Define.
1762 (sh_regmap): Renamed from regmap, made static.
1763 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1765 (sh_cannot_store_register): Renamed from cannot_store_register,
1767 (the_low_target): New.
1768 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1769 (the_low_target): New.
1771 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1773 * Makefile.in: Add stamp-h target.
1774 * configure.in: Create stamp-h.
1775 * configure: Regenerated.
1777 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1779 * inferiors.c: New file.
1780 * target.c: New file.
1781 * target.h: New file.
1782 * Makefile.in: Add target.o and inferiors.o. Update
1784 * linux-low.c (inferior_pid): New static variable,
1785 moved from server.c.
1786 (linux_create_inferior): Renamed from create_inferior.
1787 Call add_inferior. Return 0 on success instead of a PID.
1788 (linux_attach): Renamed from myattach.
1789 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1790 (linux_thread_alive): Renamed from mythread_alive.
1791 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1793 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1794 (regsets_store_inferior_registers): Correct error message.
1795 Add missing ``return 0''.
1796 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1797 (linux_store_registers): Renamed from store_inferior_registers.
1798 (linux_read_memory): Renamed from read_inferior_memory.
1799 (linux_write_memory): Renamed from write_inferior_memory.
1800 (linux_target_ops): New structure.
1801 (initialize_low): Call set_target_ops ().
1802 * remote-utils.c (unhexify): New function.
1803 (hexify): New function.
1804 (input_interrupt): Send signals to ``signal_pid''.
1805 * server.c (inferior_pid): Remove.
1806 (start_inferior): Update create_inferior call.
1807 (attach_inferior): Call add_inferior.
1808 (handle_query): New function.
1809 (main): Call handle_query for `q' packets.
1810 * server.h: Include "target.h". Remove obsolete prototypes.
1811 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1813 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1815 * Makefile.in: Add WARN_CFLAGS. Update configury
1817 * configure.in: Check for <string.h>
1818 * configure: Regenerate.
1819 * config.in: Regenerate.
1820 * gdbreplay.c: Include needed system headers.
1821 (remote_open): Remove strchr prototype.
1822 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1823 * regcache.c (supply_register): Change buf argument to const void *.
1824 (supply_register_by_name): Likewise.
1825 (collect_register): Change buf argument to void *.
1826 (collect_register_by_name): Likewise.
1827 * regcache.h: Add missing prototypes.
1828 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1829 * server.c (handle_query): New function.
1830 (attached): New static variable, moved out of main.
1831 (main): Quiet longjmp clobber warnings.
1832 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1833 * utils.c (error): Remove NORETURN.