1 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3 * server.c (handle_query): Correct length check.
5 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7 * win32-low.c (do_initial_child_stuff): Add process handle
8 parameter. Set current_process_handle and current_process_id from the
9 parameters. Clear globals.
10 (win32_create_inferior): Don't set current_process_handle and
11 current_process_id here. Instead pass them on the call to
12 do_initial_child_stuff.
13 (win32_attach): Likewise.
14 (win32_clear_inferiors): New.
15 (win32_kill): Don't close the current process handle or the
16 current thread handle here. Instead call win32_clear_inferiors.
17 (win32_detach): Don't open a new handle to the process. Call
18 win32_clear_inferiors.
19 (win32_join): Don't rely on current_process_handle; open a new
20 handle using the process id.
21 (win32_wait): Call win32_clear_inferiors when the inferior process
24 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
26 * server.c (monitor_show_help): Add "exit".
28 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
30 * Makefile.in (SFILES): Add linux-xtensa-low.c.
31 (clean): Add reg-xtensa.c.
32 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
33 * configure.srv (xtensa*-*-linux*) New target.
34 * linux-xtensa-low.c: New.
35 * xtensa-xtregs.c: New.
37 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
39 * hostio.c: Don't include errno.h.
40 (errno_to_fileio_errno): Move to hostio-errno.
41 * hostio.c: (hostio_error): Remove the error parameter. Defer the
42 error number outputting to the target->hostio_last_error callback.
43 (hostio_packet_error): Use FILEIO_EINVAL directly.
44 (handle_open, handle_pread, hostio_error, handle_unlink): Update
45 calls to hostio_error.
46 * hostio-errno.c: New.
47 * server.h (hostio_last_error_from_errno): Declare.
48 * target.h (target_ops): Add hostio_last_error member.
49 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
50 as hostio_last_error handler.
51 * spu-low.c (spu_target_ops): Likewise.
52 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
53 (wince_hostio_last_error): New functions.
54 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
55 as hostio_last_error handler.
56 (win32_target_ops) [!_WIN32_WCE]: Register
57 hostio_last_error_from_errno as hostio_last_error handler.
58 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
59 (hostio-errno.o): New rule.
60 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
61 * configure.srv (srv_hostio_err_objs): New variable. Default to
63 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
64 * configure: Regenerate.
66 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
68 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
69 (linux_kill, linux_detach): Clean up the process list.
70 * remote-utils.c (remote_open): Improve port number parsing.
71 (putpkt_binary, input_interrupt): Only send interrupts if the target
73 * server.c (extended_protocol): Make static.
74 (attached): Define earlier.
75 (exit_requested, response_needed, program_argv): New variables.
76 (target_running): New.
77 (start_inferior): Clear attached here.
78 (attach_inferior): Set attached here.
79 (require_running): Define.
80 (handle_query): Use require_running and target_running. Implement
82 (handle_v_attach, handle_v_run): New.
83 (handle_v_requests): Use require_running. Handle vAttach and vRun.
84 (gdbserver_usage): Update.
85 (main): Redo argument parsing. Handle --debug and --multi. Handle
86 --attach along with other options or after the port. Save
87 program_argv. Support no initial program. Resynchronize
88 communication with GDB after an error. Handle "monitor exit".
89 Use require_running and target_running. Always allow the extended
90 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
91 restart in extended mode.
92 * README: Refer to the GDB manual. Update --attach usage.
94 2007-12-20 Andreas Schwab <schwab@suse.de>
96 * linux-low.c (STACK_SIZE): Define.
97 (linux_tracefork_child): Use it. Use __clone2 on ia64.
98 (linux_test_for_tracefork): Likewise.
100 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
102 * linux-low.c (linux_wait_for_event): Update messages. Do not
103 reinsert auto-delete breakpoints.
104 * mem-break.c (struct breakpoint): Change return type of handler to
106 (set_breakpoint_at): Update handler type.
107 (reinsert_breakpoint_handler): Return 1 instead of calling
109 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
111 (check_breakpoints): Delete auto-delete breakpoints and return 2.
112 * mem-break.h (set_breakpoint_at): Update handler type.
113 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
114 * win32-low.c (auto_delete_breakpoint): New.
115 (get_child_debug_event): Use it.
117 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
119 * configure.ac: Check for pread and pwrite.
120 * hostio.c (handle_pread): Fall back to lseek and read.
121 (handle_pwrite): Fall back to lseek and write.
122 * config.in, configure: Regenerated.
124 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
126 * server.c (myresume): Add own_buf argument.
127 (main): Update calls.
129 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
131 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
132 * remote-utils.c (remote_open): Do not call disable_async_io.
133 (block_async_io): Delete.
134 (unblock_async_io): Make static.
135 (initialize_async_io): New.
136 * server.c (handle_v_cont): Handle async I/O here.
137 (myresume): Likewise. Move other common resume tasks here...
138 (main): ... from here. Call initialize_async_io. Disable async
139 I/O before the main loop.
140 * server.h (initialize_async_io): Declare.
141 (block_async_io, unblock_async_io): Delete prototypes.
142 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
144 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
146 * remote-utils.c (readchar): Allow binary data in received messages.
148 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
150 * win32-low.c (attaching): New global.
151 (win32_create_inferior): Clear the `attaching' global.
152 (win32_attach): Set the `attaching' global.
153 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
154 attaching. Only set a breakpoint at the entry point if not
157 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
159 * server.c (main): Don't report dll events on the initial
160 connection on attaches.
162 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
164 * server.c (main): Relax numerical bases supported for the pid of
165 the --attach command line argument.
167 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
169 * win32-low.c (win32_attach): Call OpenProcess before
170 DebugActiveProcess, not after. Add last error output to error
173 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
175 * win32-low.c (win32_get_thread_context)
176 (win32_set_thread_context): New functions.
177 (thread_rec): Use win32_get_thread_context.
178 (continue_one_thread, win32_resume): Use win32_set_thread_context.
179 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
183 Pedro Alves <pedro_alves@portugalmail.pt>
185 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
187 (child_add_thread): Minor cleanup.
188 (child_continue): Resume artificially suspended threads before
189 calling ContinueDebugEvent.
190 (suspend_one_thread): New.
191 (fake_breakpoint_event): New.
192 (get_child_debug_event): Change return type to int. Check here if
193 gdb sent an interrupt request. If a soft interrupt was requested,
194 fake a breakpoint event. Return 0 if there is no event to handle,
196 (win32_wait): Don't check here if gdb sent an interrupt request.
197 Ensure there is a valid event to handle.
198 (win32_request_interrupt): Add soft interruption method as last
202 Pedro Alves <pedro_alves@portugalmail.pt>
204 * win32-low.h (win32_thread_info): Add descriptions to the
205 structure members. Replace `suspend_count' counter by a
207 * win32-low.c (thread_rec): Update condition of when to get the
208 context from the inferior. Rely on ContextFlags being set if it
209 has already been retrieved. Only suspend the inferior thread if
210 we haven't already. Warn if that fails.
211 (continue_one_thread): s/suspend_count/suspended/. Only call
212 ResumeThread once. Warn if that fails.
214 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
216 * win32-low.c (win32_wait): Don't read from the inferior when it
219 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
221 * Makefile.in (win32_low_h): New variable.
222 (win32-low.o): Add dependency on $(win32_low_h).
223 (win32-arm-low.o, win32-i386-low.o): New rules.
225 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
227 * hostio.c: Correct copyright year.
229 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
231 * Makefile.in (OBS): Add hostio.o.
232 (hostio.o): New rule.
233 * server.h (handle_vFile): Declare.
234 * hostio.c: New file.
235 * server.c (handle_v_requests): Take packet_len and new_packet_len
236 for binary packets. Call handle_vFile.
237 (main): Update call to handle_v_requests.
239 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
241 * linux-low.c: Include <sched.h>.
243 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
245 * linux-low.c (linux_tracefork_grandchild): New.
246 (linux_tracefork_child): Use clone.
247 (linux_test_for_tracefork): Use clone; allocate and free a stack.
249 2007-10-31 Joel Brobecker <brobecker@adacore.com>
251 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
253 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
255 * linux-low.c (handle_extended_wait): Handle unexpected signals.
257 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
259 * inferiors.c (change_inferior_id): Delete.
260 (add_pid_to_list, pull_pid_from_list): New.
261 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
262 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
263 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
264 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
265 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
266 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
267 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
268 (using_threads): Always set to 1.
269 (handle_extended_wait): New.
270 (add_process): Do not set TID.
271 (linux_create_inferior): Set must_set_ptrace_flags.
272 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
273 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
274 (linux_thread_alive): Rename TID argument to LWPID.
275 (linux_wait_for_process): Handle unknown processes. Do not use TID.
276 (linux_wait_for_event): Do not use TID or check using_threads. Update
277 call to dead_thread_notify. Call handle_extended_wait.
278 (linux_create_inferior): Use PTRACE_SETOPTIONS.
279 (send_sigstop): Delete sigstop_sent.
280 (wait_for_sigstop): Avoid TID.
281 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
282 (linux_test_for_tracefork): New.
283 (linux_lookup_signals): Use thread_db_active and
284 linux_supports_tracefork_flag.
285 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
286 * linux-low.h (get_process_thread): Avoid TID.
287 (struct process_ifo): Move thread_known and tid to the end. Remove
289 (linux_attach_lwp, thread_db_init): Update prototypes.
290 * server.h (change_inferior_id): Delete prototype.
291 (add_pid_to_list, pull_pid_from_list): New prototypes.
292 * thread-db.c (thread_db_use_events): New.
293 (find_first_thread): Rename to...
294 (find_one_thread): ...this. Update callers and messages. Do not
295 call fatal. Check thread_db_use_events. Do not call
296 change_inferior_id or new_thread_notify.
297 (maybe_attach_thread): Update. Do not call new_thread_notify.
298 (thread_db_init): Set thread_db_use_events. Check use_events.
299 * utils.c (fatal, warning): Correct message prefix.
301 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
303 * Makefile.in (clean): Remove new files.
304 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
305 (powerpc-64.o, powerpc-64.c): New rules.
306 * configure.srv: Use alternate register sets for powerpc64-*-linux*
307 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
309 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
311 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
312 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
313 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
314 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
315 (target_regsets): Add AltiVec and SPE register sets.
316 * configure.ac: Check for AltiVec and SPE.
317 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
318 (ppc_fill_vrregset, ppc_store_vrregset): New.
319 (target_regsets): Add AltiVec register set.
320 * configure: Regenerated.
322 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
324 * linux-low.c (O_LARGEFILE): Define.
325 (linux_read_memory): Use /proc/PID/mem.
326 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
327 * configure, config.in: Regenerated.
329 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
331 * linux-low.c (linux_wait_for_event): Do not pass signals while
334 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
336 * win32-low.c (create_process): New.
337 (win32_create_inferior): Use create_process instead of
338 CreateProcess. If create_process failed retry appending an ".exe"
339 suffix. Store the GetLastError result immediatelly after
340 create_process calls and use it on the call to error.
342 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
344 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
346 2007-08-23 Joel Brobecker <brobecker@adacore.com>
348 * configure.ac: Switch license to GPLv3.
350 2007-08-01 Michael Snyder <msnyder@access-company.com>
352 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
354 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
356 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
358 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
359 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
360 CloseToolhelp32Snapshot.
361 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
362 CloseToolhelp32Snapshot.
364 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
366 * server.c (main): Check for inferior exit before main loop.
368 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
370 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
371 instead of on tmp_desc.
373 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
374 Daniel Jacobowitz <dan@codesourcery.com>
376 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
377 (add_thread): Minor cleanups.
378 (clear_inferiors): Move lower in the file. Clear the DLL
380 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
381 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
382 (xml_escape_text): New.
383 * server.c (handle_query): Handle qXfer:libraries:read. Report it
385 (handle_v_cont): Report errors.
386 (gdbserver_version): Update.
387 (main): Correct size of own_buf. Do not report initial DLL events.
388 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
389 (unloaded_dll, xml_escape_text): New.
390 * win32-low.c (enum target_waitkind): Update comments.
391 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
392 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
393 (win32_EnumProcessModules, win32_GetModuleInformation)
394 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
395 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
396 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
397 (win32_Module32First, win32_Module32Next, load_toolhelp)
398 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
399 (get_child_debug_event): Handle DLL events.
400 (win32_wait): Likewise.
402 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
404 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
405 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
407 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
409 * win32-low.c (handle_output_debug_string): Ignore event if not
412 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
414 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
416 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
418 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
420 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
422 * inferiors.c (change_inferior_id): Add comment.
423 * linux-low.c (check_removed_breakpoint): Add an early
424 prototype. Improve debug output.
425 (linux_attach): Doc update.
426 (linux_detach_one_process, linux_detach): Clean up before releasing
428 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
429 * linux-low.h (struct process_info): Doc improvement.
430 * mem-break.c (delete_all_breakpoints): New.
431 * mem-break.h (delete_all_breakpoints): New prototype.
432 * thread-db.c (find_first_thread): New.
433 (thread_db_create_event): Call it instead of
434 thread_db_find_new_threads. Clean up unused variables.
435 (maybe_attach_thread): Remove first thread handling.
436 (thread_db_find_new_threads): Use find_first_thread.
437 (thread_db_get_tls_address): Likewise.
439 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
441 * thread-db.c (thread_db_find_new_threads): Add prototype.
442 (thread_db_create_event): Check for the main thread before adding
444 (maybe_attach_thread): Only enable event reporting if TID == 0.
445 (thread_db_get_tls_address): Check for new threads.
447 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
449 * linux-low.c (linux_create_inferior): Try execv before execvp.
450 * spu-low.c (spu_create_inferior): Likewise.
452 2007-06-13 Mike Frysinger <vapier@gentoo.org>
454 * linux-low.c (linux_create_inferior): Change execv to execvp.
455 * spu-low.c (spu_create_inferior): Likewies.
457 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
459 * Makefile.in (clean): Clean new files instead of deleted ones.
460 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
461 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
463 * configure.srv: Specify XML files and new regformats for MIPS and
465 * linux-mips-low.c (mips_num_regs): Set to only used registers.
466 (mips_regmap): Do not fetch $0. Remove unused registers. Add
467 an entry for the restart register.
468 (mips_cannot_fetch_register, mips_cannot_store_register)
469 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
470 register names to match the XML descriptions.
471 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
472 restart register instead of $0.
474 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
475 Markus Deuling <deuling@de.ibm.com>
477 * remote-utils.c (decode_xfer_write): New function.
478 * server.h (decode_xfer_write): Add prototype.
479 * server.c (handle_query): Add PACKET_LEN argument. Support
480 qXfer:spu:read and qXfer:spu:write packets.
481 (main): Pass packet_len to handle_query.
482 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
483 * target.h (target_ops): Add qxfer_spu.
485 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
487 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
488 accessing non-seekable spufs files.
490 2007-05-16 Markus Deuling <deuling@de.ibm.com>
492 * server.c (handle_query): Add reply for qC packet.
494 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
495 Leo Zayas <lerele@champenstudios@com>
497 * server.h (check_remote_input_interrupt_request): New function.
498 * remote_utils.c (INVALID_DESCRIPTOR): New define.
499 (remote_desc): Initialize with INVALID_DESCRIPTOR.
500 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
501 (check_remote_input_interrupt_request): New function.
502 * server.h (check_remote_input_interrupt_request): Declare.
503 * win32-low.c (winapi_DebugBreakProcess,
504 winapi_GenerateConsoleCtrlEvent): New typedefs.
505 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
507 (win32_wait): Check for remote interrupt request
508 with check_remote_input_interrupt_request.
509 (win32_request_interrupt): New function.
510 (win32_target_op): Set request_interrupt to win32_request_interrupt.
512 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
514 * win32-low.c (debug_registers_changed,
515 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
516 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
517 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
518 (thread_rec): Get context using the low target.
519 (child_add_thread): Call thread_added on the low target,
520 which does the same thing.
522 (do_initial_child_stuff): Remove debug registers references.
523 Set context using the low target. Resume threads after
524 setting the contexts.
525 (child_continue): Remove dead variable. Remove debug
526 registers references.
527 (child_fetch_inferior_registers): Go through the low target.
528 (do_child_store_inferior_registers): Remove.
529 (child_store_inferior_registers): Go through the low target.
530 (win32_resume): Remove debug registers references.
531 Set context using the low target.
532 (handle_exception): Change return type to void. Don't record
533 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
534 first chance exception.
535 (get_child_debug_event): Change return type to void. Remove
536 goto loop. Always return after waiting for debug event.
537 (win32_wait): Convert to switch statement. Handle spurious
540 * win32-i386-low.c (debug_registers_changed,
541 debug_registers_used): New.
542 (initial_stuff): Rename to ...
543 (i386_initial_stuff): ... this. Clear debug registers
545 (store_debug_registers): Delete.
546 (i386_get_thread_context): New.
547 (load_debug_registers): Delete.
548 (i386_set_thread_context): New.
549 (i386_thread_added): New.
550 (single_step): Rename to ...
551 (i386_single_step): ... this.
552 (do_fetch_inferior_registers): Rename to ...
553 (i386_fetch_inferior_register): ... this.
554 (i386_store_inferior_register): New.
555 (the_low_target): Adapt to new interface.
557 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
558 (arm_get_thread_context): New.
559 (arm_set_thread_context): New.
561 (do_fetch_inferior_registers): Rename to ...
562 (arm_fetch_inferior_register): ... this.
563 (arm_store_inferior_register): New.
564 (arm_wince_breakpoint): Reimplement as unsigned long.
565 (arm_wince_breakpoint_len): Define.
566 (the_low_target): Adapt to new interface.
568 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
569 load_debug_registers. Add get_thread_context, set_thread_context,
570 thread_added and store_inferior_register. Rename
571 fetch_inferior_registers to fetch_inferior_register.
572 (regptr): Remove declaration.
574 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
576 * linux-low.c (linux_detach): Change return type to int. Return 0.
577 * spu-low.c (spu_detach): Likewise.
579 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
581 * target.h (target_ops): Change return type of detach to int.
583 (join_inferior): New.
584 * server.c (main): Don't skip detach support on mingw32.
585 If the inferior doesn't support detaching return error.
586 Call join_inferior instead of using waitpid.
587 * linux-low.c (linux_join): New.
588 (linux_target_op): Add linux_join.
589 * spu-low.c (spu_join): New.
590 (spu_target_ops): Add spu_join.
591 * win32-low.c (win32_detach): Adapt to new interface.
592 Reopen current_process_handle before detaching. Issue a child
593 resume before detaching.
595 (win32_target_op): Add win32_join.
597 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
599 * win32-low.c (win32-attach): Fix return value.
600 * target.h (target_ops): Describe ATTACH return values.
602 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
604 * win32-low.c (GETPROCADDRESS): Define.
605 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
606 (winapi_DebugSetProcessKillOnExit): Likewise.
607 (win32_create_inferior): Force usage of ansi CreateProcessA.
608 (win32_attach): Use GETPROCADDRESS.
609 (win32_detach): Likewise.
611 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
613 * win32-low.c (win32_wait): Don't use WSTOPSIG.
615 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
617 * win32-low.c: Commit leftover changes from 2007-03-29.
619 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
621 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
622 fields short instead of int. Add explicit padding.
623 (i387_cache_to_fsave): Remove unnecessary casts.
624 (i387_fsave_to_cache): Doc fix.
625 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
627 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
629 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
630 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
632 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
634 * configure.srv (arm*-*-mingw32ce*): Move near the other
637 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
639 * configure.ac: Add errno checking.
640 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
641 sys/file.h and malloc.h.
642 (AC_CHECK_DECLS): Add perror.
643 (srv_mingwce): Handle.
644 * configure.srv (i[34567]86-*-cygwin*): Add
645 win32-i386-low.o to srv_tgtobj.
646 (i[34567]86-*-mingw*): Likewise.
647 (arm*-*-mingw32ce*): Add case.
648 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
649 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
650 [__MINGW32CE__] (strerror): New function.
651 [__MINGW32CE__] (errno): Define to GetLastError.
652 [__MINGW32CE__] (COUNTOF): New macro.
653 (remote_open): Remove extra close call.
654 * mem-break.c (delete_breakpoint_at): New function.
655 * mem-break.h (delete_breakpoint_at): Declare.
656 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
657 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
658 [USE_WIN32API] (read, write): Add char* casts.
659 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
660 * server.h: Include wincecompat.h on Windows CE.
661 [HAVE_ERRNO_H]: Check.
662 (perror): Declare if not declared.
663 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
664 (perror_with_name): Remove errno declaration.
665 * wincecompat.h: New.
666 * wincecompat.c: New.
668 * win32-arm-low.c: New.
669 * win32-i386-low.c: New.
670 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
671 (OUTMSG2): Make it safe.
673 (COUNTOF): New macro.
674 (NUM_REGS): Get it from the low target.
675 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
676 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
677 (thread_rec): Let low target handle debug registers.
678 (child_add_thread): Likewise.
679 (child_init_thread_list): Likewise.
680 (continue_one_thread): Likewise.
682 (do_child_fetch_inferior_registers): Move to ...
683 * win32-i386-low.c: ... here, and rename to ...
684 (do_fetch_inferior_registers): ... this.
685 * win32-low.c (child_fetch_inferior_registers):
686 Go through the low target.
687 (do_child_store_inferior_registers): Use regptr.
688 (strwinerror): New function.
689 (win32_create_inferior): Handle Windows CE.
690 Use strwinerror instead of strerror on Windows error
691 codes. Add program to the error output.
692 Don't close the main thread handle on Windows CE.
693 (win32_attach): Use coredll.dll on Windows CE.
694 (win32_kill): Close current process and current
696 (win32_detach): Use coredll.dll on Windows CE.
697 (win32_resume): Let low target handle debug registers, and
699 (handle_exception): Add/Remove initial breakpoint. Avoid
700 non-existant WSTOPSIG on Windows CE.
701 (win32_read_inferior_memory): Cast to remove warning.
702 (win32_arch_string): Go through the low target.
703 (initialize_low): Call set_breakpoint_data with the low
705 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
706 FOP_REGNUM, mappings): Move to ...
707 * win32-i386-low.c: ... here.
708 * win32-low.c (win32_thread_info): Move to ...
709 * win32-low.h: ... here.
710 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
711 win32-arm-low.c and wincecompat.c.
713 (install-only:): Likewise.
714 (gdbserver:): Likewise.
715 (gdbreplay:): Likewise.
716 * config.in: Regenerate.
717 * configure: Regenerate.
719 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
721 * win32-low.c: Rename typedef thread_info to
722 win32_thread_info throughout.
724 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
726 * win32-i386-low.c: Rename to ...
727 * win32-low.c: ... this.
728 * configure.srv: Replace win32-i386-low.o with win32-low.o.
729 * Makefile.in: Likewise.
731 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
733 * remote-utils.c (monitor_output): Constify msg parameter.
734 * server.h (monitor_output): Likewise.
735 * win32-i386-low.c (handle_output_debug_string): New.
736 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
737 handle_output_debug_string.
738 (get_child_debug_event): Likewise.
740 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
742 * server.c (main): Correct strtoul check.
744 2007-03-27 Jon Ringle <jon@ringle.org>
746 * linux-low.c: Check __ARCH_HAS_MMU__ also.
748 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
750 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
752 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
754 * terminal.h: Check HAVE_SGTTY_H.
756 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
758 * remote-utils.c (remote_open): Print out the assigned port number.
760 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
762 * remote-utils.c (monitor_output): New function.
763 * server.c (debug_threads): Define here.
764 (monitor_show_help): New function.
765 (handle_query): Handle qRcmd.
766 (main): Do not handle 'd' packet.
767 * server.h (debug_threads, remote_debug, monitor_output): Declare.
768 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
771 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
773 * Makefile.in (EXEEXT): New.
774 (clean): Use $(EXEEXT).
776 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
778 * target.h (target_ops): Rename send_signal to request_interrupt,
779 and remove enum target_signal parameter.
780 * linux-low.c (linux_request_interrupt): Rename from
781 linux_send_signal, and always send SIGINT.
782 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
783 and always send SIGINT.
784 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
786 (input_interrupt): Likewise.
788 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
790 * server.c (get_features_xml): Check if target implemented
792 * win32-i386-low.c (win32_arch_string): New.
793 (win32_target_ops): Add win32_arch_string as arch_string member.
795 2007-02-22 Markus Deuling <deuling@de.ibm.com>
797 * spu-low.c (spu_arch_string): New.
798 (spu_target_ops): Add spu_arch_string.
800 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
802 * remote-utils.c: Remove HAVE_TERMINAL_H check.
803 * configure.ac: Do not check for terminal.h.
804 * configure, config.in: Regenerated.
806 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
808 * Makefile.in (OBS): Add $(XML_BUILTIN).
809 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
811 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
812 (arm-with-iwmmxt.c): New.
813 * config.in, configure: Regenerate.
814 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
815 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
816 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
817 (arm*-*-linux*): Add iWMMXt and regset support.
818 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
819 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
820 (arm_store_wmmxregset, target_regsets): New.
821 * server.c (get_features_xml): Take annex argument. Check builtin
823 (handle_query): Handle multiple annexes.
825 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
827 * remote-utils.c [USE_WIN32API] (read, write): Define.
828 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
831 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
833 * linux-i386-low.c (the_low_target): Set arch_string.
834 * linux-x86-64-low.c (the_low_target): Likewise.
835 * linux-low.c (linux_arch_string): New.
836 (linux_target_ops): Add it.
837 * linux-low.h (struct linux_target_ops): Add arch_string.
838 * server.c (write_qxfer_response): Use const void * for DATA.
839 (get_features_xml): New.
840 (handle_query): Handle qXfer:features:read. Report it for qSupported.
841 * target.h (struct target_ops): Add arch_string method.
843 2007-01-03 Denis Pilat <denis.pilat@st.com>
844 Daniel Jacobowitz <dan@codesourcery.com>
846 * linux-low.c (linux_kill): Handle being called with no threads.
847 * win32-i386-low.c (win32_kill): Likewise.
848 (get_child_debug_event): Clear current_process_handle.
850 2006-12-30 Denis PILAT <denis.pilat@st.com>
851 Daniel Jacobowitz <dan@codesourcery.com>
853 * remote-utils.c (remote_open): Check the type of specified
854 serial port devices before opening them.
855 * server.c (main): Kill the inferior if an error occurs during
856 the first remote_open.
858 2006-12-05 Markus Deuling <deuling@de.ibm.com>
860 * README: Update supported targets.
862 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
864 * Makefile.in (clean): Remove reg-mips64.c.
865 (reg-mips64.c, reg-mips64.o): New rules.
866 * configure.srv: Handle mips64. Include regset support for mips.
867 * linux-mips-low.c (union mips_register): New.
868 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
869 (mips_breakpoint, mips_breakpoint_at): Use int.
870 (mips_collect_register, mips_supply_register)
871 (mips_collect_register_32bit, mips_supply_register_32bit)
872 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
873 (mips_store_fpregset, target_regsets): New.
874 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
876 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
878 * configure.srv: Add target "spu*-*-*".
879 * Makefile.in (clean): Remove reg-spu.c.
880 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
881 * spu-low.c: New file.
883 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
885 * configure.ac: Correct td_thr_tls_get_addr test.
886 * configure: Regenerated.
888 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
890 * linux-low.c (linux_wait_for_event): Reformat. Use the
892 * remote-utils.c (decode_address_to_semicolon): New.
893 * server.c (pass_signals, handle_general_set): New.
894 (handle_query): Mention QPassSignals for qSupported.
895 (main): Call handle_general_set.
896 * server.h (pass_signals, decode_address_to_semicolon): New.
898 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
900 * server.c (handle_query): Correct error handling for read_auxv.
902 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
904 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
905 and srv_linux_thread_db to yes.
906 * linux-s390-low.c (s390_fill_gregset): New function.
907 (target_regsets): Define data structure.
909 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
911 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
912 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
913 * config.in, configure: Regenerated.
914 * inferiors.c (gdb_id_to_thread): New function.
915 (gdb_id_to_thread_id): Use it.
916 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
917 * linux-low.h (struct process_info): Add th member.
918 (thread_db_get_tls_address): New prototype.
919 * remote-utils.c (decode_address): Make non-static.
920 * server.c (handle_query): Handle qGetTLSAddr.
921 * server.h (gdb_id_to_thread, decode_address): New prototypes.
922 * target.h (struct target_ops): Add get_tls_address.
923 * thread-db.c (maybe_attach_thread): Save the thread handle.
924 (thread_db_get_tls_address): New.
926 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
928 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
929 (linux_resume_one_process): Take a siginfo_t *. Update all
930 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
931 (struct pending_signals): Add a siginfo_t.
932 (linux_wait_for_process): Always set last_status.
933 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
934 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
935 * linux-low.h (struct process_info): Add last_status.
937 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
939 * remote-utils.c (try_rle): New function.
940 (putpkt_binary): Use it.
942 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
944 * Makefile.in (clean): Clean reg-x86-64-linux.c.
945 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
946 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
947 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
948 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
951 2006-08-08 Richard Sandiford <richard@codesourcery.com>
953 * server.c (terminal_fd): New variable.
954 (old_foreground_pgrp): Likewise.
955 (restore_old_foreground_pgrp): New function.
956 (start_inferior): Record the terminal file descriptor in terminal_fd
957 and its original foreground group in old_foreground_pgrp. Register
958 restore_old_foreground_pgrp with atexit().
960 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
962 * server.c (handle_query): Correct qPart to qXfer.
964 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
966 * configure.ac: Check for more headers which are missing on
967 Windows. Automatically supply -lwsock32 and USE_WIN32API.
968 * configure.srv: Add Cygwin and mingw32.
969 * remote-utils.c: Don't include headers unconditionally which
970 are missing on mingw32. Include <winsock.h> for mingw32.
971 (remote_open): Adjust for mingw32 support. Flush
972 standard error after writing to it.
973 (remote_close, putpkt_binary, input_interrupt, block_async_io)
974 (unblock_async_io, enable_async_io, disable_async_io)
975 (readchar, getpkt): Update for Winsock support.
976 (prepare_resume_reply): Expect a protocol signal number.
977 * server.c: Disable <sys/wait.h> on mingw32.
978 (start_inferior): Adjust for mingw32 support. Flush
979 standard error after writing to it.
980 (attach_inferior): Likewise. Use protocol signal
982 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
984 * win32-i386-low.c: New file.
985 * Makefile.in (XM_CLIBS): Set.
986 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
987 (win32-i386-low.o): New dependency rule.
988 * linux-low.c (linux_wait): Use target signal numbers.
989 * target.h (struct target_ops): Doc fix.
990 * server.h (target_signal_to_name): New prototype.
991 * gdbreplay.c: Don't include headers unconditionally which
992 are missing on mingw32. Include <winsock.h> for mingw32.
993 (remote_close, remote_open): Adjust for Winsock support.
994 * configure, config.in: Regenerated.
996 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
998 * server.c (decode_xfer_read, write_qxfer_response): New.
999 (handle_query): Take a packet length argument. Handle
1000 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1001 the qSupported response.
1002 (main): Update call to handle_query.
1004 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1006 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1007 (putpkt_binary): Renamed from putpkt and adjusted for binary
1009 (putpkt): New wrapper for putpkt_binary.
1010 (readchar): Don't mask off the high bit.
1011 (decode_X_packet): New function.
1012 * server.c (main): Call putpkt_binary if a handler sets the packet
1013 length. Save the length of the incoming packet. Handle 'X'.
1014 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1016 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1018 * server.c (handle_query): Handle qSupported.
1020 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1022 * remote-utils.c (all_symbols_looked_up): New variable.
1023 (look_up_one_symbol): Check it.
1024 * server.h (look_up_one_symbol): New declaration.
1025 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1027 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1029 * Makefile.in (linux-arm-low.o): Update dependencies.
1030 * linux-arm-low.c: Include "gdb_proc_service.h".
1031 (PTRACE_GET_THREAD_AREA): Define.
1032 (ps_get_thread_area): New function.
1034 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1036 * configure.srv (m68k*-*-uclinux*): New target.
1037 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1038 (linux_resume_one_process): Remove extraneous cast.
1039 (linux_read_offsets): New.
1040 (linux_target_op): Add linux_read_offsets on mmuless systems.
1041 * server.c (handle_query): Add qOffsets logic.
1042 * target.h (struct target_ops): Add read_offsets.
1044 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1046 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1047 (PTRACE_GET_THREAD_AREA): Define.
1048 (ps_get_thread_area): New function.
1049 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1050 (linux-x86-64-low.o): Update.
1052 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1054 * configure.ac: Remove checks for prfpregset_t.
1055 * gdb_proc_service.h: New file.
1056 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1057 new "gdb_proc_service.h".
1058 * proc-service.c: Likewise.
1059 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1060 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1061 * Makefile.in (gdb_proc_service_h): Updated.
1062 * configure, config.in: Regenerated.
1064 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1066 * remote-utils.c (prepare_resume_reply): Move declaration
1067 of gdb_id_from_wait to the top of the block.
1069 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1071 * linux-low.c (regsets_store_inferior_registers): Read the regset
1072 from the target before filling it.
1074 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1076 * server.c (attach_inferior): Return SIGTRAP for a successful
1079 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1081 * Makefile.in (OBS): Add version.o.
1082 (STAGESTUFF): Delete.
1083 (version.o): Add dependencies.
1084 (version.c): Replace rule.
1085 (clean): Remove version.c.
1086 * server.c (gdbserver_version): New.
1087 (gdbserver_usage): Use printf.
1088 (main): Handle --version and --help.
1089 * server.h (version, host_name): Add declarations.
1091 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1103 * linux-x86-64-low.c:
1106 * linux-ppc64-low.c:
1115 * linux-crisv32-low.c:
1127 * gdbserver.1: Add (C) after Copyright. Update the FSF
1130 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1132 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1133 (arm_breakpoint_at): Recognize both breakpoints.
1134 (the_low_target): Use the correct breakpoint instruction.
1136 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1138 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1139 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1140 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1141 (the_low_target): Update.
1143 2005-10-25 Andreas Schwab <schwab@suse.de>
1145 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1147 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1148 (ia64_num_regs): Reduce to 462.
1150 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1152 * acinclude.m4: Correct quoting.
1153 * aclocal.m4: Regenerated.
1155 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1156 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1157 (thread_db_init): Call thread_db_err_str.
1158 * configure.ac: Check for TD_VERSION.
1159 * config.in, configure: Regenerated.
1161 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1163 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1165 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1167 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1168 is not available. Define HAVE_PTRACE_GETREGS if it is.
1169 * config.in, configure: Regenerated.
1170 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1171 * linux-i386-low.c, linux-m68k-low.c: Update to use
1172 HAVE_PTRACE_GETREGS.
1173 * linux-low.c (regsets_fetch_inferior_registers)
1174 (regsets_store_inferior_registers): Only return 0 if we processed
1176 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1177 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1179 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1181 * inferiors.c (struct thread_info): Add gdb_id.
1182 (add_thread): Add gdb_id argument.
1183 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1184 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1185 calls to add_thread.
1186 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1187 * server.c (handle_query): Use thread_to_gdb_id.
1188 (handle_v_cont, main): Use gdb_id_to_thread_id.
1189 * server.h (add_thread): Update prototype.
1190 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1193 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1195 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1196 left-padded registers.
1197 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1198 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1200 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1202 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1203 * configure: Regenerate.
1204 * config.in: Regenerate.
1205 * server.h (NEED_DECLARATION_STRERROR):
1206 Replace with !HAVE_DECL_STRERROR.
1208 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1210 * linux-low.c (linux_wait, linux_send_signal): Don't test
1211 an unsigned long variable for > 0 if it could be MAX_ULONG.
1212 * server.c (myresume): Likewise.
1213 * target.c (set_desired_inferior): Likewise.
1215 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1217 * configure.ac: Simplify and improve check for socklen_t.
1218 * configure, config.in: Regenerate.
1220 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1222 * acconfig.h: Remove.
1223 * configure.ac: Add a test for socklen_t. Use three-argument
1224 AC_DEFINE throughout.
1225 * config.in: Regenerated using autoheader 2.59.
1226 * configure: Regenerated.
1228 * gdbreplay.c (socklen_t): Provide a default.
1229 (remote_open): Use socklen_t.
1230 * remote-utils.c (socklen_t): Provide a default.
1231 (remote_open): Use socklen_t.
1232 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1235 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1237 * linux-low.c (linux_read_memory, linux_write_memory)
1238 (linux_read_auxv): Likewise.
1239 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1240 (check_mem_write): Likewise.
1241 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1243 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1244 (registers_from_string, register_data): Likewise.
1245 * server.c (handle_query, main): Likewise.
1246 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1247 (decode_M_packet): Likewise.
1248 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1249 * target.h (struct target_ops): Update read_memory, write_memory,
1251 (read_inferior_memory, write_inferior_memory): Update.
1252 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1254 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1255 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1256 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1257 linux-s390-low.c, linux-sh-low.c: Update for changes in
1258 read_inferior_memory and the_low_target->breakpoint.
1260 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1262 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1263 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1264 * configure.srv: Add powerpc64-*-linux*.
1265 * linux-ppc64-low.c: New file.
1267 2005-05-23 Orjan Friberg <orjanf@axis.com>
1269 * linux-cris-low.c: New file with support for CRIS.
1270 * linux-crisv32-low.c: Ditto for CRISv32.
1271 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1272 (clean): Add reg-cris.c and reg-crisv32.c.
1273 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1274 reg-crisv32.o, and reg-crisv32.c to make rules.
1275 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1278 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1280 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1281 of sizeof (PTRACE_XFER_TYPE).
1282 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1284 2005-05-12 Orjan Friberg <orjanf@axis.com>
1286 * target.h (struct target_ops): Add insert_watchpoint,
1287 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1288 pointers for hardware watchpoint support.
1289 * linux-low.h (struct linux_target_ops): Ditto.
1290 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1291 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1292 to linux_target_ops.
1293 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1295 * server.c (main): Recognize 'Z' and 'z' packets.
1297 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1299 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1300 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1301 (the_low_target): Add new members.
1303 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1305 * proc-service.c (ps_lgetregs): Search all_processes instead of
1308 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1310 * server.c (start_inferior): Change return type to int.
1311 (attach_inferior): Change sigptr to int *.
1312 (handle_v_cont, handle_v_requests): Change signal to int *.
1313 (main): Change signal to int.
1315 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1317 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1318 * configure.srv: Add m32r*-*-linux*.
1319 * linux-m32r-low.c: New file.
1321 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1323 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1325 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1327 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1328 Take unsigned long arguments for PIDs.
1329 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1330 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1331 (wait_for_sigstop, linux_resume_one_process)
1332 (regsets_fetch_inferior_registers, linux_send_signal)
1333 (linux_read_auxv): Likewise. Update the types of variables holding
1334 PIDs. Update format string specifiers.
1335 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1336 * remote-utils.c (prepare_resume_reply): Likewise.
1337 * server.c (cont_thread, general_thread, step_thread)
1338 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1340 (handle_query): Update format specifiers.
1341 (handle_v_cont, main): Use strtoul for thread IDs.
1342 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1343 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1344 (general_thread, step_thread, thread_from_wait)
1345 (old_thread_from_wait): Update.
1346 * target.h (struct thread_resume): Use unsigned long for THREAD.
1347 (struct target_ops): Use unsigned long for arguments to attach and
1350 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1352 * acinclude.m4: Include bfd/bfd.m4 directly.
1353 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1354 <agriffis@toolchain.org>.
1355 * aclocal.m4, configure: Regenerated.
1357 2005-01-07 Andrew Cagney <cagney@gnu.org>
1359 * configure.ac: Rename configure.in, require autoconf 2.59.
1360 * configure: Re-generate.
1362 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1364 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1366 * aclocal.m4: Regenerated.
1367 * configure: Regenerated.
1369 2004-11-21 Andreas Schwab <schwab@suse.de>
1371 * linux-m68k-low.c (m68k_num_gregs): Define.
1372 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1373 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1374 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1375 (m68k_breakpoint_at): New. Add to the_low_target.
1377 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1378 srv_linux_thread_db to yes.
1380 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1382 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1383 (ARCH_SET_FS): Likewise.
1384 (ARCH_GET_FS): Likewise.
1385 (ARCH_GET_GS): Likewise.
1387 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1389 * linux-i386-low.c (ps_get_thread_area): New.
1390 * linux-x86-64-low.c (ps_get_thread_area): New.
1391 * linux-low.c: Include <sys/syscall.h>.
1392 (linux_kill_one_process): Don't kill the first thread here.
1393 (linux_kill): Kill the first thread here.
1394 (kill_lwp): New function.
1395 (send_sigstop, linux_send_signal): Use it.
1396 * proc-service.c: Clean up #ifdefs.
1397 (fpregset_info): Delete.
1398 (ps_lgetregs): Update and enable implementation.
1399 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1401 * remote-utils.c (struct sym_cache, symbol_cache): New.
1402 (input_interrupt): Print a clearer message.
1403 (async_io_enabled): New variable.
1404 (enable_async_io, disable_async_io): Use it. Update comments.
1405 (look_up_one_symbol): Use the symbol cache.
1406 * thread-db.c (thread_db_look_up_symbols): New function.
1407 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1409 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1411 * configure.in: Test for -rdynamic.
1412 * configure: Regenerated.
1413 * Makefile (INTERNAL_LDFLAGS): New.
1414 (gdbserver, gdbreplay): Use it.
1416 2004-09-02 Andrew Cagney <cagney@gnu.org>
1418 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1420 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1422 * linux-low.c (linux_wait): Clear all_processes list also.
1424 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1426 * linux-low.c: Include <errno.h>. Remove extern declaration of
1429 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1431 * gdbreplay.c, server.h, utils.c: Update copyright years.
1433 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1435 * server.c (main): Print child status or termination signal from
1436 variable 'signal', not 'sig'.
1438 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1440 * linux-low.c (linux_read_memory): Change return type to
1441 int. Check for and return error from ptrace().
1442 * target.c (read_inferior_memory): Change return type to int. Pass
1443 back return status from the_target->read_memory().
1444 * target.h (struct target_ops): Adapt *read_memory() prototype.
1446 (read_inferior_memory): Adapt prototype.
1447 * server.c (main): Return an error packet if
1448 read_inferior_memory() returns an error.
1450 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1452 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1453 Unify with other clean targets.
1455 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1457 * server.c (handle_v_cont): Call set_desired_inferior.
1459 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1461 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1463 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1465 * linux-low.c (linux_wait): Unblock async I/O.
1466 (linux_resume): Block and enable async I/O.
1467 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1468 * server.h (block_async_io, unblock_async_io): Add prototypes.
1470 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1472 * remote-utils.c (remote_open): Print a status notice after
1474 * server.c (attach_inferior): Print a status notice after
1477 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1479 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1481 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1483 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1485 * server.c, target.h: Update copyright years.
1487 2004-02-25 Roland McGrath <roland@redhat.com>
1489 * target.h (struct target_ops): New member `read_auxv'.
1490 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1491 * linux-low.c (linux_read_auxv): New function.
1492 (linux_target_ops): Initialize `read_auxv' member to that.
1494 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1496 Committed by Jim Blandy <jimb@redhat.com>.
1498 * linux-s390-low.c (s390_num_regs): Update.
1499 (s390_regmap): Remove control registers. Use __s390x__ predefine
1500 instead of GPR_SIZE to distiguish s390 and s390x targets.
1502 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1504 * linux-low.c: Update copyright year.
1505 (check_removed_breakpoint): Clear pending_is_breakpoint.
1506 (linux_set_resume_request, linux_queue_one_thread)
1507 (resume_status_pending_p): New functions.
1508 (linux_continue_one_thread): Use process->resume.
1509 (linux_resume): Only resume threads if there are no pending events.
1510 * linux-low.h (struct process_info): Add resume request
1513 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1515 * regcache.c (new_register_cache): Clear the allocated register
1516 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1518 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1520 * linux-low.c (linux_resume): Take a struct thread_resume *
1522 (linux_wait): Update call.
1523 (resume_ptr): New static variable.
1524 (linux_continue_one_thread): Renamed from
1525 linux_continue_one_process. Use resume_ptr.
1526 (linux_resume): Use linux_continue_one_thread.
1527 * server.c (handle_v_cont, handle_v_requests): New functions.
1528 (myresume): New function.
1529 (main): Handle 'v' case.
1530 * target.h (struct thread_resume): New type.
1531 (struct target_ops): Change argument of "resume" to struct
1533 (myresume): Delete macro.
1535 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1537 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1538 (uninstall): Support DESTDIR.
1540 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1542 * configure.srv: Add xscale*linux copy of arm*linux entry.
1544 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1546 * linux-arm-low.c (arm_reinsert_addr): New function.
1547 (the_low_target): Add arm_reinsert_addr.
1549 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1551 * mem-break.c: Remove whitespace at end of file.
1553 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1555 * configure.in: Check whether we need to prototype strerror.
1556 * server.h: Optionally prototype strerror.
1557 * gdbreplay.c (perror_with_name): Use strerror.
1558 * linux-low.c (linux_attach_lwp): Use strerror.
1559 * utils.c (perror_with_name): Use strerror.
1560 * config.in, configure: Regenerated.
1562 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1564 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1565 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1567 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1569 * Makefile.in (SFILES): Update.
1570 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1571 low-sun3.c: Remove files.
1573 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1575 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1576 (linux_detach_one_process, linux_detach): New functions.
1577 (linux_target_ops): Add linux_detach.
1578 * server.c (main): Handle 'D' packet.
1579 * target.h (struct target_ops): Add "detach" member.
1580 (detach_inferior): Define.
1582 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1584 From Kelley Cook <kelleycook@wideopenwest.com>:
1585 * configure.srv: Accept i[34567]86 variants.
1587 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1589 * linux-low.c (linux_wait_for_event): Correct comment typos.
1590 (linux_resume_one_process): Call check_removed_breakpoint.
1591 (linux_send_signal): New function.
1592 (linux_target_ops): Add linux_send_signal.
1593 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1595 * target.h (struct target_ops): Add send_signal.
1597 2003-05-29 Jim Blandy <jimb@redhat.com>
1599 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1600 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1601 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1602 away part of the register's value.
1604 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1606 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1607 (linux_wait_for_event, linux_init_signals): Likewise.
1609 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1611 * configure.in: Check for stdlib.h.
1612 * configure: Regenerated.
1613 * config.in: Regenerated.
1615 2003-01-04 Andreas Schwab <schwab@suse.de>
1617 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1619 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1621 * Makefile.in: Remove obsolete code.
1623 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1625 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1626 defined(PT_FPR0_HI).
1628 2002-11-17 Stuart Hughes <seh@zee2.com>
1630 * linux-arm-low.c (arm_num_regs): Increase.
1631 (arm_regmap): Include status register.
1633 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1635 * linux-low.c (register_addr): Remove incorrect -1 check.
1637 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1639 * linux-low.c (linux_create_inferior): Call setpgid. Return
1641 (unstopped_p, linux_signal_pid): Remove.
1642 (linux_target_ops): Remove linux_signal_pid.
1643 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1644 global instead of target method.
1645 * target.h (struct target_ops): Remove signal_pid. Update comment
1646 for create_inferior.
1647 * server.c (signal_pid): New variable.
1648 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1649 gdbserver. Set the child to be the foreground process group.
1650 (attach_inferior): Set signal_pid.
1652 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1654 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1656 2002-08-20 Jim Blandy <jimb@redhat.com>
1658 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1661 2002-08-01 Andrew Cagney <cagney@redhat.com>
1663 * Makefile.in: Make chill references obsolete.
1665 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1667 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1668 * configure: Regenerate.
1669 * config.in: Regenerate.
1671 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1673 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1674 (perror_with_name, remote_close, remote_open, expect, play): Static.
1676 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1678 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1679 byte offsets instead of an array of indexes.
1680 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1682 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1684 * regcache.c: Add comment.
1686 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1688 * thread-db.c: New file.
1689 * proc-service.c: New file.
1690 * acinclude.m4: New file.
1691 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1692 proc-service.o, and thread-db.o.
1693 (linux-low.o): Add USE_THREAD_DB.
1694 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1695 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1696 * aclocal.m4: Regenerated.
1697 * config.in: Regenerated.
1698 * configure: Regenerated.
1699 * configure.in: Check for proc_service.h, sys/procfs.h,
1700 thread_db.h, and linux/elf.h headrs.
1701 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1702 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1703 Check for -lthread_db and thread support.
1704 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1705 PowerPC, and SuperH.
1706 * i387-fp.c: Constify arguments.
1707 * i387-fp.h: Likewise.
1708 * inferiors.c: (struct thread_info): Renamed from
1709 `struct inferior_info'. Remove PID member. Use generic inferior
1710 list header. All uses updated.
1711 (inferiors, signal_pid): Removed.
1712 (all_threads): New variable.
1713 (get_thread): Define.
1714 (add_inferior_to_list): New function.
1715 (for_each_inferior): New function.
1716 (change_inferior_id): New function.
1717 (add_inferior): Removed.
1718 (remove_inferior): New function.
1719 (add_thread): New function.
1720 (free_one_thread): New function.
1721 (remove_thread): New function.
1722 (clear_inferiors): Use for_each_inferior and free_one_thread.
1723 (find_inferior): New function.
1724 (find_inferior_id): New function.
1725 (inferior_target_data): Update argument type.
1726 (set_inferior_target_data): Likewise.
1727 (inferior_regcache_data): Likewise.
1728 (set_inferior_regcache_data): Likewise.
1729 * linux-low.c (linux_bp_reinsert): Remove.
1730 (all_processes, stopping_threads, using_thrads)
1731 (struct pending_signals, debug_threads, pid_of): New.
1732 (inferior_pid): Replace with macro.
1733 (struct inferior_linux_data): Remove.
1734 (get_stop_pc, add_process): New functions.
1735 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1736 Use add_process and add_thread.
1737 (linux_attach_lwp): New function, based on old linux_attach. Use
1738 add_process and add_thread. Set stop_expected for new threads.
1739 (linux_attach): New function.
1740 (linux_kill_one_process): New function.
1741 (linux_kill): Kill all LWPs.
1742 (linux_thread_alive): Use find_inferior_id.
1743 (check_removed_breakpoints, status_pending_p): New functions.
1744 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1745 Update. Use WNOHANG. Wait for cloned processes also. Update process
1746 struct for the found process.
1747 (linux_wait_for_event): New function.
1748 (linux_wait): Use it. Support LWPs.
1749 (send_sigstop, wait_for_sigstop, stop_all_processes)
1750 (linux_resume_one_process, linux_continue_one_process): New functions.
1751 (linux_resume): Support LWPs.
1752 (REGISTER_RAW_SIZE): Remove.
1753 (fetch_register): Use register_size instead. Call supply_register.
1754 (usr_store_inferior_registers): Likewise. Call collect_register.
1756 (regsets_fetch_inferior_registers): Improve error message.
1757 (regsets_store_inferior_registers): Add debugging.
1758 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1759 (unstopped_p, linux_signal_pid): New functions.
1760 (linux_target_ops): Add linux_signal_pid.
1761 (linux_init_signals): New function.
1762 (initialize_low): Call it. Initialize using_threads.
1763 * regcache.c (inferior_regcache_data): Add valid
1765 (get_regcache): Fetch registers lazily. Add fetch argument
1766 and update all callers.
1767 (regcache_invalidate_one, regcache_invalidate): New
1769 (new_register_cache): Renamed from create_register_cache.
1770 Return the new regcache.
1771 (free_register_cache): Change argument to a void *.
1772 (registers_to_string, registers_from_string): Call get_regcache
1773 with fetch flag set.
1774 (register_data): Make static. Pass fetch flag to get_regcache.
1775 (supply_register): Call get_regcache with fetch flag clear.
1776 (collect_register): Call get_regcache with fetch flag set.
1777 (collect_register_as_string): New function.
1778 * regcache.h: Update.
1779 * remote-utils.c (putpkt): Flush after debug output and use
1781 Handle input interrupts while waiting for an ACK.
1782 (input_interrupt): Use signal_pid method.
1783 (getpkt): Flush after debug output and use stderr.
1784 (outreg): Use collect_register_as_string.
1785 (new_thread_notify, dead_thread_notify): New functions.
1786 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1788 (look_up_one_symbol): Flush after debug output.
1789 * server.c (step_thread, server_waiting): New variables.
1790 (start_inferior): Don't use signal_pid. Update call to mywait.
1791 (attach_inferior): Update call to mywait.
1792 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1793 (main): Don't fetch/store registers explicitly. Use
1794 set_desired_inferior. Support proposed ``Hs'' packet. Update
1797 (struct inferior_list, struct_inferior_list_entry): New.
1798 * target.c (set_desired_inferior): New.
1799 (write_inferior_memory): Constify.
1800 (mywait): New function.
1802 (struct target_ops): New signal_pid method.
1803 (mywait): Removed macro, added prototype.
1805 * linux-low.h (regset_func): Removed.
1806 (regset_fill_func, regset_store_func): New.
1807 (enum regset_type): New.
1808 (struct regset_info): Add type field. Use new operation types.
1809 (struct linux_target_ops): stop_pc renamed to get_pc.
1810 Add decr_pc_after_break and breakpoint_at.
1811 (get_process, get_thread_proess, get_process_thread)
1812 (strut process_info, all_processes, linux_attach_lwp)
1813 (thread_db_init): New.
1815 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1816 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1817 (the_low_target): Add new members.
1818 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1819 (i386_store_fpxregset): Constify.
1820 (target_regsets): Add new kind identifier.
1821 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1822 (i386_set_pc): Add debugging.
1823 (i386_breakpoint_at): New function.
1824 (the_low_target): Add new members.
1825 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1826 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1827 (mips_breakpoint_at): New.
1828 (the_low_target): Add new members.
1829 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1830 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1831 (the_low_target): Add new members.
1832 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1833 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1834 (the_low_target): Add new members.
1835 * linux-x86-64-low.c (target_regsets): Add new kind
1838 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1840 From Martin Pool <mbp@samba.org>:
1841 * server.c (gdbserver_usage): New function.
1844 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1846 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1849 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1851 * Makefile.in: Remove obsolete code.
1853 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1855 * linux-low.c (regsets_fetch_inferior_registers),
1856 (regsets_store_inferior_registers): Removed cast to int from
1858 * regcache.h: Added declaration of struct inferior_info.
1860 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1862 * inferiors.c (struct inferior_info): Add regcache_data.
1863 (add_inferior): Call create_register_cache.
1864 (clear_inferiors): Call free_register_cache.
1865 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1866 * regcache.c (struct inferior_regcache_data): New.
1867 (registers): Remove.
1868 (get_regcache): New function.
1869 (create_register_cache, free_register_cache): New functions.
1870 (set_register_cache): Don't initialize the register cache here.
1871 (registers_to_string, registers_from_string, register_data): Call
1873 * regcache.h: Add prototypes.
1874 * server.h: Likewise.
1876 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1878 * mem-break.c: New file.
1879 * mem-break.h: New file.
1880 * Makefile.in: Add mem-break.o rule; update server.h
1882 * inferiors.c (struct inferior_info): Add target_data
1884 (clear_inferiors): Free target_data member if set.
1885 (inferior_target_data, set_inferior_target_data): New functions.
1886 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1887 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1888 * linux-low.c (linux_bp_reinsert): New variable.
1889 (struct inferior_linux_data): New.
1890 (linux_create_inferior): Use set_inferior_target_data.
1891 (linux_attach): Likewise. Call add_inferior.
1892 (linux_wait_for_one_inferior): New function.
1893 (linux_wait): Call it.
1894 (linux_write_memory): Add const.
1895 (initialize_low): Call set_breakpoint_data.
1896 * linux-low.h (struct linux_target_ops): Add breakpoint
1898 * server.c (attach_inferior): Remove extra add_inferior
1900 * server.h: Include mem-break.h. Update inferior.c
1902 * target.c (read_inferior_memory)
1903 (write_inferior_memory): New functions.
1904 * target.h (read_inferior_memory)
1905 (write_inferior_memory): Change macros to prototypes.
1906 (struct target_ops): Update comments. Add const to write_memory
1909 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1911 * linux-low.c (usr_store_inferior_registers): Support
1912 registers which are allowed to fail to store.
1913 * linux-low.h (linux_target_ops): Likewise.
1914 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1915 (ppc_cannot_store_register): FPSCR may not be storable.
1917 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1919 * server.h: Include <string.h> if HAVE_STRING_H.
1920 * ChangeLog: Correct paths in last ChangeLog entry.
1922 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1924 * linux-low.h: Remove obsolete prototypes.
1925 (struct linux_target_ops): New.
1926 (extern the_low_target): New.
1927 * linux-low.c (num_regs, regmap): Remove declarations.
1928 (register_addr): Use the_low_target explicitly.
1929 (fetch_register): Likewise.
1930 (usr_fetch_inferior_registers): Likewise.
1931 (usr_store_inferior_registers): Likewise.
1932 * linux-arm-low.c (num_regs): Remove.
1933 (arm_num_regs): Define.
1934 (arm_regmap): Renamed from regmap, made static.
1935 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1937 (arm_cannot_store_register): Renamed from cannot_store_register,
1939 (the_low_target): New.
1940 * linux-i386-low.c (num_regs): Remove.
1941 (i386_num_regs): Define.
1942 (i386_regmap): Renamed from regmap, made static.
1943 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1945 (i386_cannot_store_register): Renamed from cannot_store_register,
1947 (the_low_target): New.
1948 * linux-ia64-low.c (num_regs): Remove.
1949 (ia64_num_regs): Define.
1950 (ia64_regmap): Renamed from regmap, made static.
1951 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1953 (ia64_cannot_store_register): Renamed from cannot_store_register,
1955 (the_low_target): New.
1956 * linux-m68k-low.c (num_regs): Remove.
1957 (m68k_num_regs): Define.
1958 (m68k_regmap): Renamed from regmap, made static.
1959 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1961 (m68k_cannot_store_register): Renamed from cannot_store_register,
1963 (the_low_target): New.
1964 * linux-mips-low.c (num_regs): Remove.
1965 (mips_num_regs): Define.
1966 (mips_regmap): Renamed from regmap, made static.
1967 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1969 (mips_cannot_store_register): Renamed from cannot_store_register,
1971 (the_low_target): New.
1972 * linux-ppc-low.c (num_regs): Remove.
1973 (ppc_num_regs): Define.
1974 (ppc_regmap): Renamed from regmap, made static.
1975 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1977 (ppc_cannot_store_register): Renamed from cannot_store_register,
1979 (the_low_target): New.
1980 * linux-s390-low.c (num_regs): Remove.
1981 (s390_num_regs): Define.
1982 (s390_regmap): Renamed from regmap, made static.
1983 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1985 (s390_cannot_store_register): Renamed from cannot_store_register,
1987 (the_low_target): New.
1988 * linux-sh-low.c (num_regs): Remove.
1989 (sh_num_regs): Define.
1990 (sh_regmap): Renamed from regmap, made static.
1991 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1993 (sh_cannot_store_register): Renamed from cannot_store_register,
1995 (the_low_target): New.
1996 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1997 (the_low_target): New.
1999 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2001 * Makefile.in: Add stamp-h target.
2002 * configure.in: Create stamp-h.
2003 * configure: Regenerated.
2005 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2007 * inferiors.c: New file.
2008 * target.c: New file.
2009 * target.h: New file.
2010 * Makefile.in: Add target.o and inferiors.o. Update
2012 * linux-low.c (inferior_pid): New static variable,
2013 moved from server.c.
2014 (linux_create_inferior): Renamed from create_inferior.
2015 Call add_inferior. Return 0 on success instead of a PID.
2016 (linux_attach): Renamed from myattach.
2017 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2018 (linux_thread_alive): Renamed from mythread_alive.
2019 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2021 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2022 (regsets_store_inferior_registers): Correct error message.
2023 Add missing ``return 0''.
2024 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2025 (linux_store_registers): Renamed from store_inferior_registers.
2026 (linux_read_memory): Renamed from read_inferior_memory.
2027 (linux_write_memory): Renamed from write_inferior_memory.
2028 (linux_target_ops): New structure.
2029 (initialize_low): Call set_target_ops ().
2030 * remote-utils.c (unhexify): New function.
2031 (hexify): New function.
2032 (input_interrupt): Send signals to ``signal_pid''.
2033 * server.c (inferior_pid): Remove.
2034 (start_inferior): Update create_inferior call.
2035 (attach_inferior): Call add_inferior.
2036 (handle_query): New function.
2037 (main): Call handle_query for `q' packets.
2038 * server.h: Include "target.h". Remove obsolete prototypes.
2039 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2041 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2043 * Makefile.in: Add WARN_CFLAGS. Update configury
2045 * configure.in: Check for <string.h>
2046 * configure: Regenerate.
2047 * config.in: Regenerate.
2048 * gdbreplay.c: Include needed system headers.
2049 (remote_open): Remove strchr prototype.
2050 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2051 * regcache.c (supply_register): Change buf argument to const void *.
2052 (supply_register_by_name): Likewise.
2053 (collect_register): Change buf argument to void *.
2054 (collect_register_by_name): Likewise.
2055 * regcache.h: Add missing prototypes.
2056 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2057 * server.c (handle_query): New function.
2058 (attached): New static variable, moved out of main.
2059 (main): Quiet longjmp clobber warnings.
2060 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2061 * utils.c (error): Remove NORETURN.