1 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3 * server.c (myresume): Add own_buf argument.
6 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9 * remote-utils.c (remote_open): Do not call disable_async_io.
10 (block_async_io): Delete.
11 (unblock_async_io): Make static.
12 (initialize_async_io): New.
13 * server.c (handle_v_cont): Handle async I/O here.
14 (myresume): Likewise. Move other common resume tasks here...
15 (main): ... from here. Call initialize_async_io. Disable async
16 I/O before the main loop.
17 * server.h (initialize_async_io): Declare.
18 (block_async_io, unblock_async_io): Delete prototypes.
19 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
21 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
23 * remote-utils.c (readchar): Allow binary data in received messages.
25 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
27 * win32-low.c (attaching): New global.
28 (win32_create_inferior): Clear the `attaching' global.
29 (win32_attach): Set the `attaching' global.
30 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
31 attaching. Only set a breakpoint at the entry point if not
34 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
36 * server.c (main): Don't report dll events on the initial
37 connection on attaches.
39 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
41 * server.c (main): Relax numerical bases supported for the pid of
42 the --attach command line argument.
44 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
46 * win32-low.c (win32_attach): Call OpenProcess before
47 DebugActiveProcess, not after. Add last error output to error
50 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
52 * win32-low.c (win32_get_thread_context)
53 (win32_set_thread_context): New functions.
54 (thread_rec): Use win32_get_thread_context.
55 (continue_one_thread, win32_resume): Use win32_set_thread_context.
56 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
60 Pedro Alves <pedro_alves@portugalmail.pt>
62 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
64 (child_add_thread): Minor cleanup.
65 (child_continue): Resume artificially suspended threads before
66 calling ContinueDebugEvent.
67 (suspend_one_thread): New.
68 (fake_breakpoint_event): New.
69 (get_child_debug_event): Change return type to int. Check here if
70 gdb sent an interrupt request. If a soft interrupt was requested,
71 fake a breakpoint event. Return 0 if there is no event to handle,
73 (win32_wait): Don't check here if gdb sent an interrupt request.
74 Ensure there is a valid event to handle.
75 (win32_request_interrupt): Add soft interruption method as last
79 Pedro Alves <pedro_alves@portugalmail.pt>
81 * win32-low.h (win32_thread_info): Add descriptions to the
82 structure members. Replace `suspend_count' counter by a
84 * win32-low.c (thread_rec): Update condition of when to get the
85 context from the inferior. Rely on ContextFlags being set if it
86 has already been retrieved. Only suspend the inferior thread if
87 we haven't already. Warn if that fails.
88 (continue_one_thread): s/suspend_count/suspended/. Only call
89 ResumeThread once. Warn if that fails.
91 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
93 * win32-low.c (win32_wait): Don't read from the inferior when it
96 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
98 * Makefile.in (win32_low_h): New variable.
99 (win32-low.o): Add dependency on $(win32_low_h).
100 (win32-arm-low.o, win32-i386-low.o): New rules.
102 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
104 * hostio.c: Correct copyright year.
106 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
108 * Makefile.in (OBS): Add hostio.o.
109 (hostio.o): New rule.
110 * server.h (handle_vFile): Declare.
111 * hostio.c: New file.
112 * server.c (handle_v_requests): Take packet_len and new_packet_len
113 for binary packets. Call handle_vFile.
114 (main): Update call to handle_v_requests.
116 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
118 * linux-low.c: Include <sched.h>.
120 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
122 * linux-low.c (linux_tracefork_grandchild): New.
123 (linux_tracefork_child): Use clone.
124 (linux_test_for_tracefork): Use clone; allocate and free a stack.
126 2007-10-31 Joel Brobecker <brobecker@adacore.com>
128 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
130 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
132 * linux-low.c (handle_extended_wait): Handle unexpected signals.
134 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
136 * inferiors.c (change_inferior_id): Delete.
137 (add_pid_to_list, pull_pid_from_list): New.
138 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
139 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
140 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
141 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
142 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
143 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
144 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
145 (using_threads): Always set to 1.
146 (handle_extended_wait): New.
147 (add_process): Do not set TID.
148 (linux_create_inferior): Set must_set_ptrace_flags.
149 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
150 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
151 (linux_thread_alive): Rename TID argument to LWPID.
152 (linux_wait_for_process): Handle unknown processes. Do not use TID.
153 (linux_wait_for_event): Do not use TID or check using_threads. Update
154 call to dead_thread_notify. Call handle_extended_wait.
155 (linux_create_inferior): Use PTRACE_SETOPTIONS.
156 (send_sigstop): Delete sigstop_sent.
157 (wait_for_sigstop): Avoid TID.
158 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
159 (linux_test_for_tracefork): New.
160 (linux_lookup_signals): Use thread_db_active and
161 linux_supports_tracefork_flag.
162 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
163 * linux-low.h (get_process_thread): Avoid TID.
164 (struct process_ifo): Move thread_known and tid to the end. Remove
166 (linux_attach_lwp, thread_db_init): Update prototypes.
167 * server.h (change_inferior_id): Delete prototype.
168 (add_pid_to_list, pull_pid_from_list): New prototypes.
169 * thread-db.c (thread_db_use_events): New.
170 (find_first_thread): Rename to...
171 (find_one_thread): ...this. Update callers and messages. Do not
172 call fatal. Check thread_db_use_events. Do not call
173 change_inferior_id or new_thread_notify.
174 (maybe_attach_thread): Update. Do not call new_thread_notify.
175 (thread_db_init): Set thread_db_use_events. Check use_events.
176 * utils.c (fatal, warning): Correct message prefix.
178 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
180 * Makefile.in (clean): Remove new files.
181 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
182 (powerpc-64.o, powerpc-64.c): New rules.
183 * configure.srv: Use alternate register sets for powerpc64-*-linux*
184 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
186 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
188 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
189 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
190 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
191 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
192 (target_regsets): Add AltiVec and SPE register sets.
193 * configure.ac: Check for AltiVec and SPE.
194 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
195 (ppc_fill_vrregset, ppc_store_vrregset): New.
196 (target_regsets): Add AltiVec register set.
197 * configure: Regenerated.
199 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
201 * linux-low.c (O_LARGEFILE): Define.
202 (linux_read_memory): Use /proc/PID/mem.
203 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
204 * configure, config.in: Regenerated.
206 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
208 * linux-low.c (linux_wait_for_event): Do not pass signals while
211 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
213 * win32-low.c (create_process): New.
214 (win32_create_inferior): Use create_process instead of
215 CreateProcess. If create_process failed retry appending an ".exe"
216 suffix. Store the GetLastError result immediatelly after
217 create_process calls and use it on the call to error.
219 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
221 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
223 2007-08-23 Joel Brobecker <brobecker@adacore.com>
225 * configure.ac: Switch license to GPLv3.
227 2007-08-01 Michael Snyder <msnyder@access-company.com>
229 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
231 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
233 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
235 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
236 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
237 CloseToolhelp32Snapshot.
238 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
239 CloseToolhelp32Snapshot.
241 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
243 * server.c (main): Check for inferior exit before main loop.
245 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
247 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
248 instead of on tmp_desc.
250 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
251 Daniel Jacobowitz <dan@codesourcery.com>
253 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
254 (add_thread): Minor cleanups.
255 (clear_inferiors): Move lower in the file. Clear the DLL
257 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
258 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
259 (xml_escape_text): New.
260 * server.c (handle_query): Handle qXfer:libraries:read. Report it
262 (handle_v_cont): Report errors.
263 (gdbserver_version): Update.
264 (main): Correct size of own_buf. Do not report initial DLL events.
265 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
266 (unloaded_dll, xml_escape_text): New.
267 * win32-low.c (enum target_waitkind): Update comments.
268 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
269 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
270 (win32_EnumProcessModules, win32_GetModuleInformation)
271 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
272 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
273 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
274 (win32_Module32First, win32_Module32Next, load_toolhelp)
275 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
276 (get_child_debug_event): Handle DLL events.
277 (win32_wait): Likewise.
279 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
281 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
282 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
284 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
286 * win32-low.c (handle_output_debug_string): Ignore event if not
289 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
291 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
293 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
295 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
297 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
299 * inferiors.c (change_inferior_id): Add comment.
300 * linux-low.c (check_removed_breakpoint): Add an early
301 prototype. Improve debug output.
302 (linux_attach): Doc update.
303 (linux_detach_one_process, linux_detach): Clean up before releasing
305 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
306 * linux-low.h (struct process_info): Doc improvement.
307 * mem-break.c (delete_all_breakpoints): New.
308 * mem-break.h (delete_all_breakpoints): New prototype.
309 * thread-db.c (find_first_thread): New.
310 (thread_db_create_event): Call it instead of
311 thread_db_find_new_threads. Clean up unused variables.
312 (maybe_attach_thread): Remove first thread handling.
313 (thread_db_find_new_threads): Use find_first_thread.
314 (thread_db_get_tls_address): Likewise.
316 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
318 * thread-db.c (thread_db_find_new_threads): Add prototype.
319 (thread_db_create_event): Check for the main thread before adding
321 (maybe_attach_thread): Only enable event reporting if TID == 0.
322 (thread_db_get_tls_address): Check for new threads.
324 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
326 * linux-low.c (linux_create_inferior): Try execv before execvp.
327 * spu-low.c (spu_create_inferior): Likewise.
329 2007-06-13 Mike Frysinger <vapier@gentoo.org>
331 * linux-low.c (linux_create_inferior): Change execv to execvp.
332 * spu-low.c (spu_create_inferior): Likewies.
334 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
336 * Makefile.in (clean): Clean new files instead of deleted ones.
337 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
338 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
340 * configure.srv: Specify XML files and new regformats for MIPS and
342 * linux-mips-low.c (mips_num_regs): Set to only used registers.
343 (mips_regmap): Do not fetch $0. Remove unused registers. Add
344 an entry for the restart register.
345 (mips_cannot_fetch_register, mips_cannot_store_register)
346 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
347 register names to match the XML descriptions.
348 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
349 restart register instead of $0.
351 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
352 Markus Deuling <deuling@de.ibm.com>
354 * remote-utils.c (decode_xfer_write): New function.
355 * server.h (decode_xfer_write): Add prototype.
356 * server.c (handle_query): Add PACKET_LEN argument. Support
357 qXfer:spu:read and qXfer:spu:write packets.
358 (main): Pass packet_len to handle_query.
359 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
360 * target.h (target_ops): Add qxfer_spu.
362 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
364 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
365 accessing non-seekable spufs files.
367 2007-05-16 Markus Deuling <deuling@de.ibm.com>
369 * server.c (handle_query): Add reply for qC packet.
371 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
372 Leo Zayas <lerele@champenstudios@com>
374 * server.h (check_remote_input_interrupt_request): New function.
375 * remote_utils.c (INVALID_DESCRIPTOR): New define.
376 (remote_desc): Initialize with INVALID_DESCRIPTOR.
377 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
378 (check_remote_input_interrupt_request): New function.
379 * server.h (check_remote_input_interrupt_request): Declare.
380 * win32-low.c (winapi_DebugBreakProcess,
381 winapi_GenerateConsoleCtrlEvent): New typedefs.
382 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
384 (win32_wait): Check for remote interrupt request
385 with check_remote_input_interrupt_request.
386 (win32_request_interrupt): New function.
387 (win32_target_op): Set request_interrupt to win32_request_interrupt.
389 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
391 * win32-low.c (debug_registers_changed,
392 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
393 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
394 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
395 (thread_rec): Get context using the low target.
396 (child_add_thread): Call thread_added on the low target,
397 which does the same thing.
399 (do_initial_child_stuff): Remove debug registers references.
400 Set context using the low target. Resume threads after
401 setting the contexts.
402 (child_continue): Remove dead variable. Remove debug
403 registers references.
404 (child_fetch_inferior_registers): Go through the low target.
405 (do_child_store_inferior_registers): Remove.
406 (child_store_inferior_registers): Go through the low target.
407 (win32_resume): Remove debug registers references.
408 Set context using the low target.
409 (handle_exception): Change return type to void. Don't record
410 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
411 first chance exception.
412 (get_child_debug_event): Change return type to void. Remove
413 goto loop. Always return after waiting for debug event.
414 (win32_wait): Convert to switch statement. Handle spurious
417 * win32-i386-low.c (debug_registers_changed,
418 debug_registers_used): New.
419 (initial_stuff): Rename to ...
420 (i386_initial_stuff): ... this. Clear debug registers
422 (store_debug_registers): Delete.
423 (i386_get_thread_context): New.
424 (load_debug_registers): Delete.
425 (i386_set_thread_context): New.
426 (i386_thread_added): New.
427 (single_step): Rename to ...
428 (i386_single_step): ... this.
429 (do_fetch_inferior_registers): Rename to ...
430 (i386_fetch_inferior_register): ... this.
431 (i386_store_inferior_register): New.
432 (the_low_target): Adapt to new interface.
434 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
435 (arm_get_thread_context): New.
436 (arm_set_thread_context): New.
438 (do_fetch_inferior_registers): Rename to ...
439 (arm_fetch_inferior_register): ... this.
440 (arm_store_inferior_register): New.
441 (arm_wince_breakpoint): Reimplement as unsigned long.
442 (arm_wince_breakpoint_len): Define.
443 (the_low_target): Adapt to new interface.
445 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
446 load_debug_registers. Add get_thread_context, set_thread_context,
447 thread_added and store_inferior_register. Rename
448 fetch_inferior_registers to fetch_inferior_register.
449 (regptr): Remove declaration.
451 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
453 * linux-low.c (linux_detach): Change return type to int. Return 0.
454 * spu-low.c (spu_detach): Likewise.
456 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
458 * target.h (target_ops): Change return type of detach to int.
460 (join_inferior): New.
461 * server.c (main): Don't skip detach support on mingw32.
462 If the inferior doesn't support detaching return error.
463 Call join_inferior instead of using waitpid.
464 * linux-low.c (linux_join): New.
465 (linux_target_op): Add linux_join.
466 * spu-low.c (spu_join): New.
467 (spu_target_ops): Add spu_join.
468 * win32-low.c (win32_detach): Adapt to new interface.
469 Reopen current_process_handle before detaching. Issue a child
470 resume before detaching.
472 (win32_target_op): Add win32_join.
474 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
476 * win32-low.c (win32-attach): Fix return value.
477 * target.h (target_ops): Describe ATTACH return values.
479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
481 * win32-low.c (GETPROCADDRESS): Define.
482 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
483 (winapi_DebugSetProcessKillOnExit): Likewise.
484 (win32_create_inferior): Force usage of ansi CreateProcessA.
485 (win32_attach): Use GETPROCADDRESS.
486 (win32_detach): Likewise.
488 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
490 * win32-low.c (win32_wait): Don't use WSTOPSIG.
492 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
494 * win32-low.c: Commit leftover changes from 2007-03-29.
496 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
498 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
499 fields short instead of int. Add explicit padding.
500 (i387_cache_to_fsave): Remove unnecessary casts.
501 (i387_fsave_to_cache): Doc fix.
502 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
504 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
506 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
507 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
509 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
511 * configure.srv (arm*-*-mingw32ce*): Move near the other
514 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
516 * configure.ac: Add errno checking.
517 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
518 sys/file.h and malloc.h.
519 (AC_CHECK_DECLS): Add perror.
520 (srv_mingwce): Handle.
521 * configure.srv (i[34567]86-*-cygwin*): Add
522 win32-i386-low.o to srv_tgtobj.
523 (i[34567]86-*-mingw*): Likewise.
524 (arm*-*-mingw32ce*): Add case.
525 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
526 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
527 [__MINGW32CE__] (strerror): New function.
528 [__MINGW32CE__] (errno): Define to GetLastError.
529 [__MINGW32CE__] (COUNTOF): New macro.
530 (remote_open): Remove extra close call.
531 * mem-break.c (delete_breakpoint_at): New function.
532 * mem-break.h (delete_breakpoint_at): Declare.
533 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
534 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
535 [USE_WIN32API] (read, write): Add char* casts.
536 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
537 * server.h: Include wincecompat.h on Windows CE.
538 [HAVE_ERRNO_H]: Check.
539 (perror): Declare if not declared.
540 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
541 (perror_with_name): Remove errno declaration.
542 * wincecompat.h: New.
543 * wincecompat.c: New.
545 * win32-arm-low.c: New.
546 * win32-i386-low.c: New.
547 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
548 (OUTMSG2): Make it safe.
550 (COUNTOF): New macro.
551 (NUM_REGS): Get it from the low target.
552 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
553 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
554 (thread_rec): Let low target handle debug registers.
555 (child_add_thread): Likewise.
556 (child_init_thread_list): Likewise.
557 (continue_one_thread): Likewise.
559 (do_child_fetch_inferior_registers): Move to ...
560 * win32-i386-low.c: ... here, and rename to ...
561 (do_fetch_inferior_registers): ... this.
562 * win32-low.c (child_fetch_inferior_registers):
563 Go through the low target.
564 (do_child_store_inferior_registers): Use regptr.
565 (strwinerror): New function.
566 (win32_create_inferior): Handle Windows CE.
567 Use strwinerror instead of strerror on Windows error
568 codes. Add program to the error output.
569 Don't close the main thread handle on Windows CE.
570 (win32_attach): Use coredll.dll on Windows CE.
571 (win32_kill): Close current process and current
573 (win32_detach): Use coredll.dll on Windows CE.
574 (win32_resume): Let low target handle debug registers, and
576 (handle_exception): Add/Remove initial breakpoint. Avoid
577 non-existant WSTOPSIG on Windows CE.
578 (win32_read_inferior_memory): Cast to remove warning.
579 (win32_arch_string): Go through the low target.
580 (initialize_low): Call set_breakpoint_data with the low
582 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
583 FOP_REGNUM, mappings): Move to ...
584 * win32-i386-low.c: ... here.
585 * win32-low.c (win32_thread_info): Move to ...
586 * win32-low.h: ... here.
587 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
588 win32-arm-low.c and wincecompat.c.
590 (install-only:): Likewise.
591 (gdbserver:): Likewise.
592 (gdbreplay:): Likewise.
593 * config.in: Regenerate.
594 * configure: Regenerate.
596 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
598 * win32-low.c: Rename typedef thread_info to
599 win32_thread_info throughout.
601 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
603 * win32-i386-low.c: Rename to ...
604 * win32-low.c: ... this.
605 * configure.srv: Replace win32-i386-low.o with win32-low.o.
606 * Makefile.in: Likewise.
608 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
610 * remote-utils.c (monitor_output): Constify msg parameter.
611 * server.h (monitor_output): Likewise.
612 * win32-i386-low.c (handle_output_debug_string): New.
613 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
614 handle_output_debug_string.
615 (get_child_debug_event): Likewise.
617 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
619 * server.c (main): Correct strtoul check.
621 2007-03-27 Jon Ringle <jon@ringle.org>
623 * linux-low.c: Check __ARCH_HAS_MMU__ also.
625 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
627 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
629 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
631 * terminal.h: Check HAVE_SGTTY_H.
633 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
635 * remote-utils.c (remote_open): Print out the assigned port number.
637 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
639 * remote-utils.c (monitor_output): New function.
640 * server.c (debug_threads): Define here.
641 (monitor_show_help): New function.
642 (handle_query): Handle qRcmd.
643 (main): Do not handle 'd' packet.
644 * server.h (debug_threads, remote_debug, monitor_output): Declare.
645 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
648 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
650 * Makefile.in (EXEEXT): New.
651 (clean): Use $(EXEEXT).
653 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
655 * target.h (target_ops): Rename send_signal to request_interrupt,
656 and remove enum target_signal parameter.
657 * linux-low.c (linux_request_interrupt): Rename from
658 linux_send_signal, and always send SIGINT.
659 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
660 and always send SIGINT.
661 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
663 (input_interrupt): Likewise.
665 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
667 * server.c (get_features_xml): Check if target implemented
669 * win32-i386-low.c (win32_arch_string): New.
670 (win32_target_ops): Add win32_arch_string as arch_string member.
672 2007-02-22 Markus Deuling <deuling@de.ibm.com>
674 * spu-low.c (spu_arch_string): New.
675 (spu_target_ops): Add spu_arch_string.
677 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
679 * remote-utils.c: Remove HAVE_TERMINAL_H check.
680 * configure.ac: Do not check for terminal.h.
681 * configure, config.in: Regenerated.
683 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
685 * Makefile.in (OBS): Add $(XML_BUILTIN).
686 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
688 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
689 (arm-with-iwmmxt.c): New.
690 * config.in, configure: Regenerate.
691 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
692 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
693 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
694 (arm*-*-linux*): Add iWMMXt and regset support.
695 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
696 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
697 (arm_store_wmmxregset, target_regsets): New.
698 * server.c (get_features_xml): Take annex argument. Check builtin
700 (handle_query): Handle multiple annexes.
702 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
704 * remote-utils.c [USE_WIN32API] (read, write): Define.
705 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
708 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
710 * linux-i386-low.c (the_low_target): Set arch_string.
711 * linux-x86-64-low.c (the_low_target): Likewise.
712 * linux-low.c (linux_arch_string): New.
713 (linux_target_ops): Add it.
714 * linux-low.h (struct linux_target_ops): Add arch_string.
715 * server.c (write_qxfer_response): Use const void * for DATA.
716 (get_features_xml): New.
717 (handle_query): Handle qXfer:features:read. Report it for qSupported.
718 * target.h (struct target_ops): Add arch_string method.
720 2007-01-03 Denis Pilat <denis.pilat@st.com>
721 Daniel Jacobowitz <dan@codesourcery.com>
723 * linux-low.c (linux_kill): Handle being called with no threads.
724 * win32-i386-low.c (win32_kill): Likewise.
725 (get_child_debug_event): Clear current_process_handle.
727 2006-12-30 Denis PILAT <denis.pilat@st.com>
728 Daniel Jacobowitz <dan@codesourcery.com>
730 * remote-utils.c (remote_open): Check the type of specified
731 serial port devices before opening them.
732 * server.c (main): Kill the inferior if an error occurs during
733 the first remote_open.
735 2006-12-05 Markus Deuling <deuling@de.ibm.com>
737 * README: Update supported targets.
739 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
741 * Makefile.in (clean): Remove reg-mips64.c.
742 (reg-mips64.c, reg-mips64.o): New rules.
743 * configure.srv: Handle mips64. Include regset support for mips.
744 * linux-mips-low.c (union mips_register): New.
745 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
746 (mips_breakpoint, mips_breakpoint_at): Use int.
747 (mips_collect_register, mips_supply_register)
748 (mips_collect_register_32bit, mips_supply_register_32bit)
749 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
750 (mips_store_fpregset, target_regsets): New.
751 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
753 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
755 * configure.srv: Add target "spu*-*-*".
756 * Makefile.in (clean): Remove reg-spu.c.
757 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
758 * spu-low.c: New file.
760 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
762 * configure.ac: Correct td_thr_tls_get_addr test.
763 * configure: Regenerated.
765 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
767 * linux-low.c (linux_wait_for_event): Reformat. Use the
769 * remote-utils.c (decode_address_to_semicolon): New.
770 * server.c (pass_signals, handle_general_set): New.
771 (handle_query): Mention QPassSignals for qSupported.
772 (main): Call handle_general_set.
773 * server.h (pass_signals, decode_address_to_semicolon): New.
775 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
777 * server.c (handle_query): Correct error handling for read_auxv.
779 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
781 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
782 and srv_linux_thread_db to yes.
783 * linux-s390-low.c (s390_fill_gregset): New function.
784 (target_regsets): Define data structure.
786 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
788 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
789 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
790 * config.in, configure: Regenerated.
791 * inferiors.c (gdb_id_to_thread): New function.
792 (gdb_id_to_thread_id): Use it.
793 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
794 * linux-low.h (struct process_info): Add th member.
795 (thread_db_get_tls_address): New prototype.
796 * remote-utils.c (decode_address): Make non-static.
797 * server.c (handle_query): Handle qGetTLSAddr.
798 * server.h (gdb_id_to_thread, decode_address): New prototypes.
799 * target.h (struct target_ops): Add get_tls_address.
800 * thread-db.c (maybe_attach_thread): Save the thread handle.
801 (thread_db_get_tls_address): New.
803 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
805 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
806 (linux_resume_one_process): Take a siginfo_t *. Update all
807 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
808 (struct pending_signals): Add a siginfo_t.
809 (linux_wait_for_process): Always set last_status.
810 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
811 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
812 * linux-low.h (struct process_info): Add last_status.
814 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
816 * remote-utils.c (try_rle): New function.
817 (putpkt_binary): Use it.
819 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
821 * Makefile.in (clean): Clean reg-x86-64-linux.c.
822 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
823 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
824 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
825 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
828 2006-08-08 Richard Sandiford <richard@codesourcery.com>
830 * server.c (terminal_fd): New variable.
831 (old_foreground_pgrp): Likewise.
832 (restore_old_foreground_pgrp): New function.
833 (start_inferior): Record the terminal file descriptor in terminal_fd
834 and its original foreground group in old_foreground_pgrp. Register
835 restore_old_foreground_pgrp with atexit().
837 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
839 * server.c (handle_query): Correct qPart to qXfer.
841 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
843 * configure.ac: Check for more headers which are missing on
844 Windows. Automatically supply -lwsock32 and USE_WIN32API.
845 * configure.srv: Add Cygwin and mingw32.
846 * remote-utils.c: Don't include headers unconditionally which
847 are missing on mingw32. Include <winsock.h> for mingw32.
848 (remote_open): Adjust for mingw32 support. Flush
849 standard error after writing to it.
850 (remote_close, putpkt_binary, input_interrupt, block_async_io)
851 (unblock_async_io, enable_async_io, disable_async_io)
852 (readchar, getpkt): Update for Winsock support.
853 (prepare_resume_reply): Expect a protocol signal number.
854 * server.c: Disable <sys/wait.h> on mingw32.
855 (start_inferior): Adjust for mingw32 support. Flush
856 standard error after writing to it.
857 (attach_inferior): Likewise. Use protocol signal
859 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
861 * win32-i386-low.c: New file.
862 * Makefile.in (XM_CLIBS): Set.
863 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
864 (win32-i386-low.o): New dependency rule.
865 * linux-low.c (linux_wait): Use target signal numbers.
866 * target.h (struct target_ops): Doc fix.
867 * server.h (target_signal_to_name): New prototype.
868 * gdbreplay.c: Don't include headers unconditionally which
869 are missing on mingw32. Include <winsock.h> for mingw32.
870 (remote_close, remote_open): Adjust for Winsock support.
871 * configure, config.in: Regenerated.
873 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
875 * server.c (decode_xfer_read, write_qxfer_response): New.
876 (handle_query): Take a packet length argument. Handle
877 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
878 the qSupported response.
879 (main): Update call to handle_query.
881 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
883 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
884 (putpkt_binary): Renamed from putpkt and adjusted for binary
886 (putpkt): New wrapper for putpkt_binary.
887 (readchar): Don't mask off the high bit.
888 (decode_X_packet): New function.
889 * server.c (main): Call putpkt_binary if a handler sets the packet
890 length. Save the length of the incoming packet. Handle 'X'.
891 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
893 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
895 * server.c (handle_query): Handle qSupported.
897 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
899 * remote-utils.c (all_symbols_looked_up): New variable.
900 (look_up_one_symbol): Check it.
901 * server.h (look_up_one_symbol): New declaration.
902 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
904 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
906 * Makefile.in (linux-arm-low.o): Update dependencies.
907 * linux-arm-low.c: Include "gdb_proc_service.h".
908 (PTRACE_GET_THREAD_AREA): Define.
909 (ps_get_thread_area): New function.
911 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
913 * configure.srv (m68k*-*-uclinux*): New target.
914 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
915 (linux_resume_one_process): Remove extraneous cast.
916 (linux_read_offsets): New.
917 (linux_target_op): Add linux_read_offsets on mmuless systems.
918 * server.c (handle_query): Add qOffsets logic.
919 * target.h (struct target_ops): Add read_offsets.
921 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
923 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
924 (PTRACE_GET_THREAD_AREA): Define.
925 (ps_get_thread_area): New function.
926 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
927 (linux-x86-64-low.o): Update.
929 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
931 * configure.ac: Remove checks for prfpregset_t.
932 * gdb_proc_service.h: New file.
933 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
934 new "gdb_proc_service.h".
935 * proc-service.c: Likewise.
936 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
937 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
938 * Makefile.in (gdb_proc_service_h): Updated.
939 * configure, config.in: Regenerated.
941 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
943 * remote-utils.c (prepare_resume_reply): Move declaration
944 of gdb_id_from_wait to the top of the block.
946 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
948 * linux-low.c (regsets_store_inferior_registers): Read the regset
949 from the target before filling it.
951 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
953 * server.c (attach_inferior): Return SIGTRAP for a successful
956 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
958 * Makefile.in (OBS): Add version.o.
959 (STAGESTUFF): Delete.
960 (version.o): Add dependencies.
961 (version.c): Replace rule.
962 (clean): Remove version.c.
963 * server.c (gdbserver_version): New.
964 (gdbserver_usage): Use printf.
965 (main): Handle --version and --help.
966 * server.h (version, host_name): Add declarations.
968 2005-12-23 Eli Zaretskii <eliz@gnu.org>
980 * linux-x86-64-low.c:
992 * linux-crisv32-low.c:
1004 * gdbserver.1: Add (C) after Copyright. Update the FSF
1007 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1009 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1010 (arm_breakpoint_at): Recognize both breakpoints.
1011 (the_low_target): Use the correct breakpoint instruction.
1013 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1015 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1016 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1017 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1018 (the_low_target): Update.
1020 2005-10-25 Andreas Schwab <schwab@suse.de>
1022 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1024 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1025 (ia64_num_regs): Reduce to 462.
1027 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1029 * acinclude.m4: Correct quoting.
1030 * aclocal.m4: Regenerated.
1032 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1033 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1034 (thread_db_init): Call thread_db_err_str.
1035 * configure.ac: Check for TD_VERSION.
1036 * config.in, configure: Regenerated.
1038 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1040 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1042 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1044 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1045 is not available. Define HAVE_PTRACE_GETREGS if it is.
1046 * config.in, configure: Regenerated.
1047 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1048 * linux-i386-low.c, linux-m68k-low.c: Update to use
1049 HAVE_PTRACE_GETREGS.
1050 * linux-low.c (regsets_fetch_inferior_registers)
1051 (regsets_store_inferior_registers): Only return 0 if we processed
1053 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1054 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1056 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1058 * inferiors.c (struct thread_info): Add gdb_id.
1059 (add_thread): Add gdb_id argument.
1060 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1061 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1062 calls to add_thread.
1063 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1064 * server.c (handle_query): Use thread_to_gdb_id.
1065 (handle_v_cont, main): Use gdb_id_to_thread_id.
1066 * server.h (add_thread): Update prototype.
1067 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1070 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1072 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1073 left-padded registers.
1074 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1075 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1077 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1079 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1080 * configure: Regenerate.
1081 * config.in: Regenerate.
1082 * server.h (NEED_DECLARATION_STRERROR):
1083 Replace with !HAVE_DECL_STRERROR.
1085 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1087 * linux-low.c (linux_wait, linux_send_signal): Don't test
1088 an unsigned long variable for > 0 if it could be MAX_ULONG.
1089 * server.c (myresume): Likewise.
1090 * target.c (set_desired_inferior): Likewise.
1092 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1094 * configure.ac: Simplify and improve check for socklen_t.
1095 * configure, config.in: Regenerate.
1097 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1099 * acconfig.h: Remove.
1100 * configure.ac: Add a test for socklen_t. Use three-argument
1101 AC_DEFINE throughout.
1102 * config.in: Regenerated using autoheader 2.59.
1103 * configure: Regenerated.
1105 * gdbreplay.c (socklen_t): Provide a default.
1106 (remote_open): Use socklen_t.
1107 * remote-utils.c (socklen_t): Provide a default.
1108 (remote_open): Use socklen_t.
1109 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1112 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1114 * linux-low.c (linux_read_memory, linux_write_memory)
1115 (linux_read_auxv): Likewise.
1116 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1117 (check_mem_write): Likewise.
1118 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1120 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1121 (registers_from_string, register_data): Likewise.
1122 * server.c (handle_query, main): Likewise.
1123 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1124 (decode_M_packet): Likewise.
1125 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1126 * target.h (struct target_ops): Update read_memory, write_memory,
1128 (read_inferior_memory, write_inferior_memory): Update.
1129 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1131 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1132 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1133 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1134 linux-s390-low.c, linux-sh-low.c: Update for changes in
1135 read_inferior_memory and the_low_target->breakpoint.
1137 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1139 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1140 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1141 * configure.srv: Add powerpc64-*-linux*.
1142 * linux-ppc64-low.c: New file.
1144 2005-05-23 Orjan Friberg <orjanf@axis.com>
1146 * linux-cris-low.c: New file with support for CRIS.
1147 * linux-crisv32-low.c: Ditto for CRISv32.
1148 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1149 (clean): Add reg-cris.c and reg-crisv32.c.
1150 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1151 reg-crisv32.o, and reg-crisv32.c to make rules.
1152 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1155 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1157 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1158 of sizeof (PTRACE_XFER_TYPE).
1159 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1161 2005-05-12 Orjan Friberg <orjanf@axis.com>
1163 * target.h (struct target_ops): Add insert_watchpoint,
1164 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1165 pointers for hardware watchpoint support.
1166 * linux-low.h (struct linux_target_ops): Ditto.
1167 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1168 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1169 to linux_target_ops.
1170 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1172 * server.c (main): Recognize 'Z' and 'z' packets.
1174 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1176 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1177 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1178 (the_low_target): Add new members.
1180 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1182 * proc-service.c (ps_lgetregs): Search all_processes instead of
1185 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1187 * server.c (start_inferior): Change return type to int.
1188 (attach_inferior): Change sigptr to int *.
1189 (handle_v_cont, handle_v_requests): Change signal to int *.
1190 (main): Change signal to int.
1192 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1194 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1195 * configure.srv: Add m32r*-*-linux*.
1196 * linux-m32r-low.c: New file.
1198 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1200 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1202 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1204 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1205 Take unsigned long arguments for PIDs.
1206 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1207 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1208 (wait_for_sigstop, linux_resume_one_process)
1209 (regsets_fetch_inferior_registers, linux_send_signal)
1210 (linux_read_auxv): Likewise. Update the types of variables holding
1211 PIDs. Update format string specifiers.
1212 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1213 * remote-utils.c (prepare_resume_reply): Likewise.
1214 * server.c (cont_thread, general_thread, step_thread)
1215 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1217 (handle_query): Update format specifiers.
1218 (handle_v_cont, main): Use strtoul for thread IDs.
1219 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1220 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1221 (general_thread, step_thread, thread_from_wait)
1222 (old_thread_from_wait): Update.
1223 * target.h (struct thread_resume): Use unsigned long for THREAD.
1224 (struct target_ops): Use unsigned long for arguments to attach and
1227 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1229 * acinclude.m4: Include bfd/bfd.m4 directly.
1230 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1231 <agriffis@toolchain.org>.
1232 * aclocal.m4, configure: Regenerated.
1234 2005-01-07 Andrew Cagney <cagney@gnu.org>
1236 * configure.ac: Rename configure.in, require autoconf 2.59.
1237 * configure: Re-generate.
1239 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1241 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1243 * aclocal.m4: Regenerated.
1244 * configure: Regenerated.
1246 2004-11-21 Andreas Schwab <schwab@suse.de>
1248 * linux-m68k-low.c (m68k_num_gregs): Define.
1249 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1250 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1251 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1252 (m68k_breakpoint_at): New. Add to the_low_target.
1254 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1255 srv_linux_thread_db to yes.
1257 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1259 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1260 (ARCH_SET_FS): Likewise.
1261 (ARCH_GET_FS): Likewise.
1262 (ARCH_GET_GS): Likewise.
1264 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1266 * linux-i386-low.c (ps_get_thread_area): New.
1267 * linux-x86-64-low.c (ps_get_thread_area): New.
1268 * linux-low.c: Include <sys/syscall.h>.
1269 (linux_kill_one_process): Don't kill the first thread here.
1270 (linux_kill): Kill the first thread here.
1271 (kill_lwp): New function.
1272 (send_sigstop, linux_send_signal): Use it.
1273 * proc-service.c: Clean up #ifdefs.
1274 (fpregset_info): Delete.
1275 (ps_lgetregs): Update and enable implementation.
1276 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1278 * remote-utils.c (struct sym_cache, symbol_cache): New.
1279 (input_interrupt): Print a clearer message.
1280 (async_io_enabled): New variable.
1281 (enable_async_io, disable_async_io): Use it. Update comments.
1282 (look_up_one_symbol): Use the symbol cache.
1283 * thread-db.c (thread_db_look_up_symbols): New function.
1284 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1286 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1288 * configure.in: Test for -rdynamic.
1289 * configure: Regenerated.
1290 * Makefile (INTERNAL_LDFLAGS): New.
1291 (gdbserver, gdbreplay): Use it.
1293 2004-09-02 Andrew Cagney <cagney@gnu.org>
1295 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1297 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1299 * linux-low.c (linux_wait): Clear all_processes list also.
1301 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1303 * linux-low.c: Include <errno.h>. Remove extern declaration of
1306 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1308 * gdbreplay.c, server.h, utils.c: Update copyright years.
1310 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1312 * server.c (main): Print child status or termination signal from
1313 variable 'signal', not 'sig'.
1315 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1317 * linux-low.c (linux_read_memory): Change return type to
1318 int. Check for and return error from ptrace().
1319 * target.c (read_inferior_memory): Change return type to int. Pass
1320 back return status from the_target->read_memory().
1321 * target.h (struct target_ops): Adapt *read_memory() prototype.
1323 (read_inferior_memory): Adapt prototype.
1324 * server.c (main): Return an error packet if
1325 read_inferior_memory() returns an error.
1327 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1329 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1330 Unify with other clean targets.
1332 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1334 * server.c (handle_v_cont): Call set_desired_inferior.
1336 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1338 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1340 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1342 * linux-low.c (linux_wait): Unblock async I/O.
1343 (linux_resume): Block and enable async I/O.
1344 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1345 * server.h (block_async_io, unblock_async_io): Add prototypes.
1347 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1349 * remote-utils.c (remote_open): Print a status notice after
1351 * server.c (attach_inferior): Print a status notice after
1354 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1356 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1358 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1360 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1362 * server.c, target.h: Update copyright years.
1364 2004-02-25 Roland McGrath <roland@redhat.com>
1366 * target.h (struct target_ops): New member `read_auxv'.
1367 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1368 * linux-low.c (linux_read_auxv): New function.
1369 (linux_target_ops): Initialize `read_auxv' member to that.
1371 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1373 Committed by Jim Blandy <jimb@redhat.com>.
1375 * linux-s390-low.c (s390_num_regs): Update.
1376 (s390_regmap): Remove control registers. Use __s390x__ predefine
1377 instead of GPR_SIZE to distiguish s390 and s390x targets.
1379 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1381 * linux-low.c: Update copyright year.
1382 (check_removed_breakpoint): Clear pending_is_breakpoint.
1383 (linux_set_resume_request, linux_queue_one_thread)
1384 (resume_status_pending_p): New functions.
1385 (linux_continue_one_thread): Use process->resume.
1386 (linux_resume): Only resume threads if there are no pending events.
1387 * linux-low.h (struct process_info): Add resume request
1390 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1392 * regcache.c (new_register_cache): Clear the allocated register
1393 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1395 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1397 * linux-low.c (linux_resume): Take a struct thread_resume *
1399 (linux_wait): Update call.
1400 (resume_ptr): New static variable.
1401 (linux_continue_one_thread): Renamed from
1402 linux_continue_one_process. Use resume_ptr.
1403 (linux_resume): Use linux_continue_one_thread.
1404 * server.c (handle_v_cont, handle_v_requests): New functions.
1405 (myresume): New function.
1406 (main): Handle 'v' case.
1407 * target.h (struct thread_resume): New type.
1408 (struct target_ops): Change argument of "resume" to struct
1410 (myresume): Delete macro.
1412 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1414 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1415 (uninstall): Support DESTDIR.
1417 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1419 * configure.srv: Add xscale*linux copy of arm*linux entry.
1421 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1423 * linux-arm-low.c (arm_reinsert_addr): New function.
1424 (the_low_target): Add arm_reinsert_addr.
1426 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1428 * mem-break.c: Remove whitespace at end of file.
1430 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1432 * configure.in: Check whether we need to prototype strerror.
1433 * server.h: Optionally prototype strerror.
1434 * gdbreplay.c (perror_with_name): Use strerror.
1435 * linux-low.c (linux_attach_lwp): Use strerror.
1436 * utils.c (perror_with_name): Use strerror.
1437 * config.in, configure: Regenerated.
1439 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1441 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1442 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1444 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1446 * Makefile.in (SFILES): Update.
1447 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1448 low-sun3.c: Remove files.
1450 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1452 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1453 (linux_detach_one_process, linux_detach): New functions.
1454 (linux_target_ops): Add linux_detach.
1455 * server.c (main): Handle 'D' packet.
1456 * target.h (struct target_ops): Add "detach" member.
1457 (detach_inferior): Define.
1459 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1461 From Kelley Cook <kelleycook@wideopenwest.com>:
1462 * configure.srv: Accept i[34567]86 variants.
1464 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1466 * linux-low.c (linux_wait_for_event): Correct comment typos.
1467 (linux_resume_one_process): Call check_removed_breakpoint.
1468 (linux_send_signal): New function.
1469 (linux_target_ops): Add linux_send_signal.
1470 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1472 * target.h (struct target_ops): Add send_signal.
1474 2003-05-29 Jim Blandy <jimb@redhat.com>
1476 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1477 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1478 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1479 away part of the register's value.
1481 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1483 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1484 (linux_wait_for_event, linux_init_signals): Likewise.
1486 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1488 * configure.in: Check for stdlib.h.
1489 * configure: Regenerated.
1490 * config.in: Regenerated.
1492 2003-01-04 Andreas Schwab <schwab@suse.de>
1494 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1496 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1498 * Makefile.in: Remove obsolete code.
1500 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1502 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1503 defined(PT_FPR0_HI).
1505 2002-11-17 Stuart Hughes <seh@zee2.com>
1507 * linux-arm-low.c (arm_num_regs): Increase.
1508 (arm_regmap): Include status register.
1510 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1512 * linux-low.c (register_addr): Remove incorrect -1 check.
1514 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1516 * linux-low.c (linux_create_inferior): Call setpgid. Return
1518 (unstopped_p, linux_signal_pid): Remove.
1519 (linux_target_ops): Remove linux_signal_pid.
1520 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1521 global instead of target method.
1522 * target.h (struct target_ops): Remove signal_pid. Update comment
1523 for create_inferior.
1524 * server.c (signal_pid): New variable.
1525 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1526 gdbserver. Set the child to be the foreground process group.
1527 (attach_inferior): Set signal_pid.
1529 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1531 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1533 2002-08-20 Jim Blandy <jimb@redhat.com>
1535 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1538 2002-08-01 Andrew Cagney <cagney@redhat.com>
1540 * Makefile.in: Make chill references obsolete.
1542 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1544 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1545 * configure: Regenerate.
1546 * config.in: Regenerate.
1548 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1550 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1551 (perror_with_name, remote_close, remote_open, expect, play): Static.
1553 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1555 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1556 byte offsets instead of an array of indexes.
1557 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1559 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1561 * regcache.c: Add comment.
1563 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1565 * thread-db.c: New file.
1566 * proc-service.c: New file.
1567 * acinclude.m4: New file.
1568 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1569 proc-service.o, and thread-db.o.
1570 (linux-low.o): Add USE_THREAD_DB.
1571 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1572 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1573 * aclocal.m4: Regenerated.
1574 * config.in: Regenerated.
1575 * configure: Regenerated.
1576 * configure.in: Check for proc_service.h, sys/procfs.h,
1577 thread_db.h, and linux/elf.h headrs.
1578 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1579 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1580 Check for -lthread_db and thread support.
1581 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1582 PowerPC, and SuperH.
1583 * i387-fp.c: Constify arguments.
1584 * i387-fp.h: Likewise.
1585 * inferiors.c: (struct thread_info): Renamed from
1586 `struct inferior_info'. Remove PID member. Use generic inferior
1587 list header. All uses updated.
1588 (inferiors, signal_pid): Removed.
1589 (all_threads): New variable.
1590 (get_thread): Define.
1591 (add_inferior_to_list): New function.
1592 (for_each_inferior): New function.
1593 (change_inferior_id): New function.
1594 (add_inferior): Removed.
1595 (remove_inferior): New function.
1596 (add_thread): New function.
1597 (free_one_thread): New function.
1598 (remove_thread): New function.
1599 (clear_inferiors): Use for_each_inferior and free_one_thread.
1600 (find_inferior): New function.
1601 (find_inferior_id): New function.
1602 (inferior_target_data): Update argument type.
1603 (set_inferior_target_data): Likewise.
1604 (inferior_regcache_data): Likewise.
1605 (set_inferior_regcache_data): Likewise.
1606 * linux-low.c (linux_bp_reinsert): Remove.
1607 (all_processes, stopping_threads, using_thrads)
1608 (struct pending_signals, debug_threads, pid_of): New.
1609 (inferior_pid): Replace with macro.
1610 (struct inferior_linux_data): Remove.
1611 (get_stop_pc, add_process): New functions.
1612 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1613 Use add_process and add_thread.
1614 (linux_attach_lwp): New function, based on old linux_attach. Use
1615 add_process and add_thread. Set stop_expected for new threads.
1616 (linux_attach): New function.
1617 (linux_kill_one_process): New function.
1618 (linux_kill): Kill all LWPs.
1619 (linux_thread_alive): Use find_inferior_id.
1620 (check_removed_breakpoints, status_pending_p): New functions.
1621 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1622 Update. Use WNOHANG. Wait for cloned processes also. Update process
1623 struct for the found process.
1624 (linux_wait_for_event): New function.
1625 (linux_wait): Use it. Support LWPs.
1626 (send_sigstop, wait_for_sigstop, stop_all_processes)
1627 (linux_resume_one_process, linux_continue_one_process): New functions.
1628 (linux_resume): Support LWPs.
1629 (REGISTER_RAW_SIZE): Remove.
1630 (fetch_register): Use register_size instead. Call supply_register.
1631 (usr_store_inferior_registers): Likewise. Call collect_register.
1633 (regsets_fetch_inferior_registers): Improve error message.
1634 (regsets_store_inferior_registers): Add debugging.
1635 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1636 (unstopped_p, linux_signal_pid): New functions.
1637 (linux_target_ops): Add linux_signal_pid.
1638 (linux_init_signals): New function.
1639 (initialize_low): Call it. Initialize using_threads.
1640 * regcache.c (inferior_regcache_data): Add valid
1642 (get_regcache): Fetch registers lazily. Add fetch argument
1643 and update all callers.
1644 (regcache_invalidate_one, regcache_invalidate): New
1646 (new_register_cache): Renamed from create_register_cache.
1647 Return the new regcache.
1648 (free_register_cache): Change argument to a void *.
1649 (registers_to_string, registers_from_string): Call get_regcache
1650 with fetch flag set.
1651 (register_data): Make static. Pass fetch flag to get_regcache.
1652 (supply_register): Call get_regcache with fetch flag clear.
1653 (collect_register): Call get_regcache with fetch flag set.
1654 (collect_register_as_string): New function.
1655 * regcache.h: Update.
1656 * remote-utils.c (putpkt): Flush after debug output and use
1658 Handle input interrupts while waiting for an ACK.
1659 (input_interrupt): Use signal_pid method.
1660 (getpkt): Flush after debug output and use stderr.
1661 (outreg): Use collect_register_as_string.
1662 (new_thread_notify, dead_thread_notify): New functions.
1663 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1665 (look_up_one_symbol): Flush after debug output.
1666 * server.c (step_thread, server_waiting): New variables.
1667 (start_inferior): Don't use signal_pid. Update call to mywait.
1668 (attach_inferior): Update call to mywait.
1669 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1670 (main): Don't fetch/store registers explicitly. Use
1671 set_desired_inferior. Support proposed ``Hs'' packet. Update
1674 (struct inferior_list, struct_inferior_list_entry): New.
1675 * target.c (set_desired_inferior): New.
1676 (write_inferior_memory): Constify.
1677 (mywait): New function.
1679 (struct target_ops): New signal_pid method.
1680 (mywait): Removed macro, added prototype.
1682 * linux-low.h (regset_func): Removed.
1683 (regset_fill_func, regset_store_func): New.
1684 (enum regset_type): New.
1685 (struct regset_info): Add type field. Use new operation types.
1686 (struct linux_target_ops): stop_pc renamed to get_pc.
1687 Add decr_pc_after_break and breakpoint_at.
1688 (get_process, get_thread_proess, get_process_thread)
1689 (strut process_info, all_processes, linux_attach_lwp)
1690 (thread_db_init): New.
1692 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1693 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1694 (the_low_target): Add new members.
1695 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1696 (i386_store_fpxregset): Constify.
1697 (target_regsets): Add new kind identifier.
1698 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1699 (i386_set_pc): Add debugging.
1700 (i386_breakpoint_at): New function.
1701 (the_low_target): Add new members.
1702 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1703 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1704 (mips_breakpoint_at): New.
1705 (the_low_target): Add new members.
1706 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1707 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1708 (the_low_target): Add new members.
1709 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1710 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1711 (the_low_target): Add new members.
1712 * linux-x86-64-low.c (target_regsets): Add new kind
1715 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1717 From Martin Pool <mbp@samba.org>:
1718 * server.c (gdbserver_usage): New function.
1721 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1723 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1726 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1728 * Makefile.in: Remove obsolete code.
1730 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1732 * linux-low.c (regsets_fetch_inferior_registers),
1733 (regsets_store_inferior_registers): Removed cast to int from
1735 * regcache.h: Added declaration of struct inferior_info.
1737 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1739 * inferiors.c (struct inferior_info): Add regcache_data.
1740 (add_inferior): Call create_register_cache.
1741 (clear_inferiors): Call free_register_cache.
1742 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1743 * regcache.c (struct inferior_regcache_data): New.
1744 (registers): Remove.
1745 (get_regcache): New function.
1746 (create_register_cache, free_register_cache): New functions.
1747 (set_register_cache): Don't initialize the register cache here.
1748 (registers_to_string, registers_from_string, register_data): Call
1750 * regcache.h: Add prototypes.
1751 * server.h: Likewise.
1753 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1755 * mem-break.c: New file.
1756 * mem-break.h: New file.
1757 * Makefile.in: Add mem-break.o rule; update server.h
1759 * inferiors.c (struct inferior_info): Add target_data
1761 (clear_inferiors): Free target_data member if set.
1762 (inferior_target_data, set_inferior_target_data): New functions.
1763 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1764 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1765 * linux-low.c (linux_bp_reinsert): New variable.
1766 (struct inferior_linux_data): New.
1767 (linux_create_inferior): Use set_inferior_target_data.
1768 (linux_attach): Likewise. Call add_inferior.
1769 (linux_wait_for_one_inferior): New function.
1770 (linux_wait): Call it.
1771 (linux_write_memory): Add const.
1772 (initialize_low): Call set_breakpoint_data.
1773 * linux-low.h (struct linux_target_ops): Add breakpoint
1775 * server.c (attach_inferior): Remove extra add_inferior
1777 * server.h: Include mem-break.h. Update inferior.c
1779 * target.c (read_inferior_memory)
1780 (write_inferior_memory): New functions.
1781 * target.h (read_inferior_memory)
1782 (write_inferior_memory): Change macros to prototypes.
1783 (struct target_ops): Update comments. Add const to write_memory
1786 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1788 * linux-low.c (usr_store_inferior_registers): Support
1789 registers which are allowed to fail to store.
1790 * linux-low.h (linux_target_ops): Likewise.
1791 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1792 (ppc_cannot_store_register): FPSCR may not be storable.
1794 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1796 * server.h: Include <string.h> if HAVE_STRING_H.
1797 * ChangeLog: Correct paths in last ChangeLog entry.
1799 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1801 * linux-low.h: Remove obsolete prototypes.
1802 (struct linux_target_ops): New.
1803 (extern the_low_target): New.
1804 * linux-low.c (num_regs, regmap): Remove declarations.
1805 (register_addr): Use the_low_target explicitly.
1806 (fetch_register): Likewise.
1807 (usr_fetch_inferior_registers): Likewise.
1808 (usr_store_inferior_registers): Likewise.
1809 * linux-arm-low.c (num_regs): Remove.
1810 (arm_num_regs): Define.
1811 (arm_regmap): Renamed from regmap, made static.
1812 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1814 (arm_cannot_store_register): Renamed from cannot_store_register,
1816 (the_low_target): New.
1817 * linux-i386-low.c (num_regs): Remove.
1818 (i386_num_regs): Define.
1819 (i386_regmap): Renamed from regmap, made static.
1820 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1822 (i386_cannot_store_register): Renamed from cannot_store_register,
1824 (the_low_target): New.
1825 * linux-ia64-low.c (num_regs): Remove.
1826 (ia64_num_regs): Define.
1827 (ia64_regmap): Renamed from regmap, made static.
1828 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1830 (ia64_cannot_store_register): Renamed from cannot_store_register,
1832 (the_low_target): New.
1833 * linux-m68k-low.c (num_regs): Remove.
1834 (m68k_num_regs): Define.
1835 (m68k_regmap): Renamed from regmap, made static.
1836 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1838 (m68k_cannot_store_register): Renamed from cannot_store_register,
1840 (the_low_target): New.
1841 * linux-mips-low.c (num_regs): Remove.
1842 (mips_num_regs): Define.
1843 (mips_regmap): Renamed from regmap, made static.
1844 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1846 (mips_cannot_store_register): Renamed from cannot_store_register,
1848 (the_low_target): New.
1849 * linux-ppc-low.c (num_regs): Remove.
1850 (ppc_num_regs): Define.
1851 (ppc_regmap): Renamed from regmap, made static.
1852 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1854 (ppc_cannot_store_register): Renamed from cannot_store_register,
1856 (the_low_target): New.
1857 * linux-s390-low.c (num_regs): Remove.
1858 (s390_num_regs): Define.
1859 (s390_regmap): Renamed from regmap, made static.
1860 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1862 (s390_cannot_store_register): Renamed from cannot_store_register,
1864 (the_low_target): New.
1865 * linux-sh-low.c (num_regs): Remove.
1866 (sh_num_regs): Define.
1867 (sh_regmap): Renamed from regmap, made static.
1868 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1870 (sh_cannot_store_register): Renamed from cannot_store_register,
1872 (the_low_target): New.
1873 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1874 (the_low_target): New.
1876 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1878 * Makefile.in: Add stamp-h target.
1879 * configure.in: Create stamp-h.
1880 * configure: Regenerated.
1882 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1884 * inferiors.c: New file.
1885 * target.c: New file.
1886 * target.h: New file.
1887 * Makefile.in: Add target.o and inferiors.o. Update
1889 * linux-low.c (inferior_pid): New static variable,
1890 moved from server.c.
1891 (linux_create_inferior): Renamed from create_inferior.
1892 Call add_inferior. Return 0 on success instead of a PID.
1893 (linux_attach): Renamed from myattach.
1894 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1895 (linux_thread_alive): Renamed from mythread_alive.
1896 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1898 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1899 (regsets_store_inferior_registers): Correct error message.
1900 Add missing ``return 0''.
1901 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1902 (linux_store_registers): Renamed from store_inferior_registers.
1903 (linux_read_memory): Renamed from read_inferior_memory.
1904 (linux_write_memory): Renamed from write_inferior_memory.
1905 (linux_target_ops): New structure.
1906 (initialize_low): Call set_target_ops ().
1907 * remote-utils.c (unhexify): New function.
1908 (hexify): New function.
1909 (input_interrupt): Send signals to ``signal_pid''.
1910 * server.c (inferior_pid): Remove.
1911 (start_inferior): Update create_inferior call.
1912 (attach_inferior): Call add_inferior.
1913 (handle_query): New function.
1914 (main): Call handle_query for `q' packets.
1915 * server.h: Include "target.h". Remove obsolete prototypes.
1916 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1918 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1920 * Makefile.in: Add WARN_CFLAGS. Update configury
1922 * configure.in: Check for <string.h>
1923 * configure: Regenerate.
1924 * config.in: Regenerate.
1925 * gdbreplay.c: Include needed system headers.
1926 (remote_open): Remove strchr prototype.
1927 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1928 * regcache.c (supply_register): Change buf argument to const void *.
1929 (supply_register_by_name): Likewise.
1930 (collect_register): Change buf argument to void *.
1931 (collect_register_by_name): Likewise.
1932 * regcache.h: Add missing prototypes.
1933 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1934 * server.c (handle_query): New function.
1935 (attached): New static variable, moved out of main.
1936 (main): Quiet longjmp clobber warnings.
1937 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1938 * utils.c (error): Remove NORETURN.