1 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3 * win32-low.c (do_initial_child_stuff): Add process handle
4 parameter. Set current_process_handle and current_process_id from the
5 parameters. Clear globals.
6 (win32_create_inferior): Don't set current_process_handle and
7 current_process_id here. Instead pass them on the call to
8 do_initial_child_stuff.
9 (win32_attach): Likewise.
10 (win32_clear_inferiors): New.
11 (win32_kill): Don't close the current process handle or the
12 current thread handle here. Instead call win32_clear_inferiors.
13 (win32_detach): Don't open a new handle to the process. Call
14 win32_clear_inferiors.
15 (win32_join): Don't rely on current_process_handle; open a new
16 handle using the process id.
17 (win32_wait): Call win32_clear_inferiors when the inferior process
20 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
22 * server.c (monitor_show_help): Add "exit".
24 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
26 * Makefile.in (SFILES): Add linux-xtensa-low.c.
27 (clean): Add reg-xtensa.c.
28 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
29 * configure.srv (xtensa*-*-linux*) New target.
30 * linux-xtensa-low.c: New.
31 * xtensa-xtregs.c: New.
33 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
35 * hostio.c: Don't include errno.h.
36 (errno_to_fileio_errno): Move to hostio-errno.
37 * hostio.c: (hostio_error): Remove the error parameter. Defer the
38 error number outputting to the target->hostio_last_error callback.
39 (hostio_packet_error): Use FILEIO_EINVAL directly.
40 (handle_open, handle_pread, hostio_error, handle_unlink): Update
41 calls to hostio_error.
42 * hostio-errno.c: New.
43 * server.h (hostio_last_error_from_errno): Declare.
44 * target.h (target_ops): Add hostio_last_error member.
45 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
46 as hostio_last_error handler.
47 * spu-low.c (spu_target_ops): Likewise.
48 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
49 (wince_hostio_last_error): New functions.
50 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
51 as hostio_last_error handler.
52 (win32_target_ops) [!_WIN32_WCE]: Register
53 hostio_last_error_from_errno as hostio_last_error handler.
54 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
55 (hostio-errno.o): New rule.
56 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
57 * configure.srv (srv_hostio_err_objs): New variable. Default to
59 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
60 * configure: Regenerate.
62 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
64 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
65 (linux_kill, linux_detach): Clean up the process list.
66 * remote-utils.c (remote_open): Improve port number parsing.
67 (putpkt_binary, input_interrupt): Only send interrupts if the target
69 * server.c (extended_protocol): Make static.
70 (attached): Define earlier.
71 (exit_requested, response_needed, program_argv): New variables.
72 (target_running): New.
73 (start_inferior): Clear attached here.
74 (attach_inferior): Set attached here.
75 (require_running): Define.
76 (handle_query): Use require_running and target_running. Implement
78 (handle_v_attach, handle_v_run): New.
79 (handle_v_requests): Use require_running. Handle vAttach and vRun.
80 (gdbserver_usage): Update.
81 (main): Redo argument parsing. Handle --debug and --multi. Handle
82 --attach along with other options or after the port. Save
83 program_argv. Support no initial program. Resynchronize
84 communication with GDB after an error. Handle "monitor exit".
85 Use require_running and target_running. Always allow the extended
86 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
87 restart in extended mode.
88 * README: Refer to the GDB manual. Update --attach usage.
90 2007-12-20 Andreas Schwab <schwab@suse.de>
92 * linux-low.c (STACK_SIZE): Define.
93 (linux_tracefork_child): Use it. Use __clone2 on ia64.
94 (linux_test_for_tracefork): Likewise.
96 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
98 * linux-low.c (linux_wait_for_event): Update messages. Do not
99 reinsert auto-delete breakpoints.
100 * mem-break.c (struct breakpoint): Change return type of handler to
102 (set_breakpoint_at): Update handler type.
103 (reinsert_breakpoint_handler): Return 1 instead of calling
105 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
107 (check_breakpoints): Delete auto-delete breakpoints and return 2.
108 * mem-break.h (set_breakpoint_at): Update handler type.
109 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
110 * win32-low.c (auto_delete_breakpoint): New.
111 (get_child_debug_event): Use it.
113 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
115 * configure.ac: Check for pread and pwrite.
116 * hostio.c (handle_pread): Fall back to lseek and read.
117 (handle_pwrite): Fall back to lseek and write.
118 * config.in, configure: Regenerated.
120 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
122 * server.c (myresume): Add own_buf argument.
123 (main): Update calls.
125 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
127 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
128 * remote-utils.c (remote_open): Do not call disable_async_io.
129 (block_async_io): Delete.
130 (unblock_async_io): Make static.
131 (initialize_async_io): New.
132 * server.c (handle_v_cont): Handle async I/O here.
133 (myresume): Likewise. Move other common resume tasks here...
134 (main): ... from here. Call initialize_async_io. Disable async
135 I/O before the main loop.
136 * server.h (initialize_async_io): Declare.
137 (block_async_io, unblock_async_io): Delete prototypes.
138 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
140 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
142 * remote-utils.c (readchar): Allow binary data in received messages.
144 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
146 * win32-low.c (attaching): New global.
147 (win32_create_inferior): Clear the `attaching' global.
148 (win32_attach): Set the `attaching' global.
149 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
150 attaching. Only set a breakpoint at the entry point if not
153 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
155 * server.c (main): Don't report dll events on the initial
156 connection on attaches.
158 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
160 * server.c (main): Relax numerical bases supported for the pid of
161 the --attach command line argument.
163 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
165 * win32-low.c (win32_attach): Call OpenProcess before
166 DebugActiveProcess, not after. Add last error output to error
169 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
171 * win32-low.c (win32_get_thread_context)
172 (win32_set_thread_context): New functions.
173 (thread_rec): Use win32_get_thread_context.
174 (continue_one_thread, win32_resume): Use win32_set_thread_context.
175 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
179 Pedro Alves <pedro_alves@portugalmail.pt>
181 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
183 (child_add_thread): Minor cleanup.
184 (child_continue): Resume artificially suspended threads before
185 calling ContinueDebugEvent.
186 (suspend_one_thread): New.
187 (fake_breakpoint_event): New.
188 (get_child_debug_event): Change return type to int. Check here if
189 gdb sent an interrupt request. If a soft interrupt was requested,
190 fake a breakpoint event. Return 0 if there is no event to handle,
192 (win32_wait): Don't check here if gdb sent an interrupt request.
193 Ensure there is a valid event to handle.
194 (win32_request_interrupt): Add soft interruption method as last
198 Pedro Alves <pedro_alves@portugalmail.pt>
200 * win32-low.h (win32_thread_info): Add descriptions to the
201 structure members. Replace `suspend_count' counter by a
203 * win32-low.c (thread_rec): Update condition of when to get the
204 context from the inferior. Rely on ContextFlags being set if it
205 has already been retrieved. Only suspend the inferior thread if
206 we haven't already. Warn if that fails.
207 (continue_one_thread): s/suspend_count/suspended/. Only call
208 ResumeThread once. Warn if that fails.
210 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
212 * win32-low.c (win32_wait): Don't read from the inferior when it
215 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
217 * Makefile.in (win32_low_h): New variable.
218 (win32-low.o): Add dependency on $(win32_low_h).
219 (win32-arm-low.o, win32-i386-low.o): New rules.
221 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
223 * hostio.c: Correct copyright year.
225 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
227 * Makefile.in (OBS): Add hostio.o.
228 (hostio.o): New rule.
229 * server.h (handle_vFile): Declare.
230 * hostio.c: New file.
231 * server.c (handle_v_requests): Take packet_len and new_packet_len
232 for binary packets. Call handle_vFile.
233 (main): Update call to handle_v_requests.
235 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
237 * linux-low.c: Include <sched.h>.
239 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
241 * linux-low.c (linux_tracefork_grandchild): New.
242 (linux_tracefork_child): Use clone.
243 (linux_test_for_tracefork): Use clone; allocate and free a stack.
245 2007-10-31 Joel Brobecker <brobecker@adacore.com>
247 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
249 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
251 * linux-low.c (handle_extended_wait): Handle unexpected signals.
253 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
255 * inferiors.c (change_inferior_id): Delete.
256 (add_pid_to_list, pull_pid_from_list): New.
257 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
258 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
259 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
260 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
261 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
262 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
263 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
264 (using_threads): Always set to 1.
265 (handle_extended_wait): New.
266 (add_process): Do not set TID.
267 (linux_create_inferior): Set must_set_ptrace_flags.
268 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
269 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
270 (linux_thread_alive): Rename TID argument to LWPID.
271 (linux_wait_for_process): Handle unknown processes. Do not use TID.
272 (linux_wait_for_event): Do not use TID or check using_threads. Update
273 call to dead_thread_notify. Call handle_extended_wait.
274 (linux_create_inferior): Use PTRACE_SETOPTIONS.
275 (send_sigstop): Delete sigstop_sent.
276 (wait_for_sigstop): Avoid TID.
277 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
278 (linux_test_for_tracefork): New.
279 (linux_lookup_signals): Use thread_db_active and
280 linux_supports_tracefork_flag.
281 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
282 * linux-low.h (get_process_thread): Avoid TID.
283 (struct process_ifo): Move thread_known and tid to the end. Remove
285 (linux_attach_lwp, thread_db_init): Update prototypes.
286 * server.h (change_inferior_id): Delete prototype.
287 (add_pid_to_list, pull_pid_from_list): New prototypes.
288 * thread-db.c (thread_db_use_events): New.
289 (find_first_thread): Rename to...
290 (find_one_thread): ...this. Update callers and messages. Do not
291 call fatal. Check thread_db_use_events. Do not call
292 change_inferior_id or new_thread_notify.
293 (maybe_attach_thread): Update. Do not call new_thread_notify.
294 (thread_db_init): Set thread_db_use_events. Check use_events.
295 * utils.c (fatal, warning): Correct message prefix.
297 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
299 * Makefile.in (clean): Remove new files.
300 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
301 (powerpc-64.o, powerpc-64.c): New rules.
302 * configure.srv: Use alternate register sets for powerpc64-*-linux*
303 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
305 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
307 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
308 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
309 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
310 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
311 (target_regsets): Add AltiVec and SPE register sets.
312 * configure.ac: Check for AltiVec and SPE.
313 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
314 (ppc_fill_vrregset, ppc_store_vrregset): New.
315 (target_regsets): Add AltiVec register set.
316 * configure: Regenerated.
318 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
320 * linux-low.c (O_LARGEFILE): Define.
321 (linux_read_memory): Use /proc/PID/mem.
322 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
323 * configure, config.in: Regenerated.
325 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
327 * linux-low.c (linux_wait_for_event): Do not pass signals while
330 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
332 * win32-low.c (create_process): New.
333 (win32_create_inferior): Use create_process instead of
334 CreateProcess. If create_process failed retry appending an ".exe"
335 suffix. Store the GetLastError result immediatelly after
336 create_process calls and use it on the call to error.
338 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
340 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
342 2007-08-23 Joel Brobecker <brobecker@adacore.com>
344 * configure.ac: Switch license to GPLv3.
346 2007-08-01 Michael Snyder <msnyder@access-company.com>
348 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
350 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
352 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
354 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
355 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
356 CloseToolhelp32Snapshot.
357 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
358 CloseToolhelp32Snapshot.
360 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
362 * server.c (main): Check for inferior exit before main loop.
364 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
366 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
367 instead of on tmp_desc.
369 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
370 Daniel Jacobowitz <dan@codesourcery.com>
372 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
373 (add_thread): Minor cleanups.
374 (clear_inferiors): Move lower in the file. Clear the DLL
376 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
377 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
378 (xml_escape_text): New.
379 * server.c (handle_query): Handle qXfer:libraries:read. Report it
381 (handle_v_cont): Report errors.
382 (gdbserver_version): Update.
383 (main): Correct size of own_buf. Do not report initial DLL events.
384 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
385 (unloaded_dll, xml_escape_text): New.
386 * win32-low.c (enum target_waitkind): Update comments.
387 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
388 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
389 (win32_EnumProcessModules, win32_GetModuleInformation)
390 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
391 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
392 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
393 (win32_Module32First, win32_Module32Next, load_toolhelp)
394 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
395 (get_child_debug_event): Handle DLL events.
396 (win32_wait): Likewise.
398 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
400 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
401 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
403 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
405 * win32-low.c (handle_output_debug_string): Ignore event if not
408 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
410 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
412 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
414 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
416 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
418 * inferiors.c (change_inferior_id): Add comment.
419 * linux-low.c (check_removed_breakpoint): Add an early
420 prototype. Improve debug output.
421 (linux_attach): Doc update.
422 (linux_detach_one_process, linux_detach): Clean up before releasing
424 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
425 * linux-low.h (struct process_info): Doc improvement.
426 * mem-break.c (delete_all_breakpoints): New.
427 * mem-break.h (delete_all_breakpoints): New prototype.
428 * thread-db.c (find_first_thread): New.
429 (thread_db_create_event): Call it instead of
430 thread_db_find_new_threads. Clean up unused variables.
431 (maybe_attach_thread): Remove first thread handling.
432 (thread_db_find_new_threads): Use find_first_thread.
433 (thread_db_get_tls_address): Likewise.
435 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
437 * thread-db.c (thread_db_find_new_threads): Add prototype.
438 (thread_db_create_event): Check for the main thread before adding
440 (maybe_attach_thread): Only enable event reporting if TID == 0.
441 (thread_db_get_tls_address): Check for new threads.
443 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
445 * linux-low.c (linux_create_inferior): Try execv before execvp.
446 * spu-low.c (spu_create_inferior): Likewise.
448 2007-06-13 Mike Frysinger <vapier@gentoo.org>
450 * linux-low.c (linux_create_inferior): Change execv to execvp.
451 * spu-low.c (spu_create_inferior): Likewies.
453 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
455 * Makefile.in (clean): Clean new files instead of deleted ones.
456 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
457 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
459 * configure.srv: Specify XML files and new regformats for MIPS and
461 * linux-mips-low.c (mips_num_regs): Set to only used registers.
462 (mips_regmap): Do not fetch $0. Remove unused registers. Add
463 an entry for the restart register.
464 (mips_cannot_fetch_register, mips_cannot_store_register)
465 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
466 register names to match the XML descriptions.
467 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
468 restart register instead of $0.
470 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
471 Markus Deuling <deuling@de.ibm.com>
473 * remote-utils.c (decode_xfer_write): New function.
474 * server.h (decode_xfer_write): Add prototype.
475 * server.c (handle_query): Add PACKET_LEN argument. Support
476 qXfer:spu:read and qXfer:spu:write packets.
477 (main): Pass packet_len to handle_query.
478 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
479 * target.h (target_ops): Add qxfer_spu.
481 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
483 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
484 accessing non-seekable spufs files.
486 2007-05-16 Markus Deuling <deuling@de.ibm.com>
488 * server.c (handle_query): Add reply for qC packet.
490 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
491 Leo Zayas <lerele@champenstudios@com>
493 * server.h (check_remote_input_interrupt_request): New function.
494 * remote_utils.c (INVALID_DESCRIPTOR): New define.
495 (remote_desc): Initialize with INVALID_DESCRIPTOR.
496 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
497 (check_remote_input_interrupt_request): New function.
498 * server.h (check_remote_input_interrupt_request): Declare.
499 * win32-low.c (winapi_DebugBreakProcess,
500 winapi_GenerateConsoleCtrlEvent): New typedefs.
501 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
503 (win32_wait): Check for remote interrupt request
504 with check_remote_input_interrupt_request.
505 (win32_request_interrupt): New function.
506 (win32_target_op): Set request_interrupt to win32_request_interrupt.
508 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
510 * win32-low.c (debug_registers_changed,
511 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
512 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
513 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
514 (thread_rec): Get context using the low target.
515 (child_add_thread): Call thread_added on the low target,
516 which does the same thing.
518 (do_initial_child_stuff): Remove debug registers references.
519 Set context using the low target. Resume threads after
520 setting the contexts.
521 (child_continue): Remove dead variable. Remove debug
522 registers references.
523 (child_fetch_inferior_registers): Go through the low target.
524 (do_child_store_inferior_registers): Remove.
525 (child_store_inferior_registers): Go through the low target.
526 (win32_resume): Remove debug registers references.
527 Set context using the low target.
528 (handle_exception): Change return type to void. Don't record
529 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
530 first chance exception.
531 (get_child_debug_event): Change return type to void. Remove
532 goto loop. Always return after waiting for debug event.
533 (win32_wait): Convert to switch statement. Handle spurious
536 * win32-i386-low.c (debug_registers_changed,
537 debug_registers_used): New.
538 (initial_stuff): Rename to ...
539 (i386_initial_stuff): ... this. Clear debug registers
541 (store_debug_registers): Delete.
542 (i386_get_thread_context): New.
543 (load_debug_registers): Delete.
544 (i386_set_thread_context): New.
545 (i386_thread_added): New.
546 (single_step): Rename to ...
547 (i386_single_step): ... this.
548 (do_fetch_inferior_registers): Rename to ...
549 (i386_fetch_inferior_register): ... this.
550 (i386_store_inferior_register): New.
551 (the_low_target): Adapt to new interface.
553 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
554 (arm_get_thread_context): New.
555 (arm_set_thread_context): New.
557 (do_fetch_inferior_registers): Rename to ...
558 (arm_fetch_inferior_register): ... this.
559 (arm_store_inferior_register): New.
560 (arm_wince_breakpoint): Reimplement as unsigned long.
561 (arm_wince_breakpoint_len): Define.
562 (the_low_target): Adapt to new interface.
564 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
565 load_debug_registers. Add get_thread_context, set_thread_context,
566 thread_added and store_inferior_register. Rename
567 fetch_inferior_registers to fetch_inferior_register.
568 (regptr): Remove declaration.
570 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
572 * linux-low.c (linux_detach): Change return type to int. Return 0.
573 * spu-low.c (spu_detach): Likewise.
575 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
577 * target.h (target_ops): Change return type of detach to int.
579 (join_inferior): New.
580 * server.c (main): Don't skip detach support on mingw32.
581 If the inferior doesn't support detaching return error.
582 Call join_inferior instead of using waitpid.
583 * linux-low.c (linux_join): New.
584 (linux_target_op): Add linux_join.
585 * spu-low.c (spu_join): New.
586 (spu_target_ops): Add spu_join.
587 * win32-low.c (win32_detach): Adapt to new interface.
588 Reopen current_process_handle before detaching. Issue a child
589 resume before detaching.
591 (win32_target_op): Add win32_join.
593 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
595 * win32-low.c (win32-attach): Fix return value.
596 * target.h (target_ops): Describe ATTACH return values.
598 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
600 * win32-low.c (GETPROCADDRESS): Define.
601 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
602 (winapi_DebugSetProcessKillOnExit): Likewise.
603 (win32_create_inferior): Force usage of ansi CreateProcessA.
604 (win32_attach): Use GETPROCADDRESS.
605 (win32_detach): Likewise.
607 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
609 * win32-low.c (win32_wait): Don't use WSTOPSIG.
611 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
613 * win32-low.c: Commit leftover changes from 2007-03-29.
615 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
617 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
618 fields short instead of int. Add explicit padding.
619 (i387_cache_to_fsave): Remove unnecessary casts.
620 (i387_fsave_to_cache): Doc fix.
621 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
623 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
625 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
626 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
628 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
630 * configure.srv (arm*-*-mingw32ce*): Move near the other
633 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
635 * configure.ac: Add errno checking.
636 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
637 sys/file.h and malloc.h.
638 (AC_CHECK_DECLS): Add perror.
639 (srv_mingwce): Handle.
640 * configure.srv (i[34567]86-*-cygwin*): Add
641 win32-i386-low.o to srv_tgtobj.
642 (i[34567]86-*-mingw*): Likewise.
643 (arm*-*-mingw32ce*): Add case.
644 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
645 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
646 [__MINGW32CE__] (strerror): New function.
647 [__MINGW32CE__] (errno): Define to GetLastError.
648 [__MINGW32CE__] (COUNTOF): New macro.
649 (remote_open): Remove extra close call.
650 * mem-break.c (delete_breakpoint_at): New function.
651 * mem-break.h (delete_breakpoint_at): Declare.
652 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
653 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
654 [USE_WIN32API] (read, write): Add char* casts.
655 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
656 * server.h: Include wincecompat.h on Windows CE.
657 [HAVE_ERRNO_H]: Check.
658 (perror): Declare if not declared.
659 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
660 (perror_with_name): Remove errno declaration.
661 * wincecompat.h: New.
662 * wincecompat.c: New.
664 * win32-arm-low.c: New.
665 * win32-i386-low.c: New.
666 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
667 (OUTMSG2): Make it safe.
669 (COUNTOF): New macro.
670 (NUM_REGS): Get it from the low target.
671 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
672 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
673 (thread_rec): Let low target handle debug registers.
674 (child_add_thread): Likewise.
675 (child_init_thread_list): Likewise.
676 (continue_one_thread): Likewise.
678 (do_child_fetch_inferior_registers): Move to ...
679 * win32-i386-low.c: ... here, and rename to ...
680 (do_fetch_inferior_registers): ... this.
681 * win32-low.c (child_fetch_inferior_registers):
682 Go through the low target.
683 (do_child_store_inferior_registers): Use regptr.
684 (strwinerror): New function.
685 (win32_create_inferior): Handle Windows CE.
686 Use strwinerror instead of strerror on Windows error
687 codes. Add program to the error output.
688 Don't close the main thread handle on Windows CE.
689 (win32_attach): Use coredll.dll on Windows CE.
690 (win32_kill): Close current process and current
692 (win32_detach): Use coredll.dll on Windows CE.
693 (win32_resume): Let low target handle debug registers, and
695 (handle_exception): Add/Remove initial breakpoint. Avoid
696 non-existant WSTOPSIG on Windows CE.
697 (win32_read_inferior_memory): Cast to remove warning.
698 (win32_arch_string): Go through the low target.
699 (initialize_low): Call set_breakpoint_data with the low
701 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
702 FOP_REGNUM, mappings): Move to ...
703 * win32-i386-low.c: ... here.
704 * win32-low.c (win32_thread_info): Move to ...
705 * win32-low.h: ... here.
706 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
707 win32-arm-low.c and wincecompat.c.
709 (install-only:): Likewise.
710 (gdbserver:): Likewise.
711 (gdbreplay:): Likewise.
712 * config.in: Regenerate.
713 * configure: Regenerate.
715 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
717 * win32-low.c: Rename typedef thread_info to
718 win32_thread_info throughout.
720 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
722 * win32-i386-low.c: Rename to ...
723 * win32-low.c: ... this.
724 * configure.srv: Replace win32-i386-low.o with win32-low.o.
725 * Makefile.in: Likewise.
727 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
729 * remote-utils.c (monitor_output): Constify msg parameter.
730 * server.h (monitor_output): Likewise.
731 * win32-i386-low.c (handle_output_debug_string): New.
732 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
733 handle_output_debug_string.
734 (get_child_debug_event): Likewise.
736 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
738 * server.c (main): Correct strtoul check.
740 2007-03-27 Jon Ringle <jon@ringle.org>
742 * linux-low.c: Check __ARCH_HAS_MMU__ also.
744 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
746 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
748 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
750 * terminal.h: Check HAVE_SGTTY_H.
752 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
754 * remote-utils.c (remote_open): Print out the assigned port number.
756 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
758 * remote-utils.c (monitor_output): New function.
759 * server.c (debug_threads): Define here.
760 (monitor_show_help): New function.
761 (handle_query): Handle qRcmd.
762 (main): Do not handle 'd' packet.
763 * server.h (debug_threads, remote_debug, monitor_output): Declare.
764 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
767 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
769 * Makefile.in (EXEEXT): New.
770 (clean): Use $(EXEEXT).
772 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
774 * target.h (target_ops): Rename send_signal to request_interrupt,
775 and remove enum target_signal parameter.
776 * linux-low.c (linux_request_interrupt): Rename from
777 linux_send_signal, and always send SIGINT.
778 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
779 and always send SIGINT.
780 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
782 (input_interrupt): Likewise.
784 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
786 * server.c (get_features_xml): Check if target implemented
788 * win32-i386-low.c (win32_arch_string): New.
789 (win32_target_ops): Add win32_arch_string as arch_string member.
791 2007-02-22 Markus Deuling <deuling@de.ibm.com>
793 * spu-low.c (spu_arch_string): New.
794 (spu_target_ops): Add spu_arch_string.
796 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
798 * remote-utils.c: Remove HAVE_TERMINAL_H check.
799 * configure.ac: Do not check for terminal.h.
800 * configure, config.in: Regenerated.
802 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
804 * Makefile.in (OBS): Add $(XML_BUILTIN).
805 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
807 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
808 (arm-with-iwmmxt.c): New.
809 * config.in, configure: Regenerate.
810 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
811 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
812 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
813 (arm*-*-linux*): Add iWMMXt and regset support.
814 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
815 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
816 (arm_store_wmmxregset, target_regsets): New.
817 * server.c (get_features_xml): Take annex argument. Check builtin
819 (handle_query): Handle multiple annexes.
821 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
823 * remote-utils.c [USE_WIN32API] (read, write): Define.
824 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
827 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
829 * linux-i386-low.c (the_low_target): Set arch_string.
830 * linux-x86-64-low.c (the_low_target): Likewise.
831 * linux-low.c (linux_arch_string): New.
832 (linux_target_ops): Add it.
833 * linux-low.h (struct linux_target_ops): Add arch_string.
834 * server.c (write_qxfer_response): Use const void * for DATA.
835 (get_features_xml): New.
836 (handle_query): Handle qXfer:features:read. Report it for qSupported.
837 * target.h (struct target_ops): Add arch_string method.
839 2007-01-03 Denis Pilat <denis.pilat@st.com>
840 Daniel Jacobowitz <dan@codesourcery.com>
842 * linux-low.c (linux_kill): Handle being called with no threads.
843 * win32-i386-low.c (win32_kill): Likewise.
844 (get_child_debug_event): Clear current_process_handle.
846 2006-12-30 Denis PILAT <denis.pilat@st.com>
847 Daniel Jacobowitz <dan@codesourcery.com>
849 * remote-utils.c (remote_open): Check the type of specified
850 serial port devices before opening them.
851 * server.c (main): Kill the inferior if an error occurs during
852 the first remote_open.
854 2006-12-05 Markus Deuling <deuling@de.ibm.com>
856 * README: Update supported targets.
858 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
860 * Makefile.in (clean): Remove reg-mips64.c.
861 (reg-mips64.c, reg-mips64.o): New rules.
862 * configure.srv: Handle mips64. Include regset support for mips.
863 * linux-mips-low.c (union mips_register): New.
864 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
865 (mips_breakpoint, mips_breakpoint_at): Use int.
866 (mips_collect_register, mips_supply_register)
867 (mips_collect_register_32bit, mips_supply_register_32bit)
868 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
869 (mips_store_fpregset, target_regsets): New.
870 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
872 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
874 * configure.srv: Add target "spu*-*-*".
875 * Makefile.in (clean): Remove reg-spu.c.
876 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
877 * spu-low.c: New file.
879 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
881 * configure.ac: Correct td_thr_tls_get_addr test.
882 * configure: Regenerated.
884 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
886 * linux-low.c (linux_wait_for_event): Reformat. Use the
888 * remote-utils.c (decode_address_to_semicolon): New.
889 * server.c (pass_signals, handle_general_set): New.
890 (handle_query): Mention QPassSignals for qSupported.
891 (main): Call handle_general_set.
892 * server.h (pass_signals, decode_address_to_semicolon): New.
894 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
896 * server.c (handle_query): Correct error handling for read_auxv.
898 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
900 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
901 and srv_linux_thread_db to yes.
902 * linux-s390-low.c (s390_fill_gregset): New function.
903 (target_regsets): Define data structure.
905 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
907 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
908 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
909 * config.in, configure: Regenerated.
910 * inferiors.c (gdb_id_to_thread): New function.
911 (gdb_id_to_thread_id): Use it.
912 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
913 * linux-low.h (struct process_info): Add th member.
914 (thread_db_get_tls_address): New prototype.
915 * remote-utils.c (decode_address): Make non-static.
916 * server.c (handle_query): Handle qGetTLSAddr.
917 * server.h (gdb_id_to_thread, decode_address): New prototypes.
918 * target.h (struct target_ops): Add get_tls_address.
919 * thread-db.c (maybe_attach_thread): Save the thread handle.
920 (thread_db_get_tls_address): New.
922 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
924 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
925 (linux_resume_one_process): Take a siginfo_t *. Update all
926 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
927 (struct pending_signals): Add a siginfo_t.
928 (linux_wait_for_process): Always set last_status.
929 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
930 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
931 * linux-low.h (struct process_info): Add last_status.
933 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
935 * remote-utils.c (try_rle): New function.
936 (putpkt_binary): Use it.
938 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
940 * Makefile.in (clean): Clean reg-x86-64-linux.c.
941 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
942 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
943 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
944 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
947 2006-08-08 Richard Sandiford <richard@codesourcery.com>
949 * server.c (terminal_fd): New variable.
950 (old_foreground_pgrp): Likewise.
951 (restore_old_foreground_pgrp): New function.
952 (start_inferior): Record the terminal file descriptor in terminal_fd
953 and its original foreground group in old_foreground_pgrp. Register
954 restore_old_foreground_pgrp with atexit().
956 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
958 * server.c (handle_query): Correct qPart to qXfer.
960 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
962 * configure.ac: Check for more headers which are missing on
963 Windows. Automatically supply -lwsock32 and USE_WIN32API.
964 * configure.srv: Add Cygwin and mingw32.
965 * remote-utils.c: Don't include headers unconditionally which
966 are missing on mingw32. Include <winsock.h> for mingw32.
967 (remote_open): Adjust for mingw32 support. Flush
968 standard error after writing to it.
969 (remote_close, putpkt_binary, input_interrupt, block_async_io)
970 (unblock_async_io, enable_async_io, disable_async_io)
971 (readchar, getpkt): Update for Winsock support.
972 (prepare_resume_reply): Expect a protocol signal number.
973 * server.c: Disable <sys/wait.h> on mingw32.
974 (start_inferior): Adjust for mingw32 support. Flush
975 standard error after writing to it.
976 (attach_inferior): Likewise. Use protocol signal
978 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
980 * win32-i386-low.c: New file.
981 * Makefile.in (XM_CLIBS): Set.
982 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
983 (win32-i386-low.o): New dependency rule.
984 * linux-low.c (linux_wait): Use target signal numbers.
985 * target.h (struct target_ops): Doc fix.
986 * server.h (target_signal_to_name): New prototype.
987 * gdbreplay.c: Don't include headers unconditionally which
988 are missing on mingw32. Include <winsock.h> for mingw32.
989 (remote_close, remote_open): Adjust for Winsock support.
990 * configure, config.in: Regenerated.
992 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
994 * server.c (decode_xfer_read, write_qxfer_response): New.
995 (handle_query): Take a packet length argument. Handle
996 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
997 the qSupported response.
998 (main): Update call to handle_query.
1000 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1002 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1003 (putpkt_binary): Renamed from putpkt and adjusted for binary
1005 (putpkt): New wrapper for putpkt_binary.
1006 (readchar): Don't mask off the high bit.
1007 (decode_X_packet): New function.
1008 * server.c (main): Call putpkt_binary if a handler sets the packet
1009 length. Save the length of the incoming packet. Handle 'X'.
1010 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1012 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1014 * server.c (handle_query): Handle qSupported.
1016 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1018 * remote-utils.c (all_symbols_looked_up): New variable.
1019 (look_up_one_symbol): Check it.
1020 * server.h (look_up_one_symbol): New declaration.
1021 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1023 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1025 * Makefile.in (linux-arm-low.o): Update dependencies.
1026 * linux-arm-low.c: Include "gdb_proc_service.h".
1027 (PTRACE_GET_THREAD_AREA): Define.
1028 (ps_get_thread_area): New function.
1030 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1032 * configure.srv (m68k*-*-uclinux*): New target.
1033 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1034 (linux_resume_one_process): Remove extraneous cast.
1035 (linux_read_offsets): New.
1036 (linux_target_op): Add linux_read_offsets on mmuless systems.
1037 * server.c (handle_query): Add qOffsets logic.
1038 * target.h (struct target_ops): Add read_offsets.
1040 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1042 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1043 (PTRACE_GET_THREAD_AREA): Define.
1044 (ps_get_thread_area): New function.
1045 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1046 (linux-x86-64-low.o): Update.
1048 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1050 * configure.ac: Remove checks for prfpregset_t.
1051 * gdb_proc_service.h: New file.
1052 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1053 new "gdb_proc_service.h".
1054 * proc-service.c: Likewise.
1055 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1056 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1057 * Makefile.in (gdb_proc_service_h): Updated.
1058 * configure, config.in: Regenerated.
1060 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1062 * remote-utils.c (prepare_resume_reply): Move declaration
1063 of gdb_id_from_wait to the top of the block.
1065 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1067 * linux-low.c (regsets_store_inferior_registers): Read the regset
1068 from the target before filling it.
1070 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1072 * server.c (attach_inferior): Return SIGTRAP for a successful
1075 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1077 * Makefile.in (OBS): Add version.o.
1078 (STAGESTUFF): Delete.
1079 (version.o): Add dependencies.
1080 (version.c): Replace rule.
1081 (clean): Remove version.c.
1082 * server.c (gdbserver_version): New.
1083 (gdbserver_usage): Use printf.
1084 (main): Handle --version and --help.
1085 * server.h (version, host_name): Add declarations.
1087 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1099 * linux-x86-64-low.c:
1102 * linux-ppc64-low.c:
1111 * linux-crisv32-low.c:
1123 * gdbserver.1: Add (C) after Copyright. Update the FSF
1126 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1128 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1129 (arm_breakpoint_at): Recognize both breakpoints.
1130 (the_low_target): Use the correct breakpoint instruction.
1132 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1134 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1135 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1136 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1137 (the_low_target): Update.
1139 2005-10-25 Andreas Schwab <schwab@suse.de>
1141 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1143 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1144 (ia64_num_regs): Reduce to 462.
1146 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1148 * acinclude.m4: Correct quoting.
1149 * aclocal.m4: Regenerated.
1151 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1152 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1153 (thread_db_init): Call thread_db_err_str.
1154 * configure.ac: Check for TD_VERSION.
1155 * config.in, configure: Regenerated.
1157 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1159 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1161 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1163 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1164 is not available. Define HAVE_PTRACE_GETREGS if it is.
1165 * config.in, configure: Regenerated.
1166 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1167 * linux-i386-low.c, linux-m68k-low.c: Update to use
1168 HAVE_PTRACE_GETREGS.
1169 * linux-low.c (regsets_fetch_inferior_registers)
1170 (regsets_store_inferior_registers): Only return 0 if we processed
1172 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1173 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1175 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1177 * inferiors.c (struct thread_info): Add gdb_id.
1178 (add_thread): Add gdb_id argument.
1179 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1180 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1181 calls to add_thread.
1182 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1183 * server.c (handle_query): Use thread_to_gdb_id.
1184 (handle_v_cont, main): Use gdb_id_to_thread_id.
1185 * server.h (add_thread): Update prototype.
1186 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1189 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1191 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1192 left-padded registers.
1193 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1194 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1196 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1198 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1199 * configure: Regenerate.
1200 * config.in: Regenerate.
1201 * server.h (NEED_DECLARATION_STRERROR):
1202 Replace with !HAVE_DECL_STRERROR.
1204 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1206 * linux-low.c (linux_wait, linux_send_signal): Don't test
1207 an unsigned long variable for > 0 if it could be MAX_ULONG.
1208 * server.c (myresume): Likewise.
1209 * target.c (set_desired_inferior): Likewise.
1211 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1213 * configure.ac: Simplify and improve check for socklen_t.
1214 * configure, config.in: Regenerate.
1216 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1218 * acconfig.h: Remove.
1219 * configure.ac: Add a test for socklen_t. Use three-argument
1220 AC_DEFINE throughout.
1221 * config.in: Regenerated using autoheader 2.59.
1222 * configure: Regenerated.
1224 * gdbreplay.c (socklen_t): Provide a default.
1225 (remote_open): Use socklen_t.
1226 * remote-utils.c (socklen_t): Provide a default.
1227 (remote_open): Use socklen_t.
1228 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1231 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1233 * linux-low.c (linux_read_memory, linux_write_memory)
1234 (linux_read_auxv): Likewise.
1235 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1236 (check_mem_write): Likewise.
1237 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1239 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1240 (registers_from_string, register_data): Likewise.
1241 * server.c (handle_query, main): Likewise.
1242 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1243 (decode_M_packet): Likewise.
1244 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1245 * target.h (struct target_ops): Update read_memory, write_memory,
1247 (read_inferior_memory, write_inferior_memory): Update.
1248 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1250 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1251 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1252 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1253 linux-s390-low.c, linux-sh-low.c: Update for changes in
1254 read_inferior_memory and the_low_target->breakpoint.
1256 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1258 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1259 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1260 * configure.srv: Add powerpc64-*-linux*.
1261 * linux-ppc64-low.c: New file.
1263 2005-05-23 Orjan Friberg <orjanf@axis.com>
1265 * linux-cris-low.c: New file with support for CRIS.
1266 * linux-crisv32-low.c: Ditto for CRISv32.
1267 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1268 (clean): Add reg-cris.c and reg-crisv32.c.
1269 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1270 reg-crisv32.o, and reg-crisv32.c to make rules.
1271 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1274 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1276 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1277 of sizeof (PTRACE_XFER_TYPE).
1278 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1280 2005-05-12 Orjan Friberg <orjanf@axis.com>
1282 * target.h (struct target_ops): Add insert_watchpoint,
1283 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1284 pointers for hardware watchpoint support.
1285 * linux-low.h (struct linux_target_ops): Ditto.
1286 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1287 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1288 to linux_target_ops.
1289 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1291 * server.c (main): Recognize 'Z' and 'z' packets.
1293 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1295 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1296 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1297 (the_low_target): Add new members.
1299 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1301 * proc-service.c (ps_lgetregs): Search all_processes instead of
1304 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1306 * server.c (start_inferior): Change return type to int.
1307 (attach_inferior): Change sigptr to int *.
1308 (handle_v_cont, handle_v_requests): Change signal to int *.
1309 (main): Change signal to int.
1311 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1313 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1314 * configure.srv: Add m32r*-*-linux*.
1315 * linux-m32r-low.c: New file.
1317 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1319 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1321 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1323 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1324 Take unsigned long arguments for PIDs.
1325 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1326 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1327 (wait_for_sigstop, linux_resume_one_process)
1328 (regsets_fetch_inferior_registers, linux_send_signal)
1329 (linux_read_auxv): Likewise. Update the types of variables holding
1330 PIDs. Update format string specifiers.
1331 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1332 * remote-utils.c (prepare_resume_reply): Likewise.
1333 * server.c (cont_thread, general_thread, step_thread)
1334 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1336 (handle_query): Update format specifiers.
1337 (handle_v_cont, main): Use strtoul for thread IDs.
1338 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1339 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1340 (general_thread, step_thread, thread_from_wait)
1341 (old_thread_from_wait): Update.
1342 * target.h (struct thread_resume): Use unsigned long for THREAD.
1343 (struct target_ops): Use unsigned long for arguments to attach and
1346 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1348 * acinclude.m4: Include bfd/bfd.m4 directly.
1349 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1350 <agriffis@toolchain.org>.
1351 * aclocal.m4, configure: Regenerated.
1353 2005-01-07 Andrew Cagney <cagney@gnu.org>
1355 * configure.ac: Rename configure.in, require autoconf 2.59.
1356 * configure: Re-generate.
1358 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1360 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1362 * aclocal.m4: Regenerated.
1363 * configure: Regenerated.
1365 2004-11-21 Andreas Schwab <schwab@suse.de>
1367 * linux-m68k-low.c (m68k_num_gregs): Define.
1368 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1369 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1370 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1371 (m68k_breakpoint_at): New. Add to the_low_target.
1373 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1374 srv_linux_thread_db to yes.
1376 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1378 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1379 (ARCH_SET_FS): Likewise.
1380 (ARCH_GET_FS): Likewise.
1381 (ARCH_GET_GS): Likewise.
1383 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1385 * linux-i386-low.c (ps_get_thread_area): New.
1386 * linux-x86-64-low.c (ps_get_thread_area): New.
1387 * linux-low.c: Include <sys/syscall.h>.
1388 (linux_kill_one_process): Don't kill the first thread here.
1389 (linux_kill): Kill the first thread here.
1390 (kill_lwp): New function.
1391 (send_sigstop, linux_send_signal): Use it.
1392 * proc-service.c: Clean up #ifdefs.
1393 (fpregset_info): Delete.
1394 (ps_lgetregs): Update and enable implementation.
1395 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1397 * remote-utils.c (struct sym_cache, symbol_cache): New.
1398 (input_interrupt): Print a clearer message.
1399 (async_io_enabled): New variable.
1400 (enable_async_io, disable_async_io): Use it. Update comments.
1401 (look_up_one_symbol): Use the symbol cache.
1402 * thread-db.c (thread_db_look_up_symbols): New function.
1403 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1405 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1407 * configure.in: Test for -rdynamic.
1408 * configure: Regenerated.
1409 * Makefile (INTERNAL_LDFLAGS): New.
1410 (gdbserver, gdbreplay): Use it.
1412 2004-09-02 Andrew Cagney <cagney@gnu.org>
1414 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1416 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1418 * linux-low.c (linux_wait): Clear all_processes list also.
1420 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1422 * linux-low.c: Include <errno.h>. Remove extern declaration of
1425 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1427 * gdbreplay.c, server.h, utils.c: Update copyright years.
1429 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1431 * server.c (main): Print child status or termination signal from
1432 variable 'signal', not 'sig'.
1434 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1436 * linux-low.c (linux_read_memory): Change return type to
1437 int. Check for and return error from ptrace().
1438 * target.c (read_inferior_memory): Change return type to int. Pass
1439 back return status from the_target->read_memory().
1440 * target.h (struct target_ops): Adapt *read_memory() prototype.
1442 (read_inferior_memory): Adapt prototype.
1443 * server.c (main): Return an error packet if
1444 read_inferior_memory() returns an error.
1446 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1448 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1449 Unify with other clean targets.
1451 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1453 * server.c (handle_v_cont): Call set_desired_inferior.
1455 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1457 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1459 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1461 * linux-low.c (linux_wait): Unblock async I/O.
1462 (linux_resume): Block and enable async I/O.
1463 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1464 * server.h (block_async_io, unblock_async_io): Add prototypes.
1466 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1468 * remote-utils.c (remote_open): Print a status notice after
1470 * server.c (attach_inferior): Print a status notice after
1473 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1475 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1477 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1479 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1481 * server.c, target.h: Update copyright years.
1483 2004-02-25 Roland McGrath <roland@redhat.com>
1485 * target.h (struct target_ops): New member `read_auxv'.
1486 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1487 * linux-low.c (linux_read_auxv): New function.
1488 (linux_target_ops): Initialize `read_auxv' member to that.
1490 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1492 Committed by Jim Blandy <jimb@redhat.com>.
1494 * linux-s390-low.c (s390_num_regs): Update.
1495 (s390_regmap): Remove control registers. Use __s390x__ predefine
1496 instead of GPR_SIZE to distiguish s390 and s390x targets.
1498 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1500 * linux-low.c: Update copyright year.
1501 (check_removed_breakpoint): Clear pending_is_breakpoint.
1502 (linux_set_resume_request, linux_queue_one_thread)
1503 (resume_status_pending_p): New functions.
1504 (linux_continue_one_thread): Use process->resume.
1505 (linux_resume): Only resume threads if there are no pending events.
1506 * linux-low.h (struct process_info): Add resume request
1509 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1511 * regcache.c (new_register_cache): Clear the allocated register
1512 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1514 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1516 * linux-low.c (linux_resume): Take a struct thread_resume *
1518 (linux_wait): Update call.
1519 (resume_ptr): New static variable.
1520 (linux_continue_one_thread): Renamed from
1521 linux_continue_one_process. Use resume_ptr.
1522 (linux_resume): Use linux_continue_one_thread.
1523 * server.c (handle_v_cont, handle_v_requests): New functions.
1524 (myresume): New function.
1525 (main): Handle 'v' case.
1526 * target.h (struct thread_resume): New type.
1527 (struct target_ops): Change argument of "resume" to struct
1529 (myresume): Delete macro.
1531 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1533 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1534 (uninstall): Support DESTDIR.
1536 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1538 * configure.srv: Add xscale*linux copy of arm*linux entry.
1540 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1542 * linux-arm-low.c (arm_reinsert_addr): New function.
1543 (the_low_target): Add arm_reinsert_addr.
1545 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1547 * mem-break.c: Remove whitespace at end of file.
1549 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1551 * configure.in: Check whether we need to prototype strerror.
1552 * server.h: Optionally prototype strerror.
1553 * gdbreplay.c (perror_with_name): Use strerror.
1554 * linux-low.c (linux_attach_lwp): Use strerror.
1555 * utils.c (perror_with_name): Use strerror.
1556 * config.in, configure: Regenerated.
1558 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1560 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1561 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1563 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1565 * Makefile.in (SFILES): Update.
1566 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1567 low-sun3.c: Remove files.
1569 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1571 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1572 (linux_detach_one_process, linux_detach): New functions.
1573 (linux_target_ops): Add linux_detach.
1574 * server.c (main): Handle 'D' packet.
1575 * target.h (struct target_ops): Add "detach" member.
1576 (detach_inferior): Define.
1578 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1580 From Kelley Cook <kelleycook@wideopenwest.com>:
1581 * configure.srv: Accept i[34567]86 variants.
1583 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1585 * linux-low.c (linux_wait_for_event): Correct comment typos.
1586 (linux_resume_one_process): Call check_removed_breakpoint.
1587 (linux_send_signal): New function.
1588 (linux_target_ops): Add linux_send_signal.
1589 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1591 * target.h (struct target_ops): Add send_signal.
1593 2003-05-29 Jim Blandy <jimb@redhat.com>
1595 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1596 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1597 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1598 away part of the register's value.
1600 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1602 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1603 (linux_wait_for_event, linux_init_signals): Likewise.
1605 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1607 * configure.in: Check for stdlib.h.
1608 * configure: Regenerated.
1609 * config.in: Regenerated.
1611 2003-01-04 Andreas Schwab <schwab@suse.de>
1613 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1615 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1617 * Makefile.in: Remove obsolete code.
1619 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1621 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1622 defined(PT_FPR0_HI).
1624 2002-11-17 Stuart Hughes <seh@zee2.com>
1626 * linux-arm-low.c (arm_num_regs): Increase.
1627 (arm_regmap): Include status register.
1629 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1631 * linux-low.c (register_addr): Remove incorrect -1 check.
1633 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1635 * linux-low.c (linux_create_inferior): Call setpgid. Return
1637 (unstopped_p, linux_signal_pid): Remove.
1638 (linux_target_ops): Remove linux_signal_pid.
1639 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1640 global instead of target method.
1641 * target.h (struct target_ops): Remove signal_pid. Update comment
1642 for create_inferior.
1643 * server.c (signal_pid): New variable.
1644 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1645 gdbserver. Set the child to be the foreground process group.
1646 (attach_inferior): Set signal_pid.
1648 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1650 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1652 2002-08-20 Jim Blandy <jimb@redhat.com>
1654 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1657 2002-08-01 Andrew Cagney <cagney@redhat.com>
1659 * Makefile.in: Make chill references obsolete.
1661 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1663 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1664 * configure: Regenerate.
1665 * config.in: Regenerate.
1667 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1669 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1670 (perror_with_name, remote_close, remote_open, expect, play): Static.
1672 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1674 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1675 byte offsets instead of an array of indexes.
1676 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1678 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1680 * regcache.c: Add comment.
1682 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1684 * thread-db.c: New file.
1685 * proc-service.c: New file.
1686 * acinclude.m4: New file.
1687 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1688 proc-service.o, and thread-db.o.
1689 (linux-low.o): Add USE_THREAD_DB.
1690 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1691 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1692 * aclocal.m4: Regenerated.
1693 * config.in: Regenerated.
1694 * configure: Regenerated.
1695 * configure.in: Check for proc_service.h, sys/procfs.h,
1696 thread_db.h, and linux/elf.h headrs.
1697 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1698 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1699 Check for -lthread_db and thread support.
1700 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1701 PowerPC, and SuperH.
1702 * i387-fp.c: Constify arguments.
1703 * i387-fp.h: Likewise.
1704 * inferiors.c: (struct thread_info): Renamed from
1705 `struct inferior_info'. Remove PID member. Use generic inferior
1706 list header. All uses updated.
1707 (inferiors, signal_pid): Removed.
1708 (all_threads): New variable.
1709 (get_thread): Define.
1710 (add_inferior_to_list): New function.
1711 (for_each_inferior): New function.
1712 (change_inferior_id): New function.
1713 (add_inferior): Removed.
1714 (remove_inferior): New function.
1715 (add_thread): New function.
1716 (free_one_thread): New function.
1717 (remove_thread): New function.
1718 (clear_inferiors): Use for_each_inferior and free_one_thread.
1719 (find_inferior): New function.
1720 (find_inferior_id): New function.
1721 (inferior_target_data): Update argument type.
1722 (set_inferior_target_data): Likewise.
1723 (inferior_regcache_data): Likewise.
1724 (set_inferior_regcache_data): Likewise.
1725 * linux-low.c (linux_bp_reinsert): Remove.
1726 (all_processes, stopping_threads, using_thrads)
1727 (struct pending_signals, debug_threads, pid_of): New.
1728 (inferior_pid): Replace with macro.
1729 (struct inferior_linux_data): Remove.
1730 (get_stop_pc, add_process): New functions.
1731 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1732 Use add_process and add_thread.
1733 (linux_attach_lwp): New function, based on old linux_attach. Use
1734 add_process and add_thread. Set stop_expected for new threads.
1735 (linux_attach): New function.
1736 (linux_kill_one_process): New function.
1737 (linux_kill): Kill all LWPs.
1738 (linux_thread_alive): Use find_inferior_id.
1739 (check_removed_breakpoints, status_pending_p): New functions.
1740 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1741 Update. Use WNOHANG. Wait for cloned processes also. Update process
1742 struct for the found process.
1743 (linux_wait_for_event): New function.
1744 (linux_wait): Use it. Support LWPs.
1745 (send_sigstop, wait_for_sigstop, stop_all_processes)
1746 (linux_resume_one_process, linux_continue_one_process): New functions.
1747 (linux_resume): Support LWPs.
1748 (REGISTER_RAW_SIZE): Remove.
1749 (fetch_register): Use register_size instead. Call supply_register.
1750 (usr_store_inferior_registers): Likewise. Call collect_register.
1752 (regsets_fetch_inferior_registers): Improve error message.
1753 (regsets_store_inferior_registers): Add debugging.
1754 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1755 (unstopped_p, linux_signal_pid): New functions.
1756 (linux_target_ops): Add linux_signal_pid.
1757 (linux_init_signals): New function.
1758 (initialize_low): Call it. Initialize using_threads.
1759 * regcache.c (inferior_regcache_data): Add valid
1761 (get_regcache): Fetch registers lazily. Add fetch argument
1762 and update all callers.
1763 (regcache_invalidate_one, regcache_invalidate): New
1765 (new_register_cache): Renamed from create_register_cache.
1766 Return the new regcache.
1767 (free_register_cache): Change argument to a void *.
1768 (registers_to_string, registers_from_string): Call get_regcache
1769 with fetch flag set.
1770 (register_data): Make static. Pass fetch flag to get_regcache.
1771 (supply_register): Call get_regcache with fetch flag clear.
1772 (collect_register): Call get_regcache with fetch flag set.
1773 (collect_register_as_string): New function.
1774 * regcache.h: Update.
1775 * remote-utils.c (putpkt): Flush after debug output and use
1777 Handle input interrupts while waiting for an ACK.
1778 (input_interrupt): Use signal_pid method.
1779 (getpkt): Flush after debug output and use stderr.
1780 (outreg): Use collect_register_as_string.
1781 (new_thread_notify, dead_thread_notify): New functions.
1782 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1784 (look_up_one_symbol): Flush after debug output.
1785 * server.c (step_thread, server_waiting): New variables.
1786 (start_inferior): Don't use signal_pid. Update call to mywait.
1787 (attach_inferior): Update call to mywait.
1788 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1789 (main): Don't fetch/store registers explicitly. Use
1790 set_desired_inferior. Support proposed ``Hs'' packet. Update
1793 (struct inferior_list, struct_inferior_list_entry): New.
1794 * target.c (set_desired_inferior): New.
1795 (write_inferior_memory): Constify.
1796 (mywait): New function.
1798 (struct target_ops): New signal_pid method.
1799 (mywait): Removed macro, added prototype.
1801 * linux-low.h (regset_func): Removed.
1802 (regset_fill_func, regset_store_func): New.
1803 (enum regset_type): New.
1804 (struct regset_info): Add type field. Use new operation types.
1805 (struct linux_target_ops): stop_pc renamed to get_pc.
1806 Add decr_pc_after_break and breakpoint_at.
1807 (get_process, get_thread_proess, get_process_thread)
1808 (strut process_info, all_processes, linux_attach_lwp)
1809 (thread_db_init): New.
1811 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1812 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1813 (the_low_target): Add new members.
1814 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1815 (i386_store_fpxregset): Constify.
1816 (target_regsets): Add new kind identifier.
1817 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1818 (i386_set_pc): Add debugging.
1819 (i386_breakpoint_at): New function.
1820 (the_low_target): Add new members.
1821 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1822 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1823 (mips_breakpoint_at): New.
1824 (the_low_target): Add new members.
1825 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1826 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1827 (the_low_target): Add new members.
1828 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1829 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1830 (the_low_target): Add new members.
1831 * linux-x86-64-low.c (target_regsets): Add new kind
1834 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1836 From Martin Pool <mbp@samba.org>:
1837 * server.c (gdbserver_usage): New function.
1840 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1842 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1845 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1847 * Makefile.in: Remove obsolete code.
1849 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1851 * linux-low.c (regsets_fetch_inferior_registers),
1852 (regsets_store_inferior_registers): Removed cast to int from
1854 * regcache.h: Added declaration of struct inferior_info.
1856 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1858 * inferiors.c (struct inferior_info): Add regcache_data.
1859 (add_inferior): Call create_register_cache.
1860 (clear_inferiors): Call free_register_cache.
1861 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1862 * regcache.c (struct inferior_regcache_data): New.
1863 (registers): Remove.
1864 (get_regcache): New function.
1865 (create_register_cache, free_register_cache): New functions.
1866 (set_register_cache): Don't initialize the register cache here.
1867 (registers_to_string, registers_from_string, register_data): Call
1869 * regcache.h: Add prototypes.
1870 * server.h: Likewise.
1872 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1874 * mem-break.c: New file.
1875 * mem-break.h: New file.
1876 * Makefile.in: Add mem-break.o rule; update server.h
1878 * inferiors.c (struct inferior_info): Add target_data
1880 (clear_inferiors): Free target_data member if set.
1881 (inferior_target_data, set_inferior_target_data): New functions.
1882 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1883 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1884 * linux-low.c (linux_bp_reinsert): New variable.
1885 (struct inferior_linux_data): New.
1886 (linux_create_inferior): Use set_inferior_target_data.
1887 (linux_attach): Likewise. Call add_inferior.
1888 (linux_wait_for_one_inferior): New function.
1889 (linux_wait): Call it.
1890 (linux_write_memory): Add const.
1891 (initialize_low): Call set_breakpoint_data.
1892 * linux-low.h (struct linux_target_ops): Add breakpoint
1894 * server.c (attach_inferior): Remove extra add_inferior
1896 * server.h: Include mem-break.h. Update inferior.c
1898 * target.c (read_inferior_memory)
1899 (write_inferior_memory): New functions.
1900 * target.h (read_inferior_memory)
1901 (write_inferior_memory): Change macros to prototypes.
1902 (struct target_ops): Update comments. Add const to write_memory
1905 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1907 * linux-low.c (usr_store_inferior_registers): Support
1908 registers which are allowed to fail to store.
1909 * linux-low.h (linux_target_ops): Likewise.
1910 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1911 (ppc_cannot_store_register): FPSCR may not be storable.
1913 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1915 * server.h: Include <string.h> if HAVE_STRING_H.
1916 * ChangeLog: Correct paths in last ChangeLog entry.
1918 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1920 * linux-low.h: Remove obsolete prototypes.
1921 (struct linux_target_ops): New.
1922 (extern the_low_target): New.
1923 * linux-low.c (num_regs, regmap): Remove declarations.
1924 (register_addr): Use the_low_target explicitly.
1925 (fetch_register): Likewise.
1926 (usr_fetch_inferior_registers): Likewise.
1927 (usr_store_inferior_registers): Likewise.
1928 * linux-arm-low.c (num_regs): Remove.
1929 (arm_num_regs): Define.
1930 (arm_regmap): Renamed from regmap, made static.
1931 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1933 (arm_cannot_store_register): Renamed from cannot_store_register,
1935 (the_low_target): New.
1936 * linux-i386-low.c (num_regs): Remove.
1937 (i386_num_regs): Define.
1938 (i386_regmap): Renamed from regmap, made static.
1939 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1941 (i386_cannot_store_register): Renamed from cannot_store_register,
1943 (the_low_target): New.
1944 * linux-ia64-low.c (num_regs): Remove.
1945 (ia64_num_regs): Define.
1946 (ia64_regmap): Renamed from regmap, made static.
1947 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1949 (ia64_cannot_store_register): Renamed from cannot_store_register,
1951 (the_low_target): New.
1952 * linux-m68k-low.c (num_regs): Remove.
1953 (m68k_num_regs): Define.
1954 (m68k_regmap): Renamed from regmap, made static.
1955 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1957 (m68k_cannot_store_register): Renamed from cannot_store_register,
1959 (the_low_target): New.
1960 * linux-mips-low.c (num_regs): Remove.
1961 (mips_num_regs): Define.
1962 (mips_regmap): Renamed from regmap, made static.
1963 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1965 (mips_cannot_store_register): Renamed from cannot_store_register,
1967 (the_low_target): New.
1968 * linux-ppc-low.c (num_regs): Remove.
1969 (ppc_num_regs): Define.
1970 (ppc_regmap): Renamed from regmap, made static.
1971 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1973 (ppc_cannot_store_register): Renamed from cannot_store_register,
1975 (the_low_target): New.
1976 * linux-s390-low.c (num_regs): Remove.
1977 (s390_num_regs): Define.
1978 (s390_regmap): Renamed from regmap, made static.
1979 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1981 (s390_cannot_store_register): Renamed from cannot_store_register,
1983 (the_low_target): New.
1984 * linux-sh-low.c (num_regs): Remove.
1985 (sh_num_regs): Define.
1986 (sh_regmap): Renamed from regmap, made static.
1987 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1989 (sh_cannot_store_register): Renamed from cannot_store_register,
1991 (the_low_target): New.
1992 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1993 (the_low_target): New.
1995 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1997 * Makefile.in: Add stamp-h target.
1998 * configure.in: Create stamp-h.
1999 * configure: Regenerated.
2001 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2003 * inferiors.c: New file.
2004 * target.c: New file.
2005 * target.h: New file.
2006 * Makefile.in: Add target.o and inferiors.o. Update
2008 * linux-low.c (inferior_pid): New static variable,
2009 moved from server.c.
2010 (linux_create_inferior): Renamed from create_inferior.
2011 Call add_inferior. Return 0 on success instead of a PID.
2012 (linux_attach): Renamed from myattach.
2013 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2014 (linux_thread_alive): Renamed from mythread_alive.
2015 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2017 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2018 (regsets_store_inferior_registers): Correct error message.
2019 Add missing ``return 0''.
2020 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2021 (linux_store_registers): Renamed from store_inferior_registers.
2022 (linux_read_memory): Renamed from read_inferior_memory.
2023 (linux_write_memory): Renamed from write_inferior_memory.
2024 (linux_target_ops): New structure.
2025 (initialize_low): Call set_target_ops ().
2026 * remote-utils.c (unhexify): New function.
2027 (hexify): New function.
2028 (input_interrupt): Send signals to ``signal_pid''.
2029 * server.c (inferior_pid): Remove.
2030 (start_inferior): Update create_inferior call.
2031 (attach_inferior): Call add_inferior.
2032 (handle_query): New function.
2033 (main): Call handle_query for `q' packets.
2034 * server.h: Include "target.h". Remove obsolete prototypes.
2035 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2037 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2039 * Makefile.in: Add WARN_CFLAGS. Update configury
2041 * configure.in: Check for <string.h>
2042 * configure: Regenerate.
2043 * config.in: Regenerate.
2044 * gdbreplay.c: Include needed system headers.
2045 (remote_open): Remove strchr prototype.
2046 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2047 * regcache.c (supply_register): Change buf argument to const void *.
2048 (supply_register_by_name): Likewise.
2049 (collect_register): Change buf argument to void *.
2050 (collect_register_by_name): Likewise.
2051 * regcache.h: Add missing prototypes.
2052 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2053 * server.c (handle_query): New function.
2054 (attached): New static variable, moved out of main.
2055 (main): Quiet longjmp clobber warnings.
2056 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2057 * utils.c (error): Remove NORETURN.