1 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3 * hostio.c: Don't include errno.h.
4 (errno_to_fileio_errno): Move to hostio-errno.
5 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6 error number outputting to the target->hostio_last_error callback.
7 (hostio_packet_error): Use FILEIO_EINVAL directly.
8 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10 * hostio-errno.c: New.
11 * server.h (hostio_last_error_from_errno): Declare.
12 * target.h (target_ops): Add hostio_last_error member.
13 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14 as hostio_last_error handler.
15 * spu-low.c (spu_target_ops): Likewise.
16 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17 (wince_hostio_last_error): New functions.
18 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19 as hostio_last_error handler.
20 (win32_target_ops) [!_WIN32_WCE]: Register
21 hostio_last_error_from_errno as hostio_last_error handler.
22 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
23 (hostio-errno.o): New rule.
24 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
25 * configure.srv (srv_hostio_err_objs): New variable. Default to
27 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
28 * configure: Regenerate.
30 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
32 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
33 (linux_kill, linux_detach): Clean up the process list.
34 * remote-utils.c (remote_open): Improve port number parsing.
35 (putpkt_binary, input_interrupt): Only send interrupts if the target
37 * server.c (extended_protocol): Make static.
38 (attached): Define earlier.
39 (exit_requested, response_needed, program_argv): New variables.
40 (target_running): New.
41 (start_inferior): Clear attached here.
42 (attach_inferior): Set attached here.
43 (require_running): Define.
44 (handle_query): Use require_running and target_running. Implement
46 (handle_v_attach, handle_v_run): New.
47 (handle_v_requests): Use require_running. Handle vAttach and vRun.
48 (gdbserver_usage): Update.
49 (main): Redo argument parsing. Handle --debug and --multi. Handle
50 --attach along with other options or after the port. Save
51 program_argv. Support no initial program. Resynchronize
52 communication with GDB after an error. Handle "monitor exit".
53 Use require_running and target_running. Always allow the extended
54 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
55 restart in extended mode.
56 * README: Refer to the GDB manual. Update --attach usage.
58 2007-12-20 Andreas Schwab <schwab@suse.de>
60 * linux-low.c (STACK_SIZE): Define.
61 (linux_tracefork_child): Use it. Use __clone2 on ia64.
62 (linux_test_for_tracefork): Likewise.
64 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
66 * linux-low.c (linux_wait_for_event): Update messages. Do not
67 reinsert auto-delete breakpoints.
68 * mem-break.c (struct breakpoint): Change return type of handler to
70 (set_breakpoint_at): Update handler type.
71 (reinsert_breakpoint_handler): Return 1 instead of calling
73 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
75 (check_breakpoints): Delete auto-delete breakpoints and return 2.
76 * mem-break.h (set_breakpoint_at): Update handler type.
77 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
78 * win32-low.c (auto_delete_breakpoint): New.
79 (get_child_debug_event): Use it.
81 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
83 * configure.ac: Check for pread and pwrite.
84 * hostio.c (handle_pread): Fall back to lseek and read.
85 (handle_pwrite): Fall back to lseek and write.
86 * config.in, configure: Regenerated.
88 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
90 * server.c (myresume): Add own_buf argument.
93 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
95 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
96 * remote-utils.c (remote_open): Do not call disable_async_io.
97 (block_async_io): Delete.
98 (unblock_async_io): Make static.
99 (initialize_async_io): New.
100 * server.c (handle_v_cont): Handle async I/O here.
101 (myresume): Likewise. Move other common resume tasks here...
102 (main): ... from here. Call initialize_async_io. Disable async
103 I/O before the main loop.
104 * server.h (initialize_async_io): Declare.
105 (block_async_io, unblock_async_io): Delete prototypes.
106 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
108 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
110 * remote-utils.c (readchar): Allow binary data in received messages.
112 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
114 * win32-low.c (attaching): New global.
115 (win32_create_inferior): Clear the `attaching' global.
116 (win32_attach): Set the `attaching' global.
117 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
118 attaching. Only set a breakpoint at the entry point if not
121 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
123 * server.c (main): Don't report dll events on the initial
124 connection on attaches.
126 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
128 * server.c (main): Relax numerical bases supported for the pid of
129 the --attach command line argument.
131 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
133 * win32-low.c (win32_attach): Call OpenProcess before
134 DebugActiveProcess, not after. Add last error output to error
137 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
139 * win32-low.c (win32_get_thread_context)
140 (win32_set_thread_context): New functions.
141 (thread_rec): Use win32_get_thread_context.
142 (continue_one_thread, win32_resume): Use win32_set_thread_context.
143 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
147 Pedro Alves <pedro_alves@portugalmail.pt>
149 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
151 (child_add_thread): Minor cleanup.
152 (child_continue): Resume artificially suspended threads before
153 calling ContinueDebugEvent.
154 (suspend_one_thread): New.
155 (fake_breakpoint_event): New.
156 (get_child_debug_event): Change return type to int. Check here if
157 gdb sent an interrupt request. If a soft interrupt was requested,
158 fake a breakpoint event. Return 0 if there is no event to handle,
160 (win32_wait): Don't check here if gdb sent an interrupt request.
161 Ensure there is a valid event to handle.
162 (win32_request_interrupt): Add soft interruption method as last
166 Pedro Alves <pedro_alves@portugalmail.pt>
168 * win32-low.h (win32_thread_info): Add descriptions to the
169 structure members. Replace `suspend_count' counter by a
171 * win32-low.c (thread_rec): Update condition of when to get the
172 context from the inferior. Rely on ContextFlags being set if it
173 has already been retrieved. Only suspend the inferior thread if
174 we haven't already. Warn if that fails.
175 (continue_one_thread): s/suspend_count/suspended/. Only call
176 ResumeThread once. Warn if that fails.
178 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
180 * win32-low.c (win32_wait): Don't read from the inferior when it
183 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
185 * Makefile.in (win32_low_h): New variable.
186 (win32-low.o): Add dependency on $(win32_low_h).
187 (win32-arm-low.o, win32-i386-low.o): New rules.
189 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
191 * hostio.c: Correct copyright year.
193 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
195 * Makefile.in (OBS): Add hostio.o.
196 (hostio.o): New rule.
197 * server.h (handle_vFile): Declare.
198 * hostio.c: New file.
199 * server.c (handle_v_requests): Take packet_len and new_packet_len
200 for binary packets. Call handle_vFile.
201 (main): Update call to handle_v_requests.
203 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
205 * linux-low.c: Include <sched.h>.
207 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
209 * linux-low.c (linux_tracefork_grandchild): New.
210 (linux_tracefork_child): Use clone.
211 (linux_test_for_tracefork): Use clone; allocate and free a stack.
213 2007-10-31 Joel Brobecker <brobecker@adacore.com>
215 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
217 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
219 * linux-low.c (handle_extended_wait): Handle unexpected signals.
221 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
223 * inferiors.c (change_inferior_id): Delete.
224 (add_pid_to_list, pull_pid_from_list): New.
225 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
226 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
227 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
228 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
229 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
230 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
231 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
232 (using_threads): Always set to 1.
233 (handle_extended_wait): New.
234 (add_process): Do not set TID.
235 (linux_create_inferior): Set must_set_ptrace_flags.
236 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
237 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
238 (linux_thread_alive): Rename TID argument to LWPID.
239 (linux_wait_for_process): Handle unknown processes. Do not use TID.
240 (linux_wait_for_event): Do not use TID or check using_threads. Update
241 call to dead_thread_notify. Call handle_extended_wait.
242 (linux_create_inferior): Use PTRACE_SETOPTIONS.
243 (send_sigstop): Delete sigstop_sent.
244 (wait_for_sigstop): Avoid TID.
245 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
246 (linux_test_for_tracefork): New.
247 (linux_lookup_signals): Use thread_db_active and
248 linux_supports_tracefork_flag.
249 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
250 * linux-low.h (get_process_thread): Avoid TID.
251 (struct process_ifo): Move thread_known and tid to the end. Remove
253 (linux_attach_lwp, thread_db_init): Update prototypes.
254 * server.h (change_inferior_id): Delete prototype.
255 (add_pid_to_list, pull_pid_from_list): New prototypes.
256 * thread-db.c (thread_db_use_events): New.
257 (find_first_thread): Rename to...
258 (find_one_thread): ...this. Update callers and messages. Do not
259 call fatal. Check thread_db_use_events. Do not call
260 change_inferior_id or new_thread_notify.
261 (maybe_attach_thread): Update. Do not call new_thread_notify.
262 (thread_db_init): Set thread_db_use_events. Check use_events.
263 * utils.c (fatal, warning): Correct message prefix.
265 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
267 * Makefile.in (clean): Remove new files.
268 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
269 (powerpc-64.o, powerpc-64.c): New rules.
270 * configure.srv: Use alternate register sets for powerpc64-*-linux*
271 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
273 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
275 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
276 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
277 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
278 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
279 (target_regsets): Add AltiVec and SPE register sets.
280 * configure.ac: Check for AltiVec and SPE.
281 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
282 (ppc_fill_vrregset, ppc_store_vrregset): New.
283 (target_regsets): Add AltiVec register set.
284 * configure: Regenerated.
286 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
288 * linux-low.c (O_LARGEFILE): Define.
289 (linux_read_memory): Use /proc/PID/mem.
290 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
291 * configure, config.in: Regenerated.
293 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
295 * linux-low.c (linux_wait_for_event): Do not pass signals while
298 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
300 * win32-low.c (create_process): New.
301 (win32_create_inferior): Use create_process instead of
302 CreateProcess. If create_process failed retry appending an ".exe"
303 suffix. Store the GetLastError result immediatelly after
304 create_process calls and use it on the call to error.
306 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
308 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
310 2007-08-23 Joel Brobecker <brobecker@adacore.com>
312 * configure.ac: Switch license to GPLv3.
314 2007-08-01 Michael Snyder <msnyder@access-company.com>
316 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
318 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
320 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
322 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
323 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
324 CloseToolhelp32Snapshot.
325 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
326 CloseToolhelp32Snapshot.
328 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
330 * server.c (main): Check for inferior exit before main loop.
332 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
334 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
335 instead of on tmp_desc.
337 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
338 Daniel Jacobowitz <dan@codesourcery.com>
340 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
341 (add_thread): Minor cleanups.
342 (clear_inferiors): Move lower in the file. Clear the DLL
344 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
345 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
346 (xml_escape_text): New.
347 * server.c (handle_query): Handle qXfer:libraries:read. Report it
349 (handle_v_cont): Report errors.
350 (gdbserver_version): Update.
351 (main): Correct size of own_buf. Do not report initial DLL events.
352 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
353 (unloaded_dll, xml_escape_text): New.
354 * win32-low.c (enum target_waitkind): Update comments.
355 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
356 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
357 (win32_EnumProcessModules, win32_GetModuleInformation)
358 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
359 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
360 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
361 (win32_Module32First, win32_Module32Next, load_toolhelp)
362 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
363 (get_child_debug_event): Handle DLL events.
364 (win32_wait): Likewise.
366 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
368 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
369 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
371 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
373 * win32-low.c (handle_output_debug_string): Ignore event if not
376 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
378 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
380 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
382 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
384 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
386 * inferiors.c (change_inferior_id): Add comment.
387 * linux-low.c (check_removed_breakpoint): Add an early
388 prototype. Improve debug output.
389 (linux_attach): Doc update.
390 (linux_detach_one_process, linux_detach): Clean up before releasing
392 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
393 * linux-low.h (struct process_info): Doc improvement.
394 * mem-break.c (delete_all_breakpoints): New.
395 * mem-break.h (delete_all_breakpoints): New prototype.
396 * thread-db.c (find_first_thread): New.
397 (thread_db_create_event): Call it instead of
398 thread_db_find_new_threads. Clean up unused variables.
399 (maybe_attach_thread): Remove first thread handling.
400 (thread_db_find_new_threads): Use find_first_thread.
401 (thread_db_get_tls_address): Likewise.
403 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
405 * thread-db.c (thread_db_find_new_threads): Add prototype.
406 (thread_db_create_event): Check for the main thread before adding
408 (maybe_attach_thread): Only enable event reporting if TID == 0.
409 (thread_db_get_tls_address): Check for new threads.
411 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
413 * linux-low.c (linux_create_inferior): Try execv before execvp.
414 * spu-low.c (spu_create_inferior): Likewise.
416 2007-06-13 Mike Frysinger <vapier@gentoo.org>
418 * linux-low.c (linux_create_inferior): Change execv to execvp.
419 * spu-low.c (spu_create_inferior): Likewies.
421 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
423 * Makefile.in (clean): Clean new files instead of deleted ones.
424 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
425 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
427 * configure.srv: Specify XML files and new regformats for MIPS and
429 * linux-mips-low.c (mips_num_regs): Set to only used registers.
430 (mips_regmap): Do not fetch $0. Remove unused registers. Add
431 an entry for the restart register.
432 (mips_cannot_fetch_register, mips_cannot_store_register)
433 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
434 register names to match the XML descriptions.
435 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
436 restart register instead of $0.
438 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
439 Markus Deuling <deuling@de.ibm.com>
441 * remote-utils.c (decode_xfer_write): New function.
442 * server.h (decode_xfer_write): Add prototype.
443 * server.c (handle_query): Add PACKET_LEN argument. Support
444 qXfer:spu:read and qXfer:spu:write packets.
445 (main): Pass packet_len to handle_query.
446 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
447 * target.h (target_ops): Add qxfer_spu.
449 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
451 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
452 accessing non-seekable spufs files.
454 2007-05-16 Markus Deuling <deuling@de.ibm.com>
456 * server.c (handle_query): Add reply for qC packet.
458 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
459 Leo Zayas <lerele@champenstudios@com>
461 * server.h (check_remote_input_interrupt_request): New function.
462 * remote_utils.c (INVALID_DESCRIPTOR): New define.
463 (remote_desc): Initialize with INVALID_DESCRIPTOR.
464 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
465 (check_remote_input_interrupt_request): New function.
466 * server.h (check_remote_input_interrupt_request): Declare.
467 * win32-low.c (winapi_DebugBreakProcess,
468 winapi_GenerateConsoleCtrlEvent): New typedefs.
469 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
471 (win32_wait): Check for remote interrupt request
472 with check_remote_input_interrupt_request.
473 (win32_request_interrupt): New function.
474 (win32_target_op): Set request_interrupt to win32_request_interrupt.
476 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
478 * win32-low.c (debug_registers_changed,
479 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
480 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
481 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
482 (thread_rec): Get context using the low target.
483 (child_add_thread): Call thread_added on the low target,
484 which does the same thing.
486 (do_initial_child_stuff): Remove debug registers references.
487 Set context using the low target. Resume threads after
488 setting the contexts.
489 (child_continue): Remove dead variable. Remove debug
490 registers references.
491 (child_fetch_inferior_registers): Go through the low target.
492 (do_child_store_inferior_registers): Remove.
493 (child_store_inferior_registers): Go through the low target.
494 (win32_resume): Remove debug registers references.
495 Set context using the low target.
496 (handle_exception): Change return type to void. Don't record
497 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
498 first chance exception.
499 (get_child_debug_event): Change return type to void. Remove
500 goto loop. Always return after waiting for debug event.
501 (win32_wait): Convert to switch statement. Handle spurious
504 * win32-i386-low.c (debug_registers_changed,
505 debug_registers_used): New.
506 (initial_stuff): Rename to ...
507 (i386_initial_stuff): ... this. Clear debug registers
509 (store_debug_registers): Delete.
510 (i386_get_thread_context): New.
511 (load_debug_registers): Delete.
512 (i386_set_thread_context): New.
513 (i386_thread_added): New.
514 (single_step): Rename to ...
515 (i386_single_step): ... this.
516 (do_fetch_inferior_registers): Rename to ...
517 (i386_fetch_inferior_register): ... this.
518 (i386_store_inferior_register): New.
519 (the_low_target): Adapt to new interface.
521 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
522 (arm_get_thread_context): New.
523 (arm_set_thread_context): New.
525 (do_fetch_inferior_registers): Rename to ...
526 (arm_fetch_inferior_register): ... this.
527 (arm_store_inferior_register): New.
528 (arm_wince_breakpoint): Reimplement as unsigned long.
529 (arm_wince_breakpoint_len): Define.
530 (the_low_target): Adapt to new interface.
532 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
533 load_debug_registers. Add get_thread_context, set_thread_context,
534 thread_added and store_inferior_register. Rename
535 fetch_inferior_registers to fetch_inferior_register.
536 (regptr): Remove declaration.
538 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
540 * linux-low.c (linux_detach): Change return type to int. Return 0.
541 * spu-low.c (spu_detach): Likewise.
543 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
545 * target.h (target_ops): Change return type of detach to int.
547 (join_inferior): New.
548 * server.c (main): Don't skip detach support on mingw32.
549 If the inferior doesn't support detaching return error.
550 Call join_inferior instead of using waitpid.
551 * linux-low.c (linux_join): New.
552 (linux_target_op): Add linux_join.
553 * spu-low.c (spu_join): New.
554 (spu_target_ops): Add spu_join.
555 * win32-low.c (win32_detach): Adapt to new interface.
556 Reopen current_process_handle before detaching. Issue a child
557 resume before detaching.
559 (win32_target_op): Add win32_join.
561 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
563 * win32-low.c (win32-attach): Fix return value.
564 * target.h (target_ops): Describe ATTACH return values.
566 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
568 * win32-low.c (GETPROCADDRESS): Define.
569 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
570 (winapi_DebugSetProcessKillOnExit): Likewise.
571 (win32_create_inferior): Force usage of ansi CreateProcessA.
572 (win32_attach): Use GETPROCADDRESS.
573 (win32_detach): Likewise.
575 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
577 * win32-low.c (win32_wait): Don't use WSTOPSIG.
579 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
581 * win32-low.c: Commit leftover changes from 2007-03-29.
583 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
585 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
586 fields short instead of int. Add explicit padding.
587 (i387_cache_to_fsave): Remove unnecessary casts.
588 (i387_fsave_to_cache): Doc fix.
589 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
591 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
593 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
594 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
596 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
598 * configure.srv (arm*-*-mingw32ce*): Move near the other
601 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
603 * configure.ac: Add errno checking.
604 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
605 sys/file.h and malloc.h.
606 (AC_CHECK_DECLS): Add perror.
607 (srv_mingwce): Handle.
608 * configure.srv (i[34567]86-*-cygwin*): Add
609 win32-i386-low.o to srv_tgtobj.
610 (i[34567]86-*-mingw*): Likewise.
611 (arm*-*-mingw32ce*): Add case.
612 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
613 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
614 [__MINGW32CE__] (strerror): New function.
615 [__MINGW32CE__] (errno): Define to GetLastError.
616 [__MINGW32CE__] (COUNTOF): New macro.
617 (remote_open): Remove extra close call.
618 * mem-break.c (delete_breakpoint_at): New function.
619 * mem-break.h (delete_breakpoint_at): Declare.
620 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
621 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
622 [USE_WIN32API] (read, write): Add char* casts.
623 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
624 * server.h: Include wincecompat.h on Windows CE.
625 [HAVE_ERRNO_H]: Check.
626 (perror): Declare if not declared.
627 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
628 (perror_with_name): Remove errno declaration.
629 * wincecompat.h: New.
630 * wincecompat.c: New.
632 * win32-arm-low.c: New.
633 * win32-i386-low.c: New.
634 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
635 (OUTMSG2): Make it safe.
637 (COUNTOF): New macro.
638 (NUM_REGS): Get it from the low target.
639 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
640 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
641 (thread_rec): Let low target handle debug registers.
642 (child_add_thread): Likewise.
643 (child_init_thread_list): Likewise.
644 (continue_one_thread): Likewise.
646 (do_child_fetch_inferior_registers): Move to ...
647 * win32-i386-low.c: ... here, and rename to ...
648 (do_fetch_inferior_registers): ... this.
649 * win32-low.c (child_fetch_inferior_registers):
650 Go through the low target.
651 (do_child_store_inferior_registers): Use regptr.
652 (strwinerror): New function.
653 (win32_create_inferior): Handle Windows CE.
654 Use strwinerror instead of strerror on Windows error
655 codes. Add program to the error output.
656 Don't close the main thread handle on Windows CE.
657 (win32_attach): Use coredll.dll on Windows CE.
658 (win32_kill): Close current process and current
660 (win32_detach): Use coredll.dll on Windows CE.
661 (win32_resume): Let low target handle debug registers, and
663 (handle_exception): Add/Remove initial breakpoint. Avoid
664 non-existant WSTOPSIG on Windows CE.
665 (win32_read_inferior_memory): Cast to remove warning.
666 (win32_arch_string): Go through the low target.
667 (initialize_low): Call set_breakpoint_data with the low
669 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
670 FOP_REGNUM, mappings): Move to ...
671 * win32-i386-low.c: ... here.
672 * win32-low.c (win32_thread_info): Move to ...
673 * win32-low.h: ... here.
674 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
675 win32-arm-low.c and wincecompat.c.
677 (install-only:): Likewise.
678 (gdbserver:): Likewise.
679 (gdbreplay:): Likewise.
680 * config.in: Regenerate.
681 * configure: Regenerate.
683 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
685 * win32-low.c: Rename typedef thread_info to
686 win32_thread_info throughout.
688 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
690 * win32-i386-low.c: Rename to ...
691 * win32-low.c: ... this.
692 * configure.srv: Replace win32-i386-low.o with win32-low.o.
693 * Makefile.in: Likewise.
695 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
697 * remote-utils.c (monitor_output): Constify msg parameter.
698 * server.h (monitor_output): Likewise.
699 * win32-i386-low.c (handle_output_debug_string): New.
700 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
701 handle_output_debug_string.
702 (get_child_debug_event): Likewise.
704 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
706 * server.c (main): Correct strtoul check.
708 2007-03-27 Jon Ringle <jon@ringle.org>
710 * linux-low.c: Check __ARCH_HAS_MMU__ also.
712 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
714 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
716 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
718 * terminal.h: Check HAVE_SGTTY_H.
720 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
722 * remote-utils.c (remote_open): Print out the assigned port number.
724 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
726 * remote-utils.c (monitor_output): New function.
727 * server.c (debug_threads): Define here.
728 (monitor_show_help): New function.
729 (handle_query): Handle qRcmd.
730 (main): Do not handle 'd' packet.
731 * server.h (debug_threads, remote_debug, monitor_output): Declare.
732 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
735 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
737 * Makefile.in (EXEEXT): New.
738 (clean): Use $(EXEEXT).
740 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
742 * target.h (target_ops): Rename send_signal to request_interrupt,
743 and remove enum target_signal parameter.
744 * linux-low.c (linux_request_interrupt): Rename from
745 linux_send_signal, and always send SIGINT.
746 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
747 and always send SIGINT.
748 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
750 (input_interrupt): Likewise.
752 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
754 * server.c (get_features_xml): Check if target implemented
756 * win32-i386-low.c (win32_arch_string): New.
757 (win32_target_ops): Add win32_arch_string as arch_string member.
759 2007-02-22 Markus Deuling <deuling@de.ibm.com>
761 * spu-low.c (spu_arch_string): New.
762 (spu_target_ops): Add spu_arch_string.
764 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
766 * remote-utils.c: Remove HAVE_TERMINAL_H check.
767 * configure.ac: Do not check for terminal.h.
768 * configure, config.in: Regenerated.
770 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
772 * Makefile.in (OBS): Add $(XML_BUILTIN).
773 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
775 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
776 (arm-with-iwmmxt.c): New.
777 * config.in, configure: Regenerate.
778 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
779 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
780 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
781 (arm*-*-linux*): Add iWMMXt and regset support.
782 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
783 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
784 (arm_store_wmmxregset, target_regsets): New.
785 * server.c (get_features_xml): Take annex argument. Check builtin
787 (handle_query): Handle multiple annexes.
789 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
791 * remote-utils.c [USE_WIN32API] (read, write): Define.
792 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
795 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
797 * linux-i386-low.c (the_low_target): Set arch_string.
798 * linux-x86-64-low.c (the_low_target): Likewise.
799 * linux-low.c (linux_arch_string): New.
800 (linux_target_ops): Add it.
801 * linux-low.h (struct linux_target_ops): Add arch_string.
802 * server.c (write_qxfer_response): Use const void * for DATA.
803 (get_features_xml): New.
804 (handle_query): Handle qXfer:features:read. Report it for qSupported.
805 * target.h (struct target_ops): Add arch_string method.
807 2007-01-03 Denis Pilat <denis.pilat@st.com>
808 Daniel Jacobowitz <dan@codesourcery.com>
810 * linux-low.c (linux_kill): Handle being called with no threads.
811 * win32-i386-low.c (win32_kill): Likewise.
812 (get_child_debug_event): Clear current_process_handle.
814 2006-12-30 Denis PILAT <denis.pilat@st.com>
815 Daniel Jacobowitz <dan@codesourcery.com>
817 * remote-utils.c (remote_open): Check the type of specified
818 serial port devices before opening them.
819 * server.c (main): Kill the inferior if an error occurs during
820 the first remote_open.
822 2006-12-05 Markus Deuling <deuling@de.ibm.com>
824 * README: Update supported targets.
826 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
828 * Makefile.in (clean): Remove reg-mips64.c.
829 (reg-mips64.c, reg-mips64.o): New rules.
830 * configure.srv: Handle mips64. Include regset support for mips.
831 * linux-mips-low.c (union mips_register): New.
832 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
833 (mips_breakpoint, mips_breakpoint_at): Use int.
834 (mips_collect_register, mips_supply_register)
835 (mips_collect_register_32bit, mips_supply_register_32bit)
836 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
837 (mips_store_fpregset, target_regsets): New.
838 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
840 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
842 * configure.srv: Add target "spu*-*-*".
843 * Makefile.in (clean): Remove reg-spu.c.
844 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
845 * spu-low.c: New file.
847 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
849 * configure.ac: Correct td_thr_tls_get_addr test.
850 * configure: Regenerated.
852 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
854 * linux-low.c (linux_wait_for_event): Reformat. Use the
856 * remote-utils.c (decode_address_to_semicolon): New.
857 * server.c (pass_signals, handle_general_set): New.
858 (handle_query): Mention QPassSignals for qSupported.
859 (main): Call handle_general_set.
860 * server.h (pass_signals, decode_address_to_semicolon): New.
862 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
864 * server.c (handle_query): Correct error handling for read_auxv.
866 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
868 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
869 and srv_linux_thread_db to yes.
870 * linux-s390-low.c (s390_fill_gregset): New function.
871 (target_regsets): Define data structure.
873 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
875 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
876 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
877 * config.in, configure: Regenerated.
878 * inferiors.c (gdb_id_to_thread): New function.
879 (gdb_id_to_thread_id): Use it.
880 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
881 * linux-low.h (struct process_info): Add th member.
882 (thread_db_get_tls_address): New prototype.
883 * remote-utils.c (decode_address): Make non-static.
884 * server.c (handle_query): Handle qGetTLSAddr.
885 * server.h (gdb_id_to_thread, decode_address): New prototypes.
886 * target.h (struct target_ops): Add get_tls_address.
887 * thread-db.c (maybe_attach_thread): Save the thread handle.
888 (thread_db_get_tls_address): New.
890 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
892 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
893 (linux_resume_one_process): Take a siginfo_t *. Update all
894 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
895 (struct pending_signals): Add a siginfo_t.
896 (linux_wait_for_process): Always set last_status.
897 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
898 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
899 * linux-low.h (struct process_info): Add last_status.
901 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
903 * remote-utils.c (try_rle): New function.
904 (putpkt_binary): Use it.
906 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
908 * Makefile.in (clean): Clean reg-x86-64-linux.c.
909 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
910 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
911 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
912 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
915 2006-08-08 Richard Sandiford <richard@codesourcery.com>
917 * server.c (terminal_fd): New variable.
918 (old_foreground_pgrp): Likewise.
919 (restore_old_foreground_pgrp): New function.
920 (start_inferior): Record the terminal file descriptor in terminal_fd
921 and its original foreground group in old_foreground_pgrp. Register
922 restore_old_foreground_pgrp with atexit().
924 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
926 * server.c (handle_query): Correct qPart to qXfer.
928 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
930 * configure.ac: Check for more headers which are missing on
931 Windows. Automatically supply -lwsock32 and USE_WIN32API.
932 * configure.srv: Add Cygwin and mingw32.
933 * remote-utils.c: Don't include headers unconditionally which
934 are missing on mingw32. Include <winsock.h> for mingw32.
935 (remote_open): Adjust for mingw32 support. Flush
936 standard error after writing to it.
937 (remote_close, putpkt_binary, input_interrupt, block_async_io)
938 (unblock_async_io, enable_async_io, disable_async_io)
939 (readchar, getpkt): Update for Winsock support.
940 (prepare_resume_reply): Expect a protocol signal number.
941 * server.c: Disable <sys/wait.h> on mingw32.
942 (start_inferior): Adjust for mingw32 support. Flush
943 standard error after writing to it.
944 (attach_inferior): Likewise. Use protocol signal
946 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
948 * win32-i386-low.c: New file.
949 * Makefile.in (XM_CLIBS): Set.
950 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
951 (win32-i386-low.o): New dependency rule.
952 * linux-low.c (linux_wait): Use target signal numbers.
953 * target.h (struct target_ops): Doc fix.
954 * server.h (target_signal_to_name): New prototype.
955 * gdbreplay.c: Don't include headers unconditionally which
956 are missing on mingw32. Include <winsock.h> for mingw32.
957 (remote_close, remote_open): Adjust for Winsock support.
958 * configure, config.in: Regenerated.
960 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
962 * server.c (decode_xfer_read, write_qxfer_response): New.
963 (handle_query): Take a packet length argument. Handle
964 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
965 the qSupported response.
966 (main): Update call to handle_query.
968 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
970 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
971 (putpkt_binary): Renamed from putpkt and adjusted for binary
973 (putpkt): New wrapper for putpkt_binary.
974 (readchar): Don't mask off the high bit.
975 (decode_X_packet): New function.
976 * server.c (main): Call putpkt_binary if a handler sets the packet
977 length. Save the length of the incoming packet. Handle 'X'.
978 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
980 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
982 * server.c (handle_query): Handle qSupported.
984 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
986 * remote-utils.c (all_symbols_looked_up): New variable.
987 (look_up_one_symbol): Check it.
988 * server.h (look_up_one_symbol): New declaration.
989 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
991 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
993 * Makefile.in (linux-arm-low.o): Update dependencies.
994 * linux-arm-low.c: Include "gdb_proc_service.h".
995 (PTRACE_GET_THREAD_AREA): Define.
996 (ps_get_thread_area): New function.
998 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1000 * configure.srv (m68k*-*-uclinux*): New target.
1001 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1002 (linux_resume_one_process): Remove extraneous cast.
1003 (linux_read_offsets): New.
1004 (linux_target_op): Add linux_read_offsets on mmuless systems.
1005 * server.c (handle_query): Add qOffsets logic.
1006 * target.h (struct target_ops): Add read_offsets.
1008 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1010 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1011 (PTRACE_GET_THREAD_AREA): Define.
1012 (ps_get_thread_area): New function.
1013 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1014 (linux-x86-64-low.o): Update.
1016 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1018 * configure.ac: Remove checks for prfpregset_t.
1019 * gdb_proc_service.h: New file.
1020 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1021 new "gdb_proc_service.h".
1022 * proc-service.c: Likewise.
1023 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1024 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1025 * Makefile.in (gdb_proc_service_h): Updated.
1026 * configure, config.in: Regenerated.
1028 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1030 * remote-utils.c (prepare_resume_reply): Move declaration
1031 of gdb_id_from_wait to the top of the block.
1033 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1035 * linux-low.c (regsets_store_inferior_registers): Read the regset
1036 from the target before filling it.
1038 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1040 * server.c (attach_inferior): Return SIGTRAP for a successful
1043 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1045 * Makefile.in (OBS): Add version.o.
1046 (STAGESTUFF): Delete.
1047 (version.o): Add dependencies.
1048 (version.c): Replace rule.
1049 (clean): Remove version.c.
1050 * server.c (gdbserver_version): New.
1051 (gdbserver_usage): Use printf.
1052 (main): Handle --version and --help.
1053 * server.h (version, host_name): Add declarations.
1055 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1067 * linux-x86-64-low.c:
1070 * linux-ppc64-low.c:
1079 * linux-crisv32-low.c:
1091 * gdbserver.1: Add (C) after Copyright. Update the FSF
1094 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1096 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1097 (arm_breakpoint_at): Recognize both breakpoints.
1098 (the_low_target): Use the correct breakpoint instruction.
1100 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1102 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1103 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1104 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1105 (the_low_target): Update.
1107 2005-10-25 Andreas Schwab <schwab@suse.de>
1109 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1111 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1112 (ia64_num_regs): Reduce to 462.
1114 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1116 * acinclude.m4: Correct quoting.
1117 * aclocal.m4: Regenerated.
1119 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1120 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1121 (thread_db_init): Call thread_db_err_str.
1122 * configure.ac: Check for TD_VERSION.
1123 * config.in, configure: Regenerated.
1125 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1127 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1129 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1131 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1132 is not available. Define HAVE_PTRACE_GETREGS if it is.
1133 * config.in, configure: Regenerated.
1134 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1135 * linux-i386-low.c, linux-m68k-low.c: Update to use
1136 HAVE_PTRACE_GETREGS.
1137 * linux-low.c (regsets_fetch_inferior_registers)
1138 (regsets_store_inferior_registers): Only return 0 if we processed
1140 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1141 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1143 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1145 * inferiors.c (struct thread_info): Add gdb_id.
1146 (add_thread): Add gdb_id argument.
1147 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1148 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1149 calls to add_thread.
1150 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1151 * server.c (handle_query): Use thread_to_gdb_id.
1152 (handle_v_cont, main): Use gdb_id_to_thread_id.
1153 * server.h (add_thread): Update prototype.
1154 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1157 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1159 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1160 left-padded registers.
1161 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1162 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1164 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1166 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1167 * configure: Regenerate.
1168 * config.in: Regenerate.
1169 * server.h (NEED_DECLARATION_STRERROR):
1170 Replace with !HAVE_DECL_STRERROR.
1172 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1174 * linux-low.c (linux_wait, linux_send_signal): Don't test
1175 an unsigned long variable for > 0 if it could be MAX_ULONG.
1176 * server.c (myresume): Likewise.
1177 * target.c (set_desired_inferior): Likewise.
1179 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1181 * configure.ac: Simplify and improve check for socklen_t.
1182 * configure, config.in: Regenerate.
1184 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1186 * acconfig.h: Remove.
1187 * configure.ac: Add a test for socklen_t. Use three-argument
1188 AC_DEFINE throughout.
1189 * config.in: Regenerated using autoheader 2.59.
1190 * configure: Regenerated.
1192 * gdbreplay.c (socklen_t): Provide a default.
1193 (remote_open): Use socklen_t.
1194 * remote-utils.c (socklen_t): Provide a default.
1195 (remote_open): Use socklen_t.
1196 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1199 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1201 * linux-low.c (linux_read_memory, linux_write_memory)
1202 (linux_read_auxv): Likewise.
1203 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1204 (check_mem_write): Likewise.
1205 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1207 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1208 (registers_from_string, register_data): Likewise.
1209 * server.c (handle_query, main): Likewise.
1210 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1211 (decode_M_packet): Likewise.
1212 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1213 * target.h (struct target_ops): Update read_memory, write_memory,
1215 (read_inferior_memory, write_inferior_memory): Update.
1216 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1218 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1219 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1220 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1221 linux-s390-low.c, linux-sh-low.c: Update for changes in
1222 read_inferior_memory and the_low_target->breakpoint.
1224 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1226 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1227 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1228 * configure.srv: Add powerpc64-*-linux*.
1229 * linux-ppc64-low.c: New file.
1231 2005-05-23 Orjan Friberg <orjanf@axis.com>
1233 * linux-cris-low.c: New file with support for CRIS.
1234 * linux-crisv32-low.c: Ditto for CRISv32.
1235 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1236 (clean): Add reg-cris.c and reg-crisv32.c.
1237 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1238 reg-crisv32.o, and reg-crisv32.c to make rules.
1239 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1242 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1244 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1245 of sizeof (PTRACE_XFER_TYPE).
1246 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1248 2005-05-12 Orjan Friberg <orjanf@axis.com>
1250 * target.h (struct target_ops): Add insert_watchpoint,
1251 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1252 pointers for hardware watchpoint support.
1253 * linux-low.h (struct linux_target_ops): Ditto.
1254 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1255 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1256 to linux_target_ops.
1257 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1259 * server.c (main): Recognize 'Z' and 'z' packets.
1261 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1263 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1264 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1265 (the_low_target): Add new members.
1267 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1269 * proc-service.c (ps_lgetregs): Search all_processes instead of
1272 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1274 * server.c (start_inferior): Change return type to int.
1275 (attach_inferior): Change sigptr to int *.
1276 (handle_v_cont, handle_v_requests): Change signal to int *.
1277 (main): Change signal to int.
1279 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1281 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1282 * configure.srv: Add m32r*-*-linux*.
1283 * linux-m32r-low.c: New file.
1285 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1287 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1289 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1291 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1292 Take unsigned long arguments for PIDs.
1293 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1294 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1295 (wait_for_sigstop, linux_resume_one_process)
1296 (regsets_fetch_inferior_registers, linux_send_signal)
1297 (linux_read_auxv): Likewise. Update the types of variables holding
1298 PIDs. Update format string specifiers.
1299 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1300 * remote-utils.c (prepare_resume_reply): Likewise.
1301 * server.c (cont_thread, general_thread, step_thread)
1302 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1304 (handle_query): Update format specifiers.
1305 (handle_v_cont, main): Use strtoul for thread IDs.
1306 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1307 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1308 (general_thread, step_thread, thread_from_wait)
1309 (old_thread_from_wait): Update.
1310 * target.h (struct thread_resume): Use unsigned long for THREAD.
1311 (struct target_ops): Use unsigned long for arguments to attach and
1314 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1316 * acinclude.m4: Include bfd/bfd.m4 directly.
1317 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1318 <agriffis@toolchain.org>.
1319 * aclocal.m4, configure: Regenerated.
1321 2005-01-07 Andrew Cagney <cagney@gnu.org>
1323 * configure.ac: Rename configure.in, require autoconf 2.59.
1324 * configure: Re-generate.
1326 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1328 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1330 * aclocal.m4: Regenerated.
1331 * configure: Regenerated.
1333 2004-11-21 Andreas Schwab <schwab@suse.de>
1335 * linux-m68k-low.c (m68k_num_gregs): Define.
1336 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1337 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1338 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1339 (m68k_breakpoint_at): New. Add to the_low_target.
1341 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1342 srv_linux_thread_db to yes.
1344 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1346 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1347 (ARCH_SET_FS): Likewise.
1348 (ARCH_GET_FS): Likewise.
1349 (ARCH_GET_GS): Likewise.
1351 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1353 * linux-i386-low.c (ps_get_thread_area): New.
1354 * linux-x86-64-low.c (ps_get_thread_area): New.
1355 * linux-low.c: Include <sys/syscall.h>.
1356 (linux_kill_one_process): Don't kill the first thread here.
1357 (linux_kill): Kill the first thread here.
1358 (kill_lwp): New function.
1359 (send_sigstop, linux_send_signal): Use it.
1360 * proc-service.c: Clean up #ifdefs.
1361 (fpregset_info): Delete.
1362 (ps_lgetregs): Update and enable implementation.
1363 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1365 * remote-utils.c (struct sym_cache, symbol_cache): New.
1366 (input_interrupt): Print a clearer message.
1367 (async_io_enabled): New variable.
1368 (enable_async_io, disable_async_io): Use it. Update comments.
1369 (look_up_one_symbol): Use the symbol cache.
1370 * thread-db.c (thread_db_look_up_symbols): New function.
1371 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1373 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1375 * configure.in: Test for -rdynamic.
1376 * configure: Regenerated.
1377 * Makefile (INTERNAL_LDFLAGS): New.
1378 (gdbserver, gdbreplay): Use it.
1380 2004-09-02 Andrew Cagney <cagney@gnu.org>
1382 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1384 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1386 * linux-low.c (linux_wait): Clear all_processes list also.
1388 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1390 * linux-low.c: Include <errno.h>. Remove extern declaration of
1393 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1395 * gdbreplay.c, server.h, utils.c: Update copyright years.
1397 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1399 * server.c (main): Print child status or termination signal from
1400 variable 'signal', not 'sig'.
1402 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1404 * linux-low.c (linux_read_memory): Change return type to
1405 int. Check for and return error from ptrace().
1406 * target.c (read_inferior_memory): Change return type to int. Pass
1407 back return status from the_target->read_memory().
1408 * target.h (struct target_ops): Adapt *read_memory() prototype.
1410 (read_inferior_memory): Adapt prototype.
1411 * server.c (main): Return an error packet if
1412 read_inferior_memory() returns an error.
1414 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1416 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1417 Unify with other clean targets.
1419 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1421 * server.c (handle_v_cont): Call set_desired_inferior.
1423 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1425 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1427 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1429 * linux-low.c (linux_wait): Unblock async I/O.
1430 (linux_resume): Block and enable async I/O.
1431 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1432 * server.h (block_async_io, unblock_async_io): Add prototypes.
1434 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1436 * remote-utils.c (remote_open): Print a status notice after
1438 * server.c (attach_inferior): Print a status notice after
1441 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1443 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1445 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1447 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1449 * server.c, target.h: Update copyright years.
1451 2004-02-25 Roland McGrath <roland@redhat.com>
1453 * target.h (struct target_ops): New member `read_auxv'.
1454 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1455 * linux-low.c (linux_read_auxv): New function.
1456 (linux_target_ops): Initialize `read_auxv' member to that.
1458 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1460 Committed by Jim Blandy <jimb@redhat.com>.
1462 * linux-s390-low.c (s390_num_regs): Update.
1463 (s390_regmap): Remove control registers. Use __s390x__ predefine
1464 instead of GPR_SIZE to distiguish s390 and s390x targets.
1466 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1468 * linux-low.c: Update copyright year.
1469 (check_removed_breakpoint): Clear pending_is_breakpoint.
1470 (linux_set_resume_request, linux_queue_one_thread)
1471 (resume_status_pending_p): New functions.
1472 (linux_continue_one_thread): Use process->resume.
1473 (linux_resume): Only resume threads if there are no pending events.
1474 * linux-low.h (struct process_info): Add resume request
1477 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1479 * regcache.c (new_register_cache): Clear the allocated register
1480 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1482 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1484 * linux-low.c (linux_resume): Take a struct thread_resume *
1486 (linux_wait): Update call.
1487 (resume_ptr): New static variable.
1488 (linux_continue_one_thread): Renamed from
1489 linux_continue_one_process. Use resume_ptr.
1490 (linux_resume): Use linux_continue_one_thread.
1491 * server.c (handle_v_cont, handle_v_requests): New functions.
1492 (myresume): New function.
1493 (main): Handle 'v' case.
1494 * target.h (struct thread_resume): New type.
1495 (struct target_ops): Change argument of "resume" to struct
1497 (myresume): Delete macro.
1499 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1501 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1502 (uninstall): Support DESTDIR.
1504 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1506 * configure.srv: Add xscale*linux copy of arm*linux entry.
1508 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1510 * linux-arm-low.c (arm_reinsert_addr): New function.
1511 (the_low_target): Add arm_reinsert_addr.
1513 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1515 * mem-break.c: Remove whitespace at end of file.
1517 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1519 * configure.in: Check whether we need to prototype strerror.
1520 * server.h: Optionally prototype strerror.
1521 * gdbreplay.c (perror_with_name): Use strerror.
1522 * linux-low.c (linux_attach_lwp): Use strerror.
1523 * utils.c (perror_with_name): Use strerror.
1524 * config.in, configure: Regenerated.
1526 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1528 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1529 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1531 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1533 * Makefile.in (SFILES): Update.
1534 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1535 low-sun3.c: Remove files.
1537 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1539 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1540 (linux_detach_one_process, linux_detach): New functions.
1541 (linux_target_ops): Add linux_detach.
1542 * server.c (main): Handle 'D' packet.
1543 * target.h (struct target_ops): Add "detach" member.
1544 (detach_inferior): Define.
1546 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1548 From Kelley Cook <kelleycook@wideopenwest.com>:
1549 * configure.srv: Accept i[34567]86 variants.
1551 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1553 * linux-low.c (linux_wait_for_event): Correct comment typos.
1554 (linux_resume_one_process): Call check_removed_breakpoint.
1555 (linux_send_signal): New function.
1556 (linux_target_ops): Add linux_send_signal.
1557 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1559 * target.h (struct target_ops): Add send_signal.
1561 2003-05-29 Jim Blandy <jimb@redhat.com>
1563 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1564 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1565 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1566 away part of the register's value.
1568 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1570 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1571 (linux_wait_for_event, linux_init_signals): Likewise.
1573 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1575 * configure.in: Check for stdlib.h.
1576 * configure: Regenerated.
1577 * config.in: Regenerated.
1579 2003-01-04 Andreas Schwab <schwab@suse.de>
1581 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1583 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1585 * Makefile.in: Remove obsolete code.
1587 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1589 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1590 defined(PT_FPR0_HI).
1592 2002-11-17 Stuart Hughes <seh@zee2.com>
1594 * linux-arm-low.c (arm_num_regs): Increase.
1595 (arm_regmap): Include status register.
1597 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1599 * linux-low.c (register_addr): Remove incorrect -1 check.
1601 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1603 * linux-low.c (linux_create_inferior): Call setpgid. Return
1605 (unstopped_p, linux_signal_pid): Remove.
1606 (linux_target_ops): Remove linux_signal_pid.
1607 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1608 global instead of target method.
1609 * target.h (struct target_ops): Remove signal_pid. Update comment
1610 for create_inferior.
1611 * server.c (signal_pid): New variable.
1612 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1613 gdbserver. Set the child to be the foreground process group.
1614 (attach_inferior): Set signal_pid.
1616 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1618 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1620 2002-08-20 Jim Blandy <jimb@redhat.com>
1622 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1625 2002-08-01 Andrew Cagney <cagney@redhat.com>
1627 * Makefile.in: Make chill references obsolete.
1629 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1631 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1632 * configure: Regenerate.
1633 * config.in: Regenerate.
1635 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1637 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1638 (perror_with_name, remote_close, remote_open, expect, play): Static.
1640 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1642 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1643 byte offsets instead of an array of indexes.
1644 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1646 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1648 * regcache.c: Add comment.
1650 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1652 * thread-db.c: New file.
1653 * proc-service.c: New file.
1654 * acinclude.m4: New file.
1655 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1656 proc-service.o, and thread-db.o.
1657 (linux-low.o): Add USE_THREAD_DB.
1658 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1659 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1660 * aclocal.m4: Regenerated.
1661 * config.in: Regenerated.
1662 * configure: Regenerated.
1663 * configure.in: Check for proc_service.h, sys/procfs.h,
1664 thread_db.h, and linux/elf.h headrs.
1665 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1666 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1667 Check for -lthread_db and thread support.
1668 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1669 PowerPC, and SuperH.
1670 * i387-fp.c: Constify arguments.
1671 * i387-fp.h: Likewise.
1672 * inferiors.c: (struct thread_info): Renamed from
1673 `struct inferior_info'. Remove PID member. Use generic inferior
1674 list header. All uses updated.
1675 (inferiors, signal_pid): Removed.
1676 (all_threads): New variable.
1677 (get_thread): Define.
1678 (add_inferior_to_list): New function.
1679 (for_each_inferior): New function.
1680 (change_inferior_id): New function.
1681 (add_inferior): Removed.
1682 (remove_inferior): New function.
1683 (add_thread): New function.
1684 (free_one_thread): New function.
1685 (remove_thread): New function.
1686 (clear_inferiors): Use for_each_inferior and free_one_thread.
1687 (find_inferior): New function.
1688 (find_inferior_id): New function.
1689 (inferior_target_data): Update argument type.
1690 (set_inferior_target_data): Likewise.
1691 (inferior_regcache_data): Likewise.
1692 (set_inferior_regcache_data): Likewise.
1693 * linux-low.c (linux_bp_reinsert): Remove.
1694 (all_processes, stopping_threads, using_thrads)
1695 (struct pending_signals, debug_threads, pid_of): New.
1696 (inferior_pid): Replace with macro.
1697 (struct inferior_linux_data): Remove.
1698 (get_stop_pc, add_process): New functions.
1699 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1700 Use add_process and add_thread.
1701 (linux_attach_lwp): New function, based on old linux_attach. Use
1702 add_process and add_thread. Set stop_expected for new threads.
1703 (linux_attach): New function.
1704 (linux_kill_one_process): New function.
1705 (linux_kill): Kill all LWPs.
1706 (linux_thread_alive): Use find_inferior_id.
1707 (check_removed_breakpoints, status_pending_p): New functions.
1708 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1709 Update. Use WNOHANG. Wait for cloned processes also. Update process
1710 struct for the found process.
1711 (linux_wait_for_event): New function.
1712 (linux_wait): Use it. Support LWPs.
1713 (send_sigstop, wait_for_sigstop, stop_all_processes)
1714 (linux_resume_one_process, linux_continue_one_process): New functions.
1715 (linux_resume): Support LWPs.
1716 (REGISTER_RAW_SIZE): Remove.
1717 (fetch_register): Use register_size instead. Call supply_register.
1718 (usr_store_inferior_registers): Likewise. Call collect_register.
1720 (regsets_fetch_inferior_registers): Improve error message.
1721 (regsets_store_inferior_registers): Add debugging.
1722 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1723 (unstopped_p, linux_signal_pid): New functions.
1724 (linux_target_ops): Add linux_signal_pid.
1725 (linux_init_signals): New function.
1726 (initialize_low): Call it. Initialize using_threads.
1727 * regcache.c (inferior_regcache_data): Add valid
1729 (get_regcache): Fetch registers lazily. Add fetch argument
1730 and update all callers.
1731 (regcache_invalidate_one, regcache_invalidate): New
1733 (new_register_cache): Renamed from create_register_cache.
1734 Return the new regcache.
1735 (free_register_cache): Change argument to a void *.
1736 (registers_to_string, registers_from_string): Call get_regcache
1737 with fetch flag set.
1738 (register_data): Make static. Pass fetch flag to get_regcache.
1739 (supply_register): Call get_regcache with fetch flag clear.
1740 (collect_register): Call get_regcache with fetch flag set.
1741 (collect_register_as_string): New function.
1742 * regcache.h: Update.
1743 * remote-utils.c (putpkt): Flush after debug output and use
1745 Handle input interrupts while waiting for an ACK.
1746 (input_interrupt): Use signal_pid method.
1747 (getpkt): Flush after debug output and use stderr.
1748 (outreg): Use collect_register_as_string.
1749 (new_thread_notify, dead_thread_notify): New functions.
1750 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1752 (look_up_one_symbol): Flush after debug output.
1753 * server.c (step_thread, server_waiting): New variables.
1754 (start_inferior): Don't use signal_pid. Update call to mywait.
1755 (attach_inferior): Update call to mywait.
1756 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1757 (main): Don't fetch/store registers explicitly. Use
1758 set_desired_inferior. Support proposed ``Hs'' packet. Update
1761 (struct inferior_list, struct_inferior_list_entry): New.
1762 * target.c (set_desired_inferior): New.
1763 (write_inferior_memory): Constify.
1764 (mywait): New function.
1766 (struct target_ops): New signal_pid method.
1767 (mywait): Removed macro, added prototype.
1769 * linux-low.h (regset_func): Removed.
1770 (regset_fill_func, regset_store_func): New.
1771 (enum regset_type): New.
1772 (struct regset_info): Add type field. Use new operation types.
1773 (struct linux_target_ops): stop_pc renamed to get_pc.
1774 Add decr_pc_after_break and breakpoint_at.
1775 (get_process, get_thread_proess, get_process_thread)
1776 (strut process_info, all_processes, linux_attach_lwp)
1777 (thread_db_init): New.
1779 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1780 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1781 (the_low_target): Add new members.
1782 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1783 (i386_store_fpxregset): Constify.
1784 (target_regsets): Add new kind identifier.
1785 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1786 (i386_set_pc): Add debugging.
1787 (i386_breakpoint_at): New function.
1788 (the_low_target): Add new members.
1789 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1790 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1791 (mips_breakpoint_at): New.
1792 (the_low_target): Add new members.
1793 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1794 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1795 (the_low_target): Add new members.
1796 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1797 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1798 (the_low_target): Add new members.
1799 * linux-x86-64-low.c (target_regsets): Add new kind
1802 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1804 From Martin Pool <mbp@samba.org>:
1805 * server.c (gdbserver_usage): New function.
1808 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1810 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1813 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1815 * Makefile.in: Remove obsolete code.
1817 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1819 * linux-low.c (regsets_fetch_inferior_registers),
1820 (regsets_store_inferior_registers): Removed cast to int from
1822 * regcache.h: Added declaration of struct inferior_info.
1824 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1826 * inferiors.c (struct inferior_info): Add regcache_data.
1827 (add_inferior): Call create_register_cache.
1828 (clear_inferiors): Call free_register_cache.
1829 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1830 * regcache.c (struct inferior_regcache_data): New.
1831 (registers): Remove.
1832 (get_regcache): New function.
1833 (create_register_cache, free_register_cache): New functions.
1834 (set_register_cache): Don't initialize the register cache here.
1835 (registers_to_string, registers_from_string, register_data): Call
1837 * regcache.h: Add prototypes.
1838 * server.h: Likewise.
1840 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1842 * mem-break.c: New file.
1843 * mem-break.h: New file.
1844 * Makefile.in: Add mem-break.o rule; update server.h
1846 * inferiors.c (struct inferior_info): Add target_data
1848 (clear_inferiors): Free target_data member if set.
1849 (inferior_target_data, set_inferior_target_data): New functions.
1850 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1851 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1852 * linux-low.c (linux_bp_reinsert): New variable.
1853 (struct inferior_linux_data): New.
1854 (linux_create_inferior): Use set_inferior_target_data.
1855 (linux_attach): Likewise. Call add_inferior.
1856 (linux_wait_for_one_inferior): New function.
1857 (linux_wait): Call it.
1858 (linux_write_memory): Add const.
1859 (initialize_low): Call set_breakpoint_data.
1860 * linux-low.h (struct linux_target_ops): Add breakpoint
1862 * server.c (attach_inferior): Remove extra add_inferior
1864 * server.h: Include mem-break.h. Update inferior.c
1866 * target.c (read_inferior_memory)
1867 (write_inferior_memory): New functions.
1868 * target.h (read_inferior_memory)
1869 (write_inferior_memory): Change macros to prototypes.
1870 (struct target_ops): Update comments. Add const to write_memory
1873 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1875 * linux-low.c (usr_store_inferior_registers): Support
1876 registers which are allowed to fail to store.
1877 * linux-low.h (linux_target_ops): Likewise.
1878 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1879 (ppc_cannot_store_register): FPSCR may not be storable.
1881 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1883 * server.h: Include <string.h> if HAVE_STRING_H.
1884 * ChangeLog: Correct paths in last ChangeLog entry.
1886 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1888 * linux-low.h: Remove obsolete prototypes.
1889 (struct linux_target_ops): New.
1890 (extern the_low_target): New.
1891 * linux-low.c (num_regs, regmap): Remove declarations.
1892 (register_addr): Use the_low_target explicitly.
1893 (fetch_register): Likewise.
1894 (usr_fetch_inferior_registers): Likewise.
1895 (usr_store_inferior_registers): Likewise.
1896 * linux-arm-low.c (num_regs): Remove.
1897 (arm_num_regs): Define.
1898 (arm_regmap): Renamed from regmap, made static.
1899 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1901 (arm_cannot_store_register): Renamed from cannot_store_register,
1903 (the_low_target): New.
1904 * linux-i386-low.c (num_regs): Remove.
1905 (i386_num_regs): Define.
1906 (i386_regmap): Renamed from regmap, made static.
1907 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1909 (i386_cannot_store_register): Renamed from cannot_store_register,
1911 (the_low_target): New.
1912 * linux-ia64-low.c (num_regs): Remove.
1913 (ia64_num_regs): Define.
1914 (ia64_regmap): Renamed from regmap, made static.
1915 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1917 (ia64_cannot_store_register): Renamed from cannot_store_register,
1919 (the_low_target): New.
1920 * linux-m68k-low.c (num_regs): Remove.
1921 (m68k_num_regs): Define.
1922 (m68k_regmap): Renamed from regmap, made static.
1923 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1925 (m68k_cannot_store_register): Renamed from cannot_store_register,
1927 (the_low_target): New.
1928 * linux-mips-low.c (num_regs): Remove.
1929 (mips_num_regs): Define.
1930 (mips_regmap): Renamed from regmap, made static.
1931 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1933 (mips_cannot_store_register): Renamed from cannot_store_register,
1935 (the_low_target): New.
1936 * linux-ppc-low.c (num_regs): Remove.
1937 (ppc_num_regs): Define.
1938 (ppc_regmap): Renamed from regmap, made static.
1939 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1941 (ppc_cannot_store_register): Renamed from cannot_store_register,
1943 (the_low_target): New.
1944 * linux-s390-low.c (num_regs): Remove.
1945 (s390_num_regs): Define.
1946 (s390_regmap): Renamed from regmap, made static.
1947 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1949 (s390_cannot_store_register): Renamed from cannot_store_register,
1951 (the_low_target): New.
1952 * linux-sh-low.c (num_regs): Remove.
1953 (sh_num_regs): Define.
1954 (sh_regmap): Renamed from regmap, made static.
1955 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1957 (sh_cannot_store_register): Renamed from cannot_store_register,
1959 (the_low_target): New.
1960 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1961 (the_low_target): New.
1963 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1965 * Makefile.in: Add stamp-h target.
1966 * configure.in: Create stamp-h.
1967 * configure: Regenerated.
1969 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1971 * inferiors.c: New file.
1972 * target.c: New file.
1973 * target.h: New file.
1974 * Makefile.in: Add target.o and inferiors.o. Update
1976 * linux-low.c (inferior_pid): New static variable,
1977 moved from server.c.
1978 (linux_create_inferior): Renamed from create_inferior.
1979 Call add_inferior. Return 0 on success instead of a PID.
1980 (linux_attach): Renamed from myattach.
1981 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1982 (linux_thread_alive): Renamed from mythread_alive.
1983 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1985 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1986 (regsets_store_inferior_registers): Correct error message.
1987 Add missing ``return 0''.
1988 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1989 (linux_store_registers): Renamed from store_inferior_registers.
1990 (linux_read_memory): Renamed from read_inferior_memory.
1991 (linux_write_memory): Renamed from write_inferior_memory.
1992 (linux_target_ops): New structure.
1993 (initialize_low): Call set_target_ops ().
1994 * remote-utils.c (unhexify): New function.
1995 (hexify): New function.
1996 (input_interrupt): Send signals to ``signal_pid''.
1997 * server.c (inferior_pid): Remove.
1998 (start_inferior): Update create_inferior call.
1999 (attach_inferior): Call add_inferior.
2000 (handle_query): New function.
2001 (main): Call handle_query for `q' packets.
2002 * server.h: Include "target.h". Remove obsolete prototypes.
2003 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2005 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2007 * Makefile.in: Add WARN_CFLAGS. Update configury
2009 * configure.in: Check for <string.h>
2010 * configure: Regenerate.
2011 * config.in: Regenerate.
2012 * gdbreplay.c: Include needed system headers.
2013 (remote_open): Remove strchr prototype.
2014 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2015 * regcache.c (supply_register): Change buf argument to const void *.
2016 (supply_register_by_name): Likewise.
2017 (collect_register): Change buf argument to void *.
2018 (collect_register_by_name): Likewise.
2019 * regcache.h: Add missing prototypes.
2020 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2021 * server.c (handle_query): New function.
2022 (attached): New static variable, moved out of main.
2023 (main): Quiet longjmp clobber warnings.
2024 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2025 * utils.c (error): Remove NORETURN.