1 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4 by collect_ptrace_register and supply_ptrace_register hooks.
5 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6 instead of checking for the_low_target.left_pad_xfer.
7 (usr_store_inferior_registers): Use collect_ptrace_register callback
8 instead of checking for the_low_target.left_pad_xfer.
10 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11 (s390_supply_ptrace_register): Likewise.
12 (s390_fill_gregset): Call s390_collect_ptrace_register.
13 (the_low_target): Update.
15 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16 (ppc_supply_ptrace_register): Likewise.
17 (the_low_target): Update.
19 * linux-i386-low.c (the_low_target): Update.
20 * linux-x86-64-low.c (the_low_target): Update.
22 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
24 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
25 reg-s390.o and reg-s390x.o.
27 * linux-low.c (new_inferior): New global variable.
28 (linux_create_inferior, linux_attach): Set it.
29 (linux_wait_for_process): Call the_low_target.arch_setup after the
30 target has stopped for the first time.
31 (initialize_low): Do not call the_low_target.arch_setup.
33 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
34 (s390_set_pc): Likewise.
35 (s390_arch_setup): New function.
36 (the_low_target): Use s390_arch_setup as arch_setup routine.
38 * regcache.c (realloc_register_cache): New function.
39 (set_register_cache): Call it for each existing regcache.
41 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
43 * server.h (init_registers): Remove prototype.
45 * linux-low.h (struct linux_target_ops): Add arch_setup field.
46 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
47 instead of init_registers ().
48 * linux-arm-low.c (init_registers_arm): Add prototype.
49 (init_registers_arm_with_iwmmxt): Likewise.
50 (the_low_target): Add initializer for arch_setup field.
51 * linux-cris-low.c (init_registers_cris): Add prototype.
52 (the_low_target): Add initializer for arch_setup field.
53 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
54 (the_low_target): Add initializer for arch_setup field.
55 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
56 (the_low_target): Add initializer for arch_setup field.
57 * linux-ia64-low.c (init_registers_ia64): Add prototype.
58 (the_low_target): Add initializer for arch_setup field.
59 * linux-m32r-low.c (init_registers_m32r): Add prototype.
60 (the_low_target): Add initializer for arch_setup field.
61 * linux-m68k-low.c (init_registers_m68k): Add prototype.
62 (the_low_target): Add initializer for arch_setup field.
63 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
64 (init_registers_mips64_linux): Likewise.
65 (the_low_target): Add initializer for arch_setup field.
66 * linux-ppc-low.c (init_registers_ppc): Add prototype.
67 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
68 (the_low_target): Add initializer for arch_setup field.
69 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
70 (init_registers_powerpc_64): Likewise.
71 (the_low_target): Add initializer for arch_setup field.
72 * linux-s390-low.c (init_registers_s390): Add prototype.
73 (init_registers_s390x): Likewise.
74 (the_low_target): Add initializer for arch_setup field.
75 * linux-sh-low.c (init_registers_sh): Add prototype.
76 (the_low_target): Add initializer for arch_setup field.
77 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
78 (the_low_target): Add initializer for arch_setup field.
79 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
80 (the_low_target): Add initializer for arch_setup field.
82 * win32-low.h (struct win32_target_ops): Add arch_setup field.
83 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
84 instead of init_registers ().
85 * win32-arm-low.c (init_registers_arm): Add prototype.
86 (the_low_target): Add initializer for arch_setup field.
87 * win32-i386-low.c (init_registers_i386): Add prototype.
88 (the_low_target): Add initializer for arch_setup field.
90 * spu-low.c (init_registers_spu): Add prototype.
91 (initialize_low): Call initialie_registers_spu () instead of
92 initialize_registers ().
94 2008-02-19 Pedro Alves <pedro@codesourcery.com>
96 * server.c (handle_v_requests): When handling the vRun and vAttach
97 packets, if already debugging a process, don't kill it. Return an
100 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
102 * server.c (handle_query): Correct length check.
104 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
106 * win32-low.c (do_initial_child_stuff): Add process handle
107 parameter. Set current_process_handle and current_process_id from the
108 parameters. Clear globals.
109 (win32_create_inferior): Don't set current_process_handle and
110 current_process_id here. Instead pass them on the call to
111 do_initial_child_stuff.
112 (win32_attach): Likewise.
113 (win32_clear_inferiors): New.
114 (win32_kill): Don't close the current process handle or the
115 current thread handle here. Instead call win32_clear_inferiors.
116 (win32_detach): Don't open a new handle to the process. Call
117 win32_clear_inferiors.
118 (win32_join): Don't rely on current_process_handle; open a new
119 handle using the process id.
120 (win32_wait): Call win32_clear_inferiors when the inferior process
123 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
125 * server.c (monitor_show_help): Add "exit".
127 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
129 * Makefile.in (SFILES): Add linux-xtensa-low.c.
130 (clean): Add reg-xtensa.c.
131 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
132 * configure.srv (xtensa*-*-linux*) New target.
133 * linux-xtensa-low.c: New.
134 * xtensa-xtregs.c: New.
136 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
138 * hostio.c: Don't include errno.h.
139 (errno_to_fileio_errno): Move to hostio-errno.
140 * hostio.c: (hostio_error): Remove the error parameter. Defer the
141 error number outputting to the target->hostio_last_error callback.
142 (hostio_packet_error): Use FILEIO_EINVAL directly.
143 (handle_open, handle_pread, hostio_error, handle_unlink): Update
144 calls to hostio_error.
145 * hostio-errno.c: New.
146 * server.h (hostio_last_error_from_errno): Declare.
147 * target.h (target_ops): Add hostio_last_error member.
148 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
149 as hostio_last_error handler.
150 * spu-low.c (spu_target_ops): Likewise.
151 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
152 (wince_hostio_last_error): New functions.
153 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
154 as hostio_last_error handler.
155 (win32_target_ops) [!_WIN32_WCE]: Register
156 hostio_last_error_from_errno as hostio_last_error handler.
157 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
158 (hostio-errno.o): New rule.
159 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
160 * configure.srv (srv_hostio_err_objs): New variable. Default to
162 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
163 * configure: Regenerate.
165 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
167 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
168 (linux_kill, linux_detach): Clean up the process list.
169 * remote-utils.c (remote_open): Improve port number parsing.
170 (putpkt_binary, input_interrupt): Only send interrupts if the target
172 * server.c (extended_protocol): Make static.
173 (attached): Define earlier.
174 (exit_requested, response_needed, program_argv): New variables.
175 (target_running): New.
176 (start_inferior): Clear attached here.
177 (attach_inferior): Set attached here.
178 (require_running): Define.
179 (handle_query): Use require_running and target_running. Implement
181 (handle_v_attach, handle_v_run): New.
182 (handle_v_requests): Use require_running. Handle vAttach and vRun.
183 (gdbserver_usage): Update.
184 (main): Redo argument parsing. Handle --debug and --multi. Handle
185 --attach along with other options or after the port. Save
186 program_argv. Support no initial program. Resynchronize
187 communication with GDB after an error. Handle "monitor exit".
188 Use require_running and target_running. Always allow the extended
189 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
190 restart in extended mode.
191 * README: Refer to the GDB manual. Update --attach usage.
193 2007-12-20 Andreas Schwab <schwab@suse.de>
195 * linux-low.c (STACK_SIZE): Define.
196 (linux_tracefork_child): Use it. Use __clone2 on ia64.
197 (linux_test_for_tracefork): Likewise.
199 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
201 * linux-low.c (linux_wait_for_event): Update messages. Do not
202 reinsert auto-delete breakpoints.
203 * mem-break.c (struct breakpoint): Change return type of handler to
205 (set_breakpoint_at): Update handler type.
206 (reinsert_breakpoint_handler): Return 1 instead of calling
208 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
210 (check_breakpoints): Delete auto-delete breakpoints and return 2.
211 * mem-break.h (set_breakpoint_at): Update handler type.
212 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
213 * win32-low.c (auto_delete_breakpoint): New.
214 (get_child_debug_event): Use it.
216 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
218 * configure.ac: Check for pread and pwrite.
219 * hostio.c (handle_pread): Fall back to lseek and read.
220 (handle_pwrite): Fall back to lseek and write.
221 * config.in, configure: Regenerated.
223 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
225 * server.c (myresume): Add own_buf argument.
226 (main): Update calls.
228 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
230 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
231 * remote-utils.c (remote_open): Do not call disable_async_io.
232 (block_async_io): Delete.
233 (unblock_async_io): Make static.
234 (initialize_async_io): New.
235 * server.c (handle_v_cont): Handle async I/O here.
236 (myresume): Likewise. Move other common resume tasks here...
237 (main): ... from here. Call initialize_async_io. Disable async
238 I/O before the main loop.
239 * server.h (initialize_async_io): Declare.
240 (block_async_io, unblock_async_io): Delete prototypes.
241 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
243 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
245 * remote-utils.c (readchar): Allow binary data in received messages.
247 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
249 * win32-low.c (attaching): New global.
250 (win32_create_inferior): Clear the `attaching' global.
251 (win32_attach): Set the `attaching' global.
252 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
253 attaching. Only set a breakpoint at the entry point if not
256 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
258 * server.c (main): Don't report dll events on the initial
259 connection on attaches.
261 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
263 * server.c (main): Relax numerical bases supported for the pid of
264 the --attach command line argument.
266 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
268 * win32-low.c (win32_attach): Call OpenProcess before
269 DebugActiveProcess, not after. Add last error output to error
272 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
274 * win32-low.c (win32_get_thread_context)
275 (win32_set_thread_context): New functions.
276 (thread_rec): Use win32_get_thread_context.
277 (continue_one_thread, win32_resume): Use win32_set_thread_context.
278 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
282 Pedro Alves <pedro_alves@portugalmail.pt>
284 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
286 (child_add_thread): Minor cleanup.
287 (child_continue): Resume artificially suspended threads before
288 calling ContinueDebugEvent.
289 (suspend_one_thread): New.
290 (fake_breakpoint_event): New.
291 (get_child_debug_event): Change return type to int. Check here if
292 gdb sent an interrupt request. If a soft interrupt was requested,
293 fake a breakpoint event. Return 0 if there is no event to handle,
295 (win32_wait): Don't check here if gdb sent an interrupt request.
296 Ensure there is a valid event to handle.
297 (win32_request_interrupt): Add soft interruption method as last
301 Pedro Alves <pedro_alves@portugalmail.pt>
303 * win32-low.h (win32_thread_info): Add descriptions to the
304 structure members. Replace `suspend_count' counter by a
306 * win32-low.c (thread_rec): Update condition of when to get the
307 context from the inferior. Rely on ContextFlags being set if it
308 has already been retrieved. Only suspend the inferior thread if
309 we haven't already. Warn if that fails.
310 (continue_one_thread): s/suspend_count/suspended/. Only call
311 ResumeThread once. Warn if that fails.
313 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
315 * win32-low.c (win32_wait): Don't read from the inferior when it
318 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
320 * Makefile.in (win32_low_h): New variable.
321 (win32-low.o): Add dependency on $(win32_low_h).
322 (win32-arm-low.o, win32-i386-low.o): New rules.
324 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
326 * hostio.c: Correct copyright year.
328 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
330 * Makefile.in (OBS): Add hostio.o.
331 (hostio.o): New rule.
332 * server.h (handle_vFile): Declare.
333 * hostio.c: New file.
334 * server.c (handle_v_requests): Take packet_len and new_packet_len
335 for binary packets. Call handle_vFile.
336 (main): Update call to handle_v_requests.
338 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
340 * linux-low.c: Include <sched.h>.
342 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
344 * linux-low.c (linux_tracefork_grandchild): New.
345 (linux_tracefork_child): Use clone.
346 (linux_test_for_tracefork): Use clone; allocate and free a stack.
348 2007-10-31 Joel Brobecker <brobecker@adacore.com>
350 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
352 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
354 * linux-low.c (handle_extended_wait): Handle unexpected signals.
356 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
358 * inferiors.c (change_inferior_id): Delete.
359 (add_pid_to_list, pull_pid_from_list): New.
360 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
361 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
362 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
363 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
364 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
365 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
366 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
367 (using_threads): Always set to 1.
368 (handle_extended_wait): New.
369 (add_process): Do not set TID.
370 (linux_create_inferior): Set must_set_ptrace_flags.
371 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
372 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
373 (linux_thread_alive): Rename TID argument to LWPID.
374 (linux_wait_for_process): Handle unknown processes. Do not use TID.
375 (linux_wait_for_event): Do not use TID or check using_threads. Update
376 call to dead_thread_notify. Call handle_extended_wait.
377 (linux_create_inferior): Use PTRACE_SETOPTIONS.
378 (send_sigstop): Delete sigstop_sent.
379 (wait_for_sigstop): Avoid TID.
380 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
381 (linux_test_for_tracefork): New.
382 (linux_lookup_signals): Use thread_db_active and
383 linux_supports_tracefork_flag.
384 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
385 * linux-low.h (get_process_thread): Avoid TID.
386 (struct process_ifo): Move thread_known and tid to the end. Remove
388 (linux_attach_lwp, thread_db_init): Update prototypes.
389 * server.h (change_inferior_id): Delete prototype.
390 (add_pid_to_list, pull_pid_from_list): New prototypes.
391 * thread-db.c (thread_db_use_events): New.
392 (find_first_thread): Rename to...
393 (find_one_thread): ...this. Update callers and messages. Do not
394 call fatal. Check thread_db_use_events. Do not call
395 change_inferior_id or new_thread_notify.
396 (maybe_attach_thread): Update. Do not call new_thread_notify.
397 (thread_db_init): Set thread_db_use_events. Check use_events.
398 * utils.c (fatal, warning): Correct message prefix.
400 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
402 * Makefile.in (clean): Remove new files.
403 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
404 (powerpc-64.o, powerpc-64.c): New rules.
405 * configure.srv: Use alternate register sets for powerpc64-*-linux*
406 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
408 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
410 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
411 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
412 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
413 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
414 (target_regsets): Add AltiVec and SPE register sets.
415 * configure.ac: Check for AltiVec and SPE.
416 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
417 (ppc_fill_vrregset, ppc_store_vrregset): New.
418 (target_regsets): Add AltiVec register set.
419 * configure: Regenerated.
421 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
423 * linux-low.c (O_LARGEFILE): Define.
424 (linux_read_memory): Use /proc/PID/mem.
425 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
426 * configure, config.in: Regenerated.
428 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
430 * linux-low.c (linux_wait_for_event): Do not pass signals while
433 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
435 * win32-low.c (create_process): New.
436 (win32_create_inferior): Use create_process instead of
437 CreateProcess. If create_process failed retry appending an ".exe"
438 suffix. Store the GetLastError result immediatelly after
439 create_process calls and use it on the call to error.
441 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
443 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
445 2007-08-23 Joel Brobecker <brobecker@adacore.com>
447 * configure.ac: Switch license to GPLv3.
449 2007-08-01 Michael Snyder <msnyder@access-company.com>
451 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
453 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
455 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
457 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
458 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
459 CloseToolhelp32Snapshot.
460 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
461 CloseToolhelp32Snapshot.
463 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
465 * server.c (main): Check for inferior exit before main loop.
467 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
469 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
470 instead of on tmp_desc.
472 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
473 Daniel Jacobowitz <dan@codesourcery.com>
475 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
476 (add_thread): Minor cleanups.
477 (clear_inferiors): Move lower in the file. Clear the DLL
479 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
480 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
481 (xml_escape_text): New.
482 * server.c (handle_query): Handle qXfer:libraries:read. Report it
484 (handle_v_cont): Report errors.
485 (gdbserver_version): Update.
486 (main): Correct size of own_buf. Do not report initial DLL events.
487 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
488 (unloaded_dll, xml_escape_text): New.
489 * win32-low.c (enum target_waitkind): Update comments.
490 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
491 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
492 (win32_EnumProcessModules, win32_GetModuleInformation)
493 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
494 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
495 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
496 (win32_Module32First, win32_Module32Next, load_toolhelp)
497 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
498 (get_child_debug_event): Handle DLL events.
499 (win32_wait): Likewise.
501 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
503 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
504 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
506 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
508 * win32-low.c (handle_output_debug_string): Ignore event if not
511 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
513 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
515 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
517 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
519 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
521 * inferiors.c (change_inferior_id): Add comment.
522 * linux-low.c (check_removed_breakpoint): Add an early
523 prototype. Improve debug output.
524 (linux_attach): Doc update.
525 (linux_detach_one_process, linux_detach): Clean up before releasing
527 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
528 * linux-low.h (struct process_info): Doc improvement.
529 * mem-break.c (delete_all_breakpoints): New.
530 * mem-break.h (delete_all_breakpoints): New prototype.
531 * thread-db.c (find_first_thread): New.
532 (thread_db_create_event): Call it instead of
533 thread_db_find_new_threads. Clean up unused variables.
534 (maybe_attach_thread): Remove first thread handling.
535 (thread_db_find_new_threads): Use find_first_thread.
536 (thread_db_get_tls_address): Likewise.
538 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
540 * thread-db.c (thread_db_find_new_threads): Add prototype.
541 (thread_db_create_event): Check for the main thread before adding
543 (maybe_attach_thread): Only enable event reporting if TID == 0.
544 (thread_db_get_tls_address): Check for new threads.
546 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
548 * linux-low.c (linux_create_inferior): Try execv before execvp.
549 * spu-low.c (spu_create_inferior): Likewise.
551 2007-06-13 Mike Frysinger <vapier@gentoo.org>
553 * linux-low.c (linux_create_inferior): Change execv to execvp.
554 * spu-low.c (spu_create_inferior): Likewies.
556 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
558 * Makefile.in (clean): Clean new files instead of deleted ones.
559 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
560 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
562 * configure.srv: Specify XML files and new regformats for MIPS and
564 * linux-mips-low.c (mips_num_regs): Set to only used registers.
565 (mips_regmap): Do not fetch $0. Remove unused registers. Add
566 an entry for the restart register.
567 (mips_cannot_fetch_register, mips_cannot_store_register)
568 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
569 register names to match the XML descriptions.
570 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
571 restart register instead of $0.
573 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
574 Markus Deuling <deuling@de.ibm.com>
576 * remote-utils.c (decode_xfer_write): New function.
577 * server.h (decode_xfer_write): Add prototype.
578 * server.c (handle_query): Add PACKET_LEN argument. Support
579 qXfer:spu:read and qXfer:spu:write packets.
580 (main): Pass packet_len to handle_query.
581 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
582 * target.h (target_ops): Add qxfer_spu.
584 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
586 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
587 accessing non-seekable spufs files.
589 2007-05-16 Markus Deuling <deuling@de.ibm.com>
591 * server.c (handle_query): Add reply for qC packet.
593 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
594 Leo Zayas <lerele@champenstudios@com>
596 * server.h (check_remote_input_interrupt_request): New function.
597 * remote_utils.c (INVALID_DESCRIPTOR): New define.
598 (remote_desc): Initialize with INVALID_DESCRIPTOR.
599 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
600 (check_remote_input_interrupt_request): New function.
601 * server.h (check_remote_input_interrupt_request): Declare.
602 * win32-low.c (winapi_DebugBreakProcess,
603 winapi_GenerateConsoleCtrlEvent): New typedefs.
604 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
606 (win32_wait): Check for remote interrupt request
607 with check_remote_input_interrupt_request.
608 (win32_request_interrupt): New function.
609 (win32_target_op): Set request_interrupt to win32_request_interrupt.
611 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
613 * win32-low.c (debug_registers_changed,
614 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
615 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
616 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
617 (thread_rec): Get context using the low target.
618 (child_add_thread): Call thread_added on the low target,
619 which does the same thing.
621 (do_initial_child_stuff): Remove debug registers references.
622 Set context using the low target. Resume threads after
623 setting the contexts.
624 (child_continue): Remove dead variable. Remove debug
625 registers references.
626 (child_fetch_inferior_registers): Go through the low target.
627 (do_child_store_inferior_registers): Remove.
628 (child_store_inferior_registers): Go through the low target.
629 (win32_resume): Remove debug registers references.
630 Set context using the low target.
631 (handle_exception): Change return type to void. Don't record
632 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
633 first chance exception.
634 (get_child_debug_event): Change return type to void. Remove
635 goto loop. Always return after waiting for debug event.
636 (win32_wait): Convert to switch statement. Handle spurious
639 * win32-i386-low.c (debug_registers_changed,
640 debug_registers_used): New.
641 (initial_stuff): Rename to ...
642 (i386_initial_stuff): ... this. Clear debug registers
644 (store_debug_registers): Delete.
645 (i386_get_thread_context): New.
646 (load_debug_registers): Delete.
647 (i386_set_thread_context): New.
648 (i386_thread_added): New.
649 (single_step): Rename to ...
650 (i386_single_step): ... this.
651 (do_fetch_inferior_registers): Rename to ...
652 (i386_fetch_inferior_register): ... this.
653 (i386_store_inferior_register): New.
654 (the_low_target): Adapt to new interface.
656 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
657 (arm_get_thread_context): New.
658 (arm_set_thread_context): New.
660 (do_fetch_inferior_registers): Rename to ...
661 (arm_fetch_inferior_register): ... this.
662 (arm_store_inferior_register): New.
663 (arm_wince_breakpoint): Reimplement as unsigned long.
664 (arm_wince_breakpoint_len): Define.
665 (the_low_target): Adapt to new interface.
667 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
668 load_debug_registers. Add get_thread_context, set_thread_context,
669 thread_added and store_inferior_register. Rename
670 fetch_inferior_registers to fetch_inferior_register.
671 (regptr): Remove declaration.
673 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
675 * linux-low.c (linux_detach): Change return type to int. Return 0.
676 * spu-low.c (spu_detach): Likewise.
678 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
680 * target.h (target_ops): Change return type of detach to int.
682 (join_inferior): New.
683 * server.c (main): Don't skip detach support on mingw32.
684 If the inferior doesn't support detaching return error.
685 Call join_inferior instead of using waitpid.
686 * linux-low.c (linux_join): New.
687 (linux_target_op): Add linux_join.
688 * spu-low.c (spu_join): New.
689 (spu_target_ops): Add spu_join.
690 * win32-low.c (win32_detach): Adapt to new interface.
691 Reopen current_process_handle before detaching. Issue a child
692 resume before detaching.
694 (win32_target_op): Add win32_join.
696 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
698 * win32-low.c (win32-attach): Fix return value.
699 * target.h (target_ops): Describe ATTACH return values.
701 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
703 * win32-low.c (GETPROCADDRESS): Define.
704 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
705 (winapi_DebugSetProcessKillOnExit): Likewise.
706 (win32_create_inferior): Force usage of ansi CreateProcessA.
707 (win32_attach): Use GETPROCADDRESS.
708 (win32_detach): Likewise.
710 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
712 * win32-low.c (win32_wait): Don't use WSTOPSIG.
714 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
716 * win32-low.c: Commit leftover changes from 2007-03-29.
718 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
720 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
721 fields short instead of int. Add explicit padding.
722 (i387_cache_to_fsave): Remove unnecessary casts.
723 (i387_fsave_to_cache): Doc fix.
724 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
726 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
728 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
729 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
731 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
733 * configure.srv (arm*-*-mingw32ce*): Move near the other
736 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
738 * configure.ac: Add errno checking.
739 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
740 sys/file.h and malloc.h.
741 (AC_CHECK_DECLS): Add perror.
742 (srv_mingwce): Handle.
743 * configure.srv (i[34567]86-*-cygwin*): Add
744 win32-i386-low.o to srv_tgtobj.
745 (i[34567]86-*-mingw*): Likewise.
746 (arm*-*-mingw32ce*): Add case.
747 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
748 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
749 [__MINGW32CE__] (strerror): New function.
750 [__MINGW32CE__] (errno): Define to GetLastError.
751 [__MINGW32CE__] (COUNTOF): New macro.
752 (remote_open): Remove extra close call.
753 * mem-break.c (delete_breakpoint_at): New function.
754 * mem-break.h (delete_breakpoint_at): Declare.
755 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
756 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
757 [USE_WIN32API] (read, write): Add char* casts.
758 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
759 * server.h: Include wincecompat.h on Windows CE.
760 [HAVE_ERRNO_H]: Check.
761 (perror): Declare if not declared.
762 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
763 (perror_with_name): Remove errno declaration.
764 * wincecompat.h: New.
765 * wincecompat.c: New.
767 * win32-arm-low.c: New.
768 * win32-i386-low.c: New.
769 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
770 (OUTMSG2): Make it safe.
772 (COUNTOF): New macro.
773 (NUM_REGS): Get it from the low target.
774 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
775 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
776 (thread_rec): Let low target handle debug registers.
777 (child_add_thread): Likewise.
778 (child_init_thread_list): Likewise.
779 (continue_one_thread): Likewise.
781 (do_child_fetch_inferior_registers): Move to ...
782 * win32-i386-low.c: ... here, and rename to ...
783 (do_fetch_inferior_registers): ... this.
784 * win32-low.c (child_fetch_inferior_registers):
785 Go through the low target.
786 (do_child_store_inferior_registers): Use regptr.
787 (strwinerror): New function.
788 (win32_create_inferior): Handle Windows CE.
789 Use strwinerror instead of strerror on Windows error
790 codes. Add program to the error output.
791 Don't close the main thread handle on Windows CE.
792 (win32_attach): Use coredll.dll on Windows CE.
793 (win32_kill): Close current process and current
795 (win32_detach): Use coredll.dll on Windows CE.
796 (win32_resume): Let low target handle debug registers, and
798 (handle_exception): Add/Remove initial breakpoint. Avoid
799 non-existant WSTOPSIG on Windows CE.
800 (win32_read_inferior_memory): Cast to remove warning.
801 (win32_arch_string): Go through the low target.
802 (initialize_low): Call set_breakpoint_data with the low
804 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
805 FOP_REGNUM, mappings): Move to ...
806 * win32-i386-low.c: ... here.
807 * win32-low.c (win32_thread_info): Move to ...
808 * win32-low.h: ... here.
809 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
810 win32-arm-low.c and wincecompat.c.
812 (install-only:): Likewise.
813 (gdbserver:): Likewise.
814 (gdbreplay:): Likewise.
815 * config.in: Regenerate.
816 * configure: Regenerate.
818 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
820 * win32-low.c: Rename typedef thread_info to
821 win32_thread_info throughout.
823 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
825 * win32-i386-low.c: Rename to ...
826 * win32-low.c: ... this.
827 * configure.srv: Replace win32-i386-low.o with win32-low.o.
828 * Makefile.in: Likewise.
830 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
832 * remote-utils.c (monitor_output): Constify msg parameter.
833 * server.h (monitor_output): Likewise.
834 * win32-i386-low.c (handle_output_debug_string): New.
835 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
836 handle_output_debug_string.
837 (get_child_debug_event): Likewise.
839 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
841 * server.c (main): Correct strtoul check.
843 2007-03-27 Jon Ringle <jon@ringle.org>
845 * linux-low.c: Check __ARCH_HAS_MMU__ also.
847 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
849 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
851 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
853 * terminal.h: Check HAVE_SGTTY_H.
855 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
857 * remote-utils.c (remote_open): Print out the assigned port number.
859 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
861 * remote-utils.c (monitor_output): New function.
862 * server.c (debug_threads): Define here.
863 (monitor_show_help): New function.
864 (handle_query): Handle qRcmd.
865 (main): Do not handle 'd' packet.
866 * server.h (debug_threads, remote_debug, monitor_output): Declare.
867 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
870 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
872 * Makefile.in (EXEEXT): New.
873 (clean): Use $(EXEEXT).
875 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
877 * target.h (target_ops): Rename send_signal to request_interrupt,
878 and remove enum target_signal parameter.
879 * linux-low.c (linux_request_interrupt): Rename from
880 linux_send_signal, and always send SIGINT.
881 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
882 and always send SIGINT.
883 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
885 (input_interrupt): Likewise.
887 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
889 * server.c (get_features_xml): Check if target implemented
891 * win32-i386-low.c (win32_arch_string): New.
892 (win32_target_ops): Add win32_arch_string as arch_string member.
894 2007-02-22 Markus Deuling <deuling@de.ibm.com>
896 * spu-low.c (spu_arch_string): New.
897 (spu_target_ops): Add spu_arch_string.
899 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
901 * remote-utils.c: Remove HAVE_TERMINAL_H check.
902 * configure.ac: Do not check for terminal.h.
903 * configure, config.in: Regenerated.
905 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
907 * Makefile.in (OBS): Add $(XML_BUILTIN).
908 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
910 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
911 (arm-with-iwmmxt.c): New.
912 * config.in, configure: Regenerate.
913 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
914 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
915 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
916 (arm*-*-linux*): Add iWMMXt and regset support.
917 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
918 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
919 (arm_store_wmmxregset, target_regsets): New.
920 * server.c (get_features_xml): Take annex argument. Check builtin
922 (handle_query): Handle multiple annexes.
924 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
926 * remote-utils.c [USE_WIN32API] (read, write): Define.
927 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
930 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
932 * linux-i386-low.c (the_low_target): Set arch_string.
933 * linux-x86-64-low.c (the_low_target): Likewise.
934 * linux-low.c (linux_arch_string): New.
935 (linux_target_ops): Add it.
936 * linux-low.h (struct linux_target_ops): Add arch_string.
937 * server.c (write_qxfer_response): Use const void * for DATA.
938 (get_features_xml): New.
939 (handle_query): Handle qXfer:features:read. Report it for qSupported.
940 * target.h (struct target_ops): Add arch_string method.
942 2007-01-03 Denis Pilat <denis.pilat@st.com>
943 Daniel Jacobowitz <dan@codesourcery.com>
945 * linux-low.c (linux_kill): Handle being called with no threads.
946 * win32-i386-low.c (win32_kill): Likewise.
947 (get_child_debug_event): Clear current_process_handle.
949 2006-12-30 Denis PILAT <denis.pilat@st.com>
950 Daniel Jacobowitz <dan@codesourcery.com>
952 * remote-utils.c (remote_open): Check the type of specified
953 serial port devices before opening them.
954 * server.c (main): Kill the inferior if an error occurs during
955 the first remote_open.
957 2006-12-05 Markus Deuling <deuling@de.ibm.com>
959 * README: Update supported targets.
961 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
963 * Makefile.in (clean): Remove reg-mips64.c.
964 (reg-mips64.c, reg-mips64.o): New rules.
965 * configure.srv: Handle mips64. Include regset support for mips.
966 * linux-mips-low.c (union mips_register): New.
967 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
968 (mips_breakpoint, mips_breakpoint_at): Use int.
969 (mips_collect_register, mips_supply_register)
970 (mips_collect_register_32bit, mips_supply_register_32bit)
971 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
972 (mips_store_fpregset, target_regsets): New.
973 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
975 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
977 * configure.srv: Add target "spu*-*-*".
978 * Makefile.in (clean): Remove reg-spu.c.
979 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
980 * spu-low.c: New file.
982 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
984 * configure.ac: Correct td_thr_tls_get_addr test.
985 * configure: Regenerated.
987 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
989 * linux-low.c (linux_wait_for_event): Reformat. Use the
991 * remote-utils.c (decode_address_to_semicolon): New.
992 * server.c (pass_signals, handle_general_set): New.
993 (handle_query): Mention QPassSignals for qSupported.
994 (main): Call handle_general_set.
995 * server.h (pass_signals, decode_address_to_semicolon): New.
997 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
999 * server.c (handle_query): Correct error handling for read_auxv.
1001 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1003 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1004 and srv_linux_thread_db to yes.
1005 * linux-s390-low.c (s390_fill_gregset): New function.
1006 (target_regsets): Define data structure.
1008 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1010 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1011 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1012 * config.in, configure: Regenerated.
1013 * inferiors.c (gdb_id_to_thread): New function.
1014 (gdb_id_to_thread_id): Use it.
1015 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1016 * linux-low.h (struct process_info): Add th member.
1017 (thread_db_get_tls_address): New prototype.
1018 * remote-utils.c (decode_address): Make non-static.
1019 * server.c (handle_query): Handle qGetTLSAddr.
1020 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1021 * target.h (struct target_ops): Add get_tls_address.
1022 * thread-db.c (maybe_attach_thread): Save the thread handle.
1023 (thread_db_get_tls_address): New.
1025 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1027 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1028 (linux_resume_one_process): Take a siginfo_t *. Update all
1029 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1030 (struct pending_signals): Add a siginfo_t.
1031 (linux_wait_for_process): Always set last_status.
1032 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1033 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1034 * linux-low.h (struct process_info): Add last_status.
1036 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1038 * remote-utils.c (try_rle): New function.
1039 (putpkt_binary): Use it.
1041 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1043 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1044 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1045 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1046 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1047 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1050 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1052 * server.c (terminal_fd): New variable.
1053 (old_foreground_pgrp): Likewise.
1054 (restore_old_foreground_pgrp): New function.
1055 (start_inferior): Record the terminal file descriptor in terminal_fd
1056 and its original foreground group in old_foreground_pgrp. Register
1057 restore_old_foreground_pgrp with atexit().
1059 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1061 * server.c (handle_query): Correct qPart to qXfer.
1063 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1065 * configure.ac: Check for more headers which are missing on
1066 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1067 * configure.srv: Add Cygwin and mingw32.
1068 * remote-utils.c: Don't include headers unconditionally which
1069 are missing on mingw32. Include <winsock.h> for mingw32.
1070 (remote_open): Adjust for mingw32 support. Flush
1071 standard error after writing to it.
1072 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1073 (unblock_async_io, enable_async_io, disable_async_io)
1074 (readchar, getpkt): Update for Winsock support.
1075 (prepare_resume_reply): Expect a protocol signal number.
1076 * server.c: Disable <sys/wait.h> on mingw32.
1077 (start_inferior): Adjust for mingw32 support. Flush
1078 standard error after writing to it.
1079 (attach_inferior): Likewise. Use protocol signal
1081 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1083 * win32-i386-low.c: New file.
1084 * Makefile.in (XM_CLIBS): Set.
1085 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1086 (win32-i386-low.o): New dependency rule.
1087 * linux-low.c (linux_wait): Use target signal numbers.
1088 * target.h (struct target_ops): Doc fix.
1089 * server.h (target_signal_to_name): New prototype.
1090 * gdbreplay.c: Don't include headers unconditionally which
1091 are missing on mingw32. Include <winsock.h> for mingw32.
1092 (remote_close, remote_open): Adjust for Winsock support.
1093 * configure, config.in: Regenerated.
1095 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1097 * server.c (decode_xfer_read, write_qxfer_response): New.
1098 (handle_query): Take a packet length argument. Handle
1099 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1100 the qSupported response.
1101 (main): Update call to handle_query.
1103 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1105 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1106 (putpkt_binary): Renamed from putpkt and adjusted for binary
1108 (putpkt): New wrapper for putpkt_binary.
1109 (readchar): Don't mask off the high bit.
1110 (decode_X_packet): New function.
1111 * server.c (main): Call putpkt_binary if a handler sets the packet
1112 length. Save the length of the incoming packet. Handle 'X'.
1113 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1115 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1117 * server.c (handle_query): Handle qSupported.
1119 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1121 * remote-utils.c (all_symbols_looked_up): New variable.
1122 (look_up_one_symbol): Check it.
1123 * server.h (look_up_one_symbol): New declaration.
1124 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1126 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1128 * Makefile.in (linux-arm-low.o): Update dependencies.
1129 * linux-arm-low.c: Include "gdb_proc_service.h".
1130 (PTRACE_GET_THREAD_AREA): Define.
1131 (ps_get_thread_area): New function.
1133 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1135 * configure.srv (m68k*-*-uclinux*): New target.
1136 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1137 (linux_resume_one_process): Remove extraneous cast.
1138 (linux_read_offsets): New.
1139 (linux_target_op): Add linux_read_offsets on mmuless systems.
1140 * server.c (handle_query): Add qOffsets logic.
1141 * target.h (struct target_ops): Add read_offsets.
1143 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1145 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1146 (PTRACE_GET_THREAD_AREA): Define.
1147 (ps_get_thread_area): New function.
1148 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1149 (linux-x86-64-low.o): Update.
1151 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1153 * configure.ac: Remove checks for prfpregset_t.
1154 * gdb_proc_service.h: New file.
1155 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1156 new "gdb_proc_service.h".
1157 * proc-service.c: Likewise.
1158 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1159 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1160 * Makefile.in (gdb_proc_service_h): Updated.
1161 * configure, config.in: Regenerated.
1163 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1165 * remote-utils.c (prepare_resume_reply): Move declaration
1166 of gdb_id_from_wait to the top of the block.
1168 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1170 * linux-low.c (regsets_store_inferior_registers): Read the regset
1171 from the target before filling it.
1173 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1175 * server.c (attach_inferior): Return SIGTRAP for a successful
1178 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1180 * Makefile.in (OBS): Add version.o.
1181 (STAGESTUFF): Delete.
1182 (version.o): Add dependencies.
1183 (version.c): Replace rule.
1184 (clean): Remove version.c.
1185 * server.c (gdbserver_version): New.
1186 (gdbserver_usage): Use printf.
1187 (main): Handle --version and --help.
1188 * server.h (version, host_name): Add declarations.
1190 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1202 * linux-x86-64-low.c:
1205 * linux-ppc64-low.c:
1214 * linux-crisv32-low.c:
1226 * gdbserver.1: Add (C) after Copyright. Update the FSF
1229 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1231 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1232 (arm_breakpoint_at): Recognize both breakpoints.
1233 (the_low_target): Use the correct breakpoint instruction.
1235 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1237 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1238 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1239 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1240 (the_low_target): Update.
1242 2005-10-25 Andreas Schwab <schwab@suse.de>
1244 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1246 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1247 (ia64_num_regs): Reduce to 462.
1249 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1251 * acinclude.m4: Correct quoting.
1252 * aclocal.m4: Regenerated.
1254 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1255 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1256 (thread_db_init): Call thread_db_err_str.
1257 * configure.ac: Check for TD_VERSION.
1258 * config.in, configure: Regenerated.
1260 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1262 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1264 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1266 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1267 is not available. Define HAVE_PTRACE_GETREGS if it is.
1268 * config.in, configure: Regenerated.
1269 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1270 * linux-i386-low.c, linux-m68k-low.c: Update to use
1271 HAVE_PTRACE_GETREGS.
1272 * linux-low.c (regsets_fetch_inferior_registers)
1273 (regsets_store_inferior_registers): Only return 0 if we processed
1275 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1276 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1278 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1280 * inferiors.c (struct thread_info): Add gdb_id.
1281 (add_thread): Add gdb_id argument.
1282 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1283 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1284 calls to add_thread.
1285 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1286 * server.c (handle_query): Use thread_to_gdb_id.
1287 (handle_v_cont, main): Use gdb_id_to_thread_id.
1288 * server.h (add_thread): Update prototype.
1289 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1292 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1294 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1295 left-padded registers.
1296 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1297 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1299 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1301 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1302 * configure: Regenerate.
1303 * config.in: Regenerate.
1304 * server.h (NEED_DECLARATION_STRERROR):
1305 Replace with !HAVE_DECL_STRERROR.
1307 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1309 * linux-low.c (linux_wait, linux_send_signal): Don't test
1310 an unsigned long variable for > 0 if it could be MAX_ULONG.
1311 * server.c (myresume): Likewise.
1312 * target.c (set_desired_inferior): Likewise.
1314 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1316 * configure.ac: Simplify and improve check for socklen_t.
1317 * configure, config.in: Regenerate.
1319 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1321 * acconfig.h: Remove.
1322 * configure.ac: Add a test for socklen_t. Use three-argument
1323 AC_DEFINE throughout.
1324 * config.in: Regenerated using autoheader 2.59.
1325 * configure: Regenerated.
1327 * gdbreplay.c (socklen_t): Provide a default.
1328 (remote_open): Use socklen_t.
1329 * remote-utils.c (socklen_t): Provide a default.
1330 (remote_open): Use socklen_t.
1331 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1334 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1336 * linux-low.c (linux_read_memory, linux_write_memory)
1337 (linux_read_auxv): Likewise.
1338 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1339 (check_mem_write): Likewise.
1340 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1342 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1343 (registers_from_string, register_data): Likewise.
1344 * server.c (handle_query, main): Likewise.
1345 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1346 (decode_M_packet): Likewise.
1347 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1348 * target.h (struct target_ops): Update read_memory, write_memory,
1350 (read_inferior_memory, write_inferior_memory): Update.
1351 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1353 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1354 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1355 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1356 linux-s390-low.c, linux-sh-low.c: Update for changes in
1357 read_inferior_memory and the_low_target->breakpoint.
1359 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1361 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1362 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1363 * configure.srv: Add powerpc64-*-linux*.
1364 * linux-ppc64-low.c: New file.
1366 2005-05-23 Orjan Friberg <orjanf@axis.com>
1368 * linux-cris-low.c: New file with support for CRIS.
1369 * linux-crisv32-low.c: Ditto for CRISv32.
1370 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1371 (clean): Add reg-cris.c and reg-crisv32.c.
1372 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1373 reg-crisv32.o, and reg-crisv32.c to make rules.
1374 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1377 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1379 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1380 of sizeof (PTRACE_XFER_TYPE).
1381 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1383 2005-05-12 Orjan Friberg <orjanf@axis.com>
1385 * target.h (struct target_ops): Add insert_watchpoint,
1386 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1387 pointers for hardware watchpoint support.
1388 * linux-low.h (struct linux_target_ops): Ditto.
1389 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1390 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1391 to linux_target_ops.
1392 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1394 * server.c (main): Recognize 'Z' and 'z' packets.
1396 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1398 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1399 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1400 (the_low_target): Add new members.
1402 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1404 * proc-service.c (ps_lgetregs): Search all_processes instead of
1407 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1409 * server.c (start_inferior): Change return type to int.
1410 (attach_inferior): Change sigptr to int *.
1411 (handle_v_cont, handle_v_requests): Change signal to int *.
1412 (main): Change signal to int.
1414 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1416 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1417 * configure.srv: Add m32r*-*-linux*.
1418 * linux-m32r-low.c: New file.
1420 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1422 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1424 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1426 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1427 Take unsigned long arguments for PIDs.
1428 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1429 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1430 (wait_for_sigstop, linux_resume_one_process)
1431 (regsets_fetch_inferior_registers, linux_send_signal)
1432 (linux_read_auxv): Likewise. Update the types of variables holding
1433 PIDs. Update format string specifiers.
1434 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1435 * remote-utils.c (prepare_resume_reply): Likewise.
1436 * server.c (cont_thread, general_thread, step_thread)
1437 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1439 (handle_query): Update format specifiers.
1440 (handle_v_cont, main): Use strtoul for thread IDs.
1441 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1442 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1443 (general_thread, step_thread, thread_from_wait)
1444 (old_thread_from_wait): Update.
1445 * target.h (struct thread_resume): Use unsigned long for THREAD.
1446 (struct target_ops): Use unsigned long for arguments to attach and
1449 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1451 * acinclude.m4: Include bfd/bfd.m4 directly.
1452 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1453 <agriffis@toolchain.org>.
1454 * aclocal.m4, configure: Regenerated.
1456 2005-01-07 Andrew Cagney <cagney@gnu.org>
1458 * configure.ac: Rename configure.in, require autoconf 2.59.
1459 * configure: Re-generate.
1461 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1463 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1465 * aclocal.m4: Regenerated.
1466 * configure: Regenerated.
1468 2004-11-21 Andreas Schwab <schwab@suse.de>
1470 * linux-m68k-low.c (m68k_num_gregs): Define.
1471 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1472 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1473 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1474 (m68k_breakpoint_at): New. Add to the_low_target.
1476 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1477 srv_linux_thread_db to yes.
1479 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1481 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1482 (ARCH_SET_FS): Likewise.
1483 (ARCH_GET_FS): Likewise.
1484 (ARCH_GET_GS): Likewise.
1486 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1488 * linux-i386-low.c (ps_get_thread_area): New.
1489 * linux-x86-64-low.c (ps_get_thread_area): New.
1490 * linux-low.c: Include <sys/syscall.h>.
1491 (linux_kill_one_process): Don't kill the first thread here.
1492 (linux_kill): Kill the first thread here.
1493 (kill_lwp): New function.
1494 (send_sigstop, linux_send_signal): Use it.
1495 * proc-service.c: Clean up #ifdefs.
1496 (fpregset_info): Delete.
1497 (ps_lgetregs): Update and enable implementation.
1498 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1500 * remote-utils.c (struct sym_cache, symbol_cache): New.
1501 (input_interrupt): Print a clearer message.
1502 (async_io_enabled): New variable.
1503 (enable_async_io, disable_async_io): Use it. Update comments.
1504 (look_up_one_symbol): Use the symbol cache.
1505 * thread-db.c (thread_db_look_up_symbols): New function.
1506 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1508 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1510 * configure.in: Test for -rdynamic.
1511 * configure: Regenerated.
1512 * Makefile (INTERNAL_LDFLAGS): New.
1513 (gdbserver, gdbreplay): Use it.
1515 2004-09-02 Andrew Cagney <cagney@gnu.org>
1517 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1519 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1521 * linux-low.c (linux_wait): Clear all_processes list also.
1523 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1525 * linux-low.c: Include <errno.h>. Remove extern declaration of
1528 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1530 * gdbreplay.c, server.h, utils.c: Update copyright years.
1532 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1534 * server.c (main): Print child status or termination signal from
1535 variable 'signal', not 'sig'.
1537 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1539 * linux-low.c (linux_read_memory): Change return type to
1540 int. Check for and return error from ptrace().
1541 * target.c (read_inferior_memory): Change return type to int. Pass
1542 back return status from the_target->read_memory().
1543 * target.h (struct target_ops): Adapt *read_memory() prototype.
1545 (read_inferior_memory): Adapt prototype.
1546 * server.c (main): Return an error packet if
1547 read_inferior_memory() returns an error.
1549 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1551 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1552 Unify with other clean targets.
1554 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1556 * server.c (handle_v_cont): Call set_desired_inferior.
1558 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1560 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1562 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1564 * linux-low.c (linux_wait): Unblock async I/O.
1565 (linux_resume): Block and enable async I/O.
1566 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1567 * server.h (block_async_io, unblock_async_io): Add prototypes.
1569 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1571 * remote-utils.c (remote_open): Print a status notice after
1573 * server.c (attach_inferior): Print a status notice after
1576 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1578 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1580 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1582 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1584 * server.c, target.h: Update copyright years.
1586 2004-02-25 Roland McGrath <roland@redhat.com>
1588 * target.h (struct target_ops): New member `read_auxv'.
1589 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1590 * linux-low.c (linux_read_auxv): New function.
1591 (linux_target_ops): Initialize `read_auxv' member to that.
1593 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1595 Committed by Jim Blandy <jimb@redhat.com>.
1597 * linux-s390-low.c (s390_num_regs): Update.
1598 (s390_regmap): Remove control registers. Use __s390x__ predefine
1599 instead of GPR_SIZE to distiguish s390 and s390x targets.
1601 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1603 * linux-low.c: Update copyright year.
1604 (check_removed_breakpoint): Clear pending_is_breakpoint.
1605 (linux_set_resume_request, linux_queue_one_thread)
1606 (resume_status_pending_p): New functions.
1607 (linux_continue_one_thread): Use process->resume.
1608 (linux_resume): Only resume threads if there are no pending events.
1609 * linux-low.h (struct process_info): Add resume request
1612 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1614 * regcache.c (new_register_cache): Clear the allocated register
1615 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1617 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1619 * linux-low.c (linux_resume): Take a struct thread_resume *
1621 (linux_wait): Update call.
1622 (resume_ptr): New static variable.
1623 (linux_continue_one_thread): Renamed from
1624 linux_continue_one_process. Use resume_ptr.
1625 (linux_resume): Use linux_continue_one_thread.
1626 * server.c (handle_v_cont, handle_v_requests): New functions.
1627 (myresume): New function.
1628 (main): Handle 'v' case.
1629 * target.h (struct thread_resume): New type.
1630 (struct target_ops): Change argument of "resume" to struct
1632 (myresume): Delete macro.
1634 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1636 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1637 (uninstall): Support DESTDIR.
1639 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1641 * configure.srv: Add xscale*linux copy of arm*linux entry.
1643 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1645 * linux-arm-low.c (arm_reinsert_addr): New function.
1646 (the_low_target): Add arm_reinsert_addr.
1648 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1650 * mem-break.c: Remove whitespace at end of file.
1652 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1654 * configure.in: Check whether we need to prototype strerror.
1655 * server.h: Optionally prototype strerror.
1656 * gdbreplay.c (perror_with_name): Use strerror.
1657 * linux-low.c (linux_attach_lwp): Use strerror.
1658 * utils.c (perror_with_name): Use strerror.
1659 * config.in, configure: Regenerated.
1661 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1663 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1664 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1666 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1668 * Makefile.in (SFILES): Update.
1669 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1670 low-sun3.c: Remove files.
1672 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1674 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1675 (linux_detach_one_process, linux_detach): New functions.
1676 (linux_target_ops): Add linux_detach.
1677 * server.c (main): Handle 'D' packet.
1678 * target.h (struct target_ops): Add "detach" member.
1679 (detach_inferior): Define.
1681 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1683 From Kelley Cook <kelleycook@wideopenwest.com>:
1684 * configure.srv: Accept i[34567]86 variants.
1686 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1688 * linux-low.c (linux_wait_for_event): Correct comment typos.
1689 (linux_resume_one_process): Call check_removed_breakpoint.
1690 (linux_send_signal): New function.
1691 (linux_target_ops): Add linux_send_signal.
1692 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1694 * target.h (struct target_ops): Add send_signal.
1696 2003-05-29 Jim Blandy <jimb@redhat.com>
1698 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1699 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1700 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1701 away part of the register's value.
1703 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1705 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1706 (linux_wait_for_event, linux_init_signals): Likewise.
1708 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1710 * configure.in: Check for stdlib.h.
1711 * configure: Regenerated.
1712 * config.in: Regenerated.
1714 2003-01-04 Andreas Schwab <schwab@suse.de>
1716 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1718 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1720 * Makefile.in: Remove obsolete code.
1722 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1724 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1725 defined(PT_FPR0_HI).
1727 2002-11-17 Stuart Hughes <seh@zee2.com>
1729 * linux-arm-low.c (arm_num_regs): Increase.
1730 (arm_regmap): Include status register.
1732 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1734 * linux-low.c (register_addr): Remove incorrect -1 check.
1736 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1738 * linux-low.c (linux_create_inferior): Call setpgid. Return
1740 (unstopped_p, linux_signal_pid): Remove.
1741 (linux_target_ops): Remove linux_signal_pid.
1742 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1743 global instead of target method.
1744 * target.h (struct target_ops): Remove signal_pid. Update comment
1745 for create_inferior.
1746 * server.c (signal_pid): New variable.
1747 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1748 gdbserver. Set the child to be the foreground process group.
1749 (attach_inferior): Set signal_pid.
1751 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1753 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1755 2002-08-20 Jim Blandy <jimb@redhat.com>
1757 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1760 2002-08-01 Andrew Cagney <cagney@redhat.com>
1762 * Makefile.in: Make chill references obsolete.
1764 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1766 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1767 * configure: Regenerate.
1768 * config.in: Regenerate.
1770 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1772 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1773 (perror_with_name, remote_close, remote_open, expect, play): Static.
1775 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1777 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1778 byte offsets instead of an array of indexes.
1779 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1781 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1783 * regcache.c: Add comment.
1785 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1787 * thread-db.c: New file.
1788 * proc-service.c: New file.
1789 * acinclude.m4: New file.
1790 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1791 proc-service.o, and thread-db.o.
1792 (linux-low.o): Add USE_THREAD_DB.
1793 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1794 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1795 * aclocal.m4: Regenerated.
1796 * config.in: Regenerated.
1797 * configure: Regenerated.
1798 * configure.in: Check for proc_service.h, sys/procfs.h,
1799 thread_db.h, and linux/elf.h headrs.
1800 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1801 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1802 Check for -lthread_db and thread support.
1803 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1804 PowerPC, and SuperH.
1805 * i387-fp.c: Constify arguments.
1806 * i387-fp.h: Likewise.
1807 * inferiors.c: (struct thread_info): Renamed from
1808 `struct inferior_info'. Remove PID member. Use generic inferior
1809 list header. All uses updated.
1810 (inferiors, signal_pid): Removed.
1811 (all_threads): New variable.
1812 (get_thread): Define.
1813 (add_inferior_to_list): New function.
1814 (for_each_inferior): New function.
1815 (change_inferior_id): New function.
1816 (add_inferior): Removed.
1817 (remove_inferior): New function.
1818 (add_thread): New function.
1819 (free_one_thread): New function.
1820 (remove_thread): New function.
1821 (clear_inferiors): Use for_each_inferior and free_one_thread.
1822 (find_inferior): New function.
1823 (find_inferior_id): New function.
1824 (inferior_target_data): Update argument type.
1825 (set_inferior_target_data): Likewise.
1826 (inferior_regcache_data): Likewise.
1827 (set_inferior_regcache_data): Likewise.
1828 * linux-low.c (linux_bp_reinsert): Remove.
1829 (all_processes, stopping_threads, using_thrads)
1830 (struct pending_signals, debug_threads, pid_of): New.
1831 (inferior_pid): Replace with macro.
1832 (struct inferior_linux_data): Remove.
1833 (get_stop_pc, add_process): New functions.
1834 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1835 Use add_process and add_thread.
1836 (linux_attach_lwp): New function, based on old linux_attach. Use
1837 add_process and add_thread. Set stop_expected for new threads.
1838 (linux_attach): New function.
1839 (linux_kill_one_process): New function.
1840 (linux_kill): Kill all LWPs.
1841 (linux_thread_alive): Use find_inferior_id.
1842 (check_removed_breakpoints, status_pending_p): New functions.
1843 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1844 Update. Use WNOHANG. Wait for cloned processes also. Update process
1845 struct for the found process.
1846 (linux_wait_for_event): New function.
1847 (linux_wait): Use it. Support LWPs.
1848 (send_sigstop, wait_for_sigstop, stop_all_processes)
1849 (linux_resume_one_process, linux_continue_one_process): New functions.
1850 (linux_resume): Support LWPs.
1851 (REGISTER_RAW_SIZE): Remove.
1852 (fetch_register): Use register_size instead. Call supply_register.
1853 (usr_store_inferior_registers): Likewise. Call collect_register.
1855 (regsets_fetch_inferior_registers): Improve error message.
1856 (regsets_store_inferior_registers): Add debugging.
1857 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1858 (unstopped_p, linux_signal_pid): New functions.
1859 (linux_target_ops): Add linux_signal_pid.
1860 (linux_init_signals): New function.
1861 (initialize_low): Call it. Initialize using_threads.
1862 * regcache.c (inferior_regcache_data): Add valid
1864 (get_regcache): Fetch registers lazily. Add fetch argument
1865 and update all callers.
1866 (regcache_invalidate_one, regcache_invalidate): New
1868 (new_register_cache): Renamed from create_register_cache.
1869 Return the new regcache.
1870 (free_register_cache): Change argument to a void *.
1871 (registers_to_string, registers_from_string): Call get_regcache
1872 with fetch flag set.
1873 (register_data): Make static. Pass fetch flag to get_regcache.
1874 (supply_register): Call get_regcache with fetch flag clear.
1875 (collect_register): Call get_regcache with fetch flag set.
1876 (collect_register_as_string): New function.
1877 * regcache.h: Update.
1878 * remote-utils.c (putpkt): Flush after debug output and use
1880 Handle input interrupts while waiting for an ACK.
1881 (input_interrupt): Use signal_pid method.
1882 (getpkt): Flush after debug output and use stderr.
1883 (outreg): Use collect_register_as_string.
1884 (new_thread_notify, dead_thread_notify): New functions.
1885 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1887 (look_up_one_symbol): Flush after debug output.
1888 * server.c (step_thread, server_waiting): New variables.
1889 (start_inferior): Don't use signal_pid. Update call to mywait.
1890 (attach_inferior): Update call to mywait.
1891 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1892 (main): Don't fetch/store registers explicitly. Use
1893 set_desired_inferior. Support proposed ``Hs'' packet. Update
1896 (struct inferior_list, struct_inferior_list_entry): New.
1897 * target.c (set_desired_inferior): New.
1898 (write_inferior_memory): Constify.
1899 (mywait): New function.
1901 (struct target_ops): New signal_pid method.
1902 (mywait): Removed macro, added prototype.
1904 * linux-low.h (regset_func): Removed.
1905 (regset_fill_func, regset_store_func): New.
1906 (enum regset_type): New.
1907 (struct regset_info): Add type field. Use new operation types.
1908 (struct linux_target_ops): stop_pc renamed to get_pc.
1909 Add decr_pc_after_break and breakpoint_at.
1910 (get_process, get_thread_proess, get_process_thread)
1911 (strut process_info, all_processes, linux_attach_lwp)
1912 (thread_db_init): New.
1914 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1915 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1916 (the_low_target): Add new members.
1917 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1918 (i386_store_fpxregset): Constify.
1919 (target_regsets): Add new kind identifier.
1920 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1921 (i386_set_pc): Add debugging.
1922 (i386_breakpoint_at): New function.
1923 (the_low_target): Add new members.
1924 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1925 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1926 (mips_breakpoint_at): New.
1927 (the_low_target): Add new members.
1928 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1929 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1930 (the_low_target): Add new members.
1931 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1932 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1933 (the_low_target): Add new members.
1934 * linux-x86-64-low.c (target_regsets): Add new kind
1937 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1939 From Martin Pool <mbp@samba.org>:
1940 * server.c (gdbserver_usage): New function.
1943 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1945 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1948 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1950 * Makefile.in: Remove obsolete code.
1952 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1954 * linux-low.c (regsets_fetch_inferior_registers),
1955 (regsets_store_inferior_registers): Removed cast to int from
1957 * regcache.h: Added declaration of struct inferior_info.
1959 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1961 * inferiors.c (struct inferior_info): Add regcache_data.
1962 (add_inferior): Call create_register_cache.
1963 (clear_inferiors): Call free_register_cache.
1964 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1965 * regcache.c (struct inferior_regcache_data): New.
1966 (registers): Remove.
1967 (get_regcache): New function.
1968 (create_register_cache, free_register_cache): New functions.
1969 (set_register_cache): Don't initialize the register cache here.
1970 (registers_to_string, registers_from_string, register_data): Call
1972 * regcache.h: Add prototypes.
1973 * server.h: Likewise.
1975 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1977 * mem-break.c: New file.
1978 * mem-break.h: New file.
1979 * Makefile.in: Add mem-break.o rule; update server.h
1981 * inferiors.c (struct inferior_info): Add target_data
1983 (clear_inferiors): Free target_data member if set.
1984 (inferior_target_data, set_inferior_target_data): New functions.
1985 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1986 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1987 * linux-low.c (linux_bp_reinsert): New variable.
1988 (struct inferior_linux_data): New.
1989 (linux_create_inferior): Use set_inferior_target_data.
1990 (linux_attach): Likewise. Call add_inferior.
1991 (linux_wait_for_one_inferior): New function.
1992 (linux_wait): Call it.
1993 (linux_write_memory): Add const.
1994 (initialize_low): Call set_breakpoint_data.
1995 * linux-low.h (struct linux_target_ops): Add breakpoint
1997 * server.c (attach_inferior): Remove extra add_inferior
1999 * server.h: Include mem-break.h. Update inferior.c
2001 * target.c (read_inferior_memory)
2002 (write_inferior_memory): New functions.
2003 * target.h (read_inferior_memory)
2004 (write_inferior_memory): Change macros to prototypes.
2005 (struct target_ops): Update comments. Add const to write_memory
2008 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2010 * linux-low.c (usr_store_inferior_registers): Support
2011 registers which are allowed to fail to store.
2012 * linux-low.h (linux_target_ops): Likewise.
2013 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2014 (ppc_cannot_store_register): FPSCR may not be storable.
2016 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2018 * server.h: Include <string.h> if HAVE_STRING_H.
2019 * ChangeLog: Correct paths in last ChangeLog entry.
2021 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2023 * linux-low.h: Remove obsolete prototypes.
2024 (struct linux_target_ops): New.
2025 (extern the_low_target): New.
2026 * linux-low.c (num_regs, regmap): Remove declarations.
2027 (register_addr): Use the_low_target explicitly.
2028 (fetch_register): Likewise.
2029 (usr_fetch_inferior_registers): Likewise.
2030 (usr_store_inferior_registers): Likewise.
2031 * linux-arm-low.c (num_regs): Remove.
2032 (arm_num_regs): Define.
2033 (arm_regmap): Renamed from regmap, made static.
2034 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2036 (arm_cannot_store_register): Renamed from cannot_store_register,
2038 (the_low_target): New.
2039 * linux-i386-low.c (num_regs): Remove.
2040 (i386_num_regs): Define.
2041 (i386_regmap): Renamed from regmap, made static.
2042 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2044 (i386_cannot_store_register): Renamed from cannot_store_register,
2046 (the_low_target): New.
2047 * linux-ia64-low.c (num_regs): Remove.
2048 (ia64_num_regs): Define.
2049 (ia64_regmap): Renamed from regmap, made static.
2050 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2052 (ia64_cannot_store_register): Renamed from cannot_store_register,
2054 (the_low_target): New.
2055 * linux-m68k-low.c (num_regs): Remove.
2056 (m68k_num_regs): Define.
2057 (m68k_regmap): Renamed from regmap, made static.
2058 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2060 (m68k_cannot_store_register): Renamed from cannot_store_register,
2062 (the_low_target): New.
2063 * linux-mips-low.c (num_regs): Remove.
2064 (mips_num_regs): Define.
2065 (mips_regmap): Renamed from regmap, made static.
2066 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2068 (mips_cannot_store_register): Renamed from cannot_store_register,
2070 (the_low_target): New.
2071 * linux-ppc-low.c (num_regs): Remove.
2072 (ppc_num_regs): Define.
2073 (ppc_regmap): Renamed from regmap, made static.
2074 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2076 (ppc_cannot_store_register): Renamed from cannot_store_register,
2078 (the_low_target): New.
2079 * linux-s390-low.c (num_regs): Remove.
2080 (s390_num_regs): Define.
2081 (s390_regmap): Renamed from regmap, made static.
2082 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2084 (s390_cannot_store_register): Renamed from cannot_store_register,
2086 (the_low_target): New.
2087 * linux-sh-low.c (num_regs): Remove.
2088 (sh_num_regs): Define.
2089 (sh_regmap): Renamed from regmap, made static.
2090 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2092 (sh_cannot_store_register): Renamed from cannot_store_register,
2094 (the_low_target): New.
2095 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2096 (the_low_target): New.
2098 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2100 * Makefile.in: Add stamp-h target.
2101 * configure.in: Create stamp-h.
2102 * configure: Regenerated.
2104 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2106 * inferiors.c: New file.
2107 * target.c: New file.
2108 * target.h: New file.
2109 * Makefile.in: Add target.o and inferiors.o. Update
2111 * linux-low.c (inferior_pid): New static variable,
2112 moved from server.c.
2113 (linux_create_inferior): Renamed from create_inferior.
2114 Call add_inferior. Return 0 on success instead of a PID.
2115 (linux_attach): Renamed from myattach.
2116 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2117 (linux_thread_alive): Renamed from mythread_alive.
2118 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2120 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2121 (regsets_store_inferior_registers): Correct error message.
2122 Add missing ``return 0''.
2123 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2124 (linux_store_registers): Renamed from store_inferior_registers.
2125 (linux_read_memory): Renamed from read_inferior_memory.
2126 (linux_write_memory): Renamed from write_inferior_memory.
2127 (linux_target_ops): New structure.
2128 (initialize_low): Call set_target_ops ().
2129 * remote-utils.c (unhexify): New function.
2130 (hexify): New function.
2131 (input_interrupt): Send signals to ``signal_pid''.
2132 * server.c (inferior_pid): Remove.
2133 (start_inferior): Update create_inferior call.
2134 (attach_inferior): Call add_inferior.
2135 (handle_query): New function.
2136 (main): Call handle_query for `q' packets.
2137 * server.h: Include "target.h". Remove obsolete prototypes.
2138 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2140 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2142 * Makefile.in: Add WARN_CFLAGS. Update configury
2144 * configure.in: Check for <string.h>
2145 * configure: Regenerate.
2146 * config.in: Regenerate.
2147 * gdbreplay.c: Include needed system headers.
2148 (remote_open): Remove strchr prototype.
2149 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2150 * regcache.c (supply_register): Change buf argument to const void *.
2151 (supply_register_by_name): Likewise.
2152 (collect_register): Change buf argument to void *.
2153 (collect_register_by_name): Likewise.
2154 * regcache.h: Add missing prototypes.
2155 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2156 * server.c (handle_query): New function.
2157 (attached): New static variable, moved out of main.
2158 (main): Quiet longjmp clobber warnings.
2159 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2160 * utils.c (error): Remove NORETURN.