1 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4 * remote-utils.c (remote_open): Do not call disable_async_io.
5 (block_async_io): Delete.
6 (unblock_async_io): Make static.
7 (initialize_async_io): New.
8 * server.c (handle_v_cont): Handle async I/O here.
9 (myresume): Likewise. Move other common resume tasks here...
10 (main): ... from here. Call initialize_async_io. Disable async
11 I/O before the main loop.
12 * server.h (initialize_async_io): Declare.
13 (block_async_io, unblock_async_io): Delete prototypes.
14 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
18 * remote-utils.c (readchar): Allow binary data in received messages.
20 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
22 * win32-low.c (attaching): New global.
23 (win32_create_inferior): Clear the `attaching' global.
24 (win32_attach): Set the `attaching' global.
25 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
26 attaching. Only set a breakpoint at the entry point if not
29 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
31 * server.c (main): Don't report dll events on the initial
32 connection on attaches.
34 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
36 * server.c (main): Relax numerical bases supported for the pid of
37 the --attach command line argument.
39 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
41 * win32-low.c (win32_attach): Call OpenProcess before
42 DebugActiveProcess, not after. Add last error output to error
45 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
47 * win32-low.c (win32_get_thread_context)
48 (win32_set_thread_context): New functions.
49 (thread_rec): Use win32_get_thread_context.
50 (continue_one_thread, win32_resume): Use win32_set_thread_context.
51 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
55 Pedro Alves <pedro_alves@portugalmail.pt>
57 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
59 (child_add_thread): Minor cleanup.
60 (child_continue): Resume artificially suspended threads before
61 calling ContinueDebugEvent.
62 (suspend_one_thread): New.
63 (fake_breakpoint_event): New.
64 (get_child_debug_event): Change return type to int. Check here if
65 gdb sent an interrupt request. If a soft interrupt was requested,
66 fake a breakpoint event. Return 0 if there is no event to handle,
68 (win32_wait): Don't check here if gdb sent an interrupt request.
69 Ensure there is a valid event to handle.
70 (win32_request_interrupt): Add soft interruption method as last
74 Pedro Alves <pedro_alves@portugalmail.pt>
76 * win32-low.h (win32_thread_info): Add descriptions to the
77 structure members. Replace `suspend_count' counter by a
79 * win32-low.c (thread_rec): Update condition of when to get the
80 context from the inferior. Rely on ContextFlags being set if it
81 has already been retrieved. Only suspend the inferior thread if
82 we haven't already. Warn if that fails.
83 (continue_one_thread): s/suspend_count/suspended/. Only call
84 ResumeThread once. Warn if that fails.
86 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
88 * win32-low.c (win32_wait): Don't read from the inferior when it
91 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
93 * Makefile.in (win32_low_h): New variable.
94 (win32-low.o): Add dependency on $(win32_low_h).
95 (win32-arm-low.o, win32-i386-low.o): New rules.
97 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
99 * hostio.c: Correct copyright year.
101 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
103 * Makefile.in (OBS): Add hostio.o.
104 (hostio.o): New rule.
105 * server.h (handle_vFile): Declare.
106 * hostio.c: New file.
107 * server.c (handle_v_requests): Take packet_len and new_packet_len
108 for binary packets. Call handle_vFile.
109 (main): Update call to handle_v_requests.
111 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
113 * linux-low.c: Include <sched.h>.
115 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
117 * linux-low.c (linux_tracefork_grandchild): New.
118 (linux_tracefork_child): Use clone.
119 (linux_test_for_tracefork): Use clone; allocate and free a stack.
121 2007-10-31 Joel Brobecker <brobecker@adacore.com>
123 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
125 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
127 * linux-low.c (handle_extended_wait): Handle unexpected signals.
129 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
131 * inferiors.c (change_inferior_id): Delete.
132 (add_pid_to_list, pull_pid_from_list): New.
133 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
134 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
135 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
136 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
137 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
138 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
139 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
140 (using_threads): Always set to 1.
141 (handle_extended_wait): New.
142 (add_process): Do not set TID.
143 (linux_create_inferior): Set must_set_ptrace_flags.
144 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
145 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
146 (linux_thread_alive): Rename TID argument to LWPID.
147 (linux_wait_for_process): Handle unknown processes. Do not use TID.
148 (linux_wait_for_event): Do not use TID or check using_threads. Update
149 call to dead_thread_notify. Call handle_extended_wait.
150 (linux_create_inferior): Use PTRACE_SETOPTIONS.
151 (send_sigstop): Delete sigstop_sent.
152 (wait_for_sigstop): Avoid TID.
153 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
154 (linux_test_for_tracefork): New.
155 (linux_lookup_signals): Use thread_db_active and
156 linux_supports_tracefork_flag.
157 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
158 * linux-low.h (get_process_thread): Avoid TID.
159 (struct process_ifo): Move thread_known and tid to the end. Remove
161 (linux_attach_lwp, thread_db_init): Update prototypes.
162 * server.h (change_inferior_id): Delete prototype.
163 (add_pid_to_list, pull_pid_from_list): New prototypes.
164 * thread-db.c (thread_db_use_events): New.
165 (find_first_thread): Rename to...
166 (find_one_thread): ...this. Update callers and messages. Do not
167 call fatal. Check thread_db_use_events. Do not call
168 change_inferior_id or new_thread_notify.
169 (maybe_attach_thread): Update. Do not call new_thread_notify.
170 (thread_db_init): Set thread_db_use_events. Check use_events.
171 * utils.c (fatal, warning): Correct message prefix.
173 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
175 * Makefile.in (clean): Remove new files.
176 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
177 (powerpc-64.o, powerpc-64.c): New rules.
178 * configure.srv: Use alternate register sets for powerpc64-*-linux*
179 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
181 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
183 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
184 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
185 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
186 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
187 (target_regsets): Add AltiVec and SPE register sets.
188 * configure.ac: Check for AltiVec and SPE.
189 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
190 (ppc_fill_vrregset, ppc_store_vrregset): New.
191 (target_regsets): Add AltiVec register set.
192 * configure: Regenerated.
194 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
196 * linux-low.c (O_LARGEFILE): Define.
197 (linux_read_memory): Use /proc/PID/mem.
198 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
199 * configure, config.in: Regenerated.
201 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
203 * linux-low.c (linux_wait_for_event): Do not pass signals while
206 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
208 * win32-low.c (create_process): New.
209 (win32_create_inferior): Use create_process instead of
210 CreateProcess. If create_process failed retry appending an ".exe"
211 suffix. Store the GetLastError result immediatelly after
212 create_process calls and use it on the call to error.
214 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
216 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
218 2007-08-23 Joel Brobecker <brobecker@adacore.com>
220 * configure.ac: Switch license to GPLv3.
222 2007-08-01 Michael Snyder <msnyder@access-company.com>
224 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
226 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
228 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
230 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
231 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
232 CloseToolhelp32Snapshot.
233 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
234 CloseToolhelp32Snapshot.
236 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
238 * server.c (main): Check for inferior exit before main loop.
240 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
242 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
243 instead of on tmp_desc.
245 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
246 Daniel Jacobowitz <dan@codesourcery.com>
248 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
249 (add_thread): Minor cleanups.
250 (clear_inferiors): Move lower in the file. Clear the DLL
252 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
253 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
254 (xml_escape_text): New.
255 * server.c (handle_query): Handle qXfer:libraries:read. Report it
257 (handle_v_cont): Report errors.
258 (gdbserver_version): Update.
259 (main): Correct size of own_buf. Do not report initial DLL events.
260 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
261 (unloaded_dll, xml_escape_text): New.
262 * win32-low.c (enum target_waitkind): Update comments.
263 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
264 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
265 (win32_EnumProcessModules, win32_GetModuleInformation)
266 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
267 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
268 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
269 (win32_Module32First, win32_Module32Next, load_toolhelp)
270 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
271 (get_child_debug_event): Handle DLL events.
272 (win32_wait): Likewise.
274 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
276 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
277 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
279 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
281 * win32-low.c (handle_output_debug_string): Ignore event if not
284 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
286 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
288 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
290 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
292 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
294 * inferiors.c (change_inferior_id): Add comment.
295 * linux-low.c (check_removed_breakpoint): Add an early
296 prototype. Improve debug output.
297 (linux_attach): Doc update.
298 (linux_detach_one_process, linux_detach): Clean up before releasing
300 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
301 * linux-low.h (struct process_info): Doc improvement.
302 * mem-break.c (delete_all_breakpoints): New.
303 * mem-break.h (delete_all_breakpoints): New prototype.
304 * thread-db.c (find_first_thread): New.
305 (thread_db_create_event): Call it instead of
306 thread_db_find_new_threads. Clean up unused variables.
307 (maybe_attach_thread): Remove first thread handling.
308 (thread_db_find_new_threads): Use find_first_thread.
309 (thread_db_get_tls_address): Likewise.
311 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
313 * thread-db.c (thread_db_find_new_threads): Add prototype.
314 (thread_db_create_event): Check for the main thread before adding
316 (maybe_attach_thread): Only enable event reporting if TID == 0.
317 (thread_db_get_tls_address): Check for new threads.
319 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
321 * linux-low.c (linux_create_inferior): Try execv before execvp.
322 * spu-low.c (spu_create_inferior): Likewise.
324 2007-06-13 Mike Frysinger <vapier@gentoo.org>
326 * linux-low.c (linux_create_inferior): Change execv to execvp.
327 * spu-low.c (spu_create_inferior): Likewies.
329 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
331 * Makefile.in (clean): Clean new files instead of deleted ones.
332 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
333 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
335 * configure.srv: Specify XML files and new regformats for MIPS and
337 * linux-mips-low.c (mips_num_regs): Set to only used registers.
338 (mips_regmap): Do not fetch $0. Remove unused registers. Add
339 an entry for the restart register.
340 (mips_cannot_fetch_register, mips_cannot_store_register)
341 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
342 register names to match the XML descriptions.
343 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
344 restart register instead of $0.
346 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
347 Markus Deuling <deuling@de.ibm.com>
349 * remote-utils.c (decode_xfer_write): New function.
350 * server.h (decode_xfer_write): Add prototype.
351 * server.c (handle_query): Add PACKET_LEN argument. Support
352 qXfer:spu:read and qXfer:spu:write packets.
353 (main): Pass packet_len to handle_query.
354 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
355 * target.h (target_ops): Add qxfer_spu.
357 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
359 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
360 accessing non-seekable spufs files.
362 2007-05-16 Markus Deuling <deuling@de.ibm.com>
364 * server.c (handle_query): Add reply for qC packet.
366 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
367 Leo Zayas <lerele@champenstudios@com>
369 * server.h (check_remote_input_interrupt_request): New function.
370 * remote_utils.c (INVALID_DESCRIPTOR): New define.
371 (remote_desc): Initialize with INVALID_DESCRIPTOR.
372 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
373 (check_remote_input_interrupt_request): New function.
374 * server.h (check_remote_input_interrupt_request): Declare.
375 * win32-low.c (winapi_DebugBreakProcess,
376 winapi_GenerateConsoleCtrlEvent): New typedefs.
377 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
379 (win32_wait): Check for remote interrupt request
380 with check_remote_input_interrupt_request.
381 (win32_request_interrupt): New function.
382 (win32_target_op): Set request_interrupt to win32_request_interrupt.
384 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
386 * win32-low.c (debug_registers_changed,
387 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
388 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
389 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
390 (thread_rec): Get context using the low target.
391 (child_add_thread): Call thread_added on the low target,
392 which does the same thing.
394 (do_initial_child_stuff): Remove debug registers references.
395 Set context using the low target. Resume threads after
396 setting the contexts.
397 (child_continue): Remove dead variable. Remove debug
398 registers references.
399 (child_fetch_inferior_registers): Go through the low target.
400 (do_child_store_inferior_registers): Remove.
401 (child_store_inferior_registers): Go through the low target.
402 (win32_resume): Remove debug registers references.
403 Set context using the low target.
404 (handle_exception): Change return type to void. Don't record
405 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
406 first chance exception.
407 (get_child_debug_event): Change return type to void. Remove
408 goto loop. Always return after waiting for debug event.
409 (win32_wait): Convert to switch statement. Handle spurious
412 * win32-i386-low.c (debug_registers_changed,
413 debug_registers_used): New.
414 (initial_stuff): Rename to ...
415 (i386_initial_stuff): ... this. Clear debug registers
417 (store_debug_registers): Delete.
418 (i386_get_thread_context): New.
419 (load_debug_registers): Delete.
420 (i386_set_thread_context): New.
421 (i386_thread_added): New.
422 (single_step): Rename to ...
423 (i386_single_step): ... this.
424 (do_fetch_inferior_registers): Rename to ...
425 (i386_fetch_inferior_register): ... this.
426 (i386_store_inferior_register): New.
427 (the_low_target): Adapt to new interface.
429 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
430 (arm_get_thread_context): New.
431 (arm_set_thread_context): New.
433 (do_fetch_inferior_registers): Rename to ...
434 (arm_fetch_inferior_register): ... this.
435 (arm_store_inferior_register): New.
436 (arm_wince_breakpoint): Reimplement as unsigned long.
437 (arm_wince_breakpoint_len): Define.
438 (the_low_target): Adapt to new interface.
440 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
441 load_debug_registers. Add get_thread_context, set_thread_context,
442 thread_added and store_inferior_register. Rename
443 fetch_inferior_registers to fetch_inferior_register.
444 (regptr): Remove declaration.
446 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
448 * linux-low.c (linux_detach): Change return type to int. Return 0.
449 * spu-low.c (spu_detach): Likewise.
451 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
453 * target.h (target_ops): Change return type of detach to int.
455 (join_inferior): New.
456 * server.c (main): Don't skip detach support on mingw32.
457 If the inferior doesn't support detaching return error.
458 Call join_inferior instead of using waitpid.
459 * linux-low.c (linux_join): New.
460 (linux_target_op): Add linux_join.
461 * spu-low.c (spu_join): New.
462 (spu_target_ops): Add spu_join.
463 * win32-low.c (win32_detach): Adapt to new interface.
464 Reopen current_process_handle before detaching. Issue a child
465 resume before detaching.
467 (win32_target_op): Add win32_join.
469 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
471 * win32-low.c (win32-attach): Fix return value.
472 * target.h (target_ops): Describe ATTACH return values.
474 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
476 * win32-low.c (GETPROCADDRESS): Define.
477 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
478 (winapi_DebugSetProcessKillOnExit): Likewise.
479 (win32_create_inferior): Force usage of ansi CreateProcessA.
480 (win32_attach): Use GETPROCADDRESS.
481 (win32_detach): Likewise.
483 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
485 * win32-low.c (win32_wait): Don't use WSTOPSIG.
487 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
489 * win32-low.c: Commit leftover changes from 2007-03-29.
491 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
493 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
494 fields short instead of int. Add explicit padding.
495 (i387_cache_to_fsave): Remove unnecessary casts.
496 (i387_fsave_to_cache): Doc fix.
497 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
499 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
501 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
502 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
504 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
506 * configure.srv (arm*-*-mingw32ce*): Move near the other
509 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
511 * configure.ac: Add errno checking.
512 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
513 sys/file.h and malloc.h.
514 (AC_CHECK_DECLS): Add perror.
515 (srv_mingwce): Handle.
516 * configure.srv (i[34567]86-*-cygwin*): Add
517 win32-i386-low.o to srv_tgtobj.
518 (i[34567]86-*-mingw*): Likewise.
519 (arm*-*-mingw32ce*): Add case.
520 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
521 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
522 [__MINGW32CE__] (strerror): New function.
523 [__MINGW32CE__] (errno): Define to GetLastError.
524 [__MINGW32CE__] (COUNTOF): New macro.
525 (remote_open): Remove extra close call.
526 * mem-break.c (delete_breakpoint_at): New function.
527 * mem-break.h (delete_breakpoint_at): Declare.
528 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
529 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
530 [USE_WIN32API] (read, write): Add char* casts.
531 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
532 * server.h: Include wincecompat.h on Windows CE.
533 [HAVE_ERRNO_H]: Check.
534 (perror): Declare if not declared.
535 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
536 (perror_with_name): Remove errno declaration.
537 * wincecompat.h: New.
538 * wincecompat.c: New.
540 * win32-arm-low.c: New.
541 * win32-i386-low.c: New.
542 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
543 (OUTMSG2): Make it safe.
545 (COUNTOF): New macro.
546 (NUM_REGS): Get it from the low target.
547 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
548 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
549 (thread_rec): Let low target handle debug registers.
550 (child_add_thread): Likewise.
551 (child_init_thread_list): Likewise.
552 (continue_one_thread): Likewise.
554 (do_child_fetch_inferior_registers): Move to ...
555 * win32-i386-low.c: ... here, and rename to ...
556 (do_fetch_inferior_registers): ... this.
557 * win32-low.c (child_fetch_inferior_registers):
558 Go through the low target.
559 (do_child_store_inferior_registers): Use regptr.
560 (strwinerror): New function.
561 (win32_create_inferior): Handle Windows CE.
562 Use strwinerror instead of strerror on Windows error
563 codes. Add program to the error output.
564 Don't close the main thread handle on Windows CE.
565 (win32_attach): Use coredll.dll on Windows CE.
566 (win32_kill): Close current process and current
568 (win32_detach): Use coredll.dll on Windows CE.
569 (win32_resume): Let low target handle debug registers, and
571 (handle_exception): Add/Remove initial breakpoint. Avoid
572 non-existant WSTOPSIG on Windows CE.
573 (win32_read_inferior_memory): Cast to remove warning.
574 (win32_arch_string): Go through the low target.
575 (initialize_low): Call set_breakpoint_data with the low
577 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
578 FOP_REGNUM, mappings): Move to ...
579 * win32-i386-low.c: ... here.
580 * win32-low.c (win32_thread_info): Move to ...
581 * win32-low.h: ... here.
582 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
583 win32-arm-low.c and wincecompat.c.
585 (install-only:): Likewise.
586 (gdbserver:): Likewise.
587 (gdbreplay:): Likewise.
588 * config.in: Regenerate.
589 * configure: Regenerate.
591 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
593 * win32-low.c: Rename typedef thread_info to
594 win32_thread_info throughout.
596 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
598 * win32-i386-low.c: Rename to ...
599 * win32-low.c: ... this.
600 * configure.srv: Replace win32-i386-low.o with win32-low.o.
601 * Makefile.in: Likewise.
603 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
605 * remote-utils.c (monitor_output): Constify msg parameter.
606 * server.h (monitor_output): Likewise.
607 * win32-i386-low.c (handle_output_debug_string): New.
608 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
609 handle_output_debug_string.
610 (get_child_debug_event): Likewise.
612 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
614 * server.c (main): Correct strtoul check.
616 2007-03-27 Jon Ringle <jon@ringle.org>
618 * linux-low.c: Check __ARCH_HAS_MMU__ also.
620 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
622 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
624 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
626 * terminal.h: Check HAVE_SGTTY_H.
628 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
630 * remote-utils.c (remote_open): Print out the assigned port number.
632 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
634 * remote-utils.c (monitor_output): New function.
635 * server.c (debug_threads): Define here.
636 (monitor_show_help): New function.
637 (handle_query): Handle qRcmd.
638 (main): Do not handle 'd' packet.
639 * server.h (debug_threads, remote_debug, monitor_output): Declare.
640 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
643 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
645 * Makefile.in (EXEEXT): New.
646 (clean): Use $(EXEEXT).
648 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
650 * target.h (target_ops): Rename send_signal to request_interrupt,
651 and remove enum target_signal parameter.
652 * linux-low.c (linux_request_interrupt): Rename from
653 linux_send_signal, and always send SIGINT.
654 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
655 and always send SIGINT.
656 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
658 (input_interrupt): Likewise.
660 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
662 * server.c (get_features_xml): Check if target implemented
664 * win32-i386-low.c (win32_arch_string): New.
665 (win32_target_ops): Add win32_arch_string as arch_string member.
667 2007-02-22 Markus Deuling <deuling@de.ibm.com>
669 * spu-low.c (spu_arch_string): New.
670 (spu_target_ops): Add spu_arch_string.
672 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
674 * remote-utils.c: Remove HAVE_TERMINAL_H check.
675 * configure.ac: Do not check for terminal.h.
676 * configure, config.in: Regenerated.
678 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
680 * Makefile.in (OBS): Add $(XML_BUILTIN).
681 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
683 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
684 (arm-with-iwmmxt.c): New.
685 * config.in, configure: Regenerate.
686 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
687 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
688 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
689 (arm*-*-linux*): Add iWMMXt and regset support.
690 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
691 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
692 (arm_store_wmmxregset, target_regsets): New.
693 * server.c (get_features_xml): Take annex argument. Check builtin
695 (handle_query): Handle multiple annexes.
697 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
699 * remote-utils.c [USE_WIN32API] (read, write): Define.
700 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
703 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
705 * linux-i386-low.c (the_low_target): Set arch_string.
706 * linux-x86-64-low.c (the_low_target): Likewise.
707 * linux-low.c (linux_arch_string): New.
708 (linux_target_ops): Add it.
709 * linux-low.h (struct linux_target_ops): Add arch_string.
710 * server.c (write_qxfer_response): Use const void * for DATA.
711 (get_features_xml): New.
712 (handle_query): Handle qXfer:features:read. Report it for qSupported.
713 * target.h (struct target_ops): Add arch_string method.
715 2007-01-03 Denis Pilat <denis.pilat@st.com>
716 Daniel Jacobowitz <dan@codesourcery.com>
718 * linux-low.c (linux_kill): Handle being called with no threads.
719 * win32-i386-low.c (win32_kill): Likewise.
720 (get_child_debug_event): Clear current_process_handle.
722 2006-12-30 Denis PILAT <denis.pilat@st.com>
723 Daniel Jacobowitz <dan@codesourcery.com>
725 * remote-utils.c (remote_open): Check the type of specified
726 serial port devices before opening them.
727 * server.c (main): Kill the inferior if an error occurs during
728 the first remote_open.
730 2006-12-05 Markus Deuling <deuling@de.ibm.com>
732 * README: Update supported targets.
734 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
736 * Makefile.in (clean): Remove reg-mips64.c.
737 (reg-mips64.c, reg-mips64.o): New rules.
738 * configure.srv: Handle mips64. Include regset support for mips.
739 * linux-mips-low.c (union mips_register): New.
740 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
741 (mips_breakpoint, mips_breakpoint_at): Use int.
742 (mips_collect_register, mips_supply_register)
743 (mips_collect_register_32bit, mips_supply_register_32bit)
744 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
745 (mips_store_fpregset, target_regsets): New.
746 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
748 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
750 * configure.srv: Add target "spu*-*-*".
751 * Makefile.in (clean): Remove reg-spu.c.
752 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
753 * spu-low.c: New file.
755 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
757 * configure.ac: Correct td_thr_tls_get_addr test.
758 * configure: Regenerated.
760 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
762 * linux-low.c (linux_wait_for_event): Reformat. Use the
764 * remote-utils.c (decode_address_to_semicolon): New.
765 * server.c (pass_signals, handle_general_set): New.
766 (handle_query): Mention QPassSignals for qSupported.
767 (main): Call handle_general_set.
768 * server.h (pass_signals, decode_address_to_semicolon): New.
770 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
772 * server.c (handle_query): Correct error handling for read_auxv.
774 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
776 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
777 and srv_linux_thread_db to yes.
778 * linux-s390-low.c (s390_fill_gregset): New function.
779 (target_regsets): Define data structure.
781 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
783 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
784 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
785 * config.in, configure: Regenerated.
786 * inferiors.c (gdb_id_to_thread): New function.
787 (gdb_id_to_thread_id): Use it.
788 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
789 * linux-low.h (struct process_info): Add th member.
790 (thread_db_get_tls_address): New prototype.
791 * remote-utils.c (decode_address): Make non-static.
792 * server.c (handle_query): Handle qGetTLSAddr.
793 * server.h (gdb_id_to_thread, decode_address): New prototypes.
794 * target.h (struct target_ops): Add get_tls_address.
795 * thread-db.c (maybe_attach_thread): Save the thread handle.
796 (thread_db_get_tls_address): New.
798 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
800 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
801 (linux_resume_one_process): Take a siginfo_t *. Update all
802 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
803 (struct pending_signals): Add a siginfo_t.
804 (linux_wait_for_process): Always set last_status.
805 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
806 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
807 * linux-low.h (struct process_info): Add last_status.
809 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
811 * remote-utils.c (try_rle): New function.
812 (putpkt_binary): Use it.
814 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
816 * Makefile.in (clean): Clean reg-x86-64-linux.c.
817 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
818 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
819 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
820 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
823 2006-08-08 Richard Sandiford <richard@codesourcery.com>
825 * server.c (terminal_fd): New variable.
826 (old_foreground_pgrp): Likewise.
827 (restore_old_foreground_pgrp): New function.
828 (start_inferior): Record the terminal file descriptor in terminal_fd
829 and its original foreground group in old_foreground_pgrp. Register
830 restore_old_foreground_pgrp with atexit().
832 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
834 * server.c (handle_query): Correct qPart to qXfer.
836 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
838 * configure.ac: Check for more headers which are missing on
839 Windows. Automatically supply -lwsock32 and USE_WIN32API.
840 * configure.srv: Add Cygwin and mingw32.
841 * remote-utils.c: Don't include headers unconditionally which
842 are missing on mingw32. Include <winsock.h> for mingw32.
843 (remote_open): Adjust for mingw32 support. Flush
844 standard error after writing to it.
845 (remote_close, putpkt_binary, input_interrupt, block_async_io)
846 (unblock_async_io, enable_async_io, disable_async_io)
847 (readchar, getpkt): Update for Winsock support.
848 (prepare_resume_reply): Expect a protocol signal number.
849 * server.c: Disable <sys/wait.h> on mingw32.
850 (start_inferior): Adjust for mingw32 support. Flush
851 standard error after writing to it.
852 (attach_inferior): Likewise. Use protocol signal
854 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
856 * win32-i386-low.c: New file.
857 * Makefile.in (XM_CLIBS): Set.
858 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
859 (win32-i386-low.o): New dependency rule.
860 * linux-low.c (linux_wait): Use target signal numbers.
861 * target.h (struct target_ops): Doc fix.
862 * server.h (target_signal_to_name): New prototype.
863 * gdbreplay.c: Don't include headers unconditionally which
864 are missing on mingw32. Include <winsock.h> for mingw32.
865 (remote_close, remote_open): Adjust for Winsock support.
866 * configure, config.in: Regenerated.
868 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
870 * server.c (decode_xfer_read, write_qxfer_response): New.
871 (handle_query): Take a packet length argument. Handle
872 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
873 the qSupported response.
874 (main): Update call to handle_query.
876 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
878 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
879 (putpkt_binary): Renamed from putpkt and adjusted for binary
881 (putpkt): New wrapper for putpkt_binary.
882 (readchar): Don't mask off the high bit.
883 (decode_X_packet): New function.
884 * server.c (main): Call putpkt_binary if a handler sets the packet
885 length. Save the length of the incoming packet. Handle 'X'.
886 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
888 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
890 * server.c (handle_query): Handle qSupported.
892 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
894 * remote-utils.c (all_symbols_looked_up): New variable.
895 (look_up_one_symbol): Check it.
896 * server.h (look_up_one_symbol): New declaration.
897 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
899 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
901 * Makefile.in (linux-arm-low.o): Update dependencies.
902 * linux-arm-low.c: Include "gdb_proc_service.h".
903 (PTRACE_GET_THREAD_AREA): Define.
904 (ps_get_thread_area): New function.
906 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
908 * configure.srv (m68k*-*-uclinux*): New target.
909 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
910 (linux_resume_one_process): Remove extraneous cast.
911 (linux_read_offsets): New.
912 (linux_target_op): Add linux_read_offsets on mmuless systems.
913 * server.c (handle_query): Add qOffsets logic.
914 * target.h (struct target_ops): Add read_offsets.
916 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
918 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
919 (PTRACE_GET_THREAD_AREA): Define.
920 (ps_get_thread_area): New function.
921 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
922 (linux-x86-64-low.o): Update.
924 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
926 * configure.ac: Remove checks for prfpregset_t.
927 * gdb_proc_service.h: New file.
928 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
929 new "gdb_proc_service.h".
930 * proc-service.c: Likewise.
931 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
932 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
933 * Makefile.in (gdb_proc_service_h): Updated.
934 * configure, config.in: Regenerated.
936 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
938 * remote-utils.c (prepare_resume_reply): Move declaration
939 of gdb_id_from_wait to the top of the block.
941 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
943 * linux-low.c (regsets_store_inferior_registers): Read the regset
944 from the target before filling it.
946 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
948 * server.c (attach_inferior): Return SIGTRAP for a successful
951 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
953 * Makefile.in (OBS): Add version.o.
954 (STAGESTUFF): Delete.
955 (version.o): Add dependencies.
956 (version.c): Replace rule.
957 (clean): Remove version.c.
958 * server.c (gdbserver_version): New.
959 (gdbserver_usage): Use printf.
960 (main): Handle --version and --help.
961 * server.h (version, host_name): Add declarations.
963 2005-12-23 Eli Zaretskii <eliz@gnu.org>
975 * linux-x86-64-low.c:
987 * linux-crisv32-low.c:
999 * gdbserver.1: Add (C) after Copyright. Update the FSF
1002 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1004 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1005 (arm_breakpoint_at): Recognize both breakpoints.
1006 (the_low_target): Use the correct breakpoint instruction.
1008 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1010 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1011 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1012 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1013 (the_low_target): Update.
1015 2005-10-25 Andreas Schwab <schwab@suse.de>
1017 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1019 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1020 (ia64_num_regs): Reduce to 462.
1022 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1024 * acinclude.m4: Correct quoting.
1025 * aclocal.m4: Regenerated.
1027 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1028 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1029 (thread_db_init): Call thread_db_err_str.
1030 * configure.ac: Check for TD_VERSION.
1031 * config.in, configure: Regenerated.
1033 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1035 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1037 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1039 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1040 is not available. Define HAVE_PTRACE_GETREGS if it is.
1041 * config.in, configure: Regenerated.
1042 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1043 * linux-i386-low.c, linux-m68k-low.c: Update to use
1044 HAVE_PTRACE_GETREGS.
1045 * linux-low.c (regsets_fetch_inferior_registers)
1046 (regsets_store_inferior_registers): Only return 0 if we processed
1048 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1049 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1051 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1053 * inferiors.c (struct thread_info): Add gdb_id.
1054 (add_thread): Add gdb_id argument.
1055 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1056 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1057 calls to add_thread.
1058 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1059 * server.c (handle_query): Use thread_to_gdb_id.
1060 (handle_v_cont, main): Use gdb_id_to_thread_id.
1061 * server.h (add_thread): Update prototype.
1062 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1065 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1067 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1068 left-padded registers.
1069 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1070 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1072 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1074 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1075 * configure: Regenerate.
1076 * config.in: Regenerate.
1077 * server.h (NEED_DECLARATION_STRERROR):
1078 Replace with !HAVE_DECL_STRERROR.
1080 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1082 * linux-low.c (linux_wait, linux_send_signal): Don't test
1083 an unsigned long variable for > 0 if it could be MAX_ULONG.
1084 * server.c (myresume): Likewise.
1085 * target.c (set_desired_inferior): Likewise.
1087 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1089 * configure.ac: Simplify and improve check for socklen_t.
1090 * configure, config.in: Regenerate.
1092 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1094 * acconfig.h: Remove.
1095 * configure.ac: Add a test for socklen_t. Use three-argument
1096 AC_DEFINE throughout.
1097 * config.in: Regenerated using autoheader 2.59.
1098 * configure: Regenerated.
1100 * gdbreplay.c (socklen_t): Provide a default.
1101 (remote_open): Use socklen_t.
1102 * remote-utils.c (socklen_t): Provide a default.
1103 (remote_open): Use socklen_t.
1104 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1107 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1109 * linux-low.c (linux_read_memory, linux_write_memory)
1110 (linux_read_auxv): Likewise.
1111 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1112 (check_mem_write): Likewise.
1113 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1115 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1116 (registers_from_string, register_data): Likewise.
1117 * server.c (handle_query, main): Likewise.
1118 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1119 (decode_M_packet): Likewise.
1120 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1121 * target.h (struct target_ops): Update read_memory, write_memory,
1123 (read_inferior_memory, write_inferior_memory): Update.
1124 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1126 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1127 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1128 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1129 linux-s390-low.c, linux-sh-low.c: Update for changes in
1130 read_inferior_memory and the_low_target->breakpoint.
1132 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1134 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1135 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1136 * configure.srv: Add powerpc64-*-linux*.
1137 * linux-ppc64-low.c: New file.
1139 2005-05-23 Orjan Friberg <orjanf@axis.com>
1141 * linux-cris-low.c: New file with support for CRIS.
1142 * linux-crisv32-low.c: Ditto for CRISv32.
1143 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1144 (clean): Add reg-cris.c and reg-crisv32.c.
1145 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1146 reg-crisv32.o, and reg-crisv32.c to make rules.
1147 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1150 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1152 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1153 of sizeof (PTRACE_XFER_TYPE).
1154 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1156 2005-05-12 Orjan Friberg <orjanf@axis.com>
1158 * target.h (struct target_ops): Add insert_watchpoint,
1159 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1160 pointers for hardware watchpoint support.
1161 * linux-low.h (struct linux_target_ops): Ditto.
1162 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1163 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1164 to linux_target_ops.
1165 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1167 * server.c (main): Recognize 'Z' and 'z' packets.
1169 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1171 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1172 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1173 (the_low_target): Add new members.
1175 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1177 * proc-service.c (ps_lgetregs): Search all_processes instead of
1180 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1182 * server.c (start_inferior): Change return type to int.
1183 (attach_inferior): Change sigptr to int *.
1184 (handle_v_cont, handle_v_requests): Change signal to int *.
1185 (main): Change signal to int.
1187 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1189 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1190 * configure.srv: Add m32r*-*-linux*.
1191 * linux-m32r-low.c: New file.
1193 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1195 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1197 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1199 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1200 Take unsigned long arguments for PIDs.
1201 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1202 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1203 (wait_for_sigstop, linux_resume_one_process)
1204 (regsets_fetch_inferior_registers, linux_send_signal)
1205 (linux_read_auxv): Likewise. Update the types of variables holding
1206 PIDs. Update format string specifiers.
1207 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1208 * remote-utils.c (prepare_resume_reply): Likewise.
1209 * server.c (cont_thread, general_thread, step_thread)
1210 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1212 (handle_query): Update format specifiers.
1213 (handle_v_cont, main): Use strtoul for thread IDs.
1214 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1215 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1216 (general_thread, step_thread, thread_from_wait)
1217 (old_thread_from_wait): Update.
1218 * target.h (struct thread_resume): Use unsigned long for THREAD.
1219 (struct target_ops): Use unsigned long for arguments to attach and
1222 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1224 * acinclude.m4: Include bfd/bfd.m4 directly.
1225 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1226 <agriffis@toolchain.org>.
1227 * aclocal.m4, configure: Regenerated.
1229 2005-01-07 Andrew Cagney <cagney@gnu.org>
1231 * configure.ac: Rename configure.in, require autoconf 2.59.
1232 * configure: Re-generate.
1234 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1236 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1238 * aclocal.m4: Regenerated.
1239 * configure: Regenerated.
1241 2004-11-21 Andreas Schwab <schwab@suse.de>
1243 * linux-m68k-low.c (m68k_num_gregs): Define.
1244 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1245 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1246 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1247 (m68k_breakpoint_at): New. Add to the_low_target.
1249 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1250 srv_linux_thread_db to yes.
1252 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1254 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1255 (ARCH_SET_FS): Likewise.
1256 (ARCH_GET_FS): Likewise.
1257 (ARCH_GET_GS): Likewise.
1259 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1261 * linux-i386-low.c (ps_get_thread_area): New.
1262 * linux-x86-64-low.c (ps_get_thread_area): New.
1263 * linux-low.c: Include <sys/syscall.h>.
1264 (linux_kill_one_process): Don't kill the first thread here.
1265 (linux_kill): Kill the first thread here.
1266 (kill_lwp): New function.
1267 (send_sigstop, linux_send_signal): Use it.
1268 * proc-service.c: Clean up #ifdefs.
1269 (fpregset_info): Delete.
1270 (ps_lgetregs): Update and enable implementation.
1271 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1273 * remote-utils.c (struct sym_cache, symbol_cache): New.
1274 (input_interrupt): Print a clearer message.
1275 (async_io_enabled): New variable.
1276 (enable_async_io, disable_async_io): Use it. Update comments.
1277 (look_up_one_symbol): Use the symbol cache.
1278 * thread-db.c (thread_db_look_up_symbols): New function.
1279 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1281 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1283 * configure.in: Test for -rdynamic.
1284 * configure: Regenerated.
1285 * Makefile (INTERNAL_LDFLAGS): New.
1286 (gdbserver, gdbreplay): Use it.
1288 2004-09-02 Andrew Cagney <cagney@gnu.org>
1290 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1292 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1294 * linux-low.c (linux_wait): Clear all_processes list also.
1296 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1298 * linux-low.c: Include <errno.h>. Remove extern declaration of
1301 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1303 * gdbreplay.c, server.h, utils.c: Update copyright years.
1305 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1307 * server.c (main): Print child status or termination signal from
1308 variable 'signal', not 'sig'.
1310 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1312 * linux-low.c (linux_read_memory): Change return type to
1313 int. Check for and return error from ptrace().
1314 * target.c (read_inferior_memory): Change return type to int. Pass
1315 back return status from the_target->read_memory().
1316 * target.h (struct target_ops): Adapt *read_memory() prototype.
1318 (read_inferior_memory): Adapt prototype.
1319 * server.c (main): Return an error packet if
1320 read_inferior_memory() returns an error.
1322 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1324 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1325 Unify with other clean targets.
1327 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1329 * server.c (handle_v_cont): Call set_desired_inferior.
1331 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1333 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1335 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1337 * linux-low.c (linux_wait): Unblock async I/O.
1338 (linux_resume): Block and enable async I/O.
1339 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1340 * server.h (block_async_io, unblock_async_io): Add prototypes.
1342 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1344 * remote-utils.c (remote_open): Print a status notice after
1346 * server.c (attach_inferior): Print a status notice after
1349 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1351 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1353 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1355 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1357 * server.c, target.h: Update copyright years.
1359 2004-02-25 Roland McGrath <roland@redhat.com>
1361 * target.h (struct target_ops): New member `read_auxv'.
1362 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1363 * linux-low.c (linux_read_auxv): New function.
1364 (linux_target_ops): Initialize `read_auxv' member to that.
1366 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1368 Committed by Jim Blandy <jimb@redhat.com>.
1370 * linux-s390-low.c (s390_num_regs): Update.
1371 (s390_regmap): Remove control registers. Use __s390x__ predefine
1372 instead of GPR_SIZE to distiguish s390 and s390x targets.
1374 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1376 * linux-low.c: Update copyright year.
1377 (check_removed_breakpoint): Clear pending_is_breakpoint.
1378 (linux_set_resume_request, linux_queue_one_thread)
1379 (resume_status_pending_p): New functions.
1380 (linux_continue_one_thread): Use process->resume.
1381 (linux_resume): Only resume threads if there are no pending events.
1382 * linux-low.h (struct process_info): Add resume request
1385 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1387 * regcache.c (new_register_cache): Clear the allocated register
1388 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1390 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1392 * linux-low.c (linux_resume): Take a struct thread_resume *
1394 (linux_wait): Update call.
1395 (resume_ptr): New static variable.
1396 (linux_continue_one_thread): Renamed from
1397 linux_continue_one_process. Use resume_ptr.
1398 (linux_resume): Use linux_continue_one_thread.
1399 * server.c (handle_v_cont, handle_v_requests): New functions.
1400 (myresume): New function.
1401 (main): Handle 'v' case.
1402 * target.h (struct thread_resume): New type.
1403 (struct target_ops): Change argument of "resume" to struct
1405 (myresume): Delete macro.
1407 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1409 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1410 (uninstall): Support DESTDIR.
1412 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1414 * configure.srv: Add xscale*linux copy of arm*linux entry.
1416 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1418 * linux-arm-low.c (arm_reinsert_addr): New function.
1419 (the_low_target): Add arm_reinsert_addr.
1421 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1423 * mem-break.c: Remove whitespace at end of file.
1425 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1427 * configure.in: Check whether we need to prototype strerror.
1428 * server.h: Optionally prototype strerror.
1429 * gdbreplay.c (perror_with_name): Use strerror.
1430 * linux-low.c (linux_attach_lwp): Use strerror.
1431 * utils.c (perror_with_name): Use strerror.
1432 * config.in, configure: Regenerated.
1434 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1436 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1437 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1439 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1441 * Makefile.in (SFILES): Update.
1442 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1443 low-sun3.c: Remove files.
1445 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1447 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1448 (linux_detach_one_process, linux_detach): New functions.
1449 (linux_target_ops): Add linux_detach.
1450 * server.c (main): Handle 'D' packet.
1451 * target.h (struct target_ops): Add "detach" member.
1452 (detach_inferior): Define.
1454 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1456 From Kelley Cook <kelleycook@wideopenwest.com>:
1457 * configure.srv: Accept i[34567]86 variants.
1459 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1461 * linux-low.c (linux_wait_for_event): Correct comment typos.
1462 (linux_resume_one_process): Call check_removed_breakpoint.
1463 (linux_send_signal): New function.
1464 (linux_target_ops): Add linux_send_signal.
1465 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1467 * target.h (struct target_ops): Add send_signal.
1469 2003-05-29 Jim Blandy <jimb@redhat.com>
1471 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1472 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1473 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1474 away part of the register's value.
1476 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1478 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1479 (linux_wait_for_event, linux_init_signals): Likewise.
1481 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1483 * configure.in: Check for stdlib.h.
1484 * configure: Regenerated.
1485 * config.in: Regenerated.
1487 2003-01-04 Andreas Schwab <schwab@suse.de>
1489 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1491 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1493 * Makefile.in: Remove obsolete code.
1495 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1497 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1498 defined(PT_FPR0_HI).
1500 2002-11-17 Stuart Hughes <seh@zee2.com>
1502 * linux-arm-low.c (arm_num_regs): Increase.
1503 (arm_regmap): Include status register.
1505 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1507 * linux-low.c (register_addr): Remove incorrect -1 check.
1509 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1511 * linux-low.c (linux_create_inferior): Call setpgid. Return
1513 (unstopped_p, linux_signal_pid): Remove.
1514 (linux_target_ops): Remove linux_signal_pid.
1515 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1516 global instead of target method.
1517 * target.h (struct target_ops): Remove signal_pid. Update comment
1518 for create_inferior.
1519 * server.c (signal_pid): New variable.
1520 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1521 gdbserver. Set the child to be the foreground process group.
1522 (attach_inferior): Set signal_pid.
1524 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1526 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1528 2002-08-20 Jim Blandy <jimb@redhat.com>
1530 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1533 2002-08-01 Andrew Cagney <cagney@redhat.com>
1535 * Makefile.in: Make chill references obsolete.
1537 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1539 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1540 * configure: Regenerate.
1541 * config.in: Regenerate.
1543 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1545 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1546 (perror_with_name, remote_close, remote_open, expect, play): Static.
1548 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1550 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1551 byte offsets instead of an array of indexes.
1552 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1554 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1556 * regcache.c: Add comment.
1558 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1560 * thread-db.c: New file.
1561 * proc-service.c: New file.
1562 * acinclude.m4: New file.
1563 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1564 proc-service.o, and thread-db.o.
1565 (linux-low.o): Add USE_THREAD_DB.
1566 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1567 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1568 * aclocal.m4: Regenerated.
1569 * config.in: Regenerated.
1570 * configure: Regenerated.
1571 * configure.in: Check for proc_service.h, sys/procfs.h,
1572 thread_db.h, and linux/elf.h headrs.
1573 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1574 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1575 Check for -lthread_db and thread support.
1576 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1577 PowerPC, and SuperH.
1578 * i387-fp.c: Constify arguments.
1579 * i387-fp.h: Likewise.
1580 * inferiors.c: (struct thread_info): Renamed from
1581 `struct inferior_info'. Remove PID member. Use generic inferior
1582 list header. All uses updated.
1583 (inferiors, signal_pid): Removed.
1584 (all_threads): New variable.
1585 (get_thread): Define.
1586 (add_inferior_to_list): New function.
1587 (for_each_inferior): New function.
1588 (change_inferior_id): New function.
1589 (add_inferior): Removed.
1590 (remove_inferior): New function.
1591 (add_thread): New function.
1592 (free_one_thread): New function.
1593 (remove_thread): New function.
1594 (clear_inferiors): Use for_each_inferior and free_one_thread.
1595 (find_inferior): New function.
1596 (find_inferior_id): New function.
1597 (inferior_target_data): Update argument type.
1598 (set_inferior_target_data): Likewise.
1599 (inferior_regcache_data): Likewise.
1600 (set_inferior_regcache_data): Likewise.
1601 * linux-low.c (linux_bp_reinsert): Remove.
1602 (all_processes, stopping_threads, using_thrads)
1603 (struct pending_signals, debug_threads, pid_of): New.
1604 (inferior_pid): Replace with macro.
1605 (struct inferior_linux_data): Remove.
1606 (get_stop_pc, add_process): New functions.
1607 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1608 Use add_process and add_thread.
1609 (linux_attach_lwp): New function, based on old linux_attach. Use
1610 add_process and add_thread. Set stop_expected for new threads.
1611 (linux_attach): New function.
1612 (linux_kill_one_process): New function.
1613 (linux_kill): Kill all LWPs.
1614 (linux_thread_alive): Use find_inferior_id.
1615 (check_removed_breakpoints, status_pending_p): New functions.
1616 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1617 Update. Use WNOHANG. Wait for cloned processes also. Update process
1618 struct for the found process.
1619 (linux_wait_for_event): New function.
1620 (linux_wait): Use it. Support LWPs.
1621 (send_sigstop, wait_for_sigstop, stop_all_processes)
1622 (linux_resume_one_process, linux_continue_one_process): New functions.
1623 (linux_resume): Support LWPs.
1624 (REGISTER_RAW_SIZE): Remove.
1625 (fetch_register): Use register_size instead. Call supply_register.
1626 (usr_store_inferior_registers): Likewise. Call collect_register.
1628 (regsets_fetch_inferior_registers): Improve error message.
1629 (regsets_store_inferior_registers): Add debugging.
1630 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1631 (unstopped_p, linux_signal_pid): New functions.
1632 (linux_target_ops): Add linux_signal_pid.
1633 (linux_init_signals): New function.
1634 (initialize_low): Call it. Initialize using_threads.
1635 * regcache.c (inferior_regcache_data): Add valid
1637 (get_regcache): Fetch registers lazily. Add fetch argument
1638 and update all callers.
1639 (regcache_invalidate_one, regcache_invalidate): New
1641 (new_register_cache): Renamed from create_register_cache.
1642 Return the new regcache.
1643 (free_register_cache): Change argument to a void *.
1644 (registers_to_string, registers_from_string): Call get_regcache
1645 with fetch flag set.
1646 (register_data): Make static. Pass fetch flag to get_regcache.
1647 (supply_register): Call get_regcache with fetch flag clear.
1648 (collect_register): Call get_regcache with fetch flag set.
1649 (collect_register_as_string): New function.
1650 * regcache.h: Update.
1651 * remote-utils.c (putpkt): Flush after debug output and use
1653 Handle input interrupts while waiting for an ACK.
1654 (input_interrupt): Use signal_pid method.
1655 (getpkt): Flush after debug output and use stderr.
1656 (outreg): Use collect_register_as_string.
1657 (new_thread_notify, dead_thread_notify): New functions.
1658 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1660 (look_up_one_symbol): Flush after debug output.
1661 * server.c (step_thread, server_waiting): New variables.
1662 (start_inferior): Don't use signal_pid. Update call to mywait.
1663 (attach_inferior): Update call to mywait.
1664 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1665 (main): Don't fetch/store registers explicitly. Use
1666 set_desired_inferior. Support proposed ``Hs'' packet. Update
1669 (struct inferior_list, struct_inferior_list_entry): New.
1670 * target.c (set_desired_inferior): New.
1671 (write_inferior_memory): Constify.
1672 (mywait): New function.
1674 (struct target_ops): New signal_pid method.
1675 (mywait): Removed macro, added prototype.
1677 * linux-low.h (regset_func): Removed.
1678 (regset_fill_func, regset_store_func): New.
1679 (enum regset_type): New.
1680 (struct regset_info): Add type field. Use new operation types.
1681 (struct linux_target_ops): stop_pc renamed to get_pc.
1682 Add decr_pc_after_break and breakpoint_at.
1683 (get_process, get_thread_proess, get_process_thread)
1684 (strut process_info, all_processes, linux_attach_lwp)
1685 (thread_db_init): New.
1687 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1688 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1689 (the_low_target): Add new members.
1690 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1691 (i386_store_fpxregset): Constify.
1692 (target_regsets): Add new kind identifier.
1693 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1694 (i386_set_pc): Add debugging.
1695 (i386_breakpoint_at): New function.
1696 (the_low_target): Add new members.
1697 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1698 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1699 (mips_breakpoint_at): New.
1700 (the_low_target): Add new members.
1701 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1702 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1703 (the_low_target): Add new members.
1704 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1705 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1706 (the_low_target): Add new members.
1707 * linux-x86-64-low.c (target_regsets): Add new kind
1710 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1712 From Martin Pool <mbp@samba.org>:
1713 * server.c (gdbserver_usage): New function.
1716 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1718 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1721 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1723 * Makefile.in: Remove obsolete code.
1725 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1727 * linux-low.c (regsets_fetch_inferior_registers),
1728 (regsets_store_inferior_registers): Removed cast to int from
1730 * regcache.h: Added declaration of struct inferior_info.
1732 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1734 * inferiors.c (struct inferior_info): Add regcache_data.
1735 (add_inferior): Call create_register_cache.
1736 (clear_inferiors): Call free_register_cache.
1737 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1738 * regcache.c (struct inferior_regcache_data): New.
1739 (registers): Remove.
1740 (get_regcache): New function.
1741 (create_register_cache, free_register_cache): New functions.
1742 (set_register_cache): Don't initialize the register cache here.
1743 (registers_to_string, registers_from_string, register_data): Call
1745 * regcache.h: Add prototypes.
1746 * server.h: Likewise.
1748 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1750 * mem-break.c: New file.
1751 * mem-break.h: New file.
1752 * Makefile.in: Add mem-break.o rule; update server.h
1754 * inferiors.c (struct inferior_info): Add target_data
1756 (clear_inferiors): Free target_data member if set.
1757 (inferior_target_data, set_inferior_target_data): New functions.
1758 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1759 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1760 * linux-low.c (linux_bp_reinsert): New variable.
1761 (struct inferior_linux_data): New.
1762 (linux_create_inferior): Use set_inferior_target_data.
1763 (linux_attach): Likewise. Call add_inferior.
1764 (linux_wait_for_one_inferior): New function.
1765 (linux_wait): Call it.
1766 (linux_write_memory): Add const.
1767 (initialize_low): Call set_breakpoint_data.
1768 * linux-low.h (struct linux_target_ops): Add breakpoint
1770 * server.c (attach_inferior): Remove extra add_inferior
1772 * server.h: Include mem-break.h. Update inferior.c
1774 * target.c (read_inferior_memory)
1775 (write_inferior_memory): New functions.
1776 * target.h (read_inferior_memory)
1777 (write_inferior_memory): Change macros to prototypes.
1778 (struct target_ops): Update comments. Add const to write_memory
1781 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1783 * linux-low.c (usr_store_inferior_registers): Support
1784 registers which are allowed to fail to store.
1785 * linux-low.h (linux_target_ops): Likewise.
1786 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1787 (ppc_cannot_store_register): FPSCR may not be storable.
1789 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1791 * server.h: Include <string.h> if HAVE_STRING_H.
1792 * ChangeLog: Correct paths in last ChangeLog entry.
1794 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1796 * linux-low.h: Remove obsolete prototypes.
1797 (struct linux_target_ops): New.
1798 (extern the_low_target): New.
1799 * linux-low.c (num_regs, regmap): Remove declarations.
1800 (register_addr): Use the_low_target explicitly.
1801 (fetch_register): Likewise.
1802 (usr_fetch_inferior_registers): Likewise.
1803 (usr_store_inferior_registers): Likewise.
1804 * linux-arm-low.c (num_regs): Remove.
1805 (arm_num_regs): Define.
1806 (arm_regmap): Renamed from regmap, made static.
1807 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1809 (arm_cannot_store_register): Renamed from cannot_store_register,
1811 (the_low_target): New.
1812 * linux-i386-low.c (num_regs): Remove.
1813 (i386_num_regs): Define.
1814 (i386_regmap): Renamed from regmap, made static.
1815 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1817 (i386_cannot_store_register): Renamed from cannot_store_register,
1819 (the_low_target): New.
1820 * linux-ia64-low.c (num_regs): Remove.
1821 (ia64_num_regs): Define.
1822 (ia64_regmap): Renamed from regmap, made static.
1823 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1825 (ia64_cannot_store_register): Renamed from cannot_store_register,
1827 (the_low_target): New.
1828 * linux-m68k-low.c (num_regs): Remove.
1829 (m68k_num_regs): Define.
1830 (m68k_regmap): Renamed from regmap, made static.
1831 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1833 (m68k_cannot_store_register): Renamed from cannot_store_register,
1835 (the_low_target): New.
1836 * linux-mips-low.c (num_regs): Remove.
1837 (mips_num_regs): Define.
1838 (mips_regmap): Renamed from regmap, made static.
1839 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1841 (mips_cannot_store_register): Renamed from cannot_store_register,
1843 (the_low_target): New.
1844 * linux-ppc-low.c (num_regs): Remove.
1845 (ppc_num_regs): Define.
1846 (ppc_regmap): Renamed from regmap, made static.
1847 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1849 (ppc_cannot_store_register): Renamed from cannot_store_register,
1851 (the_low_target): New.
1852 * linux-s390-low.c (num_regs): Remove.
1853 (s390_num_regs): Define.
1854 (s390_regmap): Renamed from regmap, made static.
1855 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1857 (s390_cannot_store_register): Renamed from cannot_store_register,
1859 (the_low_target): New.
1860 * linux-sh-low.c (num_regs): Remove.
1861 (sh_num_regs): Define.
1862 (sh_regmap): Renamed from regmap, made static.
1863 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1865 (sh_cannot_store_register): Renamed from cannot_store_register,
1867 (the_low_target): New.
1868 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1869 (the_low_target): New.
1871 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1873 * Makefile.in: Add stamp-h target.
1874 * configure.in: Create stamp-h.
1875 * configure: Regenerated.
1877 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1879 * inferiors.c: New file.
1880 * target.c: New file.
1881 * target.h: New file.
1882 * Makefile.in: Add target.o and inferiors.o. Update
1884 * linux-low.c (inferior_pid): New static variable,
1885 moved from server.c.
1886 (linux_create_inferior): Renamed from create_inferior.
1887 Call add_inferior. Return 0 on success instead of a PID.
1888 (linux_attach): Renamed from myattach.
1889 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1890 (linux_thread_alive): Renamed from mythread_alive.
1891 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1893 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1894 (regsets_store_inferior_registers): Correct error message.
1895 Add missing ``return 0''.
1896 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1897 (linux_store_registers): Renamed from store_inferior_registers.
1898 (linux_read_memory): Renamed from read_inferior_memory.
1899 (linux_write_memory): Renamed from write_inferior_memory.
1900 (linux_target_ops): New structure.
1901 (initialize_low): Call set_target_ops ().
1902 * remote-utils.c (unhexify): New function.
1903 (hexify): New function.
1904 (input_interrupt): Send signals to ``signal_pid''.
1905 * server.c (inferior_pid): Remove.
1906 (start_inferior): Update create_inferior call.
1907 (attach_inferior): Call add_inferior.
1908 (handle_query): New function.
1909 (main): Call handle_query for `q' packets.
1910 * server.h: Include "target.h". Remove obsolete prototypes.
1911 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1913 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1915 * Makefile.in: Add WARN_CFLAGS. Update configury
1917 * configure.in: Check for <string.h>
1918 * configure: Regenerate.
1919 * config.in: Regenerate.
1920 * gdbreplay.c: Include needed system headers.
1921 (remote_open): Remove strchr prototype.
1922 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1923 * regcache.c (supply_register): Change buf argument to const void *.
1924 (supply_register_by_name): Likewise.
1925 (collect_register): Change buf argument to void *.
1926 (collect_register_by_name): Likewise.
1927 * regcache.h: Add missing prototypes.
1928 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1929 * server.c (handle_query): New function.
1930 (attached): New static variable, moved out of main.
1931 (main): Quiet longjmp clobber warnings.
1932 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1933 * utils.c (error): Remove NORETURN.