1 2007-12-20 Andreas Schwab <schwab@suse.de>
3 * linux-low.c (STACK_SIZE): Define.
4 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5 (linux_test_for_tracefork): Likewise.
7 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9 * linux-low.c (linux_wait_for_event): Update messages. Do not
10 reinsert auto-delete breakpoints.
11 * mem-break.c (struct breakpoint): Change return type of handler to
13 (set_breakpoint_at): Update handler type.
14 (reinsert_breakpoint_handler): Return 1 instead of calling
16 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
18 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19 * mem-break.h (set_breakpoint_at): Update handler type.
20 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
21 * win32-low.c (auto_delete_breakpoint): New.
22 (get_child_debug_event): Use it.
24 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
26 * configure.ac: Check for pread and pwrite.
27 * hostio.c (handle_pread): Fall back to lseek and read.
28 (handle_pwrite): Fall back to lseek and write.
29 * config.in, configure: Regenerated.
31 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
33 * server.c (myresume): Add own_buf argument.
36 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
38 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
39 * remote-utils.c (remote_open): Do not call disable_async_io.
40 (block_async_io): Delete.
41 (unblock_async_io): Make static.
42 (initialize_async_io): New.
43 * server.c (handle_v_cont): Handle async I/O here.
44 (myresume): Likewise. Move other common resume tasks here...
45 (main): ... from here. Call initialize_async_io. Disable async
46 I/O before the main loop.
47 * server.h (initialize_async_io): Declare.
48 (block_async_io, unblock_async_io): Delete prototypes.
49 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
51 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
53 * remote-utils.c (readchar): Allow binary data in received messages.
55 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
57 * win32-low.c (attaching): New global.
58 (win32_create_inferior): Clear the `attaching' global.
59 (win32_attach): Set the `attaching' global.
60 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
61 attaching. Only set a breakpoint at the entry point if not
64 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
66 * server.c (main): Don't report dll events on the initial
67 connection on attaches.
69 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
71 * server.c (main): Relax numerical bases supported for the pid of
72 the --attach command line argument.
74 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
76 * win32-low.c (win32_attach): Call OpenProcess before
77 DebugActiveProcess, not after. Add last error output to error
80 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
82 * win32-low.c (win32_get_thread_context)
83 (win32_set_thread_context): New functions.
84 (thread_rec): Use win32_get_thread_context.
85 (continue_one_thread, win32_resume): Use win32_set_thread_context.
86 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
90 Pedro Alves <pedro_alves@portugalmail.pt>
92 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
94 (child_add_thread): Minor cleanup.
95 (child_continue): Resume artificially suspended threads before
96 calling ContinueDebugEvent.
97 (suspend_one_thread): New.
98 (fake_breakpoint_event): New.
99 (get_child_debug_event): Change return type to int. Check here if
100 gdb sent an interrupt request. If a soft interrupt was requested,
101 fake a breakpoint event. Return 0 if there is no event to handle,
103 (win32_wait): Don't check here if gdb sent an interrupt request.
104 Ensure there is a valid event to handle.
105 (win32_request_interrupt): Add soft interruption method as last
109 Pedro Alves <pedro_alves@portugalmail.pt>
111 * win32-low.h (win32_thread_info): Add descriptions to the
112 structure members. Replace `suspend_count' counter by a
114 * win32-low.c (thread_rec): Update condition of when to get the
115 context from the inferior. Rely on ContextFlags being set if it
116 has already been retrieved. Only suspend the inferior thread if
117 we haven't already. Warn if that fails.
118 (continue_one_thread): s/suspend_count/suspended/. Only call
119 ResumeThread once. Warn if that fails.
121 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
123 * win32-low.c (win32_wait): Don't read from the inferior when it
126 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
128 * Makefile.in (win32_low_h): New variable.
129 (win32-low.o): Add dependency on $(win32_low_h).
130 (win32-arm-low.o, win32-i386-low.o): New rules.
132 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
134 * hostio.c: Correct copyright year.
136 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
138 * Makefile.in (OBS): Add hostio.o.
139 (hostio.o): New rule.
140 * server.h (handle_vFile): Declare.
141 * hostio.c: New file.
142 * server.c (handle_v_requests): Take packet_len and new_packet_len
143 for binary packets. Call handle_vFile.
144 (main): Update call to handle_v_requests.
146 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
148 * linux-low.c: Include <sched.h>.
150 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
152 * linux-low.c (linux_tracefork_grandchild): New.
153 (linux_tracefork_child): Use clone.
154 (linux_test_for_tracefork): Use clone; allocate and free a stack.
156 2007-10-31 Joel Brobecker <brobecker@adacore.com>
158 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
160 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
162 * linux-low.c (handle_extended_wait): Handle unexpected signals.
164 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
166 * inferiors.c (change_inferior_id): Delete.
167 (add_pid_to_list, pull_pid_from_list): New.
168 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
169 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
170 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
171 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
172 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
173 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
174 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
175 (using_threads): Always set to 1.
176 (handle_extended_wait): New.
177 (add_process): Do not set TID.
178 (linux_create_inferior): Set must_set_ptrace_flags.
179 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
180 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
181 (linux_thread_alive): Rename TID argument to LWPID.
182 (linux_wait_for_process): Handle unknown processes. Do not use TID.
183 (linux_wait_for_event): Do not use TID or check using_threads. Update
184 call to dead_thread_notify. Call handle_extended_wait.
185 (linux_create_inferior): Use PTRACE_SETOPTIONS.
186 (send_sigstop): Delete sigstop_sent.
187 (wait_for_sigstop): Avoid TID.
188 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
189 (linux_test_for_tracefork): New.
190 (linux_lookup_signals): Use thread_db_active and
191 linux_supports_tracefork_flag.
192 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
193 * linux-low.h (get_process_thread): Avoid TID.
194 (struct process_ifo): Move thread_known and tid to the end. Remove
196 (linux_attach_lwp, thread_db_init): Update prototypes.
197 * server.h (change_inferior_id): Delete prototype.
198 (add_pid_to_list, pull_pid_from_list): New prototypes.
199 * thread-db.c (thread_db_use_events): New.
200 (find_first_thread): Rename to...
201 (find_one_thread): ...this. Update callers and messages. Do not
202 call fatal. Check thread_db_use_events. Do not call
203 change_inferior_id or new_thread_notify.
204 (maybe_attach_thread): Update. Do not call new_thread_notify.
205 (thread_db_init): Set thread_db_use_events. Check use_events.
206 * utils.c (fatal, warning): Correct message prefix.
208 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
210 * Makefile.in (clean): Remove new files.
211 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
212 (powerpc-64.o, powerpc-64.c): New rules.
213 * configure.srv: Use alternate register sets for powerpc64-*-linux*
214 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
216 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
218 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
219 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
220 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
221 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
222 (target_regsets): Add AltiVec and SPE register sets.
223 * configure.ac: Check for AltiVec and SPE.
224 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
225 (ppc_fill_vrregset, ppc_store_vrregset): New.
226 (target_regsets): Add AltiVec register set.
227 * configure: Regenerated.
229 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
231 * linux-low.c (O_LARGEFILE): Define.
232 (linux_read_memory): Use /proc/PID/mem.
233 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
234 * configure, config.in: Regenerated.
236 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
238 * linux-low.c (linux_wait_for_event): Do not pass signals while
241 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
243 * win32-low.c (create_process): New.
244 (win32_create_inferior): Use create_process instead of
245 CreateProcess. If create_process failed retry appending an ".exe"
246 suffix. Store the GetLastError result immediatelly after
247 create_process calls and use it on the call to error.
249 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
251 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
253 2007-08-23 Joel Brobecker <brobecker@adacore.com>
255 * configure.ac: Switch license to GPLv3.
257 2007-08-01 Michael Snyder <msnyder@access-company.com>
259 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
261 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
263 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
265 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
266 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
267 CloseToolhelp32Snapshot.
268 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
269 CloseToolhelp32Snapshot.
271 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
273 * server.c (main): Check for inferior exit before main loop.
275 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
277 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
278 instead of on tmp_desc.
280 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
281 Daniel Jacobowitz <dan@codesourcery.com>
283 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
284 (add_thread): Minor cleanups.
285 (clear_inferiors): Move lower in the file. Clear the DLL
287 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
288 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
289 (xml_escape_text): New.
290 * server.c (handle_query): Handle qXfer:libraries:read. Report it
292 (handle_v_cont): Report errors.
293 (gdbserver_version): Update.
294 (main): Correct size of own_buf. Do not report initial DLL events.
295 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
296 (unloaded_dll, xml_escape_text): New.
297 * win32-low.c (enum target_waitkind): Update comments.
298 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
299 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
300 (win32_EnumProcessModules, win32_GetModuleInformation)
301 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
302 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
303 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
304 (win32_Module32First, win32_Module32Next, load_toolhelp)
305 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
306 (get_child_debug_event): Handle DLL events.
307 (win32_wait): Likewise.
309 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
311 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
312 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
314 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
316 * win32-low.c (handle_output_debug_string): Ignore event if not
319 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
321 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
323 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
325 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
327 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
329 * inferiors.c (change_inferior_id): Add comment.
330 * linux-low.c (check_removed_breakpoint): Add an early
331 prototype. Improve debug output.
332 (linux_attach): Doc update.
333 (linux_detach_one_process, linux_detach): Clean up before releasing
335 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
336 * linux-low.h (struct process_info): Doc improvement.
337 * mem-break.c (delete_all_breakpoints): New.
338 * mem-break.h (delete_all_breakpoints): New prototype.
339 * thread-db.c (find_first_thread): New.
340 (thread_db_create_event): Call it instead of
341 thread_db_find_new_threads. Clean up unused variables.
342 (maybe_attach_thread): Remove first thread handling.
343 (thread_db_find_new_threads): Use find_first_thread.
344 (thread_db_get_tls_address): Likewise.
346 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
348 * thread-db.c (thread_db_find_new_threads): Add prototype.
349 (thread_db_create_event): Check for the main thread before adding
351 (maybe_attach_thread): Only enable event reporting if TID == 0.
352 (thread_db_get_tls_address): Check for new threads.
354 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
356 * linux-low.c (linux_create_inferior): Try execv before execvp.
357 * spu-low.c (spu_create_inferior): Likewise.
359 2007-06-13 Mike Frysinger <vapier@gentoo.org>
361 * linux-low.c (linux_create_inferior): Change execv to execvp.
362 * spu-low.c (spu_create_inferior): Likewies.
364 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
366 * Makefile.in (clean): Clean new files instead of deleted ones.
367 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
368 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
370 * configure.srv: Specify XML files and new regformats for MIPS and
372 * linux-mips-low.c (mips_num_regs): Set to only used registers.
373 (mips_regmap): Do not fetch $0. Remove unused registers. Add
374 an entry for the restart register.
375 (mips_cannot_fetch_register, mips_cannot_store_register)
376 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
377 register names to match the XML descriptions.
378 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
379 restart register instead of $0.
381 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
382 Markus Deuling <deuling@de.ibm.com>
384 * remote-utils.c (decode_xfer_write): New function.
385 * server.h (decode_xfer_write): Add prototype.
386 * server.c (handle_query): Add PACKET_LEN argument. Support
387 qXfer:spu:read and qXfer:spu:write packets.
388 (main): Pass packet_len to handle_query.
389 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
390 * target.h (target_ops): Add qxfer_spu.
392 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
394 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
395 accessing non-seekable spufs files.
397 2007-05-16 Markus Deuling <deuling@de.ibm.com>
399 * server.c (handle_query): Add reply for qC packet.
401 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
402 Leo Zayas <lerele@champenstudios@com>
404 * server.h (check_remote_input_interrupt_request): New function.
405 * remote_utils.c (INVALID_DESCRIPTOR): New define.
406 (remote_desc): Initialize with INVALID_DESCRIPTOR.
407 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
408 (check_remote_input_interrupt_request): New function.
409 * server.h (check_remote_input_interrupt_request): Declare.
410 * win32-low.c (winapi_DebugBreakProcess,
411 winapi_GenerateConsoleCtrlEvent): New typedefs.
412 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
414 (win32_wait): Check for remote interrupt request
415 with check_remote_input_interrupt_request.
416 (win32_request_interrupt): New function.
417 (win32_target_op): Set request_interrupt to win32_request_interrupt.
419 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
421 * win32-low.c (debug_registers_changed,
422 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
423 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
424 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
425 (thread_rec): Get context using the low target.
426 (child_add_thread): Call thread_added on the low target,
427 which does the same thing.
429 (do_initial_child_stuff): Remove debug registers references.
430 Set context using the low target. Resume threads after
431 setting the contexts.
432 (child_continue): Remove dead variable. Remove debug
433 registers references.
434 (child_fetch_inferior_registers): Go through the low target.
435 (do_child_store_inferior_registers): Remove.
436 (child_store_inferior_registers): Go through the low target.
437 (win32_resume): Remove debug registers references.
438 Set context using the low target.
439 (handle_exception): Change return type to void. Don't record
440 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
441 first chance exception.
442 (get_child_debug_event): Change return type to void. Remove
443 goto loop. Always return after waiting for debug event.
444 (win32_wait): Convert to switch statement. Handle spurious
447 * win32-i386-low.c (debug_registers_changed,
448 debug_registers_used): New.
449 (initial_stuff): Rename to ...
450 (i386_initial_stuff): ... this. Clear debug registers
452 (store_debug_registers): Delete.
453 (i386_get_thread_context): New.
454 (load_debug_registers): Delete.
455 (i386_set_thread_context): New.
456 (i386_thread_added): New.
457 (single_step): Rename to ...
458 (i386_single_step): ... this.
459 (do_fetch_inferior_registers): Rename to ...
460 (i386_fetch_inferior_register): ... this.
461 (i386_store_inferior_register): New.
462 (the_low_target): Adapt to new interface.
464 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
465 (arm_get_thread_context): New.
466 (arm_set_thread_context): New.
468 (do_fetch_inferior_registers): Rename to ...
469 (arm_fetch_inferior_register): ... this.
470 (arm_store_inferior_register): New.
471 (arm_wince_breakpoint): Reimplement as unsigned long.
472 (arm_wince_breakpoint_len): Define.
473 (the_low_target): Adapt to new interface.
475 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
476 load_debug_registers. Add get_thread_context, set_thread_context,
477 thread_added and store_inferior_register. Rename
478 fetch_inferior_registers to fetch_inferior_register.
479 (regptr): Remove declaration.
481 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
483 * linux-low.c (linux_detach): Change return type to int. Return 0.
484 * spu-low.c (spu_detach): Likewise.
486 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
488 * target.h (target_ops): Change return type of detach to int.
490 (join_inferior): New.
491 * server.c (main): Don't skip detach support on mingw32.
492 If the inferior doesn't support detaching return error.
493 Call join_inferior instead of using waitpid.
494 * linux-low.c (linux_join): New.
495 (linux_target_op): Add linux_join.
496 * spu-low.c (spu_join): New.
497 (spu_target_ops): Add spu_join.
498 * win32-low.c (win32_detach): Adapt to new interface.
499 Reopen current_process_handle before detaching. Issue a child
500 resume before detaching.
502 (win32_target_op): Add win32_join.
504 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
506 * win32-low.c (win32-attach): Fix return value.
507 * target.h (target_ops): Describe ATTACH return values.
509 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
511 * win32-low.c (GETPROCADDRESS): Define.
512 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
513 (winapi_DebugSetProcessKillOnExit): Likewise.
514 (win32_create_inferior): Force usage of ansi CreateProcessA.
515 (win32_attach): Use GETPROCADDRESS.
516 (win32_detach): Likewise.
518 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
520 * win32-low.c (win32_wait): Don't use WSTOPSIG.
522 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
524 * win32-low.c: Commit leftover changes from 2007-03-29.
526 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
528 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
529 fields short instead of int. Add explicit padding.
530 (i387_cache_to_fsave): Remove unnecessary casts.
531 (i387_fsave_to_cache): Doc fix.
532 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
534 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
536 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
537 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
539 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
541 * configure.srv (arm*-*-mingw32ce*): Move near the other
544 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
546 * configure.ac: Add errno checking.
547 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
548 sys/file.h and malloc.h.
549 (AC_CHECK_DECLS): Add perror.
550 (srv_mingwce): Handle.
551 * configure.srv (i[34567]86-*-cygwin*): Add
552 win32-i386-low.o to srv_tgtobj.
553 (i[34567]86-*-mingw*): Likewise.
554 (arm*-*-mingw32ce*): Add case.
555 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
556 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
557 [__MINGW32CE__] (strerror): New function.
558 [__MINGW32CE__] (errno): Define to GetLastError.
559 [__MINGW32CE__] (COUNTOF): New macro.
560 (remote_open): Remove extra close call.
561 * mem-break.c (delete_breakpoint_at): New function.
562 * mem-break.h (delete_breakpoint_at): Declare.
563 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
564 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
565 [USE_WIN32API] (read, write): Add char* casts.
566 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
567 * server.h: Include wincecompat.h on Windows CE.
568 [HAVE_ERRNO_H]: Check.
569 (perror): Declare if not declared.
570 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
571 (perror_with_name): Remove errno declaration.
572 * wincecompat.h: New.
573 * wincecompat.c: New.
575 * win32-arm-low.c: New.
576 * win32-i386-low.c: New.
577 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
578 (OUTMSG2): Make it safe.
580 (COUNTOF): New macro.
581 (NUM_REGS): Get it from the low target.
582 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
583 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
584 (thread_rec): Let low target handle debug registers.
585 (child_add_thread): Likewise.
586 (child_init_thread_list): Likewise.
587 (continue_one_thread): Likewise.
589 (do_child_fetch_inferior_registers): Move to ...
590 * win32-i386-low.c: ... here, and rename to ...
591 (do_fetch_inferior_registers): ... this.
592 * win32-low.c (child_fetch_inferior_registers):
593 Go through the low target.
594 (do_child_store_inferior_registers): Use regptr.
595 (strwinerror): New function.
596 (win32_create_inferior): Handle Windows CE.
597 Use strwinerror instead of strerror on Windows error
598 codes. Add program to the error output.
599 Don't close the main thread handle on Windows CE.
600 (win32_attach): Use coredll.dll on Windows CE.
601 (win32_kill): Close current process and current
603 (win32_detach): Use coredll.dll on Windows CE.
604 (win32_resume): Let low target handle debug registers, and
606 (handle_exception): Add/Remove initial breakpoint. Avoid
607 non-existant WSTOPSIG on Windows CE.
608 (win32_read_inferior_memory): Cast to remove warning.
609 (win32_arch_string): Go through the low target.
610 (initialize_low): Call set_breakpoint_data with the low
612 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
613 FOP_REGNUM, mappings): Move to ...
614 * win32-i386-low.c: ... here.
615 * win32-low.c (win32_thread_info): Move to ...
616 * win32-low.h: ... here.
617 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
618 win32-arm-low.c and wincecompat.c.
620 (install-only:): Likewise.
621 (gdbserver:): Likewise.
622 (gdbreplay:): Likewise.
623 * config.in: Regenerate.
624 * configure: Regenerate.
626 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
628 * win32-low.c: Rename typedef thread_info to
629 win32_thread_info throughout.
631 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
633 * win32-i386-low.c: Rename to ...
634 * win32-low.c: ... this.
635 * configure.srv: Replace win32-i386-low.o with win32-low.o.
636 * Makefile.in: Likewise.
638 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
640 * remote-utils.c (monitor_output): Constify msg parameter.
641 * server.h (monitor_output): Likewise.
642 * win32-i386-low.c (handle_output_debug_string): New.
643 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
644 handle_output_debug_string.
645 (get_child_debug_event): Likewise.
647 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
649 * server.c (main): Correct strtoul check.
651 2007-03-27 Jon Ringle <jon@ringle.org>
653 * linux-low.c: Check __ARCH_HAS_MMU__ also.
655 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
657 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
659 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
661 * terminal.h: Check HAVE_SGTTY_H.
663 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
665 * remote-utils.c (remote_open): Print out the assigned port number.
667 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
669 * remote-utils.c (monitor_output): New function.
670 * server.c (debug_threads): Define here.
671 (monitor_show_help): New function.
672 (handle_query): Handle qRcmd.
673 (main): Do not handle 'd' packet.
674 * server.h (debug_threads, remote_debug, monitor_output): Declare.
675 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
678 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
680 * Makefile.in (EXEEXT): New.
681 (clean): Use $(EXEEXT).
683 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
685 * target.h (target_ops): Rename send_signal to request_interrupt,
686 and remove enum target_signal parameter.
687 * linux-low.c (linux_request_interrupt): Rename from
688 linux_send_signal, and always send SIGINT.
689 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
690 and always send SIGINT.
691 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
693 (input_interrupt): Likewise.
695 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
697 * server.c (get_features_xml): Check if target implemented
699 * win32-i386-low.c (win32_arch_string): New.
700 (win32_target_ops): Add win32_arch_string as arch_string member.
702 2007-02-22 Markus Deuling <deuling@de.ibm.com>
704 * spu-low.c (spu_arch_string): New.
705 (spu_target_ops): Add spu_arch_string.
707 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
709 * remote-utils.c: Remove HAVE_TERMINAL_H check.
710 * configure.ac: Do not check for terminal.h.
711 * configure, config.in: Regenerated.
713 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
715 * Makefile.in (OBS): Add $(XML_BUILTIN).
716 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
718 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
719 (arm-with-iwmmxt.c): New.
720 * config.in, configure: Regenerate.
721 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
722 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
723 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
724 (arm*-*-linux*): Add iWMMXt and regset support.
725 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
726 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
727 (arm_store_wmmxregset, target_regsets): New.
728 * server.c (get_features_xml): Take annex argument. Check builtin
730 (handle_query): Handle multiple annexes.
732 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
734 * remote-utils.c [USE_WIN32API] (read, write): Define.
735 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
738 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
740 * linux-i386-low.c (the_low_target): Set arch_string.
741 * linux-x86-64-low.c (the_low_target): Likewise.
742 * linux-low.c (linux_arch_string): New.
743 (linux_target_ops): Add it.
744 * linux-low.h (struct linux_target_ops): Add arch_string.
745 * server.c (write_qxfer_response): Use const void * for DATA.
746 (get_features_xml): New.
747 (handle_query): Handle qXfer:features:read. Report it for qSupported.
748 * target.h (struct target_ops): Add arch_string method.
750 2007-01-03 Denis Pilat <denis.pilat@st.com>
751 Daniel Jacobowitz <dan@codesourcery.com>
753 * linux-low.c (linux_kill): Handle being called with no threads.
754 * win32-i386-low.c (win32_kill): Likewise.
755 (get_child_debug_event): Clear current_process_handle.
757 2006-12-30 Denis PILAT <denis.pilat@st.com>
758 Daniel Jacobowitz <dan@codesourcery.com>
760 * remote-utils.c (remote_open): Check the type of specified
761 serial port devices before opening them.
762 * server.c (main): Kill the inferior if an error occurs during
763 the first remote_open.
765 2006-12-05 Markus Deuling <deuling@de.ibm.com>
767 * README: Update supported targets.
769 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
771 * Makefile.in (clean): Remove reg-mips64.c.
772 (reg-mips64.c, reg-mips64.o): New rules.
773 * configure.srv: Handle mips64. Include regset support for mips.
774 * linux-mips-low.c (union mips_register): New.
775 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
776 (mips_breakpoint, mips_breakpoint_at): Use int.
777 (mips_collect_register, mips_supply_register)
778 (mips_collect_register_32bit, mips_supply_register_32bit)
779 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
780 (mips_store_fpregset, target_regsets): New.
781 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
783 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
785 * configure.srv: Add target "spu*-*-*".
786 * Makefile.in (clean): Remove reg-spu.c.
787 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
788 * spu-low.c: New file.
790 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
792 * configure.ac: Correct td_thr_tls_get_addr test.
793 * configure: Regenerated.
795 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
797 * linux-low.c (linux_wait_for_event): Reformat. Use the
799 * remote-utils.c (decode_address_to_semicolon): New.
800 * server.c (pass_signals, handle_general_set): New.
801 (handle_query): Mention QPassSignals for qSupported.
802 (main): Call handle_general_set.
803 * server.h (pass_signals, decode_address_to_semicolon): New.
805 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
807 * server.c (handle_query): Correct error handling for read_auxv.
809 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
811 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
812 and srv_linux_thread_db to yes.
813 * linux-s390-low.c (s390_fill_gregset): New function.
814 (target_regsets): Define data structure.
816 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
818 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
819 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
820 * config.in, configure: Regenerated.
821 * inferiors.c (gdb_id_to_thread): New function.
822 (gdb_id_to_thread_id): Use it.
823 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
824 * linux-low.h (struct process_info): Add th member.
825 (thread_db_get_tls_address): New prototype.
826 * remote-utils.c (decode_address): Make non-static.
827 * server.c (handle_query): Handle qGetTLSAddr.
828 * server.h (gdb_id_to_thread, decode_address): New prototypes.
829 * target.h (struct target_ops): Add get_tls_address.
830 * thread-db.c (maybe_attach_thread): Save the thread handle.
831 (thread_db_get_tls_address): New.
833 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
835 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
836 (linux_resume_one_process): Take a siginfo_t *. Update all
837 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
838 (struct pending_signals): Add a siginfo_t.
839 (linux_wait_for_process): Always set last_status.
840 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
841 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
842 * linux-low.h (struct process_info): Add last_status.
844 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
846 * remote-utils.c (try_rle): New function.
847 (putpkt_binary): Use it.
849 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
851 * Makefile.in (clean): Clean reg-x86-64-linux.c.
852 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
853 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
854 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
855 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
858 2006-08-08 Richard Sandiford <richard@codesourcery.com>
860 * server.c (terminal_fd): New variable.
861 (old_foreground_pgrp): Likewise.
862 (restore_old_foreground_pgrp): New function.
863 (start_inferior): Record the terminal file descriptor in terminal_fd
864 and its original foreground group in old_foreground_pgrp. Register
865 restore_old_foreground_pgrp with atexit().
867 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
869 * server.c (handle_query): Correct qPart to qXfer.
871 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
873 * configure.ac: Check for more headers which are missing on
874 Windows. Automatically supply -lwsock32 and USE_WIN32API.
875 * configure.srv: Add Cygwin and mingw32.
876 * remote-utils.c: Don't include headers unconditionally which
877 are missing on mingw32. Include <winsock.h> for mingw32.
878 (remote_open): Adjust for mingw32 support. Flush
879 standard error after writing to it.
880 (remote_close, putpkt_binary, input_interrupt, block_async_io)
881 (unblock_async_io, enable_async_io, disable_async_io)
882 (readchar, getpkt): Update for Winsock support.
883 (prepare_resume_reply): Expect a protocol signal number.
884 * server.c: Disable <sys/wait.h> on mingw32.
885 (start_inferior): Adjust for mingw32 support. Flush
886 standard error after writing to it.
887 (attach_inferior): Likewise. Use protocol signal
889 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
891 * win32-i386-low.c: New file.
892 * Makefile.in (XM_CLIBS): Set.
893 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
894 (win32-i386-low.o): New dependency rule.
895 * linux-low.c (linux_wait): Use target signal numbers.
896 * target.h (struct target_ops): Doc fix.
897 * server.h (target_signal_to_name): New prototype.
898 * gdbreplay.c: Don't include headers unconditionally which
899 are missing on mingw32. Include <winsock.h> for mingw32.
900 (remote_close, remote_open): Adjust for Winsock support.
901 * configure, config.in: Regenerated.
903 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
905 * server.c (decode_xfer_read, write_qxfer_response): New.
906 (handle_query): Take a packet length argument. Handle
907 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
908 the qSupported response.
909 (main): Update call to handle_query.
911 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
913 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
914 (putpkt_binary): Renamed from putpkt and adjusted for binary
916 (putpkt): New wrapper for putpkt_binary.
917 (readchar): Don't mask off the high bit.
918 (decode_X_packet): New function.
919 * server.c (main): Call putpkt_binary if a handler sets the packet
920 length. Save the length of the incoming packet. Handle 'X'.
921 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
923 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
925 * server.c (handle_query): Handle qSupported.
927 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
929 * remote-utils.c (all_symbols_looked_up): New variable.
930 (look_up_one_symbol): Check it.
931 * server.h (look_up_one_symbol): New declaration.
932 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
934 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
936 * Makefile.in (linux-arm-low.o): Update dependencies.
937 * linux-arm-low.c: Include "gdb_proc_service.h".
938 (PTRACE_GET_THREAD_AREA): Define.
939 (ps_get_thread_area): New function.
941 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
943 * configure.srv (m68k*-*-uclinux*): New target.
944 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
945 (linux_resume_one_process): Remove extraneous cast.
946 (linux_read_offsets): New.
947 (linux_target_op): Add linux_read_offsets on mmuless systems.
948 * server.c (handle_query): Add qOffsets logic.
949 * target.h (struct target_ops): Add read_offsets.
951 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
953 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
954 (PTRACE_GET_THREAD_AREA): Define.
955 (ps_get_thread_area): New function.
956 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
957 (linux-x86-64-low.o): Update.
959 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
961 * configure.ac: Remove checks for prfpregset_t.
962 * gdb_proc_service.h: New file.
963 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
964 new "gdb_proc_service.h".
965 * proc-service.c: Likewise.
966 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
967 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
968 * Makefile.in (gdb_proc_service_h): Updated.
969 * configure, config.in: Regenerated.
971 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
973 * remote-utils.c (prepare_resume_reply): Move declaration
974 of gdb_id_from_wait to the top of the block.
976 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
978 * linux-low.c (regsets_store_inferior_registers): Read the regset
979 from the target before filling it.
981 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
983 * server.c (attach_inferior): Return SIGTRAP for a successful
986 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
988 * Makefile.in (OBS): Add version.o.
989 (STAGESTUFF): Delete.
990 (version.o): Add dependencies.
991 (version.c): Replace rule.
992 (clean): Remove version.c.
993 * server.c (gdbserver_version): New.
994 (gdbserver_usage): Use printf.
995 (main): Handle --version and --help.
996 * server.h (version, host_name): Add declarations.
998 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1010 * linux-x86-64-low.c:
1013 * linux-ppc64-low.c:
1022 * linux-crisv32-low.c:
1034 * gdbserver.1: Add (C) after Copyright. Update the FSF
1037 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1039 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1040 (arm_breakpoint_at): Recognize both breakpoints.
1041 (the_low_target): Use the correct breakpoint instruction.
1043 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1045 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1046 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1047 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1048 (the_low_target): Update.
1050 2005-10-25 Andreas Schwab <schwab@suse.de>
1052 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1054 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1055 (ia64_num_regs): Reduce to 462.
1057 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1059 * acinclude.m4: Correct quoting.
1060 * aclocal.m4: Regenerated.
1062 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1063 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1064 (thread_db_init): Call thread_db_err_str.
1065 * configure.ac: Check for TD_VERSION.
1066 * config.in, configure: Regenerated.
1068 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1070 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1072 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1074 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1075 is not available. Define HAVE_PTRACE_GETREGS if it is.
1076 * config.in, configure: Regenerated.
1077 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1078 * linux-i386-low.c, linux-m68k-low.c: Update to use
1079 HAVE_PTRACE_GETREGS.
1080 * linux-low.c (regsets_fetch_inferior_registers)
1081 (regsets_store_inferior_registers): Only return 0 if we processed
1083 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1084 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1086 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1088 * inferiors.c (struct thread_info): Add gdb_id.
1089 (add_thread): Add gdb_id argument.
1090 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1091 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1092 calls to add_thread.
1093 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1094 * server.c (handle_query): Use thread_to_gdb_id.
1095 (handle_v_cont, main): Use gdb_id_to_thread_id.
1096 * server.h (add_thread): Update prototype.
1097 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1100 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1102 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1103 left-padded registers.
1104 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1105 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1107 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1109 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1110 * configure: Regenerate.
1111 * config.in: Regenerate.
1112 * server.h (NEED_DECLARATION_STRERROR):
1113 Replace with !HAVE_DECL_STRERROR.
1115 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1117 * linux-low.c (linux_wait, linux_send_signal): Don't test
1118 an unsigned long variable for > 0 if it could be MAX_ULONG.
1119 * server.c (myresume): Likewise.
1120 * target.c (set_desired_inferior): Likewise.
1122 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1124 * configure.ac: Simplify and improve check for socklen_t.
1125 * configure, config.in: Regenerate.
1127 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1129 * acconfig.h: Remove.
1130 * configure.ac: Add a test for socklen_t. Use three-argument
1131 AC_DEFINE throughout.
1132 * config.in: Regenerated using autoheader 2.59.
1133 * configure: Regenerated.
1135 * gdbreplay.c (socklen_t): Provide a default.
1136 (remote_open): Use socklen_t.
1137 * remote-utils.c (socklen_t): Provide a default.
1138 (remote_open): Use socklen_t.
1139 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1142 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1144 * linux-low.c (linux_read_memory, linux_write_memory)
1145 (linux_read_auxv): Likewise.
1146 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1147 (check_mem_write): Likewise.
1148 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1150 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1151 (registers_from_string, register_data): Likewise.
1152 * server.c (handle_query, main): Likewise.
1153 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1154 (decode_M_packet): Likewise.
1155 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1156 * target.h (struct target_ops): Update read_memory, write_memory,
1158 (read_inferior_memory, write_inferior_memory): Update.
1159 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1161 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1162 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1163 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1164 linux-s390-low.c, linux-sh-low.c: Update for changes in
1165 read_inferior_memory and the_low_target->breakpoint.
1167 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1169 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1170 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1171 * configure.srv: Add powerpc64-*-linux*.
1172 * linux-ppc64-low.c: New file.
1174 2005-05-23 Orjan Friberg <orjanf@axis.com>
1176 * linux-cris-low.c: New file with support for CRIS.
1177 * linux-crisv32-low.c: Ditto for CRISv32.
1178 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1179 (clean): Add reg-cris.c and reg-crisv32.c.
1180 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1181 reg-crisv32.o, and reg-crisv32.c to make rules.
1182 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1185 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1187 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1188 of sizeof (PTRACE_XFER_TYPE).
1189 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1191 2005-05-12 Orjan Friberg <orjanf@axis.com>
1193 * target.h (struct target_ops): Add insert_watchpoint,
1194 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1195 pointers for hardware watchpoint support.
1196 * linux-low.h (struct linux_target_ops): Ditto.
1197 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1198 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1199 to linux_target_ops.
1200 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1202 * server.c (main): Recognize 'Z' and 'z' packets.
1204 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1206 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1207 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1208 (the_low_target): Add new members.
1210 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1212 * proc-service.c (ps_lgetregs): Search all_processes instead of
1215 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1217 * server.c (start_inferior): Change return type to int.
1218 (attach_inferior): Change sigptr to int *.
1219 (handle_v_cont, handle_v_requests): Change signal to int *.
1220 (main): Change signal to int.
1222 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1224 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1225 * configure.srv: Add m32r*-*-linux*.
1226 * linux-m32r-low.c: New file.
1228 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1230 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1232 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1234 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1235 Take unsigned long arguments for PIDs.
1236 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1237 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1238 (wait_for_sigstop, linux_resume_one_process)
1239 (regsets_fetch_inferior_registers, linux_send_signal)
1240 (linux_read_auxv): Likewise. Update the types of variables holding
1241 PIDs. Update format string specifiers.
1242 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1243 * remote-utils.c (prepare_resume_reply): Likewise.
1244 * server.c (cont_thread, general_thread, step_thread)
1245 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1247 (handle_query): Update format specifiers.
1248 (handle_v_cont, main): Use strtoul for thread IDs.
1249 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1250 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1251 (general_thread, step_thread, thread_from_wait)
1252 (old_thread_from_wait): Update.
1253 * target.h (struct thread_resume): Use unsigned long for THREAD.
1254 (struct target_ops): Use unsigned long for arguments to attach and
1257 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1259 * acinclude.m4: Include bfd/bfd.m4 directly.
1260 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1261 <agriffis@toolchain.org>.
1262 * aclocal.m4, configure: Regenerated.
1264 2005-01-07 Andrew Cagney <cagney@gnu.org>
1266 * configure.ac: Rename configure.in, require autoconf 2.59.
1267 * configure: Re-generate.
1269 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1271 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1273 * aclocal.m4: Regenerated.
1274 * configure: Regenerated.
1276 2004-11-21 Andreas Schwab <schwab@suse.de>
1278 * linux-m68k-low.c (m68k_num_gregs): Define.
1279 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1280 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1281 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1282 (m68k_breakpoint_at): New. Add to the_low_target.
1284 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1285 srv_linux_thread_db to yes.
1287 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1289 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1290 (ARCH_SET_FS): Likewise.
1291 (ARCH_GET_FS): Likewise.
1292 (ARCH_GET_GS): Likewise.
1294 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1296 * linux-i386-low.c (ps_get_thread_area): New.
1297 * linux-x86-64-low.c (ps_get_thread_area): New.
1298 * linux-low.c: Include <sys/syscall.h>.
1299 (linux_kill_one_process): Don't kill the first thread here.
1300 (linux_kill): Kill the first thread here.
1301 (kill_lwp): New function.
1302 (send_sigstop, linux_send_signal): Use it.
1303 * proc-service.c: Clean up #ifdefs.
1304 (fpregset_info): Delete.
1305 (ps_lgetregs): Update and enable implementation.
1306 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1308 * remote-utils.c (struct sym_cache, symbol_cache): New.
1309 (input_interrupt): Print a clearer message.
1310 (async_io_enabled): New variable.
1311 (enable_async_io, disable_async_io): Use it. Update comments.
1312 (look_up_one_symbol): Use the symbol cache.
1313 * thread-db.c (thread_db_look_up_symbols): New function.
1314 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1316 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1318 * configure.in: Test for -rdynamic.
1319 * configure: Regenerated.
1320 * Makefile (INTERNAL_LDFLAGS): New.
1321 (gdbserver, gdbreplay): Use it.
1323 2004-09-02 Andrew Cagney <cagney@gnu.org>
1325 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1327 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1329 * linux-low.c (linux_wait): Clear all_processes list also.
1331 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1333 * linux-low.c: Include <errno.h>. Remove extern declaration of
1336 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1338 * gdbreplay.c, server.h, utils.c: Update copyright years.
1340 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1342 * server.c (main): Print child status or termination signal from
1343 variable 'signal', not 'sig'.
1345 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1347 * linux-low.c (linux_read_memory): Change return type to
1348 int. Check for and return error from ptrace().
1349 * target.c (read_inferior_memory): Change return type to int. Pass
1350 back return status from the_target->read_memory().
1351 * target.h (struct target_ops): Adapt *read_memory() prototype.
1353 (read_inferior_memory): Adapt prototype.
1354 * server.c (main): Return an error packet if
1355 read_inferior_memory() returns an error.
1357 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1359 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1360 Unify with other clean targets.
1362 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1364 * server.c (handle_v_cont): Call set_desired_inferior.
1366 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1368 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1370 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1372 * linux-low.c (linux_wait): Unblock async I/O.
1373 (linux_resume): Block and enable async I/O.
1374 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1375 * server.h (block_async_io, unblock_async_io): Add prototypes.
1377 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1379 * remote-utils.c (remote_open): Print a status notice after
1381 * server.c (attach_inferior): Print a status notice after
1384 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1386 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1388 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1390 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1392 * server.c, target.h: Update copyright years.
1394 2004-02-25 Roland McGrath <roland@redhat.com>
1396 * target.h (struct target_ops): New member `read_auxv'.
1397 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1398 * linux-low.c (linux_read_auxv): New function.
1399 (linux_target_ops): Initialize `read_auxv' member to that.
1401 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1403 Committed by Jim Blandy <jimb@redhat.com>.
1405 * linux-s390-low.c (s390_num_regs): Update.
1406 (s390_regmap): Remove control registers. Use __s390x__ predefine
1407 instead of GPR_SIZE to distiguish s390 and s390x targets.
1409 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1411 * linux-low.c: Update copyright year.
1412 (check_removed_breakpoint): Clear pending_is_breakpoint.
1413 (linux_set_resume_request, linux_queue_one_thread)
1414 (resume_status_pending_p): New functions.
1415 (linux_continue_one_thread): Use process->resume.
1416 (linux_resume): Only resume threads if there are no pending events.
1417 * linux-low.h (struct process_info): Add resume request
1420 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1422 * regcache.c (new_register_cache): Clear the allocated register
1423 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1425 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1427 * linux-low.c (linux_resume): Take a struct thread_resume *
1429 (linux_wait): Update call.
1430 (resume_ptr): New static variable.
1431 (linux_continue_one_thread): Renamed from
1432 linux_continue_one_process. Use resume_ptr.
1433 (linux_resume): Use linux_continue_one_thread.
1434 * server.c (handle_v_cont, handle_v_requests): New functions.
1435 (myresume): New function.
1436 (main): Handle 'v' case.
1437 * target.h (struct thread_resume): New type.
1438 (struct target_ops): Change argument of "resume" to struct
1440 (myresume): Delete macro.
1442 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1444 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1445 (uninstall): Support DESTDIR.
1447 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1449 * configure.srv: Add xscale*linux copy of arm*linux entry.
1451 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1453 * linux-arm-low.c (arm_reinsert_addr): New function.
1454 (the_low_target): Add arm_reinsert_addr.
1456 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1458 * mem-break.c: Remove whitespace at end of file.
1460 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1462 * configure.in: Check whether we need to prototype strerror.
1463 * server.h: Optionally prototype strerror.
1464 * gdbreplay.c (perror_with_name): Use strerror.
1465 * linux-low.c (linux_attach_lwp): Use strerror.
1466 * utils.c (perror_with_name): Use strerror.
1467 * config.in, configure: Regenerated.
1469 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1471 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1472 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1474 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1476 * Makefile.in (SFILES): Update.
1477 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1478 low-sun3.c: Remove files.
1480 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1482 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1483 (linux_detach_one_process, linux_detach): New functions.
1484 (linux_target_ops): Add linux_detach.
1485 * server.c (main): Handle 'D' packet.
1486 * target.h (struct target_ops): Add "detach" member.
1487 (detach_inferior): Define.
1489 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1491 From Kelley Cook <kelleycook@wideopenwest.com>:
1492 * configure.srv: Accept i[34567]86 variants.
1494 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1496 * linux-low.c (linux_wait_for_event): Correct comment typos.
1497 (linux_resume_one_process): Call check_removed_breakpoint.
1498 (linux_send_signal): New function.
1499 (linux_target_ops): Add linux_send_signal.
1500 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1502 * target.h (struct target_ops): Add send_signal.
1504 2003-05-29 Jim Blandy <jimb@redhat.com>
1506 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1507 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1508 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1509 away part of the register's value.
1511 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1513 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1514 (linux_wait_for_event, linux_init_signals): Likewise.
1516 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1518 * configure.in: Check for stdlib.h.
1519 * configure: Regenerated.
1520 * config.in: Regenerated.
1522 2003-01-04 Andreas Schwab <schwab@suse.de>
1524 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1526 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1528 * Makefile.in: Remove obsolete code.
1530 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1532 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1533 defined(PT_FPR0_HI).
1535 2002-11-17 Stuart Hughes <seh@zee2.com>
1537 * linux-arm-low.c (arm_num_regs): Increase.
1538 (arm_regmap): Include status register.
1540 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1542 * linux-low.c (register_addr): Remove incorrect -1 check.
1544 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1546 * linux-low.c (linux_create_inferior): Call setpgid. Return
1548 (unstopped_p, linux_signal_pid): Remove.
1549 (linux_target_ops): Remove linux_signal_pid.
1550 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1551 global instead of target method.
1552 * target.h (struct target_ops): Remove signal_pid. Update comment
1553 for create_inferior.
1554 * server.c (signal_pid): New variable.
1555 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1556 gdbserver. Set the child to be the foreground process group.
1557 (attach_inferior): Set signal_pid.
1559 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1561 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1563 2002-08-20 Jim Blandy <jimb@redhat.com>
1565 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1568 2002-08-01 Andrew Cagney <cagney@redhat.com>
1570 * Makefile.in: Make chill references obsolete.
1572 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1574 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1575 * configure: Regenerate.
1576 * config.in: Regenerate.
1578 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1580 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1581 (perror_with_name, remote_close, remote_open, expect, play): Static.
1583 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1585 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1586 byte offsets instead of an array of indexes.
1587 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1589 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1591 * regcache.c: Add comment.
1593 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1595 * thread-db.c: New file.
1596 * proc-service.c: New file.
1597 * acinclude.m4: New file.
1598 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1599 proc-service.o, and thread-db.o.
1600 (linux-low.o): Add USE_THREAD_DB.
1601 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1602 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1603 * aclocal.m4: Regenerated.
1604 * config.in: Regenerated.
1605 * configure: Regenerated.
1606 * configure.in: Check for proc_service.h, sys/procfs.h,
1607 thread_db.h, and linux/elf.h headrs.
1608 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1609 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1610 Check for -lthread_db and thread support.
1611 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1612 PowerPC, and SuperH.
1613 * i387-fp.c: Constify arguments.
1614 * i387-fp.h: Likewise.
1615 * inferiors.c: (struct thread_info): Renamed from
1616 `struct inferior_info'. Remove PID member. Use generic inferior
1617 list header. All uses updated.
1618 (inferiors, signal_pid): Removed.
1619 (all_threads): New variable.
1620 (get_thread): Define.
1621 (add_inferior_to_list): New function.
1622 (for_each_inferior): New function.
1623 (change_inferior_id): New function.
1624 (add_inferior): Removed.
1625 (remove_inferior): New function.
1626 (add_thread): New function.
1627 (free_one_thread): New function.
1628 (remove_thread): New function.
1629 (clear_inferiors): Use for_each_inferior and free_one_thread.
1630 (find_inferior): New function.
1631 (find_inferior_id): New function.
1632 (inferior_target_data): Update argument type.
1633 (set_inferior_target_data): Likewise.
1634 (inferior_regcache_data): Likewise.
1635 (set_inferior_regcache_data): Likewise.
1636 * linux-low.c (linux_bp_reinsert): Remove.
1637 (all_processes, stopping_threads, using_thrads)
1638 (struct pending_signals, debug_threads, pid_of): New.
1639 (inferior_pid): Replace with macro.
1640 (struct inferior_linux_data): Remove.
1641 (get_stop_pc, add_process): New functions.
1642 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1643 Use add_process and add_thread.
1644 (linux_attach_lwp): New function, based on old linux_attach. Use
1645 add_process and add_thread. Set stop_expected for new threads.
1646 (linux_attach): New function.
1647 (linux_kill_one_process): New function.
1648 (linux_kill): Kill all LWPs.
1649 (linux_thread_alive): Use find_inferior_id.
1650 (check_removed_breakpoints, status_pending_p): New functions.
1651 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1652 Update. Use WNOHANG. Wait for cloned processes also. Update process
1653 struct for the found process.
1654 (linux_wait_for_event): New function.
1655 (linux_wait): Use it. Support LWPs.
1656 (send_sigstop, wait_for_sigstop, stop_all_processes)
1657 (linux_resume_one_process, linux_continue_one_process): New functions.
1658 (linux_resume): Support LWPs.
1659 (REGISTER_RAW_SIZE): Remove.
1660 (fetch_register): Use register_size instead. Call supply_register.
1661 (usr_store_inferior_registers): Likewise. Call collect_register.
1663 (regsets_fetch_inferior_registers): Improve error message.
1664 (regsets_store_inferior_registers): Add debugging.
1665 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1666 (unstopped_p, linux_signal_pid): New functions.
1667 (linux_target_ops): Add linux_signal_pid.
1668 (linux_init_signals): New function.
1669 (initialize_low): Call it. Initialize using_threads.
1670 * regcache.c (inferior_regcache_data): Add valid
1672 (get_regcache): Fetch registers lazily. Add fetch argument
1673 and update all callers.
1674 (regcache_invalidate_one, regcache_invalidate): New
1676 (new_register_cache): Renamed from create_register_cache.
1677 Return the new regcache.
1678 (free_register_cache): Change argument to a void *.
1679 (registers_to_string, registers_from_string): Call get_regcache
1680 with fetch flag set.
1681 (register_data): Make static. Pass fetch flag to get_regcache.
1682 (supply_register): Call get_regcache with fetch flag clear.
1683 (collect_register): Call get_regcache with fetch flag set.
1684 (collect_register_as_string): New function.
1685 * regcache.h: Update.
1686 * remote-utils.c (putpkt): Flush after debug output and use
1688 Handle input interrupts while waiting for an ACK.
1689 (input_interrupt): Use signal_pid method.
1690 (getpkt): Flush after debug output and use stderr.
1691 (outreg): Use collect_register_as_string.
1692 (new_thread_notify, dead_thread_notify): New functions.
1693 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1695 (look_up_one_symbol): Flush after debug output.
1696 * server.c (step_thread, server_waiting): New variables.
1697 (start_inferior): Don't use signal_pid. Update call to mywait.
1698 (attach_inferior): Update call to mywait.
1699 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1700 (main): Don't fetch/store registers explicitly. Use
1701 set_desired_inferior. Support proposed ``Hs'' packet. Update
1704 (struct inferior_list, struct_inferior_list_entry): New.
1705 * target.c (set_desired_inferior): New.
1706 (write_inferior_memory): Constify.
1707 (mywait): New function.
1709 (struct target_ops): New signal_pid method.
1710 (mywait): Removed macro, added prototype.
1712 * linux-low.h (regset_func): Removed.
1713 (regset_fill_func, regset_store_func): New.
1714 (enum regset_type): New.
1715 (struct regset_info): Add type field. Use new operation types.
1716 (struct linux_target_ops): stop_pc renamed to get_pc.
1717 Add decr_pc_after_break and breakpoint_at.
1718 (get_process, get_thread_proess, get_process_thread)
1719 (strut process_info, all_processes, linux_attach_lwp)
1720 (thread_db_init): New.
1722 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1723 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1724 (the_low_target): Add new members.
1725 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1726 (i386_store_fpxregset): Constify.
1727 (target_regsets): Add new kind identifier.
1728 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1729 (i386_set_pc): Add debugging.
1730 (i386_breakpoint_at): New function.
1731 (the_low_target): Add new members.
1732 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1733 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1734 (mips_breakpoint_at): New.
1735 (the_low_target): Add new members.
1736 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1737 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1738 (the_low_target): Add new members.
1739 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1740 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1741 (the_low_target): Add new members.
1742 * linux-x86-64-low.c (target_regsets): Add new kind
1745 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1747 From Martin Pool <mbp@samba.org>:
1748 * server.c (gdbserver_usage): New function.
1751 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1753 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1756 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1758 * Makefile.in: Remove obsolete code.
1760 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1762 * linux-low.c (regsets_fetch_inferior_registers),
1763 (regsets_store_inferior_registers): Removed cast to int from
1765 * regcache.h: Added declaration of struct inferior_info.
1767 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1769 * inferiors.c (struct inferior_info): Add regcache_data.
1770 (add_inferior): Call create_register_cache.
1771 (clear_inferiors): Call free_register_cache.
1772 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1773 * regcache.c (struct inferior_regcache_data): New.
1774 (registers): Remove.
1775 (get_regcache): New function.
1776 (create_register_cache, free_register_cache): New functions.
1777 (set_register_cache): Don't initialize the register cache here.
1778 (registers_to_string, registers_from_string, register_data): Call
1780 * regcache.h: Add prototypes.
1781 * server.h: Likewise.
1783 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1785 * mem-break.c: New file.
1786 * mem-break.h: New file.
1787 * Makefile.in: Add mem-break.o rule; update server.h
1789 * inferiors.c (struct inferior_info): Add target_data
1791 (clear_inferiors): Free target_data member if set.
1792 (inferior_target_data, set_inferior_target_data): New functions.
1793 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1794 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1795 * linux-low.c (linux_bp_reinsert): New variable.
1796 (struct inferior_linux_data): New.
1797 (linux_create_inferior): Use set_inferior_target_data.
1798 (linux_attach): Likewise. Call add_inferior.
1799 (linux_wait_for_one_inferior): New function.
1800 (linux_wait): Call it.
1801 (linux_write_memory): Add const.
1802 (initialize_low): Call set_breakpoint_data.
1803 * linux-low.h (struct linux_target_ops): Add breakpoint
1805 * server.c (attach_inferior): Remove extra add_inferior
1807 * server.h: Include mem-break.h. Update inferior.c
1809 * target.c (read_inferior_memory)
1810 (write_inferior_memory): New functions.
1811 * target.h (read_inferior_memory)
1812 (write_inferior_memory): Change macros to prototypes.
1813 (struct target_ops): Update comments. Add const to write_memory
1816 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1818 * linux-low.c (usr_store_inferior_registers): Support
1819 registers which are allowed to fail to store.
1820 * linux-low.h (linux_target_ops): Likewise.
1821 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1822 (ppc_cannot_store_register): FPSCR may not be storable.
1824 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1826 * server.h: Include <string.h> if HAVE_STRING_H.
1827 * ChangeLog: Correct paths in last ChangeLog entry.
1829 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1831 * linux-low.h: Remove obsolete prototypes.
1832 (struct linux_target_ops): New.
1833 (extern the_low_target): New.
1834 * linux-low.c (num_regs, regmap): Remove declarations.
1835 (register_addr): Use the_low_target explicitly.
1836 (fetch_register): Likewise.
1837 (usr_fetch_inferior_registers): Likewise.
1838 (usr_store_inferior_registers): Likewise.
1839 * linux-arm-low.c (num_regs): Remove.
1840 (arm_num_regs): Define.
1841 (arm_regmap): Renamed from regmap, made static.
1842 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1844 (arm_cannot_store_register): Renamed from cannot_store_register,
1846 (the_low_target): New.
1847 * linux-i386-low.c (num_regs): Remove.
1848 (i386_num_regs): Define.
1849 (i386_regmap): Renamed from regmap, made static.
1850 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1852 (i386_cannot_store_register): Renamed from cannot_store_register,
1854 (the_low_target): New.
1855 * linux-ia64-low.c (num_regs): Remove.
1856 (ia64_num_regs): Define.
1857 (ia64_regmap): Renamed from regmap, made static.
1858 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1860 (ia64_cannot_store_register): Renamed from cannot_store_register,
1862 (the_low_target): New.
1863 * linux-m68k-low.c (num_regs): Remove.
1864 (m68k_num_regs): Define.
1865 (m68k_regmap): Renamed from regmap, made static.
1866 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1868 (m68k_cannot_store_register): Renamed from cannot_store_register,
1870 (the_low_target): New.
1871 * linux-mips-low.c (num_regs): Remove.
1872 (mips_num_regs): Define.
1873 (mips_regmap): Renamed from regmap, made static.
1874 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1876 (mips_cannot_store_register): Renamed from cannot_store_register,
1878 (the_low_target): New.
1879 * linux-ppc-low.c (num_regs): Remove.
1880 (ppc_num_regs): Define.
1881 (ppc_regmap): Renamed from regmap, made static.
1882 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1884 (ppc_cannot_store_register): Renamed from cannot_store_register,
1886 (the_low_target): New.
1887 * linux-s390-low.c (num_regs): Remove.
1888 (s390_num_regs): Define.
1889 (s390_regmap): Renamed from regmap, made static.
1890 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1892 (s390_cannot_store_register): Renamed from cannot_store_register,
1894 (the_low_target): New.
1895 * linux-sh-low.c (num_regs): Remove.
1896 (sh_num_regs): Define.
1897 (sh_regmap): Renamed from regmap, made static.
1898 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1900 (sh_cannot_store_register): Renamed from cannot_store_register,
1902 (the_low_target): New.
1903 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1904 (the_low_target): New.
1906 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1908 * Makefile.in: Add stamp-h target.
1909 * configure.in: Create stamp-h.
1910 * configure: Regenerated.
1912 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1914 * inferiors.c: New file.
1915 * target.c: New file.
1916 * target.h: New file.
1917 * Makefile.in: Add target.o and inferiors.o. Update
1919 * linux-low.c (inferior_pid): New static variable,
1920 moved from server.c.
1921 (linux_create_inferior): Renamed from create_inferior.
1922 Call add_inferior. Return 0 on success instead of a PID.
1923 (linux_attach): Renamed from myattach.
1924 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1925 (linux_thread_alive): Renamed from mythread_alive.
1926 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1928 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1929 (regsets_store_inferior_registers): Correct error message.
1930 Add missing ``return 0''.
1931 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1932 (linux_store_registers): Renamed from store_inferior_registers.
1933 (linux_read_memory): Renamed from read_inferior_memory.
1934 (linux_write_memory): Renamed from write_inferior_memory.
1935 (linux_target_ops): New structure.
1936 (initialize_low): Call set_target_ops ().
1937 * remote-utils.c (unhexify): New function.
1938 (hexify): New function.
1939 (input_interrupt): Send signals to ``signal_pid''.
1940 * server.c (inferior_pid): Remove.
1941 (start_inferior): Update create_inferior call.
1942 (attach_inferior): Call add_inferior.
1943 (handle_query): New function.
1944 (main): Call handle_query for `q' packets.
1945 * server.h: Include "target.h". Remove obsolete prototypes.
1946 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1948 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1950 * Makefile.in: Add WARN_CFLAGS. Update configury
1952 * configure.in: Check for <string.h>
1953 * configure: Regenerate.
1954 * config.in: Regenerate.
1955 * gdbreplay.c: Include needed system headers.
1956 (remote_open): Remove strchr prototype.
1957 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1958 * regcache.c (supply_register): Change buf argument to const void *.
1959 (supply_register_by_name): Likewise.
1960 (collect_register): Change buf argument to void *.
1961 (collect_register_by_name): Likewise.
1962 * regcache.h: Add missing prototypes.
1963 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1964 * server.c (handle_query): New function.
1965 (attached): New static variable, moved out of main.
1966 (main): Quiet longjmp clobber warnings.
1967 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1968 * utils.c (error): Remove NORETURN.